liupeng 4 years ago
parent
commit
2af8d51d7c

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

@@ -154,7 +154,7 @@
 			end
 		),(
 			case when realCheckoffDate = '' then '下班未打卡' 
-				 when realCheckoffDate %lt; concat(checkinDay,' ', offWorkTime, ':00') then '早退,'
+				 when realCheckoffDate %lt; concat(checkinDay,' ', offWorkTime, ':00') then '早退'
 				 else ''
 			end
 		))
@@ -163,10 +163,14 @@
 	
 	<update id="updateRealResult">
 		update sap_check_report
-		set realResult = (case when length(realResultRemark) > 0 then '异常' else '正常' end)
+		set realResult = (case when length(realResultRemark) = 0 or leaveDay >= 1 then '正常' else '异常' end)
 		where realResult is null
 	</update>
 	
+	<update id="updateRealResultRemarkOK">
+		update sap_check_report set realResultRemark = '' where realResult = '正常'
+	</update>
+	
 	<update id="updateWorkMins">
 		update sap_check_report
 		set workMins = (

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

@@ -193,6 +193,8 @@ public class WxCheckService extends BaseService {
 		//增加列:“备注”,备注显示信息如下:符合多种状态逗号分割显示
 		update("SapCheckMapper.updateRealResultRemark", null);
 		update("SapCheckMapper.updateRealResult", null);
+		update("SapCheckMapper.updateRealResultRemarkOK", null);
+		update("SapCheckMapper.updateWorkMins", null);
 	}
 
 	// 是不是正确的上班时间