瀏覽代碼

参照订单是否参照条件

zengtx 2 年之前
父節點
當前提交
bc38da85c7

+ 7 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/SyShippingDetailsItem.java

@@ -408,11 +408,13 @@ public class SyShippingDetailsItem {
 
 		//客户简称字段用最终客户字段替代 只针对成衣
 		if(orderDataVo.getInventoryCcode().substring(0,2).equals("19")){
-			this.customerAbbreviation = orderDataVo.getEndCustomer();
-			this.garmentFactory = orderDataVo.getSupplier();
-		}else{
-			this.customerAbbreviation = orderDataVo.getCustomerAbbreviation();
-			this.garmentFactory = orderDataVo.getGarmentFactory();
+			if(orderDataVo.getCustomerAbbreviation().equals("International Apparel Group") || orderDataVo.getCustomerAbbreviation().equals("宁波森语")) {
+				this.customerAbbreviation = orderDataVo.getEndCustomer();
+				this.garmentFactory = orderDataVo.getSupplier();
+			}else{
+				this.customerAbbreviation = orderDataVo.getCustomerAbbreviation();
+				this.garmentFactory = orderDataVo.getGarmentFactory();
+			}
 		}
 
         this.customerName = orderDataVo.getCustomerName();

+ 18 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml

@@ -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,