|
@@ -24,6 +24,12 @@ a.end_customer) as endCustomer,
|
|
|
left join sy_order_data a
|
|
|
on a.id = b.sy_order_data_id
|
|
|
${ew.customSqlSegment}
|
|
|
+ <if test="refer == '1'">
|
|
|
+ and (sum(b.surplus_num) - sum(b.quantity)) != 0
|
|
|
+ </if>
|
|
|
+ <if test="refer == '0'">
|
|
|
+ and (sum(b.surplus_num) - sum(b.quantity)) = 0
|
|
|
+ </if>
|
|
|
|
|
|
AND b.inventory_ccode like '19%'
|
|
|
group by concat(a.order_number,a.customer_abbreviation,a.sales_department,a.salesman,a.account,b.pre_delivery_date,a.order_remarks,
|
|
@@ -48,7 +54,14 @@ a.end_customer) as endCustomer,
|
|
|
left join sy_order_data a
|
|
|
on a.id = b.sy_order_data_id
|
|
|
${ew.customSqlSegment}
|
|
|
- AND b.inventory_ccode not like '19%'
|
|
|
+ <if test='refer == "1"'>
|
|
|
+ and (b.surplus_num - b.quantity) != 0
|
|
|
+ </if>
|
|
|
+ <if test='refer == "0"'>
|
|
|
+ and (b.surplus_num - b.quantity) = 0
|
|
|
+ </if>
|
|
|
+
|
|
|
+ AND b.inventory_ccode not like '19%'
|
|
|
</select>
|
|
|
|
|
|
|
|
@@ -243,7 +256,7 @@ ${ew.customSqlSegment}
|
|
|
b.inventory_code as inventoryCode,b.inventory_name as inventoryName,c.declaration_name as declarationName,a.create_by as createBy,a.create_time as createTime,
|
|
|
b.material_composition as materialComposition,b.guangpei_gate_width as guangpeiGateWidth,b.weight as weight,b.is_reference as isReference,
|
|
|
b.excess_quantity as excessQuantity,c.declaration_unit as masterMetering,b.garment_factory as garmentFactory,b.shipment_quantity as shipmentQuantity,
|
|
|
- b.id as itemIds,a.id as id,b.elements_id as elementsId,b.r_supplier_code as rSupplierCode,b.r_supplier as rSupplier,
|
|
|
+ b.id as itemIds,a.id as id,b.elements_id as elementsId,b.r_supplier_code as rSupplierCode,b.r_supplier as rSupplier,b.account as account,
|
|
|
b.supplier,b.supplier_code as supplierCode,b.specification_and_model as specificationAndModel,b.inventory_ccode as inventoryCcode
|
|
|
from sy_shipping_details a
|
|
|
left join sy_shipping_details_item b
|