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

    <resultMap id="get-PoOrderBEntity-result" type="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        <result property="blargess" column="blargess" jdbcType="VARCHAR"/>
        <result property="breceiveplan" column="breceiveplan" jdbcType="VARCHAR"/>
        <result property="btransclosed" column="btransclosed" jdbcType="VARCHAR"/>
        <result property="cassistunit" column="cassistunit" jdbcType="VARCHAR"/>
        <result property="cbaseid" column="cbaseid" jdbcType="VARCHAR"/>
        <result property="ccloseuserid" column="ccloseuserid" jdbcType="VARCHAR"/>
        <result property="ccontractid" column="ccontractid" jdbcType="VARCHAR"/>
        <result property="ccontractrowid" column="ccontractrowid" jdbcType="VARCHAR"/>
        <result property="ccorrectrowid" column="ccorrectrowid" jdbcType="VARCHAR"/>
        <result property="ccurrencytypeid" column="ccurrencytypeid" jdbcType="VARCHAR"/>
        <result property="cdevaddrid" column="cdevaddrid" jdbcType="VARCHAR"/>
        <result property="cdevareaid" column="cdevareaid" jdbcType="VARCHAR"/>
        <result property="cecbillBid" column="cecbill_bid" jdbcType="VARCHAR"/>
        <result property="cecbillid" column="cecbillid" jdbcType="VARCHAR"/>
        <result property="closingreason" column="closingreason" jdbcType="VARCHAR"/>
        <result property="cmangid" column="cmangid" jdbcType="VARCHAR"/>
        <result property="coperator" column="coperator" jdbcType="VARCHAR"/>
        <result property="corderBid" column="corder_bid" jdbcType="VARCHAR"/>
        <result property="corderid" column="corderid" jdbcType="VARCHAR"/>
        <result property="cpriceauditBb1id" column="cpriceaudit_bb1id" jdbcType="VARCHAR"/>
        <result property="cpriceauditBid" column="cpriceaudit_bid" jdbcType="VARCHAR"/>
        <result property="cpriceauditid" column="cpriceauditid" jdbcType="VARCHAR"/>
        <result property="cprojectid" column="cprojectid" jdbcType="VARCHAR"/>
        <result property="cprojectphaseid" column="cprojectphaseid" jdbcType="VARCHAR"/>
        <result property="cqpbaseschemeid" column="cqpbaseschemeid" jdbcType="VARCHAR"/>
        <result property="crowno" column="crowno" jdbcType="VARCHAR"/>
        <result property="csourcebillid" column="csourcebillid" jdbcType="VARCHAR"/>
        <result property="csourcebilltype" column="csourcebilltype" jdbcType="VARCHAR"/>
        <result property="csourcerowid" column="csourcerowid" jdbcType="VARCHAR"/>
        <result property="cupsourcebillid" column="cupsourcebillid" jdbcType="VARCHAR"/>
        <result property="cupsourcebillrowid" column="cupsourcebillrowid" jdbcType="VARCHAR"/>
        <result property="cupsourcebilltype" column="cupsourcebilltype" jdbcType="VARCHAR"/>
        <result property="cusedeptid" column="cusedeptid" jdbcType="VARCHAR"/>
        <result property="cvenddevaddrid" column="cvenddevaddrid" jdbcType="VARCHAR"/>
        <result property="cvenddevareaid" column="cvenddevareaid" jdbcType="VARCHAR"/>
        <result property="cwarehouseid" column="cwarehouseid" jdbcType="VARCHAR"/>
        <result property="dclosedate" column="dclosedate" jdbcType="VARCHAR"/>
        <result property="dconfirmdate" column="dconfirmdate" jdbcType="VARCHAR"/>
        <result property="dcorrectdate" column="dcorrectdate" jdbcType="VARCHAR"/>
        <result property="dplanarrvdate" column="dplanarrvdate" jdbcType="VARCHAR"/>
        <result property="dr" column="dr" jdbcType="INTEGER"/>
        <result property="forderrowstatus" column="forderrowstatus" jdbcType="INTEGER"/>
        <result property="idiscounttaxtype" column="idiscounttaxtype" jdbcType="INTEGER"/>
        <result property="iisactive" column="iisactive" jdbcType="INTEGER"/>
        <result property="iisreplenish" column="iisreplenish" jdbcType="INTEGER"/>
        <result property="naccumarrvnum" column="naccumarrvnum" jdbcType="VARCHAR"/>
        <result property="naccumdevnum" column="naccumdevnum" jdbcType="VARCHAR"/>
        <result property="naccuminvoicenum" column="naccuminvoicenum" jdbcType="VARCHAR"/>
        <result property="naccumrpnum" column="naccumrpnum" jdbcType="VARCHAR"/>
        <result property="naccumstorenum" column="naccumstorenum" jdbcType="VARCHAR"/>
        <result property="naccumwastnum" column="naccumwastnum" jdbcType="VARCHAR"/>
        <result property="nassistnum" column="nassistnum" jdbcType="VARCHAR"/>
        <result property="nbackarrvnum" column="nbackarrvnum" jdbcType="VARCHAR"/>
        <result property="nbackstorenum" column="nbackstorenum" jdbcType="VARCHAR"/>
        <result property="nconfirmnum" column="nconfirmnum" jdbcType="VARCHAR"/>
        <result property="ndiscountrate" column="ndiscountrate" jdbcType="VARCHAR"/>
        <result property="nexchangeotobrate" column="nexchangeotobrate" jdbcType="VARCHAR"/>
        <result property="nfeemny" column="nfeemny" jdbcType="VARCHAR"/>
        <result property="nmoney" column="nmoney" jdbcType="VARCHAR"/>
        <result property="nordernum" column="nordernum" jdbcType="VARCHAR"/>
        <result property="norgnettaxprice" column="norgnettaxprice" jdbcType="VARCHAR"/>
        <result property="norgtaxprice" column="norgtaxprice" jdbcType="VARCHAR"/>
        <result property="noriginalcurmny" column="noriginalcurmny" jdbcType="VARCHAR"/>
        <result property="noriginalcurprice" column="noriginalcurprice" jdbcType="VARCHAR"/>
        <result property="noriginalnetprice" column="noriginalnetprice" jdbcType="VARCHAR"/>
        <result property="noriginaltaxmny" column="noriginaltaxmny" jdbcType="VARCHAR"/>
        <result property="noriginaltaxpricemny" column="noriginaltaxpricemny" jdbcType="VARCHAR"/>
        <result property="ntaxmny" column="ntaxmny" jdbcType="VARCHAR"/>
        <result property="ntaxpricemny" column="ntaxpricemny" jdbcType="VARCHAR"/>
        <result property="ntaxrate" column="ntaxrate" jdbcType="VARCHAR"/>
        <result property="pkArrvcorp" column="pk_arrvcorp" jdbcType="VARCHAR"/>
        <result property="pkArrvstoorg" column="pk_arrvstoorg" jdbcType="VARCHAR"/>
        <result property="pkCorp" column="pk_corp" jdbcType="VARCHAR"/>
        <result property="pkCreqwareid" column="pk_creqwareid" 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="pkInvoicecorp" column="pk_invoicecorp" jdbcType="VARCHAR"/>
        <result property="pkReqcorp" column="pk_reqcorp" jdbcType="VARCHAR"/>
        <result property="pkReqstoorg" column="pk_reqstoorg" jdbcType="VARCHAR"/>
        <result property="pkUpsrccorp" column="pk_upsrccorp" jdbcType="VARCHAR"/>
        <result property="ts" column="ts" jdbcType="VARCHAR"/>
        <result property="vdef1" column="vdef1" jdbcType="VARCHAR"/>
        <result property="vdef10" column="vdef10" jdbcType="VARCHAR"/>
        <result property="vdef11" column="vdef11" jdbcType="VARCHAR"/>
        <result property="vdef12" column="vdef12" jdbcType="VARCHAR"/>
        <result property="vdef13" column="vdef13" jdbcType="VARCHAR"/>
        <result property="vdef14" column="vdef14" jdbcType="VARCHAR"/>
        <result property="vdef15" column="vdef15" jdbcType="VARCHAR"/>
        <result property="vdef16" column="vdef16" jdbcType="VARCHAR"/>
        <result property="vdef17" column="vdef17" jdbcType="VARCHAR"/>
        <result property="vdef18" column="vdef18" jdbcType="VARCHAR"/>
        <result property="vdef19" column="vdef19" jdbcType="VARCHAR"/>
        <result property="vdef2" column="vdef2" jdbcType="VARCHAR"/>
        <result property="vdef20" column="vdef20" jdbcType="VARCHAR"/>
        <result property="vdef3" column="vdef3" jdbcType="VARCHAR"/>
        <result property="vdef4" column="vdef4" jdbcType="VARCHAR"/>
        <result property="vdef5" column="vdef5" jdbcType="VARCHAR"/>
        <result property="vdef6" column="vdef6" jdbcType="VARCHAR"/>
        <result property="vdef7" column="vdef7" jdbcType="VARCHAR"/>
        <result property="vdef8" column="vdef8" jdbcType="VARCHAR"/>
        <result property="vdef9" column="vdef9" jdbcType="VARCHAR"/>
        <result property="vecbilltype" column="vecbilltype" jdbcType="VARCHAR"/>
        <result property="vfree1" column="vfree1" jdbcType="VARCHAR"/>
        <result property="vfree2" column="vfree2" jdbcType="VARCHAR"/>
        <result property="vfree3" column="vfree3" jdbcType="VARCHAR"/>
        <result property="vfree4" column="vfree4" jdbcType="VARCHAR"/>
        <result property="vfree5" column="vfree5" jdbcType="VARCHAR"/>
        <result property="vmemo" column="vmemo" jdbcType="VARCHAR"/>
        <result property="vpriceauditcode" column="vpriceauditcode" jdbcType="VARCHAR"/>
        <result property="vproducenum" column="vproducenum" jdbcType="VARCHAR"/>
        <result property="vreceiveaddress" column="vreceiveaddress" jdbcType="VARCHAR"/>
        <result property="vvenddevaddr" column="vvenddevaddr" jdbcType="VARCHAR"/>
        <result property="vvendinventorycode" column="vvendinventorycode" jdbcType="VARCHAR"/>
        <result property="vvendinventoryname" column="vvendinventoryname" jdbcType="VARCHAR"/>
        <result property="vvendorordercode" column="vvendorordercode" jdbcType="VARCHAR"/>
        <result property="vvendororderrow" column="vvendororderrow" jdbcType="VARCHAR"/>
    </resultMap>
    <!-- 查询的字段-->
    <sql id="PoOrderBEntity_Base_Column_List">
        blargess
        ,breceiveplan
        ,btransclosed 
        ,cassistunit 
        ,cbaseid 
        ,ccloseuserid 
        ,ccontractid 
        ,ccontractrowid 
        ,ccorrectrowid 
        ,ccurrencytypeid 
        ,cdevaddrid 
        ,cdevareaid 
        ,cecbill_bid 
        ,cecbillid 
        ,closingreason 
        ,cmangid 
        ,coperator 
        ,corder_bid 
        ,corderid 
        ,cpriceaudit_bb1id 
        ,cpriceaudit_bid 
        ,cpriceauditid 
        ,cprojectid 
        ,cprojectphaseid 
        ,cqpbaseschemeid 
        ,crowno 
        ,csourcebillid 
        ,csourcebilltype 
        ,csourcerowid 
        ,cupsourcebillid 
        ,cupsourcebillrowid 
        ,cupsourcebilltype 
        ,cusedeptid 
        ,cvenddevaddrid 
        ,cvenddevareaid 
        ,cwarehouseid 
        ,dclosedate 
        ,dconfirmdate 
        ,dcorrectdate 
        ,dplanarrvdate 
        ,dr 
        ,forderrowstatus 
        ,idiscounttaxtype 
        ,iisactive 
        ,iisreplenish 
        ,naccumarrvnum 
        ,naccumdevnum 
        ,naccuminvoicenum 
        ,naccumrpnum 
        ,naccumstorenum 
        ,naccumwastnum 
        ,nassistnum 
        ,nbackarrvnum 
        ,nbackstorenum 
        ,nconfirmnum 
        ,ndiscountrate 
        ,nexchangeotobrate 
        ,nfeemny 
        ,nmoney 
        ,nordernum 
        ,norgnettaxprice 
        ,norgtaxprice 
        ,noriginalcurmny 
        ,noriginalcurprice 
        ,noriginalnetprice 
        ,noriginaltaxmny 
        ,noriginaltaxpricemny 
        ,ntaxmny 
        ,ntaxpricemny 
        ,ntaxrate 
        ,pk_arrvcorp 
        ,pk_arrvstoorg 
        ,pk_corp 
        ,pk_creqwareid 
        ,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_invoicecorp 
        ,pk_reqcorp 
        ,pk_reqstoorg 
        ,pk_upsrccorp 
        ,ts 
        ,vdef1 
        ,vdef10 
        ,vdef11 
        ,vdef12 
        ,vdef13 
        ,vdef14 
        ,vdef15 
        ,vdef16 
        ,vdef17 
        ,vdef18 
        ,vdef19 
        ,vdef2 
        ,vdef20 
        ,vdef3 
        ,vdef4 
        ,vdef5 
        ,vdef6 
        ,vdef7 
        ,vdef8 
        ,vdef9 
        ,vecbilltype 
        ,vfree1 
        ,vfree2 
        ,vfree3 
        ,vfree4 
        ,vfree5 
        ,vmemo 
        ,vpriceauditcode 
        ,vproducenum 
        ,vreceiveaddress 
        ,vvenddevaddr 
        ,vvendinventorycode 
        ,vvendinventoryname 
        ,vvendorordercode 
        ,vvendororderrow
    </sql>
    <!-- 查询 采用==查询 -->
    <select id="entity_list_base" resultMap="get-PoOrderBEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        select
        <include refid="PoOrderBEntity_Base_Column_List"/>
        from po_order_b
        <trim prefix="where" prefixOverrides="and">
            <if test="blargess != null and blargess != ''">and blargess = #{blargess}</if>
            <if test="breceiveplan != null and breceiveplan != ''">and breceiveplan = #{breceiveplan}</if>
            <if test="btransclosed != null and btransclosed != ''">and btransclosed = #{btransclosed}</if>
            <if test="cassistunit != null and cassistunit != ''">and cassistunit = #{cassistunit}</if>
            <if test="cbaseid != null and cbaseid != ''">and cbaseid = #{cbaseid}</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">and ccloseuserid = #{ccloseuserid}</if>
            <if test="ccontractid != null and ccontractid != ''">and ccontractid = #{ccontractid}</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">and ccontractrowid = #{ccontractrowid}</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">and ccorrectrowid = #{ccorrectrowid}</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">and ccurrencytypeid = #{ccurrencytypeid}</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">and cdevaddrid = #{cdevaddrid}</if>
            <if test="cdevareaid != null and cdevareaid != ''">and cdevareaid = #{cdevareaid}</if>
            <if test="cecbillBid != null and cecbillBid != ''">and cecbill_bid = #{cecbillBid}</if>
            <if test="cecbillid != null and cecbillid != ''">and cecbillid = #{cecbillid}</if>
            <if test="closingreason != null and closingreason != ''">and closingreason = #{closingreason}</if>
            <if test="cmangid != null and cmangid != ''">and cmangid = #{cmangid}</if>
            <if test="coperator != null and coperator != ''">and coperator = #{coperator}</if>
            <if test="corderBid != null and corderBid != ''">and corder_bid = #{corderBid}</if>
            <if test="corderid != null and corderid != ''">and corderid = #{corderid}</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">and cpriceaudit_bb1id = #{cpriceauditBb1id}</if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">and cpriceaudit_bid = #{cpriceauditBid}</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">and cpriceauditid = #{cpriceauditid}</if>
            <if test="cprojectid != null and cprojectid != ''">and cprojectid = #{cprojectid}</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">and cprojectphaseid = #{cprojectphaseid}</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">and cqpbaseschemeid = #{cqpbaseschemeid}</if>
            <if test="crowno != null and crowno != ''">and crowno = #{crowno}</if>
            <if test="csourcebillid != null and csourcebillid != ''">and csourcebillid = #{csourcebillid}</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">and csourcebilltype = #{csourcebilltype}</if>
            <if test="csourcerowid != null and csourcerowid != ''">and csourcerowid = #{csourcerowid}</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">and cupsourcebillid = #{cupsourcebillid}</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">and cupsourcebillrowid =
                #{cupsourcebillrowid}
            </if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">and cupsourcebilltype =
                #{cupsourcebilltype}
            </if>
            <if test="cusedeptid != null and cusedeptid != ''">and cusedeptid = #{cusedeptid}</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">and cvenddevaddrid = #{cvenddevaddrid}</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">and cvenddevareaid = #{cvenddevareaid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid = #{cwarehouseid}</if>
            <if test="dclosedate != null and dclosedate != ''">and dclosedate = #{dclosedate}</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">and dconfirmdate = #{dconfirmdate}</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">and dcorrectdate = #{dcorrectdate}</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">and dplanarrvdate = #{dplanarrvdate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="forderrowstatus != null">and forderrowstatus = #{forderrowstatus}</if>
            <if test="idiscounttaxtype != null">and idiscounttaxtype = #{idiscounttaxtype}</if>
            <if test="iisactive != null">and iisactive = #{iisactive}</if>
            <if test="iisreplenish != null">and iisreplenish = #{iisreplenish}</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">and naccumarrvnum = #{naccumarrvnum}</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">and naccumdevnum = #{naccumdevnum}</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">and naccuminvoicenum = #{naccuminvoicenum}
            </if>
            <if test="naccumrpnum != null and naccumrpnum != ''">and naccumrpnum = #{naccumrpnum}</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">and naccumstorenum = #{naccumstorenum}</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">and naccumwastnum = #{naccumwastnum}</if>
            <if test="nassistnum != null and nassistnum != ''">and nassistnum = #{nassistnum}</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">and nbackarrvnum = #{nbackarrvnum}</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">and nbackstorenum = #{nbackstorenum}</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">and nconfirmnum = #{nconfirmnum}</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">and ndiscountrate = #{ndiscountrate}</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">and nexchangeotobrate =
                #{nexchangeotobrate}
            </if>
            <if test="nfeemny != null and nfeemny != ''">and nfeemny = #{nfeemny}</if>
            <if test="nmoney != null and nmoney != ''">and nmoney = #{nmoney}</if>
            <if test="nordernum != null and nordernum != ''">and nordernum = #{nordernum}</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">and norgnettaxprice = #{norgnettaxprice}</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">and norgtaxprice = #{norgtaxprice}</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">and noriginalcurmny = #{noriginalcurmny}</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">and noriginalcurprice =
                #{noriginalcurprice}
            </if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">and noriginalnetprice =
                #{noriginalnetprice}
            </if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">and noriginaltaxmny = #{noriginaltaxmny}</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">and noriginaltaxpricemny =
                #{noriginaltaxpricemny}
            </if>
            <if test="ntaxmny != null and ntaxmny != ''">and ntaxmny = #{ntaxmny}</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">and ntaxpricemny = #{ntaxpricemny}</if>
            <if test="ntaxrate != null and ntaxrate != ''">and ntaxrate = #{ntaxrate}</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">and pk_arrvcorp = #{pkArrvcorp}</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">and pk_arrvstoorg = #{pkArrvstoorg}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">and pk_creqwareid = #{pkCreqwareid}</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="pkInvoicecorp != null and pkInvoicecorp != ''">and pk_invoicecorp = #{pkInvoicecorp}</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">and pk_reqcorp = #{pkReqcorp}</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">and pk_reqstoorg = #{pkReqstoorg}</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">and pk_upsrccorp = #{pkUpsrccorp}</if>
            <if test="ts != null and ts != ''">and ts = #{ts}</if>
            <if test="vdef1 != null and vdef1 != ''">and vdef1 = #{vdef1}</if>
            <if test="vdef10 != null and vdef10 != ''">and vdef10 = #{vdef10}</if>
            <if test="vdef11 != null and vdef11 != ''">and vdef11 = #{vdef11}</if>
            <if test="vdef12 != null and vdef12 != ''">and vdef12 = #{vdef12}</if>
            <if test="vdef13 != null and vdef13 != ''">and vdef13 = #{vdef13}</if>
            <if test="vdef14 != null and vdef14 != ''">and vdef14 = #{vdef14}</if>
            <if test="vdef15 != null and vdef15 != ''">and vdef15 = #{vdef15}</if>
            <if test="vdef16 != null and vdef16 != ''">and vdef16 = #{vdef16}</if>
            <if test="vdef17 != null and vdef17 != ''">and vdef17 = #{vdef17}</if>
            <if test="vdef18 != null and vdef18 != ''">and vdef18 = #{vdef18}</if>
            <if test="vdef19 != null and vdef19 != ''">and vdef19 = #{vdef19}</if>
            <if test="vdef2 != null and vdef2 != ''">and vdef2 = #{vdef2}</if>
            <if test="vdef20 != null and vdef20 != ''">and vdef20 = #{vdef20}</if>
            <if test="vdef3 != null and vdef3 != ''">and vdef3 = #{vdef3}</if>
            <if test="vdef4 != null and vdef4 != ''">and vdef4 = #{vdef4}</if>
            <if test="vdef5 != null and vdef5 != ''">and vdef5 = #{vdef5}</if>
            <if test="vdef6 != null and vdef6 != ''">and vdef6 = #{vdef6}</if>
            <if test="vdef7 != null and vdef7 != ''">and vdef7 = #{vdef7}</if>
            <if test="vdef8 != null and vdef8 != ''">and vdef8 = #{vdef8}</if>
            <if test="vdef9 != null and vdef9 != ''">and vdef9 = #{vdef9}</if>
            <if test="vecbilltype != null and vecbilltype != ''">and vecbilltype = #{vecbilltype}</if>
            <if test="vfree1 != null and vfree1 != ''">and vfree1 = #{vfree1}</if>
            <if test="vfree2 != null and vfree2 != ''">and vfree2 = #{vfree2}</if>
            <if test="vfree3 != null and vfree3 != ''">and vfree3 = #{vfree3}</if>
            <if test="vfree4 != null and vfree4 != ''">and vfree4 = #{vfree4}</if>
            <if test="vfree5 != null and vfree5 != ''">and vfree5 = #{vfree5}</if>
            <if test="vmemo != null and vmemo != ''">and vmemo = #{vmemo}</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">and vpriceauditcode = #{vpriceauditcode}</if>
            <if test="vproducenum != null and vproducenum != ''">and vproducenum = #{vproducenum}</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">and vreceiveaddress = #{vreceiveaddress}</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">and vvenddevaddr = #{vvenddevaddr}</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">and vvendinventorycode =
                #{vvendinventorycode}
            </if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">and vvendinventoryname =
                #{vvendinventoryname}
            </if>
            <if test="vvendorordercode != null and vvendorordercode != ''">and vvendorordercode = #{vvendorordercode}
            </if>
            <if test="vvendororderrow != null and vvendororderrow != ''">and vvendororderrow = #{vvendororderrow}</if>
        </trim>
        <if test=" sort == ''.toString() ">order by sorts asc</if>
        <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
    </select>

    <!-- 查询符合条件的数量 -->
    <select id="entity_count" resultType="Integer" parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        select count(1) from po_order_b
        <trim prefix="where" prefixOverrides="and">
            <if test="blargess != null and blargess != ''">and blargess = #{blargess}</if>
            <if test="breceiveplan != null and breceiveplan != ''">and breceiveplan = #{breceiveplan}</if>
            <if test="btransclosed != null and btransclosed != ''">and btransclosed = #{btransclosed}</if>
            <if test="cassistunit != null and cassistunit != ''">and cassistunit = #{cassistunit}</if>
            <if test="cbaseid != null and cbaseid != ''">and cbaseid = #{cbaseid}</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">and ccloseuserid = #{ccloseuserid}</if>
            <if test="ccontractid != null and ccontractid != ''">and ccontractid = #{ccontractid}</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">and ccontractrowid = #{ccontractrowid}</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">and ccorrectrowid = #{ccorrectrowid}</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">and ccurrencytypeid = #{ccurrencytypeid}</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">and cdevaddrid = #{cdevaddrid}</if>
            <if test="cdevareaid != null and cdevareaid != ''">and cdevareaid = #{cdevareaid}</if>
            <if test="cecbillBid != null and cecbillBid != ''">and cecbill_bid = #{cecbillBid}</if>
            <if test="cecbillid != null and cecbillid != ''">and cecbillid = #{cecbillid}</if>
            <if test="closingreason != null and closingreason != ''">and closingreason = #{closingreason}</if>
            <if test="cmangid != null and cmangid != ''">and cmangid = #{cmangid}</if>
            <if test="coperator != null and coperator != ''">and coperator = #{coperator}</if>
            <if test="corderBid != null and corderBid != ''">and corder_bid = #{corderBid}</if>
            <if test="corderid != null and corderid != ''">and corderid = #{corderid}</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">and cpriceaudit_bb1id = #{cpriceauditBb1id}
            </if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">and cpriceaudit_bid = #{cpriceauditBid}</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">and cpriceauditid = #{cpriceauditid}</if>
            <if test="cprojectid != null and cprojectid != ''">and cprojectid = #{cprojectid}</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">and cprojectphaseid = #{cprojectphaseid}</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">and cqpbaseschemeid = #{cqpbaseschemeid}</if>
            <if test="crowno != null and crowno != ''">and crowno = #{crowno}</if>
            <if test="csourcebillid != null and csourcebillid != ''">and csourcebillid = #{csourcebillid}</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">and csourcebilltype = #{csourcebilltype}</if>
            <if test="csourcerowid != null and csourcerowid != ''">and csourcerowid = #{csourcerowid}</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">and cupsourcebillid = #{cupsourcebillid}</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">and cupsourcebillrowid =
                #{cupsourcebillrowid}
            </if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">and cupsourcebilltype =
                #{cupsourcebilltype}
            </if>
            <if test="cusedeptid != null and cusedeptid != ''">and cusedeptid = #{cusedeptid}</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">and cvenddevaddrid = #{cvenddevaddrid}</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">and cvenddevareaid = #{cvenddevareaid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid = #{cwarehouseid}</if>
            <if test="dclosedate != null and dclosedate != ''">and dclosedate = #{dclosedate}</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">and dconfirmdate = #{dconfirmdate}</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">and dcorrectdate = #{dcorrectdate}</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">and dplanarrvdate = #{dplanarrvdate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="forderrowstatus != null">and forderrowstatus = #{forderrowstatus}</if>
            <if test="idiscounttaxtype != null">and idiscounttaxtype = #{idiscounttaxtype}</if>
            <if test="iisactive != null">and iisactive = #{iisactive}</if>
            <if test="iisreplenish != null">and iisreplenish = #{iisreplenish}</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">and naccumarrvnum = #{naccumarrvnum}</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">and naccumdevnum = #{naccumdevnum}</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">and naccuminvoicenum = #{naccuminvoicenum}
            </if>
            <if test="naccumrpnum != null and naccumrpnum != ''">and naccumrpnum = #{naccumrpnum}</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">and naccumstorenum = #{naccumstorenum}</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">and naccumwastnum = #{naccumwastnum}</if>
            <if test="nassistnum != null and nassistnum != ''">and nassistnum = #{nassistnum}</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">and nbackarrvnum = #{nbackarrvnum}</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">and nbackstorenum = #{nbackstorenum}</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">and nconfirmnum = #{nconfirmnum}</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">and ndiscountrate = #{ndiscountrate}</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">and nexchangeotobrate =
                #{nexchangeotobrate}
            </if>
            <if test="nfeemny != null and nfeemny != ''">and nfeemny = #{nfeemny}</if>
            <if test="nmoney != null and nmoney != ''">and nmoney = #{nmoney}</if>
            <if test="nordernum != null and nordernum != ''">and nordernum = #{nordernum}</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">and norgnettaxprice = #{norgnettaxprice}</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">and norgtaxprice = #{norgtaxprice}</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">and noriginalcurmny = #{noriginalcurmny}</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">and noriginalcurprice =
                #{noriginalcurprice}
            </if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">and noriginalnetprice =
                #{noriginalnetprice}
            </if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">and noriginaltaxmny = #{noriginaltaxmny}</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">and noriginaltaxpricemny =
                #{noriginaltaxpricemny}
            </if>
            <if test="ntaxmny != null and ntaxmny != ''">and ntaxmny = #{ntaxmny}</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">and ntaxpricemny = #{ntaxpricemny}</if>
            <if test="ntaxrate != null and ntaxrate != ''">and ntaxrate = #{ntaxrate}</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">and pk_arrvcorp = #{pkArrvcorp}</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">and pk_arrvstoorg = #{pkArrvstoorg}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">and pk_creqwareid = #{pkCreqwareid}</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="pkInvoicecorp != null and pkInvoicecorp != ''">and pk_invoicecorp = #{pkInvoicecorp}</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">and pk_reqcorp = #{pkReqcorp}</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">and pk_reqstoorg = #{pkReqstoorg}</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">and pk_upsrccorp = #{pkUpsrccorp}</if>
            <if test="ts != null and ts != ''">and ts = #{ts}</if>
            <if test="vdef1 != null and vdef1 != ''">and vdef1 = #{vdef1}</if>
            <if test="vdef10 != null and vdef10 != ''">and vdef10 = #{vdef10}</if>
            <if test="vdef11 != null and vdef11 != ''">and vdef11 = #{vdef11}</if>
            <if test="vdef12 != null and vdef12 != ''">and vdef12 = #{vdef12}</if>
            <if test="vdef13 != null and vdef13 != ''">and vdef13 = #{vdef13}</if>
            <if test="vdef14 != null and vdef14 != ''">and vdef14 = #{vdef14}</if>
            <if test="vdef15 != null and vdef15 != ''">and vdef15 = #{vdef15}</if>
            <if test="vdef16 != null and vdef16 != ''">and vdef16 = #{vdef16}</if>
            <if test="vdef17 != null and vdef17 != ''">and vdef17 = #{vdef17}</if>
            <if test="vdef18 != null and vdef18 != ''">and vdef18 = #{vdef18}</if>
            <if test="vdef19 != null and vdef19 != ''">and vdef19 = #{vdef19}</if>
            <if test="vdef2 != null and vdef2 != ''">and vdef2 = #{vdef2}</if>
            <if test="vdef20 != null and vdef20 != ''">and vdef20 = #{vdef20}</if>
            <if test="vdef3 != null and vdef3 != ''">and vdef3 = #{vdef3}</if>
            <if test="vdef4 != null and vdef4 != ''">and vdef4 = #{vdef4}</if>
            <if test="vdef5 != null and vdef5 != ''">and vdef5 = #{vdef5}</if>
            <if test="vdef6 != null and vdef6 != ''">and vdef6 = #{vdef6}</if>
            <if test="vdef7 != null and vdef7 != ''">and vdef7 = #{vdef7}</if>
            <if test="vdef8 != null and vdef8 != ''">and vdef8 = #{vdef8}</if>
            <if test="vdef9 != null and vdef9 != ''">and vdef9 = #{vdef9}</if>
            <if test="vecbilltype != null and vecbilltype != ''">and vecbilltype = #{vecbilltype}</if>
            <if test="vfree1 != null and vfree1 != ''">and vfree1 = #{vfree1}</if>
            <if test="vfree2 != null and vfree2 != ''">and vfree2 = #{vfree2}</if>
            <if test="vfree3 != null and vfree3 != ''">and vfree3 = #{vfree3}</if>
            <if test="vfree4 != null and vfree4 != ''">and vfree4 = #{vfree4}</if>
            <if test="vfree5 != null and vfree5 != ''">and vfree5 = #{vfree5}</if>
            <if test="vmemo != null and vmemo != ''">and vmemo = #{vmemo}</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">and vpriceauditcode = #{vpriceauditcode}</if>
            <if test="vproducenum != null and vproducenum != ''">and vproducenum = #{vproducenum}</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">and vreceiveaddress = #{vreceiveaddress}</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">and vvenddevaddr = #{vvenddevaddr}</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">and vvendinventorycode =
                #{vvendinventorycode}
            </if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">and vvendinventoryname =
                #{vvendinventoryname}
            </if>
            <if test="vvendorordercode != null and vvendorordercode != ''">and vvendorordercode = #{vvendorordercode}
            </if>
            <if test="vvendororderrow != null and vvendororderrow != ''">and vvendororderrow = #{vvendororderrow}</if>
        </trim>
        <if test=" 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-PoOrderBEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        select
        <include refid="PoOrderBEntity_Base_Column_List"/>
        from po_order_b
        <trim prefix="where" prefixOverrides="and">
            <if test="blargess != null and blargess != ''">and blargess like concat('%',#{blargess},'%')</if>
            <if test="breceiveplan != null and breceiveplan != ''">and breceiveplan like
                concat('%',#{breceiveplan},'%')
            </if>
            <if test="btransclosed != null and btransclosed != ''">and btransclosed like
                concat('%',#{btransclosed},'%')
            </if>
            <if test="cassistunit != null and cassistunit != ''">and cassistunit like concat('%',#{cassistunit},'%')
            </if>
            <if test="cbaseid != null and cbaseid != ''">and cbaseid like concat('%',#{cbaseid},'%')</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">and ccloseuserid like
                concat('%',#{ccloseuserid},'%')
            </if>
            <if test="ccontractid != null and ccontractid != ''">and ccontractid like concat('%',#{ccontractid},'%')
            </if>
            <if test="ccontractrowid != null and ccontractrowid != ''">and ccontractrowid like
                concat('%',#{ccontractrowid},'%')
            </if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">and ccorrectrowid like
                concat('%',#{ccorrectrowid},'%')
            </if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">and ccurrencytypeid like
                concat('%',#{ccurrencytypeid},'%')
            </if>
            <if test="cdevaddrid != null and cdevaddrid != ''">and cdevaddrid like concat('%',#{cdevaddrid},'%')</if>
            <if test="cdevareaid != null and cdevareaid != ''">and cdevareaid like concat('%',#{cdevareaid},'%')</if>
            <if test="cecbillBid != null and cecbillBid != ''">and cecbill_bid like concat('%',#{cecbillBid},'%')</if>
            <if test="cecbillid != null and cecbillid != ''">and cecbillid like concat('%',#{cecbillid},'%')</if>
            <if test="closingreason != null and closingreason != ''">and closingreason like
                concat('%',#{closingreason},'%')
            </if>
            <if test="cmangid != null and cmangid != ''">and cmangid like concat('%',#{cmangid},'%')</if>
            <if test="coperator != null and coperator != ''">and coperator like concat('%',#{coperator},'%')</if>
            <if test="corderBid != null and corderBid != ''">and corder_bid like concat('%',#{corderBid},'%')</if>
            <if test="corderid != null and corderid != ''">and corderid like concat('%',#{corderid},'%')</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">and cpriceaudit_bb1id like
                concat('%',#{cpriceauditBb1id},'%')
            </if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">and cpriceaudit_bid like
                concat('%',#{cpriceauditBid},'%')
            </if>
            <if test="cpriceauditid != null and cpriceauditid != ''">and cpriceauditid like
                concat('%',#{cpriceauditid},'%')
            </if>
            <if test="cprojectid != null and cprojectid != ''">and cprojectid like concat('%',#{cprojectid},'%')</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">and cprojectphaseid like
                concat('%',#{cprojectphaseid},'%')
            </if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">and cqpbaseschemeid like
                concat('%',#{cqpbaseschemeid},'%')
            </if>
            <if test="crowno != null and crowno != ''">and crowno like concat('%',#{crowno},'%')</if>
            <if test="csourcebillid != null and csourcebillid != ''">and csourcebillid like
                concat('%',#{csourcebillid},'%')
            </if>
            <if test="csourcebilltype != null and csourcebilltype != ''">and csourcebilltype like
                concat('%',#{csourcebilltype},'%')
            </if>
            <if test="csourcerowid != null and csourcerowid != ''">and csourcerowid like
                concat('%',#{csourcerowid},'%')
            </if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">and cupsourcebillid like
                concat('%',#{cupsourcebillid},'%')
            </if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">and cupsourcebillrowid like
                concat('%',#{cupsourcebillrowid},'%')
            </if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">and cupsourcebilltype like
                concat('%',#{cupsourcebilltype},'%')
            </if>
            <if test="cusedeptid != null and cusedeptid != ''">and cusedeptid like concat('%',#{cusedeptid},'%')</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">and cvenddevaddrid like
                concat('%',#{cvenddevaddrid},'%')
            </if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">and cvenddevareaid like
                concat('%',#{cvenddevareaid},'%')
            </if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid like
                concat('%',#{cwarehouseid},'%')
            </if>
            <if test="dclosedate != null and dclosedate != ''">and dclosedate like concat('%',#{dclosedate},'%')</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">and dconfirmdate like
                concat('%',#{dconfirmdate},'%')
            </if>
            <if test="dcorrectdate != null and dcorrectdate != ''">and dcorrectdate like
                concat('%',#{dcorrectdate},'%')
            </if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">and dplanarrvdate like
                concat('%',#{dplanarrvdate},'%')
            </if>
            <if test="dr != null">and dr like concat('%',#{dr},'%')</if>
            <if test="forderrowstatus != null">and forderrowstatus like concat('%',#{forderrowstatus},'%')</if>
            <if test="idiscounttaxtype != null">and idiscounttaxtype like concat('%',#{idiscounttaxtype},'%')</if>
            <if test="iisactive != null">and iisactive like concat('%',#{iisactive},'%')</if>
            <if test="iisreplenish != null">and iisreplenish like concat('%',#{iisreplenish},'%')</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">and naccumarrvnum like
                concat('%',#{naccumarrvnum},'%')
            </if>
            <if test="naccumdevnum != null and naccumdevnum != ''">and naccumdevnum like
                concat('%',#{naccumdevnum},'%')
            </if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">and naccuminvoicenum like
                concat('%',#{naccuminvoicenum},'%')
            </if>
            <if test="naccumrpnum != null and naccumrpnum != ''">and naccumrpnum like concat('%',#{naccumrpnum},'%')
            </if>
            <if test="naccumstorenum != null and naccumstorenum != ''">and naccumstorenum like
                concat('%',#{naccumstorenum},'%')
            </if>
            <if test="naccumwastnum != null and naccumwastnum != ''">and naccumwastnum like
                concat('%',#{naccumwastnum},'%')
            </if>
            <if test="nassistnum != null and nassistnum != ''">and nassistnum like concat('%',#{nassistnum},'%')</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">and nbackarrvnum like
                concat('%',#{nbackarrvnum},'%')
            </if>
            <if test="nbackstorenum != null and nbackstorenum != ''">and nbackstorenum like
                concat('%',#{nbackstorenum},'%')
            </if>
            <if test="nconfirmnum != null and nconfirmnum != ''">and nconfirmnum like concat('%',#{nconfirmnum},'%')
            </if>
            <if test="ndiscountrate != null and ndiscountrate != ''">and ndiscountrate like
                concat('%',#{ndiscountrate},'%')
            </if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">and nexchangeotobrate like
                concat('%',#{nexchangeotobrate},'%')
            </if>
            <if test="nfeemny != null and nfeemny != ''">and nfeemny like concat('%',#{nfeemny},'%')</if>
            <if test="nmoney != null and nmoney != ''">and nmoney like concat('%',#{nmoney},'%')</if>
            <if test="nordernum != null and nordernum != ''">and nordernum like concat('%',#{nordernum},'%')</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">and norgnettaxprice like
                concat('%',#{norgnettaxprice},'%')
            </if>
            <if test="norgtaxprice != null and norgtaxprice != ''">and norgtaxprice like
                concat('%',#{norgtaxprice},'%')
            </if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">and noriginalcurmny like
                concat('%',#{noriginalcurmny},'%')
            </if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">and noriginalcurprice like
                concat('%',#{noriginalcurprice},'%')
            </if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">and noriginalnetprice like
                concat('%',#{noriginalnetprice},'%')
            </if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">and noriginaltaxmny like
                concat('%',#{noriginaltaxmny},'%')
            </if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">and noriginaltaxpricemny like
                concat('%',#{noriginaltaxpricemny},'%')
            </if>
            <if test="ntaxmny != null and ntaxmny != ''">and ntaxmny like concat('%',#{ntaxmny},'%')</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">and ntaxpricemny like
                concat('%',#{ntaxpricemny},'%')
            </if>
            <if test="ntaxrate != null and ntaxrate != ''">and ntaxrate like concat('%',#{ntaxrate},'%')</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">and pk_arrvcorp like concat('%',#{pkArrvcorp},'%')</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">and pk_arrvstoorg like
                concat('%',#{pkArrvstoorg},'%')
            </if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp like concat('%',#{pkCorp},'%')</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">and pk_creqwareid like
                concat('%',#{pkCreqwareid},'%')
            </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="pkInvoicecorp != null and pkInvoicecorp != ''">and pk_invoicecorp like
                concat('%',#{pkInvoicecorp},'%')
            </if>
            <if test="pkReqcorp != null and pkReqcorp != ''">and pk_reqcorp like concat('%',#{pkReqcorp},'%')</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">and pk_reqstoorg like concat('%',#{pkReqstoorg},'%')
            </if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">and pk_upsrccorp like concat('%',#{pkUpsrccorp},'%')
            </if>
            <if test="ts != null and ts != ''">and ts like concat('%',#{ts},'%')</if>
            <if test="vdef1 != null and vdef1 != ''">and vdef1 like concat('%',#{vdef1},'%')</if>
            <if test="vdef10 != null and vdef10 != ''">and vdef10 like concat('%',#{vdef10},'%')</if>
            <if test="vdef11 != null and vdef11 != ''">and vdef11 like concat('%',#{vdef11},'%')</if>
            <if test="vdef12 != null and vdef12 != ''">and vdef12 like concat('%',#{vdef12},'%')</if>
            <if test="vdef13 != null and vdef13 != ''">and vdef13 like concat('%',#{vdef13},'%')</if>
            <if test="vdef14 != null and vdef14 != ''">and vdef14 like concat('%',#{vdef14},'%')</if>
            <if test="vdef15 != null and vdef15 != ''">and vdef15 like concat('%',#{vdef15},'%')</if>
            <if test="vdef16 != null and vdef16 != ''">and vdef16 like concat('%',#{vdef16},'%')</if>
            <if test="vdef17 != null and vdef17 != ''">and vdef17 like concat('%',#{vdef17},'%')</if>
            <if test="vdef18 != null and vdef18 != ''">and vdef18 like concat('%',#{vdef18},'%')</if>
            <if test="vdef19 != null and vdef19 != ''">and vdef19 like concat('%',#{vdef19},'%')</if>
            <if test="vdef2 != null and vdef2 != ''">and vdef2 like concat('%',#{vdef2},'%')</if>
            <if test="vdef20 != null and vdef20 != ''">and vdef20 like concat('%',#{vdef20},'%')</if>
            <if test="vdef3 != null and vdef3 != ''">and vdef3 like concat('%',#{vdef3},'%')</if>
            <if test="vdef4 != null and vdef4 != ''">and vdef4 like concat('%',#{vdef4},'%')</if>
            <if test="vdef5 != null and vdef5 != ''">and vdef5 like concat('%',#{vdef5},'%')</if>
            <if test="vdef6 != null and vdef6 != ''">and vdef6 like concat('%',#{vdef6},'%')</if>
            <if test="vdef7 != null and vdef7 != ''">and vdef7 like concat('%',#{vdef7},'%')</if>
            <if test="vdef8 != null and vdef8 != ''">and vdef8 like concat('%',#{vdef8},'%')</if>
            <if test="vdef9 != null and vdef9 != ''">and vdef9 like concat('%',#{vdef9},'%')</if>
            <if test="vecbilltype != null and vecbilltype != ''">and vecbilltype like concat('%',#{vecbilltype},'%')
            </if>
            <if test="vfree1 != null and vfree1 != ''">and vfree1 like concat('%',#{vfree1},'%')</if>
            <if test="vfree2 != null and vfree2 != ''">and vfree2 like concat('%',#{vfree2},'%')</if>
            <if test="vfree3 != null and vfree3 != ''">and vfree3 like concat('%',#{vfree3},'%')</if>
            <if test="vfree4 != null and vfree4 != ''">and vfree4 like concat('%',#{vfree4},'%')</if>
            <if test="vfree5 != null and vfree5 != ''">and vfree5 like concat('%',#{vfree5},'%')</if>
            <if test="vmemo != null and vmemo != ''">and vmemo like concat('%',#{vmemo},'%')</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">and vpriceauditcode like
                concat('%',#{vpriceauditcode},'%')
            </if>
            <if test="vproducenum != null and vproducenum != ''">and vproducenum like concat('%',#{vproducenum},'%')
            </if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">and vreceiveaddress like
                concat('%',#{vreceiveaddress},'%')
            </if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">and vvenddevaddr like
                concat('%',#{vvenddevaddr},'%')
            </if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">and vvendinventorycode like
                concat('%',#{vvendinventorycode},'%')
            </if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">and vvendinventoryname like
                concat('%',#{vvendinventoryname},'%')
            </if>
            <if test="vvendorordercode != null and vvendorordercode != ''">and vvendorordercode like
                concat('%',#{vvendorordercode},'%')
            </if>
            <if test="vvendororderrow != null and vvendororderrow != ''">and vvendororderrow like
                concat('%',#{vvendororderrow},'%')
            </if>
        </trim>
        <if test=" 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="PoOrderBentity_list_or" resultMap="get-PoOrderBEntity-result"
            parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        select
        <include refid="PoOrderBEntity_Base_Column_List"/>
        from po_order_b
        <trim prefix="where" prefixOverrides="and">
            <if test="blargess != null and blargess != ''">or blargess = #{blargess}</if>
            <if test="breceiveplan != null and breceiveplan != ''">or breceiveplan = #{breceiveplan}</if>
            <if test="btransclosed != null and btransclosed != ''">or btransclosed = #{btransclosed}</if>
            <if test="cassistunit != null and cassistunit != ''">or cassistunit = #{cassistunit}</if>
            <if test="cbaseid != null and cbaseid != ''">or cbaseid = #{cbaseid}</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">or ccloseuserid = #{ccloseuserid}</if>
            <if test="ccontractid != null and ccontractid != ''">or ccontractid = #{ccontractid}</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">or ccontractrowid = #{ccontractrowid}</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">or ccorrectrowid = #{ccorrectrowid}</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">or ccurrencytypeid = #{ccurrencytypeid}</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">or cdevaddrid = #{cdevaddrid}</if>
            <if test="cdevareaid != null and cdevareaid != ''">or cdevareaid = #{cdevareaid}</if>
            <if test="cecbillBid != null and cecbillBid != ''">or cecbill_bid = #{cecbillBid}</if>
            <if test="cecbillid != null and cecbillid != ''">or cecbillid = #{cecbillid}</if>
            <if test="closingreason != null and closingreason != ''">or closingreason = #{closingreason}</if>
            <if test="cmangid != null and cmangid != ''">or cmangid = #{cmangid}</if>
            <if test="coperator != null and coperator != ''">or coperator = #{coperator}</if>
            <if test="corderBid != null and corderBid != ''">or corder_bid = #{corderBid}</if>
            <if test="corderid != null and corderid != ''">or corderid = #{corderid}</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">or cpriceaudit_bb1id = #{cpriceauditBb1id}
            </if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">or cpriceaudit_bid = #{cpriceauditBid}</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">or cpriceauditid = #{cpriceauditid}</if>
            <if test="cprojectid != null and cprojectid != ''">or cprojectid = #{cprojectid}</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">or cprojectphaseid = #{cprojectphaseid}</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">or cqpbaseschemeid = #{cqpbaseschemeid}</if>
            <if test="crowno != null and crowno != ''">or crowno = #{crowno}</if>
            <if test="csourcebillid != null and csourcebillid != ''">or csourcebillid = #{csourcebillid}</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">or csourcebilltype = #{csourcebilltype}</if>
            <if test="csourcerowid != null and csourcerowid != ''">or csourcerowid = #{csourcerowid}</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">or cupsourcebillid = #{cupsourcebillid}</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">or cupsourcebillrowid =
                #{cupsourcebillrowid}
            </if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">or cupsourcebilltype =
                #{cupsourcebilltype}
            </if>
            <if test="cusedeptid != null and cusedeptid != ''">or cusedeptid = #{cusedeptid}</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">or cvenddevaddrid = #{cvenddevaddrid}</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">or cvenddevareaid = #{cvenddevareaid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">or cwarehouseid = #{cwarehouseid}</if>
            <if test="dclosedate != null and dclosedate != ''">or dclosedate = #{dclosedate}</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">or dconfirmdate = #{dconfirmdate}</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">or dcorrectdate = #{dcorrectdate}</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">or dplanarrvdate = #{dplanarrvdate}</if>
            <if test="dr != null">or dr = #{dr}</if>
            <if test="forderrowstatus != null">or forderrowstatus = #{forderrowstatus}</if>
            <if test="idiscounttaxtype != null">or idiscounttaxtype = #{idiscounttaxtype}</if>
            <if test="iisactive != null">or iisactive = #{iisactive}</if>
            <if test="iisreplenish != null">or iisreplenish = #{iisreplenish}</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">or naccumarrvnum = #{naccumarrvnum}</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">or naccumdevnum = #{naccumdevnum}</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">or naccuminvoicenum = #{naccuminvoicenum}
            </if>
            <if test="naccumrpnum != null and naccumrpnum != ''">or naccumrpnum = #{naccumrpnum}</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">or naccumstorenum = #{naccumstorenum}</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">or naccumwastnum = #{naccumwastnum}</if>
            <if test="nassistnum != null and nassistnum != ''">or nassistnum = #{nassistnum}</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">or nbackarrvnum = #{nbackarrvnum}</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">or nbackstorenum = #{nbackstorenum}</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">or nconfirmnum = #{nconfirmnum}</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">or ndiscountrate = #{ndiscountrate}</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">or nexchangeotobrate =
                #{nexchangeotobrate}
            </if>
            <if test="nfeemny != null and nfeemny != ''">or nfeemny = #{nfeemny}</if>
            <if test="nmoney != null and nmoney != ''">or nmoney = #{nmoney}</if>
            <if test="nordernum != null and nordernum != ''">or nordernum = #{nordernum}</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">or norgnettaxprice = #{norgnettaxprice}</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">or norgtaxprice = #{norgtaxprice}</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">or noriginalcurmny = #{noriginalcurmny}</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">or noriginalcurprice =
                #{noriginalcurprice}
            </if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">or noriginalnetprice =
                #{noriginalnetprice}
            </if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">or noriginaltaxmny = #{noriginaltaxmny}</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">or noriginaltaxpricemny =
                #{noriginaltaxpricemny}
            </if>
            <if test="ntaxmny != null and ntaxmny != ''">or ntaxmny = #{ntaxmny}</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">or ntaxpricemny = #{ntaxpricemny}</if>
            <if test="ntaxrate != null and ntaxrate != ''">or ntaxrate = #{ntaxrate}</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">or pk_arrvcorp = #{pkArrvcorp}</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">or pk_arrvstoorg = #{pkArrvstoorg}</if>
            <if test="pkCorp != null and pkCorp != ''">or pk_corp = #{pkCorp}</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">or pk_creqwareid = #{pkCreqwareid}</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="pkInvoicecorp != null and pkInvoicecorp != ''">or pk_invoicecorp = #{pkInvoicecorp}</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">or pk_reqcorp = #{pkReqcorp}</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">or pk_reqstoorg = #{pkReqstoorg}</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">or pk_upsrccorp = #{pkUpsrccorp}</if>
            <if test="ts != null and ts != ''">or ts = #{ts}</if>
            <if test="vdef1 != null and vdef1 != ''">or vdef1 = #{vdef1}</if>
            <if test="vdef10 != null and vdef10 != ''">or vdef10 = #{vdef10}</if>
            <if test="vdef11 != null and vdef11 != ''">or vdef11 = #{vdef11}</if>
            <if test="vdef12 != null and vdef12 != ''">or vdef12 = #{vdef12}</if>
            <if test="vdef13 != null and vdef13 != ''">or vdef13 = #{vdef13}</if>
            <if test="vdef14 != null and vdef14 != ''">or vdef14 = #{vdef14}</if>
            <if test="vdef15 != null and vdef15 != ''">or vdef15 = #{vdef15}</if>
            <if test="vdef16 != null and vdef16 != ''">or vdef16 = #{vdef16}</if>
            <if test="vdef17 != null and vdef17 != ''">or vdef17 = #{vdef17}</if>
            <if test="vdef18 != null and vdef18 != ''">or vdef18 = #{vdef18}</if>
            <if test="vdef19 != null and vdef19 != ''">or vdef19 = #{vdef19}</if>
            <if test="vdef2 != null and vdef2 != ''">or vdef2 = #{vdef2}</if>
            <if test="vdef20 != null and vdef20 != ''">or vdef20 = #{vdef20}</if>
            <if test="vdef3 != null and vdef3 != ''">or vdef3 = #{vdef3}</if>
            <if test="vdef4 != null and vdef4 != ''">or vdef4 = #{vdef4}</if>
            <if test="vdef5 != null and vdef5 != ''">or vdef5 = #{vdef5}</if>
            <if test="vdef6 != null and vdef6 != ''">or vdef6 = #{vdef6}</if>
            <if test="vdef7 != null and vdef7 != ''">or vdef7 = #{vdef7}</if>
            <if test="vdef8 != null and vdef8 != ''">or vdef8 = #{vdef8}</if>
            <if test="vdef9 != null and vdef9 != ''">or vdef9 = #{vdef9}</if>
            <if test="vecbilltype != null and vecbilltype != ''">or vecbilltype = #{vecbilltype}</if>
            <if test="vfree1 != null and vfree1 != ''">or vfree1 = #{vfree1}</if>
            <if test="vfree2 != null and vfree2 != ''">or vfree2 = #{vfree2}</if>
            <if test="vfree3 != null and vfree3 != ''">or vfree3 = #{vfree3}</if>
            <if test="vfree4 != null and vfree4 != ''">or vfree4 = #{vfree4}</if>
            <if test="vfree5 != null and vfree5 != ''">or vfree5 = #{vfree5}</if>
            <if test="vmemo != null and vmemo != ''">or vmemo = #{vmemo}</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">or vpriceauditcode = #{vpriceauditcode}</if>
            <if test="vproducenum != null and vproducenum != ''">or vproducenum = #{vproducenum}</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">or vreceiveaddress = #{vreceiveaddress}</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">or vvenddevaddr = #{vvenddevaddr}</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">or vvendinventorycode =
                #{vvendinventorycode}
            </if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">or vvendinventoryname =
                #{vvendinventoryname}
            </if>
            <if test="vvendorordercode != null and vvendorordercode != ''">or vvendorordercode = #{vvendorordercode}
            </if>
            <if test="vvendororderrow != null and vvendororderrow != ''">or vvendororderrow = #{vvendororderrow}</if>
        </trim>
        <if test=" 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.PoOrderBEntity" keyProperty="corderBid"
            useGeneratedKeys="true">
        insert into po_order_b(
        <trim suffix="" suffixOverrides=",">
            <if test="blargess != null and blargess != ''">blargess ,</if>
            <if test="breceiveplan != null and breceiveplan != ''">breceiveplan ,</if>
            <if test="btransclosed != null and btransclosed != ''">btransclosed ,</if>
            <if test="cassistunit != null and cassistunit != ''">cassistunit ,</if>
            <if test="cbaseid != null and cbaseid != ''">cbaseid ,</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">ccloseuserid ,</if>
            <if test="ccontractid != null and ccontractid != ''">ccontractid ,</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">ccontractrowid ,</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">ccorrectrowid ,</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">ccurrencytypeid ,</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">cdevaddrid ,</if>
            <if test="cdevareaid != null and cdevareaid != ''">cdevareaid ,</if>
            <if test="cecbillBid != null and cecbillBid != ''">cecbill_bid ,</if>
            <if test="cecbillid != null and cecbillid != ''">cecbillid ,</if>
            <if test="closingreason != null and closingreason != ''">closingreason ,</if>
            <if test="cmangid != null and cmangid != ''">cmangid ,</if>
            <if test="coperator != null and coperator != ''">coperator ,</if>
            <if test="corderBid != null and corderBid != ''">corder_bid ,</if>
            <if test="corderid != null and corderid != ''">corderid ,</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">cpriceaudit_bb1id ,</if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">cpriceaudit_bid ,</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">cpriceauditid ,</if>
            <if test="cprojectid != null and cprojectid != ''">cprojectid ,</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">cprojectphaseid ,</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">cqpbaseschemeid ,</if>
            <if test="crowno != null and crowno != ''">crowno ,</if>
            <if test="csourcebillid != null and csourcebillid != ''">csourcebillid ,</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">csourcebilltype ,</if>
            <if test="csourcerowid != null and csourcerowid != ''">csourcerowid ,</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">cupsourcebillid ,</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">cupsourcebillrowid ,</if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">cupsourcebilltype ,</if>
            <if test="cusedeptid != null and cusedeptid != ''">cusedeptid ,</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">cvenddevaddrid ,</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">cvenddevareaid ,</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">cwarehouseid ,</if>
            <if test="dclosedate != null and dclosedate != ''">dclosedate ,</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">dconfirmdate ,</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">dcorrectdate ,</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">dplanarrvdate ,</if>
            <if test="dr != null">dr ,</if>
            <if test="forderrowstatus != null">forderrowstatus ,</if>
            <if test="idiscounttaxtype != null">idiscounttaxtype ,</if>
            <if test="iisactive != null">iisactive ,</if>
            <if test="iisreplenish != null">iisreplenish ,</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">naccumarrvnum ,</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">naccumdevnum ,</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">naccuminvoicenum ,</if>
            <if test="naccumrpnum != null and naccumrpnum != ''">naccumrpnum ,</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">naccumstorenum ,</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">naccumwastnum ,</if>
            <if test="nassistnum != null and nassistnum != ''">nassistnum ,</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">nbackarrvnum ,</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">nbackstorenum ,</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">nconfirmnum ,</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">ndiscountrate ,</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">nexchangeotobrate ,</if>
            <if test="nfeemny != null and nfeemny != ''">nfeemny ,</if>
            <if test="nmoney != null and nmoney != ''">nmoney ,</if>
            <if test="nordernum != null and nordernum != ''">nordernum ,</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">norgnettaxprice ,</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">norgtaxprice ,</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">noriginalcurmny ,</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">noriginalcurprice ,</if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">noriginalnetprice ,</if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">noriginaltaxmny ,</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">noriginaltaxpricemny ,</if>
            <if test="ntaxmny != null and ntaxmny != ''">ntaxmny ,</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">ntaxpricemny ,</if>
            <if test="ntaxrate != null and ntaxrate != ''">ntaxrate ,</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">pk_arrvcorp ,</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">pk_arrvstoorg ,</if>
            <if test="pkCorp != null and pkCorp != ''">pk_corp ,</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">pk_creqwareid ,</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="pkInvoicecorp != null and pkInvoicecorp != ''">pk_invoicecorp ,</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">pk_reqcorp ,</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">pk_reqstoorg ,</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">pk_upsrccorp ,</if>
            <if test="ts != null and ts != ''">ts ,</if>
            <if test="vdef1 != null and vdef1 != ''">vdef1 ,</if>
            <if test="vdef10 != null and vdef10 != ''">vdef10 ,</if>
            <if test="vdef11 != null and vdef11 != ''">vdef11 ,</if>
            <if test="vdef12 != null and vdef12 != ''">vdef12 ,</if>
            <if test="vdef13 != null and vdef13 != ''">vdef13 ,</if>
            <if test="vdef14 != null and vdef14 != ''">vdef14 ,</if>
            <if test="vdef15 != null and vdef15 != ''">vdef15 ,</if>
            <if test="vdef16 != null and vdef16 != ''">vdef16 ,</if>
            <if test="vdef17 != null and vdef17 != ''">vdef17 ,</if>
            <if test="vdef18 != null and vdef18 != ''">vdef18 ,</if>
            <if test="vdef19 != null and vdef19 != ''">vdef19 ,</if>
            <if test="vdef2 != null and vdef2 != ''">vdef2 ,</if>
            <if test="vdef20 != null and vdef20 != ''">vdef20 ,</if>
            <if test="vdef3 != null and vdef3 != ''">vdef3 ,</if>
            <if test="vdef4 != null and vdef4 != ''">vdef4 ,</if>
            <if test="vdef5 != null and vdef5 != ''">vdef5 ,</if>
            <if test="vdef6 != null and vdef6 != ''">vdef6 ,</if>
            <if test="vdef7 != null and vdef7 != ''">vdef7 ,</if>
            <if test="vdef8 != null and vdef8 != ''">vdef8 ,</if>
            <if test="vdef9 != null and vdef9 != ''">vdef9 ,</if>
            <if test="vecbilltype != null and vecbilltype != ''">vecbilltype ,</if>
            <if test="vfree1 != null and vfree1 != ''">vfree1 ,</if>
            <if test="vfree2 != null and vfree2 != ''">vfree2 ,</if>
            <if test="vfree3 != null and vfree3 != ''">vfree3 ,</if>
            <if test="vfree4 != null and vfree4 != ''">vfree4 ,</if>
            <if test="vfree5 != null and vfree5 != ''">vfree5 ,</if>
            <if test="vmemo != null and vmemo != ''">vmemo ,</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">vpriceauditcode ,</if>
            <if test="vproducenum != null and vproducenum != ''">vproducenum ,</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">vreceiveaddress ,</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">vvenddevaddr ,</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">vvendinventorycode ,</if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">vvendinventoryname ,</if>
            <if test="vvendorordercode != null and vvendorordercode != ''">vvendorordercode ,</if>
            <if test="vvendororderrow != null and vvendororderrow != ''">vvendororderrow ,</if>
            <if test="sorts == null ">sorts,</if>
            <if test="sts == null ">sts,</if>
        </trim>
        )values(
        <trim suffix="" suffixOverrides=",">
            <if test="blargess != null and blargess != ''">#{blargess} ,</if>
            <if test="breceiveplan != null and breceiveplan != ''">#{breceiveplan} ,</if>
            <if test="btransclosed != null and btransclosed != ''">#{btransclosed} ,</if>
            <if test="cassistunit != null and cassistunit != ''">#{cassistunit} ,</if>
            <if test="cbaseid != null and cbaseid != ''">#{cbaseid} ,</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">#{ccloseuserid} ,</if>
            <if test="ccontractid != null and ccontractid != ''">#{ccontractid} ,</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">#{ccontractrowid} ,</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">#{ccorrectrowid} ,</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">#{ccurrencytypeid} ,</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">#{cdevaddrid} ,</if>
            <if test="cdevareaid != null and cdevareaid != ''">#{cdevareaid} ,</if>
            <if test="cecbillBid != null and cecbillBid != ''">#{cecbillBid} ,</if>
            <if test="cecbillid != null and cecbillid != ''">#{cecbillid} ,</if>
            <if test="closingreason != null and closingreason != ''">#{closingreason} ,</if>
            <if test="cmangid != null and cmangid != ''">#{cmangid} ,</if>
            <if test="coperator != null and coperator != ''">#{coperator} ,</if>
            <if test="corderBid != null and corderBid != ''">#{corderBid} ,</if>
            <if test="corderid != null and corderid != ''">#{corderid} ,</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">#{cpriceauditBb1id} ,</if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">#{cpriceauditBid} ,</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">#{cpriceauditid} ,</if>
            <if test="cprojectid != null and cprojectid != ''">#{cprojectid} ,</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">#{cprojectphaseid} ,</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">#{cqpbaseschemeid} ,</if>
            <if test="crowno != null and crowno != ''">#{crowno} ,</if>
            <if test="csourcebillid != null and csourcebillid != ''">#{csourcebillid} ,</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">#{csourcebilltype} ,</if>
            <if test="csourcerowid != null and csourcerowid != ''">#{csourcerowid} ,</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">#{cupsourcebillid} ,</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">#{cupsourcebillrowid} ,</if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">#{cupsourcebilltype} ,</if>
            <if test="cusedeptid != null and cusedeptid != ''">#{cusedeptid} ,</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">#{cvenddevaddrid} ,</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">#{cvenddevareaid} ,</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">#{cwarehouseid} ,</if>
            <if test="dclosedate != null and dclosedate != ''">#{dclosedate} ,</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">#{dconfirmdate} ,</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">#{dcorrectdate} ,</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">#{dplanarrvdate} ,</if>
            <if test="dr != null">#{dr} ,</if>
            <if test="forderrowstatus != null">#{forderrowstatus} ,</if>
            <if test="idiscounttaxtype != null">#{idiscounttaxtype} ,</if>
            <if test="iisactive != null">#{iisactive} ,</if>
            <if test="iisreplenish != null">#{iisreplenish} ,</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">#{naccumarrvnum} ,</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">#{naccumdevnum} ,</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">#{naccuminvoicenum} ,</if>
            <if test="naccumrpnum != null and naccumrpnum != ''">#{naccumrpnum} ,</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">#{naccumstorenum} ,</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">#{naccumwastnum} ,</if>
            <if test="nassistnum != null and nassistnum != ''">#{nassistnum} ,</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">#{nbackarrvnum} ,</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">#{nbackstorenum} ,</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">#{nconfirmnum} ,</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">#{ndiscountrate} ,</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">#{nexchangeotobrate} ,</if>
            <if test="nfeemny != null and nfeemny != ''">#{nfeemny} ,</if>
            <if test="nmoney != null and nmoney != ''">#{nmoney} ,</if>
            <if test="nordernum != null and nordernum != ''">#{nordernum} ,</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">#{norgnettaxprice} ,</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">#{norgtaxprice} ,</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">#{noriginalcurmny} ,</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">#{noriginalcurprice} ,</if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">#{noriginalnetprice} ,</if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">#{noriginaltaxmny} ,</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">#{noriginaltaxpricemny} ,</if>
            <if test="ntaxmny != null and ntaxmny != ''">#{ntaxmny} ,</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">#{ntaxpricemny} ,</if>
            <if test="ntaxrate != null and ntaxrate != ''">#{ntaxrate} ,</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">#{pkArrvcorp} ,</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">#{pkArrvstoorg} ,</if>
            <if test="pkCorp != null and pkCorp != ''">#{pkCorp} ,</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">#{pkCreqwareid} ,</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="pkInvoicecorp != null and pkInvoicecorp != ''">#{pkInvoicecorp} ,</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">#{pkReqcorp} ,</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">#{pkReqstoorg} ,</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">#{pkUpsrccorp} ,</if>
            <if test="ts != null and ts != ''">#{ts} ,</if>
            <if test="vdef1 != null and vdef1 != ''">#{vdef1} ,</if>
            <if test="vdef10 != null and vdef10 != ''">#{vdef10} ,</if>
            <if test="vdef11 != null and vdef11 != ''">#{vdef11} ,</if>
            <if test="vdef12 != null and vdef12 != ''">#{vdef12} ,</if>
            <if test="vdef13 != null and vdef13 != ''">#{vdef13} ,</if>
            <if test="vdef14 != null and vdef14 != ''">#{vdef14} ,</if>
            <if test="vdef15 != null and vdef15 != ''">#{vdef15} ,</if>
            <if test="vdef16 != null and vdef16 != ''">#{vdef16} ,</if>
            <if test="vdef17 != null and vdef17 != ''">#{vdef17} ,</if>
            <if test="vdef18 != null and vdef18 != ''">#{vdef18} ,</if>
            <if test="vdef19 != null and vdef19 != ''">#{vdef19} ,</if>
            <if test="vdef2 != null and vdef2 != ''">#{vdef2} ,</if>
            <if test="vdef20 != null and vdef20 != ''">#{vdef20} ,</if>
            <if test="vdef3 != null and vdef3 != ''">#{vdef3} ,</if>
            <if test="vdef4 != null and vdef4 != ''">#{vdef4} ,</if>
            <if test="vdef5 != null and vdef5 != ''">#{vdef5} ,</if>
            <if test="vdef6 != null and vdef6 != ''">#{vdef6} ,</if>
            <if test="vdef7 != null and vdef7 != ''">#{vdef7} ,</if>
            <if test="vdef8 != null and vdef8 != ''">#{vdef8} ,</if>
            <if test="vdef9 != null and vdef9 != ''">#{vdef9} ,</if>
            <if test="vecbilltype != null and vecbilltype != ''">#{vecbilltype} ,</if>
            <if test="vfree1 != null and vfree1 != ''">#{vfree1} ,</if>
            <if test="vfree2 != null and vfree2 != ''">#{vfree2} ,</if>
            <if test="vfree3 != null and vfree3 != ''">#{vfree3} ,</if>
            <if test="vfree4 != null and vfree4 != ''">#{vfree4} ,</if>
            <if test="vfree5 != null and vfree5 != ''">#{vfree5} ,</if>
            <if test="vmemo != null and vmemo != ''">#{vmemo} ,</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">#{vpriceauditcode} ,</if>
            <if test="vproducenum != null and vproducenum != ''">#{vproducenum} ,</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">#{vreceiveaddress} ,</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">#{vvenddevaddr} ,</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">#{vvendinventorycode} ,</if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">#{vvendinventoryname} ,</if>
            <if test="vvendorordercode != null and vvendorordercode != ''">#{vvendorordercode} ,</if>
            <if test="vvendororderrow != null and vvendororderrow != ''">#{vvendororderrow} ,</if>
            <if test="sorts == null ">(select (max(IFNULL( a.sorts, 0 )) + 1) as sort from po_order_b a WHERE a.sts =
                'Y' ),
            </if>
            <if test="sts == null ">'Y',</if>
        </trim>
        )
    </insert>
    <!-- 批量新增 -->
    <insert id="entityInsertBatch" keyProperty="corderBid" useGeneratedKeys="true">
        insert into po_order_b(blargess, breceiveplan, btransclosed, cassistunit, cbaseid, ccloseuserid, ccontractid,
        ccontractrowid, ccorrectrowid, ccurrencytypeid, cdevaddrid, cdevareaid, cecbill_bid, cecbillid, closingreason,
        cmangid, coperator, corderid, cpriceaudit_bb1id, cpriceaudit_bid, cpriceauditid, cprojectid, cprojectphaseid,
        cqpbaseschemeid, crowno, csourcebillid, csourcebilltype, csourcerowid, cupsourcebillid, cupsourcebillrowid,
        cupsourcebilltype, cusedeptid, cvenddevaddrid, cvenddevareaid, cwarehouseid, dclosedate, dconfirmdate,
        dcorrectdate, dplanarrvdate, dr, forderrowstatus, idiscounttaxtype, iisactive, iisreplenish, naccumarrvnum,
        naccumdevnum, naccuminvoicenum, naccumrpnum, naccumstorenum, naccumwastnum, nassistnum, nbackarrvnum,
        nbackstorenum, nconfirmnum, ndiscountrate, nexchangeotobrate, nfeemny, nmoney, nordernum, norgnettaxprice,
        norgtaxprice, noriginalcurmny, noriginalcurprice, noriginalnetprice, noriginaltaxmny, noriginaltaxpricemny,
        ntaxmny, ntaxpricemny, ntaxrate, pk_arrvcorp, pk_arrvstoorg, pk_corp, pk_creqwareid, 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_invoicecorp, pk_reqcorp, pk_reqstoorg, pk_upsrccorp, ts, vdef1, vdef10, vdef11, vdef12, vdef13,
        vdef14, vdef15, vdef16, vdef17, vdef18, vdef19, vdef2, vdef20, vdef3, vdef4, vdef5, vdef6, vdef7, vdef8, vdef9,
        vecbilltype, vfree1, vfree2, vfree3, vfree4, vfree5, vmemo, vpriceauditcode, vproducenum, vreceiveaddress,
        vvenddevaddr, vvendinventorycode, vvendinventoryname, vvendorordercode, vvendororderrow, sts)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.blargess},#{entity.breceiveplan},#{entity.btransclosed},#{entity.cassistunit},#{entity.cbaseid},#{entity.ccloseuserid},#{entity.ccontractid},#{entity.ccontractrowid},#{entity.ccorrectrowid},#{entity.ccurrencytypeid},#{entity.cdevaddrid},#{entity.cdevareaid},#{entity.cecbillBid},#{entity.cecbillid},#{entity.closingreason},#{entity.cmangid},#{entity.coperator},#{entity.corderid},#{entity.cpriceauditBb1id},#{entity.cpriceauditBid},#{entity.cpriceauditid},#{entity.cprojectid},#{entity.cprojectphaseid},#{entity.cqpbaseschemeid},#{entity.crowno},#{entity.csourcebillid},#{entity.csourcebilltype},#{entity.csourcerowid},#{entity.cupsourcebillid},#{entity.cupsourcebillrowid},#{entity.cupsourcebilltype},#{entity.cusedeptid},#{entity.cvenddevaddrid},#{entity.cvenddevareaid},#{entity.cwarehouseid},#{entity.dclosedate},#{entity.dconfirmdate},#{entity.dcorrectdate},#{entity.dplanarrvdate},#{entity.dr},#{entity.forderrowstatus},#{entity.idiscounttaxtype},#{entity.iisactive},#{entity.iisreplenish},#{entity.naccumarrvnum},#{entity.naccumdevnum},#{entity.naccuminvoicenum},#{entity.naccumrpnum},#{entity.naccumstorenum},#{entity.naccumwastnum},#{entity.nassistnum},#{entity.nbackarrvnum},#{entity.nbackstorenum},#{entity.nconfirmnum},#{entity.ndiscountrate},#{entity.nexchangeotobrate},#{entity.nfeemny},#{entity.nmoney},#{entity.nordernum},#{entity.norgnettaxprice},#{entity.norgtaxprice},#{entity.noriginalcurmny},#{entity.noriginalcurprice},#{entity.noriginalnetprice},#{entity.noriginaltaxmny},#{entity.noriginaltaxpricemny},#{entity.ntaxmny},#{entity.ntaxpricemny},#{entity.ntaxrate},#{entity.pkArrvcorp},#{entity.pkArrvstoorg},#{entity.pkCorp},#{entity.pkCreqwareid},#{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.pkInvoicecorp},#{entity.pkReqcorp},#{entity.pkReqstoorg},#{entity.pkUpsrccorp},#{entity.ts},#{entity.vdef1},#{entity.vdef10},#{entity.vdef11},#{entity.vdef12},#{entity.vdef13},#{entity.vdef14},#{entity.vdef15},#{entity.vdef16},#{entity.vdef17},#{entity.vdef18},#{entity.vdef19},#{entity.vdef2},#{entity.vdef20},#{entity.vdef3},#{entity.vdef4},#{entity.vdef5},#{entity.vdef6},#{entity.vdef7},#{entity.vdef8},#{entity.vdef9},#{entity.vecbilltype},#{entity.vfree1},#{entity.vfree2},#{entity.vfree3},#{entity.vfree4},#{entity.vfree5},#{entity.vmemo},#{entity.vpriceauditcode},#{entity.vproducenum},#{entity.vreceiveaddress},#{entity.vvenddevaddr},#{entity.vvendinventorycode},#{entity.vvendinventoryname},#{entity.vvendorordercode},#{entity.vvendororderrow},
            'Y')
        </foreach>
    </insert>
    <!-- 批量新增或者修改-->
    <insert id="entityInsertOrUpdateBatch" keyProperty="corderBid" useGeneratedKeys="true">
        insert into po_order_b(blargess, breceiveplan, btransclosed, cassistunit, cbaseid, ccloseuserid, ccontractid,
        ccontractrowid, ccorrectrowid, ccurrencytypeid, cdevaddrid, cdevareaid, cecbill_bid, cecbillid, closingreason,
        cmangid, coperator, corderid, cpriceaudit_bb1id, cpriceaudit_bid, cpriceauditid, cprojectid, cprojectphaseid,
        cqpbaseschemeid, crowno, csourcebillid, csourcebilltype, csourcerowid, cupsourcebillid, cupsourcebillrowid,
        cupsourcebilltype, cusedeptid, cvenddevaddrid, cvenddevareaid, cwarehouseid, dclosedate, dconfirmdate,
        dcorrectdate, dplanarrvdate, dr, forderrowstatus, idiscounttaxtype, iisactive, iisreplenish, naccumarrvnum,
        naccumdevnum, naccuminvoicenum, naccumrpnum, naccumstorenum, naccumwastnum, nassistnum, nbackarrvnum,
        nbackstorenum, nconfirmnum, ndiscountrate, nexchangeotobrate, nfeemny, nmoney, nordernum, norgnettaxprice,
        norgtaxprice, noriginalcurmny, noriginalcurprice, noriginalnetprice, noriginaltaxmny, noriginaltaxpricemny,
        ntaxmny, ntaxpricemny, ntaxrate, pk_arrvcorp, pk_arrvstoorg, pk_corp, pk_creqwareid, 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_invoicecorp, pk_reqcorp, pk_reqstoorg, pk_upsrccorp, ts, vdef1, vdef10, vdef11, vdef12, vdef13,
        vdef14, vdef15, vdef16, vdef17, vdef18, vdef19, vdef2, vdef20, vdef3, vdef4, vdef5, vdef6, vdef7, vdef8, vdef9,
        vecbilltype, vfree1, vfree2, vfree3, vfree4, vfree5, vmemo, vpriceauditcode, vproducenum, vreceiveaddress,
        vvenddevaddr, vvendinventorycode, vvendinventoryname, vvendorordercode, vvendororderrow)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.blargess},#{entity.breceiveplan},#{entity.btransclosed},#{entity.cassistunit},#{entity.cbaseid},#{entity.ccloseuserid},#{entity.ccontractid},#{entity.ccontractrowid},#{entity.ccorrectrowid},#{entity.ccurrencytypeid},#{entity.cdevaddrid},#{entity.cdevareaid},#{entity.cecbillBid},#{entity.cecbillid},#{entity.closingreason},#{entity.cmangid},#{entity.coperator},#{entity.corderid},#{entity.cpriceauditBb1id},#{entity.cpriceauditBid},#{entity.cpriceauditid},#{entity.cprojectid},#{entity.cprojectphaseid},#{entity.cqpbaseschemeid},#{entity.crowno},#{entity.csourcebillid},#{entity.csourcebilltype},#{entity.csourcerowid},#{entity.cupsourcebillid},#{entity.cupsourcebillrowid},#{entity.cupsourcebilltype},#{entity.cusedeptid},#{entity.cvenddevaddrid},#{entity.cvenddevareaid},#{entity.cwarehouseid},#{entity.dclosedate},#{entity.dconfirmdate},#{entity.dcorrectdate},#{entity.dplanarrvdate},#{entity.dr},#{entity.forderrowstatus},#{entity.idiscounttaxtype},#{entity.iisactive},#{entity.iisreplenish},#{entity.naccumarrvnum},#{entity.naccumdevnum},#{entity.naccuminvoicenum},#{entity.naccumrpnum},#{entity.naccumstorenum},#{entity.naccumwastnum},#{entity.nassistnum},#{entity.nbackarrvnum},#{entity.nbackstorenum},#{entity.nconfirmnum},#{entity.ndiscountrate},#{entity.nexchangeotobrate},#{entity.nfeemny},#{entity.nmoney},#{entity.nordernum},#{entity.norgnettaxprice},#{entity.norgtaxprice},#{entity.noriginalcurmny},#{entity.noriginalcurprice},#{entity.noriginalnetprice},#{entity.noriginaltaxmny},#{entity.noriginaltaxpricemny},#{entity.ntaxmny},#{entity.ntaxpricemny},#{entity.ntaxrate},#{entity.pkArrvcorp},#{entity.pkArrvstoorg},#{entity.pkCorp},#{entity.pkCreqwareid},#{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.pkInvoicecorp},#{entity.pkReqcorp},#{entity.pkReqstoorg},#{entity.pkUpsrccorp},#{entity.ts},#{entity.vdef1},#{entity.vdef10},#{entity.vdef11},#{entity.vdef12},#{entity.vdef13},#{entity.vdef14},#{entity.vdef15},#{entity.vdef16},#{entity.vdef17},#{entity.vdef18},#{entity.vdef19},#{entity.vdef2},#{entity.vdef20},#{entity.vdef3},#{entity.vdef4},#{entity.vdef5},#{entity.vdef6},#{entity.vdef7},#{entity.vdef8},#{entity.vdef9},#{entity.vecbilltype},#{entity.vfree1},#{entity.vfree2},#{entity.vfree3},#{entity.vfree4},#{entity.vfree5},#{entity.vmemo},#{entity.vpriceauditcode},#{entity.vproducenum},#{entity.vreceiveaddress},#{entity.vvenddevaddr},#{entity.vvendinventorycode},#{entity.vvendinventoryname},#{entity.vvendorordercode},#{entity.vvendororderrow})
        </foreach>
        on duplicate key update
        blargess = values(blargess),
        breceiveplan = values(breceiveplan),
        btransclosed = values(btransclosed),
        cassistunit = values(cassistunit),
        cbaseid = values(cbaseid),
        ccloseuserid = values(ccloseuserid),
        ccontractid = values(ccontractid),
        ccontractrowid = values(ccontractrowid),
        ccorrectrowid = values(ccorrectrowid),
        ccurrencytypeid = values(ccurrencytypeid),
        cdevaddrid = values(cdevaddrid),
        cdevareaid = values(cdevareaid),
        cecbill_bid = values(cecbill_bid),
        cecbillid = values(cecbillid),
        closingreason = values(closingreason),
        cmangid = values(cmangid),
        coperator = values(coperator),
        corderid = values(corderid),
        cpriceaudit_bb1id = values(cpriceaudit_bb1id),
        cpriceaudit_bid = values(cpriceaudit_bid),
        cpriceauditid = values(cpriceauditid),
        cprojectid = values(cprojectid),
        cprojectphaseid = values(cprojectphaseid),
        cqpbaseschemeid = values(cqpbaseschemeid),
        crowno = values(crowno),
        csourcebillid = values(csourcebillid),
        csourcebilltype = values(csourcebilltype),
        csourcerowid = values(csourcerowid),
        cupsourcebillid = values(cupsourcebillid),
        cupsourcebillrowid = values(cupsourcebillrowid),
        cupsourcebilltype = values(cupsourcebilltype),
        cusedeptid = values(cusedeptid),
        cvenddevaddrid = values(cvenddevaddrid),
        cvenddevareaid = values(cvenddevareaid),
        cwarehouseid = values(cwarehouseid),
        dclosedate = values(dclosedate),
        dconfirmdate = values(dconfirmdate),
        dcorrectdate = values(dcorrectdate),
        dplanarrvdate = values(dplanarrvdate),
        dr = values(dr),
        forderrowstatus = values(forderrowstatus),
        idiscounttaxtype = values(idiscounttaxtype),
        iisactive = values(iisactive),
        iisreplenish = values(iisreplenish),
        naccumarrvnum = values(naccumarrvnum),
        naccumdevnum = values(naccumdevnum),
        naccuminvoicenum = values(naccuminvoicenum),
        naccumrpnum = values(naccumrpnum),
        naccumstorenum = values(naccumstorenum),
        naccumwastnum = values(naccumwastnum),
        nassistnum = values(nassistnum),
        nbackarrvnum = values(nbackarrvnum),
        nbackstorenum = values(nbackstorenum),
        nconfirmnum = values(nconfirmnum),
        ndiscountrate = values(ndiscountrate),
        nexchangeotobrate = values(nexchangeotobrate),
        nfeemny = values(nfeemny),
        nmoney = values(nmoney),
        nordernum = values(nordernum),
        norgnettaxprice = values(norgnettaxprice),
        norgtaxprice = values(norgtaxprice),
        noriginalcurmny = values(noriginalcurmny),
        noriginalcurprice = values(noriginalcurprice),
        noriginalnetprice = values(noriginalnetprice),
        noriginaltaxmny = values(noriginaltaxmny),
        noriginaltaxpricemny = values(noriginaltaxpricemny),
        ntaxmny = values(ntaxmny),
        ntaxpricemny = values(ntaxpricemny),
        ntaxrate = values(ntaxrate),
        pk_arrvcorp = values(pk_arrvcorp),
        pk_arrvstoorg = values(pk_arrvstoorg),
        pk_corp = values(pk_corp),
        pk_creqwareid = values(pk_creqwareid),
        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_invoicecorp = values(pk_invoicecorp),
        pk_reqcorp = values(pk_reqcorp),
        pk_reqstoorg = values(pk_reqstoorg),
        pk_upsrccorp = values(pk_upsrccorp),
        ts = values(ts),
        vdef1 = values(vdef1),
        vdef10 = values(vdef10),
        vdef11 = values(vdef11),
        vdef12 = values(vdef12),
        vdef13 = values(vdef13),
        vdef14 = values(vdef14),
        vdef15 = values(vdef15),
        vdef16 = values(vdef16),
        vdef17 = values(vdef17),
        vdef18 = values(vdef18),
        vdef19 = values(vdef19),
        vdef2 = values(vdef2),
        vdef20 = values(vdef20),
        vdef3 = values(vdef3),
        vdef4 = values(vdef4),
        vdef5 = values(vdef5),
        vdef6 = values(vdef6),
        vdef7 = values(vdef7),
        vdef8 = values(vdef8),
        vdef9 = values(vdef9),
        vecbilltype = values(vecbilltype),
        vfree1 = values(vfree1),
        vfree2 = values(vfree2),
        vfree3 = values(vfree3),
        vfree4 = values(vfree4),
        vfree5 = values(vfree5),
        vmemo = values(vmemo),
        vpriceauditcode = values(vpriceauditcode),
        vproducenum = values(vproducenum),
        vreceiveaddress = values(vreceiveaddress),
        vvenddevaddr = values(vvenddevaddr),
        vvendinventorycode = values(vvendinventorycode),
        vvendinventoryname = values(vvendinventoryname),
        vvendorordercode = values(vvendorordercode),
        vvendororderrow = values(vvendororderrow)
    </insert>
    <!--通过主键修改方法-->
    <update id="entity_update" parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        update po_order_b set
        <trim suffix="" suffixOverrides=",">
            <if test="blargess != null and blargess != ''">blargess = #{blargess},</if>
            <if test="breceiveplan != null and breceiveplan != ''">breceiveplan = #{breceiveplan},</if>
            <if test="btransclosed != null and btransclosed != ''">btransclosed = #{btransclosed},</if>
            <if test="cassistunit != null and cassistunit != ''">cassistunit = #{cassistunit},</if>
            <if test="cbaseid != null and cbaseid != ''">cbaseid = #{cbaseid},</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">ccloseuserid = #{ccloseuserid},</if>
            <if test="ccontractid != null and ccontractid != ''">ccontractid = #{ccontractid},</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">ccontractrowid = #{ccontractrowid},</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">ccorrectrowid = #{ccorrectrowid},</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">ccurrencytypeid = #{ccurrencytypeid},</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">cdevaddrid = #{cdevaddrid},</if>
            <if test="cdevareaid != null and cdevareaid != ''">cdevareaid = #{cdevareaid},</if>
            <if test="cecbillBid != null and cecbillBid != ''">cecbill_bid = #{cecbillBid},</if>
            <if test="cecbillid != null and cecbillid != ''">cecbillid = #{cecbillid},</if>
            <if test="closingreason != null and closingreason != ''">closingreason = #{closingreason},</if>
            <if test="cmangid != null and cmangid != ''">cmangid = #{cmangid},</if>
            <if test="coperator != null and coperator != ''">coperator = #{coperator},</if>
            <if test="corderid != null and corderid != ''">corderid = #{corderid},</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">cpriceaudit_bb1id = #{cpriceauditBb1id},</if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">cpriceaudit_bid = #{cpriceauditBid},</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">cpriceauditid = #{cpriceauditid},</if>
            <if test="cprojectid != null and cprojectid != ''">cprojectid = #{cprojectid},</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">cprojectphaseid = #{cprojectphaseid},</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">cqpbaseschemeid = #{cqpbaseschemeid},</if>
            <if test="crowno != null and crowno != ''">crowno = #{crowno},</if>
            <if test="csourcebillid != null and csourcebillid != ''">csourcebillid = #{csourcebillid},</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">csourcebilltype = #{csourcebilltype},</if>
            <if test="csourcerowid != null and csourcerowid != ''">csourcerowid = #{csourcerowid},</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">cupsourcebillid = #{cupsourcebillid},</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">cupsourcebillrowid =
                #{cupsourcebillrowid},
            </if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">cupsourcebilltype = #{cupsourcebilltype},
            </if>
            <if test="cusedeptid != null and cusedeptid != ''">cusedeptid = #{cusedeptid},</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">cvenddevaddrid = #{cvenddevaddrid},</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">cvenddevareaid = #{cvenddevareaid},</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">cwarehouseid = #{cwarehouseid},</if>
            <if test="dclosedate != null and dclosedate != ''">dclosedate = #{dclosedate},</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">dconfirmdate = #{dconfirmdate},</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">dcorrectdate = #{dcorrectdate},</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">dplanarrvdate = #{dplanarrvdate},</if>
            <if test="dr != null">dr = #{dr},</if>
            <if test="forderrowstatus != null">forderrowstatus = #{forderrowstatus},</if>
            <if test="idiscounttaxtype != null">idiscounttaxtype = #{idiscounttaxtype},</if>
            <if test="iisactive != null">iisactive = #{iisactive},</if>
            <if test="iisreplenish != null">iisreplenish = #{iisreplenish},</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">naccumarrvnum = #{naccumarrvnum},</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">naccumdevnum = #{naccumdevnum},</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">naccuminvoicenum = #{naccuminvoicenum},</if>
            <if test="naccumrpnum != null and naccumrpnum != ''">naccumrpnum = #{naccumrpnum},</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">naccumstorenum = #{naccumstorenum},</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">naccumwastnum = #{naccumwastnum},</if>
            <if test="nassistnum != null and nassistnum != ''">nassistnum = #{nassistnum},</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">nbackarrvnum = #{nbackarrvnum},</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">nbackstorenum = #{nbackstorenum},</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">nconfirmnum = #{nconfirmnum},</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">ndiscountrate = #{ndiscountrate},</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">nexchangeotobrate = #{nexchangeotobrate},
            </if>
            <if test="nfeemny != null and nfeemny != ''">nfeemny = #{nfeemny},</if>
            <if test="nmoney != null and nmoney != ''">nmoney = #{nmoney},</if>
            <if test="nordernum != null and nordernum != ''">nordernum = #{nordernum},</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">norgnettaxprice = #{norgnettaxprice},</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">norgtaxprice = #{norgtaxprice},</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">noriginalcurmny = #{noriginalcurmny},</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">noriginalcurprice = #{noriginalcurprice},
            </if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">noriginalnetprice = #{noriginalnetprice},
            </if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">noriginaltaxmny = #{noriginaltaxmny},</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">noriginaltaxpricemny =
                #{noriginaltaxpricemny},
            </if>
            <if test="ntaxmny != null and ntaxmny != ''">ntaxmny = #{ntaxmny},</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">ntaxpricemny = #{ntaxpricemny},</if>
            <if test="ntaxrate != null and ntaxrate != ''">ntaxrate = #{ntaxrate},</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">pk_arrvcorp = #{pkArrvcorp},</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">pk_arrvstoorg = #{pkArrvstoorg},</if>
            <if test="pkCorp != null and pkCorp != ''">pk_corp = #{pkCorp},</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">pk_creqwareid = #{pkCreqwareid},</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="pkInvoicecorp != null and pkInvoicecorp != ''">pk_invoicecorp = #{pkInvoicecorp},</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">pk_reqcorp = #{pkReqcorp},</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">pk_reqstoorg = #{pkReqstoorg},</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">pk_upsrccorp = #{pkUpsrccorp},</if>
            <if test="ts != null and ts != ''">ts = #{ts},</if>
            <if test="vdef1 != null and vdef1 != ''">vdef1 = #{vdef1},</if>
            <if test="vdef10 != null and vdef10 != ''">vdef10 = #{vdef10},</if>
            <if test="vdef11 != null and vdef11 != ''">vdef11 = #{vdef11},</if>
            <if test="vdef12 != null and vdef12 != ''">vdef12 = #{vdef12},</if>
            <if test="vdef13 != null and vdef13 != ''">vdef13 = #{vdef13},</if>
            <if test="vdef14 != null and vdef14 != ''">vdef14 = #{vdef14},</if>
            <if test="vdef15 != null and vdef15 != ''">vdef15 = #{vdef15},</if>
            <if test="vdef16 != null and vdef16 != ''">vdef16 = #{vdef16},</if>
            <if test="vdef17 != null and vdef17 != ''">vdef17 = #{vdef17},</if>
            <if test="vdef18 != null and vdef18 != ''">vdef18 = #{vdef18},</if>
            <if test="vdef19 != null and vdef19 != ''">vdef19 = #{vdef19},</if>
            <if test="vdef2 != null and vdef2 != ''">vdef2 = #{vdef2},</if>
            <if test="vdef20 != null and vdef20 != ''">vdef20 = #{vdef20},</if>
            <if test="vdef3 != null and vdef3 != ''">vdef3 = #{vdef3},</if>
            <if test="vdef4 != null and vdef4 != ''">vdef4 = #{vdef4},</if>
            <if test="vdef5 != null and vdef5 != ''">vdef5 = #{vdef5},</if>
            <if test="vdef6 != null and vdef6 != ''">vdef6 = #{vdef6},</if>
            <if test="vdef7 != null and vdef7 != ''">vdef7 = #{vdef7},</if>
            <if test="vdef8 != null and vdef8 != ''">vdef8 = #{vdef8},</if>
            <if test="vdef9 != null and vdef9 != ''">vdef9 = #{vdef9},</if>
            <if test="vecbilltype != null and vecbilltype != ''">vecbilltype = #{vecbilltype},</if>
            <if test="vfree1 != null and vfree1 != ''">vfree1 = #{vfree1},</if>
            <if test="vfree2 != null and vfree2 != ''">vfree2 = #{vfree2},</if>
            <if test="vfree3 != null and vfree3 != ''">vfree3 = #{vfree3},</if>
            <if test="vfree4 != null and vfree4 != ''">vfree4 = #{vfree4},</if>
            <if test="vfree5 != null and vfree5 != ''">vfree5 = #{vfree5},</if>
            <if test="vmemo != null and vmemo != ''">vmemo = #{vmemo},</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">vpriceauditcode = #{vpriceauditcode},</if>
            <if test="vproducenum != null and vproducenum != ''">vproducenum = #{vproducenum},</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">vreceiveaddress = #{vreceiveaddress},</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">vvenddevaddr = #{vvenddevaddr},</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">vvendinventorycode =
                #{vvendinventorycode},
            </if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">vvendinventoryname =
                #{vvendinventoryname},
            </if>
            <if test="vvendorordercode != null and vvendorordercode != ''">vvendorordercode = #{vvendorordercode},</if>
            <if test="vvendororderrow != null and vvendororderrow != ''">vvendororderrow = #{vvendororderrow},</if>
        </trim>
        where corder_bid = #{corderBid}
    </update>
    <!-- 逻辑删除 -->
    <update id="entity_logicDelete" parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        update po_order_b
        set sts= 'N'
        where corder_bid = #{corderBid}
    </update>

    <!-- 多条件逻辑删除 -->
    <update id="entity_logicDelete_Multi_Condition" parameterType="com.hzya.frame.plugin.lets.entity.PoOrderBEntity">
        update po_order_b set sts= 'N'
        <trim prefix="where" prefixOverrides="and">
            <if test="blargess != null and blargess != ''">and blargess = #{blargess}</if>
            <if test="breceiveplan != null and breceiveplan != ''">and breceiveplan = #{breceiveplan}</if>
            <if test="btransclosed != null and btransclosed != ''">and btransclosed = #{btransclosed}</if>
            <if test="cassistunit != null and cassistunit != ''">and cassistunit = #{cassistunit}</if>
            <if test="cbaseid != null and cbaseid != ''">and cbaseid = #{cbaseid}</if>
            <if test="ccloseuserid != null and ccloseuserid != ''">and ccloseuserid = #{ccloseuserid}</if>
            <if test="ccontractid != null and ccontractid != ''">and ccontractid = #{ccontractid}</if>
            <if test="ccontractrowid != null and ccontractrowid != ''">and ccontractrowid = #{ccontractrowid}</if>
            <if test="ccorrectrowid != null and ccorrectrowid != ''">and ccorrectrowid = #{ccorrectrowid}</if>
            <if test="ccurrencytypeid != null and ccurrencytypeid != ''">and ccurrencytypeid = #{ccurrencytypeid}</if>
            <if test="cdevaddrid != null and cdevaddrid != ''">and cdevaddrid = #{cdevaddrid}</if>
            <if test="cdevareaid != null and cdevareaid != ''">and cdevareaid = #{cdevareaid}</if>
            <if test="cecbillBid != null and cecbillBid != ''">and cecbill_bid = #{cecbillBid}</if>
            <if test="cecbillid != null and cecbillid != ''">and cecbillid = #{cecbillid}</if>
            <if test="closingreason != null and closingreason != ''">and closingreason = #{closingreason}</if>
            <if test="cmangid != null and cmangid != ''">and cmangid = #{cmangid}</if>
            <if test="coperator != null and coperator != ''">and coperator = #{coperator}</if>
            <if test="corderBid != null and corderBid != ''">and corder_bid = #{corderBid}</if>
            <if test="corderid != null and corderid != ''">and corderid = #{corderid}</if>
            <if test="cpriceauditBb1id != null and cpriceauditBb1id != ''">and cpriceaudit_bb1id = #{cpriceauditBb1id}
            </if>
            <if test="cpriceauditBid != null and cpriceauditBid != ''">and cpriceaudit_bid = #{cpriceauditBid}</if>
            <if test="cpriceauditid != null and cpriceauditid != ''">and cpriceauditid = #{cpriceauditid}</if>
            <if test="cprojectid != null and cprojectid != ''">and cprojectid = #{cprojectid}</if>
            <if test="cprojectphaseid != null and cprojectphaseid != ''">and cprojectphaseid = #{cprojectphaseid}</if>
            <if test="cqpbaseschemeid != null and cqpbaseschemeid != ''">and cqpbaseschemeid = #{cqpbaseschemeid}</if>
            <if test="crowno != null and crowno != ''">and crowno = #{crowno}</if>
            <if test="csourcebillid != null and csourcebillid != ''">and csourcebillid = #{csourcebillid}</if>
            <if test="csourcebilltype != null and csourcebilltype != ''">and csourcebilltype = #{csourcebilltype}</if>
            <if test="csourcerowid != null and csourcerowid != ''">and csourcerowid = #{csourcerowid}</if>
            <if test="cupsourcebillid != null and cupsourcebillid != ''">and cupsourcebillid = #{cupsourcebillid}</if>
            <if test="cupsourcebillrowid != null and cupsourcebillrowid != ''">and cupsourcebillrowid =
                #{cupsourcebillrowid}
            </if>
            <if test="cupsourcebilltype != null and cupsourcebilltype != ''">and cupsourcebilltype =
                #{cupsourcebilltype}
            </if>
            <if test="cusedeptid != null and cusedeptid != ''">and cusedeptid = #{cusedeptid}</if>
            <if test="cvenddevaddrid != null and cvenddevaddrid != ''">and cvenddevaddrid = #{cvenddevaddrid}</if>
            <if test="cvenddevareaid != null and cvenddevareaid != ''">and cvenddevareaid = #{cvenddevareaid}</if>
            <if test="cwarehouseid != null and cwarehouseid != ''">and cwarehouseid = #{cwarehouseid}</if>
            <if test="dclosedate != null and dclosedate != ''">and dclosedate = #{dclosedate}</if>
            <if test="dconfirmdate != null and dconfirmdate != ''">and dconfirmdate = #{dconfirmdate}</if>
            <if test="dcorrectdate != null and dcorrectdate != ''">and dcorrectdate = #{dcorrectdate}</if>
            <if test="dplanarrvdate != null and dplanarrvdate != ''">and dplanarrvdate = #{dplanarrvdate}</if>
            <if test="dr != null">and dr = #{dr}</if>
            <if test="forderrowstatus != null">and forderrowstatus = #{forderrowstatus}</if>
            <if test="idiscounttaxtype != null">and idiscounttaxtype = #{idiscounttaxtype}</if>
            <if test="iisactive != null">and iisactive = #{iisactive}</if>
            <if test="iisreplenish != null">and iisreplenish = #{iisreplenish}</if>
            <if test="naccumarrvnum != null and naccumarrvnum != ''">and naccumarrvnum = #{naccumarrvnum}</if>
            <if test="naccumdevnum != null and naccumdevnum != ''">and naccumdevnum = #{naccumdevnum}</if>
            <if test="naccuminvoicenum != null and naccuminvoicenum != ''">and naccuminvoicenum = #{naccuminvoicenum}
            </if>
            <if test="naccumrpnum != null and naccumrpnum != ''">and naccumrpnum = #{naccumrpnum}</if>
            <if test="naccumstorenum != null and naccumstorenum != ''">and naccumstorenum = #{naccumstorenum}</if>
            <if test="naccumwastnum != null and naccumwastnum != ''">and naccumwastnum = #{naccumwastnum}</if>
            <if test="nassistnum != null and nassistnum != ''">and nassistnum = #{nassistnum}</if>
            <if test="nbackarrvnum != null and nbackarrvnum != ''">and nbackarrvnum = #{nbackarrvnum}</if>
            <if test="nbackstorenum != null and nbackstorenum != ''">and nbackstorenum = #{nbackstorenum}</if>
            <if test="nconfirmnum != null and nconfirmnum != ''">and nconfirmnum = #{nconfirmnum}</if>
            <if test="ndiscountrate != null and ndiscountrate != ''">and ndiscountrate = #{ndiscountrate}</if>
            <if test="nexchangeotobrate != null and nexchangeotobrate != ''">and nexchangeotobrate =
                #{nexchangeotobrate}
            </if>
            <if test="nfeemny != null and nfeemny != ''">and nfeemny = #{nfeemny}</if>
            <if test="nmoney != null and nmoney != ''">and nmoney = #{nmoney}</if>
            <if test="nordernum != null and nordernum != ''">and nordernum = #{nordernum}</if>
            <if test="norgnettaxprice != null and norgnettaxprice != ''">and norgnettaxprice = #{norgnettaxprice}</if>
            <if test="norgtaxprice != null and norgtaxprice != ''">and norgtaxprice = #{norgtaxprice}</if>
            <if test="noriginalcurmny != null and noriginalcurmny != ''">and noriginalcurmny = #{noriginalcurmny}</if>
            <if test="noriginalcurprice != null and noriginalcurprice != ''">and noriginalcurprice =
                #{noriginalcurprice}
            </if>
            <if test="noriginalnetprice != null and noriginalnetprice != ''">and noriginalnetprice =
                #{noriginalnetprice}
            </if>
            <if test="noriginaltaxmny != null and noriginaltaxmny != ''">and noriginaltaxmny = #{noriginaltaxmny}</if>
            <if test="noriginaltaxpricemny != null and noriginaltaxpricemny != ''">and noriginaltaxpricemny =
                #{noriginaltaxpricemny}
            </if>
            <if test="ntaxmny != null and ntaxmny != ''">and ntaxmny = #{ntaxmny}</if>
            <if test="ntaxpricemny != null and ntaxpricemny != ''">and ntaxpricemny = #{ntaxpricemny}</if>
            <if test="ntaxrate != null and ntaxrate != ''">and ntaxrate = #{ntaxrate}</if>
            <if test="pkArrvcorp != null and pkArrvcorp != ''">and pk_arrvcorp = #{pkArrvcorp}</if>
            <if test="pkArrvstoorg != null and pkArrvstoorg != ''">and pk_arrvstoorg = #{pkArrvstoorg}</if>
            <if test="pkCorp != null and pkCorp != ''">and pk_corp = #{pkCorp}</if>
            <if test="pkCreqwareid != null and pkCreqwareid != ''">and pk_creqwareid = #{pkCreqwareid}</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="pkInvoicecorp != null and pkInvoicecorp != ''">and pk_invoicecorp = #{pkInvoicecorp}</if>
            <if test="pkReqcorp != null and pkReqcorp != ''">and pk_reqcorp = #{pkReqcorp}</if>
            <if test="pkReqstoorg != null and pkReqstoorg != ''">and pk_reqstoorg = #{pkReqstoorg}</if>
            <if test="pkUpsrccorp != null and pkUpsrccorp != ''">and pk_upsrccorp = #{pkUpsrccorp}</if>
            <if test="ts != null and ts != ''">and ts = #{ts}</if>
            <if test="vdef1 != null and vdef1 != ''">and vdef1 = #{vdef1}</if>
            <if test="vdef10 != null and vdef10 != ''">and vdef10 = #{vdef10}</if>
            <if test="vdef11 != null and vdef11 != ''">and vdef11 = #{vdef11}</if>
            <if test="vdef12 != null and vdef12 != ''">and vdef12 = #{vdef12}</if>
            <if test="vdef13 != null and vdef13 != ''">and vdef13 = #{vdef13}</if>
            <if test="vdef14 != null and vdef14 != ''">and vdef14 = #{vdef14}</if>
            <if test="vdef15 != null and vdef15 != ''">and vdef15 = #{vdef15}</if>
            <if test="vdef16 != null and vdef16 != ''">and vdef16 = #{vdef16}</if>
            <if test="vdef17 != null and vdef17 != ''">and vdef17 = #{vdef17}</if>
            <if test="vdef18 != null and vdef18 != ''">and vdef18 = #{vdef18}</if>
            <if test="vdef19 != null and vdef19 != ''">and vdef19 = #{vdef19}</if>
            <if test="vdef2 != null and vdef2 != ''">and vdef2 = #{vdef2}</if>
            <if test="vdef20 != null and vdef20 != ''">and vdef20 = #{vdef20}</if>
            <if test="vdef3 != null and vdef3 != ''">and vdef3 = #{vdef3}</if>
            <if test="vdef4 != null and vdef4 != ''">and vdef4 = #{vdef4}</if>
            <if test="vdef5 != null and vdef5 != ''">and vdef5 = #{vdef5}</if>
            <if test="vdef6 != null and vdef6 != ''">and vdef6 = #{vdef6}</if>
            <if test="vdef7 != null and vdef7 != ''">and vdef7 = #{vdef7}</if>
            <if test="vdef8 != null and vdef8 != ''">and vdef8 = #{vdef8}</if>
            <if test="vdef9 != null and vdef9 != ''">and vdef9 = #{vdef9}</if>
            <if test="vecbilltype != null and vecbilltype != ''">and vecbilltype = #{vecbilltype}</if>
            <if test="vfree1 != null and vfree1 != ''">and vfree1 = #{vfree1}</if>
            <if test="vfree2 != null and vfree2 != ''">and vfree2 = #{vfree2}</if>
            <if test="vfree3 != null and vfree3 != ''">and vfree3 = #{vfree3}</if>
            <if test="vfree4 != null and vfree4 != ''">and vfree4 = #{vfree4}</if>
            <if test="vfree5 != null and vfree5 != ''">and vfree5 = #{vfree5}</if>
            <if test="vmemo != null and vmemo != ''">and vmemo = #{vmemo}</if>
            <if test="vpriceauditcode != null and vpriceauditcode != ''">and vpriceauditcode = #{vpriceauditcode}</if>
            <if test="vproducenum != null and vproducenum != ''">and vproducenum = #{vproducenum}</if>
            <if test="vreceiveaddress != null and vreceiveaddress != ''">and vreceiveaddress = #{vreceiveaddress}</if>
            <if test="vvenddevaddr != null and vvenddevaddr != ''">and vvenddevaddr = #{vvenddevaddr}</if>
            <if test="vvendinventorycode != null and vvendinventorycode != ''">and vvendinventorycode =
                #{vvendinventorycode}
            </if>
            <if test="vvendinventoryname != null and vvendinventoryname != ''">and vvendinventoryname =
                #{vvendinventoryname}
            </if>
            <if test="vvendorordercode != null and vvendorordercode != ''">and vvendorordercode = #{vvendorordercode}
            </if>
            <if test="vvendororderrow != null and vvendororderrow != ''">and vvendororderrow = #{vvendororderrow}</if>
            and sts='Y'
        </trim>
    </update>
    <!--通过主键删除-->
    <delete id="entity_delete">
        delete
        from po_order_b
        where corder_bid = #{corderBid}
    </delete>

</mapper>

