From 43d86830f4696c3ba2250a961d26377e1ff6cc32 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 17 十二月 2025 10:39:43 +0800
Subject: [PATCH] 1、 查询是否除膜优化
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index b87c897..02a1e8a 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -32,6 +32,7 @@
<resultMap id="temperingGlassCount" type="com.mes.bigstorage.entity.dto.TemperingGlassCountDTO">
<result column="engineer_id" property="engineerId"/>
+ <result column="engineer_name" property="engineerName"/>
<result column="tempering_layout_id" property="temperingLayoutId"/>
<result column="films_id" property="filmsId"/>
<result column="thickness" property="thickness"/>
@@ -166,9 +167,9 @@
<select id="selectTemperingGlassCount" resultMap="temperingGlassCount">
with glass_info_temp as (
- select engineer_id, tempering_layout_id, count(*) as total_count
- from glass_info
- group by engineer_id, tempering_layout_id
+ select t.engineer_id,t1.engineer_name, t.tempering_layout_id, count(*) as total_count
+ from glass_info t inner join engineering t1 on t.engineer_id=t1.engineer_id
+ group by t.engineer_id, t.tempering_layout_id
),
big_details_temp as (
select engineer_id, tempering_layout_id, count(*) as real_count, films_id, thickness
@@ -191,6 +192,7 @@
),
result as (
select t.engineer_id,
+ t1.engineer_name,
t.tempering_layout_id,
t.films_id,
t.thickness,
@@ -306,7 +308,7 @@
FROM big_storage_cage_details
WHERE STATE = 100
AND SLOT =
- (SELECT SLOT FROM big_storage_cage_details WHERE STATE = 100 AND sequence = 1 order by slot desc LIMIT 1)
+ (SELECT SLOT FROM big_storage_cage_details WHERE STATE = 100 AND sequence = 1 AND device_id = 4 order by slot desc LIMIT 1)
ORDER BY tempering_feed_sequence
</select>
--
Gitblit v1.8.0