2024-01-12 08:44:02 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
< !DOCTYPE mapper
2024-04-20 23:47:39 +00:00
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2024-01-12 08:44:02 +00:00
<mapper namespace= "com.xdadan.erp.emis.mapper.EmisQuotePriceMapper" >
2024-04-20 23:47:39 +00:00
2024-01-12 08:44:02 +00:00
<resultMap type= "EmisQuotePrice" id= "EmisQuotePriceResult" >
<result property= "quoteId" column= "quote_id" />
<result property= "quoteCode" column= "quote_code" />
2024-05-28 20:14:31 +00:00
<result property= "quoteName" column= "quote_name" />
<result property= "quoteType" column= "quote_type" />
<result property= "customerCode" column= "customer_code" />
<result property= "custNo" column= "cust_no" />
2024-01-12 08:44:02 +00:00
<result property= "useSiteCode" column= "use_site_code" />
<result property= "transLineCode" column= "trans_line_code" />
<result property= "feeType" column= "fee_type" />
<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" />
2024-05-28 20:14:31 +00:00
<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" />
2024-01-12 08:44:02 +00:00
<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" />
<result property= "remark" column= "remark" />
<result property= "tenantId" column= "tenant_id" />
<result property= "delFlag" column= "del_flag" />
<result property= "createBy" column= "create_by" />
<result property= "createTime" column= "create_time" />
<result property= "updateBy" column= "update_by" />
<result property= "updateTime" column= "update_time" />
<result property= "createSite" column= "create_site" />
<result property= "updateSite" column= "update_site" />
2024-04-22 13:06:08 +00:00
<association property= "prodName" column= "prod_code" select= "selectProdNameByCode" />
2024-04-22 13:16:06 +00:00
<association property= "transLine" column= "trans_line_code" select= "selectLineNameByCode" />
2024-04-22 13:06:08 +00:00
<association property= "useSiteName" column= "use_site_code" select= "selectSiteNameByCode" />
2024-05-28 20:14:31 +00:00
<association property= "customerName" column= "customer_code" select= "selectCustomerNameByCode" />
2024-05-30 20:53:06 +00:00
<association property= "custName" column= "cust_no" select= "selectCustNameByCustNo" />
2024-04-29 03:44:42 +00:00
<association property= "exprList" column= "quote_id" select= "selectExprListByQuoteId" />
</resultMap>
<resultMap type= "EmisQuoteExpression" id= "EmisQuoteExpressionResult" >
<result property= "id" column= "id" />
<result property= "quoteId" column= "quote_id" />
<result property= "quoteSequence" column= "quote_sequence" />
<result property= "useSiteCode" column= "use_site_code" />
<result property= "useSite" column= "use_site" />
<result property= "startWeight" column= "start_weight" />
<result property= "endWeight" column= "end_weight" />
<result property= "initialWeight" column= "initial_weight" />
<result property= "additionalWeight" column= "additional_weight" />
<result property= "conditionExpression" column= "condition_expression" />
<result property= "calculateExpression" column= "calculate_expression" />
<result property= "status" column= "status" />
<result property= "remark" column= "remark" />
<result property= "tenantId" column= "tenant_id" />
2024-01-12 08:44:02 +00:00
</resultMap>
2024-04-22 13:06:08 +00:00
<select id= "selectProdNameByCode" parameterType= "String" resultType= "string" >
2024-05-18 09:44:10 +00:00
select group_concat(a.prod_name) from emis_trans_product a where FIND_IN_SET(a.prod_code, #{code}) limit 1
2024-04-22 13:06:08 +00:00
</select>
<select id= "selectLineNameByCode" parameterType= "String" resultType= "string" >
select a.line_name from emis_trans_line a where a.line_code = #{code} limit 1
</select>
<select id= "selectSiteNameByCode" parameterType= "String" resultType= "string" >
select a.site_name from emis_site a where a.site_code = #{code} limit 1
</select>
2024-05-28 20:14:31 +00:00
<select id= "selectCustomerNameByCode" parameterType= "String" resultType= "string" >
select a.customer_name from emis_customer_user a where a.customer_code = #{code} limit 1
</select>
2024-05-30 20:53:06 +00:00
<select id= "selectCustNameByCustNo" parameterType= "String" resultType= "string" >
2024-05-31 02:23:59 +00:00
select a.customer_name from emis_customer_user a where a.monthly_pay_code = #{code} limit 1
2024-05-30 20:53:06 +00:00
</select>
2024-04-29 03:44:42 +00:00
<select id= "selectExprListByQuoteId" parameterType= "integer" resultMap= "EmisQuoteExpressionResult" >
select id, quote_id, quote_sequence, start_weight, end_weight, initial_weight, additional_weight, condition_expression, calculate_expression, status, remark
from emis_quote_expression a
where a.quote_id = #{quoteId} and a.del_flag!='1'
</select>
2024-05-28 20:14:31 +00:00
<sql id= "selectEmisQuotePriceVo" >
select quote_id, quote_code, quote_name, quote_type, customer_code, cust_no, use_site_code, trans_line_code, fee_type, 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
</sql>
2024-05-30 20:30:48 +00:00
<!-- and FIND_IN_SET(quote_type,#{quoteType}) -->
2024-04-29 03:44:42 +00:00
2024-01-12 08:44:02 +00:00
<select id= "selectEmisQuotePriceList" parameterType= "EmisQuotePrice" resultMap= "EmisQuotePriceResult" >
<include refid= "selectEmisQuotePriceVo" />
2024-04-20 23:47:39 +00:00
<where >
2024-05-18 09:44:10 +00:00
del_flag = '0'
2024-01-12 08:44:02 +00:00
<if test= "quoteId != null " > and quote_id = #{quoteId}</if>
<if test= "quoteName != null and quoteName != ''" > and quote_name like concat('%', #{quoteName}, '%')</if>
2024-05-25 16:02:38 +00:00
<if test= "quoteCode != null and quoteCode != ''" > and quote_code=#{quoteCode}</if>
<if test= "transLineCode != null and transLineCode != ''" > and trans_line_code=#{transLineCode}</if>
2024-05-28 20:14:31 +00:00
2024-05-30 20:47:37 +00:00
<if test= "quoteType != null and quoteType != ''" > and FIND_IN_SET(quote_type, #{quoteType})</if>
2024-05-30 20:30:48 +00:00
2024-05-30 20:47:37 +00:00
<if test= "customerCode != null and customerCode != ''" >
and customer_code=#{customerCode}
2024-05-30 20:30:48 +00:00
</if>
2024-05-30 20:47:37 +00:00
<if test= "custNo != null and custNo != ''" >
and cust_no=#{custNo}
2024-05-30 20:30:48 +00:00
</if>
2024-05-28 20:14:31 +00:00
2024-05-25 16:02:38 +00:00
<if test= "feeType != null and feeType != ''" > and fee_type=#{feeType}</if>
2024-05-18 09:54:12 +00:00
<if test= "prodCode != null and prodCode != ''" > and FIND_IN_SET(#{prodCode}, prod_code)</if>
2024-05-25 16:02:38 +00:00
<if test= "recPayType != null and recPayType != ''" > and rec_pay_type=#{recPayType}</if>
2024-04-29 06:01:45 +00:00
<if test= "billType != null and billType != ''" > and bill_type= #{billType}</if>
2024-05-25 16:02:38 +00:00
<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>
2024-01-12 08:44:02 +00:00
<if test= "status != null " > and status = #{status}</if>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaId != null " > and disp_area_id like concat('%', #{dispAreaId}, '%')</if>
2024-05-18 09:44:10 +00:00
2024-01-12 08:44:02 +00:00
<if test= "dispAreaName != null and dispAreaName != ''" > and disp_area_name like concat('%', #{dispAreaName}, '%')</if>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaSite != null and dispAreaSite != ''" > and disp_area_site like concat('%', #{dispAreaSite}, '%')</if>
2024-04-29 03:44:42 +00:00
2024-05-18 09:44:10 +00:00
<if test= "dispAreaSiteCode != null and dispAreaSiteCode != ''" >
and ( find_in_set(#{dispAreaSiteCode},disp_area_site_code) or disp_area_site_code='-1' )
</if>
2024-04-29 03:44:42 +00:00
2024-05-25 16:02:38 +00:00
<if test= "dispAreaSiteId != null and dispAreaSiteId != ''" > and disp_area_site_id=#{dispAreaSiteId}</if>
2024-04-29 03:44:42 +00:00
<if test= "sendAreaId != null " > and send_area_id = #{sendAreaId} </if>
2024-05-18 09:44:10 +00:00
2024-01-12 08:44:02 +00:00
<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>
2024-04-29 03:44:42 +00:00
<if test= "sendAreaSiteCode != null and sendAreaSiteCode != ''" > and ( find_in_set(#{sendAreaSiteCode},send_area_site_code) or send_area_site_code='-1')</if>
2024-01-12 08:44:02 +00:00
<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>
2024-04-22 15:51:11 +00:00
2024-01-12 08:44:02 +00:00
<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>
2024-04-22 15:43:30 +00:00
2024-05-11 05:14:13 +00:00
<if test= "useSiteCode != null and useSiteCode != ''" >
<!-- 包含子网点 -->
AND use_site_code in (
2024-05-13 18:15:37 +00:00
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'
2024-05-12 22:57:34 +00:00
UNION
SELECT #{useSiteCode} FROM dual
2024-05-11 05:14:13 +00:00
)
</if>
2024-04-22 15:51:11 +00:00
2024-04-22 15:43:30 +00:00
<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" >
2024-04-22 15:48:03 +00:00
and end_date <![CDATA[ < ]]> now()
2024-04-22 15:43:30 +00:00
</if>
<if test= "params.quoteStatus != null and params.quoteStatus==4" >
2024-04-29 05:56:25 +00:00
and start_date <![CDATA[ <= ]]> now() and end_date <![CDATA[ > ]]> now() and status=1
2024-04-22 15:43:30 +00:00
</if>
2024-01-12 08:44:02 +00:00
</where>
order by create_time desc
</select>
2024-04-20 23:47:39 +00:00
2024-01-12 08:44:02 +00:00
<select id= "selectEmisQuotePriceByQuoteId" parameterType= "Long" resultMap= "EmisQuotePriceResult" >
2024-05-29 00:44:24 +00:00
select quote_id, quote_code, quote_name, quote_type, customer_code, cust_no, use_site_code, trans_line_code, fee_type, 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
2024-01-12 08:44:02 +00:00
from emis_quote_price a
where a.quote_id = #{quoteId}
</select>
2024-04-20 23:47:39 +00:00
2024-05-28 20:14:31 +00:00
<select id= "checkUnique" parameterType= "EmisQuotePrice" resultMap= "EmisQuotePriceResult" >
<include refid= "selectEmisQuotePriceVo" />
where del_flag='0'
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= "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 rec_pay_type = #{recPayType}
and bill_type = #{billType}
and ( find_in_set(#{dispAreaSiteCode},disp_area_site_code) or disp_area_site_code='-1' )
and ( find_in_set(#{sendAreaSiteCode},send_area_site_code) or send_area_site_code='-1')
and (
( start_date <![CDATA[< ]]> #{startDate} and #{startDate} <![CDATA[<= ]]> end_date ) or ( start_date <![CDATA[< ]]> #{endDate} and #{endDate} <![CDATA[<= ]]> end_date )
)
</select>
2024-05-29 00:44:24 +00:00
2024-05-28 20:14:31 +00:00
2024-04-22 14:09:00 +00:00
<insert id= "insertEmisQuotePrice" parameterType= "EmisQuotePrice" useGeneratedKeys= "true" keyProperty= "quoteId" >
2024-01-12 08:44:02 +00:00
insert into emis_quote_price
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
2024-05-28 20:14:31 +00:00
<if test= "quoteId != null" > quote_id,</if>
2024-01-12 08:44:02 +00:00
<if test= "quoteCode != null and quoteCode != ''" > quote_code,</if>
2024-05-28 20:14:31 +00:00
<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>
2024-01-12 08:44:02 +00:00
<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= "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>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaId != null" > disp_area_id,</if>
2024-01-12 08:44:02 +00:00
<if test= "dispAreaName != null and dispAreaName != ''" > disp_area_name,</if>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaSite != null and dispAreaSite != ''" > disp_area_site,</if>
<if test= "dispAreaSiteCode != null and dispAreaSiteCode != ''" > disp_area_site_code,</if>
2024-01-12 08:44:02 +00:00
<if test= "dispAreaSiteId != null and dispAreaSiteId != ''" > disp_area_site_id,</if>
2024-04-22 10:32:02 +00:00
<if test= "sendAreaId != null" > send_area_id,</if>
2024-01-12 08:44:02 +00:00
<if test= "sendAreaName != null and sendAreaName != ''" > send_area_name,</if>
<if test= "sendAreaSite != null and sendAreaSite != ''" > send_area_site,</if>
2024-04-22 10:32:02 +00:00
<if test= "sendAreaSiteCode != null and sendAreaSiteCode != ''" > send_area_site_code,</if>
2024-01-12 08:44:02 +00:00
<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>
2024-04-20 23:47:39 +00:00
</trim>
2024-01-12 08:44:02 +00:00
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
2024-05-28 20:14:31 +00:00
<if test= "quoteId != null" > #{quoteId},</if>
2024-01-12 08:44:02 +00:00
<if test= "quoteCode != null and quoteCode != ''" > #{quoteCode},</if>
2024-05-28 20:14:31 +00:00
<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>
2024-01-12 08:44:02 +00:00
<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= "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>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaId != null" > #{dispAreaId},</if>
2024-01-12 08:44:02 +00:00
<if test= "dispAreaName != null and dispAreaName != ''" > #{dispAreaName},</if>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaSite != null and dispAreaSite != ''" > #{dispAreaSite},</if>
<if test= "dispAreaSiteCode != null and dispAreaSiteCode != ''" > #{dispAreaSiteCode},</if>
2024-01-12 08:44:02 +00:00
<if test= "dispAreaSiteId != null and dispAreaSiteId != ''" > #{dispAreaSiteId},</if>
2024-04-22 10:32:02 +00:00
<if test= "sendAreaId != null" > #{sendAreaId},</if>
2024-01-12 08:44:02 +00:00
<if test= "sendAreaName != null and sendAreaName != ''" > #{sendAreaName},</if>
<if test= "sendAreaSite != null and sendAreaSite != ''" > #{sendAreaSite},</if>
2024-04-22 10:32:02 +00:00
<if test= "sendAreaSiteCode != null and sendAreaSiteCode != ''" > #{sendAreaSiteCode},</if>
2024-01-12 08:44:02 +00:00
<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>
2024-04-20 23:47:39 +00:00
</trim>
2024-01-12 08:44:02 +00:00
</insert>
<update id= "updateEmisQuotePrice" parameterType= "EmisQuotePrice" >
update emis_quote_price
<trim prefix= "SET" suffixOverrides= "," >
<if test= "quoteCode != null and quoteCode != ''" > quote_code = #{quoteCode},</if>
2024-05-28 20:14:31 +00:00
<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>
2024-01-12 08:44:02 +00:00
<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= "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>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaId != null" > disp_area_id = #{dispAreaId},</if>
2024-01-12 08:44:02 +00:00
<if test= "dispAreaName != null and dispAreaName != ''" > disp_area_name = #{dispAreaName},</if>
2024-04-22 10:32:02 +00:00
<if test= "dispAreaSite != null and dispAreaSite != ''" > disp_area_site = #{dispAreaSite},</if>
<if test= "dispAreaSiteCode != null and dispAreaSiteCode != ''" > disp_area_site_code = #{dispAreaSiteCode},</if>
2024-01-12 08:44:02 +00:00
<if test= "dispAreaSiteId != null and dispAreaSiteId != ''" > disp_area_site_id = #{dispAreaSiteId},</if>
2024-04-22 10:32:02 +00:00
<if test= "sendAreaId != null" > send_area_id = #{sendAreaId},</if>
2024-01-12 08:44:02 +00:00
<if test= "sendAreaName != null and sendAreaName != ''" > send_area_name = #{sendAreaName},</if>
<if test= "sendAreaSite != null and sendAreaSite != ''" > send_area_site = #{sendAreaSite},</if>
2024-04-22 10:32:02 +00:00
<if test= "sendAreaSiteCode != null and sendAreaSiteCode != ''" > send_area_site_code = #{sendAreaSiteCode},</if>
2024-01-12 08:44:02 +00:00
<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= "createBy != null and createBy != ''" > create_by = #{createBy},</if>
<if test= "createTime != null" > create_time = #{createTime},</if>
<if test= "updateBy != null and updateBy != ''" > update_by = #{updateBy},</if>
<if test= "updateTime != null" > update_time = #{updateTime},</if>
<if test= "createSite != null and createSite != ''" > create_site = #{createSite},</if>
<if test= "updateSite != null and updateSite != ''" > update_site = #{updateSite},</if>
</trim>
where quote_id = #{quoteId}
</update>
<delete id= "deleteEmisQuotePriceByQuoteId" parameterType= "Long" >
delete from emis_quote_price where quote_id = #{quoteId}
</delete>
<delete id= "deleteEmisQuotePriceByQuoteIds" parameterType= "String" >
2024-04-20 23:47:39 +00:00
delete from emis_quote_price where quote_id in
2024-01-12 08:44:02 +00:00
<foreach item= "quoteId" collection= "array" open= "(" separator= "," close= ")" >
#{quoteId}
</foreach>
</delete>
</mapper>