From fa3f092ce9824b9a0dddb53dc353cd9f41998bc9 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期五, 12 四月 2024 15:27:46 +0800
Subject: [PATCH] 跨工序次破报表
---
north-glass-erp/target/classes/mapper/pp/FolwCard.xml | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/north-glass-erp/target/classes/mapper/pp/FolwCard.xml b/north-glass-erp/target/classes/mapper/pp/FolwCard.xml
index 3d6aeab..0c9b1fd 100644
--- a/north-glass-erp/target/classes/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/target/classes/mapper/pp/FolwCard.xml
@@ -167,31 +167,20 @@
</select>
<!-- 鍒嗘灦鏄庣粏鏌ヨ-->
- <select id="detailsSelectMp" resultMap="flowCardMap">
+ <select id="detailsSelectMp">
select od.order_id,
ogd.production_id,
od.product_id,
od.product_name,
SUM( od.quantity) as quantity,
SUM(od.compute_gross_area) as compute_gross_area,
- od.perimeter
+ sum(od.perimeter) as perimeter
from sd.order_detail as od left join
(select order_id,order_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
where od.order_id = #{orderId} and ogd.splitting_status=0
- <if test="flowCard.orderId != null and flowCard.orderId != ''">
- and od.order_id regexp #{flowCard.orderId}
- </if>
- <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''">
- and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId}
- </if>
- <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''">
- and od.product_id regexp #{flowCard.orderDetail.productId}
- </if>
- <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''">
- and od.product_name regexp #{flowCard.orderDetail.productName}
- </if>
+
group by od.order_id, ogd.production_id
order by od.id desc
</select>
@@ -203,7 +192,7 @@
on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number
set ogd.splitting_status=0
where ogd.order_id = #{orderId}
- and fc.process_id = #{processId}
+ and ogd.production_id = left(#{processId},11)
</update>
@@ -392,6 +381,8 @@
fc.order_number,
fc.technology_number,
fc.quantity,
+ ogd.child_width,
+ ogd.child_height,
round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area,
od.product_name,
ogd.glass_child,
--
Gitblit v1.8.0