浏览代码

fix : FOV-68 优化

lvxianyun 3 年之前
父节点
当前提交
bb2b2b2353
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      src/main/java/com/persagy/proxy/object/service/impl/AdmSystemServiceImpl.java

+ 7 - 5
src/main/java/com/persagy/proxy/object/service/impl/AdmSystemServiceImpl.java

@@ -60,11 +60,13 @@ public class AdmSystemServiceImpl extends AbstractAdmBaseServiceImpl<AdmSystem>
         List<AdmEquipment> equipmentList = new ArrayList<>();
         for(AdmSystem vo:vos) {
             vo.setCategoryName(codeNameMap.get(vo.getClassCode()));
-            AdmSystemCategory admSystemCategory = new AdmSystemCategory();
-            admSystemCategory.setCategoryName(codeNameMaps.get(vo.getClassCode()).getName());
-            admSystemCategory.setCode(codeNameMaps.get(vo.getClassCode()).getCode());
-            admSystemCategory.setProjectI(codeNameMaps.get(vo.getClassCode()).getProjectId());
-            vo.setCategoryNames(admSystemCategory);
+            if(codeNameMaps.get(vo.getClassCode()) != null){
+                AdmSystemCategory admSystemCategory = new AdmSystemCategory();
+                admSystemCategory.setCategoryName(codeNameMaps.get(vo.getClassCode()).getName());
+                admSystemCategory.setCode(codeNameMaps.get(vo.getClassCode()).getCode());
+                admSystemCategory.setProjectI(codeNameMaps.get(vo.getClassCode()).getProjectId());
+                vo.setCategoryNames(admSystemCategory);
+            }
             // 收集设备对象
             if(CollUtil.isEmpty(vo.getEquipmentList())) {
                 continue;