<?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">

    <select id="getListExt" parameterType="paramDto" resultType="com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity">
        SELECT * FROM
        (
         SELECT d.*,p.`year`,p.`month` FROM mortals_xhx_window_workman_perform p,mortals_xhx_window_workman_perform_detail d WHERE p.id = d.performId
        ) a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_ext_"/>
            </trim>
        </trim>
        <include refid="_orderCols_ext_"/>
    </select>

    <select id="getListCountExt" parameterType="paramDto" resultType="int">
        SELECT count(1) FROM
        (
        SELECT d.*,p.`year`,p.`month` FROM mortals_xhx_window_workman_perform p,mortals_xhx_window_workman_perform_detail d WHERE p.id = d.performId
        ) a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_ext_"/>
            </trim>
        </trim>
    </select>

    <sql id="_condition_ext_">
        <if test="condition != null and !condition.isEmpty()">
            <!-- 条件映射-普通条件 -->
            <include refid="_condition_param_ext_">
                <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_ext_">
        <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>
        <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('salaId')">
            <if test="conditionParamRef.salaId != null ">
                ${_conditionType_} a.salaId = #{${_conditionParam_}.salaId}
            </if>
            <if test="conditionParamRef.salaId == null">
                ${_conditionType_} a.salaId is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
            ${_conditionType_} a.salaId in
            <foreach collection="conditionParamRef.salaIdList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('salaIdNotList') and conditionParamRef.salaIdNotList.size() > 0">
            ${_conditionType_} a.salaId not in
            <foreach collection="conditionParamRef.salaIdNotList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('salaIdStart') and conditionParamRef.salaIdStart != null">
            ${_conditionType_} a.salaId <![CDATA[ >= ]]> #{${_conditionParam_}.salaIdStart}
        </if>
        <if test="conditionParamRef.containsKey('salaIdEnd') and conditionParamRef.salaIdEnd != null">
            ${_conditionType_} a.salaId <![CDATA[ <= ]]> #{${_conditionParam_}.salaIdEnd}
        </if>


        <if test="conditionParamRef.containsKey('salaName')">
            <if test="conditionParamRef.salaName != null and conditionParamRef.salaName != ''">
                ${_conditionType_} a.salaName like #{${_conditionParam_}.salaName}
            </if>
            <if test="conditionParamRef.salaName == null">
                ${_conditionType_} a.salaName is null
            </if>
        </if>
        <if test="conditionParamRef.containsKey('salaNameList') and conditionParamRef.salaNameList.size() > 0">
            ${_conditionType_} a.salaName in
            <foreach collection="conditionParamRef.salaNameList" open="(" close=")" index="index" item="item" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="conditionParamRef.containsKey('salaNameNotList') and conditionParamRef.salaNameNotList.size() > 0">
            ${_conditionType_} a.salaName not in
            <foreach collection="conditionParamRef.salaNameNotList" 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>
    </sql>
    <sql id="_orderCols_ext_">
        <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>
            <if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
                field(a.deptId,
                <foreach collection="conditionParamRef.deptIdList" open="" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
                ,
            </if>
            <if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
                field(a.salaId,
                <foreach collection="conditionParamRef.salaIdList" 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>
            <if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0">
                field(a.deptId,
                <foreach collection="conditionParamRef.deptIdList" open="" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
                ,
            </if>
            <if test="conditionParamRef.containsKey('salaIdList') and conditionParamRef.salaIdList.size() > 0">
                field(a.salaId,
                <foreach collection="conditionParamRef.salaIdList" 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>
                <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('salaId')">
                    a.salaId
                    <if test='orderCol.salaId != null and "DESC".equalsIgnoreCase(orderCol.salaId)'>DESC</if>
                    ,
                </if>
                <if test="orderCol.containsKey('salaName')">
                    a.salaName
                    <if test='orderCol.salaName != null and "DESC".equalsIgnoreCase(orderCol.salaName)'>DESC</if>
                    ,
                </if>
            </trim>
        </if>


    </sql>
</mapper>