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/sample/SampleInfoConstructor.java |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java
index 6468d20..af4ae5b 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java
@@ -1,6 +1,5 @@
 package com.iailab.module.model.mdk.sample;
 
-import com.iailab.module.data.api.ind.IndItemApi;
 import com.iailab.module.data.api.ind.dto.ApiIndItemDTO;
 import com.iailab.module.data.api.plan.dto.ApiPlanItemDTO;
 import com.iailab.module.data.api.point.dto.ApiPointDTO;
@@ -25,9 +24,6 @@
 abstract class SampleInfoConstructor {
 
     @Autowired
-    private IndItemApi indItemApi;
-
-    @Autowired
     private MmPredictItemService mmPredictItemService;
 
     /**
@@ -39,7 +35,9 @@
      */
     protected SampleInfo prepareSampleInfo(String modelId, Date predictTime, Map<Integer, Integer> dynamicDataLength) {
         //样本的列信息
-        return getColumnInfo(modelId, predictTime, dynamicDataLength);
+        SampleInfo sampleInfo = getColumnInfo(modelId, predictTime, dynamicDataLength);
+        sampleInfo.setPredictTime(predictTime);
+        return sampleInfo;
     }
 
     /**
@@ -124,7 +122,7 @@
                 break;
             case NORMALITEM:
             case MERGEITEM:
-                dateTime = calculateTime(originalTime, false, columnItem.getDataLength(), columnItem.getGranularity());
+                dateTime = calculateTime(originalTime, false, columnItem.getDataLength() + 1, columnItem.getGranularity());
                 break;
             default:
                 break;

--
Gitblit v1.9.3