|  | @@ -46,14 +46,14 @@ d.terms_of_deliveryvalue as termsOfDeliveryvalue
 | 
	
		
			
				|  |  |      <!--    查询装箱单-面料-->
 | 
	
		
			
				|  |  |      <select id="queryFabric" resultType="org.jeecg.modules.documents.syShippingOrder.entity.VO.SyPackingList">
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  select a.id as id ,GROUP_CONCAT(b.id) as itemId,a.document_No as documentNo,a.create_by as createBy,
 | 
	
		
			
				|  |  | +  select a.id as id ,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 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,sum(b.gross_weight) as grossWeight,
 | 
	
		
			
				|  |  | -  sum(b.net_weight) 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,
 | 
	
		
			
				|  |  | +  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,
 | 
	
		
			
				|  |  |    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
 | 
	
	
		
			
				|  | @@ -128,4 +128,30 @@ group by a.group_id) t group by styleNumber
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="syShippingOrderMerge" resultType="org.jeecg.modules.documents.syShippingOrder.entity.VO.SyPackingList">
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  select a.id as tailoringFabricId ,GROUP_CONCAT(b.id) as tailoringFabricItemId,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 clientAbbreviation,
 | 
	
		
			
				|  |  | +  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 boxNumber,'0' as volume,
 | 
	
		
			
				|  |  | +  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,round(sum(b.total_Price)/round(sum(b.net_weight),2),4) as price,round(sum(b.total_Price),2) 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
 | 
	
		
			
				|  |  | +    on a.id = b.sy_packing_list_fabric_id
 | 
	
		
			
				|  |  | +		left join sy_declaration_elements c
 | 
	
		
			
				|  |  | +		on b.elements_Id = c.id
 | 
	
		
			
				|  |  | +		where b.id in
 | 
	
		
			
				|  |  | +    <foreach collection="ids" item="item" separator="," open="(" close=")">
 | 
	
		
			
				|  |  | +        #{item}
 | 
	
		
			
				|  |  | +    </foreach>
 | 
	
		
			
				|  |  | +    group by c.hs_code,c.declaration_name
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  </mapper>
 |