From 1a04230a60c65e2a7e8d1b392bc6408b2e77aa61 Mon Sep 17 00:00:00 2001
From: 你好啊 <1536384743@qq.com>
Date: 星期六, 22 二月 2025 13:53:17 +0800
Subject: [PATCH] 配置文件修改
---
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 54 +++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 47 insertions(+), 7 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 25c684b..a221506 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -69,7 +69,7 @@
if(a.layout_status=0,'涓嶅彲鎺掔増',if(a.layout_status=1,'鍙帓鐗�','宸叉帓鐗�')) as layout_status,
a.merge,
a.rack
- from (select id,order_id,process_id,order_number, quantity,founder,max(layout_status) as layout_status,create_time,merge,rack from flow_card
+ from (select id,order_id,process_id,order_number, quantity,founder,max(layout_status) as layout_status,create_time,max(merge) as merge,rack from flow_card
group by process_Id,order_number) as a
left join sd.`order` as b on a.order_Id=b.order_id
left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number
@@ -525,7 +525,7 @@
left join pp.flow_card as fc on op.project_no=fc.project_no
left join sd.`order` as o on o.order_id=fc.order_id
where date(op.create_time)>=#{selectTime1} and date(op.create_time) <= #{selectTime2}
- and state >= 20 and o.create_order>0
+ and state >= 20 and (o.create_order>0 or o.create_order is null)
GROUP BY op.project_no
order by op.create_time desc
</select>
@@ -588,7 +588,8 @@
ogdss.concatenated_glass_child as glass_child,
fc.founder,
date(fc.splitFrame_time) as splitFrame_time,
- processed_part as process
+ processed_part as process,
+ merge
from flow_card as fc
left join sd.order_glass_detail as ogd
@@ -625,7 +626,8 @@
ogdss.concatenated_glass_child as glass_child,
fc.founder,
date(fc.splitFrame_time) as splitFrame_time,
- processed_part as process
+ processed_part as process,
+ merge
from flow_card as fc
left join sd.order_glass_detail as ogd
@@ -827,6 +829,13 @@
where fc.process_id = #{processId}
</update>
+ <!-- 澶嶉�夋淇敼娴佺▼鍗″悎鏋�-->
+ <update id="updateProcessCardRack">
+ update flow_card as fc
+ set fc.rack=#{rack}
+ where fc.process_id = #{processId} and fc.technology_number=#{technologyNumber}
+ </update>
+
<select id="getPrintLabel">
select o.order_id,
c.customer_abbreviation as customer_name,
@@ -839,6 +848,7 @@
ogd.process,
e.type_name,
opd.stock_id,
+ opd.polys_id,
od.quantity,
od.other_columns,
od.bend_radius,
@@ -872,6 +882,8 @@
ogd.glass_child,
ogd.process,
e.type_name,
+ opd.stock_id,
+ opd.polys_id,
od.quantity,
od.other_columns,
od.bend_radius,
@@ -1443,7 +1455,8 @@
pd.separation,
fc.technology_number,
IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber,
- od.building_number
+ od.building_number,
+ fc.merge as merge
from flow_card as fc
left join sd.order_glass_detail as ogd
on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and
@@ -2151,7 +2164,8 @@
fc.founder,
date(fc.splitFrame_time) as splitFrame_time,
fc.print_status,
- processed_part as process
+ processed_part as process,
+ merge
from flow_card as fc
left join sd.order_glass_detail as ogd
@@ -2189,7 +2203,8 @@
fc.founder,
date(fc.splitFrame_time) as splitFrame_time,
fc.print_status,
- processed_part as process
+ processed_part as process,
+ merge
from flow_card as fc
left join sd.order_glass_detail as ogd
@@ -2739,6 +2754,7 @@
ogd.process,
e.type_name,
opd.stock_id,
+ opd.polys_id,
od.quantity,
od.other_columns,
od.bend_radius,
@@ -2844,6 +2860,7 @@
a.order_id,
a.process_id,
a.technology_number,
+ a.order_number,
c.product_id,
c.product_name,
b.project,
@@ -2862,4 +2879,27 @@
group by a.process_id,a.technology_number
</select>
+
+ <select id="getGlassThicknessByProdutionId">
+ select total_thickness as 'totalThickness',thickness as 'thickness' from sd.product
+ where id = (
+ select distinct b.product_id from sd.order_glass_detail as a
+ left join sd.order_detail as b
+ on a.order_id = b.order_id and a.order_number = b.order_number
+ where a.order_id = #{orderId}
+ and a.production_id = #{productionId}
+ )
+ </select>
+
+ <select id="getOrderDetailByProductionId">
+ select * from (select a.*,
+ IF(a.height >= a.width, a.height, a.width) as 'long',
+ IF(a.height < a.width, a.height, a.width) as 'short'
+ from sd.order_detail as a
+ left join sd.order_glass_detail as b
+ on a.order_id = b.order_id and a.order_number = b.order_number
+ where a.order_id = #{orderId} and b.production_id = #{productionId}
+ group by a.order_number) as c
+ order by c.`long` desc
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0