<?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.staff.dao.ibatis.StaffPerformSummaryDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="StaffPerformSummaryEntity" id="StaffPerformSummaryEntity-Map">
        <id  property="id" column="id" />
        <result property="staffId" column="staffId" />
        <result property="workNum" column="workNum" />
        <result property="staffName" column="staffName" />
        <result property="deptId" column="deptId" />
        <result property="deptName" column="deptName" />
        <result property="attendScore" column="attendScore" />
        <result property="reviewScore" column="reviewScore" />
        <result property="complainScore" column="complainScore" />
        <result property="goworkScore" column="goworkScore" />
        <result property="effectScore" column="effectScore" />
        <result property="otherScore" column="otherScore" />
        <result property="errorScore" column="errorScore" />
        <result property="totalScore" column="totalScore" />
        <result property="remark" column="remark" />
        <result property="year" column="year" />
        <result property="month" column="month" />
        <result property="createTime" column="createTime" />
        <result property="createUserId" column="createUserId" />
        <result property="updateTime" column="updateTime" />
        <result property="updateUserId" column="updateUserId" />
        <result property="belongCenter" column="belongCenter" />

    </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('staffId') or colPickMode == 1 and data.containsKey('staffId')))">
                a.staffId,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workNum') or colPickMode == 1 and data.containsKey('workNum')))">
                a.workNum,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('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('attendScore') or colPickMode == 1 and data.containsKey('attendScore')))">
                a.attendScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('reviewScore') or colPickMode == 1 and data.containsKey('reviewScore')))">
                a.reviewScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainScore') or colPickMode == 1 and data.containsKey('complainScore')))">
                a.complainScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('goworkScore') or colPickMode == 1 and data.containsKey('goworkScore')))">
                a.goworkScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('effectScore') or colPickMode == 1 and data.containsKey('effectScore')))">
                a.effectScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('otherScore') or colPickMode == 1 and data.containsKey('otherScore')))">
                a.otherScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('errorScore') or colPickMode == 1 and data.containsKey('errorScore')))">
                a.errorScore,
            </if>
            <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('totalScore') or colPickMode == 1 and data.containsKey('totalScore')))">
                a.totalScore,
            </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('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('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
                a.createTime,
            </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('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
                a.updateTime,
            </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('belongCenter') or colPickMode == 1 and data.containsKey('belongCenter')))">
                a.belongCenter,
            </if>
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="StaffPerformSummaryEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_staff_perform_summary
        (staffId,workNum,staffName,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,belongCenter)
        VALUES
        (#{staffId},#{workNum},#{staffName},#{deptId},#{deptName},#{attendScore},#{reviewScore},#{complainScore},#{goworkScore},#{effectScore},#{otherScore},#{errorScore},#{totalScore},#{remark},#{year},#{month},#{createTime},#{createUserId},#{updateTime},#{updateUserId},#{belongCenter})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_staff_perform_summary
        (staffId,workNum,staffName,deptId,deptName,attendScore,reviewScore,complainScore,goworkScore,effectScore,otherScore,errorScore,totalScore,remark,year,month,createTime,createUserId,updateTime,updateUserId,belongCenter)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.staffId},#{item.workNum},#{item.staffName},#{item.deptId},#{item.deptName},#{item.attendScore},#{item.reviewScore},#{item.complainScore},#{item.goworkScore},#{item.effectScore},#{item.otherScore},#{item.errorScore},#{item.totalScore},#{item.remark},#{item.year},#{item.month},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId},#{item.belongCenter})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_staff_perform_summary as a
        set
        <trim suffixOverrides="," suffix="">
            <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('workNum')) or (colPickMode==1 and !data.containsKey('workNum'))">
                a.workNum=#{data.workNum},
            </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('attendScore')) or (colPickMode==1 and !data.containsKey('attendScore'))">
                a.attendScore=#{data.attendScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendScoreIncrement')) or (colPickMode==1 and !data.containsKey('attendScoreIncrement'))">
                a.attendScore=ifnull(a.attendScore,0) + #{data.attendScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewScore')) or (colPickMode==1 and !data.containsKey('reviewScore'))">
                a.reviewScore=#{data.reviewScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('reviewScoreIncrement')) or (colPickMode==1 and !data.containsKey('reviewScoreIncrement'))">
                a.reviewScore=ifnull(a.reviewScore,0) + #{data.reviewScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainScore')) or (colPickMode==1 and !data.containsKey('complainScore'))">
                a.complainScore=#{data.complainScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainScoreIncrement')) or (colPickMode==1 and !data.containsKey('complainScoreIncrement'))">
                a.complainScore=ifnull(a.complainScore,0) + #{data.complainScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('goworkScore')) or (colPickMode==1 and !data.containsKey('goworkScore'))">
                a.goworkScore=#{data.goworkScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('goworkScoreIncrement')) or (colPickMode==1 and !data.containsKey('goworkScoreIncrement'))">
                a.goworkScore=ifnull(a.goworkScore,0) + #{data.goworkScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('effectScore')) or (colPickMode==1 and !data.containsKey('effectScore'))">
                a.effectScore=#{data.effectScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('effectScoreIncrement')) or (colPickMode==1 and !data.containsKey('effectScoreIncrement'))">
                a.effectScore=ifnull(a.effectScore,0) + #{data.effectScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherScore')) or (colPickMode==1 and !data.containsKey('otherScore'))">
                a.otherScore=#{data.otherScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherScoreIncrement')) or (colPickMode==1 and !data.containsKey('otherScoreIncrement'))">
                a.otherScore=ifnull(a.otherScore,0) + #{data.otherScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('errorScore')) or (colPickMode==1 and !data.containsKey('errorScore'))">
                a.errorScore=#{data.errorScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('errorScoreIncrement')) or (colPickMode==1 and !data.containsKey('errorScoreIncrement'))">
                a.errorScore=ifnull(a.errorScore,0) + #{data.errorScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('totalScore')) or (colPickMode==1 and !data.containsKey('totalScore'))">
                a.totalScore=#{data.totalScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('totalScoreIncrement')) or (colPickMode==1 and !data.containsKey('totalScoreIncrement'))">
                a.totalScore=ifnull(a.totalScore,0) + #{data.totalScoreIncrement},
            </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('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('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
                a.createTime=#{data.createTime},
            </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('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
                a.updateTime=#{data.updateTime},
            </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('belongCenter')) or (colPickMode==1 and !data.containsKey('belongCenter'))">
                a.belongCenter=#{data.belongCenter},
            </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_staff_perform_summary as a
        <trim prefix="set" suffixOverrides=",">
            <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="workNum=(case" suffix="ELSE workNum end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('workNum')) or (colPickMode==1 and !item.containsKey('workNum'))">
                        when a.id=#{item.id} then #{item.workNum}
                    </if>
                </foreach>
            </trim>
            <trim prefix="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="attendScore=(case" suffix="ELSE attendScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('attendScore')) or (colPickMode==1 and !item.containsKey('attendScore'))">
                            when a.id=#{item.id} then #{item.attendScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('attendScoreIncrement')) or (colPickMode==1 and !item.containsKey('attendScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.attendScore,0) + #{item.attendScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="reviewScore=(case" suffix="ELSE reviewScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('reviewScore')) or (colPickMode==1 and !item.containsKey('reviewScore'))">
                            when a.id=#{item.id} then #{item.reviewScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('reviewScoreIncrement')) or (colPickMode==1 and !item.containsKey('reviewScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.reviewScore,0) + #{item.reviewScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="complainScore=(case" suffix="ELSE complainScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('complainScore')) or (colPickMode==1 and !item.containsKey('complainScore'))">
                            when a.id=#{item.id} then #{item.complainScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('complainScoreIncrement')) or (colPickMode==1 and !item.containsKey('complainScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.complainScore,0) + #{item.complainScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="goworkScore=(case" suffix="ELSE goworkScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('goworkScore')) or (colPickMode==1 and !item.containsKey('goworkScore'))">
                            when a.id=#{item.id} then #{item.goworkScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('goworkScoreIncrement')) or (colPickMode==1 and !item.containsKey('goworkScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.goworkScore,0) + #{item.goworkScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="effectScore=(case" suffix="ELSE effectScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('effectScore')) or (colPickMode==1 and !item.containsKey('effectScore'))">
                            when a.id=#{item.id} then #{item.effectScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('effectScoreIncrement')) or (colPickMode==1 and !item.containsKey('effectScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.effectScore,0) + #{item.effectScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="otherScore=(case" suffix="ELSE otherScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('otherScore')) or (colPickMode==1 and !item.containsKey('otherScore'))">
                            when a.id=#{item.id} then #{item.otherScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('otherScoreIncrement')) or (colPickMode==1 and !item.containsKey('otherScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.otherScore,0) + #{item.otherScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="errorScore=(case" suffix="ELSE errorScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('errorScore')) or (colPickMode==1 and !item.containsKey('errorScore'))">
                            when a.id=#{item.id} then #{item.errorScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('errorScoreIncrement')) or (colPickMode==1 and !item.containsKey('errorScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.errorScore,0) + #{item.errorScoreIncrement}
                        </when>
                    </choose>
                </foreach>
            </trim>
            <trim prefix="totalScore=(case" suffix="ELSE totalScore end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <choose>
                        <when test="(colPickMode==0 and item.containsKey('totalScore')) or (colPickMode==1 and !item.containsKey('totalScore'))">
                            when a.id=#{item.id} then #{item.totalScore}
                        </when>
                        <when test="(colPickMode==0 and item.containsKey('totalScoreIncrement')) or (colPickMode==1 and !item.containsKey('totalScoreIncrement'))">
                            when a.id=#{item.id} then ifnull(a.totalScore,0) + #{item.totalScoreIncrement}
                        </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="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="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="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="updateTime=(case" suffix="ELSE updateTime end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
                        when a.id=#{item.id} then #{item.updateTime}
                    </if>
                </foreach>
            </trim>
            <trim prefix="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="belongCenter=(case" suffix="ELSE belongCenter end),">
                <foreach collection="data.dataList" item="item" index="index" separator="" >
                    <if test="(colPickMode==0 and item.containsKey('belongCenter')) or (colPickMode==1 and !item.containsKey('belongCenter'))">
                        when a.id=#{item.id} then #{item.belongCenter}
                    </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="StaffPerformSummaryEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_staff_perform_summary as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_staff_perform_summary as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_staff_perform_summary where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_staff_perform_summary where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <!-- 根据对象列表删除一批，针对单一主健有效 -->
    <delete id="deleteByEntityList">
        delete from mortals_xhx_staff_perform_summary 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_staff_perform_summary as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="StaffPerformSummaryEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_staff_perform_summary 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_staff_perform_summary as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </select>
    <!-- 条件映射 -->
    <sql id="_condition_">
        <if test="condition != null and !condition.isEmpty()">
            <!-- 条件映射-普通条件 -->
            <include refid="_condition_param_">
                <property name="_conditionParam_" value="condition"/>
                <property name="_conditionType_" value="and"/>
            </include>
            <!-- 条件映射-集合之间使用AND，集合中元素使用OR-(list[0].1 or list[0].2) and (list[1].3 or list[1].4) -->
            <if test="condition.containsKey('andConditionList') and !condition.andConditionList.isEmpty()">
                and
                <foreach collection="condition.andConditionList" open="(" close=")" index="index" item="andCondition" separator=" and ">
                    <trim prefixOverrides="or" prefix="(" suffix=")">
                        <include refid="_condition_param_">
                            <property name="_conditionParam_" value="andCondition"/>
                            <property name="_conditionType_" value="or"/>
                        </include>
                    </trim>
                </foreach>
            </if>
            <!-- 条件映射-集合之间使用OR，集合中元素使用AND-(list[0].1 and list[0].2) or (list[1].3 and list[1].4) -->
            <if test="condition.containsKey('orConditionList') and !condition.orConditionList.isEmpty()">
                and
                <foreach collection="condition.orConditionList" open="(" close=")" index="index" item="orCondition" separator=" or ">
                    <trim prefixOverrides="and" prefix="(" suffix=")">
                        <include refid="_condition_param_">
                            <property name="_conditionParam_" value="orCondition"/>
                            <property name="_conditionType_" value="and"/>
                        </include>
                    </trim>
                </foreach>
            </if>
        </if>
    </sql>
    <!-- 条件映射-代参数 -->
    <sql id="_condition_param_">
        <bind name="conditionParamRef" value="${_conditionParam_}"/>
        <if test="conditionParamRef.containsKey('id')">
            <if test="conditionParamRef.id != null">
                ${_conditionType_} a.id=#{${_conditionParam_}.id}
            </if>
        </if>
        <if test="conditionParamRef.containsKey('id')">
            <if test="conditionParamRef.id != null ">
                ${_conditionType_} a.id = #{${_conditionParam_}.id}
            </if>
            <if test="conditionParamRef.id == null">
                ${_conditionType_} a.id is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
            ${_conditionType_} a.id in
            <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0">
            ${_conditionType_} a.id not in
            <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null">
            ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart}
        </if>
        <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null">
            ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd}
        </if>

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


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

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


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

        <if test="conditionParamRef.containsKey('reviewScore')">
            <if test="conditionParamRef.reviewScore != null ">
                ${_conditionType_} a.reviewScore = #{${_conditionParam_}.reviewScore}
            </if>
            <if test="conditionParamRef.reviewScore == null">
                ${_conditionType_} a.reviewScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('reviewScoreList') and conditionParamRef.reviewScoreList.size() > 0">
            ${_conditionType_} a.reviewScore in
            <foreach collection="conditionParamRef.reviewScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('reviewScoreNotList') and conditionParamRef.reviewScoreNotList.size() > 0">
            ${_conditionType_} a.reviewScore not in
            <foreach collection="conditionParamRef.reviewScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('reviewScoreStart') and conditionParamRef.reviewScoreStart != null">
            ${_conditionType_} a.reviewScore <![CDATA[ >= ]]> #{${_conditionParam_}.reviewScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('reviewScoreEnd') and conditionParamRef.reviewScoreEnd != null">
            ${_conditionType_} a.reviewScore <![CDATA[ <= ]]> #{${_conditionParam_}.reviewScoreEnd}
        </if>

        <if test="conditionParamRef.containsKey('complainScore')">
            <if test="conditionParamRef.complainScore != null ">
                ${_conditionType_} a.complainScore = #{${_conditionParam_}.complainScore}
            </if>
            <if test="conditionParamRef.complainScore == null">
                ${_conditionType_} a.complainScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('complainScoreList') and conditionParamRef.complainScoreList.size() > 0">
            ${_conditionType_} a.complainScore in
            <foreach collection="conditionParamRef.complainScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('complainScoreNotList') and conditionParamRef.complainScoreNotList.size() > 0">
            ${_conditionType_} a.complainScore not in
            <foreach collection="conditionParamRef.complainScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('complainScoreStart') and conditionParamRef.complainScoreStart != null">
            ${_conditionType_} a.complainScore <![CDATA[ >= ]]> #{${_conditionParam_}.complainScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('complainScoreEnd') and conditionParamRef.complainScoreEnd != null">
            ${_conditionType_} a.complainScore <![CDATA[ <= ]]> #{${_conditionParam_}.complainScoreEnd}
        </if>

        <if test="conditionParamRef.containsKey('goworkScore')">
            <if test="conditionParamRef.goworkScore != null ">
                ${_conditionType_} a.goworkScore = #{${_conditionParam_}.goworkScore}
            </if>
            <if test="conditionParamRef.goworkScore == null">
                ${_conditionType_} a.goworkScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('goworkScoreList') and conditionParamRef.goworkScoreList.size() > 0">
            ${_conditionType_} a.goworkScore in
            <foreach collection="conditionParamRef.goworkScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('goworkScoreNotList') and conditionParamRef.goworkScoreNotList.size() > 0">
            ${_conditionType_} a.goworkScore not in
            <foreach collection="conditionParamRef.goworkScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('goworkScoreStart') and conditionParamRef.goworkScoreStart != null">
            ${_conditionType_} a.goworkScore <![CDATA[ >= ]]> #{${_conditionParam_}.goworkScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('goworkScoreEnd') and conditionParamRef.goworkScoreEnd != null">
            ${_conditionType_} a.goworkScore <![CDATA[ <= ]]> #{${_conditionParam_}.goworkScoreEnd}
        </if>

        <if test="conditionParamRef.containsKey('effectScore')">
            <if test="conditionParamRef.effectScore != null ">
                ${_conditionType_} a.effectScore = #{${_conditionParam_}.effectScore}
            </if>
            <if test="conditionParamRef.effectScore == null">
                ${_conditionType_} a.effectScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('effectScoreList') and conditionParamRef.effectScoreList.size() > 0">
            ${_conditionType_} a.effectScore in
            <foreach collection="conditionParamRef.effectScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('effectScoreNotList') and conditionParamRef.effectScoreNotList.size() > 0">
            ${_conditionType_} a.effectScore not in
            <foreach collection="conditionParamRef.effectScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('effectScoreStart') and conditionParamRef.effectScoreStart != null">
            ${_conditionType_} a.effectScore <![CDATA[ >= ]]> #{${_conditionParam_}.effectScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('effectScoreEnd') and conditionParamRef.effectScoreEnd != null">
            ${_conditionType_} a.effectScore <![CDATA[ <= ]]> #{${_conditionParam_}.effectScoreEnd}
        </if>

        <if test="conditionParamRef.containsKey('otherScore')">
            <if test="conditionParamRef.otherScore != null ">
                ${_conditionType_} a.otherScore = #{${_conditionParam_}.otherScore}
            </if>
            <if test="conditionParamRef.otherScore == null">
                ${_conditionType_} a.otherScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('otherScoreList') and conditionParamRef.otherScoreList.size() > 0">
            ${_conditionType_} a.otherScore in
            <foreach collection="conditionParamRef.otherScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('otherScoreNotList') and conditionParamRef.otherScoreNotList.size() > 0">
            ${_conditionType_} a.otherScore not in
            <foreach collection="conditionParamRef.otherScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('otherScoreStart') and conditionParamRef.otherScoreStart != null">
            ${_conditionType_} a.otherScore <![CDATA[ >= ]]> #{${_conditionParam_}.otherScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('otherScoreEnd') and conditionParamRef.otherScoreEnd != null">
            ${_conditionType_} a.otherScore <![CDATA[ <= ]]> #{${_conditionParam_}.otherScoreEnd}
        </if>

        <if test="conditionParamRef.containsKey('errorScore')">
            <if test="conditionParamRef.errorScore != null ">
                ${_conditionType_} a.errorScore = #{${_conditionParam_}.errorScore}
            </if>
            <if test="conditionParamRef.errorScore == null">
                ${_conditionType_} a.errorScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('errorScoreList') and conditionParamRef.errorScoreList.size() > 0">
            ${_conditionType_} a.errorScore in
            <foreach collection="conditionParamRef.errorScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('errorScoreNotList') and conditionParamRef.errorScoreNotList.size() > 0">
            ${_conditionType_} a.errorScore not in
            <foreach collection="conditionParamRef.errorScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('errorScoreStart') and conditionParamRef.errorScoreStart != null">
            ${_conditionType_} a.errorScore <![CDATA[ >= ]]> #{${_conditionParam_}.errorScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('errorScoreEnd') and conditionParamRef.errorScoreEnd != null">
            ${_conditionType_} a.errorScore <![CDATA[ <= ]]> #{${_conditionParam_}.errorScoreEnd}
        </if>

        <if test="conditionParamRef.containsKey('totalScore')">
            <if test="conditionParamRef.totalScore != null ">
                ${_conditionType_} a.totalScore = #{${_conditionParam_}.totalScore}
            </if>
            <if test="conditionParamRef.totalScore == null">
                ${_conditionType_} a.totalScore is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('totalScoreList') and conditionParamRef.totalScoreList.size() > 0">
            ${_conditionType_} a.totalScore in
            <foreach collection="conditionParamRef.totalScoreList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('totalScoreNotList') and conditionParamRef.totalScoreNotList.size() > 0">
            ${_conditionType_} a.totalScore not in
            <foreach collection="conditionParamRef.totalScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('totalScoreStart') and conditionParamRef.totalScoreStart != null">
            ${_conditionType_} a.totalScore <![CDATA[ >= ]]> #{${_conditionParam_}.totalScoreStart}
        </if>
        <if test="conditionParamRef.containsKey('totalScoreEnd') and conditionParamRef.totalScoreEnd != null">
            ${_conditionType_} a.totalScore <![CDATA[ <= ]]> #{${_conditionParam_}.totalScoreEnd}
        </if>


        <if test="conditionParamRef.containsKey('remark')">
            <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''">
                ${_conditionType_} a.remark like #{${_conditionParam_}.remark}
            </if>
            <if test="conditionParamRef.remark == null">
                ${_conditionType_} a.remark is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0">
            ${_conditionType_} a.remark in
            <foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0">
            ${_conditionType_} a.remark not in
            <foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('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') and conditionParamRef.yearList.size() > 0">
            ${_conditionType_} a.year in
            <foreach collection="conditionParamRef.yearList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('yearNotList') and conditionParamRef.yearNotList.size() > 0">
            ${_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') and conditionParamRef.monthList.size() > 0">
            ${_conditionType_} a.month in
            <foreach collection="conditionParamRef.monthList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('monthNotList') and conditionParamRef.monthNotList.size() > 0">
            ${_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('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('createUserId')">
            <if test="conditionParamRef.createUserId != null ">
                ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId}
            </if>
            <if test="conditionParamRef.createUserId == null">
                ${_conditionType_} a.createUserId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
            ${_conditionType_} a.createUserId in
            <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0">
            ${_conditionType_} a.createUserId not in
            <foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null">
            ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
        </if>
        <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
            ${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
        </if>


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


        <if test="conditionParamRef.containsKey('belongCenter')">
            <if test="conditionParamRef.belongCenter != null and conditionParamRef.belongCenter != ''">
                ${_conditionType_} a.belongCenter like #{${_conditionParam_}.belongCenter}
            </if>
            <if test="conditionParamRef.belongCenter == null">
                ${_conditionType_} a.belongCenter is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('belongCenterList') and conditionParamRef.belongCenterList.size() > 0">
            ${_conditionType_} a.belongCenter in
            <foreach collection="conditionParamRef.belongCenterList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('belongCenterNotList') and conditionParamRef.belongCenterNotList.size() > 0">
            ${_conditionType_} a.belongCenter not in
            <foreach collection="conditionParamRef.belongCenterNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
    </sql>
    <sql id="_orderCols_">
        <if test="orderColList != null and !orderColList.isEmpty()">
            order by
            <trim suffixOverrides=","  suffix="">
                <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
                    ${item.colName} ${item.sortKind}
                </foreach>
            </trim>
        </if>
        <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
            order by
            <trim suffixOverrides=","  suffix="">
                <if test="orderCol.containsKey('id')">
                    a.id
                    <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('staffId')">
                    a.staffId
                    <if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('workNum')">
                    a.workNum
                    <if test='orderCol.workNum != null and "DESC".equalsIgnoreCase(orderCol.workNum)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('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('attendScore')">
                    a.attendScore
                    <if test='orderCol.attendScore != null and "DESC".equalsIgnoreCase(orderCol.attendScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('reviewScore')">
                    a.reviewScore
                    <if test='orderCol.reviewScore != null and "DESC".equalsIgnoreCase(orderCol.reviewScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('complainScore')">
                    a.complainScore
                    <if test='orderCol.complainScore != null and "DESC".equalsIgnoreCase(orderCol.complainScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('goworkScore')">
                    a.goworkScore
                    <if test='orderCol.goworkScore != null and "DESC".equalsIgnoreCase(orderCol.goworkScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('effectScore')">
                    a.effectScore
                    <if test='orderCol.effectScore != null and "DESC".equalsIgnoreCase(orderCol.effectScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('otherScore')">
                    a.otherScore
                    <if test='orderCol.otherScore != null and "DESC".equalsIgnoreCase(orderCol.otherScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('errorScore')">
                    a.errorScore
                    <if test='orderCol.errorScore != null and "DESC".equalsIgnoreCase(orderCol.errorScore)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('totalScore')">
                    a.totalScore
                    <if test='orderCol.totalScore != null and "DESC".equalsIgnoreCase(orderCol.totalScore)'>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('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('createTime')">
                    a.createTime
                    <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>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('updateTime')">
                    a.updateTime
                    <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>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('belongCenter')">
                    a.belongCenter
                    <if test='orderCol.belongCenter != null and "DESC".equalsIgnoreCase(orderCol.belongCenter)'>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>