<?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.window.dao.ibatis.WindowWorkmanPerformDetailDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="WindowWorkmanPerformDetailEntity" id="WindowWorkmanPerformDetailEntity-Map">
            <id  property="id" column="id" />
            <result property="performId" column="performId" />
            <result property="staffId" column="staffId" />
            <result property="staffName" column="staffName" />
            <result property="discipline" column="discipline" />
            <result property="specification" column="specification" />
            <result property="management" column="management" />
            <result property="evaluation" column="evaluation" />
            <result property="efficiency" column="efficiency" />
            <result property="bonusScore" column="bonusScore" />
            <result property="sumScore" column="sumScore" />
            <result property="examineLevel" column="examineLevel" />
            <result property="remark" column="remark" />
            <result property="createUserId" column="createUserId" />
            <result property="createTime" column="createTime" />
            <result property="updateUserId" column="updateUserId" />
            <result property="updateTime" column="updateTime" />
            
    </resultMap>


    <!-- 表所有列 -->
    <sql id="_columns">
        <trim suffixOverrides="," suffix="">
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))">
                    a.id,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('performId') or colPickMode == 1 and data.containsKey('performId')))">
                    a.performId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffId') or colPickMode == 1 and data.containsKey('staffId')))">
                    a.staffId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('staffName') or colPickMode == 1 and data.containsKey('staffName')))">
                    a.staffName,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('discipline') or colPickMode == 1 and data.containsKey('discipline')))">
                    a.discipline,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('specification') or colPickMode == 1 and data.containsKey('specification')))">
                    a.specification,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('management') or colPickMode == 1 and data.containsKey('management')))">
                    a.management,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('evaluation') or colPickMode == 1 and data.containsKey('evaluation')))">
                    a.evaluation,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('efficiency') or colPickMode == 1 and data.containsKey('efficiency')))">
                    a.efficiency,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('bonusScore') or colPickMode == 1 and data.containsKey('bonusScore')))">
                    a.bonusScore,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sumScore') or colPickMode == 1 and data.containsKey('sumScore')))">
                    a.sumScore,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('examineLevel') or colPickMode == 1 and data.containsKey('examineLevel')))">
                    a.examineLevel,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))">
                    a.remark,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
                    a.createUserId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
                    a.createTime,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateUserId') or colPickMode == 1 and data.containsKey('updateUserId')))">
                    a.updateUserId,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
                    a.updateTime,
                </if>
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="WindowWorkmanPerformDetailEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_window_workman_perform_detail
        (performId,staffId,staffName,discipline,specification,management,evaluation,efficiency,bonusScore,sumScore,examineLevel,remark,createUserId,createTime,updateUserId,updateTime)
        VALUES
        (#{performId},#{staffId},#{staffName},#{discipline},#{specification},#{management},#{evaluation},#{efficiency},#{bonusScore},#{sumScore},#{examineLevel},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_window_workman_perform_detail
        (performId,staffId,staffName,discipline,specification,management,evaluation,efficiency,bonusScore,sumScore,examineLevel,remark,createUserId,createTime,updateUserId,updateTime)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.performId},#{item.staffId},#{item.staffName},#{item.discipline},#{item.specification},#{item.management},#{item.evaluation},#{item.efficiency},#{item.bonusScore},#{item.sumScore},#{item.examineLevel},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_window_workman_perform_detail as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('performId')) or (colPickMode==1 and !data.containsKey('performId'))">
                a.performId=#{data.performId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('performIdIncrement')) or (colPickMode==1 and !data.containsKey('performIdIncrement'))">
                a.performId=ifnull(a.performId,0) + #{data.performIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('staffId')) or (colPickMode==1 and !data.containsKey('staffId'))">
                a.staffId=#{data.staffId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('staffIdIncrement')) or (colPickMode==1 and !data.containsKey('staffIdIncrement'))">
                a.staffId=ifnull(a.staffId,0) + #{data.staffIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('staffName')) or (colPickMode==1 and !data.containsKey('staffName'))">
                a.staffName=#{data.staffName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('discipline')) or (colPickMode==1 and !data.containsKey('discipline'))">
                a.discipline=#{data.discipline},
            </if>
            <if test="(colPickMode==0 and data.containsKey('disciplineIncrement')) or (colPickMode==1 and !data.containsKey('disciplineIncrement'))">
                a.discipline=ifnull(a.discipline,0) + #{data.disciplineIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('specification')) or (colPickMode==1 and !data.containsKey('specification'))">
                a.specification=#{data.specification},
            </if>
            <if test="(colPickMode==0 and data.containsKey('specificationIncrement')) or (colPickMode==1 and !data.containsKey('specificationIncrement'))">
                a.specification=ifnull(a.specification,0) + #{data.specificationIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('management')) or (colPickMode==1 and !data.containsKey('management'))">
                a.management=#{data.management},
            </if>
            <if test="(colPickMode==0 and data.containsKey('managementIncrement')) or (colPickMode==1 and !data.containsKey('managementIncrement'))">
                a.management=ifnull(a.management,0) + #{data.managementIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('evaluation')) or (colPickMode==1 and !data.containsKey('evaluation'))">
                a.evaluation=#{data.evaluation},
            </if>
            <if test="(colPickMode==0 and data.containsKey('evaluationIncrement')) or (colPickMode==1 and !data.containsKey('evaluationIncrement'))">
                a.evaluation=ifnull(a.evaluation,0) + #{data.evaluationIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('efficiency')) or (colPickMode==1 and !data.containsKey('efficiency'))">
                a.efficiency=#{data.efficiency},
            </if>
            <if test="(colPickMode==0 and data.containsKey('efficiencyIncrement')) or (colPickMode==1 and !data.containsKey('efficiencyIncrement'))">
                a.efficiency=ifnull(a.efficiency,0) + #{data.efficiencyIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('bonusScore')) or (colPickMode==1 and !data.containsKey('bonusScore'))">
                a.bonusScore=#{data.bonusScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('bonusScoreIncrement')) or (colPickMode==1 and !data.containsKey('bonusScoreIncrement'))">
                a.bonusScore=ifnull(a.bonusScore,0) + #{data.bonusScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sumScore')) or (colPickMode==1 and !data.containsKey('sumScore'))">
                a.sumScore=#{data.sumScore},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sumScoreIncrement')) or (colPickMode==1 and !data.containsKey('sumScoreIncrement'))">
                a.sumScore=ifnull(a.sumScore,0) + #{data.sumScoreIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('examineLevel')) or (colPickMode==1 and !data.containsKey('examineLevel'))">
                a.examineLevel=#{data.examineLevel},
            </if>
            <if test="(colPickMode==0 and data.containsKey('examineLevelIncrement')) or (colPickMode==1 and !data.containsKey('examineLevelIncrement'))">
                a.examineLevel=ifnull(a.examineLevel,0) + #{data.examineLevelIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('remark')) or (colPickMode==1 and !data.containsKey('remark'))">
                a.remark=#{data.remark},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
                a.createUserId=#{data.createUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
                a.createUserId=ifnull(a.createUserId,0) + #{data.createUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
                a.createTime=#{data.createTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUserId')) or (colPickMode==1 and !data.containsKey('updateUserId'))">
                a.updateUserId=#{data.updateUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !data.containsKey('updateUserIdIncrement'))">
                a.updateUserId=ifnull(a.updateUserId,0) + #{data.updateUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
                a.updateTime=#{data.updateTime},
            </if>
        </trim>
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </update>
    <!-- 批量更新 -->
    <update id="updateBatch" parameterType="paramDto">
        update mortals_xhx_window_workman_perform_detail as a
        <trim prefix="set" suffixOverrides=",">
                        <trim prefix="performId=(case" suffix="ELSE performId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('performId')) or (colPickMode==1 and !item.containsKey('performId'))">
                                        when a.id=#{item.id} then #{item.performId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('performIdIncrement')) or (colPickMode==1 and !item.containsKey('performIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.performId,0) + #{item.performIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="staffId=(case" suffix="ELSE staffId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('staffId')) or (colPickMode==1 and !item.containsKey('staffId'))">
                                        when a.id=#{item.id} then #{item.staffId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('staffIdIncrement')) or (colPickMode==1 and !item.containsKey('staffIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.staffId,0) + #{item.staffIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="staffName=(case" suffix="ELSE staffName end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('staffName')) or (colPickMode==1 and !item.containsKey('staffName'))">
                            when a.id=#{item.id} then #{item.staffName}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="discipline=(case" suffix="ELSE discipline end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('discipline')) or (colPickMode==1 and !item.containsKey('discipline'))">
                                        when a.id=#{item.id} then #{item.discipline}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('disciplineIncrement')) or (colPickMode==1 and !item.containsKey('disciplineIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.discipline,0) + #{item.disciplineIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="specification=(case" suffix="ELSE specification end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('specification')) or (colPickMode==1 and !item.containsKey('specification'))">
                                        when a.id=#{item.id} then #{item.specification}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('specificationIncrement')) or (colPickMode==1 and !item.containsKey('specificationIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.specification,0) + #{item.specificationIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="management=(case" suffix="ELSE management end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('management')) or (colPickMode==1 and !item.containsKey('management'))">
                                        when a.id=#{item.id} then #{item.management}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('managementIncrement')) or (colPickMode==1 and !item.containsKey('managementIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.management,0) + #{item.managementIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="evaluation=(case" suffix="ELSE evaluation end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('evaluation')) or (colPickMode==1 and !item.containsKey('evaluation'))">
                                        when a.id=#{item.id} then #{item.evaluation}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('evaluationIncrement')) or (colPickMode==1 and !item.containsKey('evaluationIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.evaluation,0) + #{item.evaluationIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="efficiency=(case" suffix="ELSE efficiency end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('efficiency')) or (colPickMode==1 and !item.containsKey('efficiency'))">
                                        when a.id=#{item.id} then #{item.efficiency}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('efficiencyIncrement')) or (colPickMode==1 and !item.containsKey('efficiencyIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.efficiency,0) + #{item.efficiencyIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="bonusScore=(case" suffix="ELSE bonusScore end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('bonusScore')) or (colPickMode==1 and !item.containsKey('bonusScore'))">
                                        when a.id=#{item.id} then #{item.bonusScore}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('bonusScoreIncrement')) or (colPickMode==1 and !item.containsKey('bonusScoreIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.bonusScore,0) + #{item.bonusScoreIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="sumScore=(case" suffix="ELSE sumScore end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('sumScore')) or (colPickMode==1 and !item.containsKey('sumScore'))">
                                        when a.id=#{item.id} then #{item.sumScore}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('sumScoreIncrement')) or (colPickMode==1 and !item.containsKey('sumScoreIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.sumScore,0) + #{item.sumScoreIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                        <trim prefix="examineLevel=(case" suffix="ELSE examineLevel end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('examineLevel')) or (colPickMode==1 and !item.containsKey('examineLevel'))">
                                        when a.id=#{item.id} then #{item.examineLevel}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('examineLevelIncrement')) or (colPickMode==1 and !item.containsKey('examineLevelIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.examineLevel,0) + #{item.examineLevelIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="remark=(case" suffix="ELSE remark end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))">
                            when a.id=#{item.id} then #{item.remark}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="createUserId=(case" suffix="ELSE createUserId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))">
                                        when a.id=#{item.id} then #{item.createUserId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="createTime=(case" suffix="ELSE createTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))">
                            when a.id=#{item.id} then #{item.createTime}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="updateUserId=(case" suffix="ELSE updateUserId end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('updateUserId')) or (colPickMode==1 and !item.containsKey('updateUserId'))">
                                        when a.id=#{item.id} then #{item.updateUserId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('updateUserIdIncrement')) or (colPickMode==1 and !item.containsKey('updateUserIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.updateUserId,0) + #{item.updateUserIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="updateTime=(case" suffix="ELSE updateTime end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))">
                            when a.id=#{item.id} then #{item.updateTime}
                        </if>
                    </foreach>
                </trim>
        </trim>
        where id in
        <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
            #{item.id}
        </foreach>
    </update>
    <!-- 根据主健查询 -->
    <select id="getByKey" parameterType="paramDto" resultMap="WindowWorkmanPerformDetailEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_window_workman_perform_detail as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_window_workman_perform_detail as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_window_workman_perform_detail where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_window_workman_perform_detail where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

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

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


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

            <if test="conditionParamRef.containsKey('specification')">
                <if test="conditionParamRef.specification != null ">
                    ${_conditionType_} a.specification = #{${_conditionParam_}.specification}
                </if>
                <if test="conditionParamRef.specification == null">
                    ${_conditionType_} a.specification is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('specificationList') and conditionParamRef.specificationList.size() > 0">
                ${_conditionType_} a.specification in
                <foreach collection="conditionParamRef.specificationList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('specificationNotList') and conditionParamRef.specificationNotList.size() > 0">
                ${_conditionType_} a.specification not in
                <foreach collection="conditionParamRef.specificationNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('specificationStart') and conditionParamRef.specificationStart != null">
                ${_conditionType_} a.specification <![CDATA[ >= ]]> #{${_conditionParam_}.specificationStart}
            </if>
            <if test="conditionParamRef.containsKey('specificationEnd') and conditionParamRef.specificationEnd != null">
                ${_conditionType_} a.specification <![CDATA[ <= ]]> #{${_conditionParam_}.specificationEnd}
            </if>

            <if test="conditionParamRef.containsKey('management')">
                <if test="conditionParamRef.management != null ">
                    ${_conditionType_} a.management = #{${_conditionParam_}.management}
                </if>
                <if test="conditionParamRef.management == null">
                    ${_conditionType_} a.management is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('managementList') and conditionParamRef.managementList.size() > 0">
                ${_conditionType_} a.management in
                <foreach collection="conditionParamRef.managementList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('managementNotList') and conditionParamRef.managementNotList.size() > 0">
                ${_conditionType_} a.management not in
                <foreach collection="conditionParamRef.managementNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('managementStart') and conditionParamRef.managementStart != null">
                ${_conditionType_} a.management <![CDATA[ >= ]]> #{${_conditionParam_}.managementStart}
            </if>
            <if test="conditionParamRef.containsKey('managementEnd') and conditionParamRef.managementEnd != null">
                ${_conditionType_} a.management <![CDATA[ <= ]]> #{${_conditionParam_}.managementEnd}
            </if>

            <if test="conditionParamRef.containsKey('evaluation')">
                <if test="conditionParamRef.evaluation != null ">
                    ${_conditionType_} a.evaluation = #{${_conditionParam_}.evaluation}
                </if>
                <if test="conditionParamRef.evaluation == null">
                    ${_conditionType_} a.evaluation is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('evaluationList') and conditionParamRef.evaluationList.size() > 0">
                ${_conditionType_} a.evaluation in
                <foreach collection="conditionParamRef.evaluationList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('evaluationNotList') and conditionParamRef.evaluationNotList.size() > 0">
                ${_conditionType_} a.evaluation not in
                <foreach collection="conditionParamRef.evaluationNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('evaluationStart') and conditionParamRef.evaluationStart != null">
                ${_conditionType_} a.evaluation <![CDATA[ >= ]]> #{${_conditionParam_}.evaluationStart}
            </if>
            <if test="conditionParamRef.containsKey('evaluationEnd') and conditionParamRef.evaluationEnd != null">
                ${_conditionType_} a.evaluation <![CDATA[ <= ]]> #{${_conditionParam_}.evaluationEnd}
            </if>

            <if test="conditionParamRef.containsKey('efficiency')">
                <if test="conditionParamRef.efficiency != null ">
                    ${_conditionType_} a.efficiency = #{${_conditionParam_}.efficiency}
                </if>
                <if test="conditionParamRef.efficiency == null">
                    ${_conditionType_} a.efficiency is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('efficiencyList') and conditionParamRef.efficiencyList.size() > 0">
                ${_conditionType_} a.efficiency in
                <foreach collection="conditionParamRef.efficiencyList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('efficiencyNotList') and conditionParamRef.efficiencyNotList.size() > 0">
                ${_conditionType_} a.efficiency not in
                <foreach collection="conditionParamRef.efficiencyNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('efficiencyStart') and conditionParamRef.efficiencyStart != null">
                ${_conditionType_} a.efficiency <![CDATA[ >= ]]> #{${_conditionParam_}.efficiencyStart}
            </if>
            <if test="conditionParamRef.containsKey('efficiencyEnd') and conditionParamRef.efficiencyEnd != null">
                ${_conditionType_} a.efficiency <![CDATA[ <= ]]> #{${_conditionParam_}.efficiencyEnd}
            </if>

            <if test="conditionParamRef.containsKey('bonusScore')">
                <if test="conditionParamRef.bonusScore != null ">
                    ${_conditionType_} a.bonusScore = #{${_conditionParam_}.bonusScore}
                </if>
                <if test="conditionParamRef.bonusScore == null">
                    ${_conditionType_} a.bonusScore is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('bonusScoreList') and conditionParamRef.bonusScoreList.size() > 0">
                ${_conditionType_} a.bonusScore in
                <foreach collection="conditionParamRef.bonusScoreList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('bonusScoreNotList') and conditionParamRef.bonusScoreNotList.size() > 0">
                ${_conditionType_} a.bonusScore not in
                <foreach collection="conditionParamRef.bonusScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('bonusScoreStart') and conditionParamRef.bonusScoreStart != null">
                ${_conditionType_} a.bonusScore <![CDATA[ >= ]]> #{${_conditionParam_}.bonusScoreStart}
            </if>
            <if test="conditionParamRef.containsKey('bonusScoreEnd') and conditionParamRef.bonusScoreEnd != null">
                ${_conditionType_} a.bonusScore <![CDATA[ <= ]]> #{${_conditionParam_}.bonusScoreEnd}
            </if>

            <if test="conditionParamRef.containsKey('sumScore')">
                <if test="conditionParamRef.sumScore != null ">
                    ${_conditionType_} a.sumScore = #{${_conditionParam_}.sumScore}
                </if>
                <if test="conditionParamRef.sumScore == null">
                    ${_conditionType_} a.sumScore is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('sumScoreList') and conditionParamRef.sumScoreList.size() > 0">
                ${_conditionType_} a.sumScore in
                <foreach collection="conditionParamRef.sumScoreList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('sumScoreNotList') and conditionParamRef.sumScoreNotList.size() > 0">
                ${_conditionType_} a.sumScore not in
                <foreach collection="conditionParamRef.sumScoreNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('sumScoreStart') and conditionParamRef.sumScoreStart != null">
                ${_conditionType_} a.sumScore <![CDATA[ >= ]]> #{${_conditionParam_}.sumScoreStart}
            </if>
            <if test="conditionParamRef.containsKey('sumScoreEnd') and conditionParamRef.sumScoreEnd != null">
                ${_conditionType_} a.sumScore <![CDATA[ <= ]]> #{${_conditionParam_}.sumScoreEnd}
            </if>

            <if test="conditionParamRef.containsKey('examineLevel')">
                <if test="conditionParamRef.examineLevel != null ">
                    ${_conditionType_} a.examineLevel = #{${_conditionParam_}.examineLevel}
                </if>
                <if test="conditionParamRef.examineLevel == null">
                    ${_conditionType_} a.examineLevel is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('examineLevelList') and conditionParamRef.examineLevelList.size() > 0">
                ${_conditionType_} a.examineLevel in
                <foreach collection="conditionParamRef.examineLevelList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('examineLevelNotList') and conditionParamRef.examineLevelNotList.size() > 0">
                ${_conditionType_} a.examineLevel not in
                <foreach collection="conditionParamRef.examineLevelNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('examineLevelStart') and conditionParamRef.examineLevelStart != null">
                ${_conditionType_} a.examineLevel <![CDATA[ >= ]]> #{${_conditionParam_}.examineLevelStart}
            </if>
            <if test="conditionParamRef.containsKey('examineLevelEnd') and conditionParamRef.examineLevelEnd != null">
                ${_conditionType_} a.examineLevel <![CDATA[ <= ]]> #{${_conditionParam_}.examineLevelEnd}
            </if>


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


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


            <if test="conditionParamRef.containsKey('updateTime')">
                <if test="conditionParamRef.updateTime != null ">
                    ${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime}
                </if>
                <if test="conditionParamRef.updateTime == null">
                    ${_conditionType_} a.updateTime is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
                ${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
                ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
    </sql>
    <sql id="_orderCols_">
        <if test="orderColList != null and !orderColList.isEmpty()">
            order by
                    <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
                        field(a.id,
                        <foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('performIdList') and conditionParamRef.performIdList.size() > 0">
                        field(a.performId,
                        <foreach collection="conditionParamRef.performIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
                        field(a.staffId,
                        <foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('disciplineList') and conditionParamRef.disciplineList.size() > 0">
                        field(a.discipline,
                        <foreach collection="conditionParamRef.disciplineList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('specificationList') and conditionParamRef.specificationList.size() > 0">
                        field(a.specification,
                        <foreach collection="conditionParamRef.specificationList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('managementList') and conditionParamRef.managementList.size() > 0">
                        field(a.management,
                        <foreach collection="conditionParamRef.managementList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('evaluationList') and conditionParamRef.evaluationList.size() > 0">
                        field(a.evaluation,
                        <foreach collection="conditionParamRef.evaluationList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('efficiencyList') and conditionParamRef.efficiencyList.size() > 0">
                        field(a.efficiency,
                        <foreach collection="conditionParamRef.efficiencyList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('bonusScoreList') and conditionParamRef.bonusScoreList.size() > 0">
                        field(a.bonusScore,
                        <foreach collection="conditionParamRef.bonusScoreList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('sumScoreList') and conditionParamRef.sumScoreList.size() > 0">
                        field(a.sumScore,
                        <foreach collection="conditionParamRef.sumScoreList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('examineLevelList') and conditionParamRef.examineLevelList.size() > 0">
                        field(a.examineLevel,
                        <foreach collection="conditionParamRef.examineLevelList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
                        field(a.createUserId,
                        <foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
                        field(a.updateUserId,
                        <foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
            <trim suffixOverrides=","  suffix="">
                <foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
                     a.${item.colName} ${item.sortKind}
                </foreach>
            </trim>
        </if>
        <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()">
            order by
                    <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0">
                        field(a.id,
                        <foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('performIdList') and conditionParamRef.performIdList.size() > 0">
                        field(a.performId,
                        <foreach collection="conditionParamRef.performIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('staffIdList') and conditionParamRef.staffIdList.size() > 0">
                        field(a.staffId,
                        <foreach collection="conditionParamRef.staffIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('disciplineList') and conditionParamRef.disciplineList.size() > 0">
                        field(a.discipline,
                        <foreach collection="conditionParamRef.disciplineList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('specificationList') and conditionParamRef.specificationList.size() > 0">
                        field(a.specification,
                        <foreach collection="conditionParamRef.specificationList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('managementList') and conditionParamRef.managementList.size() > 0">
                        field(a.management,
                        <foreach collection="conditionParamRef.managementList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('evaluationList') and conditionParamRef.evaluationList.size() > 0">
                        field(a.evaluation,
                        <foreach collection="conditionParamRef.evaluationList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('efficiencyList') and conditionParamRef.efficiencyList.size() > 0">
                        field(a.efficiency,
                        <foreach collection="conditionParamRef.efficiencyList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('bonusScoreList') and conditionParamRef.bonusScoreList.size() > 0">
                        field(a.bonusScore,
                        <foreach collection="conditionParamRef.bonusScoreList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('sumScoreList') and conditionParamRef.sumScoreList.size() > 0">
                        field(a.sumScore,
                        <foreach collection="conditionParamRef.sumScoreList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('examineLevelList') and conditionParamRef.examineLevelList.size() > 0">
                        field(a.examineLevel,
                        <foreach collection="conditionParamRef.examineLevelList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
                        field(a.createUserId,
                        <foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
                    <if test="conditionParamRef.containsKey('updateUserIdList') and conditionParamRef.updateUserIdList.size() > 0">
                        field(a.updateUserId,
                        <foreach collection="conditionParamRef.updateUserIdList" open="" close=")" index="index" item="item" separator=",">
                            #{item}
                        </foreach>
                        ,
                    </if>
            <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('performId')">
                        a.performId
                        <if test='orderCol.performId != null and "DESC".equalsIgnoreCase(orderCol.performId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('staffId')">
                        a.staffId
                        <if test='orderCol.staffId != null and "DESC".equalsIgnoreCase(orderCol.staffId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('staffName')">
                        a.staffName
                        <if test='orderCol.staffName != null and "DESC".equalsIgnoreCase(orderCol.staffName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('discipline')">
                        a.discipline
                        <if test='orderCol.discipline != null and "DESC".equalsIgnoreCase(orderCol.discipline)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('specification')">
                        a.specification
                        <if test='orderCol.specification != null and "DESC".equalsIgnoreCase(orderCol.specification)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('management')">
                        a.management
                        <if test='orderCol.management != null and "DESC".equalsIgnoreCase(orderCol.management)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('evaluation')">
                        a.evaluation
                        <if test='orderCol.evaluation != null and "DESC".equalsIgnoreCase(orderCol.evaluation)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('efficiency')">
                        a.efficiency
                        <if test='orderCol.efficiency != null and "DESC".equalsIgnoreCase(orderCol.efficiency)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('bonusScore')">
                        a.bonusScore
                        <if test='orderCol.bonusScore != null and "DESC".equalsIgnoreCase(orderCol.bonusScore)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('sumScore')">
                        a.sumScore
                        <if test='orderCol.sumScore != null and "DESC".equalsIgnoreCase(orderCol.sumScore)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('examineLevel')">
                        a.examineLevel
                        <if test='orderCol.examineLevel != null and "DESC".equalsIgnoreCase(orderCol.examineLevel)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('remark')">
                        a.remark
                        <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createUserId')">
                        a.createUserId
                        <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createTime')">
                        a.createTime
                        <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('updateUserId')">
                        a.updateUserId
                        <if test='orderCol.updateUserId != null and "DESC".equalsIgnoreCase(orderCol.updateUserId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('updateTime')">
                        a.updateTime
                        <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
                        ,
                    </if>
            </trim>
        </if>


    </sql>
    <sql id="_group_by_">
        <if test="groupList != null and !groupList.isEmpty()">
            GROUP BY
            <trim suffixOverrides=","  suffix="">
                <foreach collection="groupList" open="" close="" index="index" item="item" separator=",">
                    ${item}
                </foreach>
            </trim>
        </if>
    </sql>
</mapper>