|
|
|
@ -4090,6 +4090,81 @@ |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 04-MHM 责任人:role(7,8) + user_role + users --> |
|
|
|
<select id="getMhmResponsibleOperatorList" resultType="com.xujie.sys.modules.pms.data.EamAdminData" parameterType="com.xujie.sys.modules.pms.data.EamAdminData"> |
|
|
|
SELECT DISTINCT |
|
|
|
u.id as userId, |
|
|
|
u.username as adminID, |
|
|
|
u.display as adminName, |
|
|
|
u.department as departmentName, |
|
|
|
ur.role_id as roleId, |
|
|
|
r.name as roleName |
|
|
|
FROM users u |
|
|
|
INNER JOIN user_role ur ON u.id = ur.user_id |
|
|
|
INNER JOIN role r ON ur.role_id = r.id |
|
|
|
<where> |
|
|
|
ur.role_id IN (7, 8) |
|
|
|
AND (u.active = 'Y' OR u.active IS NULL) |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
AND u.site = #{site} |
|
|
|
</if> |
|
|
|
<if test="adminID != null and adminID != ''"> |
|
|
|
AND u.username LIKE '%' + #{adminID} + '%' |
|
|
|
</if> |
|
|
|
<if test="adminName != null and adminName != ''"> |
|
|
|
AND u.display LIKE '%' + #{adminName} + '%' |
|
|
|
</if> |
|
|
|
<if test="roleId != null and roleId != ''"> |
|
|
|
AND ur.role_id = #{roleId} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY u.username |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getMhmResponsibleRoleList" resultType="com.xujie.sys.modules.pms.data.EamAdminData"> |
|
|
|
SELECT id as roleId, name as roleName |
|
|
|
FROM role |
|
|
|
WHERE id IN (7, 8) |
|
|
|
ORDER BY id |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 04-MHM 协同人员:按职位名称 --> |
|
|
|
<select id="getMhmOperatorListByRoleName" resultType="com.xujie.sys.modules.pms.data.EamAdminData" parameterType="com.xujie.sys.modules.pms.data.EamAdminData"> |
|
|
|
SELECT DISTINCT |
|
|
|
u.id as userId, |
|
|
|
u.username as adminID, |
|
|
|
u.display as adminName, |
|
|
|
u.department as departmentName, |
|
|
|
ur.role_id as roleId, |
|
|
|
r.name as roleName |
|
|
|
FROM users u |
|
|
|
INNER JOIN user_role ur ON u.id = ur.user_id |
|
|
|
INNER JOIN role r ON ur.role_id = r.id |
|
|
|
<where> |
|
|
|
r.name = #{roleName} |
|
|
|
AND (u.active = 'Y' OR u.active IS NULL) |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
AND u.site = #{site} |
|
|
|
</if> |
|
|
|
<if test="adminID != null and adminID != ''"> |
|
|
|
AND u.username LIKE '%' + #{adminID} + '%' |
|
|
|
</if> |
|
|
|
<if test="adminName != null and adminName != ''"> |
|
|
|
AND u.display LIKE '%' + #{adminName} + '%' |
|
|
|
</if> |
|
|
|
<if test="roleId != null and roleId != ''"> |
|
|
|
AND ur.role_id = #{roleId} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
ORDER BY u.username |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getMhmRoleByName" resultType="com.xujie.sys.modules.pms.data.EamAdminData" parameterType="com.xujie.sys.modules.pms.data.EamAdminData"> |
|
|
|
SELECT id as roleId, name as roleName |
|
|
|
FROM role |
|
|
|
WHERE name = #{roleName} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getDataContentList" parameterType="com.xujie.sys.modules.pms.data.QcCollectionDataContentData" resultType="com.xujie.sys.modules.pms.data.QcCollectionDataContentData"> |
|
|
|
select |
|
|
|
content_desc |
|
|
|
|