|  | @@ -8,7 +8,7 @@
 | 
	
		
			
				|  |  |           b.colour as colour,b.size as size,b.coding_rules as codingRules,sum(b.quantity) as quantity,a.business_type_value as businessTypeText,a.customer_order_number as customerOrderNumber,
 | 
	
		
			
				|  |  |             a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,sum(b.surplus_num) as surplusNum,DATE_FORMAT(b.pre_completion_date,'%Y-%m-%d') as preCompletionDate,
 | 
	
		
			
				|  |  |             a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,a.account as account,b.inventory_code as inventoryCode,
 | 
	
		
			
				|  |  | -           b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,
 | 
	
		
			
				|  |  | +           b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,guangpei_gate_width as guangpeiGateWidth,
 | 
	
		
			
				|  |  |             b.supplier_code as supplierCode,a.garment_nmb as garmentNmb,a.garment_factory as garmentFactory,DATE_FORMAT(b.pre_delivery_date,'%Y-%m-%d') as preDeliveryDate,b.box_number as boxNumber,
 | 
	
		
			
				|  |  |             a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
 | 
	
		
			
				|  |  |              a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,a.end_customer as endCustomer,
 | 
	
	
		
			
				|  | @@ -33,7 +33,7 @@
 | 
	
		
			
				|  |  |           b.colour as colour,b.size as size,b.coding_rules as codingRules,sum(b.quantity) as quantity,a.business_type_value as businessTypeText,a.customer_order_number as customerOrderNumber,
 | 
	
		
			
				|  |  |             a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,sum(b.surplus_num) as surplusNum,DATE_FORMAT(b.pre_completion_date,'%Y-%m-%d') as preCompletionDate,
 | 
	
		
			
				|  |  |             a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,a.account as account,b.inventory_code as inventoryCode,
 | 
	
		
			
				|  |  | -           b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,
 | 
	
		
			
				|  |  | +           b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,guangpei_gate_width as guangpeiGateWidth,
 | 
	
		
			
				|  |  |             b.supplier_code as supplierCode,a.garment_nmb as garmentNmb,a.garment_factory as garmentFactory,DATE_FORMAT(b.pre_delivery_date,'%Y-%m-%d') as preDeliveryDate,b.box_number as boxNumber,
 | 
	
		
			
				|  |  |             a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
 | 
	
		
			
				|  |  |              a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,a.end_customer as endCustomer,
 | 
	
	
		
			
				|  | @@ -106,45 +106,30 @@ ${ew.customSqlSegment}
 | 
	
		
			
				|  |  |      </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO">
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        select
 | 
	
		
			
				|  |  | -        document_no as packingHeaderNum,--装箱单编号-(发运明细单号)
 | 
	
		
			
				|  |  | -        'ACCESSORIES' as packingType,--装箱单类型-(发运明细类型,默认ACCESSORIES)
 | 
	
		
			
				|  |  | -        'NEW' as packingStatus,--装箱单状态-(发运明细状态,默认NEW)
 | 
	
		
			
				|  |  | -         '01000229' as supplierNumber,--供应商编码(收货)(收货方供应商编码)
 | 
	
		
			
				|  |  | -          create_by as preparer,--制单人
 | 
	
		
			
				|  |  | -          create_time as preparationTime--制单时间
 | 
	
		
			
				|  |  | -          from sy_shipping_details
 | 
	
		
			
				|  |  | -          where del_flag = 0 and id = #{id}
 | 
	
		
			
				|  |  | +    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
 | 
	
		
			
				|  |  | +      select
 | 
	
		
			
				|  |  | +       concat(a.document_no,'-',b.sort) as packingHeaderNum,a.document_no as attributeString1,
 | 
	
		
			
				|  |  | +          'ACCESSORIES' as packingType,'NEW' as packingStatus,b.order_number as poNo,
 | 
	
		
			
				|  |  | +          b.sy_order_data_id as attributeBigint1,b.supplier_code as supplierNumber,'成衣工厂' 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}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="pushSyShippingDeial" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        select
 | 
	
		
			
				|  |  | -          a.sort as packingLineNum, -- 行号-(发运明细行号)
 | 
	
		
			
				|  |  | -          a.order_number as poNo,--计划单号-(订单号)
 | 
	
		
			
				|  |  | -          a.sy_order_data_id as moDetailId,--计划单号行ID-(订单号行ID(母件))
 | 
	
		
			
				|  |  | -          a.item_number as styleNo, --款号
 | 
	
		
			
				|  |  | -           b.colour as color,--颜色
 | 
	
		
			
				|  |  | -           a.inventory_code as itemCode,--物料编码-(存货编码)
 | 
	
		
			
				|  |  | -          a.inventory_name as itemDesc,--项目(辅料品名)-(存货名称)
 | 
	
		
			
				|  |  | -          '' as declarationName,--报关品名
 | 
	
		
			
				|  |  | -          a.material_composition as composition,--成分-(物料成分)
 | 
	
		
			
				|  |  | -          b.guangpei_gate_width as width,--门幅
 | 
	
		
			
				|  |  | -          '' as rolls,--匹数
 | 
	
		
			
				|  |  | -          a.shipment_quantity as planPackingQty,--计划装箱数量-(发货数量)
 | 
	
		
			
				|  |  | -          a.treatment_method as treatmentMethod,--处理方式
 | 
	
		
			
				|  |  | -          a.manual_yarn_flag as manualYarnFlag,--是否手册纱
 | 
	
		
			
				|  |  | -          a.manual_yarn_unit_price as manualYarnUnitPrice,--手册纱单价
 | 
	
		
			
				|  |  | -          a.manual_yarn_proportion as manualYarnProportion,--手册纱占比
 | 
	
		
			
				|  |  | -          a.memo as remark,--备注
 | 
	
		
			
				|  |  | -          '111' as cabinetNum
 | 
	
		
			
				|  |  | -          from sy_shipping_details_item a
 | 
	
		
			
				|  |  | -          left join sy_order_data_item b
 | 
	
		
			
				|  |  | -          on a.sy_order_data_item_id = b.id
 | 
	
		
			
				|  |  | -          where a.del_flag = 0 and a.shipping_details_id = #{shippingDetailsId}
 | 
	
		
			
				|  |  | +      select b.sort as packingLineNum,
 | 
	
		
			
				|  |  | +           b.sy_order_data_item_id as moDetailId,b.item_number as styleNo,b.colour as color,
 | 
	
		
			
				|  |  | +           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
 | 
	
		
			
				|  |  | +        from sy_shipping_details_item b
 | 
	
		
			
				|  |  | +        left join sy_declaration_elements c
 | 
	
		
			
				|  |  | +        on b.elements_id = c.id
 | 
	
		
			
				|  |  | +        where b.del_flag = 0 and b.shipping_details_id = #{shippingDetailsId}
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 |