|
@@ -573,45 +573,9 @@ public class StatisticsScadaServiceImpl extends ServiceImpl<StatisticsScadaMappe
|
|
|
cumflowMultiplyNumber = BigDecimal.valueOf(0.85).multiply(BigDecimal.valueOf(0.43));
|
|
|
break;
|
|
|
case "FT_A_8":
|
|
|
- List<ScadaDeviceCodeVo> scadaDeviceCodeVos4 = scadaHistoryListByCode.get("FT_B_20");
|
|
|
- List<ScadaDeviceCodeVo> scadaDeviceCodeVos5 = scadaHistoryListByCode.get("FT_B_4");
|
|
|
- if(CollectionUtils.isEmpty(scadaDeviceCodeVos4)){
|
|
|
- return;
|
|
|
- }
|
|
|
- scadaDeviceCodeVos4.forEach(scadaDeviceCodeVo -> {
|
|
|
- List<Map<String, Object>> indexCodes = v.stream().filter(e -> String.valueOf(e.get("type")).equals(scadaDeviceCodeVo.getIndexType())).collect(Collectors.toList());
|
|
|
- if (CollUtil.isEmpty(indexCodes)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- List<ScadaDeviceCodeVo> scadaDeviceCodeVos5Final = scadaDeviceCodeVos5.stream()
|
|
|
- .filter(e -> e.getIndexType().equals(scadaDeviceCodeVo.getIndexType())
|
|
|
- && DateUtil.format(e.getScadaTime(), "yyyyMMddHHmm").equals(DateUtil.format(scadaDeviceCodeVo.getScadaTime(), "yyyyMMddHHmm")))
|
|
|
- .collect(Collectors.toList());
|
|
|
- String indexCode = String.valueOf(indexCodes.get(0).get("indexCode"));
|
|
|
- Scada scada = new Scada();
|
|
|
- ScadaMonitor scadaMonitor = new ScadaMonitor();
|
|
|
- scada.setCode(indexCode);
|
|
|
- scadaMonitor.setCode(indexCode);
|
|
|
- scada.setValue(new BigDecimal(scadaDeviceCodeVo.getValue())
|
|
|
- .add(CollUtil.isEmpty(scadaDeviceCodeVos5Final) ? BigDecimal.ZERO:new BigDecimal(scadaDeviceCodeVos5Final.get(0).getValue()))
|
|
|
- .multiply(BigDecimal.valueOf(1.6))
|
|
|
- .multiply(BigDecimal.valueOf(0.35))
|
|
|
- .setScale(2,RoundingMode.HALF_UP)
|
|
|
- .toString());
|
|
|
- scadaMonitor.setValue(new BigDecimal(scadaDeviceCodeVo.getValue())
|
|
|
- .add(CollUtil.isEmpty(scadaDeviceCodeVos5Final) ? BigDecimal.ZERO:new BigDecimal(scadaDeviceCodeVos5Final.get(0).getValue()))
|
|
|
- .multiply(BigDecimal.valueOf(1.6))
|
|
|
- .multiply(BigDecimal.valueOf(0.35))
|
|
|
- .setScale(2,RoundingMode.HALF_UP)
|
|
|
- .toString());
|
|
|
- scada.setScadaTime(scadaDeviceCodeVo.getScadaTime());
|
|
|
- scadaMonitor.setScadaTime(scadaDeviceCodeVo.getScadaTime());
|
|
|
- scada.setUpdateTime(new Date());
|
|
|
- scadaMonitor.setUpdateTime(new Date());
|
|
|
- monitorList.add(scada);
|
|
|
- finalRealTimeList.add(scadaMonitor);
|
|
|
- });
|
|
|
- return;
|
|
|
+ scadaDeviceCodeVos = scadaHistoryListByCode.get("FT_A_22");
|
|
|
+ cumflowMultiplyNumber = BigDecimal.valueOf(0.35);
|
|
|
+ break;
|
|
|
case "FT_A_9":
|
|
|
List<ScadaDeviceCodeVo> scadaDeviceCodeVos1 = scadaHistoryListByCode.get("FT_B_22");
|
|
|
List<ScadaDeviceCodeVo> scadaDeviceCodeVos2 = scadaHistoryListByCode.get("FT_A_6");
|
|
@@ -656,7 +620,7 @@ public class StatisticsScadaServiceImpl extends ServiceImpl<StatisticsScadaMappe
|
|
|
monitorList.add(scada);
|
|
|
finalRealTimeList.add(scadaMonitor);
|
|
|
});
|
|
|
- return;
|
|
|
+ break;
|
|
|
case "FT_A_10":
|
|
|
scadaDeviceCodeVos = scadaHistoryListByCode.get("FT_A_6");
|
|
|
cumflowMultiplyNumber = BigDecimal.valueOf(0.88);
|