From 036caaa60488714df55f765053699f9a1f817c0e Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 30 八月 2024 10:22:05 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
index fd7a0ee..633f3d3 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -195,15 +195,17 @@
ogd.production_id,
od.product_id,
od.product_name,
- SUM(od.quantity) as quantity,
+ ROUND(SUM(od.quantity)-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as quantity,
SUM(od.compute_gross_area) as compute_gross_area,
round(sum(od.perimeter), 2) as perimeter
from sd.order_detail as od
left join
- (select order_id, order_number, production_id, splitting_status
+ (select order_id, order_number,technology_number, production_id, splitting_status
from sd.order_glass_detail
GROUP BY order_id, order_number) as ogd
on od.order_id = ogd.order_id and od.order_number = ogd.order_number
+ left join flow_card as fc on fc.order_id = od.order_id and fc.order_number = od.order_number
+ and fc.technology_number=ogd.technology_number
where od.order_id = #{orderId}
and ogd.splitting_status = 0
@@ -241,7 +243,7 @@
od.quantity,
od.compute_gross_area,
p.total_thickness,
- od.quantity as baiscQuantity,
+ ROUND(od.quantity-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as baiscQuantity,
od.compute_gross_area as 'computeGrossArea',
p.total_thickness AS 'totalThickness',
p.thickness,
@@ -266,6 +268,8 @@
FROM sd.order_detail
WHERE order_id = #{orderId}) as ods
on ods.order_id = od.order_id and ods.order_number = od.order_number
+ left join flow_card as fc on fc.order_id = od.order_id and fc.order_number = od.order_number
+ and fc.technology_number=ogd.technology_number
where od.order_id = #{orderId}
and ogd.production_id = #{productionId}
and ogd.splitting_status = 0
--
Gitblit v1.8.0