Sfoglia il codice sorgente

Merge branch 'develop' of http://39.106.8.246:3003/BDTP/adm-middleware.git into develop

zhangqiankun 3 anni fa
parent
commit
51cb9d649d

+ 3 - 3
src/main/java/com/persagy/proxy/adm/model/AdmPoint.java

@@ -13,14 +13,14 @@ import lombok.Data;
 public class AdmPoint extends BaseEntity {
 
     /** 坐标x */
-    @JsonProperty("X")
+    @JsonProperty("x")
     private Double x;
 
     /** 坐标y */
-    @JsonProperty("Y")
+    @JsonProperty("y")
     private Double y;
 
     /** 坐标z */
-    @JsonProperty("Z")
+    @JsonProperty("z")
     private Double z;
 }

+ 1 - 1
src/main/java/com/persagy/proxy/dictionary/service/impl/AbstractAdmDictBaseServiceImpl.java

@@ -46,7 +46,7 @@ public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T>
 
     private static final Set<String> TABLE_INFOS=CollUtil.newHashSet("id","code","localId",
             "localName","groupCode","projectId","objType","classCode","grouping","virtualCodes","createApp","updateApp",
-            "creator","creationTime","modifier","modifiedTime","valid");
+            "creator","creationTime","modifier","modifiedTime","valid","floorSequenceID");
 
     @Autowired
     private DmpRwdClient rwdClient;

+ 20 - 3
src/main/java/com/persagy/proxy/dictionary/service/impl/AdmPlanarServiceImpl.java

@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
 /**
@@ -57,14 +58,30 @@ public class AdmPlanarServiceImpl extends AbstractAdmBaseServiceImpl<T> implemen
      */
     @Override
     public AdmResponse queryPlanarEquip(InstanceUrlParam context, AdmPlanarEquipRequests requests, Class<AdmEquipment> clazz) throws Exception {
-
+       AdmResponse admResponse = new AdmResponse();
        if(CollUtil.isEmpty(requests.getZoneTypes()) && CollUtil.isEmpty(requests.getSpaceIds()) && CollUtil.isEmpty(requests.getFuncTypes())){
            //查询建筑楼层下的所有设备(或指定类型下的设备)
-             return queryAdmEquip(context,requests,clazz);
+          admResponse = queryAdmEquip(context, requests, clazz);
        }else{
            //查询空间下的设备
-           return queryAdmEquipInSpace(context,requests,clazz);
+          admResponse = queryAdmEquipInSpace(context,requests,clazz);
+       }
+       //结果集处理,设置设备类型名称字段
+        List<AdmEquipment> content = (List<AdmEquipment>)admResponse.getContent();
+       if(CollUtil.isEmpty(content)){
+           return admResponse;
        }
+        for (AdmEquipment admEquipment : content) {
+            Map<String, String> equipCategory = admEquipment.getEquipCategory();
+            if(CollUtil.isEmpty(equipCategory)){
+                continue;
+            }
+            for (Map.Entry<String, String> entry : equipCategory.entrySet()) {
+                admEquipment.setCodeName(entry.getValue());
+            }
+        }
+        admResponse.setContent(content);
+        return admResponse;
     }
 
     /**

+ 3 - 0
src/main/java/com/persagy/proxy/object/model/AdmEquipment.java

@@ -195,4 +195,7 @@ public class AdmEquipment extends AdmBaseEntity<AdmEquipment> {
     //@CascadeColumn(table="equipment", idColumn="class_code", childIdColumn="parent_id")
     private List<AdmObjectType> componentCategory;
 
+    /** 类型名称 */
+    private String codeName;
+
 }