From ec50954c8c9d244a2ff259b653aaaa7bfeabe79b Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 21 三月 2025 14:45:52 +0800 Subject: [PATCH] 数据分析页面显示预警信息 调度建议 --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java index 2b25ec0..de4d7a0 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/service/impl/MmItemOutputServiceImpl.java @@ -11,6 +11,7 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -105,12 +106,32 @@ } @Override + public List<String> getItemIdByOut(List<String> outIds) { + List<String> result = new ArrayList<>(); + if (CollectionUtils.isEmpty(outIds)) { + return result; + } + QueryWrapper<MmItemOutputEntity> queryWrapper = new QueryWrapper<>(); + queryWrapper.in("id", outIds); + List<MmItemOutputEntity> list = baseMapper.selectList(queryWrapper); + if (CollectionUtils.isEmpty(list)) { + return result; + } + list.forEach(item -> { + result.add(item.getItemid()); + }); + return result; + } + + @Override public MmItemOutputEntity getOutPutById(String outputid) { if (outputMap.containsKey(outputid)) { return outputMap.get(outputid); } MmItemOutputEntity entity = mmItemOutputDao.selectById(outputid); - outputMap.put(outputid, entity); - return entity; + if (entity != null) { + outputMap.put(outputid, entity); + } + return outputMap.get(outputid); } } -- Gitblit v1.9.3