Ver código fonte

解决元空间保存问题

yucheng 3 anos atrás
pai
commit
6a41e26cad

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

@@ -1,6 +1,7 @@
 package com.persagy.proxy.adm.model;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.persagy.proxy.relation.model.BaseEntity;
 import lombok.Data;
 
 /**
@@ -9,17 +10,17 @@ import lombok.Data;
  * @date 2021/8/17
  */
 @Data
-public class AdmPoint {
+public class AdmPoint extends BaseEntity {
 
     /** 坐标x */
     @JSONField(name = "X")
-    private Double x;
+    private Double X;
 
     /** 坐标y */
     @JSONField(name = "Y")
-    private Double y;
+    private Double Y;
 
     /** 坐标z */
     @JSONField(name = "Z")
-    private Double z;
+    private Double Z;
 }

+ 8 - 0
src/main/java/com/persagy/proxy/adm/utils/AdmEntityTransferUtil.java

@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.dmp.basic.utils.JsonNodeUtils;
+import com.persagy.dmp.common.utils.JsonHelper;
 
 import java.io.IOException;
 import java.util.Iterator;
@@ -134,6 +135,13 @@ public class AdmEntityTransferUtil {
         copyProperty(node, "creationTime", "createTime");
         copyProperty(node, "modifiedTime", "lastUpdate");
         copyProperty(node, "objType", "objectType");
+        // outline特殊处理
+        JsonNode outLine = node.get("outline");
+        if(outLine != null && outLine.isTextual()) {
+            node.remove("outline");
+            ArrayNode arrayNode = JsonHelper.toSingleEntityQuietly(outLine.textValue(), ArrayNode.class);
+            node.set("outline", arrayNode);
+        }
         removeProperty(node, projection);
     }
 

+ 3 - 3
src/main/java/com/persagy/proxy/adm/utils/AdmQueryCriteriaHelper.java

@@ -206,15 +206,15 @@ public class AdmQueryCriteriaHelper {
      * @param express
      */
     private static void convertExpress(String name, ObjectNode criteria, String express) {
-        String cond = StrUtil.isBlank(StrUtil.getContainsStr(express, COND_STR)) ?
-                StrUtil.getContainsStr(express, COND_STR_TRIM) : StrUtil.getContainsStr(express, COND_STR);
+        String cond = StrUtil.isBlank(StrUtil.getContainsStrIgnoreCase(express, COND_STR)) ?
+                StrUtil.getContainsStrIgnoreCase(express, COND_STR_TRIM) : StrUtil.getContainsStrIgnoreCase(express, COND_STR);
         if(StrUtil.isBlank(cond)) {
             return;
         }
         int condIndex = StrUtil.indexOfIgnoreCase(express, cond, 0);
         String condLeft = StrUtil.subPre(express, condIndex).trim();
         String condRight = StrUtil.subSuf(express, condIndex+cond.length()).trim();
-        addCondition(name, criteria, condLeft, cond.trim(), condRight);
+        addCondition(name, criteria, condLeft, cond.trim().toLowerCase(), condRight);
     }
 
     /**

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

@@ -5,6 +5,7 @@ import lombok.Data;
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -73,7 +74,7 @@ public class AdmISpace {
     private String objectType = OBJ_TYPE;
 
     /** 轮廓线 */
-    private ArrayList<ArrayList<AdmPoint>> outline;
+    private List<List<AdmPoint>> outline;
 
     /** 对象类型code */
     private String classCode;