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

    <resultMap id="get-IcGeneralHEntity-result" type="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        <result property="bassetcard" column="bassetcard" jdbcType="VARCHAR"/>
        <result property="bdelivedtorm" column="bdelivedtorm" jdbcType="VARCHAR"/>
        <result property="bdirecttranflag" column="bdirecttranflag" jdbcType="VARCHAR"/>
        <result property="boutretflag" column="boutretflag" jdbcType="VARCHAR"/>
        <result property="bsalecooppur" column="bsalecooppur" jdbcType="VARCHAR"/>
        <result property="cauditorid" column="cauditorid" jdbcType="VARCHAR"/>
        <result property="cbilltypecode" column="cbilltypecode" jdbcType="VARCHAR"/>
        <result property="cbizid" column="cbizid" jdbcType="VARCHAR"/>
        <result property="cbiztype" column="cbiztype" jdbcType="VARCHAR"/>
        <result property="ccustomerid" column="ccustomerid" jdbcType="VARCHAR"/>
        <result property="cdilivertypeid" column="cdilivertypeid" jdbcType="VARCHAR"/>
        <result property="cdispatcherid" column="cdispatcherid" jdbcType="VARCHAR"/>
        <result property="cdptid" column="cdptid" jdbcType="VARCHAR"/>
        <result property="cendreportid" column="cendreportid" jdbcType="VARCHAR"/>
        <result property="cgeneralhid" column="cgeneralhid" jdbcType="VARCHAR"/>
        <result property="cinventoryid" column="cinventoryid" jdbcType="VARCHAR"/>
        <result property="clastmodiid" column="clastmodiid" jdbcType="VARCHAR"/>
        <result property="coperatorid" column="coperatorid" jdbcType="VARCHAR"/>
        <result property="cothercalbodyid" column="cothercalbodyid" jdbcType="VARCHAR"/>
        <result property="cothercorpid" column="cothercorpid" jdbcType="VARCHAR"/>
        <result property="cotherwhid" column="cotherwhid" jdbcType="VARCHAR"/>
        <result property="coutcalbodyid" column="coutcalbodyid" jdbcType="VARCHAR"/>
        <result property="coutcorpid" column="coutcorpid" jdbcType="VARCHAR"/>
        <result property="cproviderid" column="cproviderid" jdbcType="VARCHAR"/>
        <result property="cregister" column="cregister" jdbcType="VARCHAR"/>
        <result property="csettlepathid" column="csettlepathid" jdbcType="VARCHAR"/>
        <result property="ctrancustid" column="ctrancustid" jdbcType="VARCHAR"/>
        <result property="cwarehouseid" column="cwarehouseid" jdbcType="VARCHAR"/>
        <result property="cwastewarehouseid" column="cwastewarehouseid" jdbcType="VARCHAR"/>
        <result property="cwhsmanagerid" column="cwhsmanagerid" jdbcType="VARCHAR"/>
        <result property="daccountdate" column="daccountdate" jdbcType="VARCHAR"/>
        <result property="dauditdate" column="dauditdate" jdbcType="VARCHAR"/>
        <result property="dbilldate" column="dbilldate" jdbcType="VARCHAR"/>
        <result property="dr" column="dr" jdbcType="INTEGER"/>
        <result property="fallocflag" column="fallocflag" jdbcType="INTEGER"/>
        <result property="fbillflag" column="fbillflag" jdbcType="INTEGER"/>
        <result property="freplenishflag" column="freplenishflag" jdbcType="VARCHAR"/>
        <result property="fspecialflag" column="fspecialflag" jdbcType="INTEGER"/>
        <result property="iprintcount" column="iprintcount" jdbcType="INTEGER"/>
        <result property="ndiscountmny" column="ndiscountmny" jdbcType="NUMERIC"/>
        <result property="nnetmny" column="nnetmny" jdbcType="NUMERIC"/>
        <result property="ntotalmny" column="ntotalmny" jdbcType="NUMERIC"/>
        <result property="ntotalnum" column="ntotalnum" jdbcType="NUMERIC"/>
        <result property="outsourcewarehouseid" column="outsourcewarehouseid" jdbcType="VARCHAR"/>
        <result property="pkCalbody" column="pk_calbody" jdbcType="VARCHAR"/>
        <result property="pkCorp" column="pk_corp" jdbcType="VARCHAR"/>
        <result property="pkCubasdoc" column="pk_cubasdoc" jdbcType="VARCHAR"/>
        <result property="pkCubasdocc" column="pk_cubasdocc" 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="pkMeasware" column="pk_measware" jdbcType="VARCHAR"/>
        <result property="pkPurcorp" column="pk_purcorp" jdbcType="VARCHAR"/>
        <result property="taccounttime" column="taccounttime" 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="vbillcode" column="vbillcode" jdbcType="VARCHAR"/>
        <result property="vdiliveraddress" column="vdiliveraddress" jdbcType="VARCHAR"/>
        <result property="vheadnote2" column="vheadnote2" jdbcType="VARCHAR"/>
        <result property="vnote" column="vnote" 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="IcGeneralHEntity_Base_Column_List">
        bassetcard
        ,bdelivedtorm
        ,bdirecttranflag 
        ,boutretflag 
        ,bsalecooppur 
        ,cauditorid 
        ,cbilltypecode 
        ,cbizid 
        ,cbiztype 
        ,ccustomerid 
        ,cdilivertypeid 
        ,cdispatcherid 
        ,cdptid 
        ,cendreportid 
        ,cgeneralhid 
        ,cinventoryid 
        ,clastmodiid 
        ,coperatorid 
        ,cothercalbodyid 
        ,cothercorpid 
        ,cotherwhid 
        ,coutcalbodyid 
        ,coutcorpid 
        ,cproviderid 
        ,cregister 
        ,csettlepathid 
        ,ctrancustid 
        ,cwarehouseid 
        ,cwastewarehouseid 
        ,cwhsmanagerid 
        ,daccountdate 
        ,dauditdate 
        ,dbilldate 
        ,dr 
        ,fallocflag 
        ,fbillflag 
        ,freplenishflag 
        ,fspecialflag 
        ,iprintcount 
        ,ndiscountmny 
        ,nnetmny 
        ,ntotalmny 
        ,ntotalnum 
        ,outsourcewarehouseid 
        ,pk_calbody 
        ,pk_corp 
        ,pk_cubasdoc 
        ,pk_cubasdocc 
        ,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 
        ,pk_measware 
        ,pk_purcorp 
        ,taccounttime 
        ,tlastmoditime 
        ,tmaketime 
        ,ts 
        ,vbillcode 
        ,vdiliveraddress 
        ,vheadnote2 
        ,vnote 
        ,vuserdef1 
        ,vuserdef10 
        ,vuserdef11 
        ,vuserdef12 
        ,vuserdef13 
        ,vuserdef14 
        ,vuserdef15 
        ,vuserdef16 
        ,vuserdef17 
        ,vuserdef18 
        ,vuserdef19 
        ,vuserdef2 
        ,vuserdef20 
        ,vuserdef3 
        ,vuserdef4 
        ,vuserdef5 
        ,vuserdef6 
        ,vuserdef7 
        ,vuserdef8 
        ,vuserdef9
    </sql>


    <!--查询U8C其他出库单，根据签字时间-->
    <select id="queryIcGeneralHEntity" resultMap="get-IcGeneralHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        select
        <include refid="IcGeneralHEntity_Base_Column_List"/>
        from ic_general_h where dr = 0
        <if test="cgeneralhid!=null and cgeneralhid!=''">
            and cgeneralhid = #{cgeneralhid}
        </if>
        <if test="cbilltypecode!=null and cbilltypecode!=''">
            and cbilltypecode = #{cbilltypecode}
        </if>
        <if test="fbillflag!=null and fbillflag!=''">
            and fbillflag = #{fbillflag}
        </if>
        <if test="vbillcode!=null and vbillcode!=''">
            and vbillcode = #{vbillcode}
        </if>
        <if test="start_signatureTime!=null and start_signatureTime!=''">
            and taccounttime &gt;= #{start_signatureTime}
        </if>
        <if test="end_signatureTime!=null and end_signatureTime!=''">
            and taccounttime &lt;= #{end_signatureTime}
        </if>
    </select>

    <!-- 查询 采用==查询 -->
    <select id="entity_list_base" resultMap="get-IcGeneralHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        select
        <include refid="IcGeneralHEntity_Base_Column_List"/>
        from ic_general_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bassetcard != null and bassetcard != ''">and bassetcard = #{bassetcard}</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">and bdelivedtorm = #{bdelivedtorm}</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">and bdirecttranflag = #{bdirecttranflag}</if>
            <if test="boutretflag != null and boutretflag != ''">and boutretflag = #{boutretflag}</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">and bsalecooppur = #{bsalecooppur}</if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode = #{cbilltypecode}</if>
            <if test="cbizid != null and cbizid != ''">and cbizid = #{cbizid}</if>
            <if test="cbiztype != null and cbiztype != ''">and cbiztype = #{cbiztype}</if>
            <if test="ccustomerid != null and ccustomerid != ''">and ccustomerid = #{ccustomerid}</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">and cdilivertypeid = #{cdilivertypeid}</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">and cdispatcherid = #{cdispatcherid}</if>
            <if test="cdptid != null and cdptid != ''">and cdptid = #{cdptid}</if>
            <if test="cendreportid != null and cendreportid != ''">and cendreportid = #{cendreportid}</if>
            <if test="cgeneralhid != null and cgeneralhid != ''">and cgeneralhid = #{cgeneralhid}</if>
            <if test="cinventoryid != null and cinventoryid != ''">and cinventoryid = #{cinventoryid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid = #{coperatorid}</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">and cothercalbodyid = #{cothercalbodyid}</if>
            <if test="cothercorpid != null and cothercorpid != ''">and cothercorpid = #{cothercorpid}</if>
            <if test="cotherwhid != null and cotherwhid != ''">and cotherwhid = #{cotherwhid}</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">and coutcalbodyid = #{coutcalbodyid}</if>
            <if test="coutcorpid != null and coutcorpid != ''">and coutcorpid = #{coutcorpid}</if>
            <if test="cproviderid != null and cproviderid != ''">and cproviderid = #{cproviderid}</if>
            <if test="cregister != null and cregister != ''">and cregister = #{cregister}</if>
            <if test="csettlepathid != null and csettlepathid != ''">and csettlepathid = #{csettlepathid}</if>
            <if test="ctrancustid != null and ctrancustid != ''">and ctrancustid = #{ctrancustid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid = #{cwarehouseid}</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">and cwastewarehouseid =
                #{cwastewarehouseid}
            </if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">and cwhsmanagerid = #{cwhsmanagerid}</if>
            <if test="daccountdate != null and daccountdate != ''">and daccountdate = #{daccountdate}</if>
            <if test="dauditdate != null and dauditdate != ''">and dauditdate = #{dauditdate}</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate = #{dbilldate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="fallocflag != null">and fallocflag = #{fallocflag}</if>
            <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>
            <if test="freplenishflag != null and freplenishflag != ''">and freplenishflag = #{freplenishflag}</if>
            <if test="fspecialflag != null">and fspecialflag = #{fspecialflag}</if>
            <if test="iprintcount != null">and iprintcount = #{iprintcount}</if>
            <if test="ndiscountmny != null">and ndiscountmny = #{ndiscountmny}</if>
            <if test="nnetmny != null">and nnetmny = #{nnetmny}</if>
            <if test="ntotalmny != null">and ntotalmny = #{ntotalmny}</if>
            <if test="ntotalnum != null">and ntotalnum = #{ntotalnum}</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">and outsourcewarehouseid =
                #{outsourcewarehouseid}
            </if>
            <if test="pkCalbody != null and pkCalbody != ''">and pk_calbody = #{pkCalbody}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">and pk_cubasdoc = #{pkCubasdoc}</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">and pk_cubasdocc = #{pkCubasdocc}</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="pkMeasware != null and pkMeasware != ''">and pk_measware = #{pkMeasware}</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">and pk_purcorp = #{pkPurcorp}</if>
            <if test="taccounttime != null and taccounttime != ''">and taccounttime = #{taccounttime}</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="vbillcode != null and vbillcode != ''">and vbillcode = #{vbillcode}</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">and vdiliveraddress = #{vdiliveraddress}</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">and vheadnote2 = #{vheadnote2}</if>
            <if test="vnote != null and vnote != ''">and vnote = #{vnote}</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>
            <if test="csourcebillhid!=null and csourcebillhid!=''">
                and cgeneralhid IN ( SELECT cgeneralhid FROM ic_general_b WHERE dr = 0 AND csourcebillhid = #{csourcebillhid} )
            </if>

            <if test="tmaketime_start != null and tmaketime_start != ''">and tmaketime >= #{tmaketime_start}</if>
            <if test="tmaketime_end != null and tmaketime_end != ''">and tmaketime &lt;= #{tmaketime_end}</if>


            and dr=0
        </trim>
    </select>

    <!-- 查询符合条件的数量 -->
    <select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        select count(1) from ic_general_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bassetcard != null and bassetcard != ''">and bassetcard = #{bassetcard}</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">and bdelivedtorm = #{bdelivedtorm}</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">and bdirecttranflag = #{bdirecttranflag}</if>
            <if test="boutretflag != null and boutretflag != ''">and boutretflag = #{boutretflag}</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">and bsalecooppur = #{bsalecooppur}</if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode = #{cbilltypecode}</if>
            <if test="cbizid != null and cbizid != ''">and cbizid = #{cbizid}</if>
            <if test="cbiztype != null and cbiztype != ''">and cbiztype = #{cbiztype}</if>
            <if test="ccustomerid != null and ccustomerid != ''">and ccustomerid = #{ccustomerid}</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">and cdilivertypeid = #{cdilivertypeid}</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">and cdispatcherid = #{cdispatcherid}</if>
            <if test="cdptid != null and cdptid != ''">and cdptid = #{cdptid}</if>
            <if test="cendreportid != null and cendreportid != ''">and cendreportid = #{cendreportid}</if>
            <if test="cgeneralhid != null and cgeneralhid != ''">and cgeneralhid = #{cgeneralhid}</if>
            <if test="cinventoryid != null and cinventoryid != ''">and cinventoryid = #{cinventoryid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid = #{coperatorid}</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">and cothercalbodyid = #{cothercalbodyid}</if>
            <if test="cothercorpid != null and cothercorpid != ''">and cothercorpid = #{cothercorpid}</if>
            <if test="cotherwhid != null and cotherwhid != ''">and cotherwhid = #{cotherwhid}</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">and coutcalbodyid = #{coutcalbodyid}</if>
            <if test="coutcorpid != null and coutcorpid != ''">and coutcorpid = #{coutcorpid}</if>
            <if test="cproviderid != null and cproviderid != ''">and cproviderid = #{cproviderid}</if>
            <if test="cregister != null and cregister != ''">and cregister = #{cregister}</if>
            <if test="csettlepathid != null and csettlepathid != ''">and csettlepathid = #{csettlepathid}</if>
            <if test="ctrancustid != null and ctrancustid != ''">and ctrancustid = #{ctrancustid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid = #{cwarehouseid}</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">and cwastewarehouseid =
                #{cwastewarehouseid}
            </if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">and cwhsmanagerid = #{cwhsmanagerid}</if>
            <if test="daccountdate != null and daccountdate != ''">and daccountdate = #{daccountdate}</if>
            <if test="dauditdate != null and dauditdate != ''">and dauditdate = #{dauditdate}</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate = #{dbilldate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="fallocflag != null">and fallocflag = #{fallocflag}</if>
            <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>
            <if test="freplenishflag != null and freplenishflag != ''">and freplenishflag = #{freplenishflag}</if>
            <if test="fspecialflag != null">and fspecialflag = #{fspecialflag}</if>
            <if test="iprintcount != null">and iprintcount = #{iprintcount}</if>
            <if test="ndiscountmny != null">and ndiscountmny = #{ndiscountmny}</if>
            <if test="nnetmny != null">and nnetmny = #{nnetmny}</if>
            <if test="ntotalmny != null">and ntotalmny = #{ntotalmny}</if>
            <if test="ntotalnum != null">and ntotalnum = #{ntotalnum}</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">and outsourcewarehouseid =
                #{outsourcewarehouseid}
            </if>
            <if test="pkCalbody != null and pkCalbody != ''">and pk_calbody = #{pkCalbody}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">and pk_cubasdoc = #{pkCubasdoc}</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">and pk_cubasdocc = #{pkCubasdocc}</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="pkMeasware != null and pkMeasware != ''">and pk_measware = #{pkMeasware}</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">and pk_purcorp = #{pkPurcorp}</if>
            <if test="taccounttime != null and taccounttime != ''">and taccounttime = #{taccounttime}</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="vbillcode != null and vbillcode != ''">and vbillcode = #{vbillcode}</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">and vdiliveraddress = #{vdiliveraddress}</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">and vheadnote2 = #{vheadnote2}</if>
            <if test="vnote != null and vnote != ''">and vnote = #{vnote}</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-IcGeneralHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        select
        <include refid="IcGeneralHEntity_Base_Column_List"/>
        from ic_general_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bassetcard != null and bassetcard != ''">and bassetcard like concat('%',#{bassetcard},'%')</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">and bdelivedtorm like
                concat('%',#{bdelivedtorm},'%')
            </if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">and bdirecttranflag like
                concat('%',#{bdirecttranflag},'%')
            </if>
            <if test="boutretflag != null and boutretflag != ''">and boutretflag like concat('%',#{boutretflag},'%')
            </if>
            <if test="bsalecooppur != null and bsalecooppur != ''">and bsalecooppur like
                concat('%',#{bsalecooppur},'%')
            </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="cbizid != null and cbizid != ''">and cbizid like concat('%',#{cbizid},'%')</if>
            <if test="cbiztype != null and cbiztype != ''">and cbiztype like concat('%',#{cbiztype},'%')</if>
            <if test="ccustomerid != null and ccustomerid != ''">and ccustomerid like concat('%',#{ccustomerid},'%')
            </if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">and cdilivertypeid like
                concat('%',#{cdilivertypeid},'%')
            </if>
            <if test="cdispatcherid != null and cdispatcherid != ''">and cdispatcherid like
                concat('%',#{cdispatcherid},'%')
            </if>
            <if test="cdptid != null and cdptid != ''">and cdptid like concat('%',#{cdptid},'%')</if>
            <if test="cendreportid != null and cendreportid != ''">and cendreportid like
                concat('%',#{cendreportid},'%')
            </if>
            <if test="cgeneralhid != null and cgeneralhid != ''">and cgeneralhid like concat('%',#{cgeneralhid},'%')
            </if>
            <if test="cinventoryid != null and cinventoryid != ''">and cinventoryid like
                concat('%',#{cinventoryid},'%')
            </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="cothercalbodyid != null and cothercalbodyid != ''">and cothercalbodyid like
                concat('%',#{cothercalbodyid},'%')
            </if>
            <if test="cothercorpid != null and cothercorpid != ''">and cothercorpid like
                concat('%',#{cothercorpid},'%')
            </if>
            <if test="cotherwhid != null and cotherwhid != ''">and cotherwhid like concat('%',#{cotherwhid},'%')</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">and coutcalbodyid like
                concat('%',#{coutcalbodyid},'%')
            </if>
            <if test="coutcorpid != null and coutcorpid != ''">and coutcorpid like concat('%',#{coutcorpid},'%')</if>
            <if test="cproviderid != null and cproviderid != ''">and cproviderid like concat('%',#{cproviderid},'%')
            </if>
            <if test="cregister != null and cregister != ''">and cregister like concat('%',#{cregister},'%')</if>
            <if test="csettlepathid != null and csettlepathid != ''">and csettlepathid like
                concat('%',#{csettlepathid},'%')
            </if>
            <if test="ctrancustid != null and ctrancustid != ''">and ctrancustid like concat('%',#{ctrancustid},'%')
            </if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid like
                concat('%',#{cwarehouseid},'%')
            </if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">and cwastewarehouseid like
                concat('%',#{cwastewarehouseid},'%')
            </if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">and cwhsmanagerid like
                concat('%',#{cwhsmanagerid},'%')
            </if>
            <if test="daccountdate != null and daccountdate != ''">and daccountdate like
                concat('%',#{daccountdate},'%')
            </if>
            <if test="dauditdate != null and dauditdate != ''">and dauditdate like concat('%',#{dauditdate},'%')</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate like concat('%',#{dbilldate},'%')</if>
            <if test="dr != null">and dr like concat('%',#{dr},'%')</if>
            <if test="fallocflag != null">and fallocflag like concat('%',#{fallocflag},'%')</if>
            <if test="fbillflag != null">and fbillflag like concat('%',#{fbillflag},'%')</if>
            <if test="freplenishflag != null and freplenishflag != ''">and freplenishflag like
                concat('%',#{freplenishflag},'%')
            </if>
            <if test="fspecialflag != null">and fspecialflag like concat('%',#{fspecialflag},'%')</if>
            <if test="iprintcount != null">and iprintcount like concat('%',#{iprintcount},'%')</if>
            <if test="ndiscountmny != null">and ndiscountmny like concat('%',#{ndiscountmny},'%')</if>
            <if test="nnetmny != null">and nnetmny like concat('%',#{nnetmny},'%')</if>
            <if test="ntotalmny != null">and ntotalmny like concat('%',#{ntotalmny},'%')</if>
            <if test="ntotalnum != null">and ntotalnum like concat('%',#{ntotalnum},'%')</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">and outsourcewarehouseid like
                concat('%',#{outsourcewarehouseid},'%')
            </if>
            <if test="pkCalbody != null and pkCalbody != ''">and pk_calbody like concat('%',#{pkCalbody},'%')</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp like concat('%',#{pkCorp},'%')</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">and pk_cubasdoc like concat('%',#{pkCubasdoc},'%')</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">and pk_cubasdocc like concat('%',#{pkCubasdocc},'%')
            </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="pkMeasware != null and pkMeasware != ''">and pk_measware like concat('%',#{pkMeasware},'%')</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">and pk_purcorp like concat('%',#{pkPurcorp},'%')</if>
            <if test="taccounttime != null and taccounttime != ''">and taccounttime like
                concat('%',#{taccounttime},'%')
            </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="vbillcode != null and vbillcode != ''">and vbillcode like concat('%',#{vbillcode},'%')</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">and vdiliveraddress like
                concat('%',#{vdiliveraddress},'%')
            </if>
            <if test="vheadnote2 != null and vheadnote2 != ''">and vheadnote2 like concat('%',#{vheadnote2},'%')</if>
            <if test="vnote != null and vnote != ''">and vnote like concat('%',#{vnote},'%')</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="IcGeneralHentity_list_or" resultMap="get-IcGeneralHEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        select
        <include refid="IcGeneralHEntity_Base_Column_List"/>
        from ic_general_h
        <trim prefix="where" prefixOverrides="and">
            <if test="bassetcard != null and bassetcard != ''">or bassetcard = #{bassetcard}</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">or bdelivedtorm = #{bdelivedtorm}</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">or bdirecttranflag = #{bdirecttranflag}</if>
            <if test="boutretflag != null and boutretflag != ''">or boutretflag = #{boutretflag}</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">or bsalecooppur = #{bsalecooppur}</if>
            <if test="cauditorid != null and cauditorid != ''">or cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">or cbilltypecode = #{cbilltypecode}</if>
            <if test="cbizid != null and cbizid != ''">or cbizid = #{cbizid}</if>
            <if test="cbiztype != null and cbiztype != ''">or cbiztype = #{cbiztype}</if>
            <if test="ccustomerid != null and ccustomerid != ''">or ccustomerid = #{ccustomerid}</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">or cdilivertypeid = #{cdilivertypeid}</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">or cdispatcherid = #{cdispatcherid}</if>
            <if test="cdptid != null and cdptid != ''">or cdptid = #{cdptid}</if>
            <if test="cendreportid != null and cendreportid != ''">or cendreportid = #{cendreportid}</if>
            <if test="cgeneralhid != null and cgeneralhid != ''">or cgeneralhid = #{cgeneralhid}</if>
            <if test="cinventoryid != null and cinventoryid != ''">or cinventoryid = #{cinventoryid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">or clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">or coperatorid = #{coperatorid}</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">or cothercalbodyid = #{cothercalbodyid}</if>
            <if test="cothercorpid != null and cothercorpid != ''">or cothercorpid = #{cothercorpid}</if>
            <if test="cotherwhid != null and cotherwhid != ''">or cotherwhid = #{cotherwhid}</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">or coutcalbodyid = #{coutcalbodyid}</if>
            <if test="coutcorpid != null and coutcorpid != ''">or coutcorpid = #{coutcorpid}</if>
            <if test="cproviderid != null and cproviderid != ''">or cproviderid = #{cproviderid}</if>
            <if test="cregister != null and cregister != ''">or cregister = #{cregister}</if>
            <if test="csettlepathid != null and csettlepathid != ''">or csettlepathid = #{csettlepathid}</if>
            <if test="ctrancustid != null and ctrancustid != ''">or ctrancustid = #{ctrancustid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">or cwarehouseid = #{cwarehouseid}</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">or cwastewarehouseid =
                #{cwastewarehouseid}
            </if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">or cwhsmanagerid = #{cwhsmanagerid}</if>
            <if test="daccountdate != null and daccountdate != ''">or daccountdate = #{daccountdate}</if>
            <if test="dauditdate != null and dauditdate != ''">or dauditdate = #{dauditdate}</if>
            <if test="dbilldate != null and dbilldate != ''">or dbilldate = #{dbilldate}</if>
            <if test="dr != null">or dr = #{dr}</if>
            <if test="fallocflag != null">or fallocflag = #{fallocflag}</if>
            <if test="fbillflag != null">or fbillflag = #{fbillflag}</if>
            <if test="freplenishflag != null and freplenishflag != ''">or freplenishflag = #{freplenishflag}</if>
            <if test="fspecialflag != null">or fspecialflag = #{fspecialflag}</if>
            <if test="iprintcount != null">or iprintcount = #{iprintcount}</if>
            <if test="ndiscountmny != null">or ndiscountmny = #{ndiscountmny}</if>
            <if test="nnetmny != null">or nnetmny = #{nnetmny}</if>
            <if test="ntotalmny != null">or ntotalmny = #{ntotalmny}</if>
            <if test="ntotalnum != null">or ntotalnum = #{ntotalnum}</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">or outsourcewarehouseid =
                #{outsourcewarehouseid}
            </if>
            <if test="pkCalbody != null and pkCalbody != ''">or pk_calbody = #{pkCalbody}</if>
            <if test="pkCorp != null and pkCorp != ''">or pk_corp = #{pkCorp}</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">or pk_cubasdoc = #{pkCubasdoc}</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">or pk_cubasdocc = #{pkCubasdocc}</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="pkMeasware != null and pkMeasware != ''">or pk_measware = #{pkMeasware}</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">or pk_purcorp = #{pkPurcorp}</if>
            <if test="taccounttime != null and taccounttime != ''">or taccounttime = #{taccounttime}</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="vbillcode != null and vbillcode != ''">or vbillcode = #{vbillcode}</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">or vdiliveraddress = #{vdiliveraddress}</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">or vheadnote2 = #{vheadnote2}</if>
            <if test="vnote != null and vnote != ''">or vnote = #{vnote}</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.IcGeneralHEntity"
            keyProperty="cgeneralhid" useGeneratedKeys="true">
        insert into ic_general_h(
        <trim suffix="" suffixOverrides=",">
            <if test="bassetcard != null and bassetcard != ''">bassetcard ,</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">bdelivedtorm ,</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">bdirecttranflag ,</if>
            <if test="boutretflag != null and boutretflag != ''">boutretflag ,</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">bsalecooppur ,</if>
            <if test="cauditorid != null and cauditorid != ''">cauditorid ,</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">cbilltypecode ,</if>
            <if test="cbizid != null and cbizid != ''">cbizid ,</if>
            <if test="cbiztype != null and cbiztype != ''">cbiztype ,</if>
            <if test="ccustomerid != null and ccustomerid != ''">ccustomerid ,</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">cdilivertypeid ,</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">cdispatcherid ,</if>
            <if test="cdptid != null and cdptid != ''">cdptid ,</if>
            <if test="cendreportid != null and cendreportid != ''">cendreportid ,</if>
            <if test="cgeneralhid != null and cgeneralhid != ''">cgeneralhid ,</if>
            <if test="cinventoryid != null and cinventoryid != ''">cinventoryid ,</if>
            <if test="clastmodiid != null and clastmodiid != ''">clastmodiid ,</if>
            <if test="coperatorid != null and coperatorid != ''">coperatorid ,</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">cothercalbodyid ,</if>
            <if test="cothercorpid != null and cothercorpid != ''">cothercorpid ,</if>
            <if test="cotherwhid != null and cotherwhid != ''">cotherwhid ,</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">coutcalbodyid ,</if>
            <if test="coutcorpid != null and coutcorpid != ''">coutcorpid ,</if>
            <if test="cproviderid != null and cproviderid != ''">cproviderid ,</if>
            <if test="cregister != null and cregister != ''">cregister ,</if>
            <if test="csettlepathid != null and csettlepathid != ''">csettlepathid ,</if>
            <if test="ctrancustid != null and ctrancustid != ''">ctrancustid ,</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">cwarehouseid ,</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">cwastewarehouseid ,</if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">cwhsmanagerid ,</if>
            <if test="daccountdate != null and daccountdate != ''">daccountdate ,</if>
            <if test="dauditdate != null and dauditdate != ''">dauditdate ,</if>
            <if test="dbilldate != null and dbilldate != ''">dbilldate ,</if>
            <if test="dr != null">dr ,</if>
            <if test="fallocflag != null">fallocflag ,</if>
            <if test="fbillflag != null">fbillflag ,</if>
            <if test="freplenishflag != null and freplenishflag != ''">freplenishflag ,</if>
            <if test="fspecialflag != null">fspecialflag ,</if>
            <if test="iprintcount != null">iprintcount ,</if>
            <if test="ndiscountmny != null">ndiscountmny ,</if>
            <if test="nnetmny != null">nnetmny ,</if>
            <if test="ntotalmny != null">ntotalmny ,</if>
            <if test="ntotalnum != null">ntotalnum ,</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">outsourcewarehouseid ,</if>
            <if test="pkCalbody != null and pkCalbody != ''">pk_calbody ,</if>
            <if test="pkCorp != null and pkCorp != ''">pk_corp ,</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">pk_cubasdoc ,</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">pk_cubasdocc ,</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="pkMeasware != null and pkMeasware != ''">pk_measware ,</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">pk_purcorp ,</if>
            <if test="taccounttime != null and taccounttime != ''">taccounttime ,</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="vbillcode != null and vbillcode != ''">vbillcode ,</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">vdiliveraddress ,</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">vheadnote2 ,</if>
            <if test="vnote != null and vnote != ''">vnote ,</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="bassetcard != null and bassetcard != ''">#{bassetcard} ,</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">#{bdelivedtorm} ,</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">#{bdirecttranflag} ,</if>
            <if test="boutretflag != null and boutretflag != ''">#{boutretflag} ,</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">#{bsalecooppur} ,</if>
            <if test="cauditorid != null and cauditorid != ''">#{cauditorid} ,</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">#{cbilltypecode} ,</if>
            <if test="cbizid != null and cbizid != ''">#{cbizid} ,</if>
            <if test="cbiztype != null and cbiztype != ''">#{cbiztype} ,</if>
            <if test="ccustomerid != null and ccustomerid != ''">#{ccustomerid} ,</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">#{cdilivertypeid} ,</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">#{cdispatcherid} ,</if>
            <if test="cdptid != null and cdptid != ''">#{cdptid} ,</if>
            <if test="cendreportid != null and cendreportid != ''">#{cendreportid} ,</if>
            <if test="cgeneralhid != null and cgeneralhid != ''">#{cgeneralhid} ,</if>
            <if test="cinventoryid != null and cinventoryid != ''">#{cinventoryid} ,</if>
            <if test="clastmodiid != null and clastmodiid != ''">#{clastmodiid} ,</if>
            <if test="coperatorid != null and coperatorid != ''">#{coperatorid} ,</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">#{cothercalbodyid} ,</if>
            <if test="cothercorpid != null and cothercorpid != ''">#{cothercorpid} ,</if>
            <if test="cotherwhid != null and cotherwhid != ''">#{cotherwhid} ,</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">#{coutcalbodyid} ,</if>
            <if test="coutcorpid != null and coutcorpid != ''">#{coutcorpid} ,</if>
            <if test="cproviderid != null and cproviderid != ''">#{cproviderid} ,</if>
            <if test="cregister != null and cregister != ''">#{cregister} ,</if>
            <if test="csettlepathid != null and csettlepathid != ''">#{csettlepathid} ,</if>
            <if test="ctrancustid != null and ctrancustid != ''">#{ctrancustid} ,</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">#{cwarehouseid} ,</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">#{cwastewarehouseid} ,</if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">#{cwhsmanagerid} ,</if>
            <if test="daccountdate != null and daccountdate != ''">#{daccountdate} ,</if>
            <if test="dauditdate != null and dauditdate != ''">#{dauditdate} ,</if>
            <if test="dbilldate != null and dbilldate != ''">#{dbilldate} ,</if>
            <if test="dr != null">#{dr} ,</if>
            <if test="fallocflag != null">#{fallocflag} ,</if>
            <if test="fbillflag != null">#{fbillflag} ,</if>
            <if test="freplenishflag != null and freplenishflag != ''">#{freplenishflag} ,</if>
            <if test="fspecialflag != null">#{fspecialflag} ,</if>
            <if test="iprintcount != null">#{iprintcount} ,</if>
            <if test="ndiscountmny != null">#{ndiscountmny} ,</if>
            <if test="nnetmny != null">#{nnetmny} ,</if>
            <if test="ntotalmny != null">#{ntotalmny} ,</if>
            <if test="ntotalnum != null">#{ntotalnum} ,</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">#{outsourcewarehouseid} ,</if>
            <if test="pkCalbody != null and pkCalbody != ''">#{pkCalbody} ,</if>
            <if test="pkCorp != null and pkCorp != ''">#{pkCorp} ,</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">#{pkCubasdoc} ,</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">#{pkCubasdocc} ,</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="pkMeasware != null and pkMeasware != ''">#{pkMeasware} ,</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">#{pkPurcorp} ,</if>
            <if test="taccounttime != null and taccounttime != ''">#{taccounttime} ,</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="vbillcode != null and vbillcode != ''">#{vbillcode} ,</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">#{vdiliveraddress} ,</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">#{vheadnote2} ,</if>
            <if test="vnote != null and vnote != ''">#{vnote} ,</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_general_h a WHERE a.sts =
                'Y' ),
            </if>
            <if test="sts == null ">'Y',</if>
        </trim>
        )
    </insert>
    <!-- 批量新增 -->
    <insert id="entityInsertBatch" keyProperty="cgeneralhid" useGeneratedKeys="true">
        insert into ic_general_h(bassetcard, bdelivedtorm, bdirecttranflag, boutretflag, bsalecooppur, cauditorid,
        cbilltypecode, cbizid, cbiztype, ccustomerid, cdilivertypeid, cdispatcherid, cdptid, cendreportid, cinventoryid,
        clastmodiid, coperatorid, cothercalbodyid, cothercorpid, cotherwhid, coutcalbodyid, coutcorpid, cproviderid,
        cregister, csettlepathid, ctrancustid, cwarehouseid, cwastewarehouseid, cwhsmanagerid, daccountdate, dauditdate,
        dbilldate, dr, fallocflag, fbillflag, freplenishflag, fspecialflag, iprintcount, ndiscountmny, nnetmny,
        ntotalmny, ntotalnum, outsourcewarehouseid, pk_calbody, pk_corp, pk_cubasdoc, pk_cubasdocc, 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, pk_measware, pk_purcorp, taccounttime, tlastmoditime, tmaketime, ts, vbillcode,
        vdiliveraddress, vheadnote2, vnote, 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.bassetcard},#{entity.bdelivedtorm},#{entity.bdirecttranflag},#{entity.boutretflag},#{entity.bsalecooppur},#{entity.cauditorid},#{entity.cbilltypecode},#{entity.cbizid},#{entity.cbiztype},#{entity.ccustomerid},#{entity.cdilivertypeid},#{entity.cdispatcherid},#{entity.cdptid},#{entity.cendreportid},#{entity.cinventoryid},#{entity.clastmodiid},#{entity.coperatorid},#{entity.cothercalbodyid},#{entity.cothercorpid},#{entity.cotherwhid},#{entity.coutcalbodyid},#{entity.coutcorpid},#{entity.cproviderid},#{entity.cregister},#{entity.csettlepathid},#{entity.ctrancustid},#{entity.cwarehouseid},#{entity.cwastewarehouseid},#{entity.cwhsmanagerid},#{entity.daccountdate},#{entity.dauditdate},#{entity.dbilldate},#{entity.dr},#{entity.fallocflag},#{entity.fbillflag},#{entity.freplenishflag},#{entity.fspecialflag},#{entity.iprintcount},#{entity.ndiscountmny},#{entity.nnetmny},#{entity.ntotalmny},#{entity.ntotalnum},#{entity.outsourcewarehouseid},#{entity.pkCalbody},#{entity.pkCorp},#{entity.pkCubasdoc},#{entity.pkCubasdocc},#{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.pkMeasware},#{entity.pkPurcorp},#{entity.taccounttime},#{entity.tlastmoditime},#{entity.tmaketime},#{entity.ts},#{entity.vbillcode},#{entity.vdiliveraddress},#{entity.vheadnote2},#{entity.vnote},#{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="cgeneralhid" useGeneratedKeys="true">
        insert into ic_general_h(bassetcard, bdelivedtorm, bdirecttranflag, boutretflag, bsalecooppur, cauditorid,
        cbilltypecode, cbizid, cbiztype, ccustomerid, cdilivertypeid, cdispatcherid, cdptid, cendreportid, cinventoryid,
        clastmodiid, coperatorid, cothercalbodyid, cothercorpid, cotherwhid, coutcalbodyid, coutcorpid, cproviderid,
        cregister, csettlepathid, ctrancustid, cwarehouseid, cwastewarehouseid, cwhsmanagerid, daccountdate, dauditdate,
        dbilldate, dr, fallocflag, fbillflag, freplenishflag, fspecialflag, iprintcount, ndiscountmny, nnetmny,
        ntotalmny, ntotalnum, outsourcewarehouseid, pk_calbody, pk_corp, pk_cubasdoc, pk_cubasdocc, 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, pk_measware, pk_purcorp, taccounttime, tlastmoditime, tmaketime, ts, vbillcode,
        vdiliveraddress, vheadnote2, vnote, 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.bassetcard},#{entity.bdelivedtorm},#{entity.bdirecttranflag},#{entity.boutretflag},#{entity.bsalecooppur},#{entity.cauditorid},#{entity.cbilltypecode},#{entity.cbizid},#{entity.cbiztype},#{entity.ccustomerid},#{entity.cdilivertypeid},#{entity.cdispatcherid},#{entity.cdptid},#{entity.cendreportid},#{entity.cinventoryid},#{entity.clastmodiid},#{entity.coperatorid},#{entity.cothercalbodyid},#{entity.cothercorpid},#{entity.cotherwhid},#{entity.coutcalbodyid},#{entity.coutcorpid},#{entity.cproviderid},#{entity.cregister},#{entity.csettlepathid},#{entity.ctrancustid},#{entity.cwarehouseid},#{entity.cwastewarehouseid},#{entity.cwhsmanagerid},#{entity.daccountdate},#{entity.dauditdate},#{entity.dbilldate},#{entity.dr},#{entity.fallocflag},#{entity.fbillflag},#{entity.freplenishflag},#{entity.fspecialflag},#{entity.iprintcount},#{entity.ndiscountmny},#{entity.nnetmny},#{entity.ntotalmny},#{entity.ntotalnum},#{entity.outsourcewarehouseid},#{entity.pkCalbody},#{entity.pkCorp},#{entity.pkCubasdoc},#{entity.pkCubasdocc},#{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.pkMeasware},#{entity.pkPurcorp},#{entity.taccounttime},#{entity.tlastmoditime},#{entity.tmaketime},#{entity.ts},#{entity.vbillcode},#{entity.vdiliveraddress},#{entity.vheadnote2},#{entity.vnote},#{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
        bassetcard = values(bassetcard),
        bdelivedtorm = values(bdelivedtorm),
        bdirecttranflag = values(bdirecttranflag),
        boutretflag = values(boutretflag),
        bsalecooppur = values(bsalecooppur),
        cauditorid = values(cauditorid),
        cbilltypecode = values(cbilltypecode),
        cbizid = values(cbizid),
        cbiztype = values(cbiztype),
        ccustomerid = values(ccustomerid),
        cdilivertypeid = values(cdilivertypeid),
        cdispatcherid = values(cdispatcherid),
        cdptid = values(cdptid),
        cendreportid = values(cendreportid),
        cinventoryid = values(cinventoryid),
        clastmodiid = values(clastmodiid),
        coperatorid = values(coperatorid),
        cothercalbodyid = values(cothercalbodyid),
        cothercorpid = values(cothercorpid),
        cotherwhid = values(cotherwhid),
        coutcalbodyid = values(coutcalbodyid),
        coutcorpid = values(coutcorpid),
        cproviderid = values(cproviderid),
        cregister = values(cregister),
        csettlepathid = values(csettlepathid),
        ctrancustid = values(ctrancustid),
        cwarehouseid = values(cwarehouseid),
        cwastewarehouseid = values(cwastewarehouseid),
        cwhsmanagerid = values(cwhsmanagerid),
        daccountdate = values(daccountdate),
        dauditdate = values(dauditdate),
        dbilldate = values(dbilldate),
        dr = values(dr),
        fallocflag = values(fallocflag),
        fbillflag = values(fbillflag),
        freplenishflag = values(freplenishflag),
        fspecialflag = values(fspecialflag),
        iprintcount = values(iprintcount),
        ndiscountmny = values(ndiscountmny),
        nnetmny = values(nnetmny),
        ntotalmny = values(ntotalmny),
        ntotalnum = values(ntotalnum),
        outsourcewarehouseid = values(outsourcewarehouseid),
        pk_calbody = values(pk_calbody),
        pk_corp = values(pk_corp),
        pk_cubasdoc = values(pk_cubasdoc),
        pk_cubasdocc = values(pk_cubasdocc),
        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),
        pk_measware = values(pk_measware),
        pk_purcorp = values(pk_purcorp),
        taccounttime = values(taccounttime),
        tlastmoditime = values(tlastmoditime),
        tmaketime = values(tmaketime),
        ts = values(ts),
        vbillcode = values(vbillcode),
        vdiliveraddress = values(vdiliveraddress),
        vheadnote2 = values(vheadnote2),
        vnote = values(vnote),
        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.IcGeneralHEntity">
        update ic_general_h set
        <trim suffix="" suffixOverrides=",">
            <if test="bassetcard != null and bassetcard != ''">bassetcard = #{bassetcard},</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">bdelivedtorm = #{bdelivedtorm},</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">bdirecttranflag = #{bdirecttranflag},</if>
            <if test="boutretflag != null and boutretflag != ''">boutretflag = #{boutretflag},</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">bsalecooppur = #{bsalecooppur},</if>
            <if test="cauditorid != null and cauditorid != ''">cauditorid = #{cauditorid},</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">cbilltypecode = #{cbilltypecode},</if>
            <if test="cbizid != null and cbizid != ''">cbizid = #{cbizid},</if>
            <if test="cbiztype != null and cbiztype != ''">cbiztype = #{cbiztype},</if>
            <if test="ccustomerid != null and ccustomerid != ''">ccustomerid = #{ccustomerid},</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">cdilivertypeid = #{cdilivertypeid},</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">cdispatcherid = #{cdispatcherid},</if>
            <if test="cdptid != null and cdptid != ''">cdptid = #{cdptid},</if>
            <if test="cendreportid != null and cendreportid != ''">cendreportid = #{cendreportid},</if>
            <if test="cinventoryid != null and cinventoryid != ''">cinventoryid = #{cinventoryid},</if>
            <if test="clastmodiid != null and clastmodiid != ''">clastmodiid = #{clastmodiid},</if>
            <if test="coperatorid != null and coperatorid != ''">coperatorid = #{coperatorid},</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">cothercalbodyid = #{cothercalbodyid},</if>
            <if test="cothercorpid != null and cothercorpid != ''">cothercorpid = #{cothercorpid},</if>
            <if test="cotherwhid != null and cotherwhid != ''">cotherwhid = #{cotherwhid},</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">coutcalbodyid = #{coutcalbodyid},</if>
            <if test="coutcorpid != null and coutcorpid != ''">coutcorpid = #{coutcorpid},</if>
            <if test="cproviderid != null and cproviderid != ''">cproviderid = #{cproviderid},</if>
            <if test="cregister != null and cregister != ''">cregister = #{cregister},</if>
            <if test="csettlepathid != null and csettlepathid != ''">csettlepathid = #{csettlepathid},</if>
            <if test="ctrancustid != null and ctrancustid != ''">ctrancustid = #{ctrancustid},</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">cwarehouseid = #{cwarehouseid},</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">cwastewarehouseid = #{cwastewarehouseid},
            </if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">cwhsmanagerid = #{cwhsmanagerid},</if>
            <if test="daccountdate != null and daccountdate != ''">daccountdate = #{daccountdate},</if>
            <if test="dauditdate != null and dauditdate != ''">dauditdate = #{dauditdate},</if>
            <if test="dbilldate != null and dbilldate != ''">dbilldate = #{dbilldate},</if>
            <if test="dr != null">dr = #{dr},</if>
            <if test="fallocflag != null">fallocflag = #{fallocflag},</if>
            <if test="fbillflag != null">fbillflag = #{fbillflag},</if>
            <if test="freplenishflag != null and freplenishflag != ''">freplenishflag = #{freplenishflag},</if>
            <if test="fspecialflag != null">fspecialflag = #{fspecialflag},</if>
            <if test="iprintcount != null">iprintcount = #{iprintcount},</if>
            <if test="ndiscountmny != null">ndiscountmny = #{ndiscountmny},</if>
            <if test="nnetmny != null">nnetmny = #{nnetmny},</if>
            <if test="ntotalmny != null">ntotalmny = #{ntotalmny},</if>
            <if test="ntotalnum != null">ntotalnum = #{ntotalnum},</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">outsourcewarehouseid =
                #{outsourcewarehouseid},
            </if>
            <if test="pkCalbody != null and pkCalbody != ''">pk_calbody = #{pkCalbody},</if>
            <if test="pkCorp != null and pkCorp != ''">pk_corp = #{pkCorp},</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">pk_cubasdoc = #{pkCubasdoc},</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">pk_cubasdocc = #{pkCubasdocc},</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="pkMeasware != null and pkMeasware != ''">pk_measware = #{pkMeasware},</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">pk_purcorp = #{pkPurcorp},</if>
            <if test="taccounttime != null and taccounttime != ''">taccounttime = #{taccounttime},</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="vbillcode != null and vbillcode != ''">vbillcode = #{vbillcode},</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">vdiliveraddress = #{vdiliveraddress},</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">vheadnote2 = #{vheadnote2},</if>
            <if test="vnote != null and vnote != ''">vnote = #{vnote},</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 cgeneralhid = #{cgeneralhid}
    </update>
    <!-- 逻辑删除 -->
    <update id="entity_logicDelete" parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        update ic_general_h
        set sts= 'N',
            modify_time = #{modify_time},
            modify_user_id = #{modify_user_id}
        where cgeneralhid = #{cgeneralhid}
    </update>
    <!-- 多条件逻辑删除 -->
    <update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.plugin.lets.entity.IcGeneralHEntity">
        update ic_general_h set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id}
        <trim prefix="where" prefixOverrides="and">
            <if test="bassetcard != null and bassetcard != ''">and bassetcard = #{bassetcard}</if>
            <if test="bdelivedtorm != null and bdelivedtorm != ''">and bdelivedtorm = #{bdelivedtorm}</if>
            <if test="bdirecttranflag != null and bdirecttranflag != ''">and bdirecttranflag = #{bdirecttranflag}</if>
            <if test="boutretflag != null and boutretflag != ''">and boutretflag = #{boutretflag}</if>
            <if test="bsalecooppur != null and bsalecooppur != ''">and bsalecooppur = #{bsalecooppur}</if>
            <if test="cauditorid != null and cauditorid != ''">and cauditorid = #{cauditorid}</if>
            <if test="cbilltypecode != null and cbilltypecode != ''">and cbilltypecode = #{cbilltypecode}</if>
            <if test="cbizid != null and cbizid != ''">and cbizid = #{cbizid}</if>
            <if test="cbiztype != null and cbiztype != ''">and cbiztype = #{cbiztype}</if>
            <if test="ccustomerid != null and ccustomerid != ''">and ccustomerid = #{ccustomerid}</if>
            <if test="cdilivertypeid != null and cdilivertypeid != ''">and cdilivertypeid = #{cdilivertypeid}</if>
            <if test="cdispatcherid != null and cdispatcherid != ''">and cdispatcherid = #{cdispatcherid}</if>
            <if test="cdptid != null and cdptid != ''">and cdptid = #{cdptid}</if>
            <if test="cendreportid != null and cendreportid != ''">and cendreportid = #{cendreportid}</if>
            <if test="cgeneralhid != null and cgeneralhid != ''">and cgeneralhid = #{cgeneralhid}</if>
            <if test="cinventoryid != null and cinventoryid != ''">and cinventoryid = #{cinventoryid}</if>
            <if test="clastmodiid != null and clastmodiid != ''">and clastmodiid = #{clastmodiid}</if>
            <if test="coperatorid != null and coperatorid != ''">and coperatorid = #{coperatorid}</if>
            <if test="cothercalbodyid != null and cothercalbodyid != ''">and cothercalbodyid = #{cothercalbodyid}</if>
            <if test="cothercorpid != null and cothercorpid != ''">and cothercorpid = #{cothercorpid}</if>
            <if test="cotherwhid != null and cotherwhid != ''">and cotherwhid = #{cotherwhid}</if>
            <if test="coutcalbodyid != null and coutcalbodyid != ''">and coutcalbodyid = #{coutcalbodyid}</if>
            <if test="coutcorpid != null and coutcorpid != ''">and coutcorpid = #{coutcorpid}</if>
            <if test="cproviderid != null and cproviderid != ''">and cproviderid = #{cproviderid}</if>
            <if test="cregister != null and cregister != ''">and cregister = #{cregister}</if>
            <if test="csettlepathid != null and csettlepathid != ''">and csettlepathid = #{csettlepathid}</if>
            <if test="ctrancustid != null and ctrancustid != ''">and ctrancustid = #{ctrancustid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid = #{cwarehouseid}</if>
            <if test="cwastewarehouseid != null and cwastewarehouseid != ''">and cwastewarehouseid =
                #{cwastewarehouseid}
            </if>
            <if test="cwhsmanagerid != null and cwhsmanagerid != ''">and cwhsmanagerid = #{cwhsmanagerid}</if>
            <if test="daccountdate != null and daccountdate != ''">and daccountdate = #{daccountdate}</if>
            <if test="dauditdate != null and dauditdate != ''">and dauditdate = #{dauditdate}</if>
            <if test="dbilldate != null and dbilldate != ''">and dbilldate = #{dbilldate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="fallocflag != null">and fallocflag = #{fallocflag}</if>
            <if test="fbillflag != null">and fbillflag = #{fbillflag}</if>
            <if test="freplenishflag != null and freplenishflag != ''">and freplenishflag = #{freplenishflag}</if>
            <if test="fspecialflag != null">and fspecialflag = #{fspecialflag}</if>
            <if test="iprintcount != null">and iprintcount = #{iprintcount}</if>
            <if test="ndiscountmny != null">and ndiscountmny = #{ndiscountmny}</if>
            <if test="nnetmny != null">and nnetmny = #{nnetmny}</if>
            <if test="ntotalmny != null">and ntotalmny = #{ntotalmny}</if>
            <if test="ntotalnum != null">and ntotalnum = #{ntotalnum}</if>
            <if test="outsourcewarehouseid != null and outsourcewarehouseid != ''">and outsourcewarehouseid =
                #{outsourcewarehouseid}
            </if>
            <if test="pkCalbody != null and pkCalbody != ''">and pk_calbody = #{pkCalbody}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkCubasdoc != null and pkCubasdoc != ''">and pk_cubasdoc = #{pkCubasdoc}</if>
            <if test="pkCubasdocc != null and pkCubasdocc != ''">and pk_cubasdocc = #{pkCubasdocc}</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="pkMeasware != null and pkMeasware != ''">and pk_measware = #{pkMeasware}</if>
            <if test="pkPurcorp != null and pkPurcorp != ''">and pk_purcorp = #{pkPurcorp}</if>
            <if test="taccounttime != null and taccounttime != ''">and taccounttime = #{taccounttime}</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="vbillcode != null and vbillcode != ''">and vbillcode = #{vbillcode}</if>
            <if test="vdiliveraddress != null and vdiliveraddress != ''">and vdiliveraddress = #{vdiliveraddress}</if>
            <if test="vheadnote2 != null and vheadnote2 != ''">and vheadnote2 = #{vheadnote2}</if>
            <if test="vnote != null and vnote != ''">and vnote = #{vnote}</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_general_h
        where cgeneralhid = #{cgeneralhid}
    </delete>

</mapper>

