|
|
|
@ -81,7 +81,7 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag |
|
|
|
"PLC1500_DB8304", // 压力瞬时值
|
|
|
|
"PLC1500_DB8304", // 压力瞬时值
|
|
|
|
"PLC1500_DB8308", // 流量瞬时值
|
|
|
|
"PLC1500_DB8308", // 流量瞬时值
|
|
|
|
"PLC1500_DB8320" //流量累积值
|
|
|
|
"PLC1500_DB8320" //流量累积值
|
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
private static final List<String> steamBoilerAO = List.of("DB611566", // 锅炉1-工作最小转速
|
|
|
|
private static final List<String> steamBoilerAO = List.of("DB611566", // 锅炉1-工作最小转速
|
|
|
|
"DB611550",// 锅炉1-工作最大转速
|
|
|
|
"DB611550",// 锅炉1-工作最大转速
|
|
|
|
@ -216,6 +216,7 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 处理otherName字段,按"-"分割并取最后一部分 |
|
|
|
* 处理otherName字段,按"-"分割并取最后一部分 |
|
|
|
|
|
|
|
* |
|
|
|
* @param collectionParamsManages 待处理的集合 |
|
|
|
* @param collectionParamsManages 待处理的集合 |
|
|
|
* @return 处理后的集合 |
|
|
|
* @return 处理后的集合 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -517,6 +518,34 @@ public class CollectionParamsManageServiceImpl implements ICollectionParamsManag |
|
|
|
if (collectionParamsManages.isEmpty()) { |
|
|
|
if (collectionParamsManages.isEmpty()) { |
|
|
|
return List.of(); |
|
|
|
return List.of(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 这里遍历collectionParamsManages,判断otherName,
|
|
|
|
|
|
|
|
// 如果otherName="1号主机-A回路运行电流"的curValue大于5A,则修改otherName="1号主机-机组开机关机"的curValue=1,则赋值给runStatus
|
|
|
|
|
|
|
|
// 如果otherName="1号主机-负载"或者otherName="1号主机-负荷限制",其curValue值乘以10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 1. 找出"1号主机-A回路运行电流"的curValue
|
|
|
|
|
|
|
|
BigDecimal runningCurrentValue = collectionParamsManages.stream() |
|
|
|
|
|
|
|
.filter(p -> "1号主机-A回路运行电流".equals(p.getOtherName())) |
|
|
|
|
|
|
|
.map(CollectionParamsManageVO::getCurValue) |
|
|
|
|
|
|
|
.findFirst() |
|
|
|
|
|
|
|
.orElse(null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果运行电流大于5A,则设置"1号主机-机组开机关机"的curValue=1
|
|
|
|
|
|
|
|
if (runningCurrentValue != null && runningCurrentValue.compareTo(new BigDecimal("5")) > 0) { |
|
|
|
|
|
|
|
collectionParamsManages.stream() |
|
|
|
|
|
|
|
.filter(p -> "1号主机-运行状态".equals(p.getOtherName())) |
|
|
|
|
|
|
|
.forEach(p -> p.setCurValue(new BigDecimal("1"))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 2. "1号主机-负载" 和 "1号主机-负荷限制" 的curValue乘以10
|
|
|
|
|
|
|
|
collectionParamsManages.stream() |
|
|
|
|
|
|
|
.filter(p -> "1号主机-负载".equals(p.getOtherName()) |
|
|
|
|
|
|
|
|| "1号主机-负荷限制".equals(p.getOtherName())) |
|
|
|
|
|
|
|
.forEach(p -> { |
|
|
|
|
|
|
|
if (p.getCurValue() != null) { |
|
|
|
|
|
|
|
p.setCurValue(p.getCurValue().multiply(new BigDecimal("10"))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 得出的collectionParamsManages进行数据赋值,如果paramType="1',则是运行状态,则赋值给runStatus,
|
|
|
|
// 得出的collectionParamsManages进行数据赋值,如果paramType="1',则是运行状态,则赋值给runStatus,
|
|
|
|
// 如果paramType="5",则是故障报警,则赋值给alarmStatus
|
|
|
|
// 如果paramType="5",则是故障报警,则赋值给alarmStatus
|
|
|
|
// 如果paramType="6",则是手自动状态,则赋值给handOrAuto
|
|
|
|
// 如果paramType="6",则是手自动状态,则赋值给handOrAuto
|
|
|
|
|