|
@@ -1,17 +1,18 @@
|
|
|
package com.persagy.proxy.object.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
+import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
import com.persagy.proxy.adm.service.impl.AbstractAdmBaseServiceImpl;
|
|
|
+import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
|
import com.persagy.proxy.dictionary.model.AdmDict;
|
|
|
-import com.persagy.proxy.object.model.AdmEquipment;
|
|
|
import com.persagy.proxy.dictionary.model.AdmObjectType;
|
|
|
-import com.persagy.proxy.object.model.AdmSystem;
|
|
|
-import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
-import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
import com.persagy.proxy.dictionary.service.IAdmDictService;
|
|
|
+import com.persagy.proxy.object.model.AdmEquipment;
|
|
|
+import com.persagy.proxy.object.model.AdmSystem;
|
|
|
+import com.persagy.proxy.object.model.AdmSystemCategory;
|
|
|
import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
|
import com.persagy.proxy.object.service.IAdmSystemService;
|
|
|
-import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -54,10 +55,16 @@ public class AdmSystemServiceImpl extends AbstractAdmBaseServiceImpl<AdmSystem>
|
|
|
}
|
|
|
// 转换为编码名称Map
|
|
|
Map<String, String> codeNameMap = CollUtil.fieldValueAsMap(dicList, "code", "name");
|
|
|
+ Map<String, AdmObjectType> codeNameMaps = CollUtil.fieldValueMap(dicList, "code");
|
|
|
// 给系统赋值 - 同时收集设备对象,扩展设备对象赋值
|
|
|
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(CollUtil.isEmpty(vo.getEquipmentList())) {
|
|
|
continue;
|