|  | @@ -53,9 +53,9 @@
 | 
	
		
			
				|  |  |  <select id="queryShippingDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
 | 
	
		
			
				|  |  |      select t.* from(select b.is_reference as isReference,a.id as id,GROUP_CONCAT(b.id) as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,b.submit_status as submitStatus,
 | 
	
		
			
				|  |  |      b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,b.specification_and_model as specificationAndModel,
 | 
	
		
			
				|  |  | -    b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,a.declaration_name as declarationName,b.order_date as orderDate,
 | 
	
		
			
				|  |  | +    b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,b.order_date as orderDate,
 | 
	
		
			
				|  |  |      sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,b.order_quantity as orderQuantity,
 | 
	
		
			
				|  |  | -    b.is_tc as isTc,a.hs_code as hsCode,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
 | 
	
		
			
				|  |  | +    b.is_tc as isTc,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
 | 
	
		
			
				|  |  |      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,
 | 
	
	
		
			
				|  | @@ -63,9 +63,13 @@
 | 
	
		
			
				|  |  |      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,
 | 
	
		
			
				|  |  | -    a.english_product_name as englishProductName,b.garment_factory as garmentFactory,b.elements_id as elementsId from sy_shipping_details a
 | 
	
		
			
				|  |  | +    b.garment_factory as garmentFactory,b.elements_id as elementsId,
 | 
	
		
			
				|  |  | +     c.declaration_name as declarationName,c.hs_code as hsCode,c.english_product_name as englishProductName
 | 
	
		
			
				|  |  | +     from sy_shipping_details a
 | 
	
		
			
				|  |  |  left join sy_shipping_details_item b
 | 
	
		
			
				|  |  |  on a.id = b.shipping_details_id and b.del_flag = 0
 | 
	
		
			
				|  |  | +left join sy_declaration_elements c
 | 
	
		
			
				|  |  | +on b.elements_id = c.id
 | 
	
		
			
				|  |  |  where a.del_flag = 0
 | 
	
		
			
				|  |  |    AND b.inventory_ccode like '19%'
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -78,9 +82,9 @@ ${ew.customSqlSegment}
 | 
	
		
			
				|  |  |      <select id="queryShippingDetailsGarment" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
 | 
	
		
			
				|  |  |      select t.* from(select b.is_reference as isReference,a.id as id,GROUP_CONCAT(b.id) as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,b.submit_status as submitStatus,
 | 
	
		
			
				|  |  |      b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,b.specification_and_model as specificationAndModel,
 | 
	
		
			
				|  |  | -    b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,a.declaration_name as declarationName,b.order_date as orderDate,
 | 
	
		
			
				|  |  | +    b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,b.order_date as orderDate,
 | 
	
		
			
				|  |  |      sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,b.order_quantity as orderQuantity,
 | 
	
		
			
				|  |  | -    b.is_tc as isTc,a.hs_code as hsCode,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
 | 
	
		
			
				|  |  | +    b.is_tc as isTc,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
 | 
	
		
			
				|  |  |      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,
 | 
	
	
		
			
				|  | @@ -88,10 +92,13 @@ ${ew.customSqlSegment}
 | 
	
		
			
				|  |  |      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,
 | 
	
		
			
				|  |  | -    a.english_product_name as englishProductName,b.garment_factory as garmentFactory,b.elements_id as elementsId from sy_shipping_details a
 | 
	
		
			
				|  |  | +    b.garment_factory as garmentFactory,b.elements_id as elementsId,
 | 
	
		
			
				|  |  | +     c.declaration_name as declarationName,c.hs_code as hsCode,c.english_product_name as englishProductName
 | 
	
		
			
				|  |  | +     from sy_shipping_details a
 | 
	
		
			
				|  |  |  left join sy_shipping_details_item b
 | 
	
		
			
				|  |  |  on a.id = b.shipping_details_id and b.del_flag = 0
 | 
	
		
			
				|  |  | -where a.del_flag = 0
 | 
	
		
			
				|  |  | +left join sy_declaration_elements c
 | 
	
		
			
				|  |  | +on b.elements_id = c.id
 | 
	
		
			
				|  |  |    AND b.inventory_ccode not like '19%'
 | 
	
		
			
				|  |  |  GROUP BY b.group_id
 | 
	
		
			
				|  |  |   order by a.create_time desc) as t
 | 
	
	
		
			
				|  | @@ -106,11 +113,11 @@ ${ew.customSqlSegment}
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
 | 
	
		
			
				|  |  | +    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO">
 | 
	
		
			
				|  |  |        select
 | 
	
		
			
				|  |  | -       concat(a.document_no,'-',b.sort) as packingHeaderNum,a.document_no as attributeString1,
 | 
	
		
			
				|  |  | -          'ACCESSORIES' as packingType,'NEW' as packingStatus,b.pur_or_sub_order as poNo,
 | 
	
		
			
				|  |  | -          b.ompo_id as attributeBigint1,b.supplier_code as supplierNumber,'成衣工厂' as factory,
 | 
	
		
			
				|  |  | +      a.document_no as attributeString1,
 | 
	
		
			
				|  |  | +          'ACCESSORIES' as packingType,'NEW' as packingStatus,
 | 
	
		
			
				|  |  | +           '成衣工厂' as factory,
 | 
	
		
			
				|  |  |             a.create_by as preparer,a.create_time as preparationTime
 | 
	
		
			
				|  |  |            from sy_shipping_details a
 | 
	
		
			
				|  |  |            where a.del_flag = 0 and a.id = #{id}
 | 
	
	
		
			
				|  | @@ -119,13 +126,13 @@ ${ew.customSqlSegment}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="pushSyShippingDeial" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      select b.sort as packingLineNum,
 | 
	
		
			
				|  |  | +      select b.sort as packingLineNum,b.ompo_id as ompoId,b.supplier_code as supplierCode,
 | 
	
		
			
				|  |  |             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.treatment_method as treatmentMethod,b.manual_yarn_flag as manualYarnFlag,
 | 
	
		
			
				|  |  |             manual_yarn_unit_price as manualYarnUnitPrice,b.manual_yarn_proportion as manualYarnProportion,
 | 
	
		
			
				|  |  | -           '' as remark,b.submit_status as submitStatus
 | 
	
		
			
				|  |  | +           '' as remark,b.submit_status as submitStatus,b.pur_or_sub_order as ordernum
 | 
	
		
			
				|  |  |          from sy_shipping_details_item b
 | 
	
		
			
				|  |  |          left join sy_declaration_elements c
 | 
	
		
			
				|  |  |          on b.elements_id = c.id
 |