Compare commits
No commits in common. "1dedac1926c0538d582356927d3c2922039ed9f4" and "d6c8f0180e42e5b3bef67a2dd856216cf903f036" have entirely different histories.
1dedac1926
...
d6c8f0180e
|
|
@ -116,6 +116,4 @@ public class KitchenDeviceSensorRecord extends BaseEntity {
|
||||||
private LocalDateTime endDateTime;
|
private LocalDateTime endDateTime;
|
||||||
|
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
private Integer onlyWarn;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,14 +50,6 @@ 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,6 +57,18 @@ 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