<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.perform.dao.ibatis.PerformAttendAppealDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="PerformAttendAppealEntity" id="PerformAttendAppealEntity-Map">
            <id  property="id" column="id" />
            <result property="checkRecordId" column="checkRecordId" />
            <result property="staffId" column="staffId" />
            <result property="staffName" column="staffName" />
            <result property="workNum" column="workNum" />
            <result property="deptId" column="deptId" />
            <result property="deptName" column="deptName" />
            <result property="attendanceGroupId" column="attendanceGroupId" />
            <result property="attendanceGroupName" column="attendanceGroupName" />
            <result property="attendanceDate" column="attendanceDate" />
            <result property="ruleId" column="ruleId" />
            <result property="ruleName" column="ruleName" />
            <result property="subMethod" column="subMethod" />
            <result property="subAddType" column="subAddType" />
            <result property="score" column="score" />
            <result property="goOffTimeStr" column="goOffTimeStr" />
            <result property="errorTime" column="errorTime" />
            <result property="actualAttendTime" column="actualAttendTime" />
            <result property="errorResult" column="errorResult" />
            <result property="checkPerson" column="checkPerson" />
            <result property="checkTime" column="checkTime" />
            <result property="checkDesc" column="checkDesc" />
            <result property="checkResult" column="checkResult" />
            <result property="processStatus" column="processStatus" />
            <result property="appealDesc" column="appealDesc" />
            <result property="appealTime" column="appealTime" />
            <result property="appealResult" column="appealResult" />
            <result property="remark" column="remark" />
            <result property="createUserId" column="createUserId" />
            <result property="createTime" column="createTime" />
            <result property="updateUserId" column="updateUserId" />
            <result property="updateTime" column="updateTime" />
            <result property="violationType" column="violationType" />
            <result property="reviewResult" column="reviewResult" />
            <result property="reviewTime" column="reviewTime" />
            <result property="reviewSource" column="reviewSource" />
            <result property="reviewDevice" column="reviewDevice" />
            <result property="complainTitle" column="complainTitle" />
            <result property="complainContent" column="complainContent" />
            <result property="complainRealName" column="complainRealName" />
            <result property="contact" column="contact" />
            <result property="complainTime" column="complainTime" />
            <result property="complainSource" column="complainSource" />
            <result property="complainDevice" column="complainDevice" />
            <result property="goworkCode" column="goworkCode" />
            <result property="goworkDepts" column="goworkDepts" />
            <result property="matterlName" column="matterlName" />
            <result property="goworkTime" column="goworkTime" />
            <result property="irregularType" column="irregularType" />
            <result property="happenTime" column="happenTime" />
            <result property="duration" column="duration" />
            <result property="alarmTime" column="alarmTime" />
            <result property="snapPath" column="snapPath" />
            <result property="irregularOtherType" column="irregularOtherType" />
            <result property="performType" column="performType" />
            <collection property="performAttendAppealFilesList" column="id" ofType="PerformAttendAppealFilesEntity" javaType="ArrayList" select="getPerformAttendAppealFilesByAppealId"></collection>
    </resultMap>
    <resultMap type="PerformAttendAppealFilesEntity" id="PerformAttendAppealFilesEntity-Map">
            <result property="id" column="id" />
            <result property="appealId" column="appealId" />
            <result property="fileName" column="fileName" />
            <result property="filePath" column="filePath" />
            <result property="createUserId" column="createUserId" />
            <result property="createTime" column="createTime" />
            <result property="updateUserId" column="updateUserId" />
            <result property="updateTime" column="updateTime" />
    </resultMap>


    <!-- 表所有列 -->
    <sql id="_columns">
        <trim suffixOverrides="," suffix="">
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
                    a.id,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('checkRecordId') or colPickMode == 1 and data.containsKey('checkRecordId')))">
                    a.checkRecordId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffId') or colPickMode == 1 and data.containsKey('staffId')))">
                    a.staffId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
                    a.staffName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workNum') or colPickMode == 1 and data.containsKey('workNum')))">
                    a.workNum,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
                    a.deptId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
                    a.deptName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendanceGroupId') or colPickMode == 1 and data.containsKey('attendanceGroupId')))">
                    a.attendanceGroupId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendanceGroupName') or colPickMode == 1 and data.containsKey('attendanceGroupName')))">
                    a.attendanceGroupName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendanceDate') or colPickMode == 1 and data.containsKey('attendanceDate')))">
                    a.attendanceDate,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ruleId') or colPickMode == 1 and data.containsKey('ruleId')))">
                    a.ruleId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('ruleName') or colPickMode == 1 and data.containsKey('ruleName')))">
                    a.ruleName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subMethod') or colPickMode == 1 and data.containsKey('subMethod')))">
                    a.subMethod,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('subAddType') or colPickMode == 1 and data.containsKey('subAddType')))">
                    a.subAddType,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('score') or colPickMode == 1 and data.containsKey('score')))">
                    a.score,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goOffTimeStr') or colPickMode == 1 and data.containsKey('goOffTimeStr')))">
                    a.goOffTimeStr,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('errorTime') or colPickMode == 1 and data.containsKey('errorTime')))">
                    a.errorTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('actualAttendTime') or colPickMode == 1 and data.containsKey('actualAttendTime')))">
                    a.actualAttendTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('errorResult') or colPickMode == 1 and data.containsKey('errorResult')))">
                    a.errorResult,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('checkPerson') or colPickMode == 1 and data.containsKey('checkPerson')))">
                    a.checkPerson,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('checkTime') or colPickMode == 1 and data.containsKey('checkTime')))">
                    a.checkTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('checkDesc') or colPickMode == 1 and data.containsKey('checkDesc')))">
                    a.checkDesc,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('checkResult') or colPickMode == 1 and data.containsKey('checkResult')))">
                    a.checkResult,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('processStatus') or colPickMode == 1 and data.containsKey('processStatus')))">
                    a.processStatus,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('appealDesc') or colPickMode == 1 and data.containsKey('appealDesc')))">
                    a.appealDesc,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('appealTime') or colPickMode == 1 and data.containsKey('appealTime')))">
                    a.appealTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('appealResult') or colPickMode == 1 and data.containsKey('appealResult')))">
                    a.appealResult,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
                    a.remark,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
                    a.createUserId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
                    a.createTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
                    a.updateUserId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
                    a.updateTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('violationType') or colPickMode == 1 and data.containsKey('violationType')))">
                    a.violationType,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('reviewResult') or colPickMode == 1 and data.containsKey('reviewResult')))">
                    a.reviewResult,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('reviewTime') or colPickMode == 1 and data.containsKey('reviewTime')))">
                    a.reviewTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('reviewSource') or colPickMode == 1 and data.containsKey('reviewSource')))">
                    a.reviewSource,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('reviewDevice') or colPickMode == 1 and data.containsKey('reviewDevice')))">
                    a.reviewDevice,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainTitle') or colPickMode == 1 and data.containsKey('complainTitle')))">
                    a.complainTitle,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainContent') or colPickMode == 1 and data.containsKey('complainContent')))">
                    a.complainContent,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainRealName') or colPickMode == 1 and data.containsKey('complainRealName')))">
                    a.complainRealName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('contact') or colPickMode == 1 and data.containsKey('contact')))">
                    a.contact,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainTime') or colPickMode == 1 and data.containsKey('complainTime')))">
                    a.complainTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainSource') or colPickMode == 1 and data.containsKey('complainSource')))">
                    a.complainSource,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainDevice') or colPickMode == 1 and data.containsKey('complainDevice')))">
                    a.complainDevice,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goworkCode') or colPickMode == 1 and data.containsKey('goworkCode')))">
                    a.goworkCode,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goworkDepts') or colPickMode == 1 and data.containsKey('goworkDepts')))">
                    a.goworkDepts,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('matterlName') or colPickMode == 1 and data.containsKey('matterlName')))">
                    a.matterlName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goworkTime') or colPickMode == 1 and data.containsKey('goworkTime')))">
                    a.goworkTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('irregularType') or colPickMode == 1 and data.containsKey('irregularType')))">
                    a.irregularType,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('happenTime') or colPickMode == 1 and data.containsKey('happenTime')))">
                    a.happenTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('duration') or colPickMode == 1 and data.containsKey('duration')))">
                    a.duration,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('alarmTime') or colPickMode == 1 and data.containsKey('alarmTime')))">
                    a.alarmTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('snapPath') or colPickMode == 1 and data.containsKey('snapPath')))">
                    a.snapPath,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('irregularOtherType') or colPickMode == 1 and data.containsKey('irregularOtherType')))">
                    a.irregularOtherType,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('performType') or colPickMode == 1 and data.containsKey('performType')))">
                    a.performType,
                </if>
        </trim>
    </sql>
    <!-- 子表所有列 -->
    <sql id="_columns_sub">
        <trim suffixOverrides="," suffix="">
            b.id,b.appealId,b.fileName,b.filePath,b.createUserId,b.createTime,b.updateUserId,b.updateTime,
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="PerformAttendAppealEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_perform_attend_appeal
        (checkRecordId,staffId,staffName,workNum,deptId,deptName,attendanceGroupId,attendanceGroupName,attendanceDate,ruleId,ruleName,subMethod,subAddType,score,goOffTimeStr,errorTime,actualAttendTime,errorResult,checkPerson,checkTime,checkDesc,checkResult,processStatus,appealDesc,appealTime,appealResult,remark,createUserId,createTime,updateUserId,updateTime,violationType,reviewResult,reviewTime,reviewSource,reviewDevice,complainTitle,complainContent,complainRealName,contact,complainTime,complainSource,complainDevice,goworkCode,goworkDepts,matterlName,goworkTime,irregularType,happenTime,duration,alarmTime,snapPath,irregularOtherType,performType)
        VALUES
        (#{checkRecordId},#{staffId},#{staffName},#{workNum},#{deptId},#{deptName},#{attendanceGroupId},#{attendanceGroupName},#{attendanceDate},#{ruleId},#{ruleName},#{subMethod},#{subAddType},#{score},#{goOffTimeStr},#{errorTime},#{actualAttendTime},#{errorResult},#{checkPerson},#{checkTime},#{checkDesc},#{checkResult},#{processStatus},#{appealDesc},#{appealTime},#{appealResult},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{violationType},#{reviewResult},#{reviewTime},#{reviewSource},#{reviewDevice},#{complainTitle},#{complainContent},#{complainRealName},#{contact},#{complainTime},#{complainSource},#{complainDevice},#{goworkCode},#{goworkDepts},#{matterlName},#{goworkTime},#{irregularType},#{happenTime},#{duration},#{alarmTime},#{snapPath},#{irregularOtherType},#{performType})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_perform_attend_appeal
        (checkRecordId,staffId,staffName,workNum,deptId,deptName,attendanceGroupId,attendanceGroupName,attendanceDate,ruleId,ruleName,subMethod,subAddType,score,goOffTimeStr,errorTime,actualAttendTime,errorResult,checkPerson,checkTime,checkDesc,checkResult,processStatus,appealDesc,appealTime,appealResult,remark,createUserId,createTime,updateUserId,updateTime,violationType,reviewResult,reviewTime,reviewSource,reviewDevice,complainTitle,complainContent,complainRealName,contact,complainTime,complainSource,complainDevice,goworkCode,goworkDepts,matterlName,goworkTime,irregularType,happenTime,duration,alarmTime,snapPath,irregularOtherType,performType)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.checkRecordId},#{item.staffId},#{item.staffName},#{item.workNum},#{item.deptId},#{item.deptName},#{item.attendanceGroupId},#{item.attendanceGroupName},#{item.attendanceDate},#{item.ruleId},#{item.ruleName},#{item.subMethod},#{item.subAddType},#{item.score},#{item.goOffTimeStr},#{item.errorTime},#{item.actualAttendTime},#{item.errorResult},#{item.checkPerson},#{item.checkTime},#{item.checkDesc},#{item.checkResult},#{item.processStatus},#{item.appealDesc},#{item.appealTime},#{item.appealResult},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.violationType},#{item.reviewResult},#{item.reviewTime},#{item.reviewSource},#{item.reviewDevice},#{item.complainTitle},#{item.complainContent},#{item.complainRealName},#{item.contact},#{item.complainTime},#{item.complainSource},#{item.complainDevice},#{item.goworkCode},#{item.goworkDepts},#{item.matterlName},#{item.goworkTime},#{item.irregularType},#{item.happenTime},#{item.duration},#{item.alarmTime},#{item.snapPath},#{item.irregularOtherType},#{item.performType})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_perform_attend_appeal as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('checkRecordId')) or (colPickMode==1 and !data.containsKey('checkRecordId'))">
                a.checkRecordId=#{data.checkRecordId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('checkRecordIdIncrement')) or (colPickMode==1 and !data.containsKey('checkRecordIdIncrement'))">
                a.checkRecordId=ifnull(a.checkRecordId,0) + #{data.checkRecordIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('staffId')) or (colPickMode==1 and !data.containsKey('staffId'))">
                a.staffId=#{data.staffId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('staffIdIncrement')) or (colPickMode==1 and !data.containsKey('staffIdIncrement'))">
                a.staffId=ifnull(a.staffId,0) + #{data.staffIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))">
                a.staffName=#{data.staffName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workNum')) or (colPickMode==1 and !data.containsKey('workNum'))">
                a.workNum=#{data.workNum},
            </if>
            <if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))">
                a.deptId=#{data.deptId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))">
                a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
                a.deptName=#{data.deptName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendanceGroupId')) or (colPickMode==1 and !data.containsKey('attendanceGroupId'))">
                a.attendanceGroupId=#{data.attendanceGroupId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendanceGroupIdIncrement')) or (colPickMode==1 and !data.containsKey('attendanceGroupIdIncrement'))">
                a.attendanceGroupId=ifnull(a.attendanceGroupId,0) + #{data.attendanceGroupIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendanceGroupName')) or (colPickMode==1 and !data.containsKey('attendanceGroupName'))">
                a.attendanceGroupName=#{data.attendanceGroupName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendanceDate')) or (colPickMode==1 and !data.containsKey('attendanceDate'))">
                a.attendanceDate=#{data.attendanceDate},
            </if>
            <if test="(colPickMode==0 and data.containsKey('ruleId')) or (colPickMode==1 and !data.containsKey('ruleId'))">
                a.ruleId=#{data.ruleId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('ruleIdIncrement')) or (colPickMode==1 and !data.containsKey('ruleIdIncrement'))">
                a.ruleId=ifnull(a.ruleId,0) + #{data.ruleIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('ruleName')) or (colPickMode==1 and !data.containsKey('ruleName'))">
                a.ruleName=#{data.ruleName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('subMethod')) or (colPickMode==1 and !data.containsKey('subMethod'))">
                a.subMethod=#{data.subMethod},
            </if>
            <if test="(colPickMode==0 and data.containsKey('subMethodIncrement')) or (colPickMode==1 and !data.containsKey('subMethodIncrement'))">
                a.subMethod=ifnull(a.subMethod,0) + #{data.subMethodIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('subAddType')) or (colPickMode==1 and !data.containsKey('subAddType'))">
                a.subAddType=#{data.subAddType},
            </if>
            <if test="(colPickMode==0 and data.containsKey('subAddTypeIncrement')) or (colPickMode==1 and !data.containsKey('subAddTypeIncrement'))">
                a.subAddType=ifnull(a.subAddType,0) + #{data.subAddTypeIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('score')) or (colPickMode==1 and !data.containsKey('score'))">
                a.score=#{data.score},
            </if>
            <if test="(colPickMode==0 and data.containsKey('scoreIncrement')) or (colPickMode==1 and !data.containsKey('scoreIncrement'))">
                a.score=ifnull(a.score,0) + #{data.scoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('goOffTimeStr')) or (colPickMode==1 and !data.containsKey('goOffTimeStr'))">
                a.goOffTimeStr=#{data.goOffTimeStr},
            </if>
            <if test="(colPickMode==0 and data.containsKey('errorTime')) or (colPickMode==1 and !data.containsKey('errorTime'))">
                a.errorTime=#{data.errorTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('actualAttendTime')) or (colPickMode==1 and !data.containsKey('actualAttendTime'))">
                a.actualAttendTime=#{data.actualAttendTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('errorResult')) or (colPickMode==1 and !data.containsKey('errorResult'))">
                a.errorResult=#{data.errorResult},
            </if>
            <if test="(colPickMode==0 and data.containsKey('checkPerson')) or (colPickMode==1 and !data.containsKey('checkPerson'))">
                a.checkPerson=#{data.checkPerson},
            </if>
            <if test="(colPickMode==0 and data.containsKey('checkTime')) or (colPickMode==1 and !data.containsKey('checkTime'))">
                a.checkTime=#{data.checkTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('checkDesc')) or (colPickMode==1 and !data.containsKey('checkDesc'))">
                a.checkDesc=#{data.checkDesc},
            </if>
            <if test="(colPickMode==0 and data.containsKey('checkResult')) or (colPickMode==1 and !data.containsKey('checkResult'))">
                a.checkResult=#{data.checkResult},
            </if>
            <if test="(colPickMode==0 and data.containsKey('processStatus')) or (colPickMode==1 and !data.containsKey('processStatus'))">
                a.processStatus=#{data.processStatus},
            </if>
            <if test="(colPickMode==0 and data.containsKey('processStatusIncrement')) or (colPickMode==1 and !data.containsKey('processStatusIncrement'))">
                a.processStatus=ifnull(a.processStatus,0) + #{data.processStatusIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('appealDesc')) or (colPickMode==1 and !data.containsKey('appealDesc'))">
                a.appealDesc=#{data.appealDesc},
            </if>
            <if test="(colPickMode==0 and data.containsKey('appealTime')) or (colPickMode==1 and !data.containsKey('appealTime'))">
                a.appealTime=#{data.appealTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('appealResult')) or (colPickMode==1 and !data.containsKey('appealResult'))">
                a.appealResult=#{data.appealResult},
            </if>
            <if test="(colPickMode==0 and data.containsKey('appealResultIncrement')) or (colPickMode==1 and !data.containsKey('appealResultIncrement'))">
                a.appealResult=ifnull(a.appealResult,0) + #{data.appealResultIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
                a.remark=#{data.remark},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
                a.createUserId=#{data.createUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
                a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
                a.createTime=#{data.createTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
                a.updateUserId=#{data.updateUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
                a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
                a.updateTime=#{data.updateTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('violationType')) or (colPickMode==1 and !data.containsKey('violationType'))">
                a.violationType=#{data.violationType},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewResult')) or (colPickMode==1 and !data.containsKey('reviewResult'))">
                a.reviewResult=#{data.reviewResult},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewResultIncrement')) or (colPickMode==1 and !data.containsKey('reviewResultIncrement'))">
                a.reviewResult=ifnull(a.reviewResult,0) + #{data.reviewResultIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewTime')) or (colPickMode==1 and !data.containsKey('reviewTime'))">
                a.reviewTime=#{data.reviewTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewSource')) or (colPickMode==1 and !data.containsKey('reviewSource'))">
                a.reviewSource=#{data.reviewSource},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewDevice')) or (colPickMode==1 and !data.containsKey('reviewDevice'))">
                a.reviewDevice=#{data.reviewDevice},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainTitle')) or (colPickMode==1 and !data.containsKey('complainTitle'))">
                a.complainTitle=#{data.complainTitle},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainContent')) or (colPickMode==1 and !data.containsKey('complainContent'))">
                a.complainContent=#{data.complainContent},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainRealName')) or (colPickMode==1 and !data.containsKey('complainRealName'))">
                a.complainRealName=#{data.complainRealName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('contact')) or (colPickMode==1 and !data.containsKey('contact'))">
                a.contact=#{data.contact},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainTime')) or (colPickMode==1 and !data.containsKey('complainTime'))">
                a.complainTime=#{data.complainTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainSource')) or (colPickMode==1 and !data.containsKey('complainSource'))">
                a.complainSource=#{data.complainSource},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainDevice')) or (colPickMode==1 and !data.containsKey('complainDevice'))">
                a.complainDevice=#{data.complainDevice},
            </if>
            <if test="(colPickMode==0 and data.containsKey('goworkCode')) or (colPickMode==1 and !data.containsKey('goworkCode'))">
                a.goworkCode=#{data.goworkCode},
            </if>
            <if test="(colPickMode==0 and data.containsKey('goworkDepts')) or (colPickMode==1 and !data.containsKey('goworkDepts'))">
                a.goworkDepts=#{data.goworkDepts},
            </if>
            <if test="(colPickMode==0 and data.containsKey('matterlName')) or (colPickMode==1 and !data.containsKey('matterlName'))">
                a.matterlName=#{data.matterlName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('goworkTime')) or (colPickMode==1 and !data.containsKey('goworkTime'))">
                a.goworkTime=#{data.goworkTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('irregularType')) or (colPickMode==1 and !data.containsKey('irregularType'))">
                a.irregularType=#{data.irregularType},
            </if>
            <if test="(colPickMode==0 and data.containsKey('irregularTypeIncrement')) or (colPickMode==1 and !data.containsKey('irregularTypeIncrement'))">
                a.irregularType=ifnull(a.irregularType,0) + #{data.irregularTypeIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('happenTime')) or (colPickMode==1 and !data.containsKey('happenTime'))">
                a.happenTime=#{data.happenTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('duration')) or (colPickMode==1 and !data.containsKey('duration'))">
                a.duration=#{data.duration},
            </if>
            <if test="(colPickMode==0 and data.containsKey('durationIncrement')) or (colPickMode==1 and !data.containsKey('durationIncrement'))">
                a.duration=ifnull(a.duration,0) + #{data.durationIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('alarmTime')) or (colPickMode==1 and !data.containsKey('alarmTime'))">
                a.alarmTime=#{data.alarmTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('snapPath')) or (colPickMode==1 and !data.containsKey('snapPath'))">
                a.snapPath=#{data.snapPath},
            </if>
            <if test="(colPickMode==0 and data.containsKey('irregularOtherType')) or (colPickMode==1 and !data.containsKey('irregularOtherType'))">
                a.irregularOtherType=#{data.irregularOtherType},
            </if>
            <if test="(colPickMode==0 and data.containsKey('irregularOtherTypeIncrement')) or (colPickMode==1 and !data.containsKey('irregularOtherTypeIncrement'))">
                a.irregularOtherType=ifnull(a.irregularOtherType,0) + #{data.irregularOtherTypeIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('performType')) or (colPickMode==1 and !data.containsKey('performType'))">
                a.performType=#{data.performType},
            </if>
        </trim>
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </update>
    <!-- 批量更新 -->
    <update id="updateBatch" parameterType="paramDto">
        update mortals_xhx_perform_attend_appeal as a
        <trim prefix="set" suffixOverrides=",">
                        <trim prefix="checkRecordId=(case" suffix="ELSE checkRecordId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('checkRecordId')) or (colPickMode==1 and !item.containsKey('checkRecordId'))">
                                        when a.id=#{item.id} then #{item.checkRecordId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('checkRecordIdIncrement')) or (colPickMode==1 and !item.containsKey('checkRecordIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.checkRecordId,0) + #{item.checkRecordIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="staffId=(case" suffix="ELSE staffId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('staffId')) or (colPickMode==1 and !item.containsKey('staffId'))">
                                        when a.id=#{item.id} then #{item.staffId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('staffIdIncrement')) or (colPickMode==1 and !item.containsKey('staffIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.staffId,0) + #{item.staffIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="staffName=(case" suffix="ELSE staffName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('staffName')) or (colPickMode==1 and !item.containsKey('staffName'))">
                            when a.id=#{item.id} then #{item.staffName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="workNum=(case" suffix="ELSE workNum end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('workNum')) or (colPickMode==1 and !item.containsKey('workNum'))">
                            when a.id=#{item.id} then #{item.workNum}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="deptId=(case" suffix="ELSE deptId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))">
                                        when a.id=#{item.id} then #{item.deptId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('deptIdIncrement')) or (colPickMode==1 and !item.containsKey('deptIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.deptId,0) + #{item.deptIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="deptName=(case" suffix="ELSE deptName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
                            when a.id=#{item.id} then #{item.deptName}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="attendanceGroupId=(case" suffix="ELSE attendanceGroupId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('attendanceGroupId')) or (colPickMode==1 and !item.containsKey('attendanceGroupId'))">
                                        when a.id=#{item.id} then #{item.attendanceGroupId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('attendanceGroupIdIncrement')) or (colPickMode==1 and !item.containsKey('attendanceGroupIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.attendanceGroupId,0) + #{item.attendanceGroupIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="attendanceGroupName=(case" suffix="ELSE attendanceGroupName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('attendanceGroupName')) or (colPickMode==1 and !item.containsKey('attendanceGroupName'))">
                            when a.id=#{item.id} then #{item.attendanceGroupName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="attendanceDate=(case" suffix="ELSE attendanceDate end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('attendanceDate')) or (colPickMode==1 and !item.containsKey('attendanceDate'))">
                            when a.id=#{item.id} then #{item.attendanceDate}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="ruleId=(case" suffix="ELSE ruleId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('ruleId')) or (colPickMode==1 and !item.containsKey('ruleId'))">
                                        when a.id=#{item.id} then #{item.ruleId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('ruleIdIncrement')) or (colPickMode==1 and !item.containsKey('ruleIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.ruleId,0) + #{item.ruleIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="ruleName=(case" suffix="ELSE ruleName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('ruleName')) or (colPickMode==1 and !item.containsKey('ruleName'))">
                            when a.id=#{item.id} then #{item.ruleName}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="subMethod=(case" suffix="ELSE subMethod end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('subMethod')) or (colPickMode==1 and !item.containsKey('subMethod'))">
                                        when a.id=#{item.id} then #{item.subMethod}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('subMethodIncrement')) or (colPickMode==1 and !item.containsKey('subMethodIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.subMethod,0) + #{item.subMethodIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="subAddType=(case" suffix="ELSE subAddType end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('subAddType')) or (colPickMode==1 and !item.containsKey('subAddType'))">
                                        when a.id=#{item.id} then #{item.subAddType}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('subAddTypeIncrement')) or (colPickMode==1 and !item.containsKey('subAddTypeIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.subAddType,0) + #{item.subAddTypeIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="score=(case" suffix="ELSE score end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('score')) or (colPickMode==1 and !item.containsKey('score'))">
                                        when a.id=#{item.id} then #{item.score}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('scoreIncrement')) or (colPickMode==1 and !item.containsKey('scoreIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.score,0) + #{item.scoreIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="goOffTimeStr=(case" suffix="ELSE goOffTimeStr end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('goOffTimeStr')) or (colPickMode==1 and !item.containsKey('goOffTimeStr'))">
                            when a.id=#{item.id} then #{item.goOffTimeStr}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="errorTime=(case" suffix="ELSE errorTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('errorTime')) or (colPickMode==1 and !item.containsKey('errorTime'))">
                            when a.id=#{item.id} then #{item.errorTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="actualAttendTime=(case" suffix="ELSE actualAttendTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('actualAttendTime')) or (colPickMode==1 and !item.containsKey('actualAttendTime'))">
                            when a.id=#{item.id} then #{item.actualAttendTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="errorResult=(case" suffix="ELSE errorResult end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('errorResult')) or (colPickMode==1 and !item.containsKey('errorResult'))">
                            when a.id=#{item.id} then #{item.errorResult}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="checkPerson=(case" suffix="ELSE checkPerson end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('checkPerson')) or (colPickMode==1 and !item.containsKey('checkPerson'))">
                            when a.id=#{item.id} then #{item.checkPerson}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="checkTime=(case" suffix="ELSE checkTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('checkTime')) or (colPickMode==1 and !item.containsKey('checkTime'))">
                            when a.id=#{item.id} then #{item.checkTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="checkDesc=(case" suffix="ELSE checkDesc end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('checkDesc')) or (colPickMode==1 and !item.containsKey('checkDesc'))">
                            when a.id=#{item.id} then #{item.checkDesc}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="checkResult=(case" suffix="ELSE checkResult end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('checkResult')) or (colPickMode==1 and !item.containsKey('checkResult'))">
                            when a.id=#{item.id} then #{item.checkResult}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="processStatus=(case" suffix="ELSE processStatus end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('processStatus')) or (colPickMode==1 and !item.containsKey('processStatus'))">
                                        when a.id=#{item.id} then #{item.processStatus}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('processStatusIncrement')) or (colPickMode==1 and !item.containsKey('processStatusIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.processStatus,0) + #{item.processStatusIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="appealDesc=(case" suffix="ELSE appealDesc end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('appealDesc')) or (colPickMode==1 and !item.containsKey('appealDesc'))">
                            when a.id=#{item.id} then #{item.appealDesc}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="appealTime=(case" suffix="ELSE appealTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('appealTime')) or (colPickMode==1 and !item.containsKey('appealTime'))">
                            when a.id=#{item.id} then #{item.appealTime}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="appealResult=(case" suffix="ELSE appealResult end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('appealResult')) or (colPickMode==1 and !item.containsKey('appealResult'))">
                                        when a.id=#{item.id} then #{item.appealResult}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('appealResultIncrement')) or (colPickMode==1 and !item.containsKey('appealResultIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.appealResult,0) + #{item.appealResultIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="remark=(case" suffix="ELSE remark end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
                            when a.id=#{item.id} then #{item.remark}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
                                        when a.id=#{item.id} then #{item.createUserId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="createTime=(case" suffix="ELSE createTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
                            when a.id=#{item.id} then #{item.createTime}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
                                        when a.id=#{item.id} then #{item.updateUserId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
                            when a.id=#{item.id} then #{item.updateTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="violationType=(case" suffix="ELSE violationType end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('violationType')) or (colPickMode==1 and !item.containsKey('violationType'))">
                            when a.id=#{item.id} then #{item.violationType}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="reviewResult=(case" suffix="ELSE reviewResult end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('reviewResult')) or (colPickMode==1 and !item.containsKey('reviewResult'))">
                                        when a.id=#{item.id} then #{item.reviewResult}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('reviewResultIncrement')) or (colPickMode==1 and !item.containsKey('reviewResultIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.reviewResult,0) + #{item.reviewResultIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="reviewTime=(case" suffix="ELSE reviewTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('reviewTime')) or (colPickMode==1 and !item.containsKey('reviewTime'))">
                            when a.id=#{item.id} then #{item.reviewTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="reviewSource=(case" suffix="ELSE reviewSource end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('reviewSource')) or (colPickMode==1 and !item.containsKey('reviewSource'))">
                            when a.id=#{item.id} then #{item.reviewSource}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="reviewDevice=(case" suffix="ELSE reviewDevice end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('reviewDevice')) or (colPickMode==1 and !item.containsKey('reviewDevice'))">
                            when a.id=#{item.id} then #{item.reviewDevice}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="complainTitle=(case" suffix="ELSE complainTitle end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('complainTitle')) or (colPickMode==1 and !item.containsKey('complainTitle'))">
                            when a.id=#{item.id} then #{item.complainTitle}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="complainContent=(case" suffix="ELSE complainContent end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('complainContent')) or (colPickMode==1 and !item.containsKey('complainContent'))">
                            when a.id=#{item.id} then #{item.complainContent}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="complainRealName=(case" suffix="ELSE complainRealName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('complainRealName')) or (colPickMode==1 and !item.containsKey('complainRealName'))">
                            when a.id=#{item.id} then #{item.complainRealName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="contact=(case" suffix="ELSE contact end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('contact')) or (colPickMode==1 and !item.containsKey('contact'))">
                            when a.id=#{item.id} then #{item.contact}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="complainTime=(case" suffix="ELSE complainTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('complainTime')) or (colPickMode==1 and !item.containsKey('complainTime'))">
                            when a.id=#{item.id} then #{item.complainTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="complainSource=(case" suffix="ELSE complainSource end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('complainSource')) or (colPickMode==1 and !item.containsKey('complainSource'))">
                            when a.id=#{item.id} then #{item.complainSource}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="complainDevice=(case" suffix="ELSE complainDevice end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('complainDevice')) or (colPickMode==1 and !item.containsKey('complainDevice'))">
                            when a.id=#{item.id} then #{item.complainDevice}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="goworkCode=(case" suffix="ELSE goworkCode end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('goworkCode')) or (colPickMode==1 and !item.containsKey('goworkCode'))">
                            when a.id=#{item.id} then #{item.goworkCode}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="goworkDepts=(case" suffix="ELSE goworkDepts end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('goworkDepts')) or (colPickMode==1 and !item.containsKey('goworkDepts'))">
                            when a.id=#{item.id} then #{item.goworkDepts}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="matterlName=(case" suffix="ELSE matterlName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('matterlName')) or (colPickMode==1 and !item.containsKey('matterlName'))">
                            when a.id=#{item.id} then #{item.matterlName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="goworkTime=(case" suffix="ELSE goworkTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('goworkTime')) or (colPickMode==1 and !item.containsKey('goworkTime'))">
                            when a.id=#{item.id} then #{item.goworkTime}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="irregularType=(case" suffix="ELSE irregularType end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('irregularType')) or (colPickMode==1 and !item.containsKey('irregularType'))">
                                        when a.id=#{item.id} then #{item.irregularType}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('irregularTypeIncrement')) or (colPickMode==1 and !item.containsKey('irregularTypeIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.irregularType,0) + #{item.irregularTypeIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="happenTime=(case" suffix="ELSE happenTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('happenTime')) or (colPickMode==1 and !item.containsKey('happenTime'))">
                            when a.id=#{item.id} then #{item.happenTime}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="duration=(case" suffix="ELSE duration end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('duration')) or (colPickMode==1 and !item.containsKey('duration'))">
                                        when a.id=#{item.id} then #{item.duration}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('durationIncrement')) or (colPickMode==1 and !item.containsKey('durationIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.duration,0) + #{item.durationIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="alarmTime=(case" suffix="ELSE alarmTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('alarmTime')) or (colPickMode==1 and !item.containsKey('alarmTime'))">
                            when a.id=#{item.id} then #{item.alarmTime}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="snapPath=(case" suffix="ELSE snapPath end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('snapPath')) or (colPickMode==1 and !item.containsKey('snapPath'))">
                            when a.id=#{item.id} then #{item.snapPath}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="irregularOtherType=(case" suffix="ELSE irregularOtherType end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('irregularOtherType')) or (colPickMode==1 and !item.containsKey('irregularOtherType'))">
                                        when a.id=#{item.id} then #{item.irregularOtherType}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('irregularOtherTypeIncrement')) or (colPickMode==1 and !item.containsKey('irregularOtherTypeIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.irregularOtherType,0) + #{item.irregularOtherTypeIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="performType=(case" suffix="ELSE performType end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('performType')) or (colPickMode==1 and !item.containsKey('performType'))">
                            when a.id=#{item.id} then #{item.performType}
                        </if>
                    </foreach>
                </trim>
        </trim>
        where id in
        <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </update>
    <!-- 根据主健查询 -->
    <select id="getByKey" parameterType="paramDto" resultMap="PerformAttendAppealEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_perform_attend_appeal as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_perform_attend_appeal as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_perform_attend_appeal where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_perform_attend_appeal where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <!-- 根据对象列表删除一批，针对单一主健有效 -->
    <delete id="deleteByEntityList">
        delete from mortals_xhx_perform_attend_appeal where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </delete>
    <!-- 根据paramDto删除一批 -->
    <delete id="deleteByMap" parameterType="paramDto">
        delete a.* from mortals_xhx_perform_attend_appeal as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="PerformAttendAppealEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_perform_attend_appeal as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
        <include refid="_orderCols_"/>
    </select>
    <!-- 获取子列表 -->
    <select id="getPerformAttendAppealFilesByAppealId" parameterType="java.lang.Long" resultMap="PerformAttendAppealFilesEntity-Map">
        select <include refid="_columns_sub"/>
        from mortals_xhx_perform_attend_appeal_files as b
        <trim suffixOverrides="where" suffix="">
            where b.appealId = #{id}
        </trim>
    </select>



    <!-- 获取 -->
    <select id="getListCount" parameterType="paramDto" resultType="int">
        select count(1)
        from mortals_xhx_perform_attend_appeal as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </select>
    <!-- 条件映射 -->
    <sql id="_condition_">
        <if test="condition != null and !condition.isEmpty()">
            <!-- 条件映射-普通条件 -->
            <include refid="_condition_param_">
                <property name="_conditionParam_" value="condition"/>
                <property name="_conditionType_" value="and"/>
            </include>
            <!-- 条件映射-集合之间使用AND，集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
            <if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
                and
                <foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
                    <trim prefixOverrides="or" prefix="(" suffix=")">
                        <include refid="_condition_param_">
                            <property name="_conditionParam_" value="andCondition"/>
                            <property name="_conditionType_" value="or"/>
                        </include>
                    </trim>
                </foreach>
            </if>
            <!-- 条件映射-集合之间使用OR，集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
            <if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
                and
                <foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
                    <trim prefixOverrides="and" prefix="(" suffix=")">
                        <include refid="_condition_param_">
                            <property name="_conditionParam_" value="orCondition"/>
                            <property name="_conditionType_" value="and"/>
                        </include>
                    </trim>
                </foreach>
            </if>
        </if>
    </sql>
    <!-- 条件映射-代参数 -->
    <sql id="_condition_param_">
        <bind name="conditionParamRef" value="${_conditionParam_}"/>
        <if test="conditionParamRef.containsKey('id')">
            <if test="conditionParamRef.id != null">
                ${_conditionType_} a.id=#{${_conditionParam_}.id}
            </if>
        </if>
            <if test="conditionParamRef.containsKey('id')">
                <if test="conditionParamRef.id != null ">
                    ${_conditionType_} a.id = #{${_conditionParam_}.id}
                </if>
                <if test="conditionParamRef.id == null">
                    ${_conditionType_} a.id is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
                ${_conditionType_} a.id in
                <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
                ${_conditionType_} a.id not in
                <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
                ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
            </if>
            <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
                ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
            </if>

            <if test="conditionParamRef.containsKey('checkRecordId')">
                <if test="conditionParamRef.checkRecordId != null ">
                    ${_conditionType_} a.checkRecordId = #{${_conditionParam_}.checkRecordId}
                </if>
                <if test="conditionParamRef.checkRecordId == null">
                    ${_conditionType_} a.checkRecordId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('checkRecordIdList') and conditionParamRef.checkRecordIdList.size() > 0">
                ${_conditionType_} a.checkRecordId in
                <foreach collection="conditionParamRef.checkRecordIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('checkRecordIdNotList') and conditionParamRef.checkRecordIdNotList.size() > 0">
                ${_conditionType_} a.checkRecordId not in
                <foreach collection="conditionParamRef.checkRecordIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('checkRecordIdStart') and conditionParamRef.checkRecordIdStart != null">
                ${_conditionType_} a.checkRecordId <![CDATA[ >= ]]> #{${_conditionParam_}.checkRecordIdStart}
            </if>
            <if test="conditionParamRef.containsKey('checkRecordIdEnd') and conditionParamRef.checkRecordIdEnd != null">
                ${_conditionType_} a.checkRecordId <![CDATA[ <= ]]> #{${_conditionParam_}.checkRecordIdEnd}
            </if>

            <if test="conditionParamRef.containsKey('staffId')">
                <if test="conditionParamRef.staffId != null ">
                    ${_conditionType_} a.staffId = #{${_conditionParam_}.staffId}
                </if>
                <if test="conditionParamRef.staffId == null">
                    ${_conditionType_} a.staffId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
                ${_conditionType_} a.staffId in
                <foreach collection="conditionParamRef.staffIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('staffIdNotList') and conditionParamRef.staffIdNotList.size() > 0">
                ${_conditionType_} a.staffId not in
                <foreach collection="conditionParamRef.staffIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('staffIdStart') and conditionParamRef.staffIdStart != null">
                ${_conditionType_} a.staffId <![CDATA[ >= ]]> #{${_conditionParam_}.staffIdStart}
            </if>
            <if test="conditionParamRef.containsKey('staffIdEnd') and conditionParamRef.staffIdEnd != null">
                ${_conditionType_} a.staffId <![CDATA[ <= ]]> #{${_conditionParam_}.staffIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('staffName')">
                <if test="conditionParamRef.staffName != null and conditionParamRef.staffName != ''">
                    ${_conditionType_} a.staffName like #{${_conditionParam_}.staffName}
                </if>
                <if test="conditionParamRef.staffName == null">
                    ${_conditionType_} a.staffName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('staffNameList') and conditionParamRef.staffNameList.size() > 0">
                ${_conditionType_} a.staffName in
                <foreach collection="conditionParamRef.staffNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('staffNameNotList') and conditionParamRef.staffNameNotList.size() > 0">
                ${_conditionType_} a.staffName not in
                <foreach collection="conditionParamRef.staffNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('workNum')">
                <if test="conditionParamRef.workNum != null and conditionParamRef.workNum != ''">
                    ${_conditionType_} a.workNum like #{${_conditionParam_}.workNum}
                </if>
                <if test="conditionParamRef.workNum == null">
                    ${_conditionType_} a.workNum is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('workNumList') and conditionParamRef.workNumList.size() > 0">
                ${_conditionType_} a.workNum in
                <foreach collection="conditionParamRef.workNumList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workNumNotList') and conditionParamRef.workNumNotList.size() > 0">
                ${_conditionType_} a.workNum not in
                <foreach collection="conditionParamRef.workNumNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('deptId')">
                <if test="conditionParamRef.deptId != null ">
                    ${_conditionType_} a.deptId = #{${_conditionParam_}.deptId}
                </if>
                <if test="conditionParamRef.deptId == null">
                    ${_conditionType_} a.deptId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
                ${_conditionType_} a.deptId in
                <foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('deptIdNotList') and conditionParamRef.deptIdNotList.size() > 0">
                ${_conditionType_} a.deptId not in
                <foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('deptIdStart') and conditionParamRef.deptIdStart != null">
                ${_conditionType_} a.deptId <![CDATA[ >= ]]> #{${_conditionParam_}.deptIdStart}
            </if>
            <if test="conditionParamRef.containsKey('deptIdEnd') and conditionParamRef.deptIdEnd != null">
                ${_conditionType_} a.deptId <![CDATA[ <= ]]> #{${_conditionParam_}.deptIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('deptName')">
                <if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
                    ${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
                </if>
                <if test="conditionParamRef.deptName == null">
                    ${_conditionType_} a.deptName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('deptNameList') and conditionParamRef.deptNameList.size() > 0">
                ${_conditionType_} a.deptName in
                <foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('deptNameNotList') and conditionParamRef.deptNameNotList.size() > 0">
                ${_conditionType_} a.deptName not in
                <foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupId')">
                <if test="conditionParamRef.attendanceGroupId != null ">
                    ${_conditionType_} a.attendanceGroupId = #{${_conditionParam_}.attendanceGroupId}
                </if>
                <if test="conditionParamRef.attendanceGroupId == null">
                    ${_conditionType_} a.attendanceGroupId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupIdList') and conditionParamRef.attendanceGroupIdList.size() > 0">
                ${_conditionType_} a.attendanceGroupId in
                <foreach collection="conditionParamRef.attendanceGroupIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupIdNotList') and conditionParamRef.attendanceGroupIdNotList.size() > 0">
                ${_conditionType_} a.attendanceGroupId not in
                <foreach collection="conditionParamRef.attendanceGroupIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupIdStart') and conditionParamRef.attendanceGroupIdStart != null">
                ${_conditionType_} a.attendanceGroupId <![CDATA[ >= ]]> #{${_conditionParam_}.attendanceGroupIdStart}
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupIdEnd') and conditionParamRef.attendanceGroupIdEnd != null">
                ${_conditionType_} a.attendanceGroupId <![CDATA[ <= ]]> #{${_conditionParam_}.attendanceGroupIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('attendanceGroupName')">
                <if test="conditionParamRef.attendanceGroupName != null and conditionParamRef.attendanceGroupName != ''">
                    ${_conditionType_} a.attendanceGroupName like #{${_conditionParam_}.attendanceGroupName}
                </if>
                <if test="conditionParamRef.attendanceGroupName == null">
                    ${_conditionType_} a.attendanceGroupName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupNameList') and conditionParamRef.attendanceGroupNameList.size() > 0">
                ${_conditionType_} a.attendanceGroupName in
                <foreach collection="conditionParamRef.attendanceGroupNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendanceGroupNameNotList') and conditionParamRef.attendanceGroupNameNotList.size() > 0">
                ${_conditionType_} a.attendanceGroupName not in
                <foreach collection="conditionParamRef.attendanceGroupNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('attendanceDate')">
                <if test="conditionParamRef.attendanceDate != null ">
                    ${_conditionType_} a.attendanceDate = #{${_conditionParam_}.attendanceDate}
                </if>
                <if test="conditionParamRef.attendanceDate == null">
                    ${_conditionType_} a.attendanceDate is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('attendanceDateStart') and conditionParamRef.attendanceDateStart != null and conditionParamRef.attendanceDateStart!=''">
                ${_conditionType_} a.attendanceDate <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.attendanceDateStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('attendanceDateEnd') and conditionParamRef.attendanceDateEnd != null and conditionParamRef.attendanceDateEnd!=''">
                ${_conditionType_} a.attendanceDate <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.attendanceDateEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('ruleId')">
                <if test="conditionParamRef.ruleId != null ">
                    ${_conditionType_} a.ruleId = #{${_conditionParam_}.ruleId}
                </if>
                <if test="conditionParamRef.ruleId == null">
                    ${_conditionType_} a.ruleId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('ruleIdList') and conditionParamRef.ruleIdList.size() > 0">
                ${_conditionType_} a.ruleId in
                <foreach collection="conditionParamRef.ruleIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('ruleIdNotList') and conditionParamRef.ruleIdNotList.size() > 0">
                ${_conditionType_} a.ruleId not in
                <foreach collection="conditionParamRef.ruleIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('ruleIdStart') and conditionParamRef.ruleIdStart != null">
                ${_conditionType_} a.ruleId <![CDATA[ >= ]]> #{${_conditionParam_}.ruleIdStart}
            </if>
            <if test="conditionParamRef.containsKey('ruleIdEnd') and conditionParamRef.ruleIdEnd != null">
                ${_conditionType_} a.ruleId <![CDATA[ <= ]]> #{${_conditionParam_}.ruleIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('ruleName')">
                <if test="conditionParamRef.ruleName != null and conditionParamRef.ruleName != ''">
                    ${_conditionType_} a.ruleName like #{${_conditionParam_}.ruleName}
                </if>
                <if test="conditionParamRef.ruleName == null">
                    ${_conditionType_} a.ruleName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('ruleNameList') and conditionParamRef.ruleNameList.size() > 0">
                ${_conditionType_} a.ruleName in
                <foreach collection="conditionParamRef.ruleNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('ruleNameNotList') and conditionParamRef.ruleNameNotList.size() > 0">
                ${_conditionType_} a.ruleName not in
                <foreach collection="conditionParamRef.ruleNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('subMethod')">
                <if test="conditionParamRef.subMethod != null ">
                    ${_conditionType_} a.subMethod = #{${_conditionParam_}.subMethod}
                </if>
                <if test="conditionParamRef.subMethod == null">
                    ${_conditionType_} a.subMethod is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('subMethodList') and conditionParamRef.subMethodList.size() > 0">
                ${_conditionType_} a.subMethod in
                <foreach collection="conditionParamRef.subMethodList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('subMethodNotList') and conditionParamRef.subMethodNotList.size() > 0">
                ${_conditionType_} a.subMethod not in
                <foreach collection="conditionParamRef.subMethodNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('subMethodStart') and conditionParamRef.subMethodStart != null">
                ${_conditionType_} a.subMethod <![CDATA[ >= ]]> #{${_conditionParam_}.subMethodStart}
            </if>
            <if test="conditionParamRef.containsKey('subMethodEnd') and conditionParamRef.subMethodEnd != null">
                ${_conditionType_} a.subMethod <![CDATA[ <= ]]> #{${_conditionParam_}.subMethodEnd}
            </if>

            <if test="conditionParamRef.containsKey('subAddType')">
                <if test="conditionParamRef.subAddType != null ">
                    ${_conditionType_} a.subAddType = #{${_conditionParam_}.subAddType}
                </if>
                <if test="conditionParamRef.subAddType == null">
                    ${_conditionType_} a.subAddType is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('subAddTypeList') and conditionParamRef.subAddTypeList.size() > 0">
                ${_conditionType_} a.subAddType in
                <foreach collection="conditionParamRef.subAddTypeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('subAddTypeNotList') and conditionParamRef.subAddTypeNotList.size() > 0">
                ${_conditionType_} a.subAddType not in
                <foreach collection="conditionParamRef.subAddTypeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('subAddTypeStart') and conditionParamRef.subAddTypeStart != null">
                ${_conditionType_} a.subAddType <![CDATA[ >= ]]> #{${_conditionParam_}.subAddTypeStart}
            </if>
            <if test="conditionParamRef.containsKey('subAddTypeEnd') and conditionParamRef.subAddTypeEnd != null">
                ${_conditionType_} a.subAddType <![CDATA[ <= ]]> #{${_conditionParam_}.subAddTypeEnd}
            </if>

            <if test="conditionParamRef.containsKey('score')">
                <if test="conditionParamRef.score != null ">
                    ${_conditionType_} a.score = #{${_conditionParam_}.score}
                </if>
                <if test="conditionParamRef.score == null">
                    ${_conditionType_} a.score is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('scoreList') and conditionParamRef.scoreList.size() > 0">
                ${_conditionType_} a.score in
                <foreach collection="conditionParamRef.scoreList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('scoreNotList') and conditionParamRef.scoreNotList.size() > 0">
                ${_conditionType_} a.score not in
                <foreach collection="conditionParamRef.scoreNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('scoreStart') and conditionParamRef.scoreStart != null">
                ${_conditionType_} a.score <![CDATA[ >= ]]> #{${_conditionParam_}.scoreStart}
            </if>
            <if test="conditionParamRef.containsKey('scoreEnd') and conditionParamRef.scoreEnd != null">
                ${_conditionType_} a.score <![CDATA[ <= ]]> #{${_conditionParam_}.scoreEnd}
            </if>


            <if test="conditionParamRef.containsKey('goOffTimeStr')">
                <if test="conditionParamRef.goOffTimeStr != null and conditionParamRef.goOffTimeStr != ''">
                    ${_conditionType_} a.goOffTimeStr like #{${_conditionParam_}.goOffTimeStr}
                </if>
                <if test="conditionParamRef.goOffTimeStr == null">
                    ${_conditionType_} a.goOffTimeStr is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('goOffTimeStrList') and conditionParamRef.goOffTimeStrList.size() > 0">
                ${_conditionType_} a.goOffTimeStr in
                <foreach collection="conditionParamRef.goOffTimeStrList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('goOffTimeStrNotList') and conditionParamRef.goOffTimeStrNotList.size() > 0">
                ${_conditionType_} a.goOffTimeStr not in
                <foreach collection="conditionParamRef.goOffTimeStrNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('errorTime')">
                <if test="conditionParamRef.errorTime != null ">
                    ${_conditionType_} a.errorTime = #{${_conditionParam_}.errorTime}
                </if>
                <if test="conditionParamRef.errorTime == null">
                    ${_conditionType_} a.errorTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('errorTimeStart') and conditionParamRef.errorTimeStart != null and conditionParamRef.errorTimeStart!=''">
                ${_conditionType_} a.errorTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.errorTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('errorTimeEnd') and conditionParamRef.errorTimeEnd != null and conditionParamRef.errorTimeEnd!=''">
                ${_conditionType_} a.errorTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.errorTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('actualAttendTime')">
                <if test="conditionParamRef.actualAttendTime != null ">
                    ${_conditionType_} a.actualAttendTime = #{${_conditionParam_}.actualAttendTime}
                </if>
                <if test="conditionParamRef.actualAttendTime == null">
                    ${_conditionType_} a.actualAttendTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('actualAttendTimeStart') and conditionParamRef.actualAttendTimeStart != null and conditionParamRef.actualAttendTimeStart!=''">
                ${_conditionType_} a.actualAttendTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.actualAttendTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('actualAttendTimeEnd') and conditionParamRef.actualAttendTimeEnd != null and conditionParamRef.actualAttendTimeEnd!=''">
                ${_conditionType_} a.actualAttendTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.actualAttendTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('errorResult')">
                <if test="conditionParamRef.errorResult != null and conditionParamRef.errorResult != ''">
                    ${_conditionType_} a.errorResult like #{${_conditionParam_}.errorResult}
                </if>
                <if test="conditionParamRef.errorResult == null">
                    ${_conditionType_} a.errorResult is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('errorResultList') and conditionParamRef.errorResultList.size() > 0">
                ${_conditionType_} a.errorResult in
                <foreach collection="conditionParamRef.errorResultList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('errorResultNotList') and conditionParamRef.errorResultNotList.size() > 0">
                ${_conditionType_} a.errorResult not in
                <foreach collection="conditionParamRef.errorResultNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('checkPerson')">
                <if test="conditionParamRef.checkPerson != null and conditionParamRef.checkPerson != ''">
                    ${_conditionType_} a.checkPerson like #{${_conditionParam_}.checkPerson}
                </if>
                <if test="conditionParamRef.checkPerson == null">
                    ${_conditionType_} a.checkPerson is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('checkPersonList') and conditionParamRef.checkPersonList.size() > 0">
                ${_conditionType_} a.checkPerson in
                <foreach collection="conditionParamRef.checkPersonList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('checkPersonNotList') and conditionParamRef.checkPersonNotList.size() > 0">
                ${_conditionType_} a.checkPerson not in
                <foreach collection="conditionParamRef.checkPersonNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('checkTime')">
                <if test="conditionParamRef.checkTime != null ">
                    ${_conditionType_} a.checkTime = #{${_conditionParam_}.checkTime}
                </if>
                <if test="conditionParamRef.checkTime == null">
                    ${_conditionType_} a.checkTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('checkTimeStart') and conditionParamRef.checkTimeStart != null and conditionParamRef.checkTimeStart!=''">
                ${_conditionType_} a.checkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.checkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('checkTimeEnd') and conditionParamRef.checkTimeEnd != null and conditionParamRef.checkTimeEnd!=''">
                ${_conditionType_} a.checkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.checkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('checkDesc')">
                <if test="conditionParamRef.checkDesc != null and conditionParamRef.checkDesc != ''">
                    ${_conditionType_} a.checkDesc like #{${_conditionParam_}.checkDesc}
                </if>
                <if test="conditionParamRef.checkDesc == null">
                    ${_conditionType_} a.checkDesc is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('checkDescList') and conditionParamRef.checkDescList.size() > 0">
                ${_conditionType_} a.checkDesc in
                <foreach collection="conditionParamRef.checkDescList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('checkDescNotList') and conditionParamRef.checkDescNotList.size() > 0">
                ${_conditionType_} a.checkDesc not in
                <foreach collection="conditionParamRef.checkDescNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('checkResult')">
                <if test="conditionParamRef.checkResult != null and conditionParamRef.checkResult != ''">
                    ${_conditionType_} a.checkResult like #{${_conditionParam_}.checkResult}
                </if>
                <if test="conditionParamRef.checkResult == null">
                    ${_conditionType_} a.checkResult is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('checkResultList') and conditionParamRef.checkResultList.size() > 0">
                ${_conditionType_} a.checkResult in
                <foreach collection="conditionParamRef.checkResultList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('checkResultNotList') and conditionParamRef.checkResultNotList.size() > 0">
                ${_conditionType_} a.checkResult not in
                <foreach collection="conditionParamRef.checkResultNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('processStatus')">
                <if test="conditionParamRef.processStatus != null ">
                    ${_conditionType_} a.processStatus = #{${_conditionParam_}.processStatus}
                </if>
                <if test="conditionParamRef.processStatus == null">
                    ${_conditionType_} a.processStatus is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('processStatusList') and conditionParamRef.processStatusList.size() > 0">
                ${_conditionType_} a.processStatus in
                <foreach collection="conditionParamRef.processStatusList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('processStatusNotList') and conditionParamRef.processStatusNotList.size() > 0">
                ${_conditionType_} a.processStatus not in
                <foreach collection="conditionParamRef.processStatusNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('processStatusStart') and conditionParamRef.processStatusStart != null">
                ${_conditionType_} a.processStatus <![CDATA[ >= ]]> #{${_conditionParam_}.processStatusStart}
            </if>
            <if test="conditionParamRef.containsKey('processStatusEnd') and conditionParamRef.processStatusEnd != null">
                ${_conditionType_} a.processStatus <![CDATA[ <= ]]> #{${_conditionParam_}.processStatusEnd}
            </if>


            <if test="conditionParamRef.containsKey('appealDesc')">
                <if test="conditionParamRef.appealDesc != null and conditionParamRef.appealDesc != ''">
                    ${_conditionType_} a.appealDesc like #{${_conditionParam_}.appealDesc}
                </if>
                <if test="conditionParamRef.appealDesc == null">
                    ${_conditionType_} a.appealDesc is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('appealDescList') and conditionParamRef.appealDescList.size() > 0">
                ${_conditionType_} a.appealDesc in
                <foreach collection="conditionParamRef.appealDescList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('appealDescNotList') and conditionParamRef.appealDescNotList.size() > 0">
                ${_conditionType_} a.appealDesc not in
                <foreach collection="conditionParamRef.appealDescNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('appealTime')">
                <if test="conditionParamRef.appealTime != null ">
                    ${_conditionType_} a.appealTime = #{${_conditionParam_}.appealTime}
                </if>
                <if test="conditionParamRef.appealTime == null">
                    ${_conditionType_} a.appealTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('appealTimeStart') and conditionParamRef.appealTimeStart != null and conditionParamRef.appealTimeStart!=''">
                ${_conditionType_} a.appealTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.appealTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('appealTimeEnd') and conditionParamRef.appealTimeEnd != null and conditionParamRef.appealTimeEnd!=''">
                ${_conditionType_} a.appealTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.appealTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('appealResult')">
                <if test="conditionParamRef.appealResult != null ">
                    ${_conditionType_} a.appealResult = #{${_conditionParam_}.appealResult}
                </if>
                <if test="conditionParamRef.appealResult == null">
                    ${_conditionType_} a.appealResult is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('appealResultList') and conditionParamRef.appealResultList.size() > 0">
                ${_conditionType_} a.appealResult in
                <foreach collection="conditionParamRef.appealResultList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('appealResultNotList') and conditionParamRef.appealResultNotList.size() > 0">
                ${_conditionType_} a.appealResult not in
                <foreach collection="conditionParamRef.appealResultNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('appealResultStart') and conditionParamRef.appealResultStart != null">
                ${_conditionType_} a.appealResult <![CDATA[ >= ]]> #{${_conditionParam_}.appealResultStart}
            </if>
            <if test="conditionParamRef.containsKey('appealResultEnd') and conditionParamRef.appealResultEnd != null">
                ${_conditionType_} a.appealResult <![CDATA[ <= ]]> #{${_conditionParam_}.appealResultEnd}
            </if>


            <if test="conditionParamRef.containsKey('remark')">
                <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
                    ${_conditionType_} a.remark like #{${_conditionParam_}.remark}
                </if>
                <if test="conditionParamRef.remark == null">
                    ${_conditionType_} a.remark is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
                ${_conditionType_} a.remark in
                <foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
                ${_conditionType_} a.remark not in
                <foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('createUserId')">
                <if test="conditionParamRef.createUserId != null ">
                    ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
                </if>
                <if test="conditionParamRef.createUserId == null">
                    ${_conditionType_} a.createUserId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
                ${_conditionType_} a.createUserId in
                <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
                ${_conditionType_} a.createUserId not in
                <foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
                ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
            </if>
            <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
                ${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('createTime')">
                <if test="conditionParamRef.createTime != null ">
                    ${_conditionType_} a.createTime = #{${_conditionParam_}.createTime}
                </if>
                <if test="conditionParamRef.createTime == null">
                    ${_conditionType_} a.createTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
                ${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''">
                ${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('updateUserId')">
                <if test="conditionParamRef.updateUserId != null ">
                    ${_conditionType_} a.updateUserId = #{${_conditionParam_}.updateUserId}
                </if>
                <if test="conditionParamRef.updateUserId == null">
                    ${_conditionType_} a.updateUserId is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
                ${_conditionType_} a.updateUserId in
                <foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('updateUserIdNotList') and conditionParamRef.updateUserIdNotList.size() > 0">
                ${_conditionType_} a.updateUserId not in
                <foreach collection="conditionParamRef.updateUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('updateUserIdStart') and conditionParamRef.updateUserIdStart != null">
                ${_conditionType_} a.updateUserId <![CDATA[ >= ]]> #{${_conditionParam_}.updateUserIdStart}
            </if>
            <if test="conditionParamRef.containsKey('updateUserIdEnd') and conditionParamRef.updateUserIdEnd != null">
                ${_conditionType_} a.updateUserId <![CDATA[ <= ]]> #{${_conditionParam_}.updateUserIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('updateTime')">
                <if test="conditionParamRef.updateTime != null ">
                    ${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
                </if>
                <if test="conditionParamRef.updateTime == null">
                    ${_conditionType_} a.updateTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
                ${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
                ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('violationType')">
                <if test="conditionParamRef.violationType != null and conditionParamRef.violationType != ''">
                    ${_conditionType_} a.violationType like #{${_conditionParam_}.violationType}
                </if>
                <if test="conditionParamRef.violationType == null">
                    ${_conditionType_} a.violationType is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('violationTypeList') and conditionParamRef.violationTypeList.size() > 0">
                ${_conditionType_} a.violationType in
                <foreach collection="conditionParamRef.violationTypeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('violationTypeNotList') and conditionParamRef.violationTypeNotList.size() > 0">
                ${_conditionType_} a.violationType not in
                <foreach collection="conditionParamRef.violationTypeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('reviewResult')">
                <if test="conditionParamRef.reviewResult != null ">
                    ${_conditionType_} a.reviewResult = #{${_conditionParam_}.reviewResult}
                </if>
                <if test="conditionParamRef.reviewResult == null">
                    ${_conditionType_} a.reviewResult is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('reviewResultList') and conditionParamRef.reviewResultList.size() > 0">
                ${_conditionType_} a.reviewResult in
                <foreach collection="conditionParamRef.reviewResultList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('reviewResultNotList') and conditionParamRef.reviewResultNotList.size() > 0">
                ${_conditionType_} a.reviewResult not in
                <foreach collection="conditionParamRef.reviewResultNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('reviewResultStart') and conditionParamRef.reviewResultStart != null">
                ${_conditionType_} a.reviewResult <![CDATA[ >= ]]> #{${_conditionParam_}.reviewResultStart}
            </if>
            <if test="conditionParamRef.containsKey('reviewResultEnd') and conditionParamRef.reviewResultEnd != null">
                ${_conditionType_} a.reviewResult <![CDATA[ <= ]]> #{${_conditionParam_}.reviewResultEnd}
            </if>


            <if test="conditionParamRef.containsKey('reviewTime')">
                <if test="conditionParamRef.reviewTime != null ">
                    ${_conditionType_} a.reviewTime = #{${_conditionParam_}.reviewTime}
                </if>
                <if test="conditionParamRef.reviewTime == null">
                    ${_conditionType_} a.reviewTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('reviewTimeStart') and conditionParamRef.reviewTimeStart != null and conditionParamRef.reviewTimeStart!=''">
                ${_conditionType_} a.reviewTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.reviewTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('reviewTimeEnd') and conditionParamRef.reviewTimeEnd != null and conditionParamRef.reviewTimeEnd!=''">
                ${_conditionType_} a.reviewTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.reviewTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('reviewSource')">
                <if test="conditionParamRef.reviewSource != null and conditionParamRef.reviewSource != ''">
                    ${_conditionType_} a.reviewSource like #{${_conditionParam_}.reviewSource}
                </if>
                <if test="conditionParamRef.reviewSource == null">
                    ${_conditionType_} a.reviewSource is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('reviewSourceList') and conditionParamRef.reviewSourceList.size() > 0">
                ${_conditionType_} a.reviewSource in
                <foreach collection="conditionParamRef.reviewSourceList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('reviewSourceNotList') and conditionParamRef.reviewSourceNotList.size() > 0">
                ${_conditionType_} a.reviewSource not in
                <foreach collection="conditionParamRef.reviewSourceNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('reviewDevice')">
                <if test="conditionParamRef.reviewDevice != null and conditionParamRef.reviewDevice != ''">
                    ${_conditionType_} a.reviewDevice like #{${_conditionParam_}.reviewDevice}
                </if>
                <if test="conditionParamRef.reviewDevice == null">
                    ${_conditionType_} a.reviewDevice is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('reviewDeviceList') and conditionParamRef.reviewDeviceList.size() > 0">
                ${_conditionType_} a.reviewDevice in
                <foreach collection="conditionParamRef.reviewDeviceList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('reviewDeviceNotList') and conditionParamRef.reviewDeviceNotList.size() > 0">
                ${_conditionType_} a.reviewDevice not in
                <foreach collection="conditionParamRef.reviewDeviceNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('complainTitle')">
                <if test="conditionParamRef.complainTitle != null and conditionParamRef.complainTitle != ''">
                    ${_conditionType_} a.complainTitle like #{${_conditionParam_}.complainTitle}
                </if>
                <if test="conditionParamRef.complainTitle == null">
                    ${_conditionType_} a.complainTitle is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainTitleList') and conditionParamRef.complainTitleList.size() > 0">
                ${_conditionType_} a.complainTitle in
                <foreach collection="conditionParamRef.complainTitleList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainTitleNotList') and conditionParamRef.complainTitleNotList.size() > 0">
                ${_conditionType_} a.complainTitle not in
                <foreach collection="conditionParamRef.complainTitleNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('complainContent')">
                <if test="conditionParamRef.complainContent != null and conditionParamRef.complainContent != ''">
                    ${_conditionType_} a.complainContent like #{${_conditionParam_}.complainContent}
                </if>
                <if test="conditionParamRef.complainContent == null">
                    ${_conditionType_} a.complainContent is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainContentList') and conditionParamRef.complainContentList.size() > 0">
                ${_conditionType_} a.complainContent in
                <foreach collection="conditionParamRef.complainContentList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainContentNotList') and conditionParamRef.complainContentNotList.size() > 0">
                ${_conditionType_} a.complainContent not in
                <foreach collection="conditionParamRef.complainContentNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('complainRealName')">
                <if test="conditionParamRef.complainRealName != null and conditionParamRef.complainRealName != ''">
                    ${_conditionType_} a.complainRealName like #{${_conditionParam_}.complainRealName}
                </if>
                <if test="conditionParamRef.complainRealName == null">
                    ${_conditionType_} a.complainRealName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainRealNameList') and conditionParamRef.complainRealNameList.size() > 0">
                ${_conditionType_} a.complainRealName in
                <foreach collection="conditionParamRef.complainRealNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainRealNameNotList') and conditionParamRef.complainRealNameNotList.size() > 0">
                ${_conditionType_} a.complainRealName not in
                <foreach collection="conditionParamRef.complainRealNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('contact')">
                <if test="conditionParamRef.contact != null and conditionParamRef.contact != ''">
                    ${_conditionType_} a.contact like #{${_conditionParam_}.contact}
                </if>
                <if test="conditionParamRef.contact == null">
                    ${_conditionType_} a.contact is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('contactList') and conditionParamRef.contactList.size() > 0">
                ${_conditionType_} a.contact in
                <foreach collection="conditionParamRef.contactList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('contactNotList') and conditionParamRef.contactNotList.size() > 0">
                ${_conditionType_} a.contact not in
                <foreach collection="conditionParamRef.contactNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('complainTime')">
                <if test="conditionParamRef.complainTime != null ">
                    ${_conditionType_} a.complainTime = #{${_conditionParam_}.complainTime}
                </if>
                <if test="conditionParamRef.complainTime == null">
                    ${_conditionType_} a.complainTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainTimeStart') and conditionParamRef.complainTimeStart != null and conditionParamRef.complainTimeStart!=''">
                ${_conditionType_} a.complainTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.complainTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('complainTimeEnd') and conditionParamRef.complainTimeEnd != null and conditionParamRef.complainTimeEnd!=''">
                ${_conditionType_} a.complainTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.complainTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('complainSource')">
                <if test="conditionParamRef.complainSource != null and conditionParamRef.complainSource != ''">
                    ${_conditionType_} a.complainSource like #{${_conditionParam_}.complainSource}
                </if>
                <if test="conditionParamRef.complainSource == null">
                    ${_conditionType_} a.complainSource is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainSourceList') and conditionParamRef.complainSourceList.size() > 0">
                ${_conditionType_} a.complainSource in
                <foreach collection="conditionParamRef.complainSourceList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainSourceNotList') and conditionParamRef.complainSourceNotList.size() > 0">
                ${_conditionType_} a.complainSource not in
                <foreach collection="conditionParamRef.complainSourceNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('complainDevice')">
                <if test="conditionParamRef.complainDevice != null and conditionParamRef.complainDevice != ''">
                    ${_conditionType_} a.complainDevice like #{${_conditionParam_}.complainDevice}
                </if>
                <if test="conditionParamRef.complainDevice == null">
                    ${_conditionType_} a.complainDevice is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainDeviceList') and conditionParamRef.complainDeviceList.size() > 0">
                ${_conditionType_} a.complainDevice in
                <foreach collection="conditionParamRef.complainDeviceList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainDeviceNotList') and conditionParamRef.complainDeviceNotList.size() > 0">
                ${_conditionType_} a.complainDevice not in
                <foreach collection="conditionParamRef.complainDeviceNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('goworkCode')">
                <if test="conditionParamRef.goworkCode != null and conditionParamRef.goworkCode != ''">
                    ${_conditionType_} a.goworkCode like #{${_conditionParam_}.goworkCode}
                </if>
                <if test="conditionParamRef.goworkCode == null">
                    ${_conditionType_} a.goworkCode is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('goworkCodeList') and conditionParamRef.goworkCodeList.size() > 0">
                ${_conditionType_} a.goworkCode in
                <foreach collection="conditionParamRef.goworkCodeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('goworkCodeNotList') and conditionParamRef.goworkCodeNotList.size() > 0">
                ${_conditionType_} a.goworkCode not in
                <foreach collection="conditionParamRef.goworkCodeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('goworkDepts')">
                <if test="conditionParamRef.goworkDepts != null and conditionParamRef.goworkDepts != ''">
                    ${_conditionType_} a.goworkDepts like #{${_conditionParam_}.goworkDepts}
                </if>
                <if test="conditionParamRef.goworkDepts == null">
                    ${_conditionType_} a.goworkDepts is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('goworkDeptsList') and conditionParamRef.goworkDeptsList.size() > 0">
                ${_conditionType_} a.goworkDepts in
                <foreach collection="conditionParamRef.goworkDeptsList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('goworkDeptsNotList') and conditionParamRef.goworkDeptsNotList.size() > 0">
                ${_conditionType_} a.goworkDepts not in
                <foreach collection="conditionParamRef.goworkDeptsNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('matterlName')">
                <if test="conditionParamRef.matterlName != null and conditionParamRef.matterlName != ''">
                    ${_conditionType_} a.matterlName like #{${_conditionParam_}.matterlName}
                </if>
                <if test="conditionParamRef.matterlName == null">
                    ${_conditionType_} a.matterlName is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('matterlNameList') and conditionParamRef.matterlNameList.size() > 0">
                ${_conditionType_} a.matterlName in
                <foreach collection="conditionParamRef.matterlNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('matterlNameNotList') and conditionParamRef.matterlNameNotList.size() > 0">
                ${_conditionType_} a.matterlName not in
                <foreach collection="conditionParamRef.matterlNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

            <if test="conditionParamRef.containsKey('goworkTime')">
                <if test="conditionParamRef.goworkTime != null ">
                    ${_conditionType_} a.goworkTime = #{${_conditionParam_}.goworkTime}
                </if>
                <if test="conditionParamRef.goworkTime == null">
                    ${_conditionType_} a.goworkTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('goworkTimeStart') and conditionParamRef.goworkTimeStart != null and conditionParamRef.goworkTimeStart!=''">
                ${_conditionType_} a.goworkTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.goworkTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('goworkTimeEnd') and conditionParamRef.goworkTimeEnd != null and conditionParamRef.goworkTimeEnd!=''">
                ${_conditionType_} a.goworkTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.goworkTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('irregularType')">
                <if test="conditionParamRef.irregularType != null ">
                    ${_conditionType_} a.irregularType = #{${_conditionParam_}.irregularType}
                </if>
                <if test="conditionParamRef.irregularType == null">
                    ${_conditionType_} a.irregularType is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('irregularTypeList') and conditionParamRef.irregularTypeList.size() > 0">
                ${_conditionType_} a.irregularType in
                <foreach collection="conditionParamRef.irregularTypeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('irregularTypeNotList') and conditionParamRef.irregularTypeNotList.size() > 0">
                ${_conditionType_} a.irregularType not in
                <foreach collection="conditionParamRef.irregularTypeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('irregularTypeStart') and conditionParamRef.irregularTypeStart != null">
                ${_conditionType_} a.irregularType <![CDATA[ >= ]]> #{${_conditionParam_}.irregularTypeStart}
            </if>
            <if test="conditionParamRef.containsKey('irregularTypeEnd') and conditionParamRef.irregularTypeEnd != null">
                ${_conditionType_} a.irregularType <![CDATA[ <= ]]> #{${_conditionParam_}.irregularTypeEnd}
            </if>


            <if test="conditionParamRef.containsKey('happenTime')">
                <if test="conditionParamRef.happenTime != null ">
                    ${_conditionType_} a.happenTime = #{${_conditionParam_}.happenTime}
                </if>
                <if test="conditionParamRef.happenTime == null">
                    ${_conditionType_} a.happenTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('happenTimeStart') and conditionParamRef.happenTimeStart != null and conditionParamRef.happenTimeStart!=''">
                ${_conditionType_} a.happenTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.happenTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('happenTimeEnd') and conditionParamRef.happenTimeEnd != null and conditionParamRef.happenTimeEnd!=''">
                ${_conditionType_} a.happenTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.happenTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('duration')">
                <if test="conditionParamRef.duration != null ">
                    ${_conditionType_} a.duration = #{${_conditionParam_}.duration}
                </if>
                <if test="conditionParamRef.duration == null">
                    ${_conditionType_} a.duration is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('durationList') and conditionParamRef.durationList.size() > 0">
                ${_conditionType_} a.duration in
                <foreach collection="conditionParamRef.durationList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('durationNotList') and conditionParamRef.durationNotList.size() > 0">
                ${_conditionType_} a.duration not in
                <foreach collection="conditionParamRef.durationNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('durationStart') and conditionParamRef.durationStart != null">
                ${_conditionType_} a.duration <![CDATA[ >= ]]> #{${_conditionParam_}.durationStart}
            </if>
            <if test="conditionParamRef.containsKey('durationEnd') and conditionParamRef.durationEnd != null">
                ${_conditionType_} a.duration <![CDATA[ <= ]]> #{${_conditionParam_}.durationEnd}
            </if>


            <if test="conditionParamRef.containsKey('alarmTime')">
                <if test="conditionParamRef.alarmTime != null ">
                    ${_conditionType_} a.alarmTime = #{${_conditionParam_}.alarmTime}
                </if>
                <if test="conditionParamRef.alarmTime == null">
                    ${_conditionType_} a.alarmTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('alarmTimeStart') and conditionParamRef.alarmTimeStart != null and conditionParamRef.alarmTimeStart!=''">
                ${_conditionType_} a.alarmTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.alarmTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('alarmTimeEnd') and conditionParamRef.alarmTimeEnd != null and conditionParamRef.alarmTimeEnd!=''">
                ${_conditionType_} a.alarmTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.alarmTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('snapPath')">
                <if test="conditionParamRef.snapPath != null and conditionParamRef.snapPath != ''">
                    ${_conditionType_} a.snapPath like #{${_conditionParam_}.snapPath}
                </if>
                <if test="conditionParamRef.snapPath == null">
                    ${_conditionType_} a.snapPath is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('snapPathList') and conditionParamRef.snapPathList.size() > 0">
                ${_conditionType_} a.snapPath in
                <foreach collection="conditionParamRef.snapPathList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('snapPathNotList') and conditionParamRef.snapPathNotList.size() > 0">
                ${_conditionType_} a.snapPath not in
                <foreach collection="conditionParamRef.snapPathNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('irregularOtherType')">
                <if test="conditionParamRef.irregularOtherType != null ">
                    ${_conditionType_} a.irregularOtherType = #{${_conditionParam_}.irregularOtherType}
                </if>
                <if test="conditionParamRef.irregularOtherType == null">
                    ${_conditionType_} a.irregularOtherType is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('irregularOtherTypeList') and conditionParamRef.irregularOtherTypeList.size() > 0">
                ${_conditionType_} a.irregularOtherType in
                <foreach collection="conditionParamRef.irregularOtherTypeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('irregularOtherTypeNotList') and conditionParamRef.irregularOtherTypeNotList.size() > 0">
                ${_conditionType_} a.irregularOtherType not in
                <foreach collection="conditionParamRef.irregularOtherTypeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('irregularOtherTypeStart') and conditionParamRef.irregularOtherTypeStart != null">
                ${_conditionType_} a.irregularOtherType <![CDATA[ >= ]]> #{${_conditionParam_}.irregularOtherTypeStart}
            </if>
            <if test="conditionParamRef.containsKey('irregularOtherTypeEnd') and conditionParamRef.irregularOtherTypeEnd != null">
                ${_conditionType_} a.irregularOtherType <![CDATA[ <= ]]> #{${_conditionParam_}.irregularOtherTypeEnd}
            </if>


            <if test="conditionParamRef.containsKey('performType')">
                <if test="conditionParamRef.performType != null and conditionParamRef.performType != ''">
                    ${_conditionType_} a.performType like #{${_conditionParam_}.performType}
                </if>
                <if test="conditionParamRef.performType == null">
                    ${_conditionType_} a.performType is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('performTypeList') and conditionParamRef.performTypeList.size() > 0">
                ${_conditionType_} a.performType in
                <foreach collection="conditionParamRef.performTypeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('performTypeNotList') and conditionParamRef.performTypeNotList.size() > 0">
                ${_conditionType_} a.performType not in
                <foreach collection="conditionParamRef.performTypeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
    </sql>
    <sql id="_orderCols_">
        <if test="orderColList != null and !orderColList.isEmpty()">
            order by
            <trim suffixOverrides=","  suffix="">
                <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
                     ${item.colName} ${item.sortKind}
                </foreach>
            </trim>
        </if>
        <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
            order by
            <trim suffixOverrides=","  suffix="">
                    <if test="orderCol.containsKey('id')">
                        a.id
                        <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('checkRecordId')">
                        a.checkRecordId
                        <if test='orderCol.checkRecordId != null and "DESC".equalsIgnoreCase(orderCol.checkRecordId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('staffId')">
                        a.staffId
                        <if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('staffName')">
                        a.staffName
                        <if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workNum')">
                        a.workNum
                        <if test='orderCol.workNum != null and "DESC".equalsIgnoreCase(orderCol.workNum)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('deptId')">
                        a.deptId
                        <if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('deptName')">
                        a.deptName
                        <if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('attendanceGroupId')">
                        a.attendanceGroupId
                        <if test='orderCol.attendanceGroupId != null and "DESC".equalsIgnoreCase(orderCol.attendanceGroupId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('attendanceGroupName')">
                        a.attendanceGroupName
                        <if test='orderCol.attendanceGroupName != null and "DESC".equalsIgnoreCase(orderCol.attendanceGroupName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('attendanceDate')">
                        a.attendanceDate
                        <if test='orderCol.attendanceDate != null and "DESC".equalsIgnoreCase(orderCol.attendanceDate)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('ruleId')">
                        a.ruleId
                        <if test='orderCol.ruleId != null and "DESC".equalsIgnoreCase(orderCol.ruleId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('ruleName')">
                        a.ruleName
                        <if test='orderCol.ruleName != null and "DESC".equalsIgnoreCase(orderCol.ruleName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('subMethod')">
                        a.subMethod
                        <if test='orderCol.subMethod != null and "DESC".equalsIgnoreCase(orderCol.subMethod)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('subAddType')">
                        a.subAddType
                        <if test='orderCol.subAddType != null and "DESC".equalsIgnoreCase(orderCol.subAddType)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('score')">
                        a.score
                        <if test='orderCol.score != null and "DESC".equalsIgnoreCase(orderCol.score)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('goOffTimeStr')">
                        a.goOffTimeStr
                        <if test='orderCol.goOffTimeStr != null and "DESC".equalsIgnoreCase(orderCol.goOffTimeStr)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('errorTime')">
                        a.errorTime
                        <if test='orderCol.errorTime != null and "DESC".equalsIgnoreCase(orderCol.errorTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('actualAttendTime')">
                        a.actualAttendTime
                        <if test='orderCol.actualAttendTime != null and "DESC".equalsIgnoreCase(orderCol.actualAttendTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('errorResult')">
                        a.errorResult
                        <if test='orderCol.errorResult != null and "DESC".equalsIgnoreCase(orderCol.errorResult)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('checkPerson')">
                        a.checkPerson
                        <if test='orderCol.checkPerson != null and "DESC".equalsIgnoreCase(orderCol.checkPerson)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('checkTime')">
                        a.checkTime
                        <if test='orderCol.checkTime != null and "DESC".equalsIgnoreCase(orderCol.checkTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('checkDesc')">
                        a.checkDesc
                        <if test='orderCol.checkDesc != null and "DESC".equalsIgnoreCase(orderCol.checkDesc)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('checkResult')">
                        a.checkResult
                        <if test='orderCol.checkResult != null and "DESC".equalsIgnoreCase(orderCol.checkResult)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('processStatus')">
                        a.processStatus
                        <if test='orderCol.processStatus != null and "DESC".equalsIgnoreCase(orderCol.processStatus)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('appealDesc')">
                        a.appealDesc
                        <if test='orderCol.appealDesc != null and "DESC".equalsIgnoreCase(orderCol.appealDesc)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('appealTime')">
                        a.appealTime
                        <if test='orderCol.appealTime != null and "DESC".equalsIgnoreCase(orderCol.appealTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('appealResult')">
                        a.appealResult
                        <if test='orderCol.appealResult != null and "DESC".equalsIgnoreCase(orderCol.appealResult)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('remark')">
                        a.remark
                        <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createUserId')">
                        a.createUserId
                        <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createTime')">
                        a.createTime
                        <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('updateUserId')">
                        a.updateUserId
                        <if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('updateTime')">
                        a.updateTime
                        <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('violationType')">
                        a.violationType
                        <if test='orderCol.violationType != null and "DESC".equalsIgnoreCase(orderCol.violationType)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('reviewResult')">
                        a.reviewResult
                        <if test='orderCol.reviewResult != null and "DESC".equalsIgnoreCase(orderCol.reviewResult)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('reviewTime')">
                        a.reviewTime
                        <if test='orderCol.reviewTime != null and "DESC".equalsIgnoreCase(orderCol.reviewTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('reviewSource')">
                        a.reviewSource
                        <if test='orderCol.reviewSource != null and "DESC".equalsIgnoreCase(orderCol.reviewSource)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('reviewDevice')">
                        a.reviewDevice
                        <if test='orderCol.reviewDevice != null and "DESC".equalsIgnoreCase(orderCol.reviewDevice)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainTitle')">
                        a.complainTitle
                        <if test='orderCol.complainTitle != null and "DESC".equalsIgnoreCase(orderCol.complainTitle)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainContent')">
                        a.complainContent
                        <if test='orderCol.complainContent != null and "DESC".equalsIgnoreCase(orderCol.complainContent)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainRealName')">
                        a.complainRealName
                        <if test='orderCol.complainRealName != null and "DESC".equalsIgnoreCase(orderCol.complainRealName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('contact')">
                        a.contact
                        <if test='orderCol.contact != null and "DESC".equalsIgnoreCase(orderCol.contact)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainTime')">
                        a.complainTime
                        <if test='orderCol.complainTime != null and "DESC".equalsIgnoreCase(orderCol.complainTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainSource')">
                        a.complainSource
                        <if test='orderCol.complainSource != null and "DESC".equalsIgnoreCase(orderCol.complainSource)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainDevice')">
                        a.complainDevice
                        <if test='orderCol.complainDevice != null and "DESC".equalsIgnoreCase(orderCol.complainDevice)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('goworkCode')">
                        a.goworkCode
                        <if test='orderCol.goworkCode != null and "DESC".equalsIgnoreCase(orderCol.goworkCode)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('goworkDepts')">
                        a.goworkDepts
                        <if test='orderCol.goworkDepts != null and "DESC".equalsIgnoreCase(orderCol.goworkDepts)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('matterlName')">
                        a.matterlName
                        <if test='orderCol.matterlName != null and "DESC".equalsIgnoreCase(orderCol.matterlName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('goworkTime')">
                        a.goworkTime
                        <if test='orderCol.goworkTime != null and "DESC".equalsIgnoreCase(orderCol.goworkTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('irregularType')">
                        a.irregularType
                        <if test='orderCol.irregularType != null and "DESC".equalsIgnoreCase(orderCol.irregularType)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('happenTime')">
                        a.happenTime
                        <if test='orderCol.happenTime != null and "DESC".equalsIgnoreCase(orderCol.happenTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('duration')">
                        a.duration
                        <if test='orderCol.duration != null and "DESC".equalsIgnoreCase(orderCol.duration)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('alarmTime')">
                        a.alarmTime
                        <if test='orderCol.alarmTime != null and "DESC".equalsIgnoreCase(orderCol.alarmTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('snapPath')">
                        a.snapPath
                        <if test='orderCol.snapPath != null and "DESC".equalsIgnoreCase(orderCol.snapPath)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('irregularOtherType')">
                        a.irregularOtherType
                        <if test='orderCol.irregularOtherType != null and "DESC".equalsIgnoreCase(orderCol.irregularOtherType)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('performType')">
                        a.performType
                        <if test='orderCol.performType != null and "DESC".equalsIgnoreCase(orderCol.performType)'>DESC</if>
                        ,
                    </if>
            </trim>
        </if>
    </sql>
    <sql id="_group_by_">
        <if test="groupList != null and !groupList.isEmpty()">
            GROUP BY
            <trim suffixOverrides=","  suffix="">
                <foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
                    ${item}
                </foreach>
            </trim>
        </if>
    </sql>
</mapper>