|
@@ -3,32 +3,36 @@
|
|
|
<mapper namespace="org.jeecg.modules.documents.syShippingOrder.mapper.SyShippingOrderMapper">
|
|
|
|
|
|
<select id="syShippingOrderPageList" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrder">
|
|
|
-
|
|
|
- select id,shipping_order_number as shippingOrderNumber,order_number as orderNumber,export_invoice_no as exportInvoiceNo,
|
|
|
- distribution_point as distributionPoint,unit_in_operation as unitInOperation,box_number as boxNumber,total_gross_weight as totalGrossWeight,
|
|
|
- total_volume as totalVolume,
|
|
|
- money,the_actual_shipping_date as theActualShippingDate,exchange_earnings_text as exchangeEarningsText,
|
|
|
- consignee,bill_of_lading_or_carriage_receipt as billOfLadingOrCarriageReceipt,
|
|
|
- addressee,trade_country as tradeCountry,arrive_in_country as arriveInCountry,export_port as exportPort,
|
|
|
- notifier,nottfy,destination_port as destinationPort,latest_date_of_shipment as latestDateOfShipment,the_documents_state as theDocumentsState
|
|
|
- from sy_shipping_order where del_flag = 0
|
|
|
+ select a.id,a.shipping_order_number as shippingOrderNumber,b.order_number as orderNumber,a.export_invoice_no as exportInvoiceNo,
|
|
|
+ a.distribution_point as distributionPoint,a.unit_in_operation as unitInOperation,a.box_number as boxNumber,a.total_gross_weight as totalGrossWeight,
|
|
|
+ a.total_volume as totalVolume,
|
|
|
+ a.money,a.the_actual_shipping_date as theActualShippingDate,a.exchange_earnings_text as exchangeEarningsText,
|
|
|
+ a.consignee,a.bill_of_lading_or_carriage_receipt as billOfLadingOrCarriageReceipt,
|
|
|
+ a.addressee,a.trade_country as tradeCountry,a.arrive_in_country as arriveInCountry,a.export_port as exportPort,
|
|
|
+ a.notifier,a.nottfy,a.destination_port as destinationPort,a.latest_date_of_shipment as latestDateOfShipment,a.the_documents_state as theDocumentsState
|
|
|
+ from sy_shipping_order a
|
|
|
+ left join sy_shipping_order_item b
|
|
|
+ on a.id = b.sy_shipping_order_item_id
|
|
|
+ where a.del_flag = 0 and b.del_flag = 0
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<!-- 查询装箱单-成衣-->
|
|
|
<select id="queryTailoring" 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.depositary_receipt_no as depositaryReceiptNo,b.elements_id as elementsId,
|
|
|
- a.item_number as itemNumber,b.inventory_name as inventoryName,b.distribution_point as distributionPoint,a.customer_abbreviation as customerAbbreviation,
|
|
|
- b.item_code as itemCode,b.starting_box_number as startingBoxNumber,b.end_case_number as endCaseNumber,b.hod as preDeliveryDate,b.small_Po as smallPo,
|
|
|
- b.colour as colour,b.pieces_box as piecesBox,b.box_number as boxNumber,b.total as total,b.outer_box_length as outerBoxLength,a.customer as customer,a.order_number as orderNumber,
|
|
|
- b.outer_box_width as outerBoxWidth,b.outer_box_height as outerBoxHeight,sum(b.total_volume) as totalVolume,sum(b.total_net_weight) as totalNetWeight,b.spur_Or_Sub_Order as purOrSubOrder,
|
|
|
- sum(b.total_gross_weight) as totalGrossWeight,'成衣' as readyFabric,a.memo as memo,b.salesman as salesman,b.factory_Unit_Price as factoryUnitPrice,sum(b.total_price) as totalPrice,
|
|
|
- sum(b.plan_Quantity) as planQuantity,sum(b.actual_Packing_Qty) as actualPackingQty,a.container_code as containerCode,a.container_number as containerNumber
|
|
|
- from sy_packing_list_tailoring a
|
|
|
+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,
|
|
|
+b.plan_Quantity as number,b.box_number as planQuantity,sum(b.gross_weight) as grossWeight,sum(b.net_weight) as netWeight,
|
|
|
+b.total_volume as totalVolume,a.container_code as containerCode,a.container_number as containerNumber,
|
|
|
+a.depositary_receipt_no as depositaryReceiptNo,a.garment_factory as garmentFactory,b.unit_price as price,
|
|
|
+b.total_price as totalPrice,a.create_by as createBy,b.salesman as salesman,b.sales_Department as salesDepartment,
|
|
|
+c.english_product_name as englishProductName,'成衣' as readyFabric
|
|
|
+ from sy_packing_list_tailoring a
|
|
|
left join sy_packing_list_tailoring_item b
|
|
|
on a.id = b.sy_packing_list_tailoring_id
|
|
|
+ left join sy_declaration_elements c
|
|
|
+ on a.elements_Id = c.id
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
|
</select>
|
|
@@ -36,17 +40,19 @@
|
|
|
<!-- 查询装箱单-面料-->
|
|
|
<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,b.order_number as orderNumber,
|
|
|
- b.item_Number as itemNumber,a.customer_Abbreviation as customerAbbreviation,a.customer,b.small_Po as smallPo,b.distribution_Point as distributionPoint,
|
|
|
- b.salesman as salesman,b.pur_Or_Sub_Order as purOrSubOrder,b.factory_Unit_Price as factoryUnitPrice,'0' as totalVolume,'0' as actualPackingQty,
|
|
|
- a.depositary_receipt_no as depositaryReceiptNo,b.order_Type as orderType,sum(b.gross_weight) as totalGrossWeight,sum(b.total_Price) as totalPrice,
|
|
|
- b.inventory_name as inventoryName,sum(b.inventory_quantity) as planQuantity,sum(b.net_weight) as totalNetWeight,a.container_Code as containerCode,
|
|
|
- b.inventory_Code as itemCode,a.memo as memo,a.container_number as containerNumber,
|
|
|
- b.colour as colour,b.elements_id as elementsId,
|
|
|
- '面料' as readyFabric
|
|
|
- from sy_packing_list_fabric a
|
|
|
+ select 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_printing_plant as supplierPrintingPlant,a.plumbum_No as plumbumNo,
|
|
|
+ case when b.u8_Pid is null then sum(b.inventory_quantity) else sum(b.gross_weight) end as Total,
|
|
|
+ b.item_Number as itemNumber,b.small_Po as smallPo,b.plan_Quantity as planQuantity,sum(b.gross_weight) as grossWeight,
|
|
|
+ sum(b.net_weight) as netWeight,sum(b.total_Volume) 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
|
|
|
on a.id = b.sy_packing_list_fabric_id
|
|
|
+ left join sy_declaration_elements c
|
|
|
+ on b.elements_Id = c.id
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
|
</select>
|