ysh před 3 roky
rodič
revize
65d0c291bf

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/viewClockIn/mapper/xml/viewClockInMapper.xml

@@ -100,7 +100,7 @@
         or (b.rule_type = 1 and b.ifwork > 0 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 固定班,需要打卡,当天有排班,没有打卡记录-->
         or (b.rule_type = 2 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null) <!-- 班次上下班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
         or (b.rule_type = 2 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 班次上下班,需要打卡,当天有排班,没有打卡记录-->
-        or (b.duration is not null and b.work_overtime > 0) <!-- 有加班信息,打卡时间早于加班申请时间-->
+        or (duration is not null and (work_overtime > 0 or work_overtime is null))  <!-- 有加班信息,打卡时间早于加班申请时间-->
         and b.set_info > 0 ) and b.error_state is null
 
 
@@ -136,7 +136,7 @@
                 or (b.rule_type = 1 and b.ifwork > 0 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 固定班,需要打卡,当天有排班,没有打卡记录-->
                 or (b.rule_type = 2 and b.attendance_count &lt; 2 and b.shift_real_time_s is not null) <!-- 班次上下班,需要打卡(固定班时休息日),打卡次数不足,当天有排班-->
                 or (b.rule_type = 2 and b.shift_real_time_s is not null and b.goto_time is null) <!-- 班次上下班,需要打卡,当天有排班,没有打卡记录-->
-                or (b.duration is not null and b.work_overtime > 0) <!-- 有加班信息,打卡时间早于加班申请时间-->
+                or (duration is not null and (work_overtime > 0 or work_overtime is null))  <!-- 有加班信息,打卡时间早于加班申请时间-->
                 and b.set_info > 0 ) and b.error_state is null
 
                 group by b.username