浏览代码

修复考勤工时异常列表,按照在职人员的在职日期来过滤人员列表

QuYueTing 2 周之前
父节点
当前提交
c16b31bf2b

+ 10 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -10477,8 +10477,16 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         }
         List<User> needRangeUserList=new ArrayList<>();
         for (User u : allRangeUserList) {
-            if(u.getInactiveDate()==null||(u.getInactiveDate()!=null&&u.getInactiveDate().isAfter(LocalDate.parse(startDate))||u.getIsActive()==1)){
-                needRangeUserList.add(u);
+            if(u.getIsActive()==0) {
+                //离职人员,判断离职的日期要在所选开始日期之后。才显示该员工
+                if (u.getInactiveDate() == null || u.getInactiveDate().isAfter(LocalDate.parse(startDate))) {
+                    needRangeUserList.add(u);
+                }
+            } else {
+                //在职员工,如果有设置在职日期,判断在职日期在所选结束日期之前,才显示该员工
+                if (u.getInductionDate() == null || u.getInductionDate().isBefore(LocalDate.parse(endDate))) {
+                    needRangeUserList.add(u);
+                }
             }
         }
         List<LocalDate> days = getDays(LocalDate.parse(startDate, df), LocalDate.parse(endDate, df));

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -18,6 +18,9 @@ spring:
     url: jdbc:mysql://1.94.62.58:17089/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: P011430@Huoshi*
+#    url: jdbc:mysql://47.100.37.243:7644/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
+#    username: root
+#    password: Ziyu20141026!@@
     hikari:
       maximum-pool-size: 60
       minimum-idle: 10