Compare commits
2 Commits
d6c8f0180e
...
1dedac1926
| Author | SHA1 | Date |
|---|---|---|
|
|
1dedac1926 | |
|
|
bc1aabfb63 |
|
|
@ -116,4 +116,6 @@ public class KitchenDeviceSensorRecord extends BaseEntity {
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
|
private Integer onlyWarn;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,14 @@ public class KitchenDeviceSensorRecordServiceImpl implements IKitchenDeviceSenso
|
||||||
throw new ServiceException("设备分类不能为空");
|
throw new ServiceException("设备分类不能为空");
|
||||||
}
|
}
|
||||||
kitchenDeviceSensorRecord.setDeviceTypes(DeviceClassEnum.getDeviceTypesByKey(kitchenDeviceSensorRecord.getDeviceCategory()));
|
kitchenDeviceSensorRecord.setDeviceTypes(DeviceClassEnum.getDeviceTypesByKey(kitchenDeviceSensorRecord.getDeviceCategory()));
|
||||||
|
if(Objects.nonNull(kitchenDeviceSensorRecord.getOnlyWarn())) {
|
||||||
|
kitchenDeviceSensorRecord.setEnvSensorResultTypeList(CollUtil.newArrayList(
|
||||||
|
DeviceSensorResultEnum.TEMPERATURE_HIGH.getKey(),
|
||||||
|
DeviceSensorResultEnum.TEMPERATURE_LOW.getKey(),
|
||||||
|
DeviceSensorResultEnum.HUMIDITY_HIGH.getKey(),
|
||||||
|
DeviceSensorResultEnum.HUMIDITY_LOW.getKey(),
|
||||||
|
DeviceSensorResultEnum.SMOKE_HIGH.getKey()));
|
||||||
|
}
|
||||||
List<KitchenDeviceSensorRecord> kitchenDeviceSensorRecordList = kitchenDeviceSensorRecordMapper
|
List<KitchenDeviceSensorRecord> kitchenDeviceSensorRecordList = kitchenDeviceSensorRecordMapper
|
||||||
.selectKitchenDeviceSensorRecordList(kitchenDeviceSensorRecord);
|
.selectKitchenDeviceSensorRecordList(kitchenDeviceSensorRecord);
|
||||||
if(CollUtil.isNotEmpty(kitchenDeviceSensorRecordList)) {
|
if(CollUtil.isNotEmpty(kitchenDeviceSensorRecordList)) {
|
||||||
|
|
|
||||||
|
|
@ -57,18 +57,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{deviceType}
|
#{deviceType}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="envSensorResultTypeList == null or envSensorResultTypeList.size() == 0">
|
|
||||||
AND !((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 <![CDATA[ <= ]]> kdsm.measure_max_value)
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
<if test="envSensorResultTypeList != null and envSensorResultTypeList.size() > 0">
|
<if test="envSensorResultTypeList != null and envSensorResultTypeList.size() > 0">
|
||||||
and (
|
and (
|
||||||
<foreach item="type" collection="envSensorResultTypeList" separator=" or ">
|
<foreach item="type" collection="envSensorResultTypeList" separator=" or ">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue