<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.lets.dao.impl.BdPsndocDaoImpl">

    <resultMap id="get-BdPsndocEntity-result" type="com.hzya.frame.plugin.lets.entity.BdPsndocEntity" >
       <result property="amcode" column="amcode" jdbcType="VARCHAR"/>
           <result property="clerkcode" column="clerkcode" jdbcType="VARCHAR"/>
           <result property="clerkflag" column="clerkflag" jdbcType="VARCHAR"/>
           <result property="createtime" column="createtime" jdbcType="VARCHAR"/>
           <result property="creator" column="creator" jdbcType="VARCHAR"/>
           <result property="def1" column="def1" jdbcType="VARCHAR"/>
           <result property="def10" column="def10" jdbcType="VARCHAR"/>
           <result property="def11" column="def11" jdbcType="VARCHAR"/>
           <result property="def12" column="def12" jdbcType="VARCHAR"/>
           <result property="def13" column="def13" jdbcType="VARCHAR"/>
           <result property="def14" column="def14" jdbcType="VARCHAR"/>
           <result property="def15" column="def15" jdbcType="VARCHAR"/>
           <result property="def16" column="def16" jdbcType="VARCHAR"/>
           <result property="def17" column="def17" jdbcType="VARCHAR"/>
           <result property="def18" column="def18" jdbcType="VARCHAR"/>
           <result property="def19" column="def19" jdbcType="VARCHAR"/>
           <result property="def2" column="def2" jdbcType="VARCHAR"/>
           <result property="def20" column="def20" jdbcType="VARCHAR"/>
           <result property="def3" column="def3" jdbcType="VARCHAR"/>
           <result property="def4" column="def4" jdbcType="VARCHAR"/>
           <result property="def5" column="def5" jdbcType="VARCHAR"/>
           <result property="def6" column="def6" jdbcType="VARCHAR"/>
           <result property="def7" column="def7" jdbcType="VARCHAR"/>
           <result property="def8" column="def8" jdbcType="VARCHAR"/>
           <result property="def9" column="def9" jdbcType="VARCHAR"/>
           <result property="dr" column="dr" jdbcType="INTEGER"/>
           <result property="indocflag" column="indocflag" jdbcType="VARCHAR"/>
           <result property="indutydate" column="indutydate" jdbcType="VARCHAR"/>
           <result property="innercode" column="innercode" jdbcType="VARCHAR"/>
           <result property="jobrank" column="jobrank" jdbcType="VARCHAR"/>
           <result property="jobseries" column="jobseries" jdbcType="VARCHAR"/>
           <result property="maxinnercode" column="maxinnercode" jdbcType="VARCHAR"/>
           <result property="modifier" column="modifier" jdbcType="VARCHAR"/>
           <result property="modifytime" column="modifytime" jdbcType="VARCHAR"/>
           <result property="outdutydate" column="outdutydate" jdbcType="VARCHAR"/>
           <result property="pkCorp" column="pk_corp" jdbcType="VARCHAR"/>
           <result property="pkDeptdoc" column="pk_deptdoc" jdbcType="VARCHAR"/>
           <result property="pkOmJob" column="pk_om_job" jdbcType="VARCHAR"/>
           <result property="pkPsnbasdoc" column="pk_psnbasdoc" jdbcType="VARCHAR"/>
           <result property="pkPsncl" column="pk_psncl" jdbcType="VARCHAR"/>
           <result property="pkPsndoc" column="pk_psndoc" jdbcType="VARCHAR"/>
           <result property="psnclscope" column="psnclscope" jdbcType="INTEGER"/>
           <result property="psncode" column="psncode" jdbcType="VARCHAR"/>
           <result property="psnname" column="psnname" jdbcType="VARCHAR"/>
           <result property="sealdate" column="sealdate" jdbcType="VARCHAR"/>
           <result property="ts" column="ts" jdbcType="VARCHAR"/>
           <result property="directleader" column="directleader" jdbcType="VARCHAR"/>
           <result property="dutyname" column="dutyname" jdbcType="VARCHAR"/>
           <result property="groupdef1" column="groupdef1" jdbcType="VARCHAR"/>
           <result property="groupdef10" column="groupdef10" jdbcType="VARCHAR"/>
           <result property="groupdef11" column="groupdef11" jdbcType="VARCHAR"/>
           <result property="groupdef12" column="groupdef12" jdbcType="VARCHAR"/>
           <result property="groupdef13" column="groupdef13" jdbcType="VARCHAR"/>
           <result property="groupdef14" column="groupdef14" jdbcType="VARCHAR"/>
           <result property="groupdef15" column="groupdef15" jdbcType="VARCHAR"/>
           <result property="groupdef16" column="groupdef16" jdbcType="VARCHAR"/>
           <result property="groupdef17" column="groupdef17" jdbcType="VARCHAR"/>
           <result property="groupdef18" column="groupdef18" jdbcType="VARCHAR"/>
           <result property="groupdef19" column="groupdef19" jdbcType="VARCHAR"/>
           <result property="groupdef2" column="groupdef2" jdbcType="VARCHAR"/>
           <result property="groupdef20" column="groupdef20" jdbcType="VARCHAR"/>
           <result property="groupdef3" column="groupdef3" jdbcType="VARCHAR"/>
           <result property="groupdef4" column="groupdef4" jdbcType="VARCHAR"/>
           <result property="groupdef5" column="groupdef5" jdbcType="VARCHAR"/>
           <result property="groupdef6" column="groupdef6" jdbcType="VARCHAR"/>
           <result property="groupdef7" column="groupdef7" jdbcType="VARCHAR"/>
           <result property="groupdef8" column="groupdef8" jdbcType="VARCHAR"/>
           <result property="groupdef9" column="groupdef9" jdbcType="VARCHAR"/>
           <result property="hroperator" column="hroperator" jdbcType="VARCHAR"/>
           <result property="insource" column="insource" jdbcType="VARCHAR"/>
           <result property="iscalovertime" column="iscalovertime" jdbcType="VARCHAR"/>
           <result property="isreferenced" column="isreferenced" jdbcType="VARCHAR"/>
           <result property="isreturn" column="isreturn" jdbcType="VARCHAR"/>
           <result property="onpostdate" column="onpostdate" jdbcType="VARCHAR"/>
           <result property="outmethod" column="outmethod" jdbcType="VARCHAR"/>
           <result property="pkClerkclass" column="pk_clerkclass" jdbcType="VARCHAR"/>
           <result property="pkDutyrank" column="pk_dutyrank" jdbcType="VARCHAR"/>
           <result property="pkPsntype" column="pk_psntype" jdbcType="VARCHAR"/>
           <result property="poststat" column="poststat" jdbcType="VARCHAR"/>
           <result property="psnnamepinyin" column="psnnamepinyin" jdbcType="VARCHAR"/>
           <result property="recruitresource" column="recruitresource" jdbcType="VARCHAR"/>
           <result property="regular" column="regular" jdbcType="VARCHAR"/>
           <result property="regulardata" column="regulardata" jdbcType="VARCHAR"/>
           <result property="series" column="series" jdbcType="VARCHAR"/>
           <result property="showorder" column="showorder" jdbcType="INTEGER"/>
           <result property="tbmProp" column="tbm_prop" jdbcType="INTEGER"/>
           <result property="timecardid" column="timecardid" jdbcType="VARCHAR"/>
           <result property="wastopdate" column="wastopdate" jdbcType="VARCHAR"/>
        </resultMap>
    <!-- 查询的字段-->
    <sql id = "BdPsndocEntity_Base_Column_List">
        amcode
       ,clerkcode 
        ,clerkflag 
        ,createtime 
        ,creator 
        ,def1 
        ,def10 
        ,def11 
        ,def12 
        ,def13 
        ,def14 
        ,def15 
        ,def16 
        ,def17 
        ,def18 
        ,def19 
        ,def2 
        ,def20 
        ,def3 
        ,def4 
        ,def5 
        ,def6 
        ,def7 
        ,def8 
        ,def9 
        ,dr 
        ,indocflag 
        ,indutydate 
        ,innercode 
        ,jobrank 
        ,jobseries 
        ,maxinnercode 
        ,modifier 
        ,modifytime 
        ,outdutydate 
        ,pk_corp 
        ,pk_deptdoc 
        ,pk_om_job 
        ,pk_psnbasdoc 
        ,pk_psncl 
        ,pk_psndoc 
        ,psnclscope 
        ,psncode 
        ,psnname 
        ,sealdate 
        ,ts 
        ,directleader 
        ,dutyname 
        ,groupdef1 
        ,groupdef10 
        ,groupdef11 
        ,groupdef12 
        ,groupdef13 
        ,groupdef14 
        ,groupdef15 
        ,groupdef16 
        ,groupdef17 
        ,groupdef18 
        ,groupdef19 
        ,groupdef2 
        ,groupdef20 
        ,groupdef3 
        ,groupdef4 
        ,groupdef5 
        ,groupdef6 
        ,groupdef7 
        ,groupdef8 
        ,groupdef9 
        ,hroperator 
        ,insource 
        ,iscalovertime 
        ,isreferenced 
        ,isreturn 
        ,onpostdate 
        ,outmethod 
        ,pk_clerkclass 
        ,pk_dutyrank 
        ,pk_psntype 
        ,poststat 
        ,psnnamepinyin 
        ,recruitresource 
        ,regular 
        ,regulardata 
        ,series 
        ,showorder 
        ,tbm_prop 
        ,timecardid 
        ,wastopdate 
     </sql>
 <!-- 查询 采用==查询 -->
 <select id="entity_list_base" resultMap="get-BdPsndocEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity">
    select
    <include refid="BdPsndocEntity_Base_Column_List" />
    from bd_psndoc
    <trim prefix="where" prefixOverrides="and"> 
        <if test="amcode != null and amcode != ''"> and amcode = #{amcode} </if>
            <if test="clerkcode != null and clerkcode != ''"> and clerkcode = #{clerkcode} </if>
            <if test="clerkflag != null and clerkflag != ''"> and clerkflag = #{clerkflag} </if>
            <if test="createtime != null and createtime != ''"> and createtime = #{createtime} </if>
            <if test="creator != null and creator != ''"> and creator = #{creator} </if>
            <if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
            <if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
            <if test="def11 != null and def11 != ''"> and def11 = #{def11} </if>
            <if test="def12 != null and def12 != ''"> and def12 = #{def12} </if>
            <if test="def13 != null and def13 != ''"> and def13 = #{def13} </if>
            <if test="def14 != null and def14 != ''"> and def14 = #{def14} </if>
            <if test="def15 != null and def15 != ''"> and def15 = #{def15} </if>
            <if test="def16 != null and def16 != ''"> and def16 = #{def16} </if>
            <if test="def17 != null and def17 != ''"> and def17 = #{def17} </if>
            <if test="def18 != null and def18 != ''"> and def18 = #{def18} </if>
            <if test="def19 != null and def19 != ''"> and def19 = #{def19} </if>
            <if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
            <if test="def20 != null and def20 != ''"> and def20 = #{def20} </if>
            <if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
            <if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
            <if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
            <if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
            <if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
            <if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
            <if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
            <if test="dr != null"> and dr = #{dr} </if>
            <if test="indocflag != null and indocflag != ''"> and indocflag = #{indocflag} </if>
            <if test="indutydate != null and indutydate != ''"> and indutydate = #{indutydate} </if>
            <if test="innercode != null and innercode != ''"> and innercode = #{innercode} </if>
            <if test="jobrank != null and jobrank != ''"> and jobrank = #{jobrank} </if>
            <if test="jobseries != null and jobseries != ''"> and jobseries = #{jobseries} </if>
            <if test="maxinnercode != null and maxinnercode != ''"> and maxinnercode = #{maxinnercode} </if>
            <if test="modifier != null and modifier != ''"> and modifier = #{modifier} </if>
            <if test="modifytime != null and modifytime != ''"> and modifytime = #{modifytime} </if>
            <if test="outdutydate != null and outdutydate != ''"> and outdutydate = #{outdutydate} </if>
            <if test="pkCorp != null and pkCorp != ''"> and pk_corp = #{pkCorp} </if>
            <if test="pkDeptdoc != null and pkDeptdoc != ''"> and pk_deptdoc = #{pkDeptdoc} </if>
            <if test="pkOmJob != null and pkOmJob != ''"> and pk_om_job = #{pkOmJob} </if>
            <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> and pk_psnbasdoc = #{pkPsnbasdoc} </if>
            <if test="pkPsncl != null and pkPsncl != ''"> and pk_psncl = #{pkPsncl} </if>
            <if test="pkPsndoc != null and pkPsndoc != ''"> and pk_psndoc = #{pkPsndoc} </if>
            <if test="psnclscope != null"> and psnclscope = #{psnclscope} </if>
            <if test="psncode != null and psncode != ''"> and psncode = #{psncode} </if>
            <if test="psnname != null and psnname != ''"> and psnname = #{psnname} </if>
            <if test="sealdate != null and sealdate != ''"> and sealdate = #{sealdate} </if>
            <if test="ts != null and ts != ''"> and ts = #{ts} </if>
            <if test="directleader != null and directleader != ''"> and directleader = #{directleader} </if>
            <if test="dutyname != null and dutyname != ''"> and dutyname = #{dutyname} </if>
            <if test="groupdef1 != null and groupdef1 != ''"> and groupdef1 = #{groupdef1} </if>
            <if test="groupdef10 != null and groupdef10 != ''"> and groupdef10 = #{groupdef10} </if>
            <if test="groupdef11 != null and groupdef11 != ''"> and groupdef11 = #{groupdef11} </if>
            <if test="groupdef12 != null and groupdef12 != ''"> and groupdef12 = #{groupdef12} </if>
            <if test="groupdef13 != null and groupdef13 != ''"> and groupdef13 = #{groupdef13} </if>
            <if test="groupdef14 != null and groupdef14 != ''"> and groupdef14 = #{groupdef14} </if>
            <if test="groupdef15 != null and groupdef15 != ''"> and groupdef15 = #{groupdef15} </if>
            <if test="groupdef16 != null and groupdef16 != ''"> and groupdef16 = #{groupdef16} </if>
            <if test="groupdef17 != null and groupdef17 != ''"> and groupdef17 = #{groupdef17} </if>
            <if test="groupdef18 != null and groupdef18 != ''"> and groupdef18 = #{groupdef18} </if>
            <if test="groupdef19 != null and groupdef19 != ''"> and groupdef19 = #{groupdef19} </if>
            <if test="groupdef2 != null and groupdef2 != ''"> and groupdef2 = #{groupdef2} </if>
            <if test="groupdef20 != null and groupdef20 != ''"> and groupdef20 = #{groupdef20} </if>
            <if test="groupdef3 != null and groupdef3 != ''"> and groupdef3 = #{groupdef3} </if>
            <if test="groupdef4 != null and groupdef4 != ''"> and groupdef4 = #{groupdef4} </if>
            <if test="groupdef5 != null and groupdef5 != ''"> and groupdef5 = #{groupdef5} </if>
            <if test="groupdef6 != null and groupdef6 != ''"> and groupdef6 = #{groupdef6} </if>
            <if test="groupdef7 != null and groupdef7 != ''"> and groupdef7 = #{groupdef7} </if>
            <if test="groupdef8 != null and groupdef8 != ''"> and groupdef8 = #{groupdef8} </if>
            <if test="groupdef9 != null and groupdef9 != ''"> and groupdef9 = #{groupdef9} </if>
            <if test="hroperator != null and hroperator != ''"> and hroperator = #{hroperator} </if>
            <if test="insource != null and insource != ''"> and insource = #{insource} </if>
            <if test="iscalovertime != null and iscalovertime != ''"> and iscalovertime = #{iscalovertime} </if>
            <if test="isreferenced != null and isreferenced != ''"> and isreferenced = #{isreferenced} </if>
            <if test="isreturn != null and isreturn != ''"> and isreturn = #{isreturn} </if>
            <if test="onpostdate != null and onpostdate != ''"> and onpostdate = #{onpostdate} </if>
            <if test="outmethod != null and outmethod != ''"> and outmethod = #{outmethod} </if>
            <if test="pkClerkclass != null and pkClerkclass != ''"> and pk_clerkclass = #{pkClerkclass} </if>
            <if test="pkDutyrank != null and pkDutyrank != ''"> and pk_dutyrank = #{pkDutyrank} </if>
            <if test="pkPsntype != null and pkPsntype != ''"> and pk_psntype = #{pkPsntype} </if>
            <if test="poststat != null and poststat != ''"> and poststat = #{poststat} </if>
            <if test="psnnamepinyin != null and psnnamepinyin != ''"> and psnnamepinyin = #{psnnamepinyin} </if>
            <if test="recruitresource != null and recruitresource != ''"> and recruitresource = #{recruitresource} </if>
            <if test="regular != null and regular != ''"> and regular = #{regular} </if>
            <if test="regulardata != null and regulardata != ''"> and regulardata = #{regulardata} </if>
            <if test="series != null and series != ''"> and series = #{series} </if>
            <if test="showorder != null"> and showorder = #{showorder} </if>
            <if test="tbmProp != null"> and tbm_prop = #{tbmProp} </if>
            <if test="timecardid != null and timecardid != ''"> and timecardid = #{timecardid} </if>
            <if test="wastopdate != null and wastopdate != ''"> and wastopdate = #{wastopdate} </if>
            and dr='0'
    </trim>
