소스 검색

人员工时统计表和人员月度工时表离职人员bug修复

cs 2 년 전
부모
커밋
859a386b3f
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -1020,6 +1020,7 @@
         from user us
         left join  department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date < #{startDate})
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>
@@ -1059,6 +1060,7 @@
         from user us
         left join  department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>
@@ -1226,6 +1228,7 @@
         from user us
         left join department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>
@@ -1258,6 +1261,7 @@
         from user us
         left join  department dp on dp.department_id=us.department_id
         where us.company_id=#{companyId}
+        and us.id NOT IN (SELECT id FROM `user` WHERE company_id=#{companyId} and inactive_date IS NOT NULL AND inactive_date &lt; #{startDate})
         <if test="userId!=null and userId!=''">
             and us.id=#{userId}
         </if>