From b49816062dd5dccc5d3a32e929abc726162f7294 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 15 五月 2025 09:02:45 +0800
Subject: [PATCH] 修改ip为配置ip
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml | 64 ++++++++++++++++++++++++++++++++
1 files changed, 64 insertions(+), 0 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
index f4f8fc6..af01a6f 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/resources/mapper/EdgStorageCageDetailsMapper.xml
@@ -50,6 +50,9 @@
<if test="height != 0">
and t.height = #{height}
</if>
+ <if test="cell == 2">
+ and t.thickness < #{maxThickness}
+ </if>
</where>
order by total_count desc, glass_count, abs(t.slot - #{currentSlot})
)
@@ -73,4 +76,65 @@
</if>
</select>
+ <select id="querySlotRemainWidth" resultType="com.mes.edgstoragecage.entity.vo.EdgSlotRemainVO">
+ select device_id,
+ slot,
+ if(#{cellLength} - sum(GREATEST(width, height) + #{glassGap}) < 0, 0, #{cellLength} -
+ sum(GREATEST(width, height) + #{glassGap})) as
+ remain_width
+ from edg_storage_cage_details
+ where state = 100
+ group by device_id, slot
+ </select>
+ <select id="queryEdgStorageDetailsByLimitSize" resultMap="baseMap">
+ SELECT t1.*
+ FROM edg_storage_cage t
+ LEFT JOIN edg_storage_cage_details t1 ON t.device_id = t1.device_id
+ AND t.slot = t1.slot
+ <where>
+ t.enable_state = 1
+ AND t1.state = 100
+ AND t1.device_id = #{deviceId}
+ <if test="width != 0">
+ and t1.width = #{width}
+ </if>
+ <if test="height != 0">
+ and t1.height = #{height}
+ </if>
+ <if test="cell == 1">
+ and #{minOneFirstLength} <= GREATEST(t1.width, t1.height)
+ and #{minOneSecondLength} <= least(t1.width, t1.height)
+ </if>
+ <if test="cell == 2">
+ and #{maxTwoFirstLength} >= GREATEST(t1.width, t1.height)
+ and #{maxTwoSecondLength} >= least(t1.width, t1.height)
+ and t1.thickness < #{maxThickness}
+ </if>
+ </where>
+ ORDER BY abs(t.slot - #{currentCell})
+ limit 1
+ </select>
+ <select id="queryPieChart" resultType="com.mes.largenscreen.entity.PieChartVO">
+ SELECT round(sum(CASE WHEN e.station_cell = 5 THEN 1 ELSE 0 END), 2) as oneCompletedQuantity,
+ round(sum(CASE WHEN e.station_cell = 5 THEN escd.width * escd.height / 1000000 ELSE 0 END),
+ 2) as oneCompletedArea,
+ round(sum(CASE WHEN e.station_cell = 6 THEN 1 ELSE 0 END), 2) as twoCompletedQuantity,
+ round(sum(CASE WHEN e.station_cell = 6 THEN escd.width * escd.height / 1000000 ELSE 0 END),
+ 2) as twoCompletedArea,
+ round(sum(CASE WHEN e.station_cell = 5 and escd.device_id is null THEN 1 ELSE 0 END),
+ 2) as oneUncompletedQuantity,
+ round(sum(CASE
+ WHEN e.station_cell = 5 and escd.device_id is null THEN gi.width * gi.height / 1000000
+ ELSE 0 END),
+ 2) as oneUncompletedArea,
+ round(sum(CASE WHEN e.station_cell = 6 and escd.device_id is null THEN 1 ELSE 0 END),
+ 2) as twoUncompletedQuantity,
+ round(sum( CASE WHEN e.station_cell = 6 and escd.device_id is null THEN gi.width*gi.height/1000000 ELSE 0 END ),2) as twoUncompletedArea
+ FROM
+ glass_info gi
+ left join edg_storage_cage_details escd ON gi.glass_id = escd.glass_id
+ left join engineering e on gi.engineer_id=e.engineer_id
+ WHERE
+ date(e.create_time) = date(now())
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0