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

    <resultMap id="get-IcSpecialHEntity-result" type="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        <result property="bccountflag" column="bccountflag" jdbcType="VARCHAR"/>
        <result property="cauditorid" column="cauditorid" jdbcType="VARCHAR"/>
        <result property="cbilltypecode" column="cbilltypecode" jdbcType="VARCHAR"/>
        <result property="cinbsrid" column="cinbsrid" jdbcType="VARCHAR"/>
        <result property="cindeptid" column="cindeptid" jdbcType="VARCHAR"/>
        <result property="cinwarehouseid" column="cinwarehouseid" jdbcType="VARCHAR"/>
        <result property="clastmodiid" column="clastmodiid" jdbcType="VARCHAR"/>
        <result property="coperatorid" column="coperatorid" jdbcType="VARCHAR"/>
        <result property="coutbsor" column="coutbsor" jdbcType="VARCHAR"/>
        <result property="coutdeptid" column="coutdeptid" jdbcType="VARCHAR"/>
        <result property="coutwarehouseid" column="coutwarehouseid" jdbcType="VARCHAR"/>
        <result property="cshlddiliverdate" column="cshlddiliverdate" jdbcType="VARCHAR"/>
        <result property="cspecialhid" column="cspecialhid" jdbcType="VARCHAR"/>
        <result property="dbilldate" column="dbilldate" jdbcType="VARCHAR"/>
        <result property="denddate" column="denddate" jdbcType="VARCHAR"/>
        <result property="dr" column="dr" jdbcType="INTEGER"/>
        <result property="fassistantflag" column="fassistantflag" jdbcType="VARCHAR"/>
        <result property="fbillflag" column="fbillflag" jdbcType="INTEGER"/>
        <result property="icheckmode" column="icheckmode" jdbcType="INTEGER"/>
        <result property="iprintcount" column="iprintcount" jdbcType="INTEGER"/>
        <result property="nfixdisassemblymny" column="nfixdisassemblymny" jdbcType="NUMERIC"/>
        <result property="pkCorp" column="pk_corp" jdbcType="VARCHAR"/>
        <result property="pkDefdoc1" column="pk_defdoc1" jdbcType="VARCHAR"/>
        <result property="pkDefdoc10" column="pk_defdoc10" jdbcType="VARCHAR"/>
        <result property="pkDefdoc11" column="pk_defdoc11" jdbcType="VARCHAR"/>
        <result property="pkDefdoc12" column="pk_defdoc12" jdbcType="VARCHAR"/>
        <result property="pkDefdoc13" column="pk_defdoc13" jdbcType="VARCHAR"/>
        <result property="pkDefdoc14" column="pk_defdoc14" jdbcType="VARCHAR"/>
        <result property="pkDefdoc15" column="pk_defdoc15" jdbcType="VARCHAR"/>
        <result property="pkDefdoc16" column="pk_defdoc16" jdbcType="VARCHAR"/>
        <result property="pkDefdoc17" column="pk_defdoc17" jdbcType="VARCHAR"/>
        <result property="pkDefdoc18" column="pk_defdoc18" jdbcType="VARCHAR"/>
        <result property="pkDefdoc19" column="pk_defdoc19" jdbcType="VARCHAR"/>
        <result property="pkDefdoc2" column="pk_defdoc2" jdbcType="VARCHAR"/>
        <result property="pkDefdoc20" column="pk_defdoc20" jdbcType="VARCHAR"/>
        <result property="pkDefdoc3" column="pk_defdoc3" jdbcType="VARCHAR"/>
        <result property="pkDefdoc4" column="pk_defdoc4" jdbcType="VARCHAR"/>
        <result property="pkDefdoc5" column="pk_defdoc5" jdbcType="VARCHAR"/>
        <result property="pkDefdoc6" column="pk_defdoc6" jdbcType="VARCHAR"/>
        <result property="pkDefdoc7" column="pk_defdoc7" jdbcType="VARCHAR"/>
        <result property="pkDefdoc8" column="pk_defdoc8" jdbcType="VARCHAR"/>
        <result property="pkDefdoc9" column="pk_defdoc9" jdbcType="VARCHAR"/>
        <result property="tlastmoditime" column="tlastmoditime" jdbcType="VARCHAR"/>
        <result property="tmaketime" column="tmaketime" jdbcType="VARCHAR"/>
        <result property="ts" column="ts" jdbcType="VARCHAR"/>
        <result property="vadjuster" column="vadjuster" jdbcType="VARCHAR"/>
        <result property="vbillcode" column="vbillcode" jdbcType="VARCHAR"/>
        <result property="vnote" column="vnote" jdbcType="VARCHAR"/>
        <result property="vshldarrivedate" column="vshldarrivedate" jdbcType="VARCHAR"/>
        <result property="vuserdef1" column="vuserdef1" jdbcType="VARCHAR"/>
        <result property="vuserdef10" column="vuserdef10" jdbcType="VARCHAR"/>
        <result property="vuserdef11" column="vuserdef11" jdbcType="VARCHAR"/>
        <result property="vuserdef12" column="vuserdef12" jdbcType="VARCHAR"/>
        <result property="vuserdef13" column="vuserdef13" jdbcType="VARCHAR"/>
        <result property="vuserdef14" column="vuserdef14" jdbcType="VARCHAR"/>
        <result property="vuserdef15" column="vuserdef15" jdbcType="VARCHAR"/>
        <result property="vuserdef16" column="vuserdef16" jdbcType="VARCHAR"/>
        <result property="vuserdef17" column="vuserdef17" jdbcType="VARCHAR"/>
        <result property="vuserdef18" column="vuserdef18" jdbcType="VARCHAR"/>
        <result property="vuserdef19" column="vuserdef19" jdbcType="VARCHAR"/>
        <result property="vuserdef2" column="vuserdef2" jdbcType="VARCHAR"/>
        <result property="vuserdef20" column="vuserdef20" jdbcType="VARCHAR"/>
        <result property="vuserdef3" column="vuserdef3" jdbcType="VARCHAR"/>
        <result property="vuserdef4" column="vuserdef4" jdbcType="VARCHAR"/>
        <result property="vuserdef5" column="vuserdef5" jdbcType="VARCHAR"/>
        <result property="vuserdef6" column="vuserdef6" jdbcType="VARCHAR"/>
        <result property="vuserdef7" column="vuserdef7" jdbcType="VARCHAR"/>
        <result property="vuserdef8" column="vuserdef8" jdbcType="VARCHAR"/>
        <result property="vuserdef9" column="vuserdef9" jdbcType="VARCHAR"/>
    </resultMap>
    <!-- 查询的字段-->
    <sql id="IcSpecialHEntity_Base_Column_List">
        bccountflag
        ,cauditorid
        ,cbilltypecode 
        ,cinbsrid 
        ,cindeptid 
        ,cinwarehouseid 
        ,clastmodiid 
        ,coperatorid 
        ,coutbsor 
        ,coutdeptid 
        ,coutwarehouseid 
        ,cshlddiliverdate 
        ,cspecialhid 
        ,dbilldate 
        ,denddate 
        ,dr 
        ,fassistantflag 
        ,fbillflag 
        ,icheckmode 
        ,iprintcount 
        ,nfixdisassemblymny 
        ,pk_corp 
        ,pk_defdoc1 
        ,pk_defdoc10 
        ,pk_defdoc11 
        ,pk_defdoc12 
        ,pk_defdoc13 
        ,pk_defdoc14 
        ,pk_defdoc15 
        ,pk_defdoc16 
        ,pk_defdoc17 
        ,pk_defdoc18 
        ,pk_defdoc19 
        ,pk_defdoc2 
        ,pk_defdoc20 
        ,pk_defdoc3 
        ,pk_defdoc4 
        ,pk_defdoc5 
        ,pk_defdoc6 
        ,pk_defdoc7 
        ,pk_defdoc8 
        ,pk_defdoc9 
        ,tlastmoditime 
        ,tmaketime 
        ,ts 
        ,vadjuster 
        ,vbillcode 
        ,vnote 
        ,vshldarrivedate 
        ,vuserdef1 
        ,vuserdef10 
        ,vuserdef11 
        ,vuserdef12 
        ,vuserdef13 
        ,vuserdef14 
        ,vuserdef15 
        ,vuserdef16 
        ,vuserdef17 
        ,vuserdef18 
        ,vuserdef19 
        ,vuserdef2 
        ,vuserdef20 
        ,vuserdef3 
        ,vuserdef4 
        ,vuserdef5 
        ,vuserdef6 
        ,vuserdef7 
        ,vuserdef8 
        ,vuserdef9
    </sql>


    <select id="queryIcSpecialHEntity" parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity"
            resultMap="get-IcSpecialHEntity-result">
        select
        <include refid="IcSpecialHEntity_Base_Column_List"/>
        from ic_special_h where dr=0
        <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>

        <if test="start_time_dbilldate!=null and start_time_dbilldate!=''">
            and tlastmoditime &gt;= #{start_time_dbilldate}
        </if>
        <if test="end_time_dbilldate!=null and end_time_dbilldate!=''">
            and tlastmoditime &lt;= #{end_time_dbilldate}
        </if>

    </select>
    <!-- 查询 采用==查询 -->
    <select id="entity_list_base" resultMap="get-IcSpecialHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        select
        <include refid="IcSpecialHEntity_Base_Column_List"/>
        from ic_special_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bccountflag != null and bccountflag != ''">and bccountflag = #{bccountflag}</if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode = #{cbilltypecode}</if>
            <if test="cinbsrid != null and cinbsrid != ''">and cinbsrid = #{cinbsrid}</if>
            <if test="cindeptid != null and cindeptid != ''">and cindeptid = #{cindeptid}</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">and cinwarehouseid = #{cinwarehouseid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid = #{coperatorid}</if>
            <if test="coutbsor != null and coutbsor != ''">and coutbsor = #{coutbsor}</if>
            <if test="coutdeptid != null and coutdeptid != ''">and coutdeptid = #{coutdeptid}</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">and coutwarehouseid = #{coutwarehouseid}</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">and cshlddiliverdate = #{cshlddiliverdate}
            </if>
            <if test="cspecialhid != null and cspecialhid != ''">and cspecialhid = #{cspecialhid}</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate = #{dbilldate}</if>
            <if test="denddate != null and denddate != ''">and denddate = #{denddate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="fassistantflag != null and fassistantflag != ''">and fassistantflag = #{fassistantflag}</if>
            <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>
            <if test="icheckmode != null">and icheckmode = #{icheckmode}</if>
            <if test="iprintcount != null">and iprintcount = #{iprintcount}</if>
            <if test="nfixdisassemblymny != null">and nfixdisassemblymny = #{nfixdisassemblymny}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">and pk_defdoc1 = #{pkDefdoc1}</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">and pk_defdoc10 = #{pkDefdoc10}</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">and pk_defdoc11 = #{pkDefdoc11}</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">and pk_defdoc12 = #{pkDefdoc12}</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">and pk_defdoc13 = #{pkDefdoc13}</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">and pk_defdoc14 = #{pkDefdoc14}</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">and pk_defdoc15 = #{pkDefdoc15}</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">and pk_defdoc16 = #{pkDefdoc16}</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">and pk_defdoc17 = #{pkDefdoc17}</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">and pk_defdoc18 = #{pkDefdoc18}</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">and pk_defdoc19 = #{pkDefdoc19}</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">and pk_defdoc2 = #{pkDefdoc2}</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">and pk_defdoc20 = #{pkDefdoc20}</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">and pk_defdoc3 = #{pkDefdoc3}</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">and pk_defdoc4 = #{pkDefdoc4}</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">and pk_defdoc5 = #{pkDefdoc5}</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">and pk_defdoc6 = #{pkDefdoc6}</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">and pk_defdoc7 = #{pkDefdoc7}</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">and pk_defdoc8 = #{pkDefdoc8}</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">and pk_defdoc9 = #{pkDefdoc9}</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">and tlastmoditime = #{tlastmoditime}</if>
            <if test="tmaketime != null and tmaketime != ''">and tmaketime = #{tmaketime}</if>
            <if test="ts != null and ts != ''">and ts = #{ts}</if>
            <if test="vadjuster != null and vadjuster != ''">and vadjuster = #{vadjuster}</if>
            <if test="vbillcode != null and vbillcode != ''">and vbillcode = #{vbillcode}</if>
            <if test="vnote != null and vnote != ''">and vnote = #{vnote}</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">and vshldarrivedate = #{vshldarrivedate}</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">and vuserdef1 = #{vuserdef1}</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">and vuserdef10 = #{vuserdef10}</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">and vuserdef11 = #{vuserdef11}</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">and vuserdef12 = #{vuserdef12}</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">and vuserdef13 = #{vuserdef13}</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">and vuserdef14 = #{vuserdef14}</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">and vuserdef15 = #{vuserdef15}</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">and vuserdef16 = #{vuserdef16}</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">and vuserdef17 = #{vuserdef17}</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">and vuserdef18 = #{vuserdef18}</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">and vuserdef19 = #{vuserdef19}</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">and vuserdef2 = #{vuserdef2}</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">and vuserdef20 = #{vuserdef20}</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">and vuserdef3 = #{vuserdef3}</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">and vuserdef4 = #{vuserdef4}</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">and vuserdef5 = #{vuserdef5}</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">and vuserdef6 = #{vuserdef6}</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">and vuserdef7 = #{vuserdef7}</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">and vuserdef8 = #{vuserdef8}</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">and vuserdef9 = #{vuserdef9}</if>
            and dr='0'
        </trim>
    </select>

    <!-- 查询符合条件的数量 -->
    <select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        select count(1) from ic_special_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bccountflag != null and bccountflag != ''">and bccountflag = #{bccountflag}</if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode = #{cbilltypecode}</if>
            <if test="cinbsrid != null and cinbsrid != ''">and cinbsrid = #{cinbsrid}</if>
            <if test="cindeptid != null and cindeptid != ''">and cindeptid = #{cindeptid}</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">and cinwarehouseid = #{cinwarehouseid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid = #{coperatorid}</if>
            <if test="coutbsor != null and coutbsor != ''">and coutbsor = #{coutbsor}</if>
            <if test="coutdeptid != null and coutdeptid != ''">and coutdeptid = #{coutdeptid}</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">and coutwarehouseid = #{coutwarehouseid}</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">and cshlddiliverdate = #{cshlddiliverdate}
            </if>
            <if test="cspecialhid != null and cspecialhid != ''">and cspecialhid = #{cspecialhid}</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate = #{dbilldate}</if>
            <if test="denddate != null and denddate != ''">and denddate = #{denddate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="fassistantflag != null and fassistantflag != ''">and fassistantflag = #{fassistantflag}</if>
            <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>
            <if test="icheckmode != null">and icheckmode = #{icheckmode}</if>
            <if test="iprintcount != null">and iprintcount = #{iprintcount}</if>
            <if test="nfixdisassemblymny != null">and nfixdisassemblymny = #{nfixdisassemblymny}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">and pk_defdoc1 = #{pkDefdoc1}</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">and pk_defdoc10 = #{pkDefdoc10}</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">and pk_defdoc11 = #{pkDefdoc11}</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">and pk_defdoc12 = #{pkDefdoc12}</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">and pk_defdoc13 = #{pkDefdoc13}</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">and pk_defdoc14 = #{pkDefdoc14}</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">and pk_defdoc15 = #{pkDefdoc15}</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">and pk_defdoc16 = #{pkDefdoc16}</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">and pk_defdoc17 = #{pkDefdoc17}</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">and pk_defdoc18 = #{pkDefdoc18}</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">and pk_defdoc19 = #{pkDefdoc19}</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">and pk_defdoc2 = #{pkDefdoc2}</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">and pk_defdoc20 = #{pkDefdoc20}</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">and pk_defdoc3 = #{pkDefdoc3}</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">and pk_defdoc4 = #{pkDefdoc4}</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">and pk_defdoc5 = #{pkDefdoc5}</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">and pk_defdoc6 = #{pkDefdoc6}</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">and pk_defdoc7 = #{pkDefdoc7}</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">and pk_defdoc8 = #{pkDefdoc8}</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">and pk_defdoc9 = #{pkDefdoc9}</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">and tlastmoditime = #{tlastmoditime}</if>
            <if test="tmaketime != null and tmaketime != ''">and tmaketime = #{tmaketime}</if>
            <if test="ts != null and ts != ''">and ts = #{ts}</if>
            <if test="vadjuster != null and vadjuster != ''">and vadjuster = #{vadjuster}</if>
            <if test="vbillcode != null and vbillcode != ''">and vbillcode = #{vbillcode}</if>
            <if test="vnote != null and vnote != ''">and vnote = #{vnote}</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">and vshldarrivedate = #{vshldarrivedate}</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">and vuserdef1 = #{vuserdef1}</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">and vuserdef10 = #{vuserdef10}</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">and vuserdef11 = #{vuserdef11}</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">and vuserdef12 = #{vuserdef12}</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">and vuserdef13 = #{vuserdef13}</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">and vuserdef14 = #{vuserdef14}</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">and vuserdef15 = #{vuserdef15}</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">and vuserdef16 = #{vuserdef16}</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">and vuserdef17 = #{vuserdef17}</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">and vuserdef18 = #{vuserdef18}</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">and vuserdef19 = #{vuserdef19}</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">and vuserdef2 = #{vuserdef2}</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">and vuserdef20 = #{vuserdef20}</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">and vuserdef3 = #{vuserdef3}</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">and vuserdef4 = #{vuserdef4}</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">and vuserdef5 = #{vuserdef5}</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">and vuserdef6 = #{vuserdef6}</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">and vuserdef7 = #{vuserdef7}</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">and vuserdef8 = #{vuserdef8}</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">and vuserdef9 = #{vuserdef9}</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-IcSpecialHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        select
        <include refid="IcSpecialHEntity_Base_Column_List"/>
        from ic_special_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bccountflag != null and bccountflag != ''">and bccountflag like concat('%',#{bccountflag},'%')
            </if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid like concat('%',#{cauditorid},'%')</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode like
                concat('%',#{cbilltypecode},'%')
            </if>
            <if test="cinbsrid != null and cinbsrid != ''">and cinbsrid like concat('%',#{cinbsrid},'%')</if>
            <if test="cindeptid != null and cindeptid != ''">and cindeptid like concat('%',#{cindeptid},'%')</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">and cinwarehouseid like
                concat('%',#{cinwarehouseid},'%')
            </if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid like concat('%',#{clastmodiid},'%')
            </if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid like concat('%',#{coperatorid},'%')
            </if>
            <if test="coutbsor != null and coutbsor != ''">and coutbsor like concat('%',#{coutbsor},'%')</if>
            <if test="coutdeptid != null and coutdeptid != ''">and coutdeptid like concat('%',#{coutdeptid},'%')</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">and coutwarehouseid like
                concat('%',#{coutwarehouseid},'%')
            </if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">and cshlddiliverdate like
                concat('%',#{cshlddiliverdate},'%')
            </if>
            <if test="cspecialhid != null and cspecialhid != ''">and cspecialhid like concat('%',#{cspecialhid},'%')
            </if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate like concat('%',#{dbilldate},'%')</if>
            <if test="denddate != null and denddate != ''">and denddate like concat('%',#{denddate},'%')</if>
            <if test="dr != null">and dr like concat('%',#{dr},'%')</if>
            <if test="fassistantflag != null and fassistantflag != ''">and fassistantflag like
                concat('%',#{fassistantflag},'%')
            </if>
            <if test="fbillflag != null">and fbillflag like concat('%',#{fbillflag},'%')</if>
            <if test="icheckmode != null">and icheckmode like concat('%',#{icheckmode},'%')</if>
            <if test="iprintcount != null">and iprintcount like concat('%',#{iprintcount},'%')</if>
            <if test="nfixdisassemblymny != null">and nfixdisassemblymny like concat('%',#{nfixdisassemblymny},'%')</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp like concat('%',#{pkCorp},'%')</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">and pk_defdoc1 like concat('%',#{pkDefdoc1},'%')</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">and pk_defdoc10 like concat('%',#{pkDefdoc10},'%')</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">and pk_defdoc11 like concat('%',#{pkDefdoc11},'%')</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">and pk_defdoc12 like concat('%',#{pkDefdoc12},'%')</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">and pk_defdoc13 like concat('%',#{pkDefdoc13},'%')</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">and pk_defdoc14 like concat('%',#{pkDefdoc14},'%')</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">and pk_defdoc15 like concat('%',#{pkDefdoc15},'%')</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">and pk_defdoc16 like concat('%',#{pkDefdoc16},'%')</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">and pk_defdoc17 like concat('%',#{pkDefdoc17},'%')</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">and pk_defdoc18 like concat('%',#{pkDefdoc18},'%')</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">and pk_defdoc19 like concat('%',#{pkDefdoc19},'%')</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">and pk_defdoc2 like concat('%',#{pkDefdoc2},'%')</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">and pk_defdoc20 like concat('%',#{pkDefdoc20},'%')</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">and pk_defdoc3 like concat('%',#{pkDefdoc3},'%')</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">and pk_defdoc4 like concat('%',#{pkDefdoc4},'%')</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">and pk_defdoc5 like concat('%',#{pkDefdoc5},'%')</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">and pk_defdoc6 like concat('%',#{pkDefdoc6},'%')</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">and pk_defdoc7 like concat('%',#{pkDefdoc7},'%')</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">and pk_defdoc8 like concat('%',#{pkDefdoc8},'%')</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">and pk_defdoc9 like concat('%',#{pkDefdoc9},'%')</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">and tlastmoditime like
                concat('%',#{tlastmoditime},'%')
            </if>
            <if test="tmaketime != null and tmaketime != ''">and tmaketime like concat('%',#{tmaketime},'%')</if>
            <if test="ts != null and ts != ''">and ts like concat('%',#{ts},'%')</if>
            <if test="vadjuster != null and vadjuster != ''">and vadjuster like concat('%',#{vadjuster},'%')</if>
            <if test="vbillcode != null and vbillcode != ''">and vbillcode like concat('%',#{vbillcode},'%')</if>
            <if test="vnote != null and vnote != ''">and vnote like concat('%',#{vnote},'%')</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">and vshldarrivedate like
                concat('%',#{vshldarrivedate},'%')
            </if>
            <if test="vuserdef1 != null and vuserdef1 != ''">and vuserdef1 like concat('%',#{vuserdef1},'%')</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">and vuserdef10 like concat('%',#{vuserdef10},'%')</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">and vuserdef11 like concat('%',#{vuserdef11},'%')</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">and vuserdef12 like concat('%',#{vuserdef12},'%')</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">and vuserdef13 like concat('%',#{vuserdef13},'%')</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">and vuserdef14 like concat('%',#{vuserdef14},'%')</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">and vuserdef15 like concat('%',#{vuserdef15},'%')</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">and vuserdef16 like concat('%',#{vuserdef16},'%')</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">and vuserdef17 like concat('%',#{vuserdef17},'%')</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">and vuserdef18 like concat('%',#{vuserdef18},'%')</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">and vuserdef19 like concat('%',#{vuserdef19},'%')</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">and vuserdef2 like concat('%',#{vuserdef2},'%')</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">and vuserdef20 like concat('%',#{vuserdef20},'%')</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">and vuserdef3 like concat('%',#{vuserdef3},'%')</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">and vuserdef4 like concat('%',#{vuserdef4},'%')</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">and vuserdef5 like concat('%',#{vuserdef5},'%')</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">and vuserdef6 like concat('%',#{vuserdef6},'%')</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">and vuserdef7 like concat('%',#{vuserdef7},'%')</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">and vuserdef8 like concat('%',#{vuserdef8},'%')</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">and vuserdef9 like concat('%',#{vuserdef9},'%')</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="IcSpecialHentity_list_or" resultMap="get-IcSpecialHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        select
        <include refid="IcSpecialHEntity_Base_Column_List"/>
        from ic_special_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bccountflag != null and bccountflag != ''">or bccountflag = #{bccountflag}</if>
            <if test="cauditorid != null and cauditorid != ''">or cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">or cbilltypecode = #{cbilltypecode}</if>
            <if test="cinbsrid != null and cinbsrid != ''">or cinbsrid = #{cinbsrid}</if>
            <if test="cindeptid != null and cindeptid != ''">or cindeptid = #{cindeptid}</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">or cinwarehouseid = #{cinwarehouseid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">or clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">or coperatorid = #{coperatorid}</if>
            <if test="coutbsor != null and coutbsor != ''">or coutbsor = #{coutbsor}</if>
            <if test="coutdeptid != null and coutdeptid != ''">or coutdeptid = #{coutdeptid}</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">or coutwarehouseid = #{coutwarehouseid}</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">or cshlddiliverdate = #{cshlddiliverdate}
            </if>
            <if test="cspecialhid != null and cspecialhid != ''">or cspecialhid = #{cspecialhid}</if>
            <if test="dbilldate != null and dbilldate != ''">or dbilldate = #{dbilldate}</if>
            <if test="denddate != null and denddate != ''">or denddate = #{denddate}</if>
            <if test="dr != null">or dr = #{dr}</if>
            <if test="fassistantflag != null and fassistantflag != ''">or fassistantflag = #{fassistantflag}</if>
            <if test="fbillflag != null">or fbillflag = #{fbillflag}</if>
            <if test="icheckmode != null">or icheckmode = #{icheckmode}</if>
            <if test="iprintcount != null">or iprintcount = #{iprintcount}</if>
            <if test="nfixdisassemblymny != null">or nfixdisassemblymny = #{nfixdisassemblymny}</if>
            <if test="pkCorp != null and pkCorp != ''">or pk_corp = #{pkCorp}</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">or pk_defdoc1 = #{pkDefdoc1}</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">or pk_defdoc10 = #{pkDefdoc10}</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">or pk_defdoc11 = #{pkDefdoc11}</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">or pk_defdoc12 = #{pkDefdoc12}</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">or pk_defdoc13 = #{pkDefdoc13}</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">or pk_defdoc14 = #{pkDefdoc14}</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">or pk_defdoc15 = #{pkDefdoc15}</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">or pk_defdoc16 = #{pkDefdoc16}</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">or pk_defdoc17 = #{pkDefdoc17}</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">or pk_defdoc18 = #{pkDefdoc18}</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">or pk_defdoc19 = #{pkDefdoc19}</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">or pk_defdoc2 = #{pkDefdoc2}</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">or pk_defdoc20 = #{pkDefdoc20}</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">or pk_defdoc3 = #{pkDefdoc3}</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">or pk_defdoc4 = #{pkDefdoc4}</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">or pk_defdoc5 = #{pkDefdoc5}</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">or pk_defdoc6 = #{pkDefdoc6}</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">or pk_defdoc7 = #{pkDefdoc7}</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">or pk_defdoc8 = #{pkDefdoc8}</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">or pk_defdoc9 = #{pkDefdoc9}</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">or tlastmoditime = #{tlastmoditime}</if>
            <if test="tmaketime != null and tmaketime != ''">or tmaketime = #{tmaketime}</if>
            <if test="ts != null and ts != ''">or ts = #{ts}</if>
            <if test="vadjuster != null and vadjuster != ''">or vadjuster = #{vadjuster}</if>
            <if test="vbillcode != null and vbillcode != ''">or vbillcode = #{vbillcode}</if>
            <if test="vnote != null and vnote != ''">or vnote = #{vnote}</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">or vshldarrivedate = #{vshldarrivedate}</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">or vuserdef1 = #{vuserdef1}</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">or vuserdef10 = #{vuserdef10}</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">or vuserdef11 = #{vuserdef11}</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">or vuserdef12 = #{vuserdef12}</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">or vuserdef13 = #{vuserdef13}</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">or vuserdef14 = #{vuserdef14}</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">or vuserdef15 = #{vuserdef15}</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">or vuserdef16 = #{vuserdef16}</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">or vuserdef17 = #{vuserdef17}</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">or vuserdef18 = #{vuserdef18}</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">or vuserdef19 = #{vuserdef19}</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">or vuserdef2 = #{vuserdef2}</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">or vuserdef20 = #{vuserdef20}</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">or vuserdef3 = #{vuserdef3}</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">or vuserdef4 = #{vuserdef4}</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">or vuserdef5 = #{vuserdef5}</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">or vuserdef6 = #{vuserdef6}</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">or vuserdef7 = #{vuserdef7}</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">or vuserdef8 = #{vuserdef8}</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">or vuserdef9 = #{vuserdef9}</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.IcSpecialHEntity"
            keyProperty="cspecialhid" useGeneratedKeys="true">
        insert into ic_special_h(
        <trim suffix="" suffixOverrides=",">
            <if test="bccountflag != null and bccountflag != ''">bccountflag ,</if>
            <if test="cauditorid != null and cauditorid != ''">cauditorid ,</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">cbilltypecode ,</if>
            <if test="cinbsrid != null and cinbsrid != ''">cinbsrid ,</if>
            <if test="cindeptid != null and cindeptid != ''">cindeptid ,</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">cinwarehouseid ,</if>
            <if test="clastmodiid != null and clastmodiid != ''">clastmodiid ,</if>
            <if test="coperatorid != null and coperatorid != ''">coperatorid ,</if>
            <if test="coutbsor != null and coutbsor != ''">coutbsor ,</if>
            <if test="coutdeptid != null and coutdeptid != ''">coutdeptid ,</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">coutwarehouseid ,</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">cshlddiliverdate ,</if>
            <if test="cspecialhid != null and cspecialhid != ''">cspecialhid ,</if>
            <if test="dbilldate != null and dbilldate != ''">dbilldate ,</if>
            <if test="denddate != null and denddate != ''">denddate ,</if>
            <if test="dr != null">dr ,</if>
            <if test="fassistantflag != null and fassistantflag != ''">fassistantflag ,</if>
            <if test="fbillflag != null">fbillflag ,</if>
            <if test="icheckmode != null">icheckmode ,</if>
            <if test="iprintcount != null">iprintcount ,</if>
            <if test="nfixdisassemblymny != null">nfixdisassemblymny ,</if>
            <if test="pkCorp != null and pkCorp != ''">pk_corp ,</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">pk_defdoc1 ,</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">pk_defdoc10 ,</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">pk_defdoc11 ,</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">pk_defdoc12 ,</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">pk_defdoc13 ,</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">pk_defdoc14 ,</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">pk_defdoc15 ,</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">pk_defdoc16 ,</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">pk_defdoc17 ,</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">pk_defdoc18 ,</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">pk_defdoc19 ,</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">pk_defdoc2 ,</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">pk_defdoc20 ,</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">pk_defdoc3 ,</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">pk_defdoc4 ,</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">pk_defdoc5 ,</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">pk_defdoc6 ,</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">pk_defdoc7 ,</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">pk_defdoc8 ,</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">pk_defdoc9 ,</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">tlastmoditime ,</if>
            <if test="tmaketime != null and tmaketime != ''">tmaketime ,</if>
            <if test="ts != null and ts != ''">ts ,</if>
            <if test="vadjuster != null and vadjuster != ''">vadjuster ,</if>
            <if test="vbillcode != null and vbillcode != ''">vbillcode ,</if>
            <if test="vnote != null and vnote != ''">vnote ,</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">vshldarrivedate ,</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">vuserdef1 ,</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">vuserdef10 ,</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">vuserdef11 ,</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">vuserdef12 ,</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">vuserdef13 ,</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">vuserdef14 ,</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">vuserdef15 ,</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">vuserdef16 ,</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">vuserdef17 ,</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">vuserdef18 ,</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">vuserdef19 ,</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">vuserdef2 ,</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">vuserdef20 ,</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">vuserdef3 ,</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">vuserdef4 ,</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">vuserdef5 ,</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">vuserdef6 ,</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">vuserdef7 ,</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">vuserdef8 ,</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">vuserdef9 ,</if>
            <if test="sorts == null ">sorts,</if>
            <if test="sts == null ">sts,</if>
        </trim>
        )values(
        <trim suffix="" suffixOverrides=",">
            <if test="bccountflag != null and bccountflag != ''">#{bccountflag} ,</if>
            <if test="cauditorid != null and cauditorid != ''">#{cauditorid} ,</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">#{cbilltypecode} ,</if>
            <if test="cinbsrid != null and cinbsrid != ''">#{cinbsrid} ,</if>
            <if test="cindeptid != null and cindeptid != ''">#{cindeptid} ,</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">#{cinwarehouseid} ,</if>
            <if test="clastmodiid != null and clastmodiid != ''">#{clastmodiid} ,</if>
            <if test="coperatorid != null and coperatorid != ''">#{coperatorid} ,</if>
            <if test="coutbsor != null and coutbsor != ''">#{coutbsor} ,</if>
            <if test="coutdeptid != null and coutdeptid != ''">#{coutdeptid} ,</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">#{coutwarehouseid} ,</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">#{cshlddiliverdate} ,</if>
            <if test="cspecialhid != null and cspecialhid != ''">#{cspecialhid} ,</if>
            <if test="dbilldate != null and dbilldate != ''">#{dbilldate} ,</if>
            <if test="denddate != null and denddate != ''">#{denddate} ,</if>
            <if test="dr != null">#{dr} ,</if>
            <if test="fassistantflag != null and fassistantflag != ''">#{fassistantflag} ,</if>
            <if test="fbillflag != null">#{fbillflag} ,</if>
            <if test="icheckmode != null">#{icheckmode} ,</if>
            <if test="iprintcount != null">#{iprintcount} ,</if>
            <if test="nfixdisassemblymny != null">#{nfixdisassemblymny} ,</if>
            <if test="pkCorp != null and pkCorp != ''">#{pkCorp} ,</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">#{pkDefdoc1} ,</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">#{pkDefdoc10} ,</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">#{pkDefdoc11} ,</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">#{pkDefdoc12} ,</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">#{pkDefdoc13} ,</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">#{pkDefdoc14} ,</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">#{pkDefdoc15} ,</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">#{pkDefdoc16} ,</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">#{pkDefdoc17} ,</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">#{pkDefdoc18} ,</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">#{pkDefdoc19} ,</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">#{pkDefdoc2} ,</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">#{pkDefdoc20} ,</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">#{pkDefdoc3} ,</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">#{pkDefdoc4} ,</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">#{pkDefdoc5} ,</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">#{pkDefdoc6} ,</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">#{pkDefdoc7} ,</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">#{pkDefdoc8} ,</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">#{pkDefdoc9} ,</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">#{tlastmoditime} ,</if>
            <if test="tmaketime != null and tmaketime != ''">#{tmaketime} ,</if>
            <if test="ts != null and ts != ''">#{ts} ,</if>
            <if test="vadjuster != null and vadjuster != ''">#{vadjuster} ,</if>
            <if test="vbillcode != null and vbillcode != ''">#{vbillcode} ,</if>
            <if test="vnote != null and vnote != ''">#{vnote} ,</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">#{vshldarrivedate} ,</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">#{vuserdef1} ,</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">#{vuserdef10} ,</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">#{vuserdef11} ,</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">#{vuserdef12} ,</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">#{vuserdef13} ,</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">#{vuserdef14} ,</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">#{vuserdef15} ,</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">#{vuserdef16} ,</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">#{vuserdef17} ,</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">#{vuserdef18} ,</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">#{vuserdef19} ,</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">#{vuserdef2} ,</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">#{vuserdef20} ,</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">#{vuserdef3} ,</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">#{vuserdef4} ,</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">#{vuserdef5} ,</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">#{vuserdef6} ,</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">#{vuserdef7} ,</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">#{vuserdef8} ,</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">#{vuserdef9} ,</if>
            <if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from ic_special_h a WHERE a.sts =
                'Y' ),
            </if>
            <if test="sts == null ">'Y',</if>
        </trim>
        )
    </insert>
    <!-- 批量新增 -->
    <insert id="entityInsertBatch" keyProperty="cspecialhid" useGeneratedKeys="true">
        insert into ic_special_h(bccountflag, cauditorid, cbilltypecode, cinbsrid, cindeptid, cinwarehouseid,
        clastmodiid, coperatorid, coutbsor, coutdeptid, coutwarehouseid, cshlddiliverdate, dbilldate, denddate, dr,
        fassistantflag, fbillflag, icheckmode, iprintcount, nfixdisassemblymny, pk_corp, pk_defdoc1, pk_defdoc10,
        pk_defdoc11, pk_defdoc12, pk_defdoc13, pk_defdoc14, pk_defdoc15, pk_defdoc16, pk_defdoc17, pk_defdoc18,
        pk_defdoc19, pk_defdoc2, pk_defdoc20, pk_defdoc3, pk_defdoc4, pk_defdoc5, pk_defdoc6, pk_defdoc7, pk_defdoc8,
        pk_defdoc9, tlastmoditime, tmaketime, ts, vadjuster, vbillcode, vnote, vshldarrivedate, vuserdef1, vuserdef10,
        vuserdef11, vuserdef12, vuserdef13, vuserdef14, vuserdef15, vuserdef16, vuserdef17, vuserdef18, vuserdef19,
        vuserdef2, vuserdef20, vuserdef3, vuserdef4, vuserdef5, vuserdef6, vuserdef7, vuserdef8, vuserdef9, sts)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.bccountflag},#{entity.cauditorid},#{entity.cbilltypecode},#{entity.cinbsrid},#{entity.cindeptid},#{entity.cinwarehouseid},#{entity.clastmodiid},#{entity.coperatorid},#{entity.coutbsor},#{entity.coutdeptid},#{entity.coutwarehouseid},#{entity.cshlddiliverdate},#{entity.dbilldate},#{entity.denddate},#{entity.dr},#{entity.fassistantflag},#{entity.fbillflag},#{entity.icheckmode},#{entity.iprintcount},#{entity.nfixdisassemblymny},#{entity.pkCorp},#{entity.pkDefdoc1},#{entity.pkDefdoc10},#{entity.pkDefdoc11},#{entity.pkDefdoc12},#{entity.pkDefdoc13},#{entity.pkDefdoc14},#{entity.pkDefdoc15},#{entity.pkDefdoc16},#{entity.pkDefdoc17},#{entity.pkDefdoc18},#{entity.pkDefdoc19},#{entity.pkDefdoc2},#{entity.pkDefdoc20},#{entity.pkDefdoc3},#{entity.pkDefdoc4},#{entity.pkDefdoc5},#{entity.pkDefdoc6},#{entity.pkDefdoc7},#{entity.pkDefdoc8},#{entity.pkDefdoc9},#{entity.tlastmoditime},#{entity.tmaketime},#{entity.ts},#{entity.vadjuster},#{entity.vbillcode},#{entity.vnote},#{entity.vshldarrivedate},#{entity.vuserdef1},#{entity.vuserdef10},#{entity.vuserdef11},#{entity.vuserdef12},#{entity.vuserdef13},#{entity.vuserdef14},#{entity.vuserdef15},#{entity.vuserdef16},#{entity.vuserdef17},#{entity.vuserdef18},#{entity.vuserdef19},#{entity.vuserdef2},#{entity.vuserdef20},#{entity.vuserdef3},#{entity.vuserdef4},#{entity.vuserdef5},#{entity.vuserdef6},#{entity.vuserdef7},#{entity.vuserdef8},#{entity.vuserdef9},
            'Y')
        </foreach>
    </insert>
    <!-- 批量新增或者修改-->
    <insert id="entityInsertOrUpdateBatch" keyProperty="cspecialhid" useGeneratedKeys="true">
        insert into ic_special_h(bccountflag, cauditorid, cbilltypecode, cinbsrid, cindeptid, cinwarehouseid,
        clastmodiid, coperatorid, coutbsor, coutdeptid, coutwarehouseid, cshlddiliverdate, dbilldate, denddate, dr,
        fassistantflag, fbillflag, icheckmode, iprintcount, nfixdisassemblymny, pk_corp, pk_defdoc1, pk_defdoc10,
        pk_defdoc11, pk_defdoc12, pk_defdoc13, pk_defdoc14, pk_defdoc15, pk_defdoc16, pk_defdoc17, pk_defdoc18,
        pk_defdoc19, pk_defdoc2, pk_defdoc20, pk_defdoc3, pk_defdoc4, pk_defdoc5, pk_defdoc6, pk_defdoc7, pk_defdoc8,
        pk_defdoc9, tlastmoditime, tmaketime, ts, vadjuster, vbillcode, vnote, vshldarrivedate, vuserdef1, vuserdef10,
        vuserdef11, vuserdef12, vuserdef13, vuserdef14, vuserdef15, vuserdef16, vuserdef17, vuserdef18, vuserdef19,
        vuserdef2, vuserdef20, vuserdef3, vuserdef4, vuserdef5, vuserdef6, vuserdef7, vuserdef8, vuserdef9)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.bccountflag},#{entity.cauditorid},#{entity.cbilltypecode},#{entity.cinbsrid},#{entity.cindeptid},#{entity.cinwarehouseid},#{entity.clastmodiid},#{entity.coperatorid},#{entity.coutbsor},#{entity.coutdeptid},#{entity.coutwarehouseid},#{entity.cshlddiliverdate},#{entity.dbilldate},#{entity.denddate},#{entity.dr},#{entity.fassistantflag},#{entity.fbillflag},#{entity.icheckmode},#{entity.iprintcount},#{entity.nfixdisassemblymny},#{entity.pkCorp},#{entity.pkDefdoc1},#{entity.pkDefdoc10},#{entity.pkDefdoc11},#{entity.pkDefdoc12},#{entity.pkDefdoc13},#{entity.pkDefdoc14},#{entity.pkDefdoc15},#{entity.pkDefdoc16},#{entity.pkDefdoc17},#{entity.pkDefdoc18},#{entity.pkDefdoc19},#{entity.pkDefdoc2},#{entity.pkDefdoc20},#{entity.pkDefdoc3},#{entity.pkDefdoc4},#{entity.pkDefdoc5},#{entity.pkDefdoc6},#{entity.pkDefdoc7},#{entity.pkDefdoc8},#{entity.pkDefdoc9},#{entity.tlastmoditime},#{entity.tmaketime},#{entity.ts},#{entity.vadjuster},#{entity.vbillcode},#{entity.vnote},#{entity.vshldarrivedate},#{entity.vuserdef1},#{entity.vuserdef10},#{entity.vuserdef11},#{entity.vuserdef12},#{entity.vuserdef13},#{entity.vuserdef14},#{entity.vuserdef15},#{entity.vuserdef16},#{entity.vuserdef17},#{entity.vuserdef18},#{entity.vuserdef19},#{entity.vuserdef2},#{entity.vuserdef20},#{entity.vuserdef3},#{entity.vuserdef4},#{entity.vuserdef5},#{entity.vuserdef6},#{entity.vuserdef7},#{entity.vuserdef8},#{entity.vuserdef9})
        </foreach>
        on duplicate key update
        bccountflag = values(bccountflag),
        cauditorid = values(cauditorid),
        cbilltypecode = values(cbilltypecode),
        cinbsrid = values(cinbsrid),
        cindeptid = values(cindeptid),
        cinwarehouseid = values(cinwarehouseid),
        clastmodiid = values(clastmodiid),
        coperatorid = values(coperatorid),
        coutbsor = values(coutbsor),
        coutdeptid = values(coutdeptid),
        coutwarehouseid = values(coutwarehouseid),
        cshlddiliverdate = values(cshlddiliverdate),
        dbilldate = values(dbilldate),
        denddate = values(denddate),
        dr = values(dr),
        fassistantflag = values(fassistantflag),
        fbillflag = values(fbillflag),
        icheckmode = values(icheckmode),
        iprintcount = values(iprintcount),
        nfixdisassemblymny = values(nfixdisassemblymny),
        pk_corp = values(pk_corp),
        pk_defdoc1 = values(pk_defdoc1),
        pk_defdoc10 = values(pk_defdoc10),
        pk_defdoc11 = values(pk_defdoc11),
        pk_defdoc12 = values(pk_defdoc12),
        pk_defdoc13 = values(pk_defdoc13),
        pk_defdoc14 = values(pk_defdoc14),
        pk_defdoc15 = values(pk_defdoc15),
        pk_defdoc16 = values(pk_defdoc16),
        pk_defdoc17 = values(pk_defdoc17),
        pk_defdoc18 = values(pk_defdoc18),
        pk_defdoc19 = values(pk_defdoc19),
        pk_defdoc2 = values(pk_defdoc2),
        pk_defdoc20 = values(pk_defdoc20),
        pk_defdoc3 = values(pk_defdoc3),
        pk_defdoc4 = values(pk_defdoc4),
        pk_defdoc5 = values(pk_defdoc5),
        pk_defdoc6 = values(pk_defdoc6),
        pk_defdoc7 = values(pk_defdoc7),
        pk_defdoc8 = values(pk_defdoc8),
        pk_defdoc9 = values(pk_defdoc9),
        tlastmoditime = values(tlastmoditime),
        tmaketime = values(tmaketime),
        ts = values(ts),
        vadjuster = values(vadjuster),
        vbillcode = values(vbillcode),
        vnote = values(vnote),
        vshldarrivedate = values(vshldarrivedate),
        vuserdef1 = values(vuserdef1),
        vuserdef10 = values(vuserdef10),
        vuserdef11 = values(vuserdef11),
        vuserdef12 = values(vuserdef12),
        vuserdef13 = values(vuserdef13),
        vuserdef14 = values(vuserdef14),
        vuserdef15 = values(vuserdef15),
        vuserdef16 = values(vuserdef16),
        vuserdef17 = values(vuserdef17),
        vuserdef18 = values(vuserdef18),
        vuserdef19 = values(vuserdef19),
        vuserdef2 = values(vuserdef2),
        vuserdef20 = values(vuserdef20),
        vuserdef3 = values(vuserdef3),
        vuserdef4 = values(vuserdef4),
        vuserdef5 = values(vuserdef5),
        vuserdef6 = values(vuserdef6),
        vuserdef7 = values(vuserdef7),
        vuserdef8 = values(vuserdef8),
        vuserdef9 = values(vuserdef9)
    </insert>
    <!--通过主键修改方法-->
    <update id="entity_update" parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        update ic_special_h set
        <trim suffix="" suffixOverrides=",">
            <if test="bccountflag != null and bccountflag != ''">bccountflag = #{bccountflag},</if>
            <if test="cauditorid != null and cauditorid != ''">cauditorid = #{cauditorid},</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">cbilltypecode = #{cbilltypecode},</if>
            <if test="cinbsrid != null and cinbsrid != ''">cinbsrid = #{cinbsrid},</if>
            <if test="cindeptid != null and cindeptid != ''">cindeptid = #{cindeptid},</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">cinwarehouseid = #{cinwarehouseid},</if>
            <if test="clastmodiid != null and clastmodiid != ''">clastmodiid = #{clastmodiid},</if>
            <if test="coperatorid != null and coperatorid != ''">coperatorid = #{coperatorid},</if>
            <if test="coutbsor != null and coutbsor != ''">coutbsor = #{coutbsor},</if>
            <if test="coutdeptid != null and coutdeptid != ''">coutdeptid = #{coutdeptid},</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">coutwarehouseid = #{coutwarehouseid},</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">cshlddiliverdate = #{cshlddiliverdate},</if>
            <if test="dbilldate != null and dbilldate != ''">dbilldate = #{dbilldate},</if>
            <if test="denddate != null and denddate != ''">denddate = #{denddate},</if>
            <if test="dr != null">dr = #{dr},</if>
            <if test="fassistantflag != null and fassistantflag != ''">fassistantflag = #{fassistantflag},</if>
            <if test="fbillflag != null">fbillflag = #{fbillflag},</if>
            <if test="icheckmode != null">icheckmode = #{icheckmode},</if>
            <if test="iprintcount != null">iprintcount = #{iprintcount},</if>
            <if test="nfixdisassemblymny != null">nfixdisassemblymny = #{nfixdisassemblymny},</if>
            <if test="pkCorp != null and pkCorp != ''">pk_corp = #{pkCorp},</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">pk_defdoc1 = #{pkDefdoc1},</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">pk_defdoc10 = #{pkDefdoc10},</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">pk_defdoc11 = #{pkDefdoc11},</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">pk_defdoc12 = #{pkDefdoc12},</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">pk_defdoc13 = #{pkDefdoc13},</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">pk_defdoc14 = #{pkDefdoc14},</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">pk_defdoc15 = #{pkDefdoc15},</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">pk_defdoc16 = #{pkDefdoc16},</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">pk_defdoc17 = #{pkDefdoc17},</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">pk_defdoc18 = #{pkDefdoc18},</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">pk_defdoc19 = #{pkDefdoc19},</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">pk_defdoc2 = #{pkDefdoc2},</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">pk_defdoc20 = #{pkDefdoc20},</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">pk_defdoc3 = #{pkDefdoc3},</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">pk_defdoc4 = #{pkDefdoc4},</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">pk_defdoc5 = #{pkDefdoc5},</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">pk_defdoc6 = #{pkDefdoc6},</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">pk_defdoc7 = #{pkDefdoc7},</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">pk_defdoc8 = #{pkDefdoc8},</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">pk_defdoc9 = #{pkDefdoc9},</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">tlastmoditime = #{tlastmoditime},</if>
            <if test="tmaketime != null and tmaketime != ''">tmaketime = #{tmaketime},</if>
            <if test="ts != null and ts != ''">ts = #{ts},</if>
            <if test="vadjuster != null and vadjuster != ''">vadjuster = #{vadjuster},</if>
            <if test="vbillcode != null and vbillcode != ''">vbillcode = #{vbillcode},</if>
            <if test="vnote != null and vnote != ''">vnote = #{vnote},</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">vshldarrivedate = #{vshldarrivedate},</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">vuserdef1 = #{vuserdef1},</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">vuserdef10 = #{vuserdef10},</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">vuserdef11 = #{vuserdef11},</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">vuserdef12 = #{vuserdef12},</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">vuserdef13 = #{vuserdef13},</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">vuserdef14 = #{vuserdef14},</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">vuserdef15 = #{vuserdef15},</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">vuserdef16 = #{vuserdef16},</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">vuserdef17 = #{vuserdef17},</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">vuserdef18 = #{vuserdef18},</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">vuserdef19 = #{vuserdef19},</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">vuserdef2 = #{vuserdef2},</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">vuserdef20 = #{vuserdef20},</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">vuserdef3 = #{vuserdef3},</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">vuserdef4 = #{vuserdef4},</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">vuserdef5 = #{vuserdef5},</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">vuserdef6 = #{vuserdef6},</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">vuserdef7 = #{vuserdef7},</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">vuserdef8 = #{vuserdef8},</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">vuserdef9 = #{vuserdef9},</if>
        </trim>
        where cspecialhid = #{cspecialhid}
    </update>
    <!-- 逻辑删除 -->
    <update id="entity_logicDelete" parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        update ic_special_h
        set sts= 'N',
            modify_time = #{modify_time},
            modify_user_id = #{modify_user_id}
        where cspecialhid = #{cspecialhid}
    </update>
    <!-- 多条件逻辑删除 -->
    <update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.plugin.lets.entity.IcSpecialHEntity">
        update ic_special_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
        <trim prefix="where" prefixOverrides="and">
            <if test="bccountflag != null and bccountflag != ''">and bccountflag = #{bccountflag}</if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode = #{cbilltypecode}</if>
            <if test="cinbsrid != null and cinbsrid != ''">and cinbsrid = #{cinbsrid}</if>
            <if test="cindeptid != null and cindeptid != ''">and cindeptid = #{cindeptid}</if>
            <if test="cinwarehouseid != null and cinwarehouseid != ''">and cinwarehouseid = #{cinwarehouseid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid = #{coperatorid}</if>
            <if test="coutbsor != null and coutbsor != ''">and coutbsor = #{coutbsor}</if>
            <if test="coutdeptid != null and coutdeptid != ''">and coutdeptid = #{coutdeptid}</if>
            <if test="coutwarehouseid != null and coutwarehouseid != ''">and coutwarehouseid = #{coutwarehouseid}</if>
            <if test="cshlddiliverdate != null and cshlddiliverdate != ''">and cshlddiliverdate = #{cshlddiliverdate}
            </if>
            <if test="cspecialhid != null and cspecialhid != ''">and cspecialhid = #{cspecialhid}</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate = #{dbilldate}</if>
            <if test="denddate != null and denddate != ''">and denddate = #{denddate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="fassistantflag != null and fassistantflag != ''">and fassistantflag = #{fassistantflag}</if>
            <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>
            <if test="icheckmode != null">and icheckmode = #{icheckmode}</if>
            <if test="iprintcount != null">and iprintcount = #{iprintcount}</if>
            <if test="nfixdisassemblymny != null">and nfixdisassemblymny = #{nfixdisassemblymny}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkDefdoc1 != null and pkDefdoc1 != ''">and pk_defdoc1 = #{pkDefdoc1}</if>
            <if test="pkDefdoc10 != null and pkDefdoc10 != ''">and pk_defdoc10 = #{pkDefdoc10}</if>
            <if test="pkDefdoc11 != null and pkDefdoc11 != ''">and pk_defdoc11 = #{pkDefdoc11}</if>
            <if test="pkDefdoc12 != null and pkDefdoc12 != ''">and pk_defdoc12 = #{pkDefdoc12}</if>
            <if test="pkDefdoc13 != null and pkDefdoc13 != ''">and pk_defdoc13 = #{pkDefdoc13}</if>
            <if test="pkDefdoc14 != null and pkDefdoc14 != ''">and pk_defdoc14 = #{pkDefdoc14}</if>
            <if test="pkDefdoc15 != null and pkDefdoc15 != ''">and pk_defdoc15 = #{pkDefdoc15}</if>
            <if test="pkDefdoc16 != null and pkDefdoc16 != ''">and pk_defdoc16 = #{pkDefdoc16}</if>
            <if test="pkDefdoc17 != null and pkDefdoc17 != ''">and pk_defdoc17 = #{pkDefdoc17}</if>
            <if test="pkDefdoc18 != null and pkDefdoc18 != ''">and pk_defdoc18 = #{pkDefdoc18}</if>
            <if test="pkDefdoc19 != null and pkDefdoc19 != ''">and pk_defdoc19 = #{pkDefdoc19}</if>
            <if test="pkDefdoc2 != null and pkDefdoc2 != ''">and pk_defdoc2 = #{pkDefdoc2}</if>
            <if test="pkDefdoc20 != null and pkDefdoc20 != ''">and pk_defdoc20 = #{pkDefdoc20}</if>
            <if test="pkDefdoc3 != null and pkDefdoc3 != ''">and pk_defdoc3 = #{pkDefdoc3}</if>
            <if test="pkDefdoc4 != null and pkDefdoc4 != ''">and pk_defdoc4 = #{pkDefdoc4}</if>
            <if test="pkDefdoc5 != null and pkDefdoc5 != ''">and pk_defdoc5 = #{pkDefdoc5}</if>
            <if test="pkDefdoc6 != null and pkDefdoc6 != ''">and pk_defdoc6 = #{pkDefdoc6}</if>
            <if test="pkDefdoc7 != null and pkDefdoc7 != ''">and pk_defdoc7 = #{pkDefdoc7}</if>
            <if test="pkDefdoc8 != null and pkDefdoc8 != ''">and pk_defdoc8 = #{pkDefdoc8}</if>
            <if test="pkDefdoc9 != null and pkDefdoc9 != ''">and pk_defdoc9 = #{pkDefdoc9}</if>
            <if test="tlastmoditime != null and tlastmoditime != ''">and tlastmoditime = #{tlastmoditime}</if>
            <if test="tmaketime != null and tmaketime != ''">and tmaketime = #{tmaketime}</if>
            <if test="ts != null and ts != ''">and ts = #{ts}</if>
            <if test="vadjuster != null and vadjuster != ''">and vadjuster = #{vadjuster}</if>
            <if test="vbillcode != null and vbillcode != ''">and vbillcode = #{vbillcode}</if>
            <if test="vnote != null and vnote != ''">and vnote = #{vnote}</if>
            <if test="vshldarrivedate != null and vshldarrivedate != ''">and vshldarrivedate = #{vshldarrivedate}</if>
            <if test="vuserdef1 != null and vuserdef1 != ''">and vuserdef1 = #{vuserdef1}</if>
            <if test="vuserdef10 != null and vuserdef10 != ''">and vuserdef10 = #{vuserdef10}</if>
            <if test="vuserdef11 != null and vuserdef11 != ''">and vuserdef11 = #{vuserdef11}</if>
            <if test="vuserdef12 != null and vuserdef12 != ''">and vuserdef12 = #{vuserdef12}</if>
            <if test="vuserdef13 != null and vuserdef13 != ''">and vuserdef13 = #{vuserdef13}</if>
            <if test="vuserdef14 != null and vuserdef14 != ''">and vuserdef14 = #{vuserdef14}</if>
            <if test="vuserdef15 != null and vuserdef15 != ''">and vuserdef15 = #{vuserdef15}</if>
            <if test="vuserdef16 != null and vuserdef16 != ''">and vuserdef16 = #{vuserdef16}</if>
            <if test="vuserdef17 != null and vuserdef17 != ''">and vuserdef17 = #{vuserdef17}</if>
            <if test="vuserdef18 != null and vuserdef18 != ''">and vuserdef18 = #{vuserdef18}</if>
            <if test="vuserdef19 != null and vuserdef19 != ''">and vuserdef19 = #{vuserdef19}</if>
            <if test="vuserdef2 != null and vuserdef2 != ''">and vuserdef2 = #{vuserdef2}</if>
            <if test="vuserdef20 != null and vuserdef20 != ''">and vuserdef20 = #{vuserdef20}</if>
            <if test="vuserdef3 != null and vuserdef3 != ''">and vuserdef3 = #{vuserdef3}</if>
            <if test="vuserdef4 != null and vuserdef4 != ''">and vuserdef4 = #{vuserdef4}</if>
            <if test="vuserdef5 != null and vuserdef5 != ''">and vuserdef5 = #{vuserdef5}</if>
            <if test="vuserdef6 != null and vuserdef6 != ''">and vuserdef6 = #{vuserdef6}</if>
            <if test="vuserdef7 != null and vuserdef7 != ''">and vuserdef7 = #{vuserdef7}</if>
            <if test="vuserdef8 != null and vuserdef8 != ''">and vuserdef8 = #{vuserdef8}</if>
            <if test="vuserdef9 != null and vuserdef9 != ''">and vuserdef9 = #{vuserdef9}</if>
            and sts='Y'
        </trim>
    </update>
    <!--通过主键删除-->
    <delete id="entity_delete">
        delete
        from ic_special_h
        where cspecialhid = #{cspecialhid}
    </delete>

</mapper>

