From b651cbfd94d8d636c01b61e483ed1cff98e1bcb9 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 23 十二月 2024 16:13:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/ItemEntityFactory.java | 64 ++----------------------------- 1 files changed, 5 insertions(+), 59 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/ItemEntityFactory.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/ItemEntityFactory.java index 7f54058..82634b2 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/ItemEntityFactory.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/factory/ItemEntityFactory.java @@ -1,12 +1,12 @@ package com.iailab.module.model.mdk.factory; +import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; import com.iailab.module.model.mcs.pre.entity.MmItemTypeEntity; import com.iailab.module.model.mcs.pre.service.MmItemOutputService; import com.iailab.module.model.mcs.pre.service.MmItemTypeService; import com.iailab.module.model.mcs.pre.service.MmPredictItemService; import com.iailab.module.model.mdk.vo.ItemVO; import com.iailab.module.model.mdk.vo.MergeItemVO; -import com.iailab.module.model.mdk.vo.MmItemOutputVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -23,8 +23,7 @@ private Map<String, MmItemTypeEntity> itemTypeMap = new HashMap<>(); private Map<String, MergeItemVO> mergeItemMap = new HashMap<>(); private Map<String, ItemVO> itemNoEntityMap = new HashMap<>(); - private Map<String, List<MmItemOutputVO>> itemOutPutItemMap = new HashMap<>(); - private Map<String, MmItemOutputVO> itemOutputMap = new HashMap<>(); + private Map<String, List<MmItemOutputEntity>> itemOutPutItemMap = new HashMap<>(); @Autowired private MmPredictItemService mmPredictItemService; @@ -78,7 +77,7 @@ * @return */ public ItemVO getItemById(String itemId) { - ItemVO ItemVO = mmPredictItemService.getItemById(itemId); + ItemVO ItemVO = mmPredictItemService.getItemByIdFromCache(itemId); if (!ItemVOHashMap.containsKey(itemId)) { if (ItemVO != null) { ItemVOHashMap.put(itemId, ItemVO); @@ -95,8 +94,8 @@ * @param itemId * @return */ - public List<MmItemOutputVO> getOutPutByItemId(String itemId) { - List<MmItemOutputVO> list = mmItemOutputService.getOutPutByItemId(itemId); + public List<com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity> getOutPutByItemId(String itemId) { + List<com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity> list = mmItemOutputService.getByItemid(itemId); if (!itemOutPutItemMap.containsKey(itemId)) { if (list != null) { itemOutPutItemMap.put(itemId, list); @@ -107,57 +106,4 @@ return list; } - /** - * 5. - * - * @param outputId - * @return - */ - public MmItemOutputVO getItemOutPutById(String outputId) { - if (!itemOutputMap.containsKey(outputId)) { - MmItemOutputVO itemOutput = mmItemOutputService.getOutPutById(outputId); - if (itemOutput != null) { - itemOutputMap.put(outputId, itemOutput); - } else { - return null; - } - } - return itemOutputMap.get(outputId); - } - - /** - * 6.根据预测项ID,获取预测项对应的输出参数的维数 - * - * @param itemId - * @return - */ - public Integer getItemOutputCount(String itemId) { - if (!itemOutPutItemMap.containsKey(itemId)) { - List<MmItemOutputVO> list = mmItemOutputService.getOutPutByItemId(itemId); - if (list != null) { - itemOutPutItemMap.put(itemId, list); - } else { - return 0; - } - } - return itemOutPutItemMap.get(itemId).size(); - } - - /** - * 7.根据预测项ID,获取对应的MmItemTypeEntity实体 - * - * @param itemId - * @return - */ - public MmItemTypeEntity getMmItemTypeEntity(String itemId) { - if (!itemTypeMap.containsKey(itemId)) { - MmItemTypeEntity MmItemTypeEntity = mmItemTypeService.getItemTypeByItemId(itemId); - if (MmItemTypeEntity != null) { - itemTypeMap.put(itemId, MmItemTypeEntity); - } else { - return null; - } - } - return itemTypeMap.get(itemId); - } } -- Gitblit v1.9.3