liupeng 4 rokov pred
rodič
commit
05570cefa8

+ 5 - 1
code/sapparent/sapservice/src/main/java/org/fouram/mapper/SapCheckMapper.xml

@@ -146,7 +146,7 @@
 	<update id="updateRealCheckoffDate">
 		update sap_check_report
 		set realCheckoffDate = (
-			case when noNeedOffwork = 1 then concat(checkinDay,' ',workTime,':00')
+			case when noNeedOffwork = 1 then concat(checkinDay,' ',offWorkTime,':00')
 				 when checkoutDate2 is not null and checkoutDate2 > concat(checkinDay,' 12:00:00') then checkoutDate2
 				 when checkoutDate1 is not null and checkoutDate1 > concat(checkinDay,' 12:00:00') then checkoutDate1
 				 when checkoffException not like '%未打卡' and checkoffDate is not null then checkoffDate
@@ -204,6 +204,10 @@
 		where workMins is null
 	</update>
 	
+	<update id="updateWorkMinsZero">
+		update sap_check_report set workMins = 0 where workMins &lt; 0
+	</update>
+	
 	<update id="updateWorkHours">
 		update sap_check_report
 		set workHours = ROUND(workMins / 60, 1)

+ 2 - 0
code/sapparent/sapservice/src/main/java/org/fouram/service/WxCheckService.java

@@ -200,6 +200,8 @@ public class WxCheckService extends BaseService {
 		update("SapCheckMapper.updateRealResultRemarkLeave", null);
 		// 更新工作时间(分钟)
 		update("SapCheckMapper.updateWorkMins", null);
+		update("SapCheckMapper.updateWorkMinsZero", null);
+		update("SapCheckMapper.updateWorkHours", null);
 	}
 
 	// 是不是正确的上班时间