From ae5a0421846584e31d3c3572217f2bd8a9adff3e Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 08 七月 2025 14:01:27 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml | 98 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 98 insertions(+), 0 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 ff43e38..06a0339 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -3172,4 +3172,102 @@
<select id="getSumQuantity">
select quantity from sd.`order` where order_id=#{orderId}
</select>
+
+ <select id="getDetailCompoundList">
+ select fc.order_number,
+ concat(IF(ROUND(ogd.child_width, 1) = FLOOR(ogd.child_width), FLOOR(ogd.child_width), ROUND(ogd.child_width, 1)), "*", IF(ROUND(child_height, 1) = FLOOR(child_height), FLOOR(child_height), ROUND(child_height, 1))) as child_width,
+ SUM(fc.quantity) as quantity,
+ round(SUM(ogd.total_area), 2) as total_area,
+ SUM(od.perimeter) as perimeter,
+ if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius,
+ concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
+ od.other_columns,
+ round(ogd.child_width) as width,
+ round(ogd.child_height) as height,
+ pd.separation,
+ #{compound} as technology_number,
+ IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber,
+ od.building_number
+ 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
+ fc.technology_number = ogd.technology_number
+ left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.product_detail as pd
+ on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
+ left join flow_card_sort as fcs
+ on fcs.process_id = fc.process_id and fcs.order_number = fc.order_number and
+ fcs.technology_number = fc.technology_number
+ and fcs.process = #{process}
+ where fc.process_id = #{processId}
+ and position(fc.technology_number in #{compound})
+ group by fc.process_id, 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="getDetailListLikeCompound">
+ select fc.order_number,
+ concat(IF(ROUND(ogd.child_width, 1) = FLOOR(ogd.child_width), FLOOR(ogd.child_width), ROUND(ogd.child_width, 1)), "*", IF(ROUND(child_height, 1) = FLOOR(child_height), FLOOR(child_height), ROUND(child_height, 1))) as child_width,
+ sum(fc.quantity) as quantity,
+ round(sum(ogd.total_area), 2) as total_area,
+ sum(od.perimeter) as perimeter,
+ if(od.bend_radius!=null || od.bend_radius!='',od.bend_radius,if(od.shape=2,JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')),'')) as bend_radius,
+ concat(IFNULL(od.processing_note, ''), IFNULL(od.remarks, '')) as remarks,
+ od.other_columns,
+ round(ogd.child_width) as width,
+ round(ogd.child_height) as height,
+ pd.separation,
+ #{compound} as technology_number,
+ IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber,
+ od.building_number
+ 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
+ fc.technology_number = ogd.technology_number
+ left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number
+ left join sd.product_detail as pd
+ on pd.prod_id = od.product_id and pd.glass_sort = ogd.technology_number
+ left join flow_card_sort as fcs
+ on fcs.process_id = fc.process_id and fcs.order_number = fc.order_number and
+ fcs.technology_number = fc.technology_number
+ and fcs.process = #{process}
+ where fc.process_id = #{processId}
+ and position(fc.technology_number in #{compound})
+ group by fc.process_id, 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>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0