|
@@ -209,17 +209,12 @@ group by c.group_id) t group by t.elementsId,t.styleNumber,t.smailPo,t.unitPrice
|
|
|
|
|
|
|
|
|
<select id="qeuryItemInfo" 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,order_number as orderNumber,
|
|
|
-sum(number) as number,pk_org as pkOrg,
|
|
|
-case when ready_fabric != '成衣' then sum(box_number) else box_number end as boxNumber,
|
|
|
-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, 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 order_number
|
|
|
+
|
|
|
+select sum(t.grossWeight) as grossWeight,t.orderNumber,t.tailoringFabricItemId,t.pkOrg from (
|
|
|
+select order_number as orderNumber,case when ready_fabric != '成衣' then sum(gross_weight) else gross_weight end as grossWeight,
|
|
|
+tailoring_fabric_item_id as tailoringFabricItemId,pk_org as pkOrg
|
|
|
+from sy_shipping_order_item
|
|
|
+where del_flag = 0 and sy_shipping_order_item_id = #{id} group by group_id) t group by t.orderNumber
|
|
|
</select>
|
|
|
|
|
|
|