|
@@ -101,49 +101,65 @@ d.terms_of_deliveryvalue as termsOfDeliveryvalue
|
|
|
|
|
|
<!-- 成衣详情-->
|
|
|
<select id="queryItem" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
|
|
|
- select t.id, t.syShippingOrderItemId, t.englishName, t.styleNumber, t.smailPo,t.createBy,
|
|
|
- sum(t.number) as number,
|
|
|
- sum(t.boxNumber) as boxNumber,t.pkOrg,
|
|
|
- sum(t.grossWeight) as grossWeight,
|
|
|
- sum(t.netWeight) as netWeight,
|
|
|
- sum(t.totalPrice) as totalPrice,
|
|
|
- sum(t.volume) as volume,
|
|
|
- t.distributionPoint, t.containerCode, t.containerNumber, t.unitPrice, t.preShipmentDate,
|
|
|
- t.salesman, t.operatingDepartment, t.purOrSubOrder,
|
|
|
- t.outsourcingFactoryForProcurement,
|
|
|
- t.memo, t.sort, t.readyFabric, t.tailoringFabricId, t.tailoringFabricItemId,t.clientAbbreviation,
|
|
|
- t.supplier
|
|
|
- from (
|
|
|
- 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,a.supplier,
|
|
|
- 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, GROUP_CONCAT(DISTINCT 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
|
|
|
+
|
|
|
<if test='type == "成衣"'>
|
|
|
+ select t.id, t.syShippingOrderItemId, t.englishName, t.styleNumber, t.smailPo,t.createBy,
|
|
|
+ sum(t.number) as number,
|
|
|
+ sum(t.boxNumber) as boxNumber,t.pkOrg,
|
|
|
+ sum(t.grossWeight) as grossWeight,
|
|
|
+ sum(t.netWeight) as netWeight,
|
|
|
+ sum(t.totalPrice) as totalPrice,
|
|
|
+ sum(t.volume) as volume,
|
|
|
+ t.distributionPoint, t.containerCode, t.containerNumber, t.unitPrice, t.preShipmentDate,
|
|
|
+ t.salesman, t.operatingDepartment, t.purOrSubOrder,
|
|
|
+ t.outsourcingFactoryForProcurement,
|
|
|
+ t.memo, t.sort, t.readyFabric, t.tailoringFabricId, t.tailoringFabricItemId,t.clientAbbreviation,
|
|
|
+ t.supplier
|
|
|
+ from (
|
|
|
+ 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,a.supplier,
|
|
|
+ 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, GROUP_CONCAT(DISTINCT 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 a.del_flag = 0 and sy_shipping_order_item_id = #{id}
|
|
|
group by c.group_id) t group by t.styleNumber,t.smailPo,t.unitPrice order by t.supplier,t.salesman,t.styleNumber,t.smailPo,t.unitPrice
|
|
|
</if>
|
|
|
<if test='type == "面辅料"'>
|
|
|
+ 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,a.supplier,
|
|
|
+ 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, GROUP_CONCAT(DISTINCT 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_fabric_item c
|
|
|
on a.tailoring_fabric_item_id = c.id
|
|
|
left join sy_declaration_elements b
|
|
|
on a.elements_Id = b.id
|
|
|
where a.del_flag = 0 and sy_shipping_order_item_id = #{id}
|
|
|
group by b.hs_code,b.declaration_name,b.declaration_unit order by style_number,smail_po desc
|
|
|
- ) t
|
|
|
</if>
|
|
|
|
|
|
|