</select>
    
<!-- 查询符合条件的数量 -->
<select id="entity_count" resultType="Integer" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity">
        select  count(1)   from bd_psndoc
    <trim prefix="where" prefixOverrides="and"> 
        <if test="amcode != null and amcode != ''"> and amcode = #{amcode} </if>
            <if test="clerkcode != null and clerkcode != ''"> and clerkcode = #{clerkcode} </if>
            <if test="clerkflag != null and clerkflag != ''"> and clerkflag = #{clerkflag} </if>
            <if test="createtime != null and createtime != ''"> and createtime = #{createtime} </if>
            <if test="creator != null and creator != ''"> and creator = #{creator} </if>
            <if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
            <if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
            <if test="def11 != null and def11 != ''"> and def11 = #{def11} </if>
            <if test="def12 != null and def12 != ''"> and def12 = #{def12} </if>
            <if test="def13 != null and def13 != ''"> and def13 = #{def13} </if>
            <if test="def14 != null and def14 != ''"> and def14 = #{def14} </if>
            <if test="def15 != null and def15 != ''"> and def15 = #{def15} </if>
            <if test="def16 != null and def16 != ''"> and def16 = #{def16} </if>
            <if test="def17 != null and def17 != ''"> and def17 = #{def17} </if>
            <if test="def18 != null and def18 != ''"> and def18 = #{def18} </if>
            <if test="def19 != null and def19 != ''"> and def19 = #{def19} </if>
            <if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
            <if test="def20 != null and def20 != ''"> and def20 = #{def20} </if>
            <if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
            <if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
            <if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
            <if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
            <if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
            <if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
            <if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
            <if test="dr != null"> and dr = #{dr} </if>
            <if test="indocflag != null and indocflag != ''"> and indocflag = #{indocflag} </if>
            <if test="indutydate != null and indutydate != ''"> and indutydate = #{indutydate} </if>
            <if test="innercode != null and innercode != ''"> and innercode = #{innercode} </if>
            <if test="jobrank != null and jobrank != ''"> and jobrank = #{jobrank} </if>
            <if test="jobseries != null and jobseries != ''"> and jobseries = #{jobseries} </if>
            <if test="maxinnercode != null and maxinnercode != ''"> and maxinnercode = #{maxinnercode} </if>
            <if test="modifier != null and modifier != ''"> and modifier = #{modifier} </if>
            <if test="modifytime != null and modifytime != ''"> and modifytime = #{modifytime} </if>
            <if test="outdutydate != null and outdutydate != ''"> and outdutydate = #{outdutydate} </if>
            <if test="pkCorp != null and pkCorp != ''"> and pk_corp = #{pkCorp} </if>
            <if test="pkDeptdoc != null and pkDeptdoc != ''"> and pk_deptdoc = #{pkDeptdoc} </if>
            <if test="pkOmJob != null and pkOmJob != ''"> and pk_om_job = #{pkOmJob} </if>
            <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> and pk_psnbasdoc = #{pkPsnbasdoc} </if>
            <if test="pkPsncl != null and pkPsncl != ''"> and pk_psncl = #{pkPsncl} </if>
            <if test="pkPsndoc != null and pkPsndoc != ''"> and pk_psndoc = #{pkPsndoc} </if>
            <if test="psnclscope != null"> and psnclscope = #{psnclscope} </if>
            <if test="psncode != null and psncode != ''"> and psncode = #{psncode} </if>
            <if test="psnname != null and psnname != ''"> and psnname = #{psnname} </if>
            <if test="sealdate != null and sealdate != ''"> and sealdate = #{sealdate} </if>
            <if test="ts != null and ts != ''"> and ts = #{ts} </if>
            <if test="directleader != null and directleader != ''"> and directleader = #{directleader} </if>
            <if test="dutyname != null and dutyname != ''"> and dutyname = #{dutyname} </if>
            <if test="groupdef1 != null and groupdef1 != ''"> and groupdef1 = #{groupdef1} </if>
            <if test="groupdef10 != null and groupdef10 != ''"> and groupdef10 = #{groupdef10} </if>
            <if test="groupdef11 != null and groupdef11 != ''"> and groupdef11 = #{groupdef11} </if>
            <if test="groupdef12 != null and groupdef12 != ''"> and groupdef12 = #{groupdef12} </if>
            <if test="groupdef13 != null and groupdef13 != ''"> and groupdef13 = #{groupdef13} </if>
            <if test="groupdef14 != null and groupdef14 != ''"> and groupdef14 = #{groupdef14} </if>
            <if test="groupdef15 != null and groupdef15 != ''"> and groupdef15 = #{groupdef15} </if>
            <if test="groupdef16 != null and groupdef16 != ''"> and groupdef16 = #{groupdef16} </if>
            <if test="groupdef17 != null and groupdef17 != ''"> and groupdef17 = #{groupdef17} </if>
            <if test="groupdef18 != null and groupdef18 != ''"> and groupdef18 = #{groupdef18} </if>
            <if test="groupdef19 != null and groupdef19 != ''"> and groupdef19 = #{groupdef19} </if>
            <if test="groupdef2 != null and groupdef2 != ''"> and groupdef2 = #{groupdef2} </if>
            <if test="groupdef20 != null and groupdef20 != ''"> and groupdef20 = #{groupdef20} </if>
            <if test="groupdef3 != null and groupdef3 != ''"> and groupdef3 = #{groupdef3} </if>
            <if test="groupdef4 != null and groupdef4 != ''"> and groupdef4 = #{groupdef4} </if>
            <if test="groupdef5 != null and groupdef5 != ''"> and groupdef5 = #{groupdef5} </if>
            <if test="groupdef6 != null and groupdef6 != ''"> and groupdef6 = #{groupdef6} </if>
            <if test="groupdef7 != null and groupdef7 != ''"> and groupdef7 = #{groupdef7} </if>
            <if test="groupdef8 != null and groupdef8 != ''"> and groupdef8 = #{groupdef8} </if>
            <if test="groupdef9 != null and groupdef9 != ''"> and groupdef9 = #{groupdef9} </if>
            <if test="hroperator != null and hroperator != ''"> and hroperator = #{hroperator} </if>
            <if test="insource != null and insource != ''"> and insource = #{insource} </if>
            <if test="iscalovertime != null and iscalovertime != ''"> and iscalovertime = #{iscalovertime} </if>
            <if test="isreferenced != null and isreferenced != ''"> and isreferenced = #{isreferenced} </if>
            <if test="isreturn != null and isreturn != ''"> and isreturn = #{isreturn} </if>
            <if test="onpostdate != null and onpostdate != ''"> and onpostdate = #{onpostdate} </if>
            <if test="outmethod != null and outmethod != ''"> and outmethod = #{outmethod} </if>
            <if test="pkClerkclass != null and pkClerkclass != ''"> and pk_clerkclass = #{pkClerkclass} </if>
            <if test="pkDutyrank != null and pkDutyrank != ''"> and pk_dutyrank = #{pkDutyrank} </if>
            <if test="pkPsntype != null and pkPsntype != ''"> and pk_psntype = #{pkPsntype} </if>
            <if test="poststat != null and poststat != ''"> and poststat = #{poststat} </if>
            <if test="psnnamepinyin != null and psnnamepinyin != ''"> and psnnamepinyin = #{psnnamepinyin} </if>
            <if test="recruitresource != null and recruitresource != ''"> and recruitresource = #{recruitresource} </if>
            <if test="regular != null and regular != ''"> and regular = #{regular} </if>
            <if test="regulardata != null and regulardata != ''"> and regulardata = #{regulardata} </if>
            <if test="series != null and series != ''"> and series = #{series} </if>
            <if test="showorder != null"> and showorder = #{showorder} </if>
            <if test="tbmProp != null"> and tbm_prop = #{tbmProp} </if>
            <if test="timecardid != null and timecardid != ''"> and timecardid = #{timecardid} </if>
            <if test="wastopdate != null and wastopdate != ''"> and wastopdate = #{wastopdate} </if>
            and sts='Y'
    </trim>
    <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
    <if test=" sort !='' and sort!=null and order !='' and order!=null "> order by ${sort} ${order}</if>
    </select>

    <!-- 分页查询列表 采用like格式 -->
