From d724176dbcf033a096d7dcbd864c05485f021fbb Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 17 十二月 2025 08:30:56 +0800
Subject: [PATCH] 1、 钢化前钢化出片逻辑调整,避免卧转立信号对调度任务的影响 2、修改出片方式,当玻璃未在关系表时,默认出一片 3、中空新增进片线路校验,避免钢化重复报工

---
 hangzhoumesParent/common/servicebase/src/main/resources/mapper/OptimizeProjectMapper.xml |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hangzhoumesParent/common/servicebase/src/main/resources/mapper/OptimizeProjectMapper.xml b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/OptimizeProjectMapper.xml
index 44c5106..6cc8288 100644
--- a/hangzhoumesParent/common/servicebase/src/main/resources/mapper/OptimizeProjectMapper.xml
+++ b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/OptimizeProjectMapper.xml
@@ -72,14 +72,16 @@
         p.glass_thickness,
         p.glass_type,
         p.glass_total,
-        p.glass_total_area
+        p.glass_total_area,
+        IFNULL(e.state,0) as state
         from north_glass_mes.engineer_scheduling es
         left join pp.optimize_project p on es.project_no=p.project_no
+        left join north_glass_mes.engineering e on es.project_no=e.engineer_id
         where es.state = 100
         <if test="type != null and type != ''">
             and es.type = #{type}
         </if>
-        order by es.id
+        order by case when IFNULL(e.state, 0) = 1 then 0 else 1 end, es.id
     </select>
 
     <!-- 鏍规嵁绫诲瀷鍒犻櫎engineer_scheduling琛ㄤ腑鐨勬暟鎹� -->

--
Gitblit v1.8.0