Min 1 年之前
父節點
當前提交
46498ef588

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserWithBeisenController.java

@@ -237,7 +237,7 @@ public class UserWithBeisenController {
                                 if(LocalDateTime.parse(o.getString("StartDate"),df1).toLocalDate().isEqual(LocalDateTime.parse(o.getString("StopDate"),df1).toLocalDate())){
                                     //开始日期和结束日期是相同的情况 说明是加班区间只存在于当天的情况
                                     //判断打卡时间是不是大于19:00 大于才算加班 通过打卡计算加班时长 与加班单作比较 取小
-                                    Duration timeDurantion = Duration.between(LocalTime.parse("18:00:00", df4), max.get());
+                                    Duration timeDurantion = Duration.between(LocalTime.parse(workDay?"18:00:00":"08:30:00", df4), max.get());
                                     BigDecimal decimal = new BigDecimal(timeDurantion.toMinutes());
                                     decimal=decimal.divide(new BigDecimal(60),1,RoundingMode.HALF_UP);
                                     double l = decimal.doubleValue();
@@ -255,7 +255,7 @@ public class UserWithBeisenController {
                                     decimal=decimal.divide(new BigDecimal(60),1,RoundingMode.HALF_UP);
                                     double l = decimal.doubleValue();
                                     //判断打卡时间是不是大于19:00 通过打卡计算加班时长 与加班单作比较 取小
-                                    Duration timeDurantion = Duration.between(LocalTime.parse("18:00:00", df4), max.get());
+                                    Duration timeDurantion = Duration.between(LocalTime.parse(workDay?"18:00:00":"08:30:00", df4), max.get());
                                     BigDecimal decimal1 = new BigDecimal(timeDurantion.toMinutes());
                                     decimal1=decimal1.divide(new BigDecimal(60),1,RoundingMode.HALF_UP);
                                     double l1 = decimal1.doubleValue();
@@ -270,7 +270,7 @@ public class UserWithBeisenController {
                                 if(LocalDateTime.parse(o.getString("StartDate"),df1).toLocalDate().isEqual(LocalDateTime.parse(o.getString("StopDate"),df1).toLocalDate())){
                                     //开始日期和结束日期是相同的情况 说明是加班区间只存在于当天的情况
                                     //判断打卡时间是不是大于19:00 通过打卡计算加班时长 与加班单作比较 取小
-                                    Duration timeDurantion = Duration.between(LocalTime.parse("18:00:00", df4), max.get());
+                                    Duration timeDurantion = Duration.between(LocalTime.parse(workDay?"18:00:00":"08:30:00", df4), max.get());
                                     BigDecimal decimal = new BigDecimal(timeDurantion.toMinutes());
                                     decimal=decimal.divide(new BigDecimal(60),1,RoundingMode.HALF_UP);
                                     double l = decimal.doubleValue();
@@ -288,7 +288,7 @@ public class UserWithBeisenController {
                                     decimal=decimal.divide(new BigDecimal(60),1,RoundingMode.HALF_UP);
                                     double l = decimal.doubleValue();
                                     //判断打卡时间是不是大于19:00 通过打卡计算加班时长 与加班单作比较 取小
-                                    Duration timeDurantion = Duration.between(LocalTime.parse("18:00:00", df4), max.get());
+                                    Duration timeDurantion = Duration.between(LocalTime.parse(workDay?"18:00:00":"08:30:00", df4), max.get());
                                     BigDecimal decimal1 = new BigDecimal(timeDurantion.toMinutes());
                                     decimal1=decimal1.divide(new BigDecimal(60),1,RoundingMode.HALF_UP);
                                     double l1 = decimal1.doubleValue();