From 017b7068133d0887a57c3267d3c9a5860408f9a8 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期一, 29 十二月 2025 10:19:18 +0800
Subject: [PATCH] 补片实体新增字段,订单首页流程卡基础数据null判断
---
north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 53 insertions(+), 4 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
index 5b0f70e..6658d93 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -185,7 +185,7 @@
c.project_no,
d.child_width as 'width',
d.child_height as 'height',
- (d.child_width + d.child_height) * 2 as 'perimeter',
+ (d.child_width + d.child_height) * 2/ 1000 as 'perimeter',
c.quantity,
od.shape,
concat( c.process_id, '-', c.technology_number ) AS 'process_id',
@@ -229,7 +229,7 @@
c.project_no,
d.child_width as 'width',
d.child_height as 'height',
- (d.child_width + d.child_height) * 2 as 'perimeter',
+ (d.child_width + d.child_height) * 2/ 1000 as 'perimeter',
c.patch_num as quantity,
od.shape,
concat( c.process_id, '-', c.technology_number ) AS 'process_id',
@@ -343,7 +343,7 @@
# h.layout_id as heatLayoutId,
h.width AS width,
h.height AS height,
- (h.width + h.height) * 2 as 'perimeter',
+ (h.width + h.height) * 2 / 1000 as 'perimeter',
od.shape,
count( 1 ) AS quantity,
concat( h.process_id, '-', h.layer ) AS process_id,
@@ -1570,7 +1570,7 @@
x_axis = #{detail.x},
y_axis = #{detail.y}
WHERE
- project_no = #{processId} AND polys_id = #{detail.polySort}
+ project_no = #{processId} AND polys_id = #{detail.polySort} AND stock_id = #{detail.stockSort}
</update>
<update id="updateProjectOptimize">
update pp.optimize_project as p
@@ -2148,6 +2148,55 @@
WHERE
project_no = #{projectNo}
</select>
+ <select id="optimizeTemp" resultType="java.util.Map" parameterType="java.lang.String">
+ SELECT
+ project_no,
+ layer,
+ o_width as width,
+ o_height as height,
+ rack_no as rackNo,
+ COUNT(*) as quantity,
+ ROUND((o_width + o_height) * 2 / 1000, 2) as perimeter,
+ ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as area
+ FROM
+ pp.`optimize_detail`
+ WHERE
+ project_no = #{projectNo}
+ AND process_id = ''
+ GROUP BY
+ project_no,
+ layer,
+ o_width,
+ o_height,
+ REPLACE(REPLACE(rack_no, '+', ''), '#', '')
+ ORDER BY
+ o_width,
+ o_height
+ </select>
+ <select id="selectTempProject" resultType="java.util.Map" parameterType="java.lang.String">
+ SELECT
+ project_no,
+ o_width as width,
+ o_height as height,
+ rack_no as order_number,
+ layer as processCard,
+ COUNT(*) as quantity,
+ ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as Area
+ FROM
+ pp.`optimize_detail`
+ WHERE
+ project_no = #{processId}
+ AND process_id = ''
+ GROUP BY
+ project_no,
+ layer,
+ o_width,
+ o_height,
+ rack_no
+ ORDER BY
+ o_width,
+ o_height
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0