fix(scheduled):修正粉尘传感器报警逻辑中的字段匹配错误
- 将过滤条件从 DEVICE_SENSOR_ID 更改为 PLC_ID以正确匹配传感器数据 - 确保报警记录能准确反映当前传感器状态- 避免因字段不匹配导致的误报或漏报情况dev
parent
334a18c467
commit
9658b6dc50
|
|
@ -47,7 +47,7 @@ public class DustSensorAlarmScheduled {
|
|||
List<PageData> alarmRecords = new ArrayList<>();
|
||||
allSensors.forEach(sensor -> {
|
||||
PageData currentData = latestDataMap.stream()
|
||||
.filter(item -> item.get("DEVICE_SENSOR_ID").equals(sensor.get("DEVICE_SENSOR_ID")))
|
||||
.filter(item -> item.get("PLC_ID").equals(sensor.get("DEVICE_SENSOR_ID")))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (currentData == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue