MQTT采集功能与前端适配
This commit is contained in:
parent
8cb0506b9d
commit
2dfe968f16
@ -399,8 +399,18 @@ public class AutoCollectService {
|
||||
dbData.setEquipmentType("1");
|
||||
dbData.setStatus("1");
|
||||
dbData.setSetTem(equipmentInfo.getSetTem());
|
||||
paramDTO.minValue = ruleCache.get(equipmentInfo.getRuleCode()).getMinValue();
|
||||
paramDTO.maxValue = ruleCache.get(equipmentInfo.getRuleCode()).getMaxValue();
|
||||
String ruleCode = equipmentInfo.getRuleCode();
|
||||
DryParamThreshold rule = ruleCache.get(ruleCode);
|
||||
if (rule != null) {
|
||||
paramDTO.minValue = rule.getMinValue();
|
||||
paramDTO.maxValue = rule.getMaxValue();
|
||||
} else {
|
||||
// 无规则时设默认值(避免前端显示异常)
|
||||
paramDTO.minValue = "0";
|
||||
paramDTO.maxValue = "0";
|
||||
log.warn("【转换DryingDTO】设备{}的规则{}在缓存中不存在,阈值设为默认值",
|
||||
equipmentInfo.getEquipmentCode(), ruleCode);
|
||||
}
|
||||
dbData.setParamDTO(paramDTO);
|
||||
|
||||
return dbData;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user