<?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.attendance.dao.ibatis.AttendanceStatDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="AttendanceStatEntity" id="AttendanceStatEntity-Map">
            <id  property="id" column="id" />
            <result property="windowCategory" column="windowCategory" />
            <result property="staffId" column="staffId" />
            <result property="staffName" column="staffName" />
            <result property="deptId" column="deptId" />
            <result property="deptName" column="deptName" />
            <result property="backToUnit" column="backToUnit" />
            <result property="onDutyLeave" column="onDutyLeave" />
            <result property="outOfOffice" column="outOfOffice" />
            <result property="shiftCompensation" column="shiftCompensation" />
            <result property="physicalExamination" column="physicalExamination" />
            <result property="quarantine" column="quarantine" />
            <result property="businessTrip" column="businessTrip" />
            <result property="publicHoliday" column="publicHoliday" />
            <result property="sickLeave" column="sickLeave" />
            <result property="funeralLeave" column="funeralLeave" />
            <result property="marriageLeave" column="marriageLeave" />
            <result property="childRearingLeave" column="childRearingLeave" />
            <result property="maternityLeave" column="maternityLeave" />
            <result property="transferBack" column="transferBack" />
            <result property="homeLeave" column="homeLeave" />
            <result property="personalLeave" column="personalLeave" />
            <result property="absenteeismDays" column="absenteeismDays" />
            <result property="otherDays" column="otherDays" />
            <result property="attendanceRate" column="attendanceRate" />
            <result property="nonCompliancePunch" column="nonCompliancePunch" />
            <result property="lateTimes" column="lateTimes" />
            <result property="surfingMobileTimes" column="surfingMobileTimes" />
            <result property="overtimeTimes" column="overtimeTimes" />
            <result property="vacancy" column="vacancy" />
            <result property="nonStandardDressTimes" column="nonStandardDressTimes" />
            <result property="unexcusedMeetingAbsence" column="unexcusedMeetingAbsence" />
            <result property="earlyLeaveMeeting" column="earlyLeaveMeeting" />
            <result property="year" column="year" />
            <result property="month" column="month" />
            <result property="day" column="day" />
            <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" />
            
    </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('windowCategory') or colPickMode == 1 and data.containsKey('windowCategory')))">
                    a.windowCategory,
                </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('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('backToUnit') or colPickMode == 1 and data.containsKey('backToUnit')))">
                    a.backToUnit,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('onDutyLeave') or colPickMode == 1 and data.containsKey('onDutyLeave')))">
                    a.onDutyLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('outOfOffice') or colPickMode == 1 and data.containsKey('outOfOffice')))">
                    a.outOfOffice,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('shiftCompensation') or colPickMode == 1 and data.containsKey('shiftCompensation')))">
                    a.shiftCompensation,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('physicalExamination') or colPickMode == 1 and data.containsKey('physicalExamination')))">
                    a.physicalExamination,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('quarantine') or colPickMode == 1 and data.containsKey('quarantine')))">
                    a.quarantine,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('businessTrip') or colPickMode == 1 and data.containsKey('businessTrip')))">
                    a.businessTrip,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('publicHoliday') or colPickMode == 1 and data.containsKey('publicHoliday')))">
                    a.publicHoliday,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sickLeave') or colPickMode == 1 and data.containsKey('sickLeave')))">
                    a.sickLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('funeralLeave') or colPickMode == 1 and data.containsKey('funeralLeave')))">
                    a.funeralLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('marriageLeave') or colPickMode == 1 and data.containsKey('marriageLeave')))">
                    a.marriageLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('childRearingLeave') or colPickMode == 1 and data.containsKey('childRearingLeave')))">
                    a.childRearingLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('maternityLeave') or colPickMode == 1 and data.containsKey('maternityLeave')))">
                    a.maternityLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('transferBack') or colPickMode == 1 and data.containsKey('transferBack')))">
                    a.transferBack,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('homeLeave') or colPickMode == 1 and data.containsKey('homeLeave')))">
                    a.homeLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('personalLeave') or colPickMode == 1 and data.containsKey('personalLeave')))">
                    a.personalLeave,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('absenteeismDays') or colPickMode == 1 and data.containsKey('absenteeismDays')))">
                    a.absenteeismDays,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('otherDays') or colPickMode == 1 and data.containsKey('otherDays')))">
                    a.otherDays,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendanceRate') or colPickMode == 1 and data.containsKey('attendanceRate')))">
                    a.attendanceRate,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('nonCompliancePunch') or colPickMode == 1 and data.containsKey('nonCompliancePunch')))">
                    a.nonCompliancePunch,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lateTimes') or colPickMode == 1 and data.containsKey('lateTimes')))">
                    a.lateTimes,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('surfingMobileTimes') or colPickMode == 1 and data.containsKey('surfingMobileTimes')))">
                    a.surfingMobileTimes,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('overtimeTimes') or colPickMode == 1 and data.containsKey('overtimeTimes')))">
                    a.overtimeTimes,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('vacancy') or colPickMode == 1 and data.containsKey('vacancy')))">
                    a.vacancy,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('nonStandardDressTimes') or colPickMode == 1 and data.containsKey('nonStandardDressTimes')))">
                    a.nonStandardDressTimes,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('unexcusedMeetingAbsence') or colPickMode == 1 and data.containsKey('unexcusedMeetingAbsence')))">
                    a.unexcusedMeetingAbsence,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('earlyLeaveMeeting') or colPickMode == 1 and data.containsKey('earlyLeaveMeeting')))">
                    a.earlyLeaveMeeting,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('year') or colPickMode == 1 and data.containsKey('year')))">
                    a.year,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('month') or colPickMode == 1 and data.containsKey('month')))">
                    a.month,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('day') or colPickMode == 1 and data.containsKey('day')))">
                    a.day,
                </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>
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="AttendanceStatEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_attendance_stat
        (windowCategory,staffId,staffName,deptId,deptName,backToUnit,onDutyLeave,outOfOffice,shiftCompensation,physicalExamination,quarantine,businessTrip,publicHoliday,sickLeave,funeralLeave,marriageLeave,childRearingLeave,maternityLeave,transferBack,homeLeave,personalLeave,absenteeismDays,otherDays,attendanceRate,nonCompliancePunch,lateTimes,surfingMobileTimes,overtimeTimes,vacancy,nonStandardDressTimes,unexcusedMeetingAbsence,earlyLeaveMeeting,year,month,day,remark,createUserId,createTime,updateUserId,updateTime)
        VALUES
        (#{windowCategory},#{staffId},#{staffName},#{deptId},#{deptName},#{backToUnit},#{onDutyLeave},#{outOfOffice},#{shiftCompensation},#{physicalExamination},#{quarantine},#{businessTrip},#{publicHoliday},#{sickLeave},#{funeralLeave},#{marriageLeave},#{childRearingLeave},#{maternityLeave},#{transferBack},#{homeLeave},#{personalLeave},#{absenteeismDays},#{otherDays},#{attendanceRate},#{nonCompliancePunch},#{lateTimes},#{surfingMobileTimes},#{overtimeTimes},#{vacancy},#{nonStandardDressTimes},#{unexcusedMeetingAbsence},#{earlyLeaveMeeting},#{year},#{month},#{day},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_attendance_stat
        (windowCategory,staffId,staffName,deptId,deptName,backToUnit,onDutyLeave,outOfOffice,shiftCompensation,physicalExamination,quarantine,businessTrip,publicHoliday,sickLeave,funeralLeave,marriageLeave,childRearingLeave,maternityLeave,transferBack,homeLeave,personalLeave,absenteeismDays,otherDays,attendanceRate,nonCompliancePunch,lateTimes,surfingMobileTimes,overtimeTimes,vacancy,nonStandardDressTimes,unexcusedMeetingAbsence,earlyLeaveMeeting,year,month,day,remark,createUserId,createTime,updateUserId,updateTime)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.windowCategory},#{item.staffId},#{item.staffName},#{item.deptId},#{item.deptName},#{item.backToUnit},#{item.onDutyLeave},#{item.outOfOffice},#{item.shiftCompensation},#{item.physicalExamination},#{item.quarantine},#{item.businessTrip},#{item.publicHoliday},#{item.sickLeave},#{item.funeralLeave},#{item.marriageLeave},#{item.childRearingLeave},#{item.maternityLeave},#{item.transferBack},#{item.homeLeave},#{item.personalLeave},#{item.absenteeismDays},#{item.otherDays},#{item.attendanceRate},#{item.nonCompliancePunch},#{item.lateTimes},#{item.surfingMobileTimes},#{item.overtimeTimes},#{item.vacancy},#{item.nonStandardDressTimes},#{item.unexcusedMeetingAbsence},#{item.earlyLeaveMeeting},#{item.year},#{item.month},#{item.day},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_attendance_stat as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('windowCategory')) or (colPickMode==1 and !data.containsKey('windowCategory'))">
                a.windowCategory=#{data.windowCategory},
            </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('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('backToUnit')) or (colPickMode==1 and !data.containsKey('backToUnit'))">
                a.backToUnit=#{data.backToUnit},
            </if>
            <if test="(colPickMode==0 and data.containsKey('backToUnitIncrement')) or (colPickMode==1 and !data.containsKey('backToUnitIncrement'))">
                a.backToUnit=ifnull(a.backToUnit,0) + #{data.backToUnitIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('onDutyLeave')) or (colPickMode==1 and !data.containsKey('onDutyLeave'))">
                a.onDutyLeave=#{data.onDutyLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('onDutyLeaveIncrement')) or (colPickMode==1 and !data.containsKey('onDutyLeaveIncrement'))">
                a.onDutyLeave=ifnull(a.onDutyLeave,0) + #{data.onDutyLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('outOfOffice')) or (colPickMode==1 and !data.containsKey('outOfOffice'))">
                a.outOfOffice=#{data.outOfOffice},
            </if>
            <if test="(colPickMode==0 and data.containsKey('outOfOfficeIncrement')) or (colPickMode==1 and !data.containsKey('outOfOfficeIncrement'))">
                a.outOfOffice=ifnull(a.outOfOffice,0) + #{data.outOfOfficeIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('shiftCompensation')) or (colPickMode==1 and !data.containsKey('shiftCompensation'))">
                a.shiftCompensation=#{data.shiftCompensation},
            </if>
            <if test="(colPickMode==0 and data.containsKey('shiftCompensationIncrement')) or (colPickMode==1 and !data.containsKey('shiftCompensationIncrement'))">
                a.shiftCompensation=ifnull(a.shiftCompensation,0) + #{data.shiftCompensationIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('physicalExamination')) or (colPickMode==1 and !data.containsKey('physicalExamination'))">
                a.physicalExamination=#{data.physicalExamination},
            </if>
            <if test="(colPickMode==0 and data.containsKey('physicalExaminationIncrement')) or (colPickMode==1 and !data.containsKey('physicalExaminationIncrement'))">
                a.physicalExamination=ifnull(a.physicalExamination,0) + #{data.physicalExaminationIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('quarantine')) or (colPickMode==1 and !data.containsKey('quarantine'))">
                a.quarantine=#{data.quarantine},
            </if>
            <if test="(colPickMode==0 and data.containsKey('quarantineIncrement')) or (colPickMode==1 and !data.containsKey('quarantineIncrement'))">
                a.quarantine=ifnull(a.quarantine,0) + #{data.quarantineIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('businessTrip')) or (colPickMode==1 and !data.containsKey('businessTrip'))">
                a.businessTrip=#{data.businessTrip},
            </if>
            <if test="(colPickMode==0 and data.containsKey('businessTripIncrement')) or (colPickMode==1 and !data.containsKey('businessTripIncrement'))">
                a.businessTrip=ifnull(a.businessTrip,0) + #{data.businessTripIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('publicHoliday')) or (colPickMode==1 and !data.containsKey('publicHoliday'))">
                a.publicHoliday=#{data.publicHoliday},
            </if>
            <if test="(colPickMode==0 and data.containsKey('publicHolidayIncrement')) or (colPickMode==1 and !data.containsKey('publicHolidayIncrement'))">
                a.publicHoliday=ifnull(a.publicHoliday,0) + #{data.publicHolidayIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sickLeave')) or (colPickMode==1 and !data.containsKey('sickLeave'))">
                a.sickLeave=#{data.sickLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sickLeaveIncrement')) or (colPickMode==1 and !data.containsKey('sickLeaveIncrement'))">
                a.sickLeave=ifnull(a.sickLeave,0) + #{data.sickLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('funeralLeave')) or (colPickMode==1 and !data.containsKey('funeralLeave'))">
                a.funeralLeave=#{data.funeralLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('funeralLeaveIncrement')) or (colPickMode==1 and !data.containsKey('funeralLeaveIncrement'))">
                a.funeralLeave=ifnull(a.funeralLeave,0) + #{data.funeralLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('marriageLeave')) or (colPickMode==1 and !data.containsKey('marriageLeave'))">
                a.marriageLeave=#{data.marriageLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('marriageLeaveIncrement')) or (colPickMode==1 and !data.containsKey('marriageLeaveIncrement'))">
                a.marriageLeave=ifnull(a.marriageLeave,0) + #{data.marriageLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('childRearingLeave')) or (colPickMode==1 and !data.containsKey('childRearingLeave'))">
                a.childRearingLeave=#{data.childRearingLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('childRearingLeaveIncrement')) or (colPickMode==1 and !data.containsKey('childRearingLeaveIncrement'))">
                a.childRearingLeave=ifnull(a.childRearingLeave,0) + #{data.childRearingLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('maternityLeave')) or (colPickMode==1 and !data.containsKey('maternityLeave'))">
                a.maternityLeave=#{data.maternityLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('maternityLeaveIncrement')) or (colPickMode==1 and !data.containsKey('maternityLeaveIncrement'))">
                a.maternityLeave=ifnull(a.maternityLeave,0) + #{data.maternityLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('transferBack')) or (colPickMode==1 and !data.containsKey('transferBack'))">
                a.transferBack=#{data.transferBack},
            </if>
            <if test="(colPickMode==0 and data.containsKey('transferBackIncrement')) or (colPickMode==1 and !data.containsKey('transferBackIncrement'))">
                a.transferBack=ifnull(a.transferBack,0) + #{data.transferBackIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('homeLeave')) or (colPickMode==1 and !data.containsKey('homeLeave'))">
                a.homeLeave=#{data.homeLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('homeLeaveIncrement')) or (colPickMode==1 and !data.containsKey('homeLeaveIncrement'))">
                a.homeLeave=ifnull(a.homeLeave,0) + #{data.homeLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('personalLeave')) or (colPickMode==1 and !data.containsKey('personalLeave'))">
                a.personalLeave=#{data.personalLeave},
            </if>
            <if test="(colPickMode==0 and data.containsKey('personalLeaveIncrement')) or (colPickMode==1 and !data.containsKey('personalLeaveIncrement'))">
                a.personalLeave=ifnull(a.personalLeave,0) + #{data.personalLeaveIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('absenteeismDays')) or (colPickMode==1 and !data.containsKey('absenteeismDays'))">
                a.absenteeismDays=#{data.absenteeismDays},
            </if>
            <if test="(colPickMode==0 and data.containsKey('absenteeismDaysIncrement')) or (colPickMode==1 and !data.containsKey('absenteeismDaysIncrement'))">
                a.absenteeismDays=ifnull(a.absenteeismDays,0) + #{data.absenteeismDaysIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherDays')) or (colPickMode==1 and !data.containsKey('otherDays'))">
                a.otherDays=#{data.otherDays},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherDaysIncrement')) or (colPickMode==1 and !data.containsKey('otherDaysIncrement'))">
                a.otherDays=ifnull(a.otherDays,0) + #{data.otherDaysIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendanceRate')) or (colPickMode==1 and !data.containsKey('attendanceRate'))">
                a.attendanceRate=#{data.attendanceRate},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendanceRateIncrement')) or (colPickMode==1 and !data.containsKey('attendanceRateIncrement'))">
                a.attendanceRate=ifnull(a.attendanceRate,0) + #{data.attendanceRateIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('nonCompliancePunch')) or (colPickMode==1 and !data.containsKey('nonCompliancePunch'))">
                a.nonCompliancePunch=#{data.nonCompliancePunch},
            </if>
            <if test="(colPickMode==0 and data.containsKey('nonCompliancePunchIncrement')) or (colPickMode==1 and !data.containsKey('nonCompliancePunchIncrement'))">
                a.nonCompliancePunch=ifnull(a.nonCompliancePunch,0) + #{data.nonCompliancePunchIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('lateTimes')) or (colPickMode==1 and !data.containsKey('lateTimes'))">
                a.lateTimes=#{data.lateTimes},
            </if>
            <if test="(colPickMode==0 and data.containsKey('lateTimesIncrement')) or (colPickMode==1 and !data.containsKey('lateTimesIncrement'))">
                a.lateTimes=ifnull(a.lateTimes,0) + #{data.lateTimesIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('surfingMobileTimes')) or (colPickMode==1 and !data.containsKey('surfingMobileTimes'))">
                a.surfingMobileTimes=#{data.surfingMobileTimes},
            </if>
            <if test="(colPickMode==0 and data.containsKey('surfingMobileTimesIncrement')) or (colPickMode==1 and !data.containsKey('surfingMobileTimesIncrement'))">
                a.surfingMobileTimes=ifnull(a.surfingMobileTimes,0) + #{data.surfingMobileTimesIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('overtimeTimes')) or (colPickMode==1 and !data.containsKey('overtimeTimes'))">
                a.overtimeTimes=#{data.overtimeTimes},
            </if>
            <if test="(colPickMode==0 and data.containsKey('overtimeTimesIncrement')) or (colPickMode==1 and !data.containsKey('overtimeTimesIncrement'))">
                a.overtimeTimes=ifnull(a.overtimeTimes,0) + #{data.overtimeTimesIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('vacancy')) or (colPickMode==1 and !data.containsKey('vacancy'))">
                a.vacancy=#{data.vacancy},
            </if>
            <if test="(colPickMode==0 and data.containsKey('vacancyIncrement')) or (colPickMode==1 and !data.containsKey('vacancyIncrement'))">
                a.vacancy=ifnull(a.vacancy,0) + #{data.vacancyIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('nonStandardDressTimes')) or (colPickMode==1 and !data.containsKey('nonStandardDressTimes'))">
                a.nonStandardDressTimes=#{data.nonStandardDressTimes},
            </if>
            <if test="(colPickMode==0 and data.containsKey('nonStandardDressTimesIncrement')) or (colPickMode==1 and !data.containsKey('nonStandardDressTimesIncrement'))">
                a.nonStandardDressTimes=ifnull(a.nonStandardDressTimes,0) + #{data.nonStandardDressTimesIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('unexcusedMeetingAbsence')) or (colPickMode==1 and !data.containsKey('unexcusedMeetingAbsence'))">
                a.unexcusedMeetingAbsence=#{data.unexcusedMeetingAbsence},
            </if>
            <if test="(colPickMode==0 and data.containsKey('unexcusedMeetingAbsenceIncrement')) or (colPickMode==1 and !data.containsKey('unexcusedMeetingAbsenceIncrement'))">
                a.unexcusedMeetingAbsence=ifnull(a.unexcusedMeetingAbsence,0) + #{data.unexcusedMeetingAbsenceIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('earlyLeaveMeeting')) or (colPickMode==1 and !data.containsKey('earlyLeaveMeeting'))">
                a.earlyLeaveMeeting=#{data.earlyLeaveMeeting},
            </if>
            <if test="(colPickMode==0 and data.containsKey('earlyLeaveMeetingIncrement')) or (colPickMode==1 and !data.containsKey('earlyLeaveMeetingIncrement'))">
                a.earlyLeaveMeeting=ifnull(a.earlyLeaveMeeting,0) + #{data.earlyLeaveMeetingIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('year')) or (colPickMode==1 and !data.containsKey('year'))">
                a.year=#{data.year},
            </if>
            <if test="(colPickMode==0 and data.containsKey('yearIncrement')) or (colPickMode==1 and !data.containsKey('yearIncrement'))">
                a.year=ifnull(a.year,0) + #{data.yearIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('month')) or (colPickMode==1 and !data.containsKey('month'))">
                a.month=#{data.month},
            </if>
            <if test="(colPickMode==0 and data.containsKey('monthIncrement')) or (colPickMode==1 and !data.containsKey('monthIncrement'))">
                a.month=ifnull(a.month,0) + #{data.monthIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('day')) or (colPickMode==1 and !data.containsKey('day'))">
                a.day=#{data.day},
            </if>
            <if test="(colPickMode==0 and data.containsKey('dayIncrement')) or (colPickMode==1 and !data.containsKey('dayIncrement'))">
                a.day=ifnull(a.day,0) + #{data.dayIncrement},
            </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>
        </trim>
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </update>
    <!-- 批量更新 -->
    <update id="updateBatch" parameterType="paramDto">
        update mortals_xhx_attendance_stat as a
        <trim prefix="set" suffixOverrides=",">
                <trim prefix="windowCategory=(case" suffix="ELSE windowCategory end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('windowCategory')) or (colPickMode==1 and !item.containsKey('windowCategory'))">
                            when a.id=#{item.id} then #{item.windowCategory}
                        </if>
                    </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="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="backToUnit=(case" suffix="ELSE backToUnit end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('backToUnit')) or (colPickMode==1 and !item.containsKey('backToUnit'))">
                                        when a.id=#{item.id} then #{item.backToUnit}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('backToUnitIncrement')) or (colPickMode==1 and !item.containsKey('backToUnitIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.backToUnit,0) + #{item.backToUnitIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="onDutyLeave=(case" suffix="ELSE onDutyLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('onDutyLeave')) or (colPickMode==1 and !item.containsKey('onDutyLeave'))">
                                        when a.id=#{item.id} then #{item.onDutyLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('onDutyLeaveIncrement')) or (colPickMode==1 and !item.containsKey('onDutyLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.onDutyLeave,0) + #{item.onDutyLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="outOfOffice=(case" suffix="ELSE outOfOffice end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('outOfOffice')) or (colPickMode==1 and !item.containsKey('outOfOffice'))">
                                        when a.id=#{item.id} then #{item.outOfOffice}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('outOfOfficeIncrement')) or (colPickMode==1 and !item.containsKey('outOfOfficeIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.outOfOffice,0) + #{item.outOfOfficeIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="shiftCompensation=(case" suffix="ELSE shiftCompensation end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('shiftCompensation')) or (colPickMode==1 and !item.containsKey('shiftCompensation'))">
                                        when a.id=#{item.id} then #{item.shiftCompensation}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('shiftCompensationIncrement')) or (colPickMode==1 and !item.containsKey('shiftCompensationIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.shiftCompensation,0) + #{item.shiftCompensationIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="physicalExamination=(case" suffix="ELSE physicalExamination end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('physicalExamination')) or (colPickMode==1 and !item.containsKey('physicalExamination'))">
                                        when a.id=#{item.id} then #{item.physicalExamination}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('physicalExaminationIncrement')) or (colPickMode==1 and !item.containsKey('physicalExaminationIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.physicalExamination,0) + #{item.physicalExaminationIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="quarantine=(case" suffix="ELSE quarantine end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('quarantine')) or (colPickMode==1 and !item.containsKey('quarantine'))">
                                        when a.id=#{item.id} then #{item.quarantine}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('quarantineIncrement')) or (colPickMode==1 and !item.containsKey('quarantineIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.quarantine,0) + #{item.quarantineIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="businessTrip=(case" suffix="ELSE businessTrip end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('businessTrip')) or (colPickMode==1 and !item.containsKey('businessTrip'))">
                                        when a.id=#{item.id} then #{item.businessTrip}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('businessTripIncrement')) or (colPickMode==1 and !item.containsKey('businessTripIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.businessTrip,0) + #{item.businessTripIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="publicHoliday=(case" suffix="ELSE publicHoliday end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('publicHoliday')) or (colPickMode==1 and !item.containsKey('publicHoliday'))">
                                        when a.id=#{item.id} then #{item.publicHoliday}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('publicHolidayIncrement')) or (colPickMode==1 and !item.containsKey('publicHolidayIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.publicHoliday,0) + #{item.publicHolidayIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="sickLeave=(case" suffix="ELSE sickLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('sickLeave')) or (colPickMode==1 and !item.containsKey('sickLeave'))">
                                        when a.id=#{item.id} then #{item.sickLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('sickLeaveIncrement')) or (colPickMode==1 and !item.containsKey('sickLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.sickLeave,0) + #{item.sickLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="funeralLeave=(case" suffix="ELSE funeralLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('funeralLeave')) or (colPickMode==1 and !item.containsKey('funeralLeave'))">
                                        when a.id=#{item.id} then #{item.funeralLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('funeralLeaveIncrement')) or (colPickMode==1 and !item.containsKey('funeralLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.funeralLeave,0) + #{item.funeralLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="marriageLeave=(case" suffix="ELSE marriageLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('marriageLeave')) or (colPickMode==1 and !item.containsKey('marriageLeave'))">
                                        when a.id=#{item.id} then #{item.marriageLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('marriageLeaveIncrement')) or (colPickMode==1 and !item.containsKey('marriageLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.marriageLeave,0) + #{item.marriageLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="childRearingLeave=(case" suffix="ELSE childRearingLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('childRearingLeave')) or (colPickMode==1 and !item.containsKey('childRearingLeave'))">
                                        when a.id=#{item.id} then #{item.childRearingLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('childRearingLeaveIncrement')) or (colPickMode==1 and !item.containsKey('childRearingLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.childRearingLeave,0) + #{item.childRearingLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="maternityLeave=(case" suffix="ELSE maternityLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('maternityLeave')) or (colPickMode==1 and !item.containsKey('maternityLeave'))">
                                        when a.id=#{item.id} then #{item.maternityLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('maternityLeaveIncrement')) or (colPickMode==1 and !item.containsKey('maternityLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.maternityLeave,0) + #{item.maternityLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="transferBack=(case" suffix="ELSE transferBack end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('transferBack')) or (colPickMode==1 and !item.containsKey('transferBack'))">
                                        when a.id=#{item.id} then #{item.transferBack}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('transferBackIncrement')) or (colPickMode==1 and !item.containsKey('transferBackIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.transferBack,0) + #{item.transferBackIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="homeLeave=(case" suffix="ELSE homeLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('homeLeave')) or (colPickMode==1 and !item.containsKey('homeLeave'))">
                                        when a.id=#{item.id} then #{item.homeLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('homeLeaveIncrement')) or (colPickMode==1 and !item.containsKey('homeLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.homeLeave,0) + #{item.homeLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="personalLeave=(case" suffix="ELSE personalLeave end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('personalLeave')) or (colPickMode==1 and !item.containsKey('personalLeave'))">
                                        when a.id=#{item.id} then #{item.personalLeave}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('personalLeaveIncrement')) or (colPickMode==1 and !item.containsKey('personalLeaveIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.personalLeave,0) + #{item.personalLeaveIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="absenteeismDays=(case" suffix="ELSE absenteeismDays end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('absenteeismDays')) or (colPickMode==1 and !item.containsKey('absenteeismDays'))">
                                        when a.id=#{item.id} then #{item.absenteeismDays}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('absenteeismDaysIncrement')) or (colPickMode==1 and !item.containsKey('absenteeismDaysIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.absenteeismDays,0) + #{item.absenteeismDaysIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="otherDays=(case" suffix="ELSE otherDays end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('otherDays')) or (colPickMode==1 and !item.containsKey('otherDays'))">
                                        when a.id=#{item.id} then #{item.otherDays}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('otherDaysIncrement')) or (colPickMode==1 and !item.containsKey('otherDaysIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.otherDays,0) + #{item.otherDaysIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="attendanceRate=(case" suffix="ELSE attendanceRate end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('attendanceRate')) or (colPickMode==1 and !item.containsKey('attendanceRate'))">
                                        when a.id=#{item.id} then #{item.attendanceRate}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('attendanceRateIncrement')) or (colPickMode==1 and !item.containsKey('attendanceRateIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.attendanceRate,0) + #{item.attendanceRateIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="nonCompliancePunch=(case" suffix="ELSE nonCompliancePunch end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('nonCompliancePunch')) or (colPickMode==1 and !item.containsKey('nonCompliancePunch'))">
                                        when a.id=#{item.id} then #{item.nonCompliancePunch}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('nonCompliancePunchIncrement')) or (colPickMode==1 and !item.containsKey('nonCompliancePunchIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.nonCompliancePunch,0) + #{item.nonCompliancePunchIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="lateTimes=(case" suffix="ELSE lateTimes end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('lateTimes')) or (colPickMode==1 and !item.containsKey('lateTimes'))">
                                        when a.id=#{item.id} then #{item.lateTimes}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('lateTimesIncrement')) or (colPickMode==1 and !item.containsKey('lateTimesIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.lateTimes,0) + #{item.lateTimesIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="surfingMobileTimes=(case" suffix="ELSE surfingMobileTimes end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('surfingMobileTimes')) or (colPickMode==1 and !item.containsKey('surfingMobileTimes'))">
                                        when a.id=#{item.id} then #{item.surfingMobileTimes}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('surfingMobileTimesIncrement')) or (colPickMode==1 and !item.containsKey('surfingMobileTimesIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.surfingMobileTimes,0) + #{item.surfingMobileTimesIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="overtimeTimes=(case" suffix="ELSE overtimeTimes end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('overtimeTimes')) or (colPickMode==1 and !item.containsKey('overtimeTimes'))">
                                        when a.id=#{item.id} then #{item.overtimeTimes}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('overtimeTimesIncrement')) or (colPickMode==1 and !item.containsKey('overtimeTimesIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.overtimeTimes,0) + #{item.overtimeTimesIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="vacancy=(case" suffix="ELSE vacancy end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('vacancy')) or (colPickMode==1 and !item.containsKey('vacancy'))">
                                        when a.id=#{item.id} then #{item.vacancy}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('vacancyIncrement')) or (colPickMode==1 and !item.containsKey('vacancyIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.vacancy,0) + #{item.vacancyIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="nonStandardDressTimes=(case" suffix="ELSE nonStandardDressTimes end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('nonStandardDressTimes')) or (colPickMode==1 and !item.containsKey('nonStandardDressTimes'))">
                                        when a.id=#{item.id} then #{item.nonStandardDressTimes}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('nonStandardDressTimesIncrement')) or (colPickMode==1 and !item.containsKey('nonStandardDressTimesIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.nonStandardDressTimes,0) + #{item.nonStandardDressTimesIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="unexcusedMeetingAbsence=(case" suffix="ELSE unexcusedMeetingAbsence end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('unexcusedMeetingAbsence')) or (colPickMode==1 and !item.containsKey('unexcusedMeetingAbsence'))">
                                        when a.id=#{item.id} then #{item.unexcusedMeetingAbsence}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('unexcusedMeetingAbsenceIncrement')) or (colPickMode==1 and !item.containsKey('unexcusedMeetingAbsenceIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.unexcusedMeetingAbsence,0) + #{item.unexcusedMeetingAbsenceIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="earlyLeaveMeeting=(case" suffix="ELSE earlyLeaveMeeting end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('earlyLeaveMeeting')) or (colPickMode==1 and !item.containsKey('earlyLeaveMeeting'))">
                                        when a.id=#{item.id} then #{item.earlyLeaveMeeting}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('earlyLeaveMeetingIncrement')) or (colPickMode==1 and !item.containsKey('earlyLeaveMeetingIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.earlyLeaveMeeting,0) + #{item.earlyLeaveMeetingIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="year=(case" suffix="ELSE year end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('year')) or (colPickMode==1 and !item.containsKey('year'))">
                                        when a.id=#{item.id} then #{item.year}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('yearIncrement')) or (colPickMode==1 and !item.containsKey('yearIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.year,0) + #{item.yearIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="month=(case" suffix="ELSE month end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('month')) or (colPickMode==1 and !item.containsKey('month'))">
                                        when a.id=#{item.id} then #{item.month}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('monthIncrement')) or (colPickMode==1 and !item.containsKey('monthIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.month,0) + #{item.monthIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="day=(case" suffix="ELSE day end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('day')) or (colPickMode==1 and !item.containsKey('day'))">
                                        when a.id=#{item.id} then #{item.day}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('dayIncrement')) or (colPickMode==1 and !item.containsKey('dayIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.day,0) + #{item.dayIncrement}
                                    </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>
        where id in
        <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </update>
    <!-- 根据主健查询 -->
    <select id="getByKey" parameterType="paramDto" resultMap="AttendanceStatEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_attendance_stat as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_attendance_stat as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_attendance_stat where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_attendance_stat where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <!-- 根据对象列表删除一批，针对单一主健有效 -->
    <delete id="deleteByEntityList">
        delete from mortals_xhx_attendance_stat 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_attendance_stat as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="AttendanceStatEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_attendance_stat as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
        <include refid="_orderCols_"/>
    </select>



    <!-- 获取 -->
    <select id="getListCount" parameterType="paramDto" resultType="int">
        select count(1)
        from mortals_xhx_attendance_stat 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')">
                ${_conditionType_} a.id in
                <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('idNotList')">
                ${_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('windowCategory')">
                <if test="conditionParamRef.windowCategory != null and conditionParamRef.windowCategory != ''">
                    ${_conditionType_} a.windowCategory like #{${_conditionParam_}.windowCategory}
                </if>
                <if test="conditionParamRef.windowCategory == null">
                    ${_conditionType_} a.windowCategory is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('windowCategoryList')">
                ${_conditionType_} a.windowCategory in
                <foreach collection="conditionParamRef.windowCategoryList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('windowCategoryNotList')">
                ${_conditionType_} a.windowCategory not in
                <foreach collection="conditionParamRef.windowCategoryNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </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')">
                ${_conditionType_} a.staffId in
                <foreach collection="conditionParamRef.staffIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('staffIdNotList')">
                ${_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')">
                ${_conditionType_} a.staffName in
                <foreach collection="conditionParamRef.staffNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('staffNameNotList')">
                ${_conditionType_} a.staffName not in
                <foreach collection="conditionParamRef.staffNameNotList" 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')">
                ${_conditionType_} a.deptId in
                <foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('deptIdNotList')">
                ${_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')">
                ${_conditionType_} a.deptName in
                <foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('deptNameNotList')">
                ${_conditionType_} a.deptName not in
                <foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('backToUnit')">
                <if test="conditionParamRef.backToUnit != null ">
                    ${_conditionType_} a.backToUnit = #{${_conditionParam_}.backToUnit}
                </if>
                <if test="conditionParamRef.backToUnit == null">
                    ${_conditionType_} a.backToUnit is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('backToUnitList')">
                ${_conditionType_} a.backToUnit in
                <foreach collection="conditionParamRef.backToUnitList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('backToUnitNotList')">
                ${_conditionType_} a.backToUnit not in
                <foreach collection="conditionParamRef.backToUnitNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('backToUnitStart') and conditionParamRef.backToUnitStart != null">
                ${_conditionType_} a.backToUnit <![CDATA[ >= ]]> #{${_conditionParam_}.backToUnitStart}
            </if>
            <if test="conditionParamRef.containsKey('backToUnitEnd') and conditionParamRef.backToUnitEnd != null">
                ${_conditionType_} a.backToUnit <![CDATA[ <= ]]> #{${_conditionParam_}.backToUnitEnd}
            </if>

            <if test="conditionParamRef.containsKey('onDutyLeave')">
                <if test="conditionParamRef.onDutyLeave != null ">
                    ${_conditionType_} a.onDutyLeave = #{${_conditionParam_}.onDutyLeave}
                </if>
                <if test="conditionParamRef.onDutyLeave == null">
                    ${_conditionType_} a.onDutyLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('onDutyLeaveList')">
                ${_conditionType_} a.onDutyLeave in
                <foreach collection="conditionParamRef.onDutyLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('onDutyLeaveNotList')">
                ${_conditionType_} a.onDutyLeave not in
                <foreach collection="conditionParamRef.onDutyLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('onDutyLeaveStart') and conditionParamRef.onDutyLeaveStart != null">
                ${_conditionType_} a.onDutyLeave <![CDATA[ >= ]]> #{${_conditionParam_}.onDutyLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('onDutyLeaveEnd') and conditionParamRef.onDutyLeaveEnd != null">
                ${_conditionType_} a.onDutyLeave <![CDATA[ <= ]]> #{${_conditionParam_}.onDutyLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('outOfOffice')">
                <if test="conditionParamRef.outOfOffice != null ">
                    ${_conditionType_} a.outOfOffice = #{${_conditionParam_}.outOfOffice}
                </if>
                <if test="conditionParamRef.outOfOffice == null">
                    ${_conditionType_} a.outOfOffice is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('outOfOfficeList')">
                ${_conditionType_} a.outOfOffice in
                <foreach collection="conditionParamRef.outOfOfficeList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('outOfOfficeNotList')">
                ${_conditionType_} a.outOfOffice not in
                <foreach collection="conditionParamRef.outOfOfficeNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('outOfOfficeStart') and conditionParamRef.outOfOfficeStart != null">
                ${_conditionType_} a.outOfOffice <![CDATA[ >= ]]> #{${_conditionParam_}.outOfOfficeStart}
            </if>
            <if test="conditionParamRef.containsKey('outOfOfficeEnd') and conditionParamRef.outOfOfficeEnd != null">
                ${_conditionType_} a.outOfOffice <![CDATA[ <= ]]> #{${_conditionParam_}.outOfOfficeEnd}
            </if>

            <if test="conditionParamRef.containsKey('shiftCompensation')">
                <if test="conditionParamRef.shiftCompensation != null ">
                    ${_conditionType_} a.shiftCompensation = #{${_conditionParam_}.shiftCompensation}
                </if>
                <if test="conditionParamRef.shiftCompensation == null">
                    ${_conditionType_} a.shiftCompensation is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('shiftCompensationList')">
                ${_conditionType_} a.shiftCompensation in
                <foreach collection="conditionParamRef.shiftCompensationList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('shiftCompensationNotList')">
                ${_conditionType_} a.shiftCompensation not in
                <foreach collection="conditionParamRef.shiftCompensationNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('shiftCompensationStart') and conditionParamRef.shiftCompensationStart != null">
                ${_conditionType_} a.shiftCompensation <![CDATA[ >= ]]> #{${_conditionParam_}.shiftCompensationStart}
            </if>
            <if test="conditionParamRef.containsKey('shiftCompensationEnd') and conditionParamRef.shiftCompensationEnd != null">
                ${_conditionType_} a.shiftCompensation <![CDATA[ <= ]]> #{${_conditionParam_}.shiftCompensationEnd}
            </if>

            <if test="conditionParamRef.containsKey('physicalExamination')">
                <if test="conditionParamRef.physicalExamination != null ">
                    ${_conditionType_} a.physicalExamination = #{${_conditionParam_}.physicalExamination}
                </if>
                <if test="conditionParamRef.physicalExamination == null">
                    ${_conditionType_} a.physicalExamination is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('physicalExaminationList')">
                ${_conditionType_} a.physicalExamination in
                <foreach collection="conditionParamRef.physicalExaminationList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('physicalExaminationNotList')">
                ${_conditionType_} a.physicalExamination not in
                <foreach collection="conditionParamRef.physicalExaminationNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('physicalExaminationStart') and conditionParamRef.physicalExaminationStart != null">
                ${_conditionType_} a.physicalExamination <![CDATA[ >= ]]> #{${_conditionParam_}.physicalExaminationStart}
            </if>
            <if test="conditionParamRef.containsKey('physicalExaminationEnd') and conditionParamRef.physicalExaminationEnd != null">
                ${_conditionType_} a.physicalExamination <![CDATA[ <= ]]> #{${_conditionParam_}.physicalExaminationEnd}
            </if>

            <if test="conditionParamRef.containsKey('quarantine')">
                <if test="conditionParamRef.quarantine != null ">
                    ${_conditionType_} a.quarantine = #{${_conditionParam_}.quarantine}
                </if>
                <if test="conditionParamRef.quarantine == null">
                    ${_conditionType_} a.quarantine is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('quarantineList')">
                ${_conditionType_} a.quarantine in
                <foreach collection="conditionParamRef.quarantineList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('quarantineNotList')">
                ${_conditionType_} a.quarantine not in
                <foreach collection="conditionParamRef.quarantineNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('quarantineStart') and conditionParamRef.quarantineStart != null">
                ${_conditionType_} a.quarantine <![CDATA[ >= ]]> #{${_conditionParam_}.quarantineStart}
            </if>
            <if test="conditionParamRef.containsKey('quarantineEnd') and conditionParamRef.quarantineEnd != null">
                ${_conditionType_} a.quarantine <![CDATA[ <= ]]> #{${_conditionParam_}.quarantineEnd}
            </if>

            <if test="conditionParamRef.containsKey('businessTrip')">
                <if test="conditionParamRef.businessTrip != null ">
                    ${_conditionType_} a.businessTrip = #{${_conditionParam_}.businessTrip}
                </if>
                <if test="conditionParamRef.businessTrip == null">
                    ${_conditionType_} a.businessTrip is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('businessTripList')">
                ${_conditionType_} a.businessTrip in
                <foreach collection="conditionParamRef.businessTripList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('businessTripNotList')">
                ${_conditionType_} a.businessTrip not in
                <foreach collection="conditionParamRef.businessTripNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('businessTripStart') and conditionParamRef.businessTripStart != null">
                ${_conditionType_} a.businessTrip <![CDATA[ >= ]]> #{${_conditionParam_}.businessTripStart}
            </if>
            <if test="conditionParamRef.containsKey('businessTripEnd') and conditionParamRef.businessTripEnd != null">
                ${_conditionType_} a.businessTrip <![CDATA[ <= ]]> #{${_conditionParam_}.businessTripEnd}
            </if>

            <if test="conditionParamRef.containsKey('publicHoliday')">
                <if test="conditionParamRef.publicHoliday != null ">
                    ${_conditionType_} a.publicHoliday = #{${_conditionParam_}.publicHoliday}
                </if>
                <if test="conditionParamRef.publicHoliday == null">
                    ${_conditionType_} a.publicHoliday is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('publicHolidayList')">
                ${_conditionType_} a.publicHoliday in
                <foreach collection="conditionParamRef.publicHolidayList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('publicHolidayNotList')">
                ${_conditionType_} a.publicHoliday not in
                <foreach collection="conditionParamRef.publicHolidayNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('publicHolidayStart') and conditionParamRef.publicHolidayStart != null">
                ${_conditionType_} a.publicHoliday <![CDATA[ >= ]]> #{${_conditionParam_}.publicHolidayStart}
            </if>
            <if test="conditionParamRef.containsKey('publicHolidayEnd') and conditionParamRef.publicHolidayEnd != null">
                ${_conditionType_} a.publicHoliday <![CDATA[ <= ]]> #{${_conditionParam_}.publicHolidayEnd}
            </if>

            <if test="conditionParamRef.containsKey('sickLeave')">
                <if test="conditionParamRef.sickLeave != null ">
                    ${_conditionType_} a.sickLeave = #{${_conditionParam_}.sickLeave}
                </if>
                <if test="conditionParamRef.sickLeave == null">
                    ${_conditionType_} a.sickLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('sickLeaveList')">
                ${_conditionType_} a.sickLeave in
                <foreach collection="conditionParamRef.sickLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('sickLeaveNotList')">
                ${_conditionType_} a.sickLeave not in
                <foreach collection="conditionParamRef.sickLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('sickLeaveStart') and conditionParamRef.sickLeaveStart != null">
                ${_conditionType_} a.sickLeave <![CDATA[ >= ]]> #{${_conditionParam_}.sickLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('sickLeaveEnd') and conditionParamRef.sickLeaveEnd != null">
                ${_conditionType_} a.sickLeave <![CDATA[ <= ]]> #{${_conditionParam_}.sickLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('funeralLeave')">
                <if test="conditionParamRef.funeralLeave != null ">
                    ${_conditionType_} a.funeralLeave = #{${_conditionParam_}.funeralLeave}
                </if>
                <if test="conditionParamRef.funeralLeave == null">
                    ${_conditionType_} a.funeralLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('funeralLeaveList')">
                ${_conditionType_} a.funeralLeave in
                <foreach collection="conditionParamRef.funeralLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('funeralLeaveNotList')">
                ${_conditionType_} a.funeralLeave not in
                <foreach collection="conditionParamRef.funeralLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('funeralLeaveStart') and conditionParamRef.funeralLeaveStart != null">
                ${_conditionType_} a.funeralLeave <![CDATA[ >= ]]> #{${_conditionParam_}.funeralLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('funeralLeaveEnd') and conditionParamRef.funeralLeaveEnd != null">
                ${_conditionType_} a.funeralLeave <![CDATA[ <= ]]> #{${_conditionParam_}.funeralLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('marriageLeave')">
                <if test="conditionParamRef.marriageLeave != null ">
                    ${_conditionType_} a.marriageLeave = #{${_conditionParam_}.marriageLeave}
                </if>
                <if test="conditionParamRef.marriageLeave == null">
                    ${_conditionType_} a.marriageLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('marriageLeaveList')">
                ${_conditionType_} a.marriageLeave in
                <foreach collection="conditionParamRef.marriageLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('marriageLeaveNotList')">
                ${_conditionType_} a.marriageLeave not in
                <foreach collection="conditionParamRef.marriageLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('marriageLeaveStart') and conditionParamRef.marriageLeaveStart != null">
                ${_conditionType_} a.marriageLeave <![CDATA[ >= ]]> #{${_conditionParam_}.marriageLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('marriageLeaveEnd') and conditionParamRef.marriageLeaveEnd != null">
                ${_conditionType_} a.marriageLeave <![CDATA[ <= ]]> #{${_conditionParam_}.marriageLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('childRearingLeave')">
                <if test="conditionParamRef.childRearingLeave != null ">
                    ${_conditionType_} a.childRearingLeave = #{${_conditionParam_}.childRearingLeave}
                </if>
                <if test="conditionParamRef.childRearingLeave == null">
                    ${_conditionType_} a.childRearingLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('childRearingLeaveList')">
                ${_conditionType_} a.childRearingLeave in
                <foreach collection="conditionParamRef.childRearingLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('childRearingLeaveNotList')">
                ${_conditionType_} a.childRearingLeave not in
                <foreach collection="conditionParamRef.childRearingLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('childRearingLeaveStart') and conditionParamRef.childRearingLeaveStart != null">
                ${_conditionType_} a.childRearingLeave <![CDATA[ >= ]]> #{${_conditionParam_}.childRearingLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('childRearingLeaveEnd') and conditionParamRef.childRearingLeaveEnd != null">
                ${_conditionType_} a.childRearingLeave <![CDATA[ <= ]]> #{${_conditionParam_}.childRearingLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('maternityLeave')">
                <if test="conditionParamRef.maternityLeave != null ">
                    ${_conditionType_} a.maternityLeave = #{${_conditionParam_}.maternityLeave}
                </if>
                <if test="conditionParamRef.maternityLeave == null">
                    ${_conditionType_} a.maternityLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('maternityLeaveList')">
                ${_conditionType_} a.maternityLeave in
                <foreach collection="conditionParamRef.maternityLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('maternityLeaveNotList')">
                ${_conditionType_} a.maternityLeave not in
                <foreach collection="conditionParamRef.maternityLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('maternityLeaveStart') and conditionParamRef.maternityLeaveStart != null">
                ${_conditionType_} a.maternityLeave <![CDATA[ >= ]]> #{${_conditionParam_}.maternityLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('maternityLeaveEnd') and conditionParamRef.maternityLeaveEnd != null">
                ${_conditionType_} a.maternityLeave <![CDATA[ <= ]]> #{${_conditionParam_}.maternityLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('transferBack')">
                <if test="conditionParamRef.transferBack != null ">
                    ${_conditionType_} a.transferBack = #{${_conditionParam_}.transferBack}
                </if>
                <if test="conditionParamRef.transferBack == null">
                    ${_conditionType_} a.transferBack is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('transferBackList')">
                ${_conditionType_} a.transferBack in
                <foreach collection="conditionParamRef.transferBackList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('transferBackNotList')">
                ${_conditionType_} a.transferBack not in
                <foreach collection="conditionParamRef.transferBackNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('transferBackStart') and conditionParamRef.transferBackStart != null">
                ${_conditionType_} a.transferBack <![CDATA[ >= ]]> #{${_conditionParam_}.transferBackStart}
            </if>
            <if test="conditionParamRef.containsKey('transferBackEnd') and conditionParamRef.transferBackEnd != null">
                ${_conditionType_} a.transferBack <![CDATA[ <= ]]> #{${_conditionParam_}.transferBackEnd}
            </if>

            <if test="conditionParamRef.containsKey('homeLeave')">
                <if test="conditionParamRef.homeLeave != null ">
                    ${_conditionType_} a.homeLeave = #{${_conditionParam_}.homeLeave}
                </if>
                <if test="conditionParamRef.homeLeave == null">
                    ${_conditionType_} a.homeLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('homeLeaveList')">
                ${_conditionType_} a.homeLeave in
                <foreach collection="conditionParamRef.homeLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('homeLeaveNotList')">
                ${_conditionType_} a.homeLeave not in
                <foreach collection="conditionParamRef.homeLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('homeLeaveStart') and conditionParamRef.homeLeaveStart != null">
                ${_conditionType_} a.homeLeave <![CDATA[ >= ]]> #{${_conditionParam_}.homeLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('homeLeaveEnd') and conditionParamRef.homeLeaveEnd != null">
                ${_conditionType_} a.homeLeave <![CDATA[ <= ]]> #{${_conditionParam_}.homeLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('personalLeave')">
                <if test="conditionParamRef.personalLeave != null ">
                    ${_conditionType_} a.personalLeave = #{${_conditionParam_}.personalLeave}
                </if>
                <if test="conditionParamRef.personalLeave == null">
                    ${_conditionType_} a.personalLeave is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('personalLeaveList')">
                ${_conditionType_} a.personalLeave in
                <foreach collection="conditionParamRef.personalLeaveList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('personalLeaveNotList')">
                ${_conditionType_} a.personalLeave not in
                <foreach collection="conditionParamRef.personalLeaveNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('personalLeaveStart') and conditionParamRef.personalLeaveStart != null">
                ${_conditionType_} a.personalLeave <![CDATA[ >= ]]> #{${_conditionParam_}.personalLeaveStart}
            </if>
            <if test="conditionParamRef.containsKey('personalLeaveEnd') and conditionParamRef.personalLeaveEnd != null">
                ${_conditionType_} a.personalLeave <![CDATA[ <= ]]> #{${_conditionParam_}.personalLeaveEnd}
            </if>

            <if test="conditionParamRef.containsKey('absenteeismDays')">
                <if test="conditionParamRef.absenteeismDays != null ">
                    ${_conditionType_} a.absenteeismDays = #{${_conditionParam_}.absenteeismDays}
                </if>
                <if test="conditionParamRef.absenteeismDays == null">
                    ${_conditionType_} a.absenteeismDays is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('absenteeismDaysList')">
                ${_conditionType_} a.absenteeismDays in
                <foreach collection="conditionParamRef.absenteeismDaysList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('absenteeismDaysNotList')">
                ${_conditionType_} a.absenteeismDays not in
                <foreach collection="conditionParamRef.absenteeismDaysNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('absenteeismDaysStart') and conditionParamRef.absenteeismDaysStart != null">
                ${_conditionType_} a.absenteeismDays <![CDATA[ >= ]]> #{${_conditionParam_}.absenteeismDaysStart}
            </if>
            <if test="conditionParamRef.containsKey('absenteeismDaysEnd') and conditionParamRef.absenteeismDaysEnd != null">
                ${_conditionType_} a.absenteeismDays <![CDATA[ <= ]]> #{${_conditionParam_}.absenteeismDaysEnd}
            </if>

            <if test="conditionParamRef.containsKey('otherDays')">
                <if test="conditionParamRef.otherDays != null ">
                    ${_conditionType_} a.otherDays = #{${_conditionParam_}.otherDays}
                </if>
                <if test="conditionParamRef.otherDays == null">
                    ${_conditionType_} a.otherDays is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('otherDaysList')">
                ${_conditionType_} a.otherDays in
                <foreach collection="conditionParamRef.otherDaysList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('otherDaysNotList')">
                ${_conditionType_} a.otherDays not in
                <foreach collection="conditionParamRef.otherDaysNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('otherDaysStart') and conditionParamRef.otherDaysStart != null">
                ${_conditionType_} a.otherDays <![CDATA[ >= ]]> #{${_conditionParam_}.otherDaysStart}
            </if>
            <if test="conditionParamRef.containsKey('otherDaysEnd') and conditionParamRef.otherDaysEnd != null">
                ${_conditionType_} a.otherDays <![CDATA[ <= ]]> #{${_conditionParam_}.otherDaysEnd}
            </if>

            <if test="conditionParamRef.containsKey('attendanceRate')">
                <if test="conditionParamRef.attendanceRate != null ">
                    ${_conditionType_} a.attendanceRate = #{${_conditionParam_}.attendanceRate}
                </if>
                <if test="conditionParamRef.attendanceRate == null">
                    ${_conditionType_} a.attendanceRate is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('attendanceRateList')">
                ${_conditionType_} a.attendanceRate in
                <foreach collection="conditionParamRef.attendanceRateList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendanceRateNotList')">
                ${_conditionType_} a.attendanceRate not in
                <foreach collection="conditionParamRef.attendanceRateNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendanceRateStart') and conditionParamRef.attendanceRateStart != null">
                ${_conditionType_} a.attendanceRate <![CDATA[ >= ]]> #{${_conditionParam_}.attendanceRateStart}
            </if>
            <if test="conditionParamRef.containsKey('attendanceRateEnd') and conditionParamRef.attendanceRateEnd != null">
                ${_conditionType_} a.attendanceRate <![CDATA[ <= ]]> #{${_conditionParam_}.attendanceRateEnd}
            </if>

            <if test="conditionParamRef.containsKey('nonCompliancePunch')">
                <if test="conditionParamRef.nonCompliancePunch != null ">
                    ${_conditionType_} a.nonCompliancePunch = #{${_conditionParam_}.nonCompliancePunch}
                </if>
                <if test="conditionParamRef.nonCompliancePunch == null">
                    ${_conditionType_} a.nonCompliancePunch is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('nonCompliancePunchList')">
                ${_conditionType_} a.nonCompliancePunch in
                <foreach collection="conditionParamRef.nonCompliancePunchList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('nonCompliancePunchNotList')">
                ${_conditionType_} a.nonCompliancePunch not in
                <foreach collection="conditionParamRef.nonCompliancePunchNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('nonCompliancePunchStart') and conditionParamRef.nonCompliancePunchStart != null">
                ${_conditionType_} a.nonCompliancePunch <![CDATA[ >= ]]> #{${_conditionParam_}.nonCompliancePunchStart}
            </if>
            <if test="conditionParamRef.containsKey('nonCompliancePunchEnd') and conditionParamRef.nonCompliancePunchEnd != null">
                ${_conditionType_} a.nonCompliancePunch <![CDATA[ <= ]]> #{${_conditionParam_}.nonCompliancePunchEnd}
            </if>

            <if test="conditionParamRef.containsKey('lateTimes')">
                <if test="conditionParamRef.lateTimes != null ">
                    ${_conditionType_} a.lateTimes = #{${_conditionParam_}.lateTimes}
                </if>
                <if test="conditionParamRef.lateTimes == null">
                    ${_conditionType_} a.lateTimes is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('lateTimesList')">
                ${_conditionType_} a.lateTimes in
                <foreach collection="conditionParamRef.lateTimesList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('lateTimesNotList')">
                ${_conditionType_} a.lateTimes not in
                <foreach collection="conditionParamRef.lateTimesNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('lateTimesStart') and conditionParamRef.lateTimesStart != null">
                ${_conditionType_} a.lateTimes <![CDATA[ >= ]]> #{${_conditionParam_}.lateTimesStart}
            </if>
            <if test="conditionParamRef.containsKey('lateTimesEnd') and conditionParamRef.lateTimesEnd != null">
                ${_conditionType_} a.lateTimes <![CDATA[ <= ]]> #{${_conditionParam_}.lateTimesEnd}
            </if>

            <if test="conditionParamRef.containsKey('surfingMobileTimes')">
                <if test="conditionParamRef.surfingMobileTimes != null ">
                    ${_conditionType_} a.surfingMobileTimes = #{${_conditionParam_}.surfingMobileTimes}
                </if>
                <if test="conditionParamRef.surfingMobileTimes == null">
                    ${_conditionType_} a.surfingMobileTimes is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('surfingMobileTimesList')">
                ${_conditionType_} a.surfingMobileTimes in
                <foreach collection="conditionParamRef.surfingMobileTimesList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('surfingMobileTimesNotList')">
                ${_conditionType_} a.surfingMobileTimes not in
                <foreach collection="conditionParamRef.surfingMobileTimesNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('surfingMobileTimesStart') and conditionParamRef.surfingMobileTimesStart != null">
                ${_conditionType_} a.surfingMobileTimes <![CDATA[ >= ]]> #{${_conditionParam_}.surfingMobileTimesStart}
            </if>
            <if test="conditionParamRef.containsKey('surfingMobileTimesEnd') and conditionParamRef.surfingMobileTimesEnd != null">
                ${_conditionType_} a.surfingMobileTimes <![CDATA[ <= ]]> #{${_conditionParam_}.surfingMobileTimesEnd}
            </if>

            <if test="conditionParamRef.containsKey('overtimeTimes')">
                <if test="conditionParamRef.overtimeTimes != null ">
                    ${_conditionType_} a.overtimeTimes = #{${_conditionParam_}.overtimeTimes}
                </if>
                <if test="conditionParamRef.overtimeTimes == null">
                    ${_conditionType_} a.overtimeTimes is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('overtimeTimesList')">
                ${_conditionType_} a.overtimeTimes in
                <foreach collection="conditionParamRef.overtimeTimesList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('overtimeTimesNotList')">
                ${_conditionType_} a.overtimeTimes not in
                <foreach collection="conditionParamRef.overtimeTimesNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('overtimeTimesStart') and conditionParamRef.overtimeTimesStart != null">
                ${_conditionType_} a.overtimeTimes <![CDATA[ >= ]]> #{${_conditionParam_}.overtimeTimesStart}
            </if>
            <if test="conditionParamRef.containsKey('overtimeTimesEnd') and conditionParamRef.overtimeTimesEnd != null">
                ${_conditionType_} a.overtimeTimes <![CDATA[ <= ]]> #{${_conditionParam_}.overtimeTimesEnd}
            </if>

            <if test="conditionParamRef.containsKey('vacancy')">
                <if test="conditionParamRef.vacancy != null ">
                    ${_conditionType_} a.vacancy = #{${_conditionParam_}.vacancy}
                </if>
                <if test="conditionParamRef.vacancy == null">
                    ${_conditionType_} a.vacancy is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('vacancyList')">
                ${_conditionType_} a.vacancy in
                <foreach collection="conditionParamRef.vacancyList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('vacancyNotList')">
                ${_conditionType_} a.vacancy not in
                <foreach collection="conditionParamRef.vacancyNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('vacancyStart') and conditionParamRef.vacancyStart != null">
                ${_conditionType_} a.vacancy <![CDATA[ >= ]]> #{${_conditionParam_}.vacancyStart}
            </if>
            <if test="conditionParamRef.containsKey('vacancyEnd') and conditionParamRef.vacancyEnd != null">
                ${_conditionType_} a.vacancy <![CDATA[ <= ]]> #{${_conditionParam_}.vacancyEnd}
            </if>

            <if test="conditionParamRef.containsKey('nonStandardDressTimes')">
                <if test="conditionParamRef.nonStandardDressTimes != null ">
                    ${_conditionType_} a.nonStandardDressTimes = #{${_conditionParam_}.nonStandardDressTimes}
                </if>
                <if test="conditionParamRef.nonStandardDressTimes == null">
                    ${_conditionType_} a.nonStandardDressTimes is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('nonStandardDressTimesList')">
                ${_conditionType_} a.nonStandardDressTimes in
                <foreach collection="conditionParamRef.nonStandardDressTimesList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('nonStandardDressTimesNotList')">
                ${_conditionType_} a.nonStandardDressTimes not in
                <foreach collection="conditionParamRef.nonStandardDressTimesNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('nonStandardDressTimesStart') and conditionParamRef.nonStandardDressTimesStart != null">
                ${_conditionType_} a.nonStandardDressTimes <![CDATA[ >= ]]> #{${_conditionParam_}.nonStandardDressTimesStart}
            </if>
            <if test="conditionParamRef.containsKey('nonStandardDressTimesEnd') and conditionParamRef.nonStandardDressTimesEnd != null">
                ${_conditionType_} a.nonStandardDressTimes <![CDATA[ <= ]]> #{${_conditionParam_}.nonStandardDressTimesEnd}
            </if>

            <if test="conditionParamRef.containsKey('unexcusedMeetingAbsence')">
                <if test="conditionParamRef.unexcusedMeetingAbsence != null ">
                    ${_conditionType_} a.unexcusedMeetingAbsence = #{${_conditionParam_}.unexcusedMeetingAbsence}
                </if>
                <if test="conditionParamRef.unexcusedMeetingAbsence == null">
                    ${_conditionType_} a.unexcusedMeetingAbsence is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('unexcusedMeetingAbsenceList')">
                ${_conditionType_} a.unexcusedMeetingAbsence in
                <foreach collection="conditionParamRef.unexcusedMeetingAbsenceList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('unexcusedMeetingAbsenceNotList')">
                ${_conditionType_} a.unexcusedMeetingAbsence not in
                <foreach collection="conditionParamRef.unexcusedMeetingAbsenceNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('unexcusedMeetingAbsenceStart') and conditionParamRef.unexcusedMeetingAbsenceStart != null">
                ${_conditionType_} a.unexcusedMeetingAbsence <![CDATA[ >= ]]> #{${_conditionParam_}.unexcusedMeetingAbsenceStart}
            </if>
            <if test="conditionParamRef.containsKey('unexcusedMeetingAbsenceEnd') and conditionParamRef.unexcusedMeetingAbsenceEnd != null">
                ${_conditionType_} a.unexcusedMeetingAbsence <![CDATA[ <= ]]> #{${_conditionParam_}.unexcusedMeetingAbsenceEnd}
            </if>

            <if test="conditionParamRef.containsKey('earlyLeaveMeeting')">
                <if test="conditionParamRef.earlyLeaveMeeting != null ">
                    ${_conditionType_} a.earlyLeaveMeeting = #{${_conditionParam_}.earlyLeaveMeeting}
                </if>
                <if test="conditionParamRef.earlyLeaveMeeting == null">
                    ${_conditionType_} a.earlyLeaveMeeting is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('earlyLeaveMeetingList')">
                ${_conditionType_} a.earlyLeaveMeeting in
                <foreach collection="conditionParamRef.earlyLeaveMeetingList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('earlyLeaveMeetingNotList')">
                ${_conditionType_} a.earlyLeaveMeeting not in
                <foreach collection="conditionParamRef.earlyLeaveMeetingNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('earlyLeaveMeetingStart') and conditionParamRef.earlyLeaveMeetingStart != null">
                ${_conditionType_} a.earlyLeaveMeeting <![CDATA[ >= ]]> #{${_conditionParam_}.earlyLeaveMeetingStart}
            </if>
            <if test="conditionParamRef.containsKey('earlyLeaveMeetingEnd') and conditionParamRef.earlyLeaveMeetingEnd != null">
                ${_conditionType_} a.earlyLeaveMeeting <![CDATA[ <= ]]> #{${_conditionParam_}.earlyLeaveMeetingEnd}
            </if>

            <if test="conditionParamRef.containsKey('year')">
                <if test="conditionParamRef.year != null ">
                    ${_conditionType_} a.year = #{${_conditionParam_}.year}
                </if>
                <if test="conditionParamRef.year == null">
                    ${_conditionType_} a.year is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('yearList')">
                ${_conditionType_} a.year in
                <foreach collection="conditionParamRef.yearList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('yearNotList')">
                ${_conditionType_} a.year not in
                <foreach collection="conditionParamRef.yearNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('yearStart') and conditionParamRef.yearStart != null">
                ${_conditionType_} a.year <![CDATA[ >= ]]> #{${_conditionParam_}.yearStart}
            </if>
            <if test="conditionParamRef.containsKey('yearEnd') and conditionParamRef.yearEnd != null">
                ${_conditionType_} a.year <![CDATA[ <= ]]> #{${_conditionParam_}.yearEnd}
            </if>

            <if test="conditionParamRef.containsKey('month')">
                <if test="conditionParamRef.month != null ">
                    ${_conditionType_} a.month = #{${_conditionParam_}.month}
                </if>
                <if test="conditionParamRef.month == null">
                    ${_conditionType_} a.month is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('monthList')">
                ${_conditionType_} a.month in
                <foreach collection="conditionParamRef.monthList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('monthNotList')">
                ${_conditionType_} a.month not in
                <foreach collection="conditionParamRef.monthNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('monthStart') and conditionParamRef.monthStart != null">
                ${_conditionType_} a.month <![CDATA[ >= ]]> #{${_conditionParam_}.monthStart}
            </if>
            <if test="conditionParamRef.containsKey('monthEnd') and conditionParamRef.monthEnd != null">
                ${_conditionType_} a.month <![CDATA[ <= ]]> #{${_conditionParam_}.monthEnd}
            </if>

            <if test="conditionParamRef.containsKey('day')">
                <if test="conditionParamRef.day != null ">
                    ${_conditionType_} a.day = #{${_conditionParam_}.day}
                </if>
                <if test="conditionParamRef.day == null">
                    ${_conditionType_} a.day is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('dayList')">
                ${_conditionType_} a.day in
                <foreach collection="conditionParamRef.dayList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('dayNotList')">
                ${_conditionType_} a.day not in
                <foreach collection="conditionParamRef.dayNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('dayStart') and conditionParamRef.dayStart != null">
                ${_conditionType_} a.day <![CDATA[ >= ]]> #{${_conditionParam_}.dayStart}
            </if>
            <if test="conditionParamRef.containsKey('dayEnd') and conditionParamRef.dayEnd != null">
                ${_conditionType_} a.day <![CDATA[ <= ]]> #{${_conditionParam_}.dayEnd}
            </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')">
                ${_conditionType_} a.remark in
                <foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('remarkNotList')">
                ${_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')">
                ${_conditionType_} a.createUserId in
                <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdNotList')">
                ${_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')">
                ${_conditionType_} a.updateUserId in
                <foreach collection="conditionParamRef.updateUserIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('updateUserIdNotList')">
                ${_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>
    </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('windowCategory')">
                        a.windowCategory
                        <if test='orderCol.windowCategory != null and "DESC".equalsIgnoreCase(orderCol.windowCategory)'>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('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('backToUnit')">
                        a.backToUnit
                        <if test='orderCol.backToUnit != null and "DESC".equalsIgnoreCase(orderCol.backToUnit)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('onDutyLeave')">
                        a.onDutyLeave
                        <if test='orderCol.onDutyLeave != null and "DESC".equalsIgnoreCase(orderCol.onDutyLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('outOfOffice')">
                        a.outOfOffice
                        <if test='orderCol.outOfOffice != null and "DESC".equalsIgnoreCase(orderCol.outOfOffice)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('shiftCompensation')">
                        a.shiftCompensation
                        <if test='orderCol.shiftCompensation != null and "DESC".equalsIgnoreCase(orderCol.shiftCompensation)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('physicalExamination')">
                        a.physicalExamination
                        <if test='orderCol.physicalExamination != null and "DESC".equalsIgnoreCase(orderCol.physicalExamination)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('quarantine')">
                        a.quarantine
                        <if test='orderCol.quarantine != null and "DESC".equalsIgnoreCase(orderCol.quarantine)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('businessTrip')">
                        a.businessTrip
                        <if test='orderCol.businessTrip != null and "DESC".equalsIgnoreCase(orderCol.businessTrip)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('publicHoliday')">
                        a.publicHoliday
                        <if test='orderCol.publicHoliday != null and "DESC".equalsIgnoreCase(orderCol.publicHoliday)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('sickLeave')">
                        a.sickLeave
                        <if test='orderCol.sickLeave != null and "DESC".equalsIgnoreCase(orderCol.sickLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('funeralLeave')">
                        a.funeralLeave
                        <if test='orderCol.funeralLeave != null and "DESC".equalsIgnoreCase(orderCol.funeralLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('marriageLeave')">
                        a.marriageLeave
                        <if test='orderCol.marriageLeave != null and "DESC".equalsIgnoreCase(orderCol.marriageLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('childRearingLeave')">
                        a.childRearingLeave
                        <if test='orderCol.childRearingLeave != null and "DESC".equalsIgnoreCase(orderCol.childRearingLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('maternityLeave')">
                        a.maternityLeave
                        <if test='orderCol.maternityLeave != null and "DESC".equalsIgnoreCase(orderCol.maternityLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('transferBack')">
                        a.transferBack
                        <if test='orderCol.transferBack != null and "DESC".equalsIgnoreCase(orderCol.transferBack)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('homeLeave')">
                        a.homeLeave
                        <if test='orderCol.homeLeave != null and "DESC".equalsIgnoreCase(orderCol.homeLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('personalLeave')">
                        a.personalLeave
                        <if test='orderCol.personalLeave != null and "DESC".equalsIgnoreCase(orderCol.personalLeave)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('absenteeismDays')">
                        a.absenteeismDays
                        <if test='orderCol.absenteeismDays != null and "DESC".equalsIgnoreCase(orderCol.absenteeismDays)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('otherDays')">
                        a.otherDays
                        <if test='orderCol.otherDays != null and "DESC".equalsIgnoreCase(orderCol.otherDays)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('attendanceRate')">
                        a.attendanceRate
                        <if test='orderCol.attendanceRate != null and "DESC".equalsIgnoreCase(orderCol.attendanceRate)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('nonCompliancePunch')">
                        a.nonCompliancePunch
                        <if test='orderCol.nonCompliancePunch != null and "DESC".equalsIgnoreCase(orderCol.nonCompliancePunch)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('lateTimes')">
                        a.lateTimes
                        <if test='orderCol.lateTimes != null and "DESC".equalsIgnoreCase(orderCol.lateTimes)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('surfingMobileTimes')">
                        a.surfingMobileTimes
                        <if test='orderCol.surfingMobileTimes != null and "DESC".equalsIgnoreCase(orderCol.surfingMobileTimes)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('overtimeTimes')">
                        a.overtimeTimes
                        <if test='orderCol.overtimeTimes != null and "DESC".equalsIgnoreCase(orderCol.overtimeTimes)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('vacancy')">
                        a.vacancy
                        <if test='orderCol.vacancy != null and "DESC".equalsIgnoreCase(orderCol.vacancy)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('nonStandardDressTimes')">
                        a.nonStandardDressTimes
                        <if test='orderCol.nonStandardDressTimes != null and "DESC".equalsIgnoreCase(orderCol.nonStandardDressTimes)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('unexcusedMeetingAbsence')">
                        a.unexcusedMeetingAbsence
                        <if test='orderCol.unexcusedMeetingAbsence != null and "DESC".equalsIgnoreCase(orderCol.unexcusedMeetingAbsence)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('earlyLeaveMeeting')">
                        a.earlyLeaveMeeting
                        <if test='orderCol.earlyLeaveMeeting != null and "DESC".equalsIgnoreCase(orderCol.earlyLeaveMeeting)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('year')">
                        a.year
                        <if test='orderCol.year != null and "DESC".equalsIgnoreCase(orderCol.year)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('month')">
                        a.month
                        <if test='orderCol.month != null and "DESC".equalsIgnoreCase(orderCol.month)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('day')">
                        a.day
                        <if test='orderCol.day != null and "DESC".equalsIgnoreCase(orderCol.day)'>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>
            </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>