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 | 106 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 96 insertions(+), 10 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 3d33f93..fa3dcb1 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -66,7 +66,7 @@
a.founder,
c.processing_note,
b.customer_name,
- if(a.layout_status=0,'涓嶅彲鎺掔増',if(a.layout_status=1,'鍙帓鐗�','宸叉帓鐗�')) as layout_status,
+ layout_status as layout_status,
a.merge,
a.rack,
b.batch
@@ -614,10 +614,11 @@
GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
ogds.glass_child,
GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child,
- SUBSTRING(process, LOCATE('澶硅兌', process)) AS processed_part
+ SUBSTRING(process, LOCATE(bd.basic_name, process)) AS processed_part
from sd.order_glass_detail as ogds
+ left join sd.basic_data as bd on bd.nickname='stepC'
where ogds.order_id = #{orderId}
- and LOCATE('澶硅兌', ogds.process) > 0
+ and LOCATE(bd.basic_name, ogds.process) > 0
GROUP BY order_id, order_number, ogds.group) as ogdss
on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
where fc.order_id = #{orderId}
@@ -652,13 +653,14 @@
GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number,
ogds.glass_child,
GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child,
- SUBSTRING(ogds.process, LOCATE('涓┖', ogds.process)) AS processed_part
+ SUBSTRING(ogds.process, LOCATE(bd.basic_name, ogds.process)) AS processed_part
from sd.order_glass_detail as ogds
left join sd.order_detail as ods
on ods.order_id = ogds.order_id and ods.order_number = ogds.order_number
left join sd.product_detail as pds on pds.prod_id = ods.product_id and
pds.glass_sort =
ogds.technology_number
+ left join sd.basic_data as bd on bd.nickname='stepD'
where ogds.order_id = #{orderId}
GROUP BY order_id, order_number) as ogdss
on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
@@ -781,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">
@@ -1453,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">
@@ -1485,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">
@@ -2194,10 +2247,11 @@
GROUP_CONCAT(ogds.technology_number SEPARATOR '') AS technology_number,
ogds.glass_child,
GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child,
- SUBSTRING(process, LOCATE('澶硅兌', process)) AS processed_part
+ SUBSTRING(process, LOCATE(bd.basic_name, process)) AS processed_part
from sd.order_glass_detail as ogds
+ left join sd.basic_data as bd on bd.nickname='stepC'
where ogds.order_id = #{orderId}
- and LOCATE('澶硅兌', ogds.process) > 0
+ and LOCATE(bd.basic_name, ogds.process) > 0
GROUP BY order_id, order_number, ogds.group) as ogdss
on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
where fc.order_id = #{orderId}
@@ -2233,13 +2287,14 @@
GROUP_CONCAT(pds.glass_sort SEPARATOR '') AS technology_number,
ogds.glass_child,
GROUP_CONCAT(ogds.glass_child SEPARATOR '+') AS concatenated_glass_child,
- SUBSTRING(pds.process, LOCATE('涓┖', pds.process)) AS processed_part
+ SUBSTRING(pds.process, LOCATE(bd.basic_name, pds.process)) AS processed_part
from sd.order_glass_detail as ogds
left join sd.order_detail as ods
on ods.order_id = ogds.order_id and ods.order_number = ogds.order_number
left join sd.product_detail as pds on pds.prod_id = ods.product_id and
pds.glass_sort =
ogds.technology_number
+ left join sd.basic_data as bd on bd.nickname='stepD'
where ogds.order_id = #{orderId}
GROUP BY order_id, order_number) as ogdss
on fc.order_id = ogdss.order_id and ogdss.order_number = fc.order_number
@@ -3080,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