emis-service/emis-biz/src/main/resources/mapper/EmisQuotePriceMapper.xml
2025-07-10 11:43:51 +08:00

445 lines
30 KiB
XML

<?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.xdadan.erp.emis.mapper.EmisQuotePriceMapper">
<resultMap type="EmisQuotePrice" id="EmisQuotePriceResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
<result property="quoteId" column="quote_id" />
<result property="quoteCode" column="quote_code" />
<result property="quoteName" column="quote_name" />
<result property="quoteType" column="quote_type" />
<result property="customerCode" column="customer_code" />
<result property="custNo" column="cust_no" />
<result property="useSiteCode" column="use_site_code" />
<result property="transLineCode" column="trans_line_code" />
<result property="feeType" column="fee_type" />
<result property="currency" column="currency" />
<result property="prodCode" column="prod_code" />
<result property="recPayType" column="rec_pay_type" />
<result property="billType" column="bill_type" />
<result property="otherType1" column="other_type1" />
<result property="otherType2" column="other_type2" />
<result property="carryType" column="carry_type" />
<result property="status" column="status" />
<result property="dispAreaId" column="disp_area_id" />
<result property="dispAreaName" column="disp_area_name" />
<result property="dispAreaSite" column="disp_area_site" />
<result property="dispAreaSiteCode" column="disp_area_site_code" />
<result property="dispAreaSiteId" column="disp_area_site_id" />
<result property="sendAreaId" column="send_area_id" />
<result property="sendAreaName" column="send_area_name" />
<result property="sendAreaSite" column="send_area_site" />
<result property="sendAreaSiteCode" column="send_area_site_code" />
<result property="sendAreaSiteId" column="send_area_site_id" />
<result property="carriesNumber" column="carries_number" />
<result property="discardsNumber" column="discards_number" />
<result property="leastPrice" column="least_price" />
<result property="priceType" column="price_type" />
<result property="startDate" column="start_date" />
<result property="endDate" column="end_date" />
<result property="priorityLevel" column="priority_level" />
<association property="prodName" column="prod_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectProdNameByCode"/>
<association property="transLine" column="trans_line_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectLineNameByCode"/>
<association property="useSiteName" column="use_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
<association property="customerName" column="customer_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectCustomerNameByCode"/>
<association property="custName" column="cust_no" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectCustNameByCustNo"/>
<association property="exprList" column="quote_id" select="com.xdadan.erp.emis.mapper.EmisQuoteExpressionMapper.selectExprListByQuoteId"/>
</resultMap>
<sql id="selectEmisQuotePriceVo">
select quote_id, quote_code, quote_name, quote_type, customer_code, cust_no, use_site_code, trans_line_code, fee_type, currency, prod_code, rec_pay_type, bill_type, other_type1, other_type2, carry_type, status, disp_area_id, disp_area_name, disp_area_site, disp_area_site_code, disp_area_site_id, send_area_id, send_area_name, send_area_site, send_area_site_code, send_area_site_id, carries_number, discards_number, least_price, price_type, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_quote_price a
</sql>
<select id="selectEmisQuotePriceList" parameterType="EmisQuotePrice" resultMap="EmisQuotePriceResult">
<include refid="selectEmisQuotePriceVo"/>
<where>
del_flag = '0'
<if test="quoteId != null "> and quote_id = #{quoteId}</if>
<if test="quoteName != null and quoteName != ''"> and quote_name like concat('%', #{quoteName}, '%')</if>
<if test="quoteCode != null and quoteCode != ''"> and quote_code=#{quoteCode}</if>
<if test="transLineCode != null and transLineCode != ''"> and trans_line_code=#{transLineCode}</if>
<if test="quoteType != null and quoteType != ''"> and FIND_IN_SET(quote_type, #{quoteType})</if>
<if test="customerCode != null and customerCode != ''">
and customer_code=#{customerCode}
</if>
<if test="custNo != null and custNo != ''">
and cust_no=#{custNo}
</if>
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
<if test="currency != null and currency != ''"> and currency=#{currency}</if>
<if test="prodCode != null and prodCode != ''"> and FIND_IN_SET(#{prodCode}, prod_code)</if>
<if test="recPayType != null and recPayType != ''"> and rec_pay_type=#{recPayType}</if>
<if test="billType != null and billType != ''"> and bill_type= #{billType}</if>
<if test="otherType1 != null and otherType1 != ''"> and other_type1=#{otherType1}</if>
<if test="otherType2 != null and otherType2 != ''"> and other_type2=#{otherType2}</if>
<if test="carryType != null and carryType != ''"> and carry_type=#{carryType}</if>
<if test="status != null "> and status = #{status}</if>
<if test="dispAreaId != null "> and disp_area_id like concat('%', #{dispAreaId}, '%')</if>
<if test="dispAreaName != null and dispAreaName != ''"> and disp_area_name like concat('%', #{dispAreaName}, '%')</if>
<if test="dispAreaSite != null and dispAreaSite != ''"> and disp_area_site like concat('%', #{dispAreaSite}, '%')</if>
<if test="dispAreaSiteCode != null and dispAreaSiteCode != ''">
and (
exists (select 1 from emis_quote_disp_area eqda where a.disp_area_id=eqda.area_id and find_in_set(#{dispAreaSiteCode},eqda.area_site_code) )
or disp_area_site_code='-1'
)
</if>
<if test="dispAreaSiteId != null and dispAreaSiteId != ''"> and disp_area_site_id=#{dispAreaSiteId}</if>
<if test="sendAreaId != null "> and send_area_id = #{sendAreaId} </if>
<if test="sendAreaName != null and sendAreaName != ''"> and send_area_name like concat('%', #{sendAreaName}, '%')</if>
<if test="sendAreaSite != null and sendAreaSite != ''"> and send_area_site like concat('%', #{sendAreaSite}, '%')</if>
<if test="sendAreaSiteCode != null and sendAreaSiteCode != ''"> and (
exists (select 1 from emis_quote_send_area eqsa where a.send_area_id=eqsa.area_id and find_in_set(#{sendAreaSiteCode},eqsa.area_site_code) )
or send_area_site_code='-1'
)</if>
<if test="sendAreaSiteId != null and sendAreaSiteId != ''"> and send_area_site_id like concat('%', #{sendAreaSiteId}, '%')</if>
<if test="carriesNumber != null and carriesNumber != ''"> and carries_number like concat('%', #{carriesNumber}, '%')</if>
<if test="discardsNumber != null and discardsNumber != ''"> and discards_number like concat('%', #{discardsNumber}, '%')</if>
<if test="leastPrice != null "> and least_price = #{leastPrice}</if>
<if test="priceType != null and priceType != ''"> and price_type like concat('%', #{priceType}, '%')</if>
<if test="priorityLevel != null "> and priority_level = #{priorityLevel}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<if test="useSiteCode != null and useSiteCode != '' and useSiteCode != '88888'">
<!-- 包含子网点 -->
AND use_site_code in (
SELECT t3.site_code FROM(
SELECT t1.site_code,t1.parent_site_code,t1.site_name,
IF( FIND_IN_SET( parent_site_code, @parent_ids ) > 0, @parent_ids := CONCAT( @parent_ids, ',', site_code ), '0' ) AS cids
FROM ( SELECT * FROM emis_site AS t WHERE t.del_flag = '0' ORDER BY t.site_code ASC ) t1,
( SELECT @parent_ids := #{useSiteCode} ) t2
) t3
WHERE cids != '0'
UNION
SELECT #{useSiteCode} FROM dual
)
</if>
<if test="params.quoteStatus != null and params.quoteStatus==1">
and status=1
</if>
<if test="params.quoteStatus != null and params.quoteStatus==2">
and status=0
</if>
<if test="params.quoteStatus != null and params.quoteStatus==3">
and end_date <![CDATA[ < ]]> now()
</if>
<if test="params.quoteStatus != null and params.quoteStatus==4">
and start_date <![CDATA[ <= ]]> now() and end_date <![CDATA[ > ]]> now() and status=1
</if>
</where>
order by create_time desc
</select>
<!-- 获取寄件当时有效报价 -->
<select id="selectQuotePriceListByCalcDate" parameterType="EmisQuotePrice" resultMap="EmisQuotePriceResult">
<include refid="selectEmisQuotePriceVo"/>
<where>
del_flag = '0'
<if test="quoteId != null "> and quote_id = #{quoteId}</if>
<if test="quoteName != null and quoteName != ''"> and quote_name like concat('%', #{quoteName}, '%')</if>
<if test="quoteCode != null and quoteCode != ''"> and quote_code=#{quoteCode}</if>
<if test="transLineCode != null and transLineCode != ''"> and trans_line_code=#{transLineCode}</if>
<if test="quoteType != null and quoteType != ''"> and FIND_IN_SET(quote_type, #{quoteType})</if>
<if test="customerCode != null and customerCode != ''">
and customer_code=#{customerCode}
</if>
<if test="custNo != null and custNo != ''">
and cust_no=#{custNo}
</if>
<if test="feeType != null and feeType != ''"> and fee_type=#{feeType}</if>
<if test="currency != null and currency != ''"> and currency=#{currency}</if>
<if test="prodCode != null and prodCode != ''"> and FIND_IN_SET(#{prodCode}, prod_code)</if>
<if test="recPayType != null and recPayType != ''"> and rec_pay_type=#{recPayType}</if>
<if test="billType != null and billType != ''"> and bill_type= #{billType}</if>
<if test="otherType1 != null and otherType1 != ''"> and other_type1=#{otherType1}</if>
<if test="otherType2 != null and otherType2 != ''"> and other_type2=#{otherType2}</if>
<if test="carryType != null and carryType != ''"> and carry_type=#{carryType}</if>
<if test="status != null "> and status = #{status}</if>
<if test="dispAreaId != null "> and disp_area_id like concat('%', #{dispAreaId}, '%')</if>
<if test="dispAreaName != null and dispAreaName != ''"> and disp_area_name like concat('%', #{dispAreaName}, '%')</if>
<if test="dispAreaSite != null and dispAreaSite != ''"> and disp_area_site like concat('%', #{dispAreaSite}, '%')</if>
<if test="dispAreaSiteCode != null and dispAreaSiteCode != ''">
and (
exists (select 1 from emis_quote_disp_area eqda where a.disp_area_id=eqda.area_id and find_in_set(#{dispAreaSiteCode},eqda.area_site_code) )
or disp_area_site_code='-1'
)
</if>
<if test="dispAreaSiteId != null and dispAreaSiteId != ''"> and disp_area_site_id=#{dispAreaSiteId}</if>
<if test="sendAreaId != null "> and send_area_id = #{sendAreaId} </if>
<if test="sendAreaName != null and sendAreaName != ''"> and send_area_name like concat('%', #{sendAreaName}, '%')</if>
<if test="sendAreaSite != null and sendAreaSite != ''"> and send_area_site like concat('%', #{sendAreaSite}, '%')</if>
<if test="sendAreaSiteCode != null and sendAreaSiteCode != ''"> and (
exists (select 1 from emis_quote_send_area eqsa where a.send_area_id=eqsa.area_id and find_in_set(#{sendAreaSiteCode},eqsa.area_site_code) )
or send_area_site_code='-1'
)</if>
<if test="sendAreaSiteId != null and sendAreaSiteId != ''"> and send_area_site_id like concat('%', #{sendAreaSiteId}, '%')</if>
<if test="carriesNumber != null and carriesNumber != ''"> and carries_number like concat('%', #{carriesNumber}, '%')</if>
<if test="discardsNumber != null and discardsNumber != ''"> and discards_number like concat('%', #{discardsNumber}, '%')</if>
<if test="leastPrice != null "> and least_price = #{leastPrice}</if>
<if test="priceType != null and priceType != ''"> and price_type like concat('%', #{priceType}, '%')</if>
<if test="priorityLevel != null "> and priority_level = #{priorityLevel}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
<if test="useSiteCode != null and useSiteCode != '' and useSiteCode != '88888'">
<!-- 包含子网点 -->
AND use_site_code in (
SELECT t3.site_code FROM(
SELECT t1.site_code,t1.parent_site_code,t1.site_name,
IF( FIND_IN_SET( parent_site_code, @parent_ids ) > 0, @parent_ids := CONCAT( @parent_ids, ',', site_code ), '0' ) AS cids
FROM ( SELECT * FROM emis_site AS t WHERE t.del_flag = '0' ORDER BY t.site_code ASC ) t1,
( SELECT @parent_ids := #{useSiteCode} ) t2
) t3
WHERE cids != '0'
UNION
SELECT #{useSiteCode} FROM dual
)
</if>
<if test="params.quoteStatus != null and params.quoteStatus==1">
and status=1
</if>
<if test="params.quoteStatus != null and params.quoteStatus==2">
and status=0
</if>
<if test="params.quoteStatus != null and params.quoteStatus==3">
and end_date <![CDATA[ < ]]> #{calcDate}
</if>
<if test="params.quoteStatus != null and params.quoteStatus==4">
and start_date <![CDATA[ <= ]]> #{calcDate} and end_date <![CDATA[ > ]]> #{calcDate} and status=1
</if>
</where>
order by create_time desc
</select>
<select id="selectEmisQuotePriceByQuoteId" parameterType="Long" resultMap="EmisQuotePriceResult">
select quote_id, quote_code, quote_name, quote_type, customer_code, cust_no, use_site_code, trans_line_code, fee_type, currency, prod_code, rec_pay_type, bill_type, other_type1, other_type2, carry_type, status, disp_area_id, disp_area_name, disp_area_site, disp_area_site_code, disp_area_site_id, send_area_id, send_area_name, send_area_site, send_area_site_code, send_area_site_id, carries_number, discards_number, least_price, price_type, start_date, end_date, priority_level, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
from emis_quote_price a
where a.quote_id = #{quoteId}
</select>
<select id="checkUnique" parameterType="EmisQuotePrice" resultMap="EmisQuotePriceResult">
<include refid="selectEmisQuotePriceVo"/>
where del_flag='0'
and status='1'
and quote_type = #{quoteType}
<if test="quoteId != null "> and quote_id != #{quoteId}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code=#{customerCode}</if>
<if test="recPayType != null and recPayType != ''"> and rec_pay_type = #{recPayType}</if>
<if test="custNo != null and custNo != ''"> and cust_no=#{custNo}</if>
and use_site_code = #{useSiteCode}
and trans_line_code = #{transLineCode}
and prod_code = #{prodCode}
and fee_type = #{feeType}
and bill_type = #{billType}
and ( disp_area_id=#{dispAreaId} or disp_area_site_code='-1' )
and ( send_area_id=#{sendAreaId} or send_area_site_code='-1')
and (
start_date &lt;= #{endDate} and end_date &gt;= #{startDate}
)
</select>
<insert id="insertEmisQuotePrice" parameterType="EmisQuotePrice" useGeneratedKeys="true" keyProperty="quoteId">
insert into emis_quote_price
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="quoteId != null">quote_id,</if>
<if test="quoteCode != null and quoteCode != ''">quote_code,</if>
<if test="quoteName != null and quoteName != ''">quote_name,</if>
<if test="quoteType != null and quoteType != ''">quote_type,</if>
<if test="customerCode != null and customerCode != ''">customer_code,</if>
<if test="custNo != null and custNo != ''">cust_no,</if>
<if test="useSiteCode != null and useSiteCode != ''">use_site_code,</if>
<if test="transLineCode != null and transLineCode != ''">trans_line_code,</if>
<if test="feeType != null and feeType != ''">fee_type,</if>
<if test="currency != null and currency != ''">currency,</if>
<if test="prodCode != null and prodCode != ''">prod_code,</if>
<if test="recPayType != null and recPayType != ''">rec_pay_type,</if>
<if test="billType != null and billType != ''">bill_type,</if>
<if test="otherType1 != null and otherType1 != ''">other_type1,</if>
<if test="otherType2 != null and otherType2 != ''">other_type2,</if>
<if test="carryType != null and carryType != ''">carry_type,</if>
<if test="status != null">status,</if>
<if test="dispAreaId != null">disp_area_id,</if>
<if test="dispAreaName != null and dispAreaName != ''">disp_area_name,</if>
<if test="dispAreaSite != null and dispAreaSite != ''">disp_area_site,</if>
<if test="dispAreaSiteCode != null and dispAreaSiteCode != ''">disp_area_site_code,</if>
<if test="dispAreaSiteId != null and dispAreaSiteId != ''">disp_area_site_id,</if>
<if test="sendAreaId != null">send_area_id,</if>
<if test="sendAreaName != null and sendAreaName != ''">send_area_name,</if>
<if test="sendAreaSite != null and sendAreaSite != ''">send_area_site,</if>
<if test="sendAreaSiteCode != null and sendAreaSiteCode != ''">send_area_site_code,</if>
<if test="sendAreaSiteId != null and sendAreaSiteId != ''">send_area_site_id,</if>
<if test="carriesNumber != null and carriesNumber != ''">carries_number,</if>
<if test="discardsNumber != null and discardsNumber != ''">discards_number,</if>
<if test="leastPrice != null">least_price,</if>
<if test="priceType != null and priceType != ''">price_type,</if>
<if test="startDate != null">start_date,</if>
<if test="endDate != null">end_date,</if>
<if test="priorityLevel != null">priority_level,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="createSite != null and createSite != ''">create_site,</if>
<if test="updateSite != null and updateSite != ''">update_site,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quoteId != null">#{quoteId},</if>
<if test="quoteCode != null and quoteCode != ''">#{quoteCode},</if>
<if test="quoteName != null and quoteName != ''">#{quoteName},</if>
<if test="quoteType != null and quoteType != ''">#{quoteType},</if>
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
<if test="custNo != null and custNo != ''">#{custNo},</if>
<if test="useSiteCode != null and useSiteCode != ''">#{useSiteCode},</if>
<if test="transLineCode != null and transLineCode != ''">#{transLineCode},</if>
<if test="feeType != null and feeType != ''">#{feeType},</if>
<if test="currency != null and currency != ''">#{currency},</if>
<if test="prodCode != null and prodCode != ''">#{prodCode},</if>
<if test="recPayType != null and recPayType != ''">#{recPayType},</if>
<if test="billType != null and billType != ''">#{billType},</if>
<if test="otherType1 != null and otherType1 != ''">#{otherType1},</if>
<if test="otherType2 != null and otherType2 != ''">#{otherType2},</if>
<if test="carryType != null and carryType != ''">#{carryType},</if>
<if test="status != null">#{status},</if>
<if test="dispAreaId != null">#{dispAreaId},</if>
<if test="dispAreaName != null and dispAreaName != ''">#{dispAreaName},</if>
<if test="dispAreaSite != null and dispAreaSite != ''">#{dispAreaSite},</if>
<if test="dispAreaSiteCode != null and dispAreaSiteCode != ''">#{dispAreaSiteCode},</if>
<if test="dispAreaSiteId != null and dispAreaSiteId != ''">#{dispAreaSiteId},</if>
<if test="sendAreaId != null">#{sendAreaId},</if>
<if test="sendAreaName != null and sendAreaName != ''">#{sendAreaName},</if>
<if test="sendAreaSite != null and sendAreaSite != ''">#{sendAreaSite},</if>
<if test="sendAreaSiteCode != null and sendAreaSiteCode != ''">#{sendAreaSiteCode},</if>
<if test="sendAreaSiteId != null and sendAreaSiteId != ''">#{sendAreaSiteId},</if>
<if test="carriesNumber != null and carriesNumber != ''">#{carriesNumber},</if>
<if test="discardsNumber != null and discardsNumber != ''">#{discardsNumber},</if>
<if test="leastPrice != null">#{leastPrice},</if>
<if test="priceType != null and priceType != ''">#{priceType},</if>
<if test="startDate != null">#{startDate},</if>
<if test="endDate != null">#{endDate},</if>
<if test="priorityLevel != null">#{priorityLevel},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createSite != null and createSite != ''">#{createSite},</if>
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
</trim>
</insert>
<update id="updateEmisQuotePrice" parameterType="EmisQuotePrice">
update emis_quote_price
<trim prefix="SET" suffixOverrides=",">
<if test="quoteName != null and quoteName != ''">quote_name = #{quoteName},</if>
<if test="quoteType != null and quoteType != ''">quote_type = #{quoteType},</if>
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="custNo != null and custNo != ''">cust_no = #{custNo},</if>
<if test="useSiteCode != null and useSiteCode != ''">use_site_code = #{useSiteCode},</if>
<if test="transLineCode != null and transLineCode != ''">trans_line_code = #{transLineCode},</if>
<if test="feeType != null and feeType != ''">fee_type = #{feeType},</if>
<if test="currency != null and currency != ''">currency = #{currency},</if>
<if test="prodCode != null and prodCode != ''">prod_code = #{prodCode},</if>
<if test="recPayType != null and recPayType != ''">rec_pay_type = #{recPayType},</if>
<if test="billType != null and billType != ''">bill_type = #{billType},</if>
<if test="otherType1 != null and otherType1 != ''">other_type1 = #{otherType1},</if>
<if test="otherType2 != null and otherType2 != ''">other_type2 = #{otherType2},</if>
<if test="carryType != null and carryType != ''">carry_type = #{carryType},</if>
<if test="status != null">status = #{status},</if>
<if test="dispAreaId != null">disp_area_id = #{dispAreaId},</if>
<if test="dispAreaName != null and dispAreaName != ''">disp_area_name = #{dispAreaName},</if>
<if test="dispAreaSite != null and dispAreaSite != ''">disp_area_site = #{dispAreaSite},</if>
<if test="dispAreaSiteCode != null and dispAreaSiteCode != ''">disp_area_site_code = #{dispAreaSiteCode},</if>
<if test="dispAreaSiteId != null and dispAreaSiteId != ''">disp_area_site_id = #{dispAreaSiteId},</if>
<if test="sendAreaId != null">send_area_id = #{sendAreaId},</if>
<if test="sendAreaName != null and sendAreaName != ''">send_area_name = #{sendAreaName},</if>
<if test="sendAreaSite != null and sendAreaSite != ''">send_area_site = #{sendAreaSite},</if>
<if test="sendAreaSiteCode != null and sendAreaSiteCode != ''">send_area_site_code = #{sendAreaSiteCode},</if>
<if test="sendAreaSiteId != null and sendAreaSiteId != ''">send_area_site_id = #{sendAreaSiteId},</if>
<if test="carriesNumber != null and carriesNumber != ''">carries_number = #{carriesNumber},</if>
<if test="discardsNumber != null and discardsNumber != ''">discards_number = #{discardsNumber},</if>
<if test="leastPrice != null">least_price = #{leastPrice},</if>
<if test="priceType != null and priceType != ''">price_type = #{priceType},</if>
<if test="startDate != null">start_date = #{startDate},</if>
<if test="endDate != null">end_date = #{endDate},</if>
<if test="priorityLevel != null">priority_level = #{priorityLevel},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
</trim>
where quote_id = #{quoteId}
</update>
<delete id="deleteEmisQuotePriceByQuoteId" parameterType="Long">
update emis_quote_price set del_flag='1' where quote_id = #{quoteId}
</delete>
<delete id="deleteEmisQuotePriceByQuoteIds" parameterType="String">
update emis_quote_price set del_flag='1' where quote_id in
<foreach item="quoteId" collection="array" open="(" separator="," close=")">
#{quoteId}
</foreach>
</delete>
</mapper>