|
@@ -146,7 +146,8 @@
|
|
|
<update id="updateRealCheckoffDate">
|
|
|
update sap_check_report
|
|
|
set realCheckoffDate = (
|
|
|
- case when checkoutDate2 is not null and checkoutDate2 > concat(checkinDay,' 12:00:00') then checkoutDate2
|
|
|
+ case when noNeedOffwork = 1 then concat(checkinDay,' ',workTime,':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
|
|
|
else ''
|
|
@@ -203,6 +204,12 @@
|
|
|
where workMins is null
|
|
|
</update>
|
|
|
|
|
|
+ <update id="updateWorkHours">
|
|
|
+ update sap_check_report
|
|
|
+ set workHours = ROUND(workMins / 60, 1)
|
|
|
+ where workHours is null
|
|
|
+ </update>
|
|
|
+
|
|
|
<select id="selectLeaveDayList" resultType="SapCheckReport">
|
|
|
SELECT * from sap_check_report where result = '异常' and leaveDay is not null
|
|
|
and checkinDay >= #{startDay} and checkinDay <= #{endDay}
|