<iftest="checkTimeEnd != null and checkTimeEnd!=''"> AND happenTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') </if>
<iftest="createUserId != null and createUserId!=''"> AND createUserId = #{createUserId} </if>
UNION
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,6 AS checkType ,'complain' AS performType,updateTime FROM mortals_xhx_check_complain_record WHERE 1=1
SELECT id,recordId,staffId,staffName,workNum,deptId,deptName,ruleId,ruleName,subAddType,checkStatus,checkResult,auditStatus,createTime,score,subMethod,checkTime, deductTime,2 AS checkType ,'complain' AS performType,updateTime 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>