<?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.dept.dao.ibatis.DeptPerformStatDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="DeptPerformStatEntity" id="DeptPerformStatEntity-Map">
            <id  property="id" column="id" />
            <result property="deptId" column="deptId" />
            <result property="deptName" column="deptName" />
            <result property="totalScore" column="totalScore" />
            <result property="attendScoreAdd" column="attendScoreAdd" />
            <result property="attendScoreSub" column="attendScoreSub" />
            <result property="assessScoreAdd" column="assessScoreAdd" />
            <result property="assessScoreSub" column="assessScoreSub" />
            <result property="workScoreAdd" column="workScoreAdd" />
            <result property="workScoreSub" column="workScoreSub" />
            <result property="effectScoreAdd" column="effectScoreAdd" />
            <result property="effectScoreSub" column="effectScoreSub" />
            <result property="otherScoreAdd" column="otherScoreAdd" />
            <result property="otherScoreSub" column="otherScoreSub" />
            <result property="remark" column="remark" />
            <result property="year" column="year" />
            <result property="month" column="month" />
            <result property="day" column="day" />
            <result property="createTime" column="createTime" />
            <result property="createUserId" column="createUserId" />
            <result property="updateTime" column="updateTime" />
            <result property="updateUserId" column="updateUserId" />
            <result property="totalAddScore" column="totalAddScore" />
            <result property="totalSubScore" column="totalSubScore" />
            <result property="complainScoreAdd" column="complainScoreAdd" />
            <result property="complainScoreSub" column="complainScoreSub" />
            <result property="averageScore" column="averageScore" />
            
    </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('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('totalScore') or colPickMode == 1 and data.containsKey('totalScore')))">
                    a.totalScore,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendScoreAdd') or colPickMode == 1 and data.containsKey('attendScoreAdd')))">
                    a.attendScoreAdd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('attendScoreSub') or colPickMode == 1 and data.containsKey('attendScoreSub')))">
                    a.attendScoreSub,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('assessScoreAdd') or colPickMode == 1 and data.containsKey('assessScoreAdd')))">
                    a.assessScoreAdd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('assessScoreSub') or colPickMode == 1 and data.containsKey('assessScoreSub')))">
                    a.assessScoreSub,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workScoreAdd') or colPickMode == 1 and data.containsKey('workScoreAdd')))">
                    a.workScoreAdd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workScoreSub') or colPickMode == 1 and data.containsKey('workScoreSub')))">
                    a.workScoreSub,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('effectScoreAdd') or colPickMode == 1 and data.containsKey('effectScoreAdd')))">
                    a.effectScoreAdd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('effectScoreSub') or colPickMode == 1 and data.containsKey('effectScoreSub')))">
                    a.effectScoreSub,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('otherScoreAdd') or colPickMode == 1 and data.containsKey('otherScoreAdd')))">
                    a.otherScoreAdd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('otherScoreSub') or colPickMode == 1 and data.containsKey('otherScoreSub')))">
                    a.otherScoreSub,
                </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('day') or colPickMode == 1 and data.containsKey('day')))">
                    a.day,
                </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('totalAddScore') or colPickMode == 1 and data.containsKey('totalAddScore')))">
                    a.totalAddScore,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('totalSubScore') or colPickMode == 1 and data.containsKey('totalSubScore')))">
                    a.totalSubScore,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainScoreAdd') or colPickMode == 1 and data.containsKey('complainScoreAdd')))">
                    a.complainScoreAdd,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('complainScoreSub') or colPickMode == 1 and data.containsKey('complainScoreSub')))">
                    a.complainScoreSub,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('averageScore') or colPickMode == 1 and data.containsKey('averageScore')))">
                    a.averageScore,
                </if>
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="DeptPerformStatEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_dept_perform_stat
        (deptId,deptName,totalScore,attendScoreAdd,attendScoreSub,assessScoreAdd,assessScoreSub,workScoreAdd,workScoreSub,effectScoreAdd,effectScoreSub,otherScoreAdd,otherScoreSub,remark,year,month,day,createTime,createUserId,updateTime,updateUserId,totalAddScore,totalSubScore,complainScoreAdd,complainScoreSub,averageScore)
        VALUES
        (#{deptId},#{deptName},#{totalScore},#{attendScoreAdd},#{attendScoreSub},#{assessScoreAdd},#{assessScoreSub},#{workScoreAdd},#{workScoreSub},#{effectScoreAdd},#{effectScoreSub},#{otherScoreAdd},#{otherScoreSub},#{remark},#{year},#{month},#{day},#{createTime},#{createUserId},#{updateTime},#{updateUserId},#{totalAddScore},#{totalSubScore},#{complainScoreAdd},#{complainScoreSub},#{averageScore})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_dept_perform_stat
        (deptId,deptName,totalScore,attendScoreAdd,attendScoreSub,assessScoreAdd,assessScoreSub,workScoreAdd,workScoreSub,effectScoreAdd,effectScoreSub,otherScoreAdd,otherScoreSub,remark,year,month,day,createTime,createUserId,updateTime,updateUserId,totalAddScore,totalSubScore,complainScoreAdd,complainScoreSub,averageScore)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.deptId},#{item.deptName},#{item.totalScore},#{item.attendScoreAdd},#{item.attendScoreSub},#{item.assessScoreAdd},#{item.assessScoreSub},#{item.workScoreAdd},#{item.workScoreSub},#{item.effectScoreAdd},#{item.effectScoreSub},#{item.otherScoreAdd},#{item.otherScoreSub},#{item.remark},#{item.year},#{item.month},#{item.day},#{item.createTime},#{item.createUserId},#{item.updateTime},#{item.updateUserId},#{item.totalAddScore},#{item.totalSubScore},#{item.complainScoreAdd},#{item.complainScoreSub},#{item.averageScore})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_dept_perform_stat as a
        set
        <trim suffixOverrides="," suffix="">
            <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('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('attendScoreAdd')) or (colPickMode==1 and !data.containsKey('attendScoreAdd'))">
                a.attendScoreAdd=#{data.attendScoreAdd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendScoreAddIncrement')) or (colPickMode==1 and !data.containsKey('attendScoreAddIncrement'))">
                a.attendScoreAdd=ifnull(a.attendScoreAdd,0) + #{data.attendScoreAddIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendScoreSub')) or (colPickMode==1 and !data.containsKey('attendScoreSub'))">
                a.attendScoreSub=#{data.attendScoreSub},
            </if>
            <if test="(colPickMode==0 and data.containsKey('attendScoreSubIncrement')) or (colPickMode==1 and !data.containsKey('attendScoreSubIncrement'))">
                a.attendScoreSub=ifnull(a.attendScoreSub,0) + #{data.attendScoreSubIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('assessScoreAdd')) or (colPickMode==1 and !data.containsKey('assessScoreAdd'))">
                a.assessScoreAdd=#{data.assessScoreAdd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('assessScoreAddIncrement')) or (colPickMode==1 and !data.containsKey('assessScoreAddIncrement'))">
                a.assessScoreAdd=ifnull(a.assessScoreAdd,0) + #{data.assessScoreAddIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('assessScoreSub')) or (colPickMode==1 and !data.containsKey('assessScoreSub'))">
                a.assessScoreSub=#{data.assessScoreSub},
            </if>
            <if test="(colPickMode==0 and data.containsKey('assessScoreSubIncrement')) or (colPickMode==1 and !data.containsKey('assessScoreSubIncrement'))">
                a.assessScoreSub=ifnull(a.assessScoreSub,0) + #{data.assessScoreSubIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workScoreAdd')) or (colPickMode==1 and !data.containsKey('workScoreAdd'))">
                a.workScoreAdd=#{data.workScoreAdd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workScoreAddIncrement')) or (colPickMode==1 and !data.containsKey('workScoreAddIncrement'))">
                a.workScoreAdd=ifnull(a.workScoreAdd,0) + #{data.workScoreAddIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workScoreSub')) or (colPickMode==1 and !data.containsKey('workScoreSub'))">
                a.workScoreSub=#{data.workScoreSub},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workScoreSubIncrement')) or (colPickMode==1 and !data.containsKey('workScoreSubIncrement'))">
                a.workScoreSub=ifnull(a.workScoreSub,0) + #{data.workScoreSubIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('effectScoreAdd')) or (colPickMode==1 and !data.containsKey('effectScoreAdd'))">
                a.effectScoreAdd=#{data.effectScoreAdd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('effectScoreAddIncrement')) or (colPickMode==1 and !data.containsKey('effectScoreAddIncrement'))">
                a.effectScoreAdd=ifnull(a.effectScoreAdd,0) + #{data.effectScoreAddIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('effectScoreSub')) or (colPickMode==1 and !data.containsKey('effectScoreSub'))">
                a.effectScoreSub=#{data.effectScoreSub},
            </if>
            <if test="(colPickMode==0 and data.containsKey('effectScoreSubIncrement')) or (colPickMode==1 and !data.containsKey('effectScoreSubIncrement'))">
                a.effectScoreSub=ifnull(a.effectScoreSub,0) + #{data.effectScoreSubIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherScoreAdd')) or (colPickMode==1 and !data.containsKey('otherScoreAdd'))">
                a.otherScoreAdd=#{data.otherScoreAdd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherScoreAddIncrement')) or (colPickMode==1 and !data.containsKey('otherScoreAddIncrement'))">
                a.otherScoreAdd=ifnull(a.otherScoreAdd,0) + #{data.otherScoreAddIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherScoreSub')) or (colPickMode==1 and !data.containsKey('otherScoreSub'))">
                a.otherScoreSub=#{data.otherScoreSub},
            </if>
            <if test="(colPickMode==0 and data.containsKey('otherScoreSubIncrement')) or (colPickMode==1 and !data.containsKey('otherScoreSubIncrement'))">
                a.otherScoreSub=ifnull(a.otherScoreSub,0) + #{data.otherScoreSubIncrement},
            </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('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('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('totalAddScore')) or (colPickMode==1 and !data.containsKey('totalAddScore'))">
                a.totalAddScore=#{data.totalAddScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('totalAddScoreIncrement')) or (colPickMode==1 and !data.containsKey('totalAddScoreIncrement'))">
                a.totalAddScore=ifnull(a.totalAddScore,0) + #{data.totalAddScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('totalSubScore')) or (colPickMode==1 and !data.containsKey('totalSubScore'))">
                a.totalSubScore=#{data.totalSubScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('totalSubScoreIncrement')) or (colPickMode==1 and !data.containsKey('totalSubScoreIncrement'))">
                a.totalSubScore=ifnull(a.totalSubScore,0) + #{data.totalSubScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainScoreAdd')) or (colPickMode==1 and !data.containsKey('complainScoreAdd'))">
                a.complainScoreAdd=#{data.complainScoreAdd},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainScoreAddIncrement')) or (colPickMode==1 and !data.containsKey('complainScoreAddIncrement'))">
                a.complainScoreAdd=ifnull(a.complainScoreAdd,0) + #{data.complainScoreAddIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainScoreSub')) or (colPickMode==1 and !data.containsKey('complainScoreSub'))">
                a.complainScoreSub=#{data.complainScoreSub},
            </if>
            <if test="(colPickMode==0 and data.containsKey('complainScoreSubIncrement')) or (colPickMode==1 and !data.containsKey('complainScoreSubIncrement'))">
                a.complainScoreSub=ifnull(a.complainScoreSub,0) + #{data.complainScoreSubIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('averageScore')) or (colPickMode==1 and !data.containsKey('averageScore'))">
                a.averageScore=#{data.averageScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('averageScoreIncrement')) or (colPickMode==1 and !data.containsKey('averageScoreIncrement'))">
                a.averageScore=ifnull(a.averageScore,0) + #{data.averageScoreIncrement},
            </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_dept_perform_stat as a
        <trim prefix="set" suffixOverrides=",">
                        <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="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="attendScoreAdd=(case" suffix="ELSE attendScoreAdd end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('attendScoreAdd')) or (colPickMode==1 and !item.containsKey('attendScoreAdd'))">
                                        when a.id=#{item.id} then #{item.attendScoreAdd}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('attendScoreAddIncrement')) or (colPickMode==1 and !item.containsKey('attendScoreAddIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.attendScoreAdd,0) + #{item.attendScoreAddIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="attendScoreSub=(case" suffix="ELSE attendScoreSub end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('attendScoreSub')) or (colPickMode==1 and !item.containsKey('attendScoreSub'))">
                                        when a.id=#{item.id} then #{item.attendScoreSub}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('attendScoreSubIncrement')) or (colPickMode==1 and !item.containsKey('attendScoreSubIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.attendScoreSub,0) + #{item.attendScoreSubIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="assessScoreAdd=(case" suffix="ELSE assessScoreAdd end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('assessScoreAdd')) or (colPickMode==1 and !item.containsKey('assessScoreAdd'))">
                                        when a.id=#{item.id} then #{item.assessScoreAdd}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('assessScoreAddIncrement')) or (colPickMode==1 and !item.containsKey('assessScoreAddIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.assessScoreAdd,0) + #{item.assessScoreAddIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="assessScoreSub=(case" suffix="ELSE assessScoreSub end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('assessScoreSub')) or (colPickMode==1 and !item.containsKey('assessScoreSub'))">
                                        when a.id=#{item.id} then #{item.assessScoreSub}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('assessScoreSubIncrement')) or (colPickMode==1 and !item.containsKey('assessScoreSubIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.assessScoreSub,0) + #{item.assessScoreSubIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="workScoreAdd=(case" suffix="ELSE workScoreAdd end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('workScoreAdd')) or (colPickMode==1 and !item.containsKey('workScoreAdd'))">
                                        when a.id=#{item.id} then #{item.workScoreAdd}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('workScoreAddIncrement')) or (colPickMode==1 and !item.containsKey('workScoreAddIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.workScoreAdd,0) + #{item.workScoreAddIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="workScoreSub=(case" suffix="ELSE workScoreSub end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('workScoreSub')) or (colPickMode==1 and !item.containsKey('workScoreSub'))">
                                        when a.id=#{item.id} then #{item.workScoreSub}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('workScoreSubIncrement')) or (colPickMode==1 and !item.containsKey('workScoreSubIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.workScoreSub,0) + #{item.workScoreSubIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="effectScoreAdd=(case" suffix="ELSE effectScoreAdd end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('effectScoreAdd')) or (colPickMode==1 and !item.containsKey('effectScoreAdd'))">
                                        when a.id=#{item.id} then #{item.effectScoreAdd}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('effectScoreAddIncrement')) or (colPickMode==1 and !item.containsKey('effectScoreAddIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.effectScoreAdd,0) + #{item.effectScoreAddIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="effectScoreSub=(case" suffix="ELSE effectScoreSub end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('effectScoreSub')) or (colPickMode==1 and !item.containsKey('effectScoreSub'))">
                                        when a.id=#{item.id} then #{item.effectScoreSub}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('effectScoreSubIncrement')) or (colPickMode==1 and !item.containsKey('effectScoreSubIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.effectScoreSub,0) + #{item.effectScoreSubIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="otherScoreAdd=(case" suffix="ELSE otherScoreAdd end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('otherScoreAdd')) or (colPickMode==1 and !item.containsKey('otherScoreAdd'))">
                                        when a.id=#{item.id} then #{item.otherScoreAdd}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('otherScoreAddIncrement')) or (colPickMode==1 and !item.containsKey('otherScoreAddIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.otherScoreAdd,0) + #{item.otherScoreAddIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="otherScoreSub=(case" suffix="ELSE otherScoreSub end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('otherScoreSub')) or (colPickMode==1 and !item.containsKey('otherScoreSub'))">
                                        when a.id=#{item.id} then #{item.otherScoreSub}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('otherScoreSubIncrement')) or (colPickMode==1 and !item.containsKey('otherScoreSubIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.otherScoreSub,0) + #{item.otherScoreSubIncrement}
                                    </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="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="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="totalAddScore=(case" suffix="ELSE totalAddScore end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('totalAddScore')) or (colPickMode==1 and !item.containsKey('totalAddScore'))">
                                        when a.id=#{item.id} then #{item.totalAddScore}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('totalAddScoreIncrement')) or (colPickMode==1 and !item.containsKey('totalAddScoreIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.totalAddScore,0) + #{item.totalAddScoreIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="totalSubScore=(case" suffix="ELSE totalSubScore end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('totalSubScore')) or (colPickMode==1 and !item.containsKey('totalSubScore'))">
                                        when a.id=#{item.id} then #{item.totalSubScore}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('totalSubScoreIncrement')) or (colPickMode==1 and !item.containsKey('totalSubScoreIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.totalSubScore,0) + #{item.totalSubScoreIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="complainScoreAdd=(case" suffix="ELSE complainScoreAdd end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('complainScoreAdd')) or (colPickMode==1 and !item.containsKey('complainScoreAdd'))">
                                        when a.id=#{item.id} then #{item.complainScoreAdd}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('complainScoreAddIncrement')) or (colPickMode==1 and !item.containsKey('complainScoreAddIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.complainScoreAdd,0) + #{item.complainScoreAddIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="complainScoreSub=(case" suffix="ELSE complainScoreSub end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('complainScoreSub')) or (colPickMode==1 and !item.containsKey('complainScoreSub'))">
                                        when a.id=#{item.id} then #{item.complainScoreSub}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('complainScoreSubIncrement')) or (colPickMode==1 and !item.containsKey('complainScoreSubIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.complainScoreSub,0) + #{item.complainScoreSubIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="averageScore=(case" suffix="ELSE averageScore end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('averageScore')) or (colPickMode==1 and !item.containsKey('averageScore'))">
                                        when a.id=#{item.id} then #{item.averageScore}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('averageScoreIncrement')) or (colPickMode==1 and !item.containsKey('averageScoreIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.averageScore,0) + #{item.averageScoreIncrement}
                                    </when>
                                </choose>
                            </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="DeptPerformStatEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_dept_perform_stat as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_dept_perform_stat as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_dept_perform_stat where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_dept_perform_stat where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <!-- 根据对象列表删除一批，针对单一主健有效 -->
    <delete id="deleteByEntityList">
        delete from mortals_xhx_dept_perform_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_dept_perform_stat as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="DeptPerformStatEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_dept_perform_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_dept_perform_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') 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('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('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('attendScoreAdd')">
                <if test="conditionParamRef.attendScoreAdd != null ">
                    ${_conditionType_} a.attendScoreAdd = #{${_conditionParam_}.attendScoreAdd}
                </if>
                <if test="conditionParamRef.attendScoreAdd == null">
                    ${_conditionType_} a.attendScoreAdd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('attendScoreAddList') and conditionParamRef.attendScoreAddList.size() > 0">
                ${_conditionType_} a.attendScoreAdd in
                <foreach collection="conditionParamRef.attendScoreAddList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendScoreAddNotList') and conditionParamRef.attendScoreAddNotList.size() > 0">
                ${_conditionType_} a.attendScoreAdd not in
                <foreach collection="conditionParamRef.attendScoreAddNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendScoreAddStart') and conditionParamRef.attendScoreAddStart != null">
                ${_conditionType_} a.attendScoreAdd <![CDATA[ >= ]]> #{${_conditionParam_}.attendScoreAddStart}
            </if>
            <if test="conditionParamRef.containsKey('attendScoreAddEnd') and conditionParamRef.attendScoreAddEnd != null">
                ${_conditionType_} a.attendScoreAdd <![CDATA[ <= ]]> #{${_conditionParam_}.attendScoreAddEnd}
            </if>

            <if test="conditionParamRef.containsKey('attendScoreSub')">
                <if test="conditionParamRef.attendScoreSub != null ">
                    ${_conditionType_} a.attendScoreSub = #{${_conditionParam_}.attendScoreSub}
                </if>
                <if test="conditionParamRef.attendScoreSub == null">
                    ${_conditionType_} a.attendScoreSub is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('attendScoreSubList') and conditionParamRef.attendScoreSubList.size() > 0">
                ${_conditionType_} a.attendScoreSub in
                <foreach collection="conditionParamRef.attendScoreSubList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendScoreSubNotList') and conditionParamRef.attendScoreSubNotList.size() > 0">
                ${_conditionType_} a.attendScoreSub not in
                <foreach collection="conditionParamRef.attendScoreSubNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('attendScoreSubStart') and conditionParamRef.attendScoreSubStart != null">
                ${_conditionType_} a.attendScoreSub <![CDATA[ >= ]]> #{${_conditionParam_}.attendScoreSubStart}
            </if>
            <if test="conditionParamRef.containsKey('attendScoreSubEnd') and conditionParamRef.attendScoreSubEnd != null">
                ${_conditionType_} a.attendScoreSub <![CDATA[ <= ]]> #{${_conditionParam_}.attendScoreSubEnd}
            </if>

            <if test="conditionParamRef.containsKey('assessScoreAdd')">
                <if test="conditionParamRef.assessScoreAdd != null ">
                    ${_conditionType_} a.assessScoreAdd = #{${_conditionParam_}.assessScoreAdd}
                </if>
                <if test="conditionParamRef.assessScoreAdd == null">
                    ${_conditionType_} a.assessScoreAdd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('assessScoreAddList') and conditionParamRef.assessScoreAddList.size() > 0">
                ${_conditionType_} a.assessScoreAdd in
                <foreach collection="conditionParamRef.assessScoreAddList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('assessScoreAddNotList') and conditionParamRef.assessScoreAddNotList.size() > 0">
                ${_conditionType_} a.assessScoreAdd not in
                <foreach collection="conditionParamRef.assessScoreAddNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('assessScoreAddStart') and conditionParamRef.assessScoreAddStart != null">
                ${_conditionType_} a.assessScoreAdd <![CDATA[ >= ]]> #{${_conditionParam_}.assessScoreAddStart}
            </if>
            <if test="conditionParamRef.containsKey('assessScoreAddEnd') and conditionParamRef.assessScoreAddEnd != null">
                ${_conditionType_} a.assessScoreAdd <![CDATA[ <= ]]> #{${_conditionParam_}.assessScoreAddEnd}
            </if>

            <if test="conditionParamRef.containsKey('assessScoreSub')">
                <if test="conditionParamRef.assessScoreSub != null ">
                    ${_conditionType_} a.assessScoreSub = #{${_conditionParam_}.assessScoreSub}
                </if>
                <if test="conditionParamRef.assessScoreSub == null">
                    ${_conditionType_} a.assessScoreSub is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('assessScoreSubList') and conditionParamRef.assessScoreSubList.size() > 0">
                ${_conditionType_} a.assessScoreSub in
                <foreach collection="conditionParamRef.assessScoreSubList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('assessScoreSubNotList') and conditionParamRef.assessScoreSubNotList.size() > 0">
                ${_conditionType_} a.assessScoreSub not in
                <foreach collection="conditionParamRef.assessScoreSubNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('assessScoreSubStart') and conditionParamRef.assessScoreSubStart != null">
                ${_conditionType_} a.assessScoreSub <![CDATA[ >= ]]> #{${_conditionParam_}.assessScoreSubStart}
            </if>
            <if test="conditionParamRef.containsKey('assessScoreSubEnd') and conditionParamRef.assessScoreSubEnd != null">
                ${_conditionType_} a.assessScoreSub <![CDATA[ <= ]]> #{${_conditionParam_}.assessScoreSubEnd}
            </if>

            <if test="conditionParamRef.containsKey('workScoreAdd')">
                <if test="conditionParamRef.workScoreAdd != null ">
                    ${_conditionType_} a.workScoreAdd = #{${_conditionParam_}.workScoreAdd}
                </if>
                <if test="conditionParamRef.workScoreAdd == null">
                    ${_conditionType_} a.workScoreAdd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('workScoreAddList') and conditionParamRef.workScoreAddList.size() > 0">
                ${_conditionType_} a.workScoreAdd in
                <foreach collection="conditionParamRef.workScoreAddList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workScoreAddNotList') and conditionParamRef.workScoreAddNotList.size() > 0">
                ${_conditionType_} a.workScoreAdd not in
                <foreach collection="conditionParamRef.workScoreAddNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workScoreAddStart') and conditionParamRef.workScoreAddStart != null">
                ${_conditionType_} a.workScoreAdd <![CDATA[ >= ]]> #{${_conditionParam_}.workScoreAddStart}
            </if>
            <if test="conditionParamRef.containsKey('workScoreAddEnd') and conditionParamRef.workScoreAddEnd != null">
                ${_conditionType_} a.workScoreAdd <![CDATA[ <= ]]> #{${_conditionParam_}.workScoreAddEnd}
            </if>

            <if test="conditionParamRef.containsKey('workScoreSub')">
                <if test="conditionParamRef.workScoreSub != null ">
                    ${_conditionType_} a.workScoreSub = #{${_conditionParam_}.workScoreSub}
                </if>
                <if test="conditionParamRef.workScoreSub == null">
                    ${_conditionType_} a.workScoreSub is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('workScoreSubList') and conditionParamRef.workScoreSubList.size() > 0">
                ${_conditionType_} a.workScoreSub in
                <foreach collection="conditionParamRef.workScoreSubList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workScoreSubNotList') and conditionParamRef.workScoreSubNotList.size() > 0">
                ${_conditionType_} a.workScoreSub not in
                <foreach collection="conditionParamRef.workScoreSubNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('workScoreSubStart') and conditionParamRef.workScoreSubStart != null">
                ${_conditionType_} a.workScoreSub <![CDATA[ >= ]]> #{${_conditionParam_}.workScoreSubStart}
            </if>
            <if test="conditionParamRef.containsKey('workScoreSubEnd') and conditionParamRef.workScoreSubEnd != null">
                ${_conditionType_} a.workScoreSub <![CDATA[ <= ]]> #{${_conditionParam_}.workScoreSubEnd}
            </if>

            <if test="conditionParamRef.containsKey('effectScoreAdd')">
                <if test="conditionParamRef.effectScoreAdd != null ">
                    ${_conditionType_} a.effectScoreAdd = #{${_conditionParam_}.effectScoreAdd}
                </if>
                <if test="conditionParamRef.effectScoreAdd == null">
                    ${_conditionType_} a.effectScoreAdd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('effectScoreAddList') and conditionParamRef.effectScoreAddList.size() > 0">
                ${_conditionType_} a.effectScoreAdd in
                <foreach collection="conditionParamRef.effectScoreAddList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('effectScoreAddNotList') and conditionParamRef.effectScoreAddNotList.size() > 0">
                ${_conditionType_} a.effectScoreAdd not in
                <foreach collection="conditionParamRef.effectScoreAddNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('effectScoreAddStart') and conditionParamRef.effectScoreAddStart != null">
                ${_conditionType_} a.effectScoreAdd <![CDATA[ >= ]]> #{${_conditionParam_}.effectScoreAddStart}
            </if>
            <if test="conditionParamRef.containsKey('effectScoreAddEnd') and conditionParamRef.effectScoreAddEnd != null">
                ${_conditionType_} a.effectScoreAdd <![CDATA[ <= ]]> #{${_conditionParam_}.effectScoreAddEnd}
            </if>

            <if test="conditionParamRef.containsKey('effectScoreSub')">
                <if test="conditionParamRef.effectScoreSub != null ">
                    ${_conditionType_} a.effectScoreSub = #{${_conditionParam_}.effectScoreSub}
                </if>
                <if test="conditionParamRef.effectScoreSub == null">
                    ${_conditionType_} a.effectScoreSub is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('effectScoreSubList') and conditionParamRef.effectScoreSubList.size() > 0">
                ${_conditionType_} a.effectScoreSub in
                <foreach collection="conditionParamRef.effectScoreSubList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('effectScoreSubNotList') and conditionParamRef.effectScoreSubNotList.size() > 0">
                ${_conditionType_} a.effectScoreSub not in
                <foreach collection="conditionParamRef.effectScoreSubNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('effectScoreSubStart') and conditionParamRef.effectScoreSubStart != null">
                ${_conditionType_} a.effectScoreSub <![CDATA[ >= ]]> #{${_conditionParam_}.effectScoreSubStart}
            </if>
            <if test="conditionParamRef.containsKey('effectScoreSubEnd') and conditionParamRef.effectScoreSubEnd != null">
                ${_conditionType_} a.effectScoreSub <![CDATA[ <= ]]> #{${_conditionParam_}.effectScoreSubEnd}
            </if>

            <if test="conditionParamRef.containsKey('otherScoreAdd')">
                <if test="conditionParamRef.otherScoreAdd != null ">
                    ${_conditionType_} a.otherScoreAdd = #{${_conditionParam_}.otherScoreAdd}
                </if>
                <if test="conditionParamRef.otherScoreAdd == null">
                    ${_conditionType_} a.otherScoreAdd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('otherScoreAddList') and conditionParamRef.otherScoreAddList.size() > 0">
                ${_conditionType_} a.otherScoreAdd in
                <foreach collection="conditionParamRef.otherScoreAddList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('otherScoreAddNotList') and conditionParamRef.otherScoreAddNotList.size() > 0">
                ${_conditionType_} a.otherScoreAdd not in
                <foreach collection="conditionParamRef.otherScoreAddNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('otherScoreAddStart') and conditionParamRef.otherScoreAddStart != null">
                ${_conditionType_} a.otherScoreAdd <![CDATA[ >= ]]> #{${_conditionParam_}.otherScoreAddStart}
            </if>
            <if test="conditionParamRef.containsKey('otherScoreAddEnd') and conditionParamRef.otherScoreAddEnd != null">
                ${_conditionType_} a.otherScoreAdd <![CDATA[ <= ]]> #{${_conditionParam_}.otherScoreAddEnd}
            </if>

            <if test="conditionParamRef.containsKey('otherScoreSub')">
                <if test="conditionParamRef.otherScoreSub != null ">
                    ${_conditionType_} a.otherScoreSub = #{${_conditionParam_}.otherScoreSub}
                </if>
                <if test="conditionParamRef.otherScoreSub == null">
                    ${_conditionType_} a.otherScoreSub is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('otherScoreSubList') and conditionParamRef.otherScoreSubList.size() > 0">
                ${_conditionType_} a.otherScoreSub in
                <foreach collection="conditionParamRef.otherScoreSubList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('otherScoreSubNotList') and conditionParamRef.otherScoreSubNotList.size() > 0">
                ${_conditionType_} a.otherScoreSub not in
                <foreach collection="conditionParamRef.otherScoreSubNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('otherScoreSubStart') and conditionParamRef.otherScoreSubStart != null">
                ${_conditionType_} a.otherScoreSub <![CDATA[ >= ]]> #{${_conditionParam_}.otherScoreSubStart}
            </if>
            <if test="conditionParamRef.containsKey('otherScoreSubEnd') and conditionParamRef.otherScoreSubEnd != null">
                ${_conditionType_} a.otherScoreSub <![CDATA[ <= ]]> #{${_conditionParam_}.otherScoreSubEnd}
            </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('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') and conditionParamRef.dayList.size() > 0">
                ${_conditionType_} a.day in
                <foreach collection="conditionParamRef.dayList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('dayNotList') and conditionParamRef.dayNotList.size() > 0">
                ${_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('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('totalAddScore')">
                <if test="conditionParamRef.totalAddScore != null ">
                    ${_conditionType_} a.totalAddScore = #{${_conditionParam_}.totalAddScore}
                </if>
                <if test="conditionParamRef.totalAddScore == null">
                    ${_conditionType_} a.totalAddScore is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('totalAddScoreList') and conditionParamRef.totalAddScoreList.size() > 0">
                ${_conditionType_} a.totalAddScore in
                <foreach collection="conditionParamRef.totalAddScoreList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('totalAddScoreNotList') and conditionParamRef.totalAddScoreNotList.size() > 0">
                ${_conditionType_} a.totalAddScore not in
                <foreach collection="conditionParamRef.totalAddScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('totalAddScoreStart') and conditionParamRef.totalAddScoreStart != null">
                ${_conditionType_} a.totalAddScore <![CDATA[ >= ]]> #{${_conditionParam_}.totalAddScoreStart}
            </if>
            <if test="conditionParamRef.containsKey('totalAddScoreEnd') and conditionParamRef.totalAddScoreEnd != null">
                ${_conditionType_} a.totalAddScore <![CDATA[ <= ]]> #{${_conditionParam_}.totalAddScoreEnd}
            </if>

            <if test="conditionParamRef.containsKey('totalSubScore')">
                <if test="conditionParamRef.totalSubScore != null ">
                    ${_conditionType_} a.totalSubScore = #{${_conditionParam_}.totalSubScore}
                </if>
                <if test="conditionParamRef.totalSubScore == null">
                    ${_conditionType_} a.totalSubScore is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('totalSubScoreList') and conditionParamRef.totalSubScoreList.size() > 0">
                ${_conditionType_} a.totalSubScore in
                <foreach collection="conditionParamRef.totalSubScoreList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('totalSubScoreNotList') and conditionParamRef.totalSubScoreNotList.size() > 0">
                ${_conditionType_} a.totalSubScore not in
                <foreach collection="conditionParamRef.totalSubScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('totalSubScoreStart') and conditionParamRef.totalSubScoreStart != null">
                ${_conditionType_} a.totalSubScore <![CDATA[ >= ]]> #{${_conditionParam_}.totalSubScoreStart}
            </if>
            <if test="conditionParamRef.containsKey('totalSubScoreEnd') and conditionParamRef.totalSubScoreEnd != null">
                ${_conditionType_} a.totalSubScore <![CDATA[ <= ]]> #{${_conditionParam_}.totalSubScoreEnd}
            </if>

            <if test="conditionParamRef.containsKey('complainScoreAdd')">
                <if test="conditionParamRef.complainScoreAdd != null ">
                    ${_conditionType_} a.complainScoreAdd = #{${_conditionParam_}.complainScoreAdd}
                </if>
                <if test="conditionParamRef.complainScoreAdd == null">
                    ${_conditionType_} a.complainScoreAdd is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainScoreAddList') and conditionParamRef.complainScoreAddList.size() > 0">
                ${_conditionType_} a.complainScoreAdd in
                <foreach collection="conditionParamRef.complainScoreAddList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainScoreAddNotList') and conditionParamRef.complainScoreAddNotList.size() > 0">
                ${_conditionType_} a.complainScoreAdd not in
                <foreach collection="conditionParamRef.complainScoreAddNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainScoreAddStart') and conditionParamRef.complainScoreAddStart != null">
                ${_conditionType_} a.complainScoreAdd <![CDATA[ >= ]]> #{${_conditionParam_}.complainScoreAddStart}
            </if>
            <if test="conditionParamRef.containsKey('complainScoreAddEnd') and conditionParamRef.complainScoreAddEnd != null">
                ${_conditionType_} a.complainScoreAdd <![CDATA[ <= ]]> #{${_conditionParam_}.complainScoreAddEnd}
            </if>

            <if test="conditionParamRef.containsKey('complainScoreSub')">
                <if test="conditionParamRef.complainScoreSub != null ">
                    ${_conditionType_} a.complainScoreSub = #{${_conditionParam_}.complainScoreSub}
                </if>
                <if test="conditionParamRef.complainScoreSub == null">
                    ${_conditionType_} a.complainScoreSub is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('complainScoreSubList') and conditionParamRef.complainScoreSubList.size() > 0">
                ${_conditionType_} a.complainScoreSub in
                <foreach collection="conditionParamRef.complainScoreSubList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainScoreSubNotList') and conditionParamRef.complainScoreSubNotList.size() > 0">
                ${_conditionType_} a.complainScoreSub not in
                <foreach collection="conditionParamRef.complainScoreSubNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('complainScoreSubStart') and conditionParamRef.complainScoreSubStart != null">
                ${_conditionType_} a.complainScoreSub <![CDATA[ >= ]]> #{${_conditionParam_}.complainScoreSubStart}
            </if>
            <if test="conditionParamRef.containsKey('complainScoreSubEnd') and conditionParamRef.complainScoreSubEnd != null">
                ${_conditionType_} a.complainScoreSub <![CDATA[ <= ]]> #{${_conditionParam_}.complainScoreSubEnd}
            </if>

            <if test="conditionParamRef.containsKey('averageScore')">
                <if test="conditionParamRef.averageScore != null ">
                    ${_conditionType_} a.averageScore = #{${_conditionParam_}.averageScore}
                </if>
                <if test="conditionParamRef.averageScore == null">
                    ${_conditionType_} a.averageScore is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('averageScoreList') and conditionParamRef.averageScoreList.size() > 0">
                ${_conditionType_} a.averageScore in
                <foreach collection="conditionParamRef.averageScoreList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('averageScoreNotList') and conditionParamRef.averageScoreNotList.size() > 0">
                ${_conditionType_} a.averageScore not in
                <foreach collection="conditionParamRef.averageScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('averageScoreStart') and conditionParamRef.averageScoreStart != null">
                ${_conditionType_} a.averageScore <![CDATA[ >= ]]> #{${_conditionParam_}.averageScoreStart}
            </if>
            <if test="conditionParamRef.containsKey('averageScoreEnd') and conditionParamRef.averageScoreEnd != null">
                ${_conditionType_} a.averageScore <![CDATA[ <= ]]> #{${_conditionParam_}.averageScoreEnd}
            </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('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('totalScore')">
                        a.totalScore
                        <if test='orderCol.totalScore != null and "DESC".equalsIgnoreCase(orderCol.totalScore)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('attendScoreAdd')">
                        a.attendScoreAdd
                        <if test='orderCol.attendScoreAdd != null and "DESC".equalsIgnoreCase(orderCol.attendScoreAdd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('attendScoreSub')">
                        a.attendScoreSub
                        <if test='orderCol.attendScoreSub != null and "DESC".equalsIgnoreCase(orderCol.attendScoreSub)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('assessScoreAdd')">
                        a.assessScoreAdd
                        <if test='orderCol.assessScoreAdd != null and "DESC".equalsIgnoreCase(orderCol.assessScoreAdd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('assessScoreSub')">
                        a.assessScoreSub
                        <if test='orderCol.assessScoreSub != null and "DESC".equalsIgnoreCase(orderCol.assessScoreSub)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workScoreAdd')">
                        a.workScoreAdd
                        <if test='orderCol.workScoreAdd != null and "DESC".equalsIgnoreCase(orderCol.workScoreAdd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workScoreSub')">
                        a.workScoreSub
                        <if test='orderCol.workScoreSub != null and "DESC".equalsIgnoreCase(orderCol.workScoreSub)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('effectScoreAdd')">
                        a.effectScoreAdd
                        <if test='orderCol.effectScoreAdd != null and "DESC".equalsIgnoreCase(orderCol.effectScoreAdd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('effectScoreSub')">
                        a.effectScoreSub
                        <if test='orderCol.effectScoreSub != null and "DESC".equalsIgnoreCase(orderCol.effectScoreSub)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('otherScoreAdd')">
                        a.otherScoreAdd
                        <if test='orderCol.otherScoreAdd != null and "DESC".equalsIgnoreCase(orderCol.otherScoreAdd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('otherScoreSub')">
                        a.otherScoreSub
                        <if test='orderCol.otherScoreSub != null and "DESC".equalsIgnoreCase(orderCol.otherScoreSub)'>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('day')">
                        a.day
                        <if test='orderCol.day != null and "DESC".equalsIgnoreCase(orderCol.day)'>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('totalAddScore')">
                        a.totalAddScore
                        <if test='orderCol.totalAddScore != null and "DESC".equalsIgnoreCase(orderCol.totalAddScore)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('totalSubScore')">
                        a.totalSubScore
                        <if test='orderCol.totalSubScore != null and "DESC".equalsIgnoreCase(orderCol.totalSubScore)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainScoreAdd')">
                        a.complainScoreAdd
                        <if test='orderCol.complainScoreAdd != null and "DESC".equalsIgnoreCase(orderCol.complainScoreAdd)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('complainScoreSub')">
                        a.complainScoreSub
                        <if test='orderCol.complainScoreSub != null and "DESC".equalsIgnoreCase(orderCol.complainScoreSub)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('averageScore')">
                        a.averageScore
                        <if test='orderCol.averageScore != null and "DESC".equalsIgnoreCase(orderCol.averageScore)'>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>