From 38ecb3eb89d582ea73a6ead1bb81439390068ba2 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期二, 01 四月 2025 11:17:50 +0800
Subject: [PATCH] 删除多余数字
---
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
index aa85103..40ca6d8 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -174,8 +174,8 @@
total_count,
real_count,
ifnull(damage_count, 0) as damage_count,
- total_count - real_count - ifnull(damage_count, 0) as lack_count
-
+ case when total_count - real_count - ifnull(damage_count, 0) < 0 then 0 else
+ total_count - real_count - ifnull(damage_count, 0) end as lack_count
from big_details_temp t
inner join glass_info_temp t1 on t.engineer_id = t1.engineer_id and
t.tempering_layout_id = t1.tempering_layout_id
@@ -184,7 +184,7 @@
)
select *
from result
- order by engineer_id
+ order by engineer_id,tempering_layout_id
</select>
<select id="queryIsAllNeedDispatchVirtualSlot" resultMap="virtualSlotSequenceDTO">
@@ -267,10 +267,11 @@
FROM result
</select>
<select id="querybigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO">
- SELECT SLOT, COUNT(1) AS COUNT
- FROM BIG_STORAGE_CAGE_DETAILS
- where state in (100, 102, 103, 104)
- group by SLOT
- ORDER BY SLOT
+ select bsc.device_id, bsc.slot, count(bscd.glass_id) as count
+ from big_storage_cage bsc
+ left join big_storage_cage_details bscd
+ on bsc.slot = bscd.slot and bscd.state in (100, 102, 103, 104)
+ group by bsc.device_id, bsc.slot
+ order by bsc.device_id, bsc.slot
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0