|
@@ -11,7 +11,7 @@
|
|
|
b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,guangpei_gate_width as guangpeiGateWidth,b.master_metering as masterMetering,
|
|
|
b.supplier_code as supplierCode,a.garment_nmb as garmentNmb,b.garment_factory as garmentFactory,DATE_FORMAT(b.pre_delivery_date,'%Y-%m-%d') as preDeliveryDate,b.box_number as boxNumber,
|
|
|
a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
|
|
|
- a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,
|
|
|
+ a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,b.is_tc as isTc,
|
|
|
if(left(b.inventory_ccode,2)='19',
|
|
|
case a.customer_abbreviation
|
|
|
when 'International Apparel Group' then a.end_customer
|
|
@@ -46,7 +46,7 @@ a.end_customer) as endCustomer,
|
|
|
a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,a.account as account,b.inventory_code as inventoryCode,
|
|
|
b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,guangpei_gate_width as guangpeiGateWidth,b.master_metering as masterMetering,
|
|
|
b.supplier_code as supplierCode,a.garment_nmb as garmentNmb,b.garment_factory as garmentFactory,DATE_FORMAT(b.pre_delivery_date,'%Y-%m-%d') as preDeliveryDate,b.box_number as boxNumber,
|
|
|
- a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
|
|
|
+ a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,b.is_tc as isTc,
|
|
|
a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,a.end_customer as endCustomer,
|
|
|
a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription,b.supplier as supplier,b.i_tax_price as iTaxPrice,
|
|
|
case when b.ymoney is null then '0' else b.ymoney end as ymoney,b.OMPO_id as OMPOId,b.inventory_ccode as inventoryCcode
|
|
@@ -177,7 +177,14 @@ ${ew.customSqlSegment} and t.inventoryCcode not LIKE '19%'
|
|
|
b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,b.number_of_sets as numberOfSets,b.guangpei_gate_width as guangpeiGateWidth,
|
|
|
b.supplier_code as supplierCode,a.garment_nmb as garmentNmb,b.garment_factory as garmentFactory,DATE_FORMAT(b.pre_delivery_date,'%Y-%m-%d') as preDeliveryDate,b.box_number as boxNumber,
|
|
|
a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
|
|
|
- a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,a.end_customer as endCustomer,
|
|
|
+ a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,
|
|
|
+ if(left(b.inventory_ccode,2)='19',
|
|
|
+ case a.customer_abbreviation
|
|
|
+ when 'International Apparel Group' then a.end_customer
|
|
|
+ when '宁波森语' then a.end_customer
|
|
|
+ else a.customer_abbreviation end ,
|
|
|
+ a.end_customer) as endCustomer,
|
|
|
+ b.is_tc as isTc,
|
|
|
a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription,b.supplier as supplier,b.i_tax_price as iTaxPrice,
|
|
|
case when b.ymoney is null then '0' else b.ymoney end as ymoney,b.ompo_id as ompoId,b.inventory_ccode as inventoryCcode,b.d_arrive_date as dArriveDate,b.master_metering as masterMetering,
|
|
|
b.ompo_id_item as ompoIdItem,b.ompo_account as ompoAccount,b.ompo_code as purOrSubOrder,b.r_supplier_code as rSupplierCode,b.r_supplier as rSupplier
|
|
@@ -221,10 +228,18 @@ ${ew.customSqlSegment}
|
|
|
<update id="writeBackElenmentId">
|
|
|
update sy_shipping_details_item
|
|
|
set elements_id = #{elementsId}
|
|
|
- where id in
|
|
|
- <foreach collection="id" item="item" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
+ <if test='type !="0"'>
|
|
|
+ where id in
|
|
|
+ <foreach collection="id" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test='type =="0"'>
|
|
|
+ where order_number = #{code} and id in
|
|
|
+ <foreach collection="id" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
|
|
|
</update>
|
|
|
|