<select id="entity_list_like" resultMap="get-BdPsndocEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity">
    select
    <include refid="BdPsndocEntity_Base_Column_List" />
    from bd_psndoc
    <trim prefix="where" prefixOverrides="and"> 
        <if test="amcode != null and amcode != ''"> and amcode like concat('%',#{amcode},'%') </if>
            <if test="clerkcode != null and clerkcode != ''"> and clerkcode like concat('%',#{clerkcode},'%') </if>
            <if test="clerkflag != null and clerkflag != ''"> and clerkflag like concat('%',#{clerkflag},'%') </if>
            <if test="createtime != null and createtime != ''"> and createtime like concat('%',#{createtime},'%') </if>
            <if test="creator != null and creator != ''"> and creator like concat('%',#{creator},'%') </if>
            <if test="def1 != null and def1 != ''"> and def1 like concat('%',#{def1},'%') </if>
            <if test="def10 != null and def10 != ''"> and def10 like concat('%',#{def10},'%') </if>
            <if test="def11 != null and def11 != ''"> and def11 like concat('%',#{def11},'%') </if>
            <if test="def12 != null and def12 != ''"> and def12 like concat('%',#{def12},'%') </if>
            <if test="def13 != null and def13 != ''"> and def13 like concat('%',#{def13},'%') </if>
            <if test="def14 != null and def14 != ''"> and def14 like concat('%',#{def14},'%') </if>
            <if test="def15 != null and def15 != ''"> and def15 like concat('%',#{def15},'%') </if>
            <if test="def16 != null and def16 != ''"> and def16 like concat('%',#{def16},'%') </if>
            <if test="def17 != null and def17 != ''"> and def17 like concat('%',#{def17},'%') </if>
            <if test="def18 != null and def18 != ''"> and def18 like concat('%',#{def18},'%') </if>
            <if test="def19 != null and def19 != ''"> and def19 like concat('%',#{def19},'%') </if>
            <if test="def2 != null and def2 != ''"> and def2 like concat('%',#{def2},'%') </if>
            <if test="def20 != null and def20 != ''"> and def20 like concat('%',#{def20},'%') </if>
            <if test="def3 != null and def3 != ''"> and def3 like concat('%',#{def3},'%') </if>
            <if test="def4 != null and def4 != ''"> and def4 like concat('%',#{def4},'%') </if>
            <if test="def5 != null and def5 != ''"> and def5 like concat('%',#{def5},'%') </if>
            <if test="def6 != null and def6 != ''"> and def6 like concat('%',#{def6},'%') </if>
            <if test="def7 != null and def7 != ''"> and def7 like concat('%',#{def7},'%') </if>
            <if test="def8 != null and def8 != ''"> and def8 like concat('%',#{def8},'%') </if>
            <if test="def9 != null and def9 != ''"> and def9 like concat('%',#{def9},'%') </if>
            <if test="dr != null"> and dr like concat('%',#{dr},'%') </if>
            <if test="indocflag != null and indocflag != ''"> and indocflag like concat('%',#{indocflag},'%') </if>
            <if test="indutydate != null and indutydate != ''"> and indutydate like concat('%',#{indutydate},'%') </if>
            <if test="innercode != null and innercode != ''"> and innercode like concat('%',#{innercode},'%') </if>
            <if test="jobrank != null and jobrank != ''"> and jobrank like concat('%',#{jobrank},'%') </if>
            <if test="jobseries != null and jobseries != ''"> and jobseries like concat('%',#{jobseries},'%') </if>
            <if test="maxinnercode != null and maxinnercode != ''"> and maxinnercode like concat('%',#{maxinnercode},'%') </if>
            <if test="modifier != null and modifier != ''"> and modifier like concat('%',#{modifier},'%') </if>
            <if test="modifytime != null and modifytime != ''"> and modifytime like concat('%',#{modifytime},'%') </if>
            <if test="outdutydate != null and outdutydate != ''"> and outdutydate like concat('%',#{outdutydate},'%') </if>
            <if test="pkCorp != null and pkCorp != ''"> and pk_corp like concat('%',#{pkCorp},'%') </if>
            <if test="pkDeptdoc != null and pkDeptdoc != ''"> and pk_deptdoc like concat('%',#{pkDeptdoc},'%') </if>
            <if test="pkOmJob != null and pkOmJob != ''"> and pk_om_job like concat('%',#{pkOmJob},'%') </if>
            <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> and pk_psnbasdoc like concat('%',#{pkPsnbasdoc},'%') </if>
            <if test="pkPsncl != null and pkPsncl != ''"> and pk_psncl like concat('%',#{pkPsncl},'%') </if>
            <if test="pkPsndoc != null and pkPsndoc != ''"> and pk_psndoc like concat('%',#{pkPsndoc},'%') </if>
            <if test="psnclscope != null"> and psnclscope like concat('%',#{psnclscope},'%') </if>
            <if test="psncode != null and psncode != ''"> and psncode like concat('%',#{psncode},'%') </if>
            <if test="psnname != null and psnname != ''"> and psnname like concat('%',#{psnname},'%') </if>
            <if test="sealdate != null and sealdate != ''"> and sealdate like concat('%',#{sealdate},'%') </if>
            <if test="ts != null and ts != ''"> and ts like concat('%',#{ts},'%') </if>
            <if test="directleader != null and directleader != ''"> and directleader like concat('%',#{directleader},'%') </if>
            <if test="dutyname != null and dutyname != ''"> and dutyname like concat('%',#{dutyname},'%') </if>
            <if test="groupdef1 != null and groupdef1 != ''"> and groupdef1 like concat('%',#{groupdef1},'%') </if>
            <if test="groupdef10 != null and groupdef10 != ''"> and groupdef10 like concat('%',#{groupdef10},'%') </if>
            <if test="groupdef11 != null and groupdef11 != ''"> and groupdef11 like concat('%',#{groupdef11},'%') </if>
            <if test="groupdef12 != null and groupdef12 != ''"> and groupdef12 like concat('%',#{groupdef12},'%') </if>
            <if test="groupdef13 != null and groupdef13 != ''"> and groupdef13 like concat('%',#{groupdef13},'%') </if>
            <if test="groupdef14 != null and groupdef14 != ''"> and groupdef14 like concat('%',#{groupdef14},'%') </if>
            <if test="groupdef15 != null and groupdef15 != ''"> and groupdef15 like concat('%',#{groupdef15},'%') </if>
            <if test="groupdef16 != null and groupdef16 != ''"> and groupdef16 like concat('%',#{groupdef16},'%') </if>
            <if test="groupdef17 != null and groupdef17 != ''"> and groupdef17 like concat('%',#{groupdef17},'%') </if>
            <if test="groupdef18 != null and groupdef18 != ''"> and groupdef18 like concat('%',#{groupdef18},'%') </if>
            <if test="groupdef19 != null and groupdef19 != ''"> and groupdef19 like concat('%',#{groupdef19},'%') </if>
            <if test="groupdef2 != null and groupdef2 != ''"> and groupdef2 like concat('%',#{groupdef2},'%') </if>
            <if test="groupdef20 != null and groupdef20 != ''"> and groupdef20 like concat('%',#{groupdef20},'%') </if>
            <if test="groupdef3 != null and groupdef3 != ''"> and groupdef3 like concat('%',#{groupdef3},'%') </if>
            <if test="groupdef4 != null and groupdef4 != ''"> and groupdef4 like concat('%',#{groupdef4},'%') </if>
            <if test="groupdef5 != null and groupdef5 != ''"> and groupdef5 like concat('%',#{groupdef5},'%') </if>
            <if test="groupdef6 != null and groupdef6 != ''"> and groupdef6 like concat('%',#{groupdef6},'%') </if>
            <if test="groupdef7 != null and groupdef7 != ''"> and groupdef7 like concat('%',#{groupdef7},'%') </if>
            <if test="groupdef8 != null and groupdef8 != ''"> and groupdef8 like concat('%',#{groupdef8},'%') </if>
            <if test="groupdef9 != null and groupdef9 != ''"> and groupdef9 like concat('%',#{groupdef9},'%') </if>
            <if test="hroperator != null and hroperator != ''"> and hroperator like concat('%',#{hroperator},'%') </if>
            <if test="insource != null and insource != ''"> and insource like concat('%',#{insource},'%') </if>
            <if test="iscalovertime != null and iscalovertime != ''"> and iscalovertime like concat('%',#{iscalovertime},'%') </if>
            <if test="isreferenced != null and isreferenced != ''"> and isreferenced like concat('%',#{isreferenced},'%') </if>
            <if test="isreturn != null and isreturn != ''"> and isreturn like concat('%',#{isreturn},'%') </if>
            <if test="onpostdate != null and onpostdate != ''"> and onpostdate like concat('%',#{onpostdate},'%') </if>
            <if test="outmethod != null and outmethod != ''"> and outmethod like concat('%',#{outmethod},'%') </if>
            <if test="pkClerkclass != null and pkClerkclass != ''"> and pk_clerkclass like concat('%',#{pkClerkclass},'%') </if>
            <if test="pkDutyrank != null and pkDutyrank != ''"> and pk_dutyrank like concat('%',#{pkDutyrank},'%') </if>
            <if test="pkPsntype != null and pkPsntype != ''"> and pk_psntype like concat('%',#{pkPsntype},'%') </if>
            <if test="poststat != null and poststat != ''"> and poststat like concat('%',#{poststat},'%') </if>
            <if test="psnnamepinyin != null and psnnamepinyin != ''"> and psnnamepinyin like concat('%',#{psnnamepinyin},'%') </if>
            <if test="recruitresource != null and recruitresource != ''"> and recruitresource like concat('%',#{recruitresource},'%') </if>
            <if test="regular != null and regular != ''"> and regular like concat('%',#{regular},'%') </if>
            <if test="regulardata != null and regulardata != ''"> and regulardata like concat('%',#{regulardata},'%') </if>
            <if test="series != null and series != ''"> and series like concat('%',#{series},'%') </if>
            <if test="showorder != null"> and showorder like concat('%',#{showorder},'%') </if>
            <if test="tbmProp != null"> and tbm_prop like concat('%',#{tbmProp},'%') </if>
            <if test="timecardid != null and timecardid != ''"> and timecardid like concat('%',#{timecardid},'%') </if>
            <if test="wastopdate != null and wastopdate != ''"> and wastopdate like concat('%',#{wastopdate},'%') </if>
            and sts='Y'
    </trim>
    <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>
    <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>

<!-- 查询列表 字段采用or格式 -->
<select id="BdPsndocentity_list_or" resultMap="get-BdPsndocEntity-result" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity">
    select
    <include refid="BdPsndocEntity_Base_Column_List" />
    from bd_psndoc
    <trim prefix="where" prefixOverrides="and"> 
         <if test="amcode != null and amcode != ''"> or amcode = #{amcode} </if>
             <if test="clerkcode != null and clerkcode != ''"> or clerkcode = #{clerkcode} </if>
             <if test="clerkflag != null and clerkflag != ''"> or clerkflag = #{clerkflag} </if>
             <if test="createtime != null and createtime != ''"> or createtime = #{createtime} </if>
             <if test="creator != null and creator != ''"> or creator = #{creator} </if>
             <if test="def1 != null and def1 != ''"> or def1 = #{def1} </if>
             <if test="def10 != null and def10 != ''"> or def10 = #{def10} </if>
             <if test="def11 != null and def11 != ''"> or def11 = #{def11} </if>
             <if test="def12 != null and def12 != ''"> or def12 = #{def12} </if>
             <if test="def13 != null and def13 != ''"> or def13 = #{def13} </if>
             <if test="def14 != null and def14 != ''"> or def14 = #{def14} </if>
             <if test="def15 != null and def15 != ''"> or def15 = #{def15} </if>
             <if test="def16 != null and def16 != ''"> or def16 = #{def16} </if>
             <if test="def17 != null and def17 != ''"> or def17 = #{def17} </if>
             <if test="def18 != null and def18 != ''"> or def18 = #{def18} </if>
             <if test="def19 != null and def19 != ''"> or def19 = #{def19} </if>
             <if test="def2 != null and def2 != ''"> or def2 = #{def2} </if>
             <if test="def20 != null and def20 != ''"> or def20 = #{def20} </if>
             <if test="def3 != null and def3 != ''"> or def3 = #{def3} </if>
             <if test="def4 != null and def4 != ''"> or def4 = #{def4} </if>
             <if test="def5 != null and def5 != ''"> or def5 = #{def5} </if>
             <if test="def6 != null and def6 != ''"> or def6 = #{def6} </if>
             <if test="def7 != null and def7 != ''"> or def7 = #{def7} </if>
             <if test="def8 != null and def8 != ''"> or def8 = #{def8} </if>
             <if test="def9 != null and def9 != ''"> or def9 = #{def9} </if>
             <if test="dr != null"> or dr = #{dr} </if>
             <if test="indocflag != null and indocflag != ''"> or indocflag = #{indocflag} </if>
             <if test="indutydate != null and indutydate != ''"> or indutydate = #{indutydate} </if>
             <if test="innercode != null and innercode != ''"> or innercode = #{innercode} </if>
             <if test="jobrank != null and jobrank != ''"> or jobrank = #{jobrank} </if>
             <if test="jobseries != null and jobseries != ''"> or jobseries = #{jobseries} </if>
             <if test="maxinnercode != null and maxinnercode != ''"> or maxinnercode = #{maxinnercode} </if>
             <if test="modifier != null and modifier != ''"> or modifier = #{modifier} </if>
             <if test="modifytime != null and modifytime != ''"> or modifytime = #{modifytime} </if>
             <if test="outdutydate != null and outdutydate != ''"> or outdutydate = #{outdutydate} </if>
             <if test="pkCorp != null and pkCorp != ''"> or pk_corp = #{pkCorp} </if>
             <if test="pkDeptdoc != null and pkDeptdoc != ''"> or pk_deptdoc = #{pkDeptdoc} </if>
             <if test="pkOmJob != null and pkOmJob != ''"> or pk_om_job = #{pkOmJob} </if>
             <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> or pk_psnbasdoc = #{pkPsnbasdoc} </if>
             <if test="pkPsncl != null and pkPsncl != ''"> or pk_psncl = #{pkPsncl} </if>
             <if test="pkPsndoc != null and pkPsndoc != ''"> or pk_psndoc = #{pkPsndoc} </if>
             <if test="psnclscope != null"> or psnclscope = #{psnclscope} </if>
             <if test="psncode != null and psncode != ''"> or psncode = #{psncode} </if>
             <if test="psnname != null and psnname != ''"> or psnname = #{psnname} </if>
             <if test="sealdate != null and sealdate != ''"> or sealdate = #{sealdate} </if>
             <if test="ts != null and ts != ''"> or ts = #{ts} </if>
             <if test="directleader != null and directleader != ''"> or directleader = #{directleader} </if>
             <if test="dutyname != null and dutyname != ''"> or dutyname = #{dutyname} </if>
             <if test="groupdef1 != null and groupdef1 != ''"> or groupdef1 = #{groupdef1} </if>
             <if test="groupdef10 != null and groupdef10 != ''"> or groupdef10 = #{groupdef10} </if>
             <if test="groupdef11 != null and groupdef11 != ''"> or groupdef11 = #{groupdef11} </if>
             <if test="groupdef12 != null and groupdef12 != ''"> or groupdef12 = #{groupdef12} </if>
             <if test="groupdef13 != null and groupdef13 != ''"> or groupdef13 = #{groupdef13} </if>
             <if test="groupdef14 != null and groupdef14 != ''"> or groupdef14 = #{groupdef14} </if>
             <if test="groupdef15 != null and groupdef15 != ''"> or groupdef15 = #{groupdef15} </if>
             <if test="groupdef16 != null and groupdef16 != ''"> or groupdef16 = #{groupdef16} </if>
             <if test="groupdef17 != null and groupdef17 != ''"> or groupdef17 = #{groupdef17} </if>
             <if test="groupdef18 != null and groupdef18 != ''"> or groupdef18 = #{groupdef18} </if>
             <if test="groupdef19 != null and groupdef19 != ''"> or groupdef19 = #{groupdef19} </if>
             <if test="groupdef2 != null and groupdef2 != ''"> or groupdef2 = #{groupdef2} </if>
             <if test="groupdef20 != null and groupdef20 != ''"> or groupdef20 = #{groupdef20} </if>
             <if test="groupdef3 != null and groupdef3 != ''"> or groupdef3 = #{groupdef3} </if>
             <if test="groupdef4 != null and groupdef4 != ''"> or groupdef4 = #{groupdef4} </if>
             <if test="groupdef5 != null and groupdef5 != ''"> or groupdef5 = #{groupdef5} </if>
             <if test="groupdef6 != null and groupdef6 != ''"> or groupdef6 = #{groupdef6} </if>
             <if test="groupdef7 != null and groupdef7 != ''"> or groupdef7 = #{groupdef7} </if>
             <if test="groupdef8 != null and groupdef8 != ''"> or groupdef8 = #{groupdef8} </if>
             <if test="groupdef9 != null and groupdef9 != ''"> or groupdef9 = #{groupdef9} </if>
             <if test="hroperator != null and hroperator != ''"> or hroperator = #{hroperator} </if>
             <if test="insource != null and insource != ''"> or insource = #{insource} </if>
             <if test="iscalovertime != null and iscalovertime != ''"> or iscalovertime = #{iscalovertime} </if>
             <if test="isreferenced != null and isreferenced != ''"> or isreferenced = #{isreferenced} </if>
             <if test="isreturn != null and isreturn != ''"> or isreturn = #{isreturn} </if>
             <if test="onpostdate != null and onpostdate != ''"> or onpostdate = #{onpostdate} </if>
             <if test="outmethod != null and outmethod != ''"> or outmethod = #{outmethod} </if>
             <if test="pkClerkclass != null and pkClerkclass != ''"> or pk_clerkclass = #{pkClerkclass} </if>
             <if test="pkDutyrank != null and pkDutyrank != ''"> or pk_dutyrank = #{pkDutyrank} </if>
             <if test="pkPsntype != null and pkPsntype != ''"> or pk_psntype = #{pkPsntype} </if>
             <if test="poststat != null and poststat != ''"> or poststat = #{poststat} </if>
             <if test="psnnamepinyin != null and psnnamepinyin != ''"> or psnnamepinyin = #{psnnamepinyin} </if>
             <if test="recruitresource != null and recruitresource != ''"> or recruitresource = #{recruitresource} </if>
             <if test="regular != null and regular != ''"> or regular = #{regular} </if>
             <if test="regulardata != null and regulardata != ''"> or regulardata = #{regulardata} </if>
             <if test="series != null and series != ''"> or series = #{series} </if>
             <if test="showorder != null"> or showorder = #{showorder} </if>
             <if test="tbmProp != null"> or tbm_prop = #{tbmProp} </if>
             <if test="timecardid != null and timecardid != ''"> or timecardid = #{timecardid} </if>
             <if test="wastopdate != null and wastopdate != ''"> or wastopdate = #{wastopdate} </if>
            and sts='Y'
    </trim>
    <if test=" sort == null or sort == ''.toString()  "> order by sorts asc</if>
    <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
</select>

<!--新增所有列-->
<insert id="entity_insert" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity" keyProperty="pkPsndoc" useGeneratedKeys="true">
    insert into bd_psndoc(
  <trim suffix="" suffixOverrides=",">
       <if test="amcode != null and amcode != ''"> amcode , </if>
            <if test="clerkcode != null and clerkcode != ''"> clerkcode , </if>
            <if test="clerkflag != null and clerkflag != ''"> clerkflag , </if>
            <if test="createtime != null and createtime != ''"> createtime , </if>
            <if test="creator != null and creator != ''"> creator , </if>
            <if test="def1 != null and def1 != ''"> def1 , </if>
            <if test="def10 != null and def10 != ''"> def10 , </if>
            <if test="def11 != null and def11 != ''"> def11 , </if>
            <if test="def12 != null and def12 != ''"> def12 , </if>
            <if test="def13 != null and def13 != ''"> def13 , </if>
            <if test="def14 != null and def14 != ''"> def14 , </if>
            <if test="def15 != null and def15 != ''"> def15 , </if>
            <if test="def16 != null and def16 != ''"> def16 , </if>
            <if test="def17 != null and def17 != ''"> def17 , </if>
            <if test="def18 != null and def18 != ''"> def18 , </if>
            <if test="def19 != null and def19 != ''"> def19 , </if>
            <if test="def2 != null and def2 != ''"> def2 , </if>
            <if test="def20 != null and def20 != ''"> def20 , </if>
            <if test="def3 != null and def3 != ''"> def3 , </if>
            <if test="def4 != null and def4 != ''"> def4 , </if>
            <if test="def5 != null and def5 != ''"> def5 , </if>
            <if test="def6 != null and def6 != ''"> def6 , </if>
            <if test="def7 != null and def7 != ''"> def7 , </if>
            <if test="def8 != null and def8 != ''"> def8 , </if>
            <if test="def9 != null and def9 != ''"> def9 , </if>
            <if test="dr != null"> dr , </if>
            <if test="indocflag != null and indocflag != ''"> indocflag , </if>
            <if test="indutydate != null and indutydate != ''"> indutydate , </if>
            <if test="innercode != null and innercode != ''"> innercode , </if>
            <if test="jobrank != null and jobrank != ''"> jobrank , </if>
            <if test="jobseries != null and jobseries != ''"> jobseries , </if>
            <if test="maxinnercode != null and maxinnercode != ''"> maxinnercode , </if>
            <if test="modifier != null and modifier != ''"> modifier , </if>
            <if test="modifytime != null and modifytime != ''"> modifytime , </if>
            <if test="outdutydate != null and outdutydate != ''"> outdutydate , </if>
            <if test="pkCorp != null and pkCorp != ''"> pk_corp , </if>
            <if test="pkDeptdoc != null and pkDeptdoc != ''"> pk_deptdoc , </if>
            <if test="pkOmJob != null and pkOmJob != ''"> pk_om_job , </if>
            <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> pk_psnbasdoc , </if>
            <if test="pkPsncl != null and pkPsncl != ''"> pk_psncl , </if>
            <if test="pkPsndoc != null and pkPsndoc != ''"> pk_psndoc , </if>
            <if test="psnclscope != null"> psnclscope , </if>
            <if test="psncode != null and psncode != ''"> psncode , </if>
            <if test="psnname != null and psnname != ''"> psnname , </if>
            <if test="sealdate != null and sealdate != ''"> sealdate , </if>
            <if test="ts != null and ts != ''"> ts , </if>
            <if test="directleader != null and directleader != ''"> directleader , </if>
            <if test="dutyname != null and dutyname != ''"> dutyname , </if>
            <if test="groupdef1 != null and groupdef1 != ''"> groupdef1 , </if>
            <if test="groupdef10 != null and groupdef10 != ''"> groupdef10 , </if>
            <if test="groupdef11 != null and groupdef11 != ''"> groupdef11 , </if>
            <if test="groupdef12 != null and groupdef12 != ''"> groupdef12 , </if>
            <if test="groupdef13 != null and groupdef13 != ''"> groupdef13 , </if>
            <if test="groupdef14 != null and groupdef14 != ''"> groupdef14 , </if>
            <if test="groupdef15 != null and groupdef15 != ''"> groupdef15 , </if>
            <if test="groupdef16 != null and groupdef16 != ''"> groupdef16 , </if>
            <if test="groupdef17 != null and groupdef17 != ''"> groupdef17 , </if>
            <if test="groupdef18 != null and groupdef18 != ''"> groupdef18 , </if>
            <if test="groupdef19 != null and groupdef19 != ''"> groupdef19 , </if>
            <if test="groupdef2 != null and groupdef2 != ''"> groupdef2 , </if>
            <if test="groupdef20 != null and groupdef20 != ''"> groupdef20 , </if>
            <if test="groupdef3 != null and groupdef3 != ''"> groupdef3 , </if>
            <if test="groupdef4 != null and groupdef4 != ''"> groupdef4 , </if>
            <if test="groupdef5 != null and groupdef5 != ''"> groupdef5 , </if>
            <if test="groupdef6 != null and groupdef6 != ''"> groupdef6 , </if>
            <if test="groupdef7 != null and groupdef7 != ''"> groupdef7 , </if>
            <if test="groupdef8 != null and groupdef8 != ''"> groupdef8 , </if>
            <if test="groupdef9 != null and groupdef9 != ''"> groupdef9 , </if>
            <if test="hroperator != null and hroperator != ''"> hroperator , </if>
            <if test="insource != null and insource != ''"> insource , </if>
            <if test="iscalovertime != null and iscalovertime != ''"> iscalovertime , </if>
            <if test="isreferenced != null and isreferenced != ''"> isreferenced , </if>
            <if test="isreturn != null and isreturn != ''"> isreturn , </if>
            <if test="onpostdate != null and onpostdate != ''"> onpostdate , </if>
            <if test="outmethod != null and outmethod != ''"> outmethod , </if>
            <if test="pkClerkclass != null and pkClerkclass != ''"> pk_clerkclass , </if>
            <if test="pkDutyrank != null and pkDutyrank != ''"> pk_dutyrank , </if>
            <if test="pkPsntype != null and pkPsntype != ''"> pk_psntype , </if>
            <if test="poststat != null and poststat != ''"> poststat , </if>
            <if test="psnnamepinyin != null and psnnamepinyin != ''"> psnnamepinyin , </if>
            <if test="recruitresource != null and recruitresource != ''"> recruitresource , </if>
            <if test="regular != null and regular != ''"> regular , </if>
            <if test="regulardata != null and regulardata != ''"> regulardata , </if>
            <if test="series != null and series != ''"> series , </if>
            <if test="showorder != null"> showorder , </if>
            <if test="tbmProp != null"> tbm_prop , </if>
            <if test="timecardid != null and timecardid != ''"> timecardid , </if>
            <if test="wastopdate != null and wastopdate != ''"> wastopdate , </if>
            <if test="sorts == null ">sorts,</if>
    <if test="sts == null ">sts,</if>
  </trim>
  )values(
 <trim suffix="" suffixOverrides=",">
       <if test="amcode != null and amcode != ''"> #{amcode} ,</if>
            <if test="clerkcode != null and clerkcode != ''"> #{clerkcode} ,</if>
            <if test="clerkflag != null and clerkflag != ''"> #{clerkflag} ,</if>
            <if test="createtime != null and createtime != ''"> #{createtime} ,</if>
            <if test="creator != null and creator != ''"> #{creator} ,</if>
            <if test="def1 != null and def1 != ''"> #{def1} ,</if>
            <if test="def10 != null and def10 != ''"> #{def10} ,</if>
            <if test="def11 != null and def11 != ''"> #{def11} ,</if>
            <if test="def12 != null and def12 != ''"> #{def12} ,</if>
            <if test="def13 != null and def13 != ''"> #{def13} ,</if>
            <if test="def14 != null and def14 != ''"> #{def14} ,</if>
            <if test="def15 != null and def15 != ''"> #{def15} ,</if>
            <if test="def16 != null and def16 != ''"> #{def16} ,</if>
            <if test="def17 != null and def17 != ''"> #{def17} ,</if>
            <if test="def18 != null and def18 != ''"> #{def18} ,</if>
            <if test="def19 != null and def19 != ''"> #{def19} ,</if>
            <if test="def2 != null and def2 != ''"> #{def2} ,</if>
            <if test="def20 != null and def20 != ''"> #{def20} ,</if>
            <if test="def3 != null and def3 != ''"> #{def3} ,</if>
            <if test="def4 != null and def4 != ''"> #{def4} ,</if>
            <if test="def5 != null and def5 != ''"> #{def5} ,</if>
            <if test="def6 != null and def6 != ''"> #{def6} ,</if>
            <if test="def7 != null and def7 != ''"> #{def7} ,</if>
            <if test="def8 != null and def8 != ''"> #{def8} ,</if>
            <if test="def9 != null and def9 != ''"> #{def9} ,</if>
            <if test="dr != null"> #{dr} ,</if>
            <if test="indocflag != null and indocflag != ''"> #{indocflag} ,</if>
            <if test="indutydate != null and indutydate != ''"> #{indutydate} ,</if>
            <if test="innercode != null and innercode != ''"> #{innercode} ,</if>
            <if test="jobrank != null and jobrank != ''"> #{jobrank} ,</if>
            <if test="jobseries != null and jobseries != ''"> #{jobseries} ,</if>
            <if test="maxinnercode != null and maxinnercode != ''"> #{maxinnercode} ,</if>
            <if test="modifier != null and modifier != ''"> #{modifier} ,</if>
            <if test="modifytime != null and modifytime != ''"> #{modifytime} ,</if>
            <if test="outdutydate != null and outdutydate != ''"> #{outdutydate} ,</if>
            <if test="pkCorp != null and pkCorp != ''"> #{pkCorp} ,</if>
            <if test="pkDeptdoc != null and pkDeptdoc != ''"> #{pkDeptdoc} ,</if>
            <if test="pkOmJob != null and pkOmJob != ''"> #{pkOmJob} ,</if>
            <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> #{pkPsnbasdoc} ,</if>
            <if test="pkPsncl != null and pkPsncl != ''"> #{pkPsncl} ,</if>
            <if test="pkPsndoc != null and pkPsndoc != ''"> #{pkPsndoc} ,</if>
            <if test="psnclscope != null"> #{psnclscope} ,</if>
            <if test="psncode != null and psncode != ''"> #{psncode} ,</if>
            <if test="psnname != null and psnname != ''"> #{psnname} ,</if>
            <if test="sealdate != null and sealdate != ''"> #{sealdate} ,</if>
            <if test="ts != null and ts != ''"> #{ts} ,</if>
            <if test="directleader != null and directleader != ''"> #{directleader} ,</if>
            <if test="dutyname != null and dutyname != ''"> #{dutyname} ,</if>
            <if test="groupdef1 != null and groupdef1 != ''"> #{groupdef1} ,</if>
            <if test="groupdef10 != null and groupdef10 != ''"> #{groupdef10} ,</if>
            <if test="groupdef11 != null and groupdef11 != ''"> #{groupdef11} ,</if>
            <if test="groupdef12 != null and groupdef12 != ''"> #{groupdef12} ,</if>
            <if test="groupdef13 != null and groupdef13 != ''"> #{groupdef13} ,</if>
            <if test="groupdef14 != null and groupdef14 != ''"> #{groupdef14} ,</if>
            <if test="groupdef15 != null and groupdef15 != ''"> #{groupdef15} ,</if>
            <if test="groupdef16 != null and groupdef16 != ''"> #{groupdef16} ,</if>
            <if test="groupdef17 != null and groupdef17 != ''"> #{groupdef17} ,</if>
            <if test="groupdef18 != null and groupdef18 != ''"> #{groupdef18} ,</if>
            <if test="groupdef19 != null and groupdef19 != ''"> #{groupdef19} ,</if>
            <if test="groupdef2 != null and groupdef2 != ''"> #{groupdef2} ,</if>
            <if test="groupdef20 != null and groupdef20 != ''"> #{groupdef20} ,</if>
            <if test="groupdef3 != null and groupdef3 != ''"> #{groupdef3} ,</if>
            <if test="groupdef4 != null and groupdef4 != ''"> #{groupdef4} ,</if>
            <if test="groupdef5 != null and groupdef5 != ''"> #{groupdef5} ,</if>
            <if test="groupdef6 != null and groupdef6 != ''"> #{groupdef6} ,</if>
            <if test="groupdef7 != null and groupdef7 != ''"> #{groupdef7} ,</if>
            <if test="groupdef8 != null and groupdef8 != ''"> #{groupdef8} ,</if>
            <if test="groupdef9 != null and groupdef9 != ''"> #{groupdef9} ,</if>
            <if test="hroperator != null and hroperator != ''"> #{hroperator} ,</if>
            <if test="insource != null and insource != ''"> #{insource} ,</if>
            <if test="iscalovertime != null and iscalovertime != ''"> #{iscalovertime} ,</if>
            <if test="isreferenced != null and isreferenced != ''"> #{isreferenced} ,</if>
            <if test="isreturn != null and isreturn != ''"> #{isreturn} ,</if>
            <if test="onpostdate != null and onpostdate != ''"> #{onpostdate} ,</if>
            <if test="outmethod != null and outmethod != ''"> #{outmethod} ,</if>
            <if test="pkClerkclass != null and pkClerkclass != ''"> #{pkClerkclass} ,</if>
            <if test="pkDutyrank != null and pkDutyrank != ''"> #{pkDutyrank} ,</if>
            <if test="pkPsntype != null and pkPsntype != ''"> #{pkPsntype} ,</if>
            <if test="poststat != null and poststat != ''"> #{poststat} ,</if>
            <if test="psnnamepinyin != null and psnnamepinyin != ''"> #{psnnamepinyin} ,</if>
            <if test="recruitresource != null and recruitresource != ''"> #{recruitresource} ,</if>
            <if test="regular != null and regular != ''"> #{regular} ,</if>
            <if test="regulardata != null and regulardata != ''"> #{regulardata} ,</if>
            <if test="series != null and series != ''"> #{series} ,</if>
            <if test="showorder != null"> #{showorder} ,</if>
            <if test="tbmProp != null"> #{tbmProp} ,</if>
            <if test="timecardid != null and timecardid != ''"> #{timecardid} ,</if>
            <if test="wastopdate != null and wastopdate != ''"> #{wastopdate} ,</if>
            <if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from bd_psndoc a WHERE a.sts = 'Y' ),</if>
    <if test="sts == null ">'Y',</if>
  </trim>
  )  
</insert>
<!-- 批量新增 -->
<insert id="entityInsertBatch" keyProperty="pkPsndoc" useGeneratedKeys="true">
  insert into bd_psndoc(amcode, clerkcode, clerkflag, createtime, creator, def1, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def2, def20, def3, def4, def5, def6, def7, def8, def9, dr, indocflag, indutydate, innercode, jobrank, jobseries, maxinnercode, modifier, modifytime, outdutydate, pk_corp, pk_deptdoc, pk_om_job, pk_psnbasdoc, pk_psncl, psnclscope, psncode, psnname, sealdate, ts, directleader, dutyname, groupdef1, groupdef10, groupdef11, groupdef12, groupdef13, groupdef14, groupdef15, groupdef16, groupdef17, groupdef18, groupdef19, groupdef2, groupdef20, groupdef3, groupdef4, groupdef5, groupdef6, groupdef7, groupdef8, groupdef9, hroperator, insource, iscalovertime, isreferenced, isreturn, onpostdate, outmethod, pk_clerkclass, pk_dutyrank, pk_psntype, poststat, psnnamepinyin, recruitresource, regular, regulardata, series, showorder, tbm_prop, timecardid, wastopdate,  sts) 
    values
    <foreach collection="entities" item="entity" separator=",">
    (#{entity.amcode},#{entity.clerkcode},#{entity.clerkflag},#{entity.createtime},#{entity.creator},#{entity.def1},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def2},#{entity.def20},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.dr},#{entity.indocflag},#{entity.indutydate},#{entity.innercode},#{entity.jobrank},#{entity.jobseries},#{entity.maxinnercode},#{entity.modifier},#{entity.modifytime},#{entity.outdutydate},#{entity.pkCorp},#{entity.pkDeptdoc},#{entity.pkOmJob},#{entity.pkPsnbasdoc},#{entity.pkPsncl},#{entity.psnclscope},#{entity.psncode},#{entity.psnname},#{entity.sealdate},#{entity.ts},#{entity.directleader},#{entity.dutyname},#{entity.groupdef1},#{entity.groupdef10},#{entity.groupdef11},#{entity.groupdef12},#{entity.groupdef13},#{entity.groupdef14},#{entity.groupdef15},#{entity.groupdef16},#{entity.groupdef17},#{entity.groupdef18},#{entity.groupdef19},#{entity.groupdef2},#{entity.groupdef20},#{entity.groupdef3},#{entity.groupdef4},#{entity.groupdef5},#{entity.groupdef6},#{entity.groupdef7},#{entity.groupdef8},#{entity.groupdef9},#{entity.hroperator},#{entity.insource},#{entity.iscalovertime},#{entity.isreferenced},#{entity.isreturn},#{entity.onpostdate},#{entity.outmethod},#{entity.pkClerkclass},#{entity.pkDutyrank},#{entity.pkPsntype},#{entity.poststat},#{entity.psnnamepinyin},#{entity.recruitresource},#{entity.regular},#{entity.regulardata},#{entity.series},#{entity.showorder},#{entity.tbmProp},#{entity.timecardid},#{entity.wastopdate}, 'Y')
    </foreach>
</insert>
<!-- 批量新增或者修改-->
<insert id="entityInsertOrUpdateBatch" keyProperty="pkPsndoc" useGeneratedKeys="true">
    insert into bd_psndoc(amcode, clerkcode, clerkflag, createtime, creator, def1, def10, def11, def12, def13, def14, def15, def16, def17, def18, def19, def2, def20, def3, def4, def5, def6, def7, def8, def9, dr, indocflag, indutydate, innercode, jobrank, jobseries, maxinnercode, modifier, modifytime, outdutydate, pk_corp, pk_deptdoc, pk_om_job, pk_psnbasdoc, pk_psncl, psnclscope, psncode, psnname, sealdate, ts, directleader, dutyname, groupdef1, groupdef10, groupdef11, groupdef12, groupdef13, groupdef14, groupdef15, groupdef16, groupdef17, groupdef18, groupdef19, groupdef2, groupdef20, groupdef3, groupdef4, groupdef5, groupdef6, groupdef7, groupdef8, groupdef9, hroperator, insource, iscalovertime, isreferenced, isreturn, onpostdate, outmethod, pk_clerkclass, pk_dutyrank, pk_psntype, poststat, psnnamepinyin, recruitresource, regular, regulardata, series, showorder, tbm_prop, timecardid, wastopdate)
    values
    <foreach collection="entities" item="entity" separator=",">
    (#{entity.amcode},#{entity.clerkcode},#{entity.clerkflag},#{entity.createtime},#{entity.creator},#{entity.def1},#{entity.def10},#{entity.def11},#{entity.def12},#{entity.def13},#{entity.def14},#{entity.def15},#{entity.def16},#{entity.def17},#{entity.def18},#{entity.def19},#{entity.def2},#{entity.def20},#{entity.def3},#{entity.def4},#{entity.def5},#{entity.def6},#{entity.def7},#{entity.def8},#{entity.def9},#{entity.dr},#{entity.indocflag},#{entity.indutydate},#{entity.innercode},#{entity.jobrank},#{entity.jobseries},#{entity.maxinnercode},#{entity.modifier},#{entity.modifytime},#{entity.outdutydate},#{entity.pkCorp},#{entity.pkDeptdoc},#{entity.pkOmJob},#{entity.pkPsnbasdoc},#{entity.pkPsncl},#{entity.psnclscope},#{entity.psncode},#{entity.psnname},#{entity.sealdate},#{entity.ts},#{entity.directleader},#{entity.dutyname},#{entity.groupdef1},#{entity.groupdef10},#{entity.groupdef11},#{entity.groupdef12},#{entity.groupdef13},#{entity.groupdef14},#{entity.groupdef15},#{entity.groupdef16},#{entity.groupdef17},#{entity.groupdef18},#{entity.groupdef19},#{entity.groupdef2},#{entity.groupdef20},#{entity.groupdef3},#{entity.groupdef4},#{entity.groupdef5},#{entity.groupdef6},#{entity.groupdef7},#{entity.groupdef8},#{entity.groupdef9},#{entity.hroperator},#{entity.insource},#{entity.iscalovertime},#{entity.isreferenced},#{entity.isreturn},#{entity.onpostdate},#{entity.outmethod},#{entity.pkClerkclass},#{entity.pkDutyrank},#{entity.pkPsntype},#{entity.poststat},#{entity.psnnamepinyin},#{entity.recruitresource},#{entity.regular},#{entity.regulardata},#{entity.series},#{entity.showorder},#{entity.tbmProp},#{entity.timecardid},#{entity.wastopdate})
    </foreach>
    on duplicate key update
    amcode = values(amcode),
    clerkcode = values(clerkcode),
    clerkflag = values(clerkflag),
    createtime = values(createtime),
    creator = values(creator),
    def1 = values(def1),
    def10 = values(def10),
    def11 = values(def11),
    def12 = values(def12),
    def13 = values(def13),
    def14 = values(def14),
    def15 = values(def15),
    def16 = values(def16),
    def17 = values(def17),
    def18 = values(def18),
    def19 = values(def19),
    def2 = values(def2),
    def20 = values(def20),
    def3 = values(def3),
    def4 = values(def4),
    def5 = values(def5),
    def6 = values(def6),
    def7 = values(def7),
    def8 = values(def8),
    def9 = values(def9),
    dr = values(dr),
    indocflag = values(indocflag),
    indutydate = values(indutydate),
    innercode = values(innercode),
    jobrank = values(jobrank),
    jobseries = values(jobseries),
    maxinnercode = values(maxinnercode),
    modifier = values(modifier),
    modifytime = values(modifytime),
    outdutydate = values(outdutydate),
    pk_corp = values(pk_corp),
    pk_deptdoc = values(pk_deptdoc),
    pk_om_job = values(pk_om_job),
    pk_psnbasdoc = values(pk_psnbasdoc),
    pk_psncl = values(pk_psncl),
    psnclscope = values(psnclscope),
    psncode = values(psncode),
    psnname = values(psnname),
    sealdate = values(sealdate),
    ts = values(ts),
    directleader = values(directleader),
    dutyname = values(dutyname),
    groupdef1 = values(groupdef1),
    groupdef10 = values(groupdef10),
    groupdef11 = values(groupdef11),
    groupdef12 = values(groupdef12),
    groupdef13 = values(groupdef13),
    groupdef14 = values(groupdef14),
    groupdef15 = values(groupdef15),
    groupdef16 = values(groupdef16),
    groupdef17 = values(groupdef17),
    groupdef18 = values(groupdef18),
    groupdef19 = values(groupdef19),
    groupdef2 = values(groupdef2),
    groupdef20 = values(groupdef20),
    groupdef3 = values(groupdef3),
    groupdef4 = values(groupdef4),
    groupdef5 = values(groupdef5),
    groupdef6 = values(groupdef6),
    groupdef7 = values(groupdef7),
    groupdef8 = values(groupdef8),
    groupdef9 = values(groupdef9),
    hroperator = values(hroperator),
    insource = values(insource),
    iscalovertime = values(iscalovertime),
    isreferenced = values(isreferenced),
    isreturn = values(isreturn),
    onpostdate = values(onpostdate),
    outmethod = values(outmethod),
    pk_clerkclass = values(pk_clerkclass),
    pk_dutyrank = values(pk_dutyrank),
    pk_psntype = values(pk_psntype),
    poststat = values(poststat),
    psnnamepinyin = values(psnnamepinyin),
    recruitresource = values(recruitresource),
    regular = values(regular),
    regulardata = values(regulardata),
    series = values(series),
    showorder = values(showorder),
    tbm_prop = values(tbm_prop),
    timecardid = values(timecardid),
    wastopdate = values(wastopdate)</insert>
<!--通过主键修改方法-->
<update id="entity_update" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity" >
update bd_psndoc  set
<trim suffix="" suffixOverrides=",">
  <if test="amcode != null and amcode != ''"> amcode = #{amcode},</if>
  <if test="clerkcode != null and clerkcode != ''"> clerkcode = #{clerkcode},</if>
  <if test="clerkflag != null and clerkflag != ''"> clerkflag = #{clerkflag},</if>
  <if test="createtime != null and createtime != ''"> createtime = #{createtime},</if>
  <if test="creator != null and creator != ''"> creator = #{creator},</if>
  <if test="def1 != null and def1 != ''"> def1 = #{def1},</if>
  <if test="def10 != null and def10 != ''"> def10 = #{def10},</if>
  <if test="def11 != null and def11 != ''"> def11 = #{def11},</if>
  <if test="def12 != null and def12 != ''"> def12 = #{def12},</if>
  <if test="def13 != null and def13 != ''"> def13 = #{def13},</if>
  <if test="def14 != null and def14 != ''"> def14 = #{def14},</if>
  <if test="def15 != null and def15 != ''"> def15 = #{def15},</if>
  <if test="def16 != null and def16 != ''"> def16 = #{def16},</if>
  <if test="def17 != null and def17 != ''"> def17 = #{def17},</if>
  <if test="def18 != null and def18 != ''"> def18 = #{def18},</if>
  <if test="def19 != null and def19 != ''"> def19 = #{def19},</if>
  <if test="def2 != null and def2 != ''"> def2 = #{def2},</if>
  <if test="def20 != null and def20 != ''"> def20 = #{def20},</if>
  <if test="def3 != null and def3 != ''"> def3 = #{def3},</if>
  <if test="def4 != null and def4 != ''"> def4 = #{def4},</if>
  <if test="def5 != null and def5 != ''"> def5 = #{def5},</if>
  <if test="def6 != null and def6 != ''"> def6 = #{def6},</if>
  <if test="def7 != null and def7 != ''"> def7 = #{def7},</if>
  <if test="def8 != null and def8 != ''"> def8 = #{def8},</if>
  <if test="def9 != null and def9 != ''"> def9 = #{def9},</if>
  <if test="dr != null"> dr = #{dr},</if>
  <if test="indocflag != null and indocflag != ''"> indocflag = #{indocflag},</if>
  <if test="indutydate != null and indutydate != ''"> indutydate = #{indutydate},</if>
  <if test="innercode != null and innercode != ''"> innercode = #{innercode},</if>
  <if test="jobrank != null and jobrank != ''"> jobrank = #{jobrank},</if>
  <if test="jobseries != null and jobseries != ''"> jobseries = #{jobseries},</if>
  <if test="maxinnercode != null and maxinnercode != ''"> maxinnercode = #{maxinnercode},</if>
  <if test="modifier != null and modifier != ''"> modifier = #{modifier},</if>
  <if test="modifytime != null and modifytime != ''"> modifytime = #{modifytime},</if>
  <if test="outdutydate != null and outdutydate != ''"> outdutydate = #{outdutydate},</if>
  <if test="pkCorp != null and pkCorp != ''"> pk_corp = #{pkCorp},</if>
  <if test="pkDeptdoc != null and pkDeptdoc != ''"> pk_deptdoc = #{pkDeptdoc},</if>
  <if test="pkOmJob != null and pkOmJob != ''"> pk_om_job = #{pkOmJob},</if>
  <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> pk_psnbasdoc = #{pkPsnbasdoc},</if>
  <if test="pkPsncl != null and pkPsncl != ''"> pk_psncl = #{pkPsncl},</if>
  <if test="psnclscope != null"> psnclscope = #{psnclscope},</if>
  <if test="psncode != null and psncode != ''"> psncode = #{psncode},</if>
  <if test="psnname != null and psnname != ''"> psnname = #{psnname},</if>
  <if test="sealdate != null and sealdate != ''"> sealdate = #{sealdate},</if>
  <if test="ts != null and ts != ''"> ts = #{ts},</if>
  <if test="directleader != null and directleader != ''"> directleader = #{directleader},</if>
  <if test="dutyname != null and dutyname != ''"> dutyname = #{dutyname},</if>
  <if test="groupdef1 != null and groupdef1 != ''"> groupdef1 = #{groupdef1},</if>
  <if test="groupdef10 != null and groupdef10 != ''"> groupdef10 = #{groupdef10},</if>
  <if test="groupdef11 != null and groupdef11 != ''"> groupdef11 = #{groupdef11},</if>
  <if test="groupdef12 != null and groupdef12 != ''"> groupdef12 = #{groupdef12},</if>
  <if test="groupdef13 != null and groupdef13 != ''"> groupdef13 = #{groupdef13},</if>
  <if test="groupdef14 != null and groupdef14 != ''"> groupdef14 = #{groupdef14},</if>
  <if test="groupdef15 != null and groupdef15 != ''"> groupdef15 = #{groupdef15},</if>
  <if test="groupdef16 != null and groupdef16 != ''"> groupdef16 = #{groupdef16},</if>
  <if test="groupdef17 != null and groupdef17 != ''"> groupdef17 = #{groupdef17},</if>
  <if test="groupdef18 != null and groupdef18 != ''"> groupdef18 = #{groupdef18},</if>
  <if test="groupdef19 != null and groupdef19 != ''"> groupdef19 = #{groupdef19},</if>
  <if test="groupdef2 != null and groupdef2 != ''"> groupdef2 = #{groupdef2},</if>
  <if test="groupdef20 != null and groupdef20 != ''"> groupdef20 = #{groupdef20},</if>
  <if test="groupdef3 != null and groupdef3 != ''"> groupdef3 = #{groupdef3},</if>
  <if test="groupdef4 != null and groupdef4 != ''"> groupdef4 = #{groupdef4},</if>
  <if test="groupdef5 != null and groupdef5 != ''"> groupdef5 = #{groupdef5},</if>
  <if test="groupdef6 != null and groupdef6 != ''"> groupdef6 = #{groupdef6},</if>
  <if test="groupdef7 != null and groupdef7 != ''"> groupdef7 = #{groupdef7},</if>
  <if test="groupdef8 != null and groupdef8 != ''"> groupdef8 = #{groupdef8},</if>
  <if test="groupdef9 != null and groupdef9 != ''"> groupdef9 = #{groupdef9},</if>
  <if test="hroperator != null and hroperator != ''"> hroperator = #{hroperator},</if>
  <if test="insource != null and insource != ''"> insource = #{insource},</if>
  <if test="iscalovertime != null and iscalovertime != ''"> iscalovertime = #{iscalovertime},</if>
  <if test="isreferenced != null and isreferenced != ''"> isreferenced = #{isreferenced},</if>
  <if test="isreturn != null and isreturn != ''"> isreturn = #{isreturn},</if>
  <if test="onpostdate != null and onpostdate != ''"> onpostdate = #{onpostdate},</if>
  <if test="outmethod != null and outmethod != ''"> outmethod = #{outmethod},</if>
  <if test="pkClerkclass != null and pkClerkclass != ''"> pk_clerkclass = #{pkClerkclass},</if>
  <if test="pkDutyrank != null and pkDutyrank != ''"> pk_dutyrank = #{pkDutyrank},</if>
  <if test="pkPsntype != null and pkPsntype != ''"> pk_psntype = #{pkPsntype},</if>
  <if test="poststat != null and poststat != ''"> poststat = #{poststat},</if>
  <if test="psnnamepinyin != null and psnnamepinyin != ''"> psnnamepinyin = #{psnnamepinyin},</if>
  <if test="recruitresource != null and recruitresource != ''"> recruitresource = #{recruitresource},</if>
  <if test="regular != null and regular != ''"> regular = #{regular},</if>
  <if test="regulardata != null and regulardata != ''"> regulardata = #{regulardata},</if>
  <if test="series != null and series != ''"> series = #{series},</if>
  <if test="showorder != null"> showorder = #{showorder},</if>
  <if test="tbmProp != null"> tbm_prop = #{tbmProp},</if>
  <if test="timecardid != null and timecardid != ''"> timecardid = #{timecardid},</if>
  <if test="wastopdate != null and wastopdate != ''"> wastopdate = #{wastopdate},</if>
</trim>
where pk_psndoc = #{pkPsndoc}
</update>
<!-- 逻辑删除 -->
<update id="entity_logicDelete" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity" >
update bd_psndoc  set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
where pk_psndoc = #{pkPsndoc}
</update>
<!-- 多条件逻辑删除 -->
<update id="entity_logicDelete_Multi_Condition" parameterType = "com.hzya.frame.plugin.lets.entity.BdPsndocEntity" >
update bd_psndoc  set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
 <trim prefix="where" prefixOverrides="and"> 
        <if test="amcode != null and amcode != ''"> and amcode = #{amcode} </if>
            <if test="clerkcode != null and clerkcode != ''"> and clerkcode = #{clerkcode} </if>
            <if test="clerkflag != null and clerkflag != ''"> and clerkflag = #{clerkflag} </if>
            <if test="createtime != null and createtime != ''"> and createtime = #{createtime} </if>
            <if test="creator != null and creator != ''"> and creator = #{creator} </if>
            <if test="def1 != null and def1 != ''"> and def1 = #{def1} </if>
            <if test="def10 != null and def10 != ''"> and def10 = #{def10} </if>
            <if test="def11 != null and def11 != ''"> and def11 = #{def11} </if>
            <if test="def12 != null and def12 != ''"> and def12 = #{def12} </if>
            <if test="def13 != null and def13 != ''"> and def13 = #{def13} </if>
            <if test="def14 != null and def14 != ''"> and def14 = #{def14} </if>
            <if test="def15 != null and def15 != ''"> and def15 = #{def15} </if>
            <if test="def16 != null and def16 != ''"> and def16 = #{def16} </if>
            <if test="def17 != null and def17 != ''"> and def17 = #{def17} </if>
            <if test="def18 != null and def18 != ''"> and def18 = #{def18} </if>
            <if test="def19 != null and def19 != ''"> and def19 = #{def19} </if>
            <if test="def2 != null and def2 != ''"> and def2 = #{def2} </if>
            <if test="def20 != null and def20 != ''"> and def20 = #{def20} </if>
            <if test="def3 != null and def3 != ''"> and def3 = #{def3} </if>
            <if test="def4 != null and def4 != ''"> and def4 = #{def4} </if>
            <if test="def5 != null and def5 != ''"> and def5 = #{def5} </if>
            <if test="def6 != null and def6 != ''"> and def6 = #{def6} </if>
            <if test="def7 != null and def7 != ''"> and def7 = #{def7} </if>
            <if test="def8 != null and def8 != ''"> and def8 = #{def8} </if>
            <if test="def9 != null and def9 != ''"> and def9 = #{def9} </if>
            <if test="dr != null"> and dr = #{dr} </if>
            <if test="indocflag != null and indocflag != ''"> and indocflag = #{indocflag} </if>
            <if test="indutydate != null and indutydate != ''"> and indutydate = #{indutydate} </if>
            <if test="innercode != null and innercode != ''"> and innercode = #{innercode} </if>
            <if test="jobrank != null and jobrank != ''"> and jobrank = #{jobrank} </if>
            <if test="jobseries != null and jobseries != ''"> and jobseries = #{jobseries} </if>
            <if test="maxinnercode != null and maxinnercode != ''"> and maxinnercode = #{maxinnercode} </if>
            <if test="modifier != null and modifier != ''"> and modifier = #{modifier} </if>
            <if test="modifytime != null and modifytime != ''"> and modifytime = #{modifytime} </if>
            <if test="outdutydate != null and outdutydate != ''"> and outdutydate = #{outdutydate} </if>
            <if test="pkCorp != null and pkCorp != ''"> and pk_corp = #{pkCorp} </if>
            <if test="pkDeptdoc != null and pkDeptdoc != ''"> and pk_deptdoc = #{pkDeptdoc} </if>
            <if test="pkOmJob != null and pkOmJob != ''"> and pk_om_job = #{pkOmJob} </if>
            <if test="pkPsnbasdoc != null and pkPsnbasdoc != ''"> and pk_psnbasdoc = #{pkPsnbasdoc} </if>
            <if test="pkPsncl != null and pkPsncl != ''"> and pk_psncl = #{pkPsncl} </if>
            <if test="pkPsndoc != null and pkPsndoc != ''"> and pk_psndoc = #{pkPsndoc} </if>
            <if test="psnclscope != null"> and psnclscope = #{psnclscope} </if>
            <if test="psncode != null and psncode != ''"> and psncode = #{psncode} </if>
            <if test="psnname != null and psnname != ''"> and psnname = #{psnname} </if>
            <if test="sealdate != null and sealdate != ''"> and sealdate = #{sealdate} </if>
            <if test="ts != null and ts != ''"> and ts = #{ts} </if>
            <if test="directleader != null and directleader != ''"> and directleader = #{directleader} </if>
            <if test="dutyname != null and dutyname != ''"> and dutyname = #{dutyname} </if>
            <if test="groupdef1 != null and groupdef1 != ''"> and groupdef1 = #{groupdef1} </if>
            <if test="groupdef10 != null and groupdef10 != ''"> and groupdef10 = #{groupdef10} </if>
            <if test="groupdef11 != null and groupdef11 != ''"> and groupdef11 = #{groupdef11} </if>
            <if test="groupdef12 != null and groupdef12 != ''"> and groupdef12 = #{groupdef12} </if>
            <if test="groupdef13 != null and groupdef13 != ''"> and groupdef13 = #{groupdef13} </if>
            <if test="groupdef14 != null and groupdef14 != ''"> and groupdef14 = #{groupdef14} </if>
            <if test="groupdef15 != null and groupdef15 != ''"> and groupdef15 = #{groupdef15} </if>
            <if test="groupdef16 != null and groupdef16 != ''"> and groupdef16 = #{groupdef16} </if>
            <if test="groupdef17 != null and groupdef17 != ''"> and groupdef17 = #{groupdef17} </if>
            <if test="groupdef18 != null and groupdef18 != ''"> and groupdef18 = #{groupdef18} </if>
            <if test="groupdef19 != null and groupdef19 != ''"> and groupdef19 = #{groupdef19} </if>
            <if test="groupdef2 != null and groupdef2 != ''"> and groupdef2 = #{groupdef2} </if>
            <if test="groupdef20 != null and groupdef20 != ''"> and groupdef20 = #{groupdef20} </if>
            <if test="groupdef3 != null and groupdef3 != ''"> and groupdef3 = #{groupdef3} </if>
            <if test="groupdef4 != null and groupdef4 != ''"> and groupdef4 = #{groupdef4} </if>
            <if test="groupdef5 != null and groupdef5 != ''"> and groupdef5 = #{groupdef5} </if>
            <if test="groupdef6 != null and groupdef6 != ''"> and groupdef6 = #{groupdef6} </if>
            <if test="groupdef7 != null and groupdef7 != ''"> and groupdef7 = #{groupdef7} </if>
            <if test="groupdef8 != null and groupdef8 != ''"> and groupdef8 = #{groupdef8} </if>
            <if test="groupdef9 != null and groupdef9 != ''"> and groupdef9 = #{groupdef9} </if>
            <if test="hroperator != null and hroperator != ''"> and hroperator = #{hroperator} </if>
            <if test="insource != null and insource != ''"> and insource = #{insource} </if>
            <if test="iscalovertime != null and iscalovertime != ''"> and iscalovertime = #{iscalovertime} </if>
            <if test="isreferenced != null and isreferenced != ''"> and isreferenced = #{isreferenced} </if>
            <if test="isreturn != null and isreturn != ''"> and isreturn = #{isreturn} </if>
            <if test="onpostdate != null and onpostdate != ''"> and onpostdate = #{onpostdate} </if>
            <if test="outmethod != null and outmethod != ''"> and outmethod = #{outmethod} </if>
            <if test="pkClerkclass != null and pkClerkclass != ''"> and pk_clerkclass = #{pkClerkclass} </if>
            <if test="pkDutyrank != null and pkDutyrank != ''"> and pk_dutyrank = #{pkDutyrank} </if>
            <if test="pkPsntype != null and pkPsntype != ''"> and pk_psntype = #{pkPsntype} </if>
            <if test="poststat != null and poststat != ''"> and poststat = #{poststat} </if>
            <if test="psnnamepinyin != null and psnnamepinyin != ''"> and psnnamepinyin = #{psnnamepinyin} </if>
            <if test="recruitresource != null and recruitresource != ''"> and recruitresource = #{recruitresource} </if>
            <if test="regular != null and regular != ''"> and regular = #{regular} </if>
            <if test="regulardata != null and regulardata != ''"> and regulardata = #{regulardata} </if>
            <if test="series != null and series != ''"> and series = #{series} </if>
            <if test="showorder != null"> and showorder = #{showorder} </if>
            <if test="tbmProp != null"> and tbm_prop = #{tbmProp} </if>
            <if test="timecardid != null and timecardid != ''"> and timecardid = #{timecardid} </if>
            <if test="wastopdate != null and wastopdate != ''"> and wastopdate = #{wastopdate} </if>
            and sts='Y'
    </trim>
</update>
<!--通过主键删除-->
<delete id="entity_delete">
    delete from bd_psndoc where pk_psndoc = #{pkPsndoc}
</delete>
    <!--sm_user根据pk查username-->
    <select id="selectUserNameByPk" parameterType="String" resultType="String">
        select user_name from sm_user where cuserid = #{cuserid}
    </select>

</mapper>

