From 413a7e27886bcc87bbd8aaf995f09dbe82cb17e7 Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期二, 06 五月 2025 14:56:08 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml | 140 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 135 insertions(+), 5 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 020e27f..f6f616d 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/GlassOptimize.xml
@@ -223,7 +223,7 @@
fc.process_id,
fc.order_number,
fc.quantity,
- CONCAT(fc.technology_number, '/', COUNT(fc.technology_number)) AS layer,
+ CONCAT(fc.technology_number, '/', COUNT(fc.layers_number)) AS layer,
so.project,
CONCAT(sd.child_width, ' 脳 ', sd.child_height) AS sizes
FROM
@@ -587,6 +587,17 @@
where project_no = #{projectNumber}
</delete>
+ <select id="selectOptimizeDetailById">
+ select * from pp.optimize_detail
+ where project_no = #{projectNumber} and process_id= #{processId} and layer= #{layer} and order_sort= #{orderSort}
+ and heat_layout_id is null limit 0,1;
+ </select>
+
+ <select id="selectOptimizeHeatDetail">
+ select * from pp.optimize_heat_detail
+ where project_no = #{projectNumber}
+ </select>
+
<select id="getProjectListMp">
SELECT
p.id,
@@ -847,7 +858,7 @@
<insert id="addSimulation" parameterType="map">
- <foreach collection="projectdetail.data[0].glass_details" item="glass">
+ <foreach collection="projectdetail" item="glass">
INSERT INTO pp.optimize_heat_detail (
project_no,
process_id,
@@ -895,7 +906,7 @@
</insert>
<!--妯℃嫙璁$畻缁撴灉淇濆瓨-->
<insert id="addratioResult" parameterType="map">
- <foreach collection="projectdetail.data[0].ratioResult" item="glass">
+ <foreach collection="ratioResult" item="glass">
INSERT INTO pp.optimize_heat_layout (
project_no,
layout_id,
@@ -925,6 +936,8 @@
UPDATE pp.optimize_project
SET
state = 10,
+ furnaces_qty=#{resultSum[0]},
+ load_rate=#{resultSum[1]},
chaos_pct = #{inputValues.chaos_pct},
max_load_pct = #{inputValues.max_load_pct},
max_area=#{inputValues.max_area},
@@ -932,8 +945,7 @@
load_width=#{inputValues.load_width},
load_length=#{inputValues.load_length},
x_space=#{inputValues.x_space},
- y_space=#{inputValues.y_space},
- load_rate=#{inputValues.load_rate}
+ y_space=#{inputValues.y_space}
WHERE
project_no = #{inputValues.project_no}
@@ -948,6 +960,12 @@
update pp.optimize_project_file as u
set u.content = #{jsonString}
where u.project_no=#{processId} and type='浼樺寲缁撴灉'
+ </update>
+
+ <update id="updateOptimizeDetail">
+ update pp.optimize_detail
+ set heat_layout_id=#{layoutId},heat_layout_sort=#{sort},glass_id=concat(process_id,'|',#{layoutId},'|',#{sort})
+ where id=#{id};
</update>
@@ -1035,4 +1053,116 @@
c.process_id,
c.order_number
</select>
+
+
+
+
+
+
+
+ <!--妯℃嫙璁$畻鏌ヨ娴佺▼鍗$涓夋柟-->
+ <select id="selectProjectComputeMpThirdParty">
+ select
+ process_id as processId,
+ layer as technologyNumber,
+ total_layer as total_layers,
+ filmsid as TotalNumber,
+ sum(glass_total) as total_num,
+ product_name as glass_child,
+ 0 as tempering,
+ 0 as allow_rotate,
+ 0 as curtain_wall,
+ 0 as priority_level,
+ 1 as is_must
+ from pp.other_flow_card where project_no = #{projectNo} group by process_id,layer
+ </select>
+
+ <!--妯℃嫙璁$畻娴佺▼鍗¤鎯呯涓夋柟-->
+ <select id="selectComputeDetailMpThirdParty">
+ select
+ process_id as process_id,
+ width as width,
+ height as height,
+ width as maxwidth,
+ height as maxheight,
+ order_number as order_number,
+ glass_total as quantity,
+ layer as technology_number,
+ 0 as patch_state
+ from pp.other_flow_card where process_id = #{processId} and layer=#{technologyNumber}
+ </select>
+
+ <!--绗竴娆′紭鍖栨煡璇�-->
+ <select id="firstOptimizationThirdParty">
+ select
+ project_no,
+ concat( process_id, '-', layer ) AS process_id,
+ width,
+ height,
+ layer,
+ glass_total as quantity,
+ product_name,
+ order_number
+ from pp.other_flow_card where project_no = #{projectNo}
+ </select>
+
+ <select id="analogComputationOptimizationThirdParty">
+ SELECT
+ h.project_no,
+ h.layout_id,
+ h.width AS width,
+ h.height AS height,
+ count( 1 ) AS quantity,
+ concat( h.process_id, '-', h.layer ) AS 'process_id',
+ h.layer,
+ c.order_number
+ from
+ pp.`optimize_heat_detail` h
+ LEFT JOIN pp.other_flow_card c ON h.process_id = c.process_id
+ AND h.layer = c.technology_number
+ AND h.order_sort = c.order_number
+ WHERE
+ h.project_no = #{projectNo}
+ GROUP BY
+ h.project_no,
+ h.layout_id,
+ h.width,
+ h.height,
+ h.process_id,
+ h.layer,
+ c.quantity,
+ c.order_number
+ ORDER BY
+ LENGTH( h.layout_id ),
+ h.layout_id;
+ </select>
+
+ <!--宸ョ▼淇℃伅娴佺▼鍗�-->
+ <select id="getProcessCardMpThirdParty">
+ SELECT
+ fc.process_id,
+ fc.order_number,
+ fc.glass_total as quantity,
+ CONCAT(fc.layer, '/', COUNT(fc.total_layer)) AS layer,
+ CONCAT(fc.width, ' 脳 ', fc.height) AS sizes
+ FROM
+ pp.other_flow_card AS fc
+ WHERE
+ fc.project_no = #{projectNo}
+ GROUP BY
+ fc.layer,
+ fc.order_number
+ </select>
+
+ <delete id="deleteOptimizeDetailThirdParty">
+ delete from pp.other_flow_card
+ where project_no = #{projectNumber}
+ </delete>
+
+
+
+
+
+
+
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0