diff --git a/bonus-modules/bonus-project/src/main/resources/mapper/safetycheck/SecurityCheckMapper.xml b/bonus-modules/bonus-project/src/main/resources/mapper/safetycheck/SecurityCheckMapper.xml index c3d6639..95b4a99 100644 --- a/bonus-modules/bonus-project/src/main/resources/mapper/safetycheck/SecurityCheckMapper.xml +++ b/bonus-modules/bonus-project/src/main/resources/mapper/safetycheck/SecurityCheckMapper.xml @@ -516,8 +516,9 @@ SELECT lcp.cons_persion_id AS value, pcp.cons_name AS label FROM lk_cont_person lcp - LEFT JOIN pt_cons_person pcp ON lcp.cons_persion_id = pcp.cons_user_id AND pcp.is_active = 1 + LEFT JOIN pt_cons_person pcp ON lcp.cons_persion_id = pcp.cons_user_id WHERE lcp.cont_uuid = #{supUuid} AND lcp.into_status = 3 AND lcp.out_status != 3 AND lcp.pro_id = #{proId} + AND pcp.is_active = 1 select - id as snapshotId, - pro_id as proId, - pro_name as proName, - description, - if(status = '1', '已保存', if(status = '2', '已转违章', if(status = '3', '已转隐患', ''))) as status, - if(into_status = '1', '待审批', if(into_status = '2', '已通过', if(into_status = '3', '未通过', ''))) as intoStatus, - create_time as createTime, - update_time as updateTime, - create_user_id as createUserId, - create_user_name as createUserName, - phone, - dept_id as deptId, - dept_name as deptName, - post_id as postId, - post_name as postName, - shooting_location as shootingLocation - from st_snapshot + ss.id as snapshotId, + ss.pro_id as proId, + ss.pro_name as proName, + ss.description, + if(ss.status = '1', '已保存', if(ss.status = '2', '已转违章', if(ss.status = '3', '已转隐患', ''))) as status, + if(ss.into_status = '1', '待审批', if(ss.into_status = '2', '已通过', if(ss.into_status = '3', '未通过', ''))) as intoStatus, + ss.create_time as createTime, + ss.update_time as updateTime, + ss.create_user_id as createUserId, + su.nick_name as createUserName, + ss.phone, + ss.dept_id as deptId, + ss.dept_name as deptName, + ss.post_id as postId, + ss.post_name as postName, + ss.shooting_location as shootingLocation + from st_snapshot ss + left join sys_user su on ss.create_user_id = su.user_id where is_active = '1' - and status = #{type} + and ss.status = #{type} - and create_user_id = #{userId} + and ss.create_user_id = #{userId} - and pro_name like concat('%', #{proName}, '%') + and ss.pro_name like concat('%', #{proName}, '%') - and DATE_FORMAT(create_time, '%Y-%m-%d') between #{startTime} and #{endTime} + and DATE_FORMAT(ss.create_time, '%Y-%m-%d') between #{startTime} and #{endTime} - and status = #{status} + and ss.status = #{status} - and into_status = #{intoStatus} + and ss.into_status = #{intoStatus} - and phone like concat('%', #{phone}, '%') + and ss.phone like concat('%', #{phone}, '%') - and create_user_name like concat('%', #{userName}, '%') + and ss.create_user_name like concat('%', #{userName}, '%')