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 5323d8ef34cc3a3f276b62bf7e81bf127cf7e143..166ceaee1d380f0a60333088db84891c4592170e 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())) {