|
@@ -49,7 +49,7 @@ d.terms_of_deliveryvalue as termsOfDeliveryvalue
|
|
|
select c.hs_code as hsCode,c.declaration_name as declarationName,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 as supplier,a.plumbum_No as plumbumNo,a.customer_abbreviation as customerAbbreviation,
|
|
|
- case when b.u8_Pid is null then sum(b.actual_declared_quantity) else sum(b.gross_weight) end as Total,b.actual_declared_quantity as number,
|
|
|
+ case when b.u8_Pid is null then sum(b.actual_declared_quantity) else sum(b.gross_weight) end as Total,sum(b.actual_declared_quantity) as number,
|
|
|
sum(b.rolls) as planQuantity,
|
|
|
b.item_Number as itemNumber,b.small_Po as smallPo,round(sum(b.gross_weight),2) as grossWeight,
|
|
|
round(sum(b.net_weight),2) as netWeight,'0' as totalVolume,b.distribution_Point as distributionPoint,
|
|
@@ -87,7 +87,7 @@ sum(number) as number,
|
|
|
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,sum(total_price) as totalPrice,
|
|
|
+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
|
|
@@ -99,19 +99,21 @@ group by group_id
|
|
|
<select id="queryEelementMerge" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
|
|
|
|
|
|
select GROUP_CONCAT(a.id) as id,b.hs_code as hsCode,b.declaration_name as declarationName,b.english_product_name as englishProductName, sum(a.number) as number,a.unit_price as unitPrice,
|
|
|
-sum(a.number*a.unit_price) as totalPrice,sum(a.gross_weight) as grossWeight,sum(a.net_weight) as netWeight,'PCS' as pcs,sum(a.volume) as volume,
|
|
|
-'USD' as curr,'CHAIN' as dree,'宁波其他/宁波象山县' as place,'照章征税' as certificate,a.style_number as styleNumber,a.smail_po as smailPo,
|
|
|
-a.order_number as orderNumber,a.client_abbreviation as clientAbbreviation
|
|
|
+round(a.number*a.unit_price,2) as totalPrice,round(a.gross_weight,2) as grossWeight,round(a.net_weight,2) as netWeight,'PCS' as pcs,a.volume as volume,
|
|
|
+a.box_number as boxNumber,
|
|
|
+'USD' as curr,'CHINA' as dree,'宁波其他/宁波象山县' as place,'照章征税' as certificate,a.style_number as styleNumber,a.smail_po as smailPo,
|
|
|
+a.order_number as orderNumber,a.client_abbreviation as clientAbbreviation,'CTNS' as ctns,'KGS' as kgs,'CBM' as cbm
|
|
|
from sy_shipping_order_item a
|
|
|
left join sy_declaration_elements b
|
|
|
on a.elements_Id = b.id
|
|
|
where a.sy_shipping_order_item_id = #{id}
|
|
|
-group by b.hs_code,b.declaration_name
|
|
|
+group by a.group_id
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="queryEelement" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
|
|
|
+
|
|
|
select t.id, t.hsCode,sum(t.boxNumber) as boxNumber, t.declarationName,t.englishProductName,sum(t.number) as number,round(t.unitPrice,2) as unitPrice,
|
|
|
round(sum(t.totalPrice),2) as totalPrice,round(sum(t.grossWeight),2) as grossWeight,round(sum(t.netWeight),2) as netWeight,t.pcs,
|
|
|
round(sum(t.volume),3) as volume,t.curr,t.dree,t.place,t.certificate,t.styleNumber,t.smailPo,t.orderNumber,t.ctns,t.kgs,t.cbm,
|