|
|
|
@ -26,16 +26,27 @@ |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
<if test="query.username != null and query.username != ''"> |
|
|
|
AND a.NotifyNo = #{query.username} |
|
|
|
</if> |
|
|
|
and D.site is not null |
|
|
|
|
|
|
|
</where> |
|
|
|
order by a.ready_date desc ,a.delNo desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="checkEcssCoDelNotifyHeaderByDelNo" resultType="EcssCoDelNotifyHeaderData"> |
|
|
|
select a.site,a.bu_no,a.delNo,a.erp_delNo,a.ready_date,a.notifyDate,a.customer_name,a.Destination,a.shipping_mode,a.erp_flag, |
|
|
|
a.notify_status,a.remark,a.createDate,a.createBy,a.cmc_invoice,a.updateDate,a.updateBy,dbo.get_bu_desc(a.site,a.bu_no) as buDesc |
|
|
|
from ecss_CoDelNotifyHeader a |
|
|
|
<if test="site != null and site != ''"> |
|
|
|
AND a.site = #{site} |
|
|
|
</if> |
|
|
|
<if test="delNo != null and delNo != ''"> |
|
|
|
AND a.delNo = #{delNo} |
|
|
|
</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="searchEcssCoDelNotifyDetail" resultType="EcssCoDelNotifyDetailData"> |
|
|
|
select a.site,a.bu_no,a.delNo,a.item_no,a.salesOrder,a.salesOrder_item_no,a.customerPO,a.line,a.version,a.status,a.family, |
|
|
|
a.part_no,a.part_description,a.qty,a.lt,a.cmc_invoice,a.cmc_comment,a.saleType,a.awb_bl,a.shipping_number,a.forwarder_info, |
|
|
|
a.part_no,a.part_description,a.qty,a.lt,a.cmc_comment,a.saleType,a.awb_bl,a.shipping_number,a.forwarder_info, |
|
|
|
a.currency,a.tp,a.ttl_amount,a.sum_price,a.so,a.upc,a.remark,a.erp_delItemNo |
|
|
|
from ecss_CoDelNotifydetail a |
|
|
|
|
|
|
|
@ -73,19 +84,19 @@ |
|
|
|
</select> |
|
|
|
<insert id="saveEcssCoDelNotifyHeader" > |
|
|
|
insert into ecss_CoDelNotifyHeader(site,bu_no,delNo,ready_date,customer_name,Destination,shipping_mode,erp_flag,notify_status, |
|
|
|
remark,createDate,createBy,cmc_invoice) |
|
|
|
remark,createDate,createBy,cmc_invoice) |
|
|
|
values(#{site},#{buNo},#{delNo},#{readyDate},#{customerName},#{destination},#{shippingMode},'N',#{notifyStatus},#{remark},GetDate(), |
|
|
|
#{createBy},#{cmcInvoice}) |
|
|
|
</insert> |
|
|
|
<insert id="batchSaveEcssCoDelNotifyDetail"> |
|
|
|
insert into ecss_CoDelNotifyDetail (site,bu_no,delNo,item_no,salesOrder,salesOrder_item_no,customerPO,line,version, |
|
|
|
status,family,part_no,part_description,qty,lt,cmc_invoice,cmc_comment,saleType, |
|
|
|
status,family,part_no,part_description,qty,lt,cmc_comment,saleType, |
|
|
|
awb_bl,shipping_number,forwarder_info,currency,tp,ttl_amount,sum_price, |
|
|
|
so,upc,remark) |
|
|
|
values |
|
|
|
<foreach collection="list" separator="," item="item"> |
|
|
|
(#{item.site},#{item.buNo},#{item.delNo},#{item.itemNo,jdbcType=INTEGER},#{item.salesOrder},#{item.salesOrderItemNo},#{item.customerPO},#{item.line},#{item.version}, |
|
|
|
#{item.status},#{item.family},#{item.partNo},#{item.partDescription},#{item.qty,jdbcType=DECIMAL},#{item.lt,jdbcType=DECIMAL},#{item.cmcInvoice},#{item.cmcComment},#{item.saleType}, |
|
|
|
#{item.status},#{item.family},#{item.partNo},#{item.partDescription},#{item.qty,jdbcType=DECIMAL},#{item.lt,jdbcType=DECIMAL},#{item.cmcComment},#{item.saleType}, |
|
|
|
#{item.awbBl},#{item.shippingNumber},#{item.forwarderInfo},#{item.currency},#{item.tp,jdbcType=DECIMAL},#{item.ttlAmount,jdbcType=DECIMAL},#{item.sumPrice,jdbcType=DECIMAL}, |
|
|
|
#{item.so},#{item.upc},#{item.remark}) |
|
|
|
</foreach> |
|
|
|
@ -94,4 +105,25 @@ remark,createDate,createBy,cmc_invoice) |
|
|
|
<select id="checkPart" resultType="PartData"> |
|
|
|
select site,part_no from Part where site=#{site,jdbcType=VARCHAR} and part_no=#{partNo} |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="updateEcssDelHeader" > |
|
|
|
update ecss_CoDelNotifyHeader set ready_date=#{readyDate,jdbcType=TIMESTAMP} ,customer_name=#{customerName},Destination=#{destination},shipping_mode=#{shippingMode},remark=#{remark} ,cmc_invoice=#{cmcInvoice} |
|
|
|
where site=#{site} and delNo=#{delNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="changeEcssDelStatus"> |
|
|
|
update ecss_CoDelNotifyHeader set notify_status=#{notifyStatus} where site=#{site} and delNo=#{delNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<update id="updateEcssDelDetail"> |
|
|
|
update ecss_CoDelNotifyDetail set salesOrder=#{saleType},customerPO=#{customerPO},line=#{line},version=#{version}, |
|
|
|
status=#{status},family=#{family},part_no=#{partNo},part_description=#{partDescription},qty=#{qty,jdbcType=DECIMAL},lt=#{lt,jdbcType=DECIMAL},cmc_comment=#{cmcComment},saleType=#{saleType}, |
|
|
|
awb_bl=#{awbBl},shipping_number=#{shippingNumber},forwarder_info=#{forwarderInfo},currency=#{currency},tp=#{tp,jdbcType=DECIMAL},ttl_amount=#{ttlAmount,jdbcType=DECIMAL},sum_price=#{sumPrice,jdbcType=DECIMAL}, |
|
|
|
so=#{so},upc=#{upc},remark=#{remark} |
|
|
|
where site=#{site} and delNo=#{delNo} and item_no=#{itemNo} |
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteEcssDelDetail"> |
|
|
|
delete from ecss_CoDelNotifyDetail where site=#{site} and delNo=#{delNo} and item_no=#{itemNo} |
|
|
|
</delete> |
|
|
|
</mapper> |