Commit 1f70c95f authored by ZWT's avatar ZWT

得到的

parent 96ea2301
......@@ -8,6 +8,7 @@
<result column="LEV" property="lev"/>
<result column="CITY_CODE" property="cityCode"/>
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -16,27 +17,29 @@
LEV,
CITY_CODE
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select
SELECT
<include refid="Base_Column_List"/>
from SYS_AREA
where
id=#{id}
FROM SYS_AREA
WHERE
ID=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select
SELECT
<include refid="Base_Column_List"/>
from SYS_AREA
where
id=#{id}
FROM SYS_AREA
WHERE
ID=#{id}
</select>
<select id="selectListAll" parameterType="pps.core.system.entity.SysAreaView" resultMap="BaseResultMap">
select
SELECT
<include refid="Base_Column_List"/>
from SYS_AREA
FROM SYS_AREA
WHERE
id &lt;&gt; 120
ID &lt;&gt; 120
ORDER BY
PARENT_ID,
id
......@@ -77,8 +80,8 @@
</select>
<resultMap id="ExtResultMap" type="pps.core.system.entity.SysAreaView" extends="BaseResultMap">
<result column="PROVINCE" property="province" />
<result column="CITY" property="city" />
<result column="PROVINCE" property="province"/>
<result column="CITY" property="city"/>
</resultMap>
<select id="selectProvinceAndCity" parameterType="list" resultMap="ExtResultMap">
......
......@@ -16,6 +16,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/>
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -30,6 +31,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -37,6 +39,7 @@
WHERE
id=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysAuthOuScopeView" resultMap="BaseResultMap">
SELECT C.ID,C.OU_ID,C.MENU_ID,A.OU_NAME,B.MENU_NAME,C.CREATE_BY_NAME,C.CREATE_TIME
FROM SYS_ORGANIZATION A ,SYS_MENU B,SYS_AUTH_OU_SCOPE C
......@@ -47,6 +50,7 @@
</if>
ORDER BY A.OU_NAME ASC ,C.CREATE_TIME DESC
</select>
<select id="selectListByUserGroupId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
resultMap="BaseResultMap">
SELECT
......@@ -68,6 +72,7 @@
AND SAU.USER_GROUP_ID =#{userGroupId}
</if>
</select>
<select id="selectOuIdsByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
resultMap="BaseResultMap">
SELECT OU_ID, OU_NAME
......@@ -99,6 +104,7 @@
LEFT JOIN SYS_ORGANIZATION SO ON SAOS.OU_ID=SO.ID AND SO.IS_DELETED =1
)
</select>
<select id="selectOuMediaTypeByUserId" parameterType="pps.core.system.entity.SysAuthOuScopeView"
resultType="pps.core.system.entity.SysAuthOuScopeView">
SELECT 'GAS' AS MEDIA_TYPE
......
......@@ -2,28 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysDictionaryViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysDictionaryView">
<id column="ID" property="id" />
<result column="PID" property="pid" />
<result column="DIC_NAME" property="dicName" />
<result column="SHORT_NAME" property="shortName" />
<result column="REMARK" property="remark" />
<result column="SORT" property="sort" />
<result column="LEVELS" property="levels" />
<result column="BE_DEFAULT" property="beDefault" />
<result column="BE_HAS_CHILDREN" property="beHasChildren" />
<result column="DIC_TYPE" property="dicType" />
<result column="EFFECT_TIME" property="effectTime" />
<result column="END_TIME" property="endTime" />
<result column="CREATE_NAME" property="createName" />
<result column="CREATE_TIME" property="createTime" />
<result column="MODIFY_NAME" property="modifyName" />
<result column="MODIFY_TIME" property="modifyTime" />
<result column="ALIAS" property="alias" />
<result column="DIC_KEY" property="dicKey" />
<result column="DIC_PATH" property="dicPath" />
<result column="USE_LOWER_LEVEL" property="useLowerLevel" />
<result column="OU_NAME" property="ouName" />
<id column="ID" property="id"/>
<result column="PID" property="pid"/>
<result column="DIC_NAME" property="dicName"/>
<result column="SHORT_NAME" property="shortName"/>
<result column="REMARK" property="remark"/>
<result column="SORT" property="sort"/>
<result column="LEVELS" property="levels"/>
<result column="BE_DEFAULT" property="beDefault"/>
<result column="BE_HAS_CHILDREN" property="beHasChildren"/>
<result column="DIC_TYPE" property="dicType"/>
<result column="EFFECT_TIME" property="effectTime"/>
<result column="END_TIME" property="endTime"/>
<result column="CREATE_NAME" property="createName"/>
<result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_NAME" property="modifyName"/>
<result column="MODIFY_TIME" property="modifyTime"/>
<result column="ALIAS" property="alias"/>
<result column="DIC_KEY" property="dicKey"/>
<result column="DIC_PATH" property="dicPath"/>
<result column="USE_LOWER_LEVEL" property="useLowerLevel"/>
<result column="OU_NAME" property="ouName"/>
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -46,6 +47,7 @@
DIC_PATH,
DIC_KEY
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -53,6 +55,7 @@
WHERE
ID=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -60,6 +63,7 @@
WHERE
ID=#{id}
</select>
<select id="selectListsByParentIds" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
SELECT
......@@ -74,6 +78,7 @@
</if>
ORDER BY SORT
</select>
<select id="selectListsByParentCodes" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
SELECT
......@@ -89,6 +94,7 @@
</where>
ORDER BY CREATE_TIME DESC
</select>
<select id="selectListsByAlias" parameterType="pps.core.system.entity.SysDictionaryView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -103,6 +109,7 @@
)
ORDER BY CREATE_TIME DESC
</select>
<select id="selectListsByByDicKeys" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
SELECT
......@@ -126,6 +133,7 @@
</where>
ORDER BY CREATE_TIME DESC
</select>
<select id="selectSysDictionaryTree" resultType="pps.core.system.entity.SysDictionaryView">
SELECT DISTINCT SD.ID, SD.PID, SD.DIC_NAME, SD.SORT
FROM SYS_DICTIONARY SD
......@@ -199,6 +207,7 @@
LEFT JOIN SYS_ORGANIZATION_DICTIONARY AASD ON A.OU_ID = AASD.OU_ID AND A.ID=AASD.DIC_CODE
WHERE AASD.END_TIME >NOW()
</select>
<select id="selectListByConditionByPage" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
SELECT A.OU_NAME,A.OU_ID,A.ID,A.ID AS DIC_CODE,ASD.PID AS
......@@ -219,6 +228,7 @@
ORDER BY ASD.EFFECT_TIME DESC
LIMIT #{startRow},#{endRow}
</select>
<select id="selectListByConditionByCount" parameterType="pps.core.system.entity.SysDictionaryView"
resultType="java.lang.Integer">
SELECT COUNT(0) FROM (
......@@ -235,6 +245,7 @@
AND SOD.OU_ID=#{ouId}
</if>)A
</select>
<select id="selectChildListByCondition" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
SELECT A.OU_NAME,
......@@ -261,6 +272,7 @@
AND SOD.DIC_CODE IS NOT NULL) A
LEFT JOIN SYS_DICTIONARY ASD ON ASD.ID = A.ID
</select>
<select id="selectListByEquipmentType" parameterType="pps.core.system.entity.SysDictionaryView"
resultMap="BaseResultMap">
WITH RECURSIVE TEMPS AS
......
......@@ -2,19 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysOrganizationDictionaryViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysOrganizationDictionaryView">
<id column="ID" property="id" />
<result column="OU_ID" property="ouId" />
<result column="PARENT_DIC_CODE" property="parentDicCode" />
<result column="DIC_CODE" property="dicCode" />
<result column="EFFECT_TIME" property="effectTime" />
<result column="END_TIME" property="endTime" />
<result column="CREATE_BY_ID" property="createById" />
<result column="CREATE_BY_NAME" property="createByName" />
<result column="CREATE_TIME" property="createTime" />
<result column="MODIFY_BY_ID" property="modifyById" />
<result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" />
<id column="ID" property="id"/>
<result column="OU_ID" property="ouId"/>
<result column="PARENT_DIC_CODE" property="parentDicCode"/>
<result column="DIC_CODE" property="dicCode"/>
<result column="EFFECT_TIME" property="effectTime"/>
<result column="END_TIME" property="endTime"/>
<result column="CREATE_BY_ID" property="createById"/>
<result column="CREATE_BY_NAME" property="createByName"/>
<result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_BY_ID" property="modifyById"/>
<result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/>
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -30,6 +31,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap">
SELECT
......@@ -38,6 +40,7 @@
WHERE
ID=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap">
SELECT
......@@ -46,6 +49,7 @@
WHERE
ID=#{id}
</select>
<select id="selectListByOuId" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap">
SELECT
......@@ -56,6 +60,7 @@
AND OU_ID=#{ouId}
</if>
</select>
<select id="selectListByDictionaryOuId" parameterType="pps.core.system.entity.SysOrganizationDictionaryView"
resultMap="BaseResultMap">
SELECT A.DIC_CODE,
......
......@@ -15,6 +15,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -30,6 +31,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationPropertyView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -37,6 +39,7 @@
WHERE
ID=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationPropertyView"
resultMap="BaseResultMap">
SELECT
......
......@@ -18,6 +18,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -36,6 +37,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -43,6 +45,7 @@
WHERE
ID=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysOrganizationRelView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -50,12 +53,14 @@
WHERE
ID=#{id}
</select>
<select id="selectEffective" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM SYS_ORGANIZATION_REL
WHERE EFFECT_TIME &lt;= now() AND END_TIME &gt;= now()
</select>
<select id="selectMaxSort" parameterType="String" resultType="pps.core.system.entity.SysOrganizationRelView">
SELECT MAX(SOR.SORT) AS SORT,
SOR.PARENT_OU_ID
......@@ -72,5 +77,4 @@
LEFT JOIN SYS_ORGANIZATION_REL SOR2 ON SOR.PARENT_OU_ID = SOR2.OU_ID
WHERE SOR2.PARENT_OU_ID = #{ouId}
</select>
</mapper>
......@@ -80,7 +80,7 @@
SELECT
<include refid="Base_Column_List"/>
FROM SYS_ORGANIZATION
WHERE IS_DELETED =1
WHERE IS_DELETED = 1
</select>
<select id="selectSysOrganizationList" parameterType="pps.core.system.entity.SysOrganizationView"
......
......@@ -12,6 +12,7 @@
<result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/>
</resultMap>
<sql id="Base_Column_List">
ID
,
......
......@@ -2,22 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserOrganizationRelViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserOrganizationRelView">
<id column="ID" property="id" />
<result column="OU_ID" property="ouId" />
<result column="USER_ID" property="userId" />
<result column="CREATE_BY_ID" property="createById" />
<result column="CREATE_BY_NAME" property="createByName" />
<result column="CREATE_TIME" property="createTime" />
<result column="MODIFY_BY_ID" property="modifyById" />
<result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" />
<result column="EFFECT_TIME" property="effectTime" />
<result column="END_TIME" property="endTime" />
<result column="OU_NAME" property="ouName" />
<result column="STATION_ID" property="stationId" />
<result column="STATION_NAME" property="stationName" />
<id column="ID" property="id"/>
<result column="OU_ID" property="ouId"/>
<result column="USER_ID" property="userId"/>
<result column="CREATE_BY_ID" property="createById"/>
<result column="CREATE_BY_NAME" property="createByName"/>
<result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_BY_ID" property="modifyById"/>
<result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/>
<result column="EFFECT_TIME" property="effectTime"/>
<result column="END_TIME" property="endTime"/>
<result column="OU_NAME" property="ouName"/>
<result column="STATION_ID" property="stationId"/>
<result column="STATION_NAME" property="stationName"/>
</resultMap>
<sql id="Base_Column_List">
ID
,
......@@ -32,6 +32,7 @@
EFFECT_TIME,
END_TIME
</sql>
<select id="selectOne" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -39,6 +40,7 @@
WHERE
ID=#{id}
</select>
<select id="selectList" parameterType="pps.core.system.entity.SysUserOrganizationRelView" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
......@@ -46,12 +48,14 @@
WHERE
ID=#{id}
</select>
<select id="selectOrgList" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
resultType="pps.core.system.entity.SysOrganizationView">
SELECT *
FROM SYS_ORGANIZATION
WHERE IS_DELETED = 1
</select>
<select id="getSysOrganizationByUserId" parameterType="pps.core.system.entity.SysUserOrganizationRelView"
resultMap="BaseResultMap">
SELECT DISTINCT SUOR.ID,
......
......@@ -2,21 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pps.core.system.mapper.SysUserRoleRelViewMapper">
<resultMap id="BaseResultMap" type="pps.core.system.entity.SysUserRoleRelView">
<id column="ID" property="id" />
<result column="ROLE_ID" property="roleId" />
<result column="ROLE_NAME" property="roleName" />
<result column="USER_ID" property="userId" />
<result column="LOGIN_NAME" property="loginName" />
<result column="USER_NAME" property="userName" />
<result column="OU_ID" property="ouId" />
<result column="OU_NAME" property="ouName" />
<result column="CONCAT_OU_NAME" property="concatOuName" />
<result column="CREATE_BY_ID" property="createById" />
<result column="CREATE_BY_NAME" property="createByName" />
<result column="CREATE_TIME" property="createTime" />
<result column="MODIFY_BY_ID" property="modifyById" />
<result column="MODIFY_BY_NAME" property="modifyByName" />
<result column="MODIFY_TIME" property="modifyTime" />
<id column="ID" property="id"/>
<result column="ROLE_ID" property="roleId"/>
<result column="ROLE_NAME" property="roleName"/>
<result column="USER_ID" property="userId"/>
<result column="LOGIN_NAME" property="loginName"/>
<result column="USER_NAME" property="userName"/>
<result column="OU_ID" property="ouId"/>
<result column="OU_NAME" property="ouName"/>
<result column="CONCAT_OU_NAME" property="concatOuName"/>
<result column="CREATE_BY_ID" property="createById"/>
<result column="CREATE_BY_NAME" property="createByName"/>
<result column="CREATE_TIME" property="createTime"/>
<result column="MODIFY_BY_ID" property="modifyById"/>
<result column="MODIFY_BY_NAME" property="modifyByName"/>
<result column="MODIFY_TIME" property="modifyTime"/>
</resultMap>
<sql id="Base_Column_List">
......@@ -112,7 +112,7 @@
<select id="selectListByRoleIds" parameterType="pps.core.system.entity.SysUserRoleRelView"
resultMap="BaseResultMap">
SELECT DISTINCT
SU.ID ,
SU.ID,
SU.USER_NAME,
SU.LOGIN_NAME,
SU.PHONE
......
......@@ -258,7 +258,6 @@
#{item}
</foreach>
</if>
</where>
</select>
......@@ -278,7 +277,6 @@
<if test="userName != null and userName!= ''">
AND SU.USER_NAME LIKE CONCAT('%',#{userName},'%')
</if>
</where>
</select>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment