浏览代码

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

zhangqiankun 3 年之前
父节点
当前提交
3bac04c270

+ 14 - 1
src/main/java/com/persagy/proxy/adm/utils/AdmEntityTransferUtil.java

@@ -25,7 +25,20 @@ public class AdmEntityTransferUtil {
      * @return
      */
     public static ArrayNode toDmpMultiEntity(List objList) {
-        return JsonNodeUtils.toArrayNode(objList, "infos", null);
+        ArrayNode arrayNode = JsonNodeUtils.toArrayNode(objList, "infos", null);
+        if(arrayNode == null) {
+            return arrayNode;
+        }
+        // outline特殊处理
+        for(int i = 0;i < arrayNode.size();i++) {
+            ObjectNode jsonNode = (ObjectNode) arrayNode.get(i);
+            JsonNode outLine = jsonNode.get("outline");
+            if(outLine != null && !outLine.isTextual()) {
+                jsonNode.remove("outline");
+                jsonNode.put("outline", outLine.toString());
+            }
+        }
+        return arrayNode;
     }
 
     /**

+ 19 - 36
src/main/java/com/persagy/proxy/object/controller/AdmEquipmentController.java

@@ -1,35 +1,9 @@
 package com.persagy.proxy.object.controller;
 
-import java.awt.Color;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.FillPatternType;
-import org.apache.poi.xssf.usermodel.XSSFCell;
-import org.apache.poi.xssf.usermodel.XSSFCellStyle;
-import org.apache.poi.xssf.usermodel.XSSFColor;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.multipart.MultipartFile;
-
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -55,12 +29,21 @@ import com.persagy.proxy.common.entity.RelationDTO;
 import com.persagy.proxy.object.model.AdmEquipment;
 import com.persagy.proxy.object.service.IAdmEquipmentService;
 import com.persagy.proxy.report.service.IRelationReportService;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.util.StrUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.FillPatternType;
+import org.apache.poi.xssf.usermodel.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.*;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.*;
 
 /**
  * Adm 楼层 API
@@ -240,7 +223,7 @@ public class AdmEquipmentController {
                         relationDTOS.add(new RelationDTO(null, "MechInArch", "Eq2Bd", null , equipId, admEq.getBuildingId()));
                     }
                     if(StrUtil.isNotEmpty(admEq.getFloorId())){
-                        relationDTOS.add(new RelationDTO(null, "MechInArch", "Eq2Fl", null , equipId, admEq.getBuildingId()));
+                        relationDTOS.add(new RelationDTO(null, "MechInArch", "Eq2Fl", null , equipId, admEq.getFloorId()));
                     }
                 }
             }

+ 2 - 1
src/main/java/com/persagy/proxy/object/model/AdmSpace.java

@@ -94,7 +94,8 @@ public class AdmSpace extends AdmBaseEntity<AdmSpace> {
 
     /** 二维码图片 */
     private String qrcodePic;
-
+    /** BIM模型中坐标 */
+    private String bimLocation;
     /** 二维码图片 */
     private Boolean isAi = false;
     /** 垂直交通关系空间id */