| | |
| | | if (platformCatalog.getPlatformId().equals(platformCatalog.getParentId())) { |
| | | // 第一层节点 |
| | | platformCatalog.setBusinessGroupId(platformCatalog.getId()); |
| | | platformCatalog.setParentId(platform.getDeviceGBId()); |
| | | }else { |
| | | // 获取顶层的 |
| | | PlatformCatalog topCatalog = getTopCatalog(platformCatalog.getParentId(), platformCatalog.getPlatformId()); |
| | |
| | | } |
| | | if (platform.getTreeType().equals(TreeType.CIVIL_CODE)) { |
| | | platformCatalog.setCivilCode(platformCatalog.getId()); |
| | | if (platformCatalog.getPlatformId().equals(platformCatalog.getParentId())) { |
| | | // 第一层节点 |
| | | platformCatalog.setParentId(platform.getDeviceGBId()); |
| | | } |
| | | } |
| | | |
| | | int result = catalogMapper.add(platformCatalog); |