|
|
@@ -231,8 +231,6 @@ public class WarningThresholdServiceImpl implements WarningThresholdService {
|
|
231
|
231
|
List<TWarningThreshold> tWarningThresholdList = tWarningThresholdMapper.selectByExample(example);
|
|
232
|
232
|
// 初始化返回值list对象
|
|
233
|
233
|
Map<String, Map<String, Object>> mapObj = new HashMap<>();
|
|
234
|
|
- BigDecimal high = null;
|
|
235
|
|
- BigDecimal low = null;
|
|
236
|
234
|
if (tWarningThresholdList.size() > 0) {
|
|
237
|
235
|
Map<String, List<TWarningThreshold>> collect = tWarningThresholdList.stream().collect(Collectors.groupingBy(t -> t.getvCfCode()));
|
|
238
|
236
|
for (String key : collect.keySet()) {
|
|
|
@@ -242,24 +240,17 @@ public class WarningThresholdServiceImpl implements WarningThresholdService {
|
|
242
|
240
|
if (wt.getwName() != null) {
|
|
243
|
241
|
// 报警值
|
|
244
|
242
|
if (wt.getwName().equals("6983")) {
|
|
|
243
|
+ //高温报警阀值
|
|
245
|
244
|
map.put("high", wt.getThreshold());
|
|
246
|
|
- high = wt.getThreshold();
|
|
247
|
245
|
} else if (wt.getwName().equals("6982")) {
|
|
|
246
|
+ //低温报警阀值
|
|
248
|
247
|
map.put("low", wt.getThreshold());
|
|
249
|
|
- low = wt.getThreshold();
|
|
250
|
|
- }
|
|
251
|
|
- // 预警值
|
|
252
|
|
- if (wt.getwName().equals("6991")) {
|
|
253
|
|
- if (high != null) {
|
|
254
|
|
- BigDecimal whigh = high.subtract(wt.getThreshold());
|
|
255
|
|
- map.put("whigh", whigh);
|
|
256
|
|
- }
|
|
257
|
|
- if (low != null) {
|
|
258
|
|
- BigDecimal wlow = low.add(wt.getThreshold());
|
|
259
|
|
- map.put("wlow", wlow);
|
|
260
|
|
- }
|
|
261
|
|
- // 报警和预警差值
|
|
262
|
|
- map.put("difference", wt.getThreshold());
|
|
|
248
|
+ } else if (wt.getwName().equals("6991")) {
|
|
|
249
|
+ //高温预警值
|
|
|
250
|
+ map.put("whigh", wt.getThreshold());
|
|
|
251
|
+ } else if (wt.getwName().equals("7248")) {
|
|
|
252
|
+ //低温预警值
|
|
|
253
|
+ map.put("wlow", wt.getThreshold());
|
|
263
|
254
|
}
|
|
264
|
255
|
}
|
|
265
|
256
|
}
|