From 6ded7d890b86069c330875434d93924a659f8d75 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 24 Feb 2025 16:43:58 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=B7=A1=E6=A3=80-=E5=BA=94=E7=94=A8=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1360903792984064]应用巡检-应用巡检异常 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1360903792984064 --- .../api/job/CreateInspectAppJobApi.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/neatlogic/module/inspect/api/job/CreateInspectAppJobApi.java b/src/main/java/neatlogic/module/inspect/api/job/CreateInspectAppJobApi.java index 5323d8e..166ceae 100644 --- a/src/main/java/neatlogic/module/inspect/api/job/CreateInspectAppJobApi.java +++ b/src/main/java/neatlogic/module/inspect/api/job/CreateInspectAppJobApi.java @@ -142,20 +142,22 @@ public class CreateInspectAppJobApi extends PrivateApiComponentBase { } Map ciMap = new HashMap<>(); Map ciIdToCombopIdMap = new HashMap<>(); - ICiCrossoverMapper ciCrossoverMapper = CrossoverServiceFactory.getApi(ICiCrossoverMapper.class); - List ciVoList = ciCrossoverMapper.getCiByIdList(new ArrayList<>(allResourceTypeIdSet)); - for (CiVo ciVo : ciVoList) { - Long ciId = ciVo.getId(); - Long combopId = inspectMapper.getCombopIdByCiId(ciId); - if (combopId == null) { - continue; - } - AutoexecCombopVo combopVo = autoexecCombopMapper.getAutoexecCombopById(combopId); - if (combopVo == null) { - continue; + if (CollectionUtils.isNotEmpty(allResourceTypeIdSet)) { + ICiCrossoverMapper ciCrossoverMapper = CrossoverServiceFactory.getApi(ICiCrossoverMapper.class); + List ciVoList = ciCrossoverMapper.getCiByIdList(new ArrayList<>(allResourceTypeIdSet)); + for (CiVo ciVo : ciVoList) { + Long ciId = ciVo.getId(); + Long combopId = inspectMapper.getCombopIdByCiId(ciId); + if (combopId == null) { + continue; + } + AutoexecCombopVo combopVo = autoexecCombopMapper.getAutoexecCombopById(combopId); + if (combopVo == null) { + continue; + } + ciMap.put(ciId, ciVo); + ciIdToCombopIdMap.put(ciId, combopId); } - ciMap.put(ciId, ciVo); - ciIdToCombopIdMap.put(ciId, combopId); } for (ResourceSearchVo searchVo : searchList) { if (CollectionUtils.isEmpty(searchVo.getTypeIdList())) { -- Gitee