Browse Source

托书合并调整

zengtx 2 years ago
parent
commit
47d02862fa

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

@@ -135,7 +135,7 @@ ${ew.customSqlSegment} and  t.inventoryCcode not LIKE '19%'
       b.r_supplier_code as rSup,b.salesman as merchandiser,b.weight as gramWeight,
            b.ompo_id_item as moDetailId,b.item_number as styleNo,b.colour as color,b.pur_or_sub_order as poNo,
            b.inventory_code as itemCode,b.inventory_name as itemDesc,c.declaration_name as declarationName,
-           b.material_composition as composition,'0' as width,'0' as rolls,b.shipment_quantity as planPackingQty,
+           b.material_composition as composition,b.guangpei_gate_width as width,'0' as rolls,b.shipment_quantity as planPackingQty,
            b.treatment_method as treatmentMethod,b.manual_yarn_flag as manualYarnFlag,b.garment_factory as garmentFactory,
            manual_yarn_unit_price as manualYarnUnitPrice,b.manual_yarn_proportion as manualYarnProportion,
            '' as remark,b.submit_status as submitStatus,b.pur_or_sub_order as ordernum

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/controller/SyShippingOrderController.java

@@ -422,7 +422,7 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 		  queryWrapper.eq("a.del_flag",0).eq("b.del_flag",0).eq("a.status",1);
 		  queryWrapper.eq("a.is_Reference",0).eq("c.del_flag",0);
 		  queryWrapper.orderByDesc("a.document_No");
-		 // queryWrapper.groupBy("b.group_id");
+		  queryWrapper.groupBy("a.document_No,b.sy_shipping_details_item_id");
 		  pageList = syShippingOrderService.queryFabric(page,queryWrapper);
 
 	  }

+ 7 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml

@@ -22,7 +22,7 @@
 select a.id as id ,GROUP_CONCAT(b.id) as itemId,a.document_No as documentNo,a.order_Number as orderNumber,
 a.item_number as itemNumber,a.customer_abbreviation as customerAbbreviation,b.hod as preDeliveryDate,
 b.small_po as smallPo,b.distribution_point as distributionPoint,b.spur_Or_Sub_Order as purOrSubOrder,
-a.total as number,a.total_Boxes as planQuantity,a.total_Gross_Weight as grossWeight,a.total_Net_Weight as netWeight,
+a.total as number,a.total_Boxes as planQuantity,round(a.total_Gross_Weight,2) as grossWeight,round(a.total_Net_Weight,2) as netWeight,
 a.total_Volume as totalVolume,a.container_code as containerCode,a.container_number as containerNumber,
 a.depositary_receipt_no as depositaryReceiptNo,b.garment_factory as garmentFactory,b.unit_price as price,
 a.total_price as totalPrice,a.create_by as createBy,b.salesman as salesman,b.sales_Department as salesDepartment,
@@ -46,14 +46,14 @@ d.terms_of_deliveryvalue as termsOfDeliveryvalue
     <!--    查询装箱单-面料-->
     <select id="queryFabric" resultType="org.jeecg.modules.documents.syShippingOrder.entity.VO.SyPackingList">
 
-  select c.hs_code as hsCode,c.declaration_name as declarationName,a.id as id ,b.id as itemId,a.document_No as documentNo,a.create_by as createBy,
+  select c.hs_code as hsCode,c.declaration_name as declarationName,a.id as id ,GROUP_CONCAT(b.id) as itemId,a.document_No as documentNo,a.create_by as createBy,
   a.export_invoice_no as exportInvoiceNo,a.container_number as containerNumber,a.garment_Factory as garmentFactory,
   b.supplier as supplier,a.plumbum_No as plumbumNo,a.customer_abbreviation as customerAbbreviation,
-  case when b.u8_Pid is null then b.actual_declared_quantity else b.gross_weight end as Total,b.actual_declared_quantity as number,
-   b.rolls as planQuantity,
-  b.item_Number as itemNumber,b.small_Po as smallPo,round(b.gross_weight,2) as grossWeight,
-  round(b.net_weight,2) as netWeight,'0' as totalVolume,b.distribution_Point as distributionPoint,
-  a.container_Code as containerCode,b.price,b.total_Price as totalPrice,b.pre_Delivery_Date as preDeliveryDate,
+  case when b.u8_Pid is null then sum(b.actual_declared_quantity) else sum(b.gross_weight) end as Total,b.actual_declared_quantity as number,
+   sum(b.rolls) as planQuantity,
+  b.item_Number as itemNumber,b.small_Po as smallPo,round(sum(b.gross_weight),2) as grossWeight,
+  round(sum(b.net_weight),2) as netWeight,'0' as totalVolume,b.distribution_Point as distributionPoint,
+  a.container_Code as containerCode,b.price,sum(b.total_Price) as totalPrice,b.pre_Delivery_Date as preDeliveryDate,
   b.salesman as salesman,b.sales_Department as salesDepartment,b.pur_Or_Sub_Order as purOrSubOrder,
   c.english_product_name as englishProductName,b.order_Number as orderNumber,'面料' as readyFabric from sy_packing_list_fabric a
     left join sy_packing_list_fabric_item b