From b82ba2a29aa9ee181c707677157d8057fff68450 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 16 十二月 2024 13:50:33 +0800 Subject: [PATCH] 预测项数据图表查询bug,不能从缓存中查item,要最新的运行时间 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleInfoConstructor.java | 42 ++++++------------------------------------ 1 files changed, 6 insertions(+), 36 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleInfoConstructor.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleInfoConstructor.java index 8b45b26..582a1b9 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleInfoConstructor.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleInfoConstructor.java @@ -1,12 +1,11 @@ package com.iailab.module.model.mdk.sample; import com.iailab.module.model.mcs.pre.entity.MmModelParamEntity; +import com.iailab.module.model.mcs.pre.service.MmModelParamService; +import com.iailab.module.model.mcs.pre.service.MmPredictItemService; import com.iailab.module.model.mcs.pre.service.MmPredictModelService; -import com.iailab.module.model.mdk.factory.ItemEntityFactory; -import com.iailab.module.model.mdk.factory.ModelEntityFactory; import com.iailab.module.model.mdk.sample.dto.ColumnItem; import com.iailab.module.model.mdk.sample.dto.ColumnItemPort; -import com.iailab.module.model.mdk.sample.dto.SampleInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -27,15 +26,10 @@ private MmPredictModelService mmPredictModelService; @Autowired - private ModelEntityFactory modelEntityFactory; + private MmModelParamService mmModelParamService; @Autowired - private ItemEntityFactory itemEntityFactory; - - @Override - public SampleInfo prepareSampleInfo(String modelId, Date predictTime) { - return super.prepareSampleInfo(modelId, predictTime); - } + private MmPredictItemService mmPredictItemService; /** * 返回样本矩阵的列数 @@ -46,30 +40,6 @@ @Override protected Integer getSampleColumn(String modelId) { return mmPredictModelService.getSampleLength(modelId).intValue(); - } - - /** - * 返回样本的开始时间 - * - * @param columnItem - * @param predictTime - * @return - */ - @Override - protected Date getStartTime(ColumnItem columnItem, Date predictTime) { - return super.getStartTime(columnItem, predictTime); - } - - /** - * 返回样本的结束时间 - * - * @param columnItem - * @param predictTime - * @return - */ - @Override - protected Date getEndTime(ColumnItem columnItem, Date predictTime) { - return super.getEndTime(columnItem, predictTime); } /** @@ -85,7 +55,7 @@ List<ColumnItem> columnItemList = new ArrayList<>(); ColumnItem columnInfo = new ColumnItem(); ColumnItemPort curPort = new ColumnItemPort(); //当前端口 - List<MmModelParamEntity> modelInputParamEntityList = modelEntityFactory.getModelInputParam(modelId); + List<MmModelParamEntity> modelInputParamEntityList = mmModelParamService.getByModelidFromCache(modelId); if (CollectionUtils.isEmpty(modelInputParamEntityList)) { return null; } @@ -135,7 +105,7 @@ */ @Override protected Integer getSampleCycle(String modelId) { - return itemEntityFactory.getItemById(modelEntityFactory.getModelEntity(modelId).getItemid()).getGranularity(); + return mmPredictItemService.getItemByIdFromCache(mmPredictModelService.getInfoFromCatch(modelId).getItemid()).getGranularity(); } -- Gitblit v1.9.3