Browse Source

人员筛选调整

徐滕 6 days ago
parent
commit
377b57a56f

+ 3 - 2
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

@@ -1016,8 +1016,9 @@
         ORDER BY a.update_time DESC
     </select>
     <select id="getOverArchiveFlag" resultType="java.lang.Integer">
-        select count(id) from program_archive
-        where over_archive_status =1 and status != 7 and create_by_id = #{currentUser.id}
+        select count(a.id) from program_archive a
+         left join program_project_list_info b on a.program_id = b.id AND b.del_flag = 0
+        where a.over_archive_status =1 and a.status != 7 and a.create_by_id = #{currentUser.id}
     </select>
 
     <select id="getProjectAllList" resultType="java.lang.String">

+ 3 - 2
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/reimbursement/reimbursementInfo/mapper/xml/ReimbursementInfoMapper.xml

@@ -236,9 +236,10 @@
 		FROM
 		sys_user a
 		LEFT JOIN sys_office b ON a.office_id = b.id
-		left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0'
+		left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0' and (sc.status = '5' or sc.status IS NULL)
 		WHERE
-		a.del_flag = 0 and a.is_admin is null and a.login_flag = 1 and sc.type = '6' and a.tenant_id = '10003'
+		a.del_flag = 0 and a.is_admin is null and a.login_flag = 1 and sc.type = '6'
+
 		<if test="name != null and name != ''">
 			and a.`name` LIKE CONCAT ('%', #{name}, '%')
 		</if>

+ 6 - 7
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -390,6 +390,7 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
     </select>
     <select id="findList3" resultType="com.jeeplus.sys.service.dto.UserDTO">
         SELECT
+        DISTINCT
         a.id,
         a.company_id AS "companyDTO.id",
         a.office_id AS "officeDTO.id",
@@ -427,8 +428,7 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
         LEFT JOIN sys_user_post AS user_post ON user_post.post_id = post.id
         LEFT JOIN sys_user AS a ON a.id = user_post.user_id
         AND a.del_flag = 0
-        LEFT JOIN sys_cert sc ON a.id = sc.user_id
-        AND sc.del_flag = '0'
+        left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0' and (sc.status = '5' or sc.status IS NULL)
         LEFT JOIN sys_office c ON c.id = a.company_id
         LEFT JOIN sys_office o ON o.id = a.office_id
         <where>
@@ -439,12 +439,12 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
             <if test="loginName != null and loginName != '' ">
                 AND a.login_name LIKE CONCAT('%', #{loginName}, '%')
             </if>
-            AND post.del_flag = 0
+            AND post.del_flag = 0  AND sc.type = '6'
         </where>
     </select>
     <select id="findList1" resultType="com.jeeplus.sys.service.dto.UserDTO">
         SELECT
-			a.id,
+        DISTINCT a.id,
 			a.company_id AS "companyDTO.id",
 			a.office_id AS "officeDTO.id",
 			a.login_name AS "loginName",
@@ -481,8 +481,7 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
 				LEFT JOIN sys_user_post AS user_post ON user_post.post_id = post.id
 				LEFT JOIN sys_user AS a ON a.id = user_post.user_id
 				AND a.del_flag = 0
-				LEFT JOIN sys_cert sc ON a.id = sc.user_id
-				AND sc.del_flag = '0'
+                left join sys_cert sc on a.id = sc.user_id and sc.del_flag = '0' and (sc.status = '5' or sc.status IS NULL)
 				LEFT JOIN sys_office c ON c.id = a.company_id
 				LEFT JOIN sys_office o ON o.id = a.office_id
 		WHERE
@@ -490,7 +489,7 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
             <if test="companyId != null and companyId != '' ">
                 AND a.company_id = #{companyId}
             </if>
-		  AND post.del_flag = 0
+		  AND post.del_flag = 0  AND sc.type = '6'
     </select>
 
     <update id="updateUserUpPassword">