|
@@ -82,17 +82,20 @@ d.terms_of_deliveryvalue as termsOfDeliveryvalue
|
|
|
</select>
|
|
|
|
|
|
<select id="queryItem" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
|
|
|
-SELECT GROUP_CONCAT(id) as id, sy_shipping_order_item_id as syShippingOrderItemId, english_name as englishName, style_number as styleNumber, smail_po as smailPo,create_by as createBy,
|
|
|
-sum(number) as number,
|
|
|
-case when ready_fabric != '成衣' then sum(box_number) else box_number end as boxNumber,pk_org as pkOrg,
|
|
|
-case when ready_fabric != '成衣' then sum(gross_weight) else gross_weight end as grossWeight,
|
|
|
-case when ready_fabric != '成衣' then sum(net_weight) else net_weight end as netWeight,
|
|
|
-case when ready_fabric != '成衣' then volume else volume end as volume,round(sum(total_price),2) as totalPrice,
|
|
|
-distribution_point as distributionPoint, container_code as containerCode, container_number as containerNumber, unit_price as unitPrice, pre_shipment_date as preShipmentDate,
|
|
|
-salesman, operating_department as operatingDepartment, purchase_outsourcing_order_no as purOrSubOrder, outsourcing_factory_for_procurement as outsourcingFactoryForProcurement,
|
|
|
- memo, sort, ready_fabric as readyFabric, tailoring_fabric_id as tailoringFabricId, GROUP_CONCAT(tailoring_fabric_item_id) as tailoringFabricItemId,client_abbreviation as clientAbbreviation
|
|
|
- FROM sy_shipping_order_item where del_flag = 0 and sy_shipping_order_item_id = #{id}
|
|
|
-group by group_id order by style_number,smail_po desc
|
|
|
+SELECT GROUP_CONCAT(a.id) as id, a.sy_shipping_order_item_id as syShippingOrderItemId, a.english_name as englishName, a.style_number as styleNumber, a.smail_po as smailPo,a.create_by as createBy,
|
|
|
+sum(a.number) as number,
|
|
|
+case when a.ready_fabric != '成衣' then sum(a.box_number) else a.box_number end as boxNumber,a.pk_org as pkOrg,
|
|
|
+case when a.ready_fabric != '成衣' then sum(a.gross_weight) else a.gross_weight end as grossWeight,
|
|
|
+case when a.ready_fabric != '成衣' then sum(a.net_weight) else a.net_weight end as netWeight,
|
|
|
+case when a.ready_fabric != '成衣' then a.volume else a.volume end as volume,round(sum(a.total_price),2) as totalPrice,
|
|
|
+a.distribution_point as distributionPoint, a.container_code as containerCode, a.container_number as containerNumber, a.unit_price as unitPrice, a.pre_shipment_date as preShipmentDate,
|
|
|
+a.salesman, a.operating_department as operatingDepartment, a.purchase_outsourcing_order_no as purOrSubOrder, a.outsourcing_factory_for_procurement as outsourcingFactoryForProcurement,
|
|
|
+ a.memo, a.sort, a.ready_fabric as readyFabric, a.tailoring_fabric_id as tailoringFabricId, GROUP_CONCAT(a.tailoring_fabric_item_id) as tailoringFabricItemId,a.client_abbreviation as clientAbbreviation
|
|
|
+ FROM sy_shipping_order_item a
|
|
|
+ left join sy_packing_list_tailoring_item c
|
|
|
+on a.tailoring_fabric_item_id = c.id
|
|
|
+ where del_flag = 0 and sy_shipping_order_item_id = #{id}
|
|
|
+group by c.group_id order by style_number,smail_po desc
|
|
|
</select>
|
|
|
|
|
|
|