From c630b9bc245aef6b95923fbd774084edb7726a72 Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期一, 24 三月 2025 11:44:20 +0800 Subject: [PATCH] 增加累计预测值最后一个值的获取 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModuleHandler.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModuleHandler.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModuleHandler.java index d0cfb77..702ecd1 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModuleHandler.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/predict/PredictModuleHandler.java @@ -104,6 +104,7 @@ try { predictResultHandler.savePredictResult(predictResult); } catch (Exception e) { + e.printStackTrace(); itemRunStatusEnum = ItemRunStatusEnum.MODELRESULTSAVEERROR; throw new RuntimeException("模型结果保存异常,result:" + predictResult); } @@ -118,7 +119,7 @@ } } - public void predictAdjust(ItemVO predictItem, Date predictTime, List<StAdjustDeviationDTO> deviationList, String scheduleModelId) { + public void predictAdjust(ItemVO predictItem, Date predictTime, List<StAdjustDeviationDTO> deviationList, String scheduleModelId, String configId) { Calendar calendar = Calendar.getInstance(); calendar.setTime(predictTime); calendar.set(Calendar.MILLISECOND, 0); @@ -133,9 +134,11 @@ try { PredictItemHandler predictItemHandler = predictItemFactory.create(predictItem.getId()); PredictResultVO predictResult = predictItemHandler.predictAdjust(calendar.getTime(), predictItem, deviationList); + predictResult.setGranularity(predictItem.getGranularity()); + predictResult.setSaveIndex(predictItem.getSaveIndex()); // 保存预测结果 - predictResultHandler.savePredictAdjustResult(predictResult, JSONArray.toJSONString(deviationList), scheduleModelId); + predictResultHandler.savePredictAdjustResult(predictResult, JSONArray.toJSONString(deviationList), scheduleModelId,configId); } catch (Exception e) { e.printStackTrace(); log.error(MessageFormat.format("预测项编号:{0},预测项名称:{1},预测失败:{2} 预测时刻:{3}", -- Gitblit v1.9.3