From b8202fa27280e1fc0ff962c874e94e625abeb7b8 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 03 七月 2025 16:22:57 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 88 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 85 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 5002799..fa3dcb1 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -783,7 +783,24 @@
where fc.process_id = #{processId}
and position(fc.technology_number in #{technologyNumber})
group by fc.process_id, fc.order_number
- order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number)
+ <choose>
+ <!-- flashback = 1 鏃舵搴� -->
+ <when test="flashback == 1">
+ ORDER BY
+ CASE
+ WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort
+ ELSE fc.order_number
+ END ASC
+ </when>
+ <!-- flashback != 1 鏃跺�掑簭 -->
+ <otherwise>
+ ORDER BY
+ CASE
+ WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort
+ ELSE fc.order_number
+ END DESC
+ </otherwise>
+ </choose>
</select>
<select id="getDetailLists">
@@ -1455,7 +1472,24 @@
where fc.process_id = #{processId}
and position(fc.technology_number in #{technologyNumber})
group by fc.process_id, fc.order_number, fc.technology_number
- order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number)
+ <choose>
+ <!-- flashback = 1 鏃舵搴� -->
+ <when test="flashback == 1">
+ ORDER BY
+ CASE
+ WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort
+ ELSE fc.order_number
+ END ASC
+ </when>
+ <!-- flashback != 1 鏃跺�掑簭 -->
+ <otherwise>
+ ORDER BY
+ CASE
+ WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort
+ ELSE fc.order_number
+ END DESC
+ </otherwise>
+ </choose>
</select>
<select id="getDetailListMerge">
@@ -1487,7 +1521,24 @@
and fcs.process = #{process}
where fc.process_id = #{processId} and fc.`merge`=1
group by fc.process_id, fc.order_number
- order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number)
+ <choose>
+ <!-- flashback = 1 鏃舵搴� -->
+ <when test="flashback == 1">
+ ORDER BY
+ CASE
+ WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort
+ ELSE fc.order_number
+ END ASC
+ </when>
+ <!-- flashback != 1 鏃跺�掑簭 -->
+ <otherwise>
+ ORDER BY
+ CASE
+ WHEN fcs.sort IS NOT NULL AND fcs.sort <> '' THEN fcs.sort
+ ELSE fc.order_number
+ END DESC
+ </otherwise>
+ </choose>
</select>
<select id="getDetailListLikes">
@@ -3084,4 +3135,35 @@
<select id="getProcessNameList">
SELECT id,basic_name,IFNULL(nickname,"") as nickname FROM sd.`basic_data` where basic_category='process'
</select>
+
+ <select id="exportDateProcessMp">
+ select
+ a.order_Id,
+ a.process_Id,
+ c.product_id,
+ c.product_name,
+ b.project,
+ sum(a.quantity) as quantity,
+ sum(a.quantity) * c.area as compute_gross_area,
+ a.founder,
+ c.processing_note,
+ b.customer_name,
+ layout_status as layout_status,
+ a.merge,
+ a.rack,
+ b.batch
+ 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
+ where date(a.create_time) >= #{date[0]}
+ and date(a.create_time) <= #{date[1]}
+ and b.create_order>0
+ group by a.process_Id
+ ORDER BY a.id desc
+ </select>
+
+ <select id="getSumQuantity">
+ select quantity from sd.`order` where order_id=#{orderId}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0