From 2ad08ea181d8ec1e2b4b90bd1ddd40a2ba595b59 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 07 三月 2024 08:08:25 +0800
Subject: [PATCH] 提交更新
---
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 63 +++++++++++++++++++++++++------
1 files changed, 50 insertions(+), 13 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 9383dd5..9d82870 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -101,7 +101,7 @@
where o.production_order=2 and ogd.splitting_status=0 and o.create_time between #{selectTime1} and #{selectTime2}
<if test="flowCard.order.orderId != null and flowCard.order.orderId != ''">
- and o.order_id, regexp #{flowCard.order.orderId}
+ and o.order_id regexp #{flowCard.order.orderId}
</if>
<if test="flowCard.order.customerName != null and flowCard.order.customerName != ''">
and o.customer_name regexp #{flowCard.order.customerName}
@@ -158,24 +158,19 @@
group by od.order_id, ogd.production_id
</select>
+ <!-- 鏇存柊鍒嗘灦鐘舵��-->
<update id="UpdateDeleteState">
- update sd.order_glass_detail as ogd
- set ogd.production_id=null,
- ogd.production_time=null,
- ogd.founder=null
- where ogd.production_id = #{processId}
+ update
+ sd.order_glass_detail as ogd left join flow_card as fc
+ 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}
</update>
<!-- 鍒犻櫎娴佺▼鍗�-->
<update id="DeleteFlowCardMp">
- update sd.order_detail as od left join sd.order_glass_detail as ogd
- on od.order_id = ogd.order_id and od.order_number = ogd.order_number
- set ogd.production_id=null,
- ogd.production_time=null,
- ogd.founder=null
- where od.order_id = #{orderId}
- and ogd.production_id = #{processId}
+ delete from flow_card as fc where fc.process_id=#{processId}
</update>
<!-- 鍒嗘灦鏂板鏄庣粏鏌ヨ-->
@@ -240,6 +235,7 @@
technology_number,
quantity,
founder,
+ layers_number,
splitFrame_time,
create_time
)
@@ -252,6 +248,7 @@
ogd.technology_number,
#{quantity},
#{userName},
+ #{layer},
NOW(),
NOW()
@@ -281,4 +278,44 @@
set o.processing_card=#{state}
where o.order_id=left(#{productionId},10)
</update>
+
+<!-- 鏌ヨ宸叉帓鐗堟暟鎹�-->
+ <select id="SelectOkSchedulingMp">
+ select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
+ round(od.width*od.height*od.quantity/1000000,2),
+ (od.quantity-IFNULL(ps.scheduling_quantity,0)),
+ round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2),
+ IFNULL(ps.scheduling_quantity,0),
+ round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2),
+ od.product_name,od.shape
+ from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
+ left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
+ where od.order_id=#{orderId} and ps.processes=#{processes} and ps.scheduling_id IS NOT NULL
+
+ </select>
+<!-- 鏌ヨ鏈帓鐗堟暟鎹�-->
+ <select id="SelectNoSchedulingMp">
+
+ </select>
+<!-- 棣栨鏌ヨ鎺掔増鏁版嵁-->
+ <select id="selectLastSchedulingMp">
+ select od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity,
+ round(od.width*od.height*od.quantity/1000000,2) as area,
+ (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity,
+ round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea,
+ IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity,
+ round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea,
+ od.product_name,od.shape
+ from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id
+ left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number
+ where od.create_time between #{selectTime1} and #{selectTime2}
+ </select>
+
+<!-- 鏌ヨ瀵瑰簲搴忓彿鐨勫眰鏁�-->
+ <select id="SelectLayer">
+ select COUNT(ogd.order_number)
+ from sd.order_glass_detail as ogd
+ where ogd.production_id = #{productionId}
+ and ogd.order_number=#{orderNumber}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0