From 4624b6fd58f262ab95f2d60472560b9fc162d677 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 01 四月 2025 14:56:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/PredictSampleDataConstructor.java | 27 ++++++++++++--------------- 1 files changed, 12 insertions(+), 15 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 b08e5a7..9f5f731 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 @@ -14,10 +14,8 @@ import com.iailab.module.data.common.ApiDataQueryDTO; import com.iailab.module.data.common.ApiDataValueDTO; import com.iailab.module.model.common.utils.ASCIIUtil; -import com.iailab.module.model.mcs.pre.service.MmItemOutputService; -import com.iailab.module.model.mcs.pre.service.MmItemResultJsonService; import com.iailab.module.model.mcs.pre.service.MmItemResultService; -import com.iailab.module.model.mcs.pre.service.MmItemTypeService; +import com.iailab.module.model.mcs.sche.service.StAdjustResultService; import com.iailab.module.model.mdk.common.enums.ModelParamType; import com.iailab.module.model.mdk.sample.dto.ColumnItem; import com.iailab.module.model.mdk.sample.dto.ColumnItemPort; @@ -57,13 +55,7 @@ private MmItemResultService mmItemResultService; @Autowired - private MmItemResultJsonService mmItemResultJsonService; - - @Autowired - private MmItemTypeService mmItemTypeService; - - @Autowired - private MmItemOutputService mmItemOutputService; + private StAdjustResultService stAdjustResultService; /** * alter by zfc 2020.11.24 修改数据样本构造方案:sampleInfo中数据已按爪子进行分类,但爪内数据为无序的, @@ -134,7 +126,7 @@ //对每一项依次进行数据查询,然后将查询出的值赋给matrix对应的位置 for (int i = 0; i < entry.getColumnItemList().size(); i++) { try { - List<DataValueVO> dataEntityList = getData(entry.getColumnItemList().get(i), pointMap, planMap, indMap); + List<DataValueVO> dataEntityList = getData(sampleInfo, entry.getColumnItemList().get(i), pointMap, planMap, indMap); //补全数据 ColumnItem columnItem = entry.getColumnItemList().get(i); @@ -173,6 +165,7 @@ /** * getData * + * @param sampleInfo * @param columnItem * @param pointMap * @param planMap @@ -180,7 +173,8 @@ * @return * @throws Exception */ - private List<DataValueVO> getData(ColumnItem columnItem, Map<String, ApiPointDTO> pointMap, Map<String, ApiPlanItemDTO> planMap, Map<String, ApiIndItemDTO> indMap) throws Exception { + private List<DataValueVO> getData(SampleInfo sampleInfo, ColumnItem columnItem, Map<String, ApiPointDTO> pointMap, Map<String, ApiPlanItemDTO> planMap, + Map<String, ApiIndItemDTO> indMap) throws Exception { List<DataValueVO> dataList = new ArrayList<>(); String paramType = columnItem.getParamType(); switch (ModelParamType.getEumByCode(paramType)) { @@ -203,15 +197,18 @@ case NORMALITEM: case MERGEITEM: List<DataValueVO> predictValue = new ArrayList<>(); - if (columnItem.getStartTime().getTime() == columnItem.getEndTime().getTime()) { - predictValue = mmItemResultService.getPredictValueLast(columnItem.getParamId(), columnItem.getStartTime(), 2); - } else { + if (sampleInfo.getIsAdjust()) { + // 如果模拟调整先查调整结果 + predictValue = stAdjustResultService.getPredictValue(columnItem.getParamId(), sampleInfo.getPredictTime()); + } + if (CollectionUtils.isEmpty(predictValue)) { predictValue = mmItemResultService.getPredictValue(columnItem.getParamId(), columnItem.getStartTime(), columnItem.getEndTime()); } if (CollectionUtils.isEmpty(predictValue)) { break; } dataList = predictValue; + break; case PLAN: ApiDataQueryDTO queryPlanItemDto = new ApiDataQueryDTO(); -- Gitblit v1.9.3