SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,score,subMethod,checkTime,createTime AS deductTime,1 AS checkType ,'attend' AS performType FROM mortals_xhx_check_attend_record WHERE 1=1
<iftest="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<iftest="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<iftest="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
<iftest="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<iftest="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
...
...
@@ -15,6 +16,7 @@
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,4 AS checkType ,'effect' AS performType FROM mortals_xhx_check_effect_record WHERE 1=1
<iftest="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<iftest="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<iftest="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
<iftest="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<iftest="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
...
...
@@ -23,6 +25,7 @@
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,6 AS checkType ,'complain' AS performType FROM mortals_xhx_check_complain_record WHERE 1=1
<iftest="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<iftest="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<iftest="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
<iftest="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<iftest="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
...
...
@@ -31,6 +34,7 @@
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,3 AS checkType ,'gowork' AS performType FROM mortals_xhx_check_gowork_record WHERE 1=1
<iftest="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<iftest="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<iftest="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
<iftest="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<iftest="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
...
...
@@ -39,6 +43,7 @@
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,2 AS checkType ,'review' AS performType FROM mortals_xhx_check_review_record WHERE 1=1
<iftest="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<iftest="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<iftest="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
<iftest="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<iftest="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
...
...
@@ -47,6 +52,7 @@
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,2 AS subAddType,score,subMethod,checkTime,createTime AS deductTime,5 AS checkType ,'other' AS performType FROM mortals_xhx_check_other_record WHERE 1=1
<iftest="checkStatus != null and checkStatus!=''"> AND checkStatus = #{checkStatus} </if>
<iftest="subMethod != null and subMethod!=''"> AND subMethod = #{subMethod} </if>
<iftest="subAddType != null and subAddType!=''"> AND subAddType = #{subAddType} </if>
<iftest="staffId != null and staffId!=''"> AND staffId = #{staffId} </if>
<iftest="checkTimeStart != null and checkTimeStart!=''"> AND checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>