|
@@ -21,23 +21,26 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="queryShippingDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
|
|
|
- select t.* from(select a.id as id,b.id as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,a.state,
|
|
|
+ select t.* from(select 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,a.state,
|
|
|
b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,
|
|
|
- b.small_po as smallPo,b.pack_id as packId,a.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,a.declaration_name as declarationName,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.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,
|
|
|
b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
|
|
|
- b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,a.pre_completion_date as preCompletionDate,
|
|
|
+ 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,a.account as account,
|
|
|
- a.english_product_name as englishProductName,a.garment_factory as garmentFactory from sy_shipping_details a
|
|
|
+ a.english_product_name as englishProductName,b.garment_factory as garmentFactory 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 GROUP BY a.document_no,b.order_number,b.customer_abbreviation,b.sales_department,b.salesman,b.small_po,b.pack_id,b.distribution_point,
|
|
|
- b.item_number,a.pre_delivery_date,a.pre_completion_date,b.inventory_name,b.pur_or_sub_order,a.order_type,a.garment_factory order by a.document_no desc) as t
|
|
|
+where a.del_flag = 0 GROUP BY
|
|
|
+b.order_number,b.customer_abbreviation,b.sales_department,b.salesman,a.account,b.pre_delivery_date,b.order_remarks,
|
|
|
+ b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules
|
|
|
+
|
|
|
+ order by a.document_no desc) as t
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
|
</select>
|
|
@@ -92,15 +95,17 @@ ${ew.customSqlSegment}
|
|
|
|
|
|
|
|
|
<select id="displayDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo">
|
|
|
- select b.sy_order_data_id as syOrderDataId,b.id as syOrderDataItemId ,a.order_number as orderNumber,b.item_number as itemNumber,b.small_po as smallPo,b.pk_org as pkOrg,a.order_date as orderDate,b.inventory_name as inventoryName,
|
|
|
+ select b.sy_order_data_id as syOrderDataId,b.id as syOrderDataItemId ,a.order_number as orderNumber,b.item_number as itemNumber,b.small_po as smallPo,b.pk_org as pkOrg,a.order_date as orderDate,b.inventory_name as inventoryName,
|
|
|
b.colour as colour,b.size as size,b.coding_rules as codingRules,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,b.surplus_num as surplusNum,
|
|
|
- a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,a.account as account,
|
|
|
+ a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,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,a.supplier as supplier,b.unit_price_including_tax as unitPriceIncludingTax,
|
|
|
+ a.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,
|
|
|
- a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription from sy_order_data a
|
|
|
- left join sy_order_data_item b
|
|
|
+ a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription
|
|
|
+ from sy_order_data a
|
|
|
+ left join sy_order_data_item b
|
|
|
on a.id = b.sy_order_data_id and b.del_flag = 0
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
@@ -111,17 +116,17 @@ ${ew.customSqlSegment}
|
|
|
<select id="exCelQuery" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
|
|
|
select t.* from(select a.id as id,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,a.state,
|
|
|
b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,
|
|
|
- b.small_po as smallPo,b.pack_id as packId,a.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,a.declaration_name as declarationName,b.order_date as orderDate,
|
|
|
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.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,
|
|
|
b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
|
|
|
- b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,a.pre_completion_date as preCompletionDate,
|
|
|
+ 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,
|
|
|
- a.english_product_name as englishProductName,a.garment_factory as garmentFactory from sy_shipping_details a
|
|
|
+ a.english_product_name as englishProductName,b.garment_factory as garmentFactory 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 order by a.document_no desc) as t
|