From 285dd1aff222671e9ff243731183795f7c511d1d Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 24 三月 2025 12:44:09 +0800 Subject: [PATCH] 累计预测值 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java index c7ef32f..a24443b 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/api/McsApiImpl.java @@ -419,9 +419,26 @@ dataView.setPreDataN(mmItemResultService.getData(outPut.getId(), predictTime, endTime, timeFormat)); dataView.setPreDataL(mmItemResultLastPointService.getData(outPut.getId(), startTime, endTime, timeFormat)); break; + case CL: + dataView.setPreDataN(mmItemResultService.getData(outPut.getId(), predictTime, endTime, timeFormat)); + dataView.setPreDataL(mmItemResultLastPointService.getData(outPut.getId(), startTime, endTime, timeFormat)); + break; default: break; } + + //处理预测累计 + if (outPut.getIscumulant() != null && outPut.getIscumulant() == 1) { + if (StringUtils.isNotBlank(outPut.getCumulpoint())) { + dataView.setCumulantRealData(getHisData(outPut.getCumulpoint(), predictTime, endTime)); + } + List<Object[]> cumulantPreList = mmItemResultService.getData(outPut.getId() + CommonDict.CUMULANT_SUFFIX, predictTime, endTime, DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND); + dataView.setCumulantPreData(cumulantPreList); + if (!CollectionUtils.isEmpty(cumulantPreList)) { + dataView.setCumulantPreValue(cumulantPreList.get(cumulantPreList.size() - 1)[1]); + } + } + if (!CollectionUtils.isEmpty(dataView.getRealData())) { Object[] rdo = dataView.getRealData().get(dataView.getRealData().size() - 1); dataView.setCurrValue(new BigDecimal(rdo[1].toString())); @@ -439,7 +456,8 @@ String alarmObj = chartParams.get(CommonConstant.ALARM_OBJ); if (StringUtils.isNotBlank(alarmObj)) { - List<AlarmMessageRespDTO> alarmList = ConvertUtils.sourceToTarget(mmPredictAlarmMessageService.getList(alarmObj, predictTime), AlarmMessageRespDTO.class); + String alarmTitle = chartParams.get(CommonConstant.ALARM_TITLE); + List<AlarmMessageRespDTO> alarmList = ConvertUtils.sourceToTarget(mmPredictAlarmMessageService.getList(alarmObj, predictTime, alarmTitle), AlarmMessageRespDTO.class); dataView.setAlarmList(alarmList); if (CollectionUtils.isEmpty(alarmList)) { dataView.setAlarmMessage("暂无预警信息"); -- Gitblit v1.9.3