From 271fed395d4d3e4ab8cdb44ccf466859ba485e46 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期四, 09 一月 2025 17:45:33 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java | 26 ++++++-------------------- 1 files changed, 6 insertions(+), 20 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java index 21c9b82..9fb4dd6 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java @@ -94,14 +94,16 @@ List<DataValueVO> dataEntityList = getData(entry.getColumnItemList().get(i), pointMap, planMap); //补全数据 ColumnItem columnItem = entry.getColumnItemList().get(i); - dataEntityList = super.completionData(matrix.length, dataEntityList, columnItem.startTime, columnItem.endTime, - columnItem.paramId, columnItem.getParamType(), pointMap, planMap); + dataEntityList = super.completionData(matrix.length, dataEntityList, columnItem.startTime, columnItem.endTime, columnItem.getParamType(),columnItem.getGranularity()); /** 如果数据取不满,把缺失的数据点放在后面 */ if (dataEntityList != null && dataEntityList.size() != 0) { logger.info("设置matrix, i = " + i + ", size = " + dataEntityList.size()); for (int k = 0; k < dataEntityList.size(); k++) { - matrix[k][i] = dataEntityList.get(k).getDataValue(); + Double dataValue = dataEntityList.get(k).getDataValue(); + if (null != dataValue) { + matrix[k][i] = dataValue; + } } } } catch (Exception e) { @@ -147,23 +149,7 @@ break; case NORMALITEM: case MERGEITEM: - MmItemOutputEntity outPut = mmItemOutputService.getOutPutById(columnItem.getParamId()); - OutResultType outResultType = OutResultType.getEumByCode(outPut.getResultType()); - List<DataValueVO> predictValue = new ArrayList<>(); - - // double类型特殊处理 - if (OutResultType.D.equals(outResultType)) { - // columnItem.getStartTime()就是预测时间 - String doubleData = mmItemResultJsonService.getDoubleData(outPut.getId(), columnItem.getStartTime()); - if (StringUtils.isNotBlank(doubleData)) { - DataValueVO dataValueVO = new DataValueVO(); - dataValueVO.setDataTime(columnItem.getStartTime()); - dataValueVO.setDataValue(Double.valueOf(doubleData)); - predictValue.add(dataValueVO); - } - } else { - predictValue = mmItemResultService.getPredictValue(outPut.getId(), columnItem.getStartTime(), columnItem.getEndTime()); - } + List<DataValueVO> predictValue = mmItemResultService.getPredictValue(columnItem.getParamId(), columnItem.getStartTime(), columnItem.getEndTime()); if (CollectionUtils.isEmpty(predictValue)) { break; -- Gitblit v1.9.3