From 0cbbe2c1cbfbf73e02e1796d921c2911c96d370b Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 23 十二月 2024 11:46:31 +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/SampleInfoConstructor.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 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 3d53588..515637b 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 @@ -19,6 +19,7 @@ import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.Map; /** * @author PanZhibao @@ -91,13 +92,13 @@ * @return * @throws Exception */ - protected Date getStartTime(ColumnItem columnItem, Date originalTime) { + protected Date getStartTime(ColumnItem columnItem, Date originalTime, Map<String, ApiPointDTO> pointMap) { Date dateTime = new Date(); Calendar calendar = Calendar.getInstance(); calendar.setTime(originalTime); switch (ModelParamType.getEumByCode(columnItem.getParamType())) { case DATAPOINT: - ApiPointDTO dataPoint = dataPointApi.getInfoById(columnItem.getParamId()); + ApiPointDTO dataPoint = pointMap.get(columnItem.getParamId()); if (dataPoint == null) { return null; } @@ -127,13 +128,13 @@ * @return * @throws Exception */ - protected Date getEndTime(ColumnItem columnItem, Date originalTime) { + protected Date getEndTime(ColumnItem columnItem, Date originalTime,Map<String, ApiPointDTO> pointMap) { Date dateTime = new Date(); Calendar calendar = Calendar.getInstance(); calendar.setTime(originalTime); switch (ModelParamType.getEumByCode(columnItem.getParamType())) { case DATAPOINT: - ApiPointDTO dataPoint = dataPointApi.getInfoById(columnItem.getParamId()); + ApiPointDTO dataPoint = pointMap.get(columnItem.getParamId()); if (dataPoint == null) { return null; } @@ -179,7 +180,7 @@ granularity = mmPredictItemService.getItemByOutPutId(columnItem.getParamId()).getGranularity(); break; case MERGEITEM: - granularity = mmPredictItemService.getItemById(columnItem.getParamId()).getGranularity(); + granularity = mmPredictItemService.getItemByIdFromCache(columnItem.getParamId()).getGranularity(); break; case IND: ApiIndItemDTO indItemDTO = indItemApi.getInfoById(columnItem.getParamId()); -- Gitblit v1.9.3