<?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.pj.dao.ibatis.PjEvaluateDaoImpl">

    <!-- 字段和属性映射 -->
    <resultMap type="PjEvaluateEntity" id="PjEvaluateEntity-Map">
            <id  property="id" column="id" />
            <result property="peopleIdcard" column="people_idcard" />
            <result property="peopleName" column="people_name" />
            <result property="peopleSex" column="people_sex" />
            <result property="peoplePhone" column="people_phone" />
            <result property="pjOption" column="pj_option" />
            <result property="contentTag" column="content_tag" />
            <result property="picUrl" column="pic_url" />
            <result property="sectionName" column="section_name" />
            <result property="hallName" column="hall_name" />
            <result property="pjSource" column="pj_source" />
            <result property="opinion" column="opinion" />
            <result property="windowName" column="window_name" />
            <result property="windowFromnum" column="window_fromnum" />
            <result property="flounum" column="flounum" />
            <result property="pjxt" column="pjxt" />
            <result property="workmanName" column="workman_name" />
            <result property="workmanNumber" column="workman_number" />
            <result property="devicenum" column="devicenum" />
            <result property="evaluatestatus" column="evaluatestatus" />
            <result property="evaluatetype" column="evaluatetype" />
            <result property="photobefor" column="photobefor" />
            <result property="photoautograph" column="photoautograph" />
            <result property="picture" column="picture" />
            <result property="process" column="process" />
            <result property="eyevaluate" column="eyevaluate" />
            <result property="pjType" column="pj_type" />
            <result property="pjTime" column="pj_time" />
            <result property="siteId" column="site_id" />
            <result property="siteCode" column="site_code" />
            <result property="siteName" column="site_name" />
            <result property="extNum" column="ext_num" />
            <result property="createUserId" column="create_user_id" />
            <result property="createTime" column="create_time" />
            <result property="updateTime" column="update_time" />
            
    </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('peopleIdcard') or colPickMode == 1 and data.containsKey('peopleIdcard')))">
                    a.people_idcard,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('peopleName') or colPickMode == 1 and data.containsKey('peopleName')))">
                    a.people_name,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('peopleSex') or colPickMode == 1 and data.containsKey('peopleSex')))">
                    a.people_sex,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('peoplePhone') or colPickMode == 1 and data.containsKey('peoplePhone')))">
                    a.people_phone,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjOption') or colPickMode == 1 and data.containsKey('pjOption')))">
                    a.pj_option,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('contentTag') or colPickMode == 1 and data.containsKey('contentTag')))">
                    a.content_tag,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('picUrl') or colPickMode == 1 and data.containsKey('picUrl')))">
                    a.pic_url,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sectionName') or colPickMode == 1 and data.containsKey('sectionName')))">
                    a.section_name,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))">
                    a.hall_name,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjSource') or colPickMode == 1 and data.containsKey('pjSource')))">
                    a.pj_source,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('opinion') or colPickMode == 1 and data.containsKey('opinion')))">
                    a.opinion,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowName') or colPickMode == 1 and data.containsKey('windowName')))">
                    a.window_name,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowFromnum') or colPickMode == 1 and data.containsKey('windowFromnum')))">
                    a.window_fromnum,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('flounum') or colPickMode == 1 and data.containsKey('flounum')))">
                    a.flounum,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjxt') or colPickMode == 1 and data.containsKey('pjxt')))">
                    a.pjxt,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workmanName') or colPickMode == 1 and data.containsKey('workmanName')))">
                    a.workman_name,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('workmanNumber') or colPickMode == 1 and data.containsKey('workmanNumber')))">
                    a.workman_number,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('devicenum') or colPickMode == 1 and data.containsKey('devicenum')))">
                    a.devicenum,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('evaluatestatus') or colPickMode == 1 and data.containsKey('evaluatestatus')))">
                    a.evaluatestatus,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('evaluatetype') or colPickMode == 1 and data.containsKey('evaluatetype')))">
                    a.evaluatetype,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('photobefor') or colPickMode == 1 and data.containsKey('photobefor')))">
                    a.photobefor,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('photoautograph') or colPickMode == 1 and data.containsKey('photoautograph')))">
                    a.photoautograph,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('picture') or colPickMode == 1 and data.containsKey('picture')))">
                    a.picture,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('process') or colPickMode == 1 and data.containsKey('process')))">
                    a.process,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('eyevaluate') or colPickMode == 1 and data.containsKey('eyevaluate')))">
                    a.eyevaluate,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjType') or colPickMode == 1 and data.containsKey('pjType')))">
                    a.pj_type,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('pjTime') or colPickMode == 1 and data.containsKey('pjTime')))">
                    a.pj_time,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))">
                    a.site_id,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteCode') or colPickMode == 1 and data.containsKey('siteCode')))">
                    a.site_code,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteName') or colPickMode == 1 and data.containsKey('siteName')))">
                    a.site_name,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('extNum') or colPickMode == 1 and data.containsKey('extNum')))">
                    a.ext_num,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))">
                    a.create_user_id,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))">
                    a.create_time,
                </if>
                <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
                    a.update_time,
                </if>
        </trim>
    </sql>
    <!-- 新增 区分主键自增加还是业务插入 -->
    <insert id="insert" parameterType="PjEvaluateEntity"  useGeneratedKeys="true" keyProperty="id">
        insert into mortals_xhx_pj_evaluate
        (people_idcard,people_name,people_sex,people_phone,pj_option,content_tag,pic_url,section_name,hall_name,pj_source,opinion,window_name,window_fromnum,flounum,pjxt,workman_name,workman_number,devicenum,evaluatestatus,evaluatetype,photobefor,photoautograph,picture,process,eyevaluate,pj_type,pj_time,site_id,site_code,site_name,ext_num,create_user_id,create_time,update_time)
        VALUES
        (#{peopleIdcard},#{peopleName},#{peopleSex},#{peoplePhone},#{pjOption},#{contentTag},#{picUrl},#{sectionName},#{hallName},#{pjSource},#{opinion},#{windowName},#{windowFromnum},#{flounum},#{pjxt},#{workmanName},#{workmanNumber},#{devicenum},#{evaluatestatus},#{evaluatetype},#{photobefor},#{photoautograph},#{picture},#{process},#{eyevaluate},#{pjType},#{pjTime},#{siteId},#{siteCode},#{siteName},#{extNum},#{createUserId},#{createTime},#{updateTime})
    </insert>

    <!-- 批量新增 -->
    <insert id="insertBatch" parameterType="paramDto">
        insert into mortals_xhx_pj_evaluate
        (people_idcard,people_name,people_sex,people_phone,pj_option,content_tag,pic_url,section_name,hall_name,pj_source,opinion,window_name,window_fromnum,flounum,pjxt,workman_name,workman_number,devicenum,evaluatestatus,evaluatetype,photobefor,photoautograph,picture,process,eyevaluate,pj_type,pj_time,site_id,site_code,site_name,ext_num,create_user_id,create_time,update_time)
        VALUES
        <foreach collection="data.dataList" item="item" index="index" separator="," >
            (#{item.peopleIdcard},#{item.peopleName},#{item.peopleSex},#{item.peoplePhone},#{item.pjOption},#{item.contentTag},#{item.picUrl},#{item.sectionName},#{item.hallName},#{item.pjSource},#{item.opinion},#{item.windowName},#{item.windowFromnum},#{item.flounum},#{item.pjxt},#{item.workmanName},#{item.workmanNumber},#{item.devicenum},#{item.evaluatestatus},#{item.evaluatetype},#{item.photobefor},#{item.photoautograph},#{item.picture},#{item.process},#{item.eyevaluate},#{item.pjType},#{item.pjTime},#{item.siteId},#{item.siteCode},#{item.siteName},#{item.extNum},#{item.createUserId},#{item.createTime},#{item.updateTime})
        </foreach>
    </insert>


    <!-- 根据ParamDto更新 -->
    <update id="update" parameterType="paramDto">
        update mortals_xhx_pj_evaluate as a
        set
        <trim suffixOverrides="," suffix="">
            <if test="(colPickMode==0 and data.containsKey('peopleIdcard')) or (colPickMode==1 and !data.containsKey('peopleIdcard'))">
                a.people_idcard=#{data.peopleIdcard},
            </if>
            <if test="(colPickMode==0 and data.containsKey('peopleName')) or (colPickMode==1 and !data.containsKey('peopleName'))">
                a.people_name=#{data.peopleName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('peopleSex')) or (colPickMode==1 and !data.containsKey('peopleSex'))">
                a.people_sex=#{data.peopleSex},
            </if>
            <if test="(colPickMode==0 and data.containsKey('peoplePhone')) or (colPickMode==1 and !data.containsKey('peoplePhone'))">
                a.people_phone=#{data.peoplePhone},
            </if>
            <if test="(colPickMode==0 and data.containsKey('pjOption')) or (colPickMode==1 and !data.containsKey('pjOption'))">
                a.pj_option=#{data.pjOption},
            </if>
            <if test="(colPickMode==0 and data.containsKey('contentTag')) or (colPickMode==1 and !data.containsKey('contentTag'))">
                a.content_tag=#{data.contentTag},
            </if>
            <if test="(colPickMode==0 and data.containsKey('picUrl')) or (colPickMode==1 and !data.containsKey('picUrl'))">
                a.pic_url=#{data.picUrl},
            </if>
            <if test="(colPickMode==0 and data.containsKey('sectionName')) or (colPickMode==1 and !data.containsKey('sectionName'))">
                a.section_name=#{data.sectionName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('hallName')) or (colPickMode==1 and !data.containsKey('hallName'))">
                a.hall_name=#{data.hallName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('pjSource')) or (colPickMode==1 and !data.containsKey('pjSource'))">
                a.pj_source=#{data.pjSource},
            </if>
            <if test="(colPickMode==0 and data.containsKey('opinion')) or (colPickMode==1 and !data.containsKey('opinion'))">
                a.opinion=#{data.opinion},
            </if>
            <if test="(colPickMode==0 and data.containsKey('windowName')) or (colPickMode==1 and !data.containsKey('windowName'))">
                a.window_name=#{data.windowName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('windowFromnum')) or (colPickMode==1 and !data.containsKey('windowFromnum'))">
                a.window_fromnum=#{data.windowFromnum},
            </if>
            <if test="(colPickMode==0 and data.containsKey('flounum')) or (colPickMode==1 and !data.containsKey('flounum'))">
                a.flounum=#{data.flounum},
            </if>
            <if test="(colPickMode==0 and data.containsKey('pjxt')) or (colPickMode==1 and !data.containsKey('pjxt'))">
                a.pjxt=#{data.pjxt},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workmanName')) or (colPickMode==1 and !data.containsKey('workmanName'))">
                a.workman_name=#{data.workmanName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('workmanNumber')) or (colPickMode==1 and !data.containsKey('workmanNumber'))">
                a.workman_number=#{data.workmanNumber},
            </if>
            <if test="(colPickMode==0 and data.containsKey('devicenum')) or (colPickMode==1 and !data.containsKey('devicenum'))">
                a.devicenum=#{data.devicenum},
            </if>
            <if test="(colPickMode==0 and data.containsKey('evaluatestatus')) or (colPickMode==1 and !data.containsKey('evaluatestatus'))">
                a.evaluatestatus=#{data.evaluatestatus},
            </if>
            <if test="(colPickMode==0 and data.containsKey('evaluatetype')) or (colPickMode==1 and !data.containsKey('evaluatetype'))">
                a.evaluatetype=#{data.evaluatetype},
            </if>
            <if test="(colPickMode==0 and data.containsKey('photobefor')) or (colPickMode==1 and !data.containsKey('photobefor'))">
                a.photobefor=#{data.photobefor},
            </if>
            <if test="(colPickMode==0 and data.containsKey('photoautograph')) or (colPickMode==1 and !data.containsKey('photoautograph'))">
                a.photoautograph=#{data.photoautograph},
            </if>
            <if test="(colPickMode==0 and data.containsKey('picture')) or (colPickMode==1 and !data.containsKey('picture'))">
                a.picture=#{data.picture},
            </if>
            <if test="(colPickMode==0 and data.containsKey('process')) or (colPickMode==1 and !data.containsKey('process'))">
                a.process=#{data.process},
            </if>
            <if test="(colPickMode==0 and data.containsKey('eyevaluate')) or (colPickMode==1 and !data.containsKey('eyevaluate'))">
                a.eyevaluate=#{data.eyevaluate},
            </if>
            <if test="(colPickMode==0 and data.containsKey('pjType')) or (colPickMode==1 and !data.containsKey('pjType'))">
                a.pj_type=#{data.pjType},
            </if>
            <if test="(colPickMode==0 and data.containsKey('pjTime')) or (colPickMode==1 and !data.containsKey('pjTime'))">
                a.pj_time=#{data.pjTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))">
                a.site_id=#{data.siteId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))">
                a.site_id=ifnull(a.site_id,0) + #{data.siteIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('siteCode')) or (colPickMode==1 and !data.containsKey('siteCode'))">
                a.site_code=#{data.siteCode},
            </if>
            <if test="(colPickMode==0 and data.containsKey('siteName')) or (colPickMode==1 and !data.containsKey('siteName'))">
                a.site_name=#{data.siteName},
            </if>
            <if test="(colPickMode==0 and data.containsKey('extNum')) or (colPickMode==1 and !data.containsKey('extNum'))">
                a.ext_num=#{data.extNum},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserId')) or (colPickMode==1 and !data.containsKey('createUserId'))">
                a.create_user_id=#{data.createUserId},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createUserIdIncrement')) or (colPickMode==1 and !data.containsKey('createUserIdIncrement'))">
                a.create_user_id=ifnull(a.create_user_id,0) + #{data.createUserIdIncrement},
            </if>
            <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))">
                a.create_time=#{data.createTime},
            </if>
            <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
                a.update_time=#{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_pj_evaluate as a
        <trim prefix="set" suffixOverrides=",">
                <trim prefix="people_idcard=(case" suffix="ELSE people_idcard end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('peopleIdcard')) or (colPickMode==1 and !item.containsKey('peopleIdcard'))">
                            when a.id=#{item.id} then #{item.peopleIdcard}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="people_name=(case" suffix="ELSE people_name end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('peopleName')) or (colPickMode==1 and !item.containsKey('peopleName'))">
                            when a.id=#{item.id} then #{item.peopleName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="people_sex=(case" suffix="ELSE people_sex end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('peopleSex')) or (colPickMode==1 and !item.containsKey('peopleSex'))">
                            when a.id=#{item.id} then #{item.peopleSex}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="people_phone=(case" suffix="ELSE people_phone end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('peoplePhone')) or (colPickMode==1 and !item.containsKey('peoplePhone'))">
                            when a.id=#{item.id} then #{item.peoplePhone}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="pj_option=(case" suffix="ELSE pj_option end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('pjOption')) or (colPickMode==1 and !item.containsKey('pjOption'))">
                            when a.id=#{item.id} then #{item.pjOption}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="content_tag=(case" suffix="ELSE content_tag end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('contentTag')) or (colPickMode==1 and !item.containsKey('contentTag'))">
                            when a.id=#{item.id} then #{item.contentTag}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="pic_url=(case" suffix="ELSE pic_url end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('picUrl')) or (colPickMode==1 and !item.containsKey('picUrl'))">
                            when a.id=#{item.id} then #{item.picUrl}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="section_name=(case" suffix="ELSE section_name end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('sectionName')) or (colPickMode==1 and !item.containsKey('sectionName'))">
                            when a.id=#{item.id} then #{item.sectionName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="hall_name=(case" suffix="ELSE hall_name end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('hallName')) or (colPickMode==1 and !item.containsKey('hallName'))">
                            when a.id=#{item.id} then #{item.hallName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="pj_source=(case" suffix="ELSE pj_source end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('pjSource')) or (colPickMode==1 and !item.containsKey('pjSource'))">
                            when a.id=#{item.id} then #{item.pjSource}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="opinion=(case" suffix="ELSE opinion end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('opinion')) or (colPickMode==1 and !item.containsKey('opinion'))">
                            when a.id=#{item.id} then #{item.opinion}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="window_name=(case" suffix="ELSE window_name end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('windowName')) or (colPickMode==1 and !item.containsKey('windowName'))">
                            when a.id=#{item.id} then #{item.windowName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="window_fromnum=(case" suffix="ELSE window_fromnum end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('windowFromnum')) or (colPickMode==1 and !item.containsKey('windowFromnum'))">
                            when a.id=#{item.id} then #{item.windowFromnum}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="flounum=(case" suffix="ELSE flounum end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('flounum')) or (colPickMode==1 and !item.containsKey('flounum'))">
                            when a.id=#{item.id} then #{item.flounum}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="pjxt=(case" suffix="ELSE pjxt end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('pjxt')) or (colPickMode==1 and !item.containsKey('pjxt'))">
                            when a.id=#{item.id} then #{item.pjxt}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="workman_name=(case" suffix="ELSE workman_name end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('workmanName')) or (colPickMode==1 and !item.containsKey('workmanName'))">
                            when a.id=#{item.id} then #{item.workmanName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="workman_number=(case" suffix="ELSE workman_number end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('workmanNumber')) or (colPickMode==1 and !item.containsKey('workmanNumber'))">
                            when a.id=#{item.id} then #{item.workmanNumber}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="devicenum=(case" suffix="ELSE devicenum end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('devicenum')) or (colPickMode==1 and !item.containsKey('devicenum'))">
                            when a.id=#{item.id} then #{item.devicenum}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="evaluatestatus=(case" suffix="ELSE evaluatestatus end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('evaluatestatus')) or (colPickMode==1 and !item.containsKey('evaluatestatus'))">
                            when a.id=#{item.id} then #{item.evaluatestatus}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="evaluatetype=(case" suffix="ELSE evaluatetype end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('evaluatetype')) or (colPickMode==1 and !item.containsKey('evaluatetype'))">
                            when a.id=#{item.id} then #{item.evaluatetype}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="photobefor=(case" suffix="ELSE photobefor end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('photobefor')) or (colPickMode==1 and !item.containsKey('photobefor'))">
                            when a.id=#{item.id} then #{item.photobefor}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="photoautograph=(case" suffix="ELSE photoautograph end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('photoautograph')) or (colPickMode==1 and !item.containsKey('photoautograph'))">
                            when a.id=#{item.id} then #{item.photoautograph}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="picture=(case" suffix="ELSE picture end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('picture')) or (colPickMode==1 and !item.containsKey('picture'))">
                            when a.id=#{item.id} then #{item.picture}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="process=(case" suffix="ELSE process end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('process')) or (colPickMode==1 and !item.containsKey('process'))">
                            when a.id=#{item.id} then #{item.process}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="eyevaluate=(case" suffix="ELSE eyevaluate end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('eyevaluate')) or (colPickMode==1 and !item.containsKey('eyevaluate'))">
                            when a.id=#{item.id} then #{item.eyevaluate}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="pj_type=(case" suffix="ELSE pj_type end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('pjType')) or (colPickMode==1 and !item.containsKey('pjType'))">
                            when a.id=#{item.id} then #{item.pjType}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="pj_time=(case" suffix="ELSE pj_time end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('pjTime')) or (colPickMode==1 and !item.containsKey('pjTime'))">
                            when a.id=#{item.id} then #{item.pjTime}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="site_id=(case" suffix="ELSE site_id end),">
                            <foreach collection="data.dataList" item="item" index="index" separator="" >
                                <choose>
                                    <when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))">
                                        when a.id=#{item.id} then #{item.siteId}
                                    </when>
                                    <when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))">
                                        when a.id=#{item.id} then ifnull(a.site_id,0) + #{item.siteIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="site_code=(case" suffix="ELSE site_code end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('siteCode')) or (colPickMode==1 and !item.containsKey('siteCode'))">
                            when a.id=#{item.id} then #{item.siteCode}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="site_name=(case" suffix="ELSE site_name end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('siteName')) or (colPickMode==1 and !item.containsKey('siteName'))">
                            when a.id=#{item.id} then #{item.siteName}
                        </if>
                    </foreach>
                </trim>
                <trim prefix="ext_num=(case" suffix="ELSE ext_num end),">
                    <foreach collection="data.dataList" item="item" index="index" separator="" >
                        <if test="(colPickMode==0 and item.containsKey('extNum')) or (colPickMode==1 and !item.containsKey('extNum'))">
                            when a.id=#{item.id} then #{item.extNum}
                        </if>
                    </foreach>
                </trim>
                        <trim prefix="create_user_id=(case" suffix="ELSE create_user_id 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.create_user_id,0) + #{item.createUserIdIncrement}
                                    </when>
                                </choose>
                            </foreach>
                        </trim>
                <trim prefix="create_time=(case" suffix="ELSE create_time 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="update_time=(case" suffix="ELSE update_time 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="PjEvaluateEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_pj_evaluate as a
        where a.id=#{condition.id}
    </select>
    <!-- 根据主健删除 -->
    <delete id="deleteByKey" parameterType="paramDto">
        delete a.* from mortals_xhx_pj_evaluate as a where a.id=#{condition.id}
    </delete>
    <!-- 根据主健删除一批，针对单一主健有效 -->
    <delete id="deleteByKeys">
        delete from mortals_xhx_pj_evaluate where id in
        <foreach collection="array" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>
    <!-- 根据主健列表删除一批，针对单一主健有效 -->
    <delete id="deleteByKeyList">
        delete from mortals_xhx_pj_evaluate where id in
        <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
            #{item}
        </foreach>
    </delete>

    <!-- 根据对象列表删除一批，针对单一主健有效 -->
    <delete id="deleteByEntityList">
        delete from mortals_xhx_pj_evaluate 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_pj_evaluate as a
        <trim suffixOverrides="where" suffix="">
            where
            <trim prefixOverrides="and" prefix="">
                <include refid="_condition_"/>
            </trim>
        </trim>
    </delete>
    <!-- 获取列表 -->
    <select id="getList" parameterType="paramDto" resultMap="PjEvaluateEntity-Map">
        select <include refid="_columns"/>
        from mortals_xhx_pj_evaluate 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_pj_evaluate 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="permissionSql != null and permissionSql != ''">
            ${permissionSql}
        </if>

        <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('peopleIdcard')">
                <if test="conditionParamRef.peopleIdcard != null and conditionParamRef.peopleIdcard != ''">
                    ${_conditionType_} a.people_idcard like #{${_conditionParam_}.peopleIdcard}
                </if>
                <if test="conditionParamRef.peopleIdcard == null">
                    ${_conditionType_} a.people_idcard is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('peopleIdcardList') and conditionParamRef.peopleIdcardList.size() > 0">
                ${_conditionType_} a.people_idcard in
                <foreach collection="conditionParamRef.peopleIdcardList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('peopleIdcardNotList') and conditionParamRef.peopleIdcardNotList.size() > 0">
                ${_conditionType_} a.people_idcard not in
                <foreach collection="conditionParamRef.peopleIdcardNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            <if test="conditionParamRef.containsKey('pjTime')">
                <if test="conditionParamRef.pjTime != null ">
                    ${_conditionType_} a.pj_time = #{${_conditionParam_}.pjTime}
                </if>
                <if test="conditionParamRef.pjTime == null">
                    ${_conditionType_} a.pj_time is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('pjTimeStart') and conditionParamRef.pjTimeStart != null and conditionParamRef.pjTimeStart!=''">
                ${_conditionType_} a.pj_time <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.pjTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('pjTimeEnd') and conditionParamRef.pjTimeEnd != null and conditionParamRef.pjTimeEnd!=''">
                ${_conditionType_} a.pj_time <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.pjTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>
            <if test="conditionParamRef.containsKey('siteId')">
                <if test="conditionParamRef.siteId != null ">
                    ${_conditionType_} a.site_id = #{${_conditionParam_}.siteId}
                </if>
                <if test="conditionParamRef.siteId == null">
                    ${_conditionType_} a.site_id is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0">
                ${_conditionType_} a.site_id in
                <foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0">
                ${_conditionType_} a.site_id not in
                <foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null">
                ${_conditionType_} a.site_id <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart}
            </if>
            <if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null">
                ${_conditionType_} a.site_id <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd}
            </if>


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

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

            <if test="conditionParamRef.containsKey('extNum')">
                <if test="conditionParamRef.extNum != null and conditionParamRef.extNum != ''">
                    ${_conditionType_} a.ext_num like #{${_conditionParam_}.extNum}
                </if>
                <if test="conditionParamRef.extNum == null">
                    ${_conditionType_} a.ext_num is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('extNumList') and conditionParamRef.extNumList.size() > 0">
                ${_conditionType_} a.ext_num in
                <foreach collection="conditionParamRef.extNumList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('extNumNotList') and conditionParamRef.extNumNotList.size() > 0">
                ${_conditionType_} a.ext_num not in
                <foreach collection="conditionParamRef.extNumNotList" open="(" close=")" index="index" item="item" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="conditionParamRef.containsKey('createUserId')">
                <if test="conditionParamRef.createUserId != null ">
                    ${_conditionType_} a.create_user_id = #{${_conditionParam_}.createUserId}
                </if>
                <if test="conditionParamRef.createUserId == null">
                    ${_conditionType_} a.create_user_id is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0">
                ${_conditionType_} a.create_user_id 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.create_user_id 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.create_user_id <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart}
            </if>
            <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null">
                ${_conditionType_} a.create_user_id <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd}
            </if>


            <if test="conditionParamRef.containsKey('createTime')">
                <if test="conditionParamRef.createTime != null ">
                    ${_conditionType_} a.create_time = #{${_conditionParam_}.createTime}
                </if>
                <if test="conditionParamRef.createTime == null">
                    ${_conditionType_} a.create_time is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''">
                ${_conditionType_} a.create_time <![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.create_time <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
            </if>

            <if test="conditionParamRef.containsKey('updateTime')">
                <if test="conditionParamRef.updateTime != null ">
                    ${_conditionType_} a.update_time = #{${_conditionParam_}.updateTime}
                </if>
                <if test="conditionParamRef.updateTime == null">
                    ${_conditionType_} a.update_time is null
                </if>
            </if>
            <if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''">
                ${_conditionType_} a.update_time <![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.update_time <![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('siteIdList') and conditionParamRef.siteIdList.size() > 0">
                        field(a.siteId,
                        <foreach collection="conditionParamRef.siteIdList" 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>
            <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('siteIdList') and conditionParamRef.siteIdList.size() > 0">
                        field(a.siteId,
                        <foreach collection="conditionParamRef.siteIdList" 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>
            <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('peopleIdcard')">
                        a.people_idcard
                        <if test='orderCol.peopleIdcard != null and "DESC".equalsIgnoreCase(orderCol.peopleIdcard)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('peopleName')">
                        a.people_name
                        <if test='orderCol.peopleName != null and "DESC".equalsIgnoreCase(orderCol.peopleName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('peopleSex')">
                        a.people_sex
                        <if test='orderCol.peopleSex != null and "DESC".equalsIgnoreCase(orderCol.peopleSex)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('peoplePhone')">
                        a.people_phone
                        <if test='orderCol.peoplePhone != null and "DESC".equalsIgnoreCase(orderCol.peoplePhone)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('pjOption')">
                        a.pj_option
                        <if test='orderCol.pjOption != null and "DESC".equalsIgnoreCase(orderCol.pjOption)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('contentTag')">
                        a.content_tag
                        <if test='orderCol.contentTag != null and "DESC".equalsIgnoreCase(orderCol.contentTag)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('picUrl')">
                        a.pic_url
                        <if test='orderCol.picUrl != null and "DESC".equalsIgnoreCase(orderCol.picUrl)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('sectionName')">
                        a.section_name
                        <if test='orderCol.sectionName != null and "DESC".equalsIgnoreCase(orderCol.sectionName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('hallName')">
                        a.hall_name
                        <if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('pjSource')">
                        a.pj_source
                        <if test='orderCol.pjSource != null and "DESC".equalsIgnoreCase(orderCol.pjSource)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('opinion')">
                        a.opinion
                        <if test='orderCol.opinion != null and "DESC".equalsIgnoreCase(orderCol.opinion)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('windowName')">
                        a.window_name
                        <if test='orderCol.windowName != null and "DESC".equalsIgnoreCase(orderCol.windowName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('windowFromnum')">
                        a.window_fromnum
                        <if test='orderCol.windowFromnum != null and "DESC".equalsIgnoreCase(orderCol.windowFromnum)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('flounum')">
                        a.flounum
                        <if test='orderCol.flounum != null and "DESC".equalsIgnoreCase(orderCol.flounum)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('pjxt')">
                        a.pjxt
                        <if test='orderCol.pjxt != null and "DESC".equalsIgnoreCase(orderCol.pjxt)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workmanName')">
                        a.workman_name
                        <if test='orderCol.workmanName != null and "DESC".equalsIgnoreCase(orderCol.workmanName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('workmanNumber')">
                        a.workman_number
                        <if test='orderCol.workmanNumber != null and "DESC".equalsIgnoreCase(orderCol.workmanNumber)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('devicenum')">
                        a.devicenum
                        <if test='orderCol.devicenum != null and "DESC".equalsIgnoreCase(orderCol.devicenum)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('evaluatestatus')">
                        a.evaluatestatus
                        <if test='orderCol.evaluatestatus != null and "DESC".equalsIgnoreCase(orderCol.evaluatestatus)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('evaluatetype')">
                        a.evaluatetype
                        <if test='orderCol.evaluatetype != null and "DESC".equalsIgnoreCase(orderCol.evaluatetype)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('photobefor')">
                        a.photobefor
                        <if test='orderCol.photobefor != null and "DESC".equalsIgnoreCase(orderCol.photobefor)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('photoautograph')">
                        a.photoautograph
                        <if test='orderCol.photoautograph != null and "DESC".equalsIgnoreCase(orderCol.photoautograph)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('picture')">
                        a.picture
                        <if test='orderCol.picture != null and "DESC".equalsIgnoreCase(orderCol.picture)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('process')">
                        a.process
                        <if test='orderCol.process != null and "DESC".equalsIgnoreCase(orderCol.process)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('eyevaluate')">
                        a.eyevaluate
                        <if test='orderCol.eyevaluate != null and "DESC".equalsIgnoreCase(orderCol.eyevaluate)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('pjType')">
                        a.pj_type
                        <if test='orderCol.pjType != null and "DESC".equalsIgnoreCase(orderCol.pjType)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('pjTime')">
                        a.pj_time
                        <if test='orderCol.pjTime != null and "DESC".equalsIgnoreCase(orderCol.pjTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('siteId')">
                        a.site_id
                        <if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('siteCode')">
                        a.site_code
                        <if test='orderCol.siteCode != null and "DESC".equalsIgnoreCase(orderCol.siteCode)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('siteName')">
                        a.site_name
                        <if test='orderCol.siteName != null and "DESC".equalsIgnoreCase(orderCol.siteName)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('extNum')">
                        a.ext_num
                        <if test='orderCol.extNum != null and "DESC".equalsIgnoreCase(orderCol.extNum)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createUserId')">
                        a.create_user_id
                        <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('createTime')">
                        a.create_time
                        <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if>
                        ,
                    </if>
                    <if test="orderCol.containsKey('updateTime')">
                        a.update_time
                        <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>