|
@@ -24,11 +24,11 @@ a.end_customer) as endCustomer,
|
|
|
left join sy_order_data a
|
|
|
on a.id = b.sy_order_data_id
|
|
|
${ew.customSqlSegment}
|
|
|
- <if test="refer == '1'">
|
|
|
- and (sum(b.surplus_num) - sum(b.quantity)) != 0
|
|
|
+ <if test='refer == "1"'>
|
|
|
+ and b.surplus_num - b.quantity != 0
|
|
|
</if>
|
|
|
- <if test="refer == '0'">
|
|
|
- and (sum(b.surplus_num) - sum(b.quantity)) = 0
|
|
|
+ <if test='refer == "0"'>
|
|
|
+ and b.surplus_num - b.quantity = 0
|
|
|
</if>
|
|
|
|
|
|
AND b.inventory_ccode like '19%'
|
|
@@ -74,7 +74,13 @@ a.end_customer) as endCustomer,
|
|
|
b.arrival_date as arrivalDate,b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
|
|
|
b.pur_or_sub_order as purOrSubOrder,a.order_type as orderType,b.factory_unit_price as factoryUnitPrice,b.third_party as thirdParty,b.customer_order as customerOrder,
|
|
|
b.material_composition as materialComposition,b.currency_text as currencyText,b.brand_side as brandSide,b.deposit_ratio as depositRatio,
|
|
|
- b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
|
|
|
+ b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,
|
|
|
+ if(left(b.inventory_ccode,2)='19',
|
|
|
+ case customer_abbreviation
|
|
|
+ when 'International Apparel Group' then end_customer
|
|
|
+ when '宁波森语' then end_customer
|
|
|
+ else customer_abbreviation end ,
|
|
|
+ end_customer) as endCustomer,
|
|
|
b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,b.pre_completion_date as preCompletionDate,
|
|
|
b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,a.whole_order_total as wholeOrderTotal,
|
|
|
b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,b.account as account,b.supplier as supplier,
|
|
@@ -101,7 +107,13 @@ ${ew.customSqlSegment} and t.inventoryCcode LIKE '19%'
|
|
|
b.arrival_date as arrivalDate,b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
|
|
|
b.pur_or_sub_order as purOrSubOrder,a.order_type as orderType,b.factory_unit_price as factoryUnitPrice,b.third_party as thirdParty,b.customer_order as customerOrder,
|
|
|
b.material_composition as materialComposition,b.currency_text as currencyText,b.brand_side as brandSide,b.deposit_ratio as depositRatio,
|
|
|
- b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
|
|
|
+ b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,
|
|
|
+ if(left(b.inventory_ccode,2)='19',
|
|
|
+ case customer_abbreviation
|
|
|
+ when 'International Apparel Group' then end_customer
|
|
|
+ when '宁波森语' then end_customer
|
|
|
+ else customer_abbreviation end ,
|
|
|
+ end_customer) as endCustomer,
|
|
|
b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,b.pre_completion_date as preCompletionDate,
|
|
|
b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,a.whole_order_total as wholeOrderTotal,
|
|
|
b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,b.account as account,b.supplier as supplier,
|