From edd2a6053d7e1b23d14477be688107de2cc1f2c8 Mon Sep 17 00:00:00 2001 From: gaowdong Date: Wed, 18 Jun 2025 16:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E6=85=A7=E5=8E=A8=E6=88=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KitchenDeviceSensorRecordMapper.xml | 45 ++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceSensorRecordMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceSensorRecordMapper.xml index 88ee34f..1ccea98 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceSensorRecordMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/kitchen/KitchenDeviceSensorRecordMapper.xml @@ -46,16 +46,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and kdsr.sub_place = #{subPlace} and kdsr.canteen_id = #{canteenId} and kdsr.area_id = #{areaId} - and ( - - case when + + + + ((kdsm.measure_code = 'temperature' + and kdsm.measure_type = 1 + and kdsr.measure_data between kdsm.measure_min_value and kdsm.measure_max_value) + or (kdsm.measure_code = 'humidity' + and kdsm.measure_type = 1 + and kdsr.measure_data between kdsm.measure_min_value and kdsm.measure_max_value) + or (kdsm.measure_code = 'smoke' + and kdsm.measure_type = 1 + and kdsr.measure_data kdsm.measure_max_value) + ) + + + (kdsm.measure_code = 'temperature' + and kdsm.measure_type = 1 + and kdsr.measure_data ]]> kdsm.measure_max_value) + + + (kdsm.measure_code = 'temperature' + and kdsm.measure_type = 1 + and kdsr.measure_data kdsm.measure_min_value) + + + (kdsm.measure_code = 'humidity' + and kdsm.measure_type = 1 + and kdsr.measure_data ]]> kdsm.measure_max_value) + + + (kdsm.measure_code = 'humidity' + and kdsm.measure_type = 1 + and kdsr.measure_data kdsm.measure_min_value) + + + (kdsm.measure_code = 'smoke' + and kdsm.measure_type = 1 + and kdsr.measure_data ]]> kdsm.measure_max_value) + + ) - - and (kdsr.device_id like CONCAT('%',#{searchValue},'%') or kdi.device_name like CONCAT('%',#{searchValue},'%')