liupeng 5 anos atrás
pai
commit
89b33d786d

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

@@ -69,7 +69,8 @@
 		LEFT JOIN sap_checkoff d on a.userId = d.userId and b.checkinDay = d.checkinDay
 		LEFT JOIN sap_checkout_start e on a.userId = e.userId and b.checkinDay = e.checkinDay
 		LEFT JOIN sap_checkout_end g on a.userId = g.userId and b.checkinDay = g.checkinDay
-		LEFT JOIN sap_employee_time f on a.userId = f.userId and b.checkinDay = f.startDate and f.approvalStatus = 'APPROVED' and f.delFlag=0
+		LEFT JOIN sap_employee_time f on a.userId = f.userId and b.checkinDay >= f.startDate and b.checkinDay <= f.endDate 
+			and f.approvalStatus = 'APPROVED' and f.delFlag=0
 		LEFT JOIN sap_approval_info m on a.userId = m.userId and b.checkinDay = m.`day`
 		where EXISTS (SELECT 1 from sap_checkin_option o where a.userId = o.userId)
 		order by a.userId ASC, b.checkinDay asc;