Bladeren bron

系统检查返回值增加字段

欧阳劲驰 3 maanden geleden
bovenliggende
commit
36c7568cff

+ 35 - 0
src/main/java/com/shkpr/service/alambizplugin/commtools/BeanUtil.java

@@ -0,0 +1,35 @@
+package com.shkpr.service.alambizplugin.commtools;
+
+import org.apache.commons.lang3.ObjectUtils;
+import org.springframework.beans.BeanUtils;
+
+/**
+ * bean工具类
+ *
+ * @author 欧阳劲驰
+ * @since 1.0.0
+ */
+public class BeanUtil {
+
+    /**
+     * 拷贝
+     *
+     * @param source     被拷贝对象
+     * @param targetType 类型
+     * @param <T>        类型
+     * @return 新对象
+     */
+    public static <T> T copy(Object source, Class<T> targetType) {
+        try {
+            if (!ObjectUtils.allNotNull(source, targetType)) {
+                return null;
+            }
+            //拷贝资源
+            T t = targetType.getDeclaredConstructor().newInstance();
+            BeanUtils.copyProperties(source, t);
+            return t;
+        } catch (ReflectiveOperationException e) {
+            return null;
+        }
+    }
+}

+ 9 - 8
src/main/java/com/shkpr/service/alambizplugin/components/GisSurveySystemChecker.java

@@ -12,6 +12,7 @@ import com.shkpr.service.alambizplugin.constants.GisSurveyCheckTypeEnum;
 import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
 import com.shkpr.service.alambizplugin.dbdao.services.intef.GisSurveyLayerApplyService;
 import com.shkpr.service.alambizplugin.dbdao.services.intef.TypeDefineService;
+import com.shkpr.service.alambizplugin.dto.GisSurveyCheckElement;
 import com.shkpr.service.alambizplugin.dto.GisSurveyCheckResult;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyLine;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyPoint;
@@ -76,13 +77,13 @@ public class GisSurveySystemChecker {
         //构建返回
         GisSurveyCheckResult result = GisSurveyCheckResult.fail(params);
         //孤立点任务
-        ListenableFuture<List<String>> isolatedPointsFuture = null;
+        ListenableFuture<List<GisSurveyCheckElement>> isolatedPointsFuture = null;
         //孤立线任务
-        ListenableFuture<List<List<String>>> IsolatedLinesFuture = null;
+        ListenableFuture<List<List<GisSurveyCheckElement>>> IsolatedLinesFuture = null;
         //重复点任务
-        ListenableFuture<List<List<String>>> duplicatePointsFuture = null;
+        ListenableFuture<List<List<GisSurveyCheckElement>>> duplicatePointsFuture = null;
         //重叠线任务
-        ListenableFuture<List<List<String>>> overlapLinesFuture = null;
+        ListenableFuture<List<List<GisSurveyCheckElement>>> overlapLinesFuture = null;
         //点集合
         List<GisSurveyLayerApplyPoint> points = null;
         //线集合
@@ -127,26 +128,26 @@ public class GisSurveySystemChecker {
             //等待结果,并存入返回,优先监听点相关(执行速度快且只需要点集合,优先释放点集合内存)
             if (isolatedPointsFuture != null) {
                 //监听孤立点
-                final List<String> isolatedPoints = isolatedPointsFuture.get();
+                final List<GisSurveyCheckElement> isolatedPoints = isolatedPointsFuture.get();
                 result.setIsolatedPoints(isolatedPoints);
                 //释放点缓存(孤立点和重复点都完成时,后续不需要点数据,释放缓存节省内存)
                 if (duplicatePointsFuture != null && duplicatePointsFuture.isDone()) points.clear();
             }
             if (duplicatePointsFuture != null) {
                 //监听重复点
-                final List<List<String>> duplicatePointCodes = duplicatePointsFuture.get();
+                final List<List<GisSurveyCheckElement>> duplicatePointCodes = duplicatePointsFuture.get();
                 result.setDuplicatePoints(duplicatePointCodes);
                 //释放点缓存(孤立点和重复点都完成时,后续不需要点数据,释放缓存节省内存)
                 if (isolatedPointsFuture != null && isolatedPointsFuture.isDone()) points.clear();
             }
             if (IsolatedLinesFuture != null) {
                 //监听重复线
-                final List<List<String>> isolatedLines = IsolatedLinesFuture.get();
+                final List<List<GisSurveyCheckElement>> isolatedLines = IsolatedLinesFuture.get();
                 result.setIsolatedLines(isolatedLines);
             }
             if (overlapLinesFuture != null) {
                 //监听重叠线
-                final List<List<String>> overlapLines = overlapLinesFuture.get();
+                final List<List<GisSurveyCheckElement>> overlapLines = overlapLinesFuture.get();
                 result.setOverlapLines(overlapLines);
             }
 

+ 6 - 4
src/main/java/com/shkpr/service/alambizplugin/components/checker/DuplicatePointsFinder.java

@@ -2,7 +2,9 @@ package com.shkpr.service.alambizplugin.components.checker;
 
 import com.global.base.log.LogLevelFlag;
 import com.global.base.log.LogPrintMgr;
+import com.shkpr.service.alambizplugin.commtools.BeanUtil;
 import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
+import com.shkpr.service.alambizplugin.dto.GisSurveyCheckElement;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyPoint;
 import com.shkpr.service.alambizplugin.dto.TypeDefine;
 import org.apache.commons.lang3.StringUtils;
@@ -55,7 +57,7 @@ public class DuplicatePointsFinder {
      * @return 重复点
      */
     @Async
-    public ListenableFuture<List<List<String>>> findDuplicatePoints(List<GisSurveyLayerApplyPoint> points, List<TypeDefine> typeDefines) throws InterruptedException {
+    public ListenableFuture<List<List<GisSurveyCheckElement>>> findDuplicatePoints(List<GisSurveyLayerApplyPoint> points, List<TypeDefine> typeDefines) throws InterruptedException {
         //经纬度精度
         int lonScale = getScale(typeDefines, LNG_KEY);
         int latScale = getScale(typeDefines, LAT_KEY);
@@ -76,12 +78,12 @@ public class DuplicatePointsFinder {
         //响应中断
         if (Thread.interrupted()) throw new InterruptedException();
         //并行流处理
-        List<List<String>> collect = keyToPoints.values().parallelStream()
+        List<List<GisSurveyCheckElement>> collect = keyToPoints.values().parallelStream()
                 //过滤组内大于1
                 .filter(group -> group.size() > 1)
-                //取出code
+                //转为返回元素
                 .map(group -> group.stream()
-                        .map(GisSurveyLayerApplyPoint::getCode)
+                        .map(point-> BeanUtil.copy(point, GisSurveyCheckElement.class))
                         .collect(Collectors.toList())
                 )
                 .collect(Collectors.toList());

+ 9 - 5
src/main/java/com/shkpr/service/alambizplugin/components/checker/IsolatedLinesFinder.java

@@ -3,7 +3,9 @@ package com.shkpr.service.alambizplugin.components.checker;
 
 import com.global.base.log.LogLevelFlag;
 import com.global.base.log.LogPrintMgr;
+import com.shkpr.service.alambizplugin.commtools.BeanUtil;
 import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
+import com.shkpr.service.alambizplugin.dto.GisSurveyCheckElement;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyLine;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.AsyncResult;
@@ -41,14 +43,14 @@ public class IsolatedLinesFinder {
      * @return 线分组
      */
     @Async
-    public ListenableFuture<List<List<String>>> findIsolatedLines(List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
+    public ListenableFuture<List<List<GisSurveyCheckElement>>> findIsolatedLines(List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
         LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, "开始执行寻找孤立线========>");
         long begin = System.currentTimeMillis();
 
         //创建并查集
         UnionFind unionFind = new UnionFind();
         //分组线
-        List<List<String>> groupLines = unionFind.groupLines(lines);
+        List<List<GisSurveyCheckElement>> groupLines = unionFind.groupLines(lines);
 
         long end = System.currentTimeMillis();
         LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName
@@ -77,7 +79,7 @@ public class IsolatedLinesFinder {
          * @param lines 线集合
          * @return 分组集合
          */
-        public List<List<String>> groupLines(List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
+        public List<List<GisSurveyCheckElement>> groupLines(List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
             //处理所有线
             for (GisSurveyLayerApplyLine line : lines) {
                 //响应中断
@@ -103,7 +105,7 @@ public class IsolatedLinesFinder {
             //清理关系表
             pointRoot.clear();
             //构建分组结果
-            Map<String, List<String>> groups = new HashMap<>();
+            Map<String, List<GisSurveyCheckElement>> groups = new HashMap<>();
             for (GisSurveyLayerApplyLine line : lines) {
                 //响应中断
                 if (Thread.interrupted()) throw new InterruptedException();
@@ -112,7 +114,9 @@ public class IsolatedLinesFinder {
                 //根线code
                 String rootCode = findRoot(lineCode);
                 //当前线存入根线组
-                groups.computeIfAbsent(rootCode, k -> new ArrayList<>()).add(lineCode);
+                groups.computeIfAbsent(rootCode, k -> new ArrayList<>())
+                        //转为返回元素
+                        .add(BeanUtil.copy(line, GisSurveyCheckElement.class));
             }
             return new ArrayList<>(groups.values());
         }

+ 11 - 6
src/main/java/com/shkpr/service/alambizplugin/components/checker/IsolatedPointsFinder.java

@@ -3,7 +3,9 @@ package com.shkpr.service.alambizplugin.components.checker;
 
 import com.global.base.log.LogLevelFlag;
 import com.global.base.log.LogPrintMgr;
+import com.shkpr.service.alambizplugin.commtools.BeanUtil;
 import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
+import com.shkpr.service.alambizplugin.dto.GisSurveyCheckElement;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyLine;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyPoint;
 import org.apache.commons.lang3.StringUtils;
@@ -15,6 +17,7 @@ import org.springframework.util.concurrent.ListenableFuture;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Objects;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -43,7 +46,7 @@ public class IsolatedPointsFinder {
      * @return 孤立点集合
      */
     @Async
-    public ListenableFuture<List<String>> findIsolatedPoints(List<GisSurveyLayerApplyPoint> points, List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
+    public ListenableFuture<List<GisSurveyCheckElement>> findIsolatedPoints(List<GisSurveyLayerApplyPoint> points, List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
         LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, "开始执行寻找孤立点========>");
         long begin = System.currentTimeMillis();
 
@@ -51,8 +54,8 @@ public class IsolatedPointsFinder {
         if (lines.isEmpty() && !points.isEmpty())
             return new AsyncResult<>(
                     points.parallelStream()
-                            //转code
-                            .map(GisSurveyLayerApplyPoint::getCode)
+                            //转为返回元素
+                            .map(point -> BeanUtil.copy(point, GisSurveyCheckElement.class))
                             .collect(Collectors.toList())
             );
         //线为空,点也为空,则无孤立点
@@ -73,9 +76,11 @@ public class IsolatedPointsFinder {
             connectedPoints.add(line.getDownNode());
         }
         //使用并行流找出孤立点
-        List<String> collect = points.parallelStream()
-                .map(GisSurveyLayerApplyPoint::getCode)
-                .filter(code -> !connectedPoints.contains(code))
+        List<GisSurveyCheckElement> collect = points.parallelStream()
+                //转为返回元素
+                .map(point -> BeanUtil.copy(point, GisSurveyCheckElement.class))
+                //过滤连通点
+                .filter(element -> Objects.nonNull(element) && !connectedPoints.contains(element.getCode()))
                 .collect(Collectors.toList());
 
 

+ 10 - 7
src/main/java/com/shkpr/service/alambizplugin/components/checker/OverlapLinesFinder.java

@@ -2,7 +2,9 @@ package com.shkpr.service.alambizplugin.components.checker;
 
 import com.global.base.log.LogLevelFlag;
 import com.global.base.log.LogPrintMgr;
+import com.shkpr.service.alambizplugin.commtools.BeanUtil;
 import com.shkpr.service.alambizplugin.constants.LogFlagBusiType;
+import com.shkpr.service.alambizplugin.dto.GisSurveyCheckElement;
 import com.shkpr.service.alambizplugin.dto.GisSurveyLayerApplyLine;
 import org.locationtech.jts.algorithm.Orientation;
 import org.locationtech.jts.geom.Coordinate;
@@ -46,12 +48,12 @@ public class OverlapLinesFinder {
      * @return 重复线分组
      */
     @Async
-    public ListenableFuture<List<List<String>>> findDuplicateLines(List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
+    public ListenableFuture<List<List<GisSurveyCheckElement>>> findDuplicateLines(List<GisSurveyLayerApplyLine> lines) throws InterruptedException {
         LogPrintMgr.getInstance().printLogMsg(LogLevelFlag.LOG_INFO, mBizType, mStrClassName, "开始执行寻找重复线========>");
         long begin = System.currentTimeMillis();
 
         //结果
-        List<List<String>> result = new ArrayList<>();
+        List<List<GisSurveyCheckElement>> result = new ArrayList<>();
         //双层循环遍历所有线
         for (int i = 0; i < lines.size(); i++) {
             GisSurveyLayerApplyLine line1 = lines.get(i);
@@ -64,7 +66,8 @@ public class OverlapLinesFinder {
                 // 判断是否重复
                 if (calcDuplicateLines(line1, line2)) {
                     // 创建两两一组的重复线对
-                    result.add(Arrays.asList(line1.getCode(), line2.getCode()));
+                    result.add(Arrays.asList(BeanUtil.copy(line1, GisSurveyCheckElement.class),
+                            BeanUtil.copy(line2, GisSurveyCheckElement.class)));
                 }
             }
         }
@@ -88,10 +91,10 @@ public class OverlapLinesFinder {
      */
     public boolean calcDuplicateLines(GisSurveyLayerApplyLine line1, GisSurveyLayerApplyLine line2) {
         //取出四个点
-        Coordinate a = line1.getGis().p0;
-        Coordinate b = line1.getGis().p1;
-        Coordinate c = line2.getGis().p0;
-        Coordinate d = line2.getGis().p1;
+        Coordinate a = line2.getGis().getCoordinateN(0);
+        Coordinate b = line1.getGis().getCoordinateN(1);
+        Coordinate c = line2.getGis().getCoordinateN(0);
+        Coordinate d = line2.getGis().getCoordinateN(1);
         //点数量判断
         if (a == null || b == null || c == null || d == null) return false;
         //检查C和D是否在AB的直线上(叉积为0,则方向一致)

+ 34 - 0
src/main/java/com/shkpr/service/alambizplugin/controllerserializer/GeometryDeserializer.java

@@ -0,0 +1,34 @@
+package com.shkpr.service.alambizplugin.controllerserializer;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import lombok.extern.slf4j.Slf4j;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.io.ParseException;
+import org.locationtech.jts.io.geojson.GeoJsonReader;
+
+import java.io.IOException;
+
+/**
+ * geom反序列化
+ *
+ * @author 欧阳进程
+ * @since 0.0.1
+ */
+@Slf4j
+public class GeometryDeserializer extends JsonDeserializer<Geometry> {
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Geometry deserialize(JsonParser p, DeserializationContext ctx) throws IOException {
+        try {
+            //读取GeoJson并转换为Geom
+            return new GeoJsonReader().read(p.getValueAsString());
+        } catch (ParseException e) {
+            log.error("反序列化geom异常:{}", e.getMessage());
+            return null;
+        }
+    }
+}

+ 33 - 0
src/main/java/com/shkpr/service/alambizplugin/controllerserializer/GeometrySerializer.java

@@ -0,0 +1,33 @@
+package com.shkpr.service.alambizplugin.controllerserializer;
+
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import org.locationtech.jts.geom.Geometry;
+import org.locationtech.jts.io.geojson.GeoJsonWriter;
+
+import java.io.IOException;
+
+/**
+ * geom序列化
+ *
+ * @author 欧阳进程
+ * @since 0.0.1
+ */
+public class GeometrySerializer extends JsonSerializer<Geometry> {
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void serialize(Geometry geom, JsonGenerator gen, SerializerProvider serializers) throws IOException {
+        //设置坐标系
+        geom.setSRID(4490);
+        //Geom转换为GeoJson
+        String geoJson = new GeoJsonWriter().write(geom);
+        //读取并输出
+        gen.writeObject(new ObjectMapper().readTree(geoJson));
+
+    }
+}

+ 17 - 14
src/main/java/com/shkpr/service/alambizplugin/dbdao/pgtype/GeomLineSegmentTypeHandlePg.java

@@ -5,7 +5,9 @@ import org.apache.ibatis.type.JdbcType;
 import org.apache.ibatis.type.MappedJdbcTypes;
 import org.apache.ibatis.type.MappedTypes;
 import org.locationtech.jts.geom.Coordinate;
-import org.locationtech.jts.geom.LineSegment;
+import org.locationtech.jts.geom.GeometryFactory;
+import org.locationtech.jts.geom.LineString;
+import org.locationtech.jts.geom.PrecisionModel;
 
 import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
@@ -20,22 +22,23 @@ import java.util.regex.Pattern;
  * @author 欧阳劲驰
  * @since 1.0.0
  */
-@MappedTypes({LineSegment.class})
+@MappedTypes({LineString.class})
 @MappedJdbcTypes(JdbcType.VARCHAR)
-public class GeomLineSegmentTypeHandlePg extends BaseTypeHandler<LineSegment> {
+public class GeomLineStringTypeHandlePg extends BaseTypeHandler<LineString> {
     //正则表达式匹配 [[x1,y1],[x2,y2]] 格式
     private static final Pattern PATTERN = Pattern.compile("^\\[\\[\\s*(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)\\s*],\\s*\\[\\s*(-?\\d+(\\.\\d+)?),\\s*(-?\\d+(\\.\\d+)?)\\s*]\\s*]$");
+    GeometryFactory factory = new GeometryFactory(new PrecisionModel(), 4490);
 
     /**
      * {@inheritDoc}
      */
     @Override
-    public void setNonNullParameter(PreparedStatement ps, int i, LineSegment segment, JdbcType jdbcType)
+    public void setNonNullParameter(PreparedStatement ps, int i, LineString lineString, JdbcType jdbcType)
             throws SQLException {
-        //将 LineSegment 序列化为 [[x1,y1],[x2,y2]] 字符串
-        if (segment != null) {
-            Coordinate p0 = segment.getCoordinate(0);
-            Coordinate p1 = segment.getCoordinate(1);
+        //将 LineString 序列化为 [[x1,y1],[x2,y2]] 字符串
+        if (lineString != null) {
+            Coordinate p0 = lineString.getCoordinateN(0);
+            Coordinate p1 = lineString.getCoordinateN(1);
             String value = String.format("[[%s,%s],[%s,%s]]", p0.x, p0.y, p1.x, p1.y);
             ps.setString(i, value);
         } else {
@@ -48,7 +51,7 @@ public class GeomLineSegmentTypeHandlePg extends BaseTypeHandler<LineSegment> {
      * {@inheritDoc}
      */
     @Override
-    public LineSegment getNullableResult(ResultSet rs, String columnName) throws SQLException {
+    public LineString getNullableResult(ResultSet rs, String columnName) throws SQLException {
         return parseString(rs.getString(columnName));
     }
 
@@ -56,7 +59,7 @@ public class GeomLineSegmentTypeHandlePg extends BaseTypeHandler<LineSegment> {
      * {@inheritDoc}
      */
     @Override
-    public LineSegment getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
+    public LineString getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
         return parseString(rs.getString(columnIndex));
     }
 
@@ -64,7 +67,7 @@ public class GeomLineSegmentTypeHandlePg extends BaseTypeHandler<LineSegment> {
      * {@inheritDoc}
      */
     @Override
-    public LineSegment getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
+    public LineString getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
         return parseString(cs.getString(columnIndex));
     }
 
@@ -75,7 +78,7 @@ public class GeomLineSegmentTypeHandlePg extends BaseTypeHandler<LineSegment> {
      * @return 线段
      * @throws SQLException sql异常
      */
-    private LineSegment parseString(String value) throws SQLException {
+    private LineString parseString(String value) throws SQLException {
         //非空校验
         if (value == null || value.isEmpty()) return null;
         //正则匹配
@@ -87,8 +90,8 @@ public class GeomLineSegmentTypeHandlePg extends BaseTypeHandler<LineSegment> {
                 double y0 = Double.parseDouble(matcher.group(2));
                 double x1 = Double.parseDouble(matcher.group(3));
                 double y1 = Double.parseDouble(matcher.group(4));
-                //构建线
-                return new LineSegment(x0, y0, x1, y1);
+                //构建线
+                return factory.createLineString(new Coordinate[]{new Coordinate(x0, y0), new Coordinate(x1, y1)});
             } catch (NumberFormatException e) {
                 throw new SQLException("坐标格式无效: " + value, e);
             }

+ 36 - 0
src/main/java/com/shkpr/service/alambizplugin/dto/GisSurveyCheckElement.java

@@ -0,0 +1,36 @@
+package com.shkpr.service.alambizplugin.dto;
+
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.shkpr.service.alambizplugin.controllerserializer.GeometryDeserializer;
+import com.shkpr.service.alambizplugin.controllerserializer.GeometrySerializer;
+import lombok.Data;
+import org.locationtech.jts.geom.Geometry;
+
+/**
+ * 系统检查元素dto
+ *
+ * @author 欧阳劲驰
+ * @since 1.0.0
+ */
+@Data
+public class GisSurveyCheckElement {
+    /**
+     * 元素唯一编码
+     */
+    private String code;
+    /**
+     * 坐标值
+     */
+    @JsonSerialize(using = GeometrySerializer.class)
+    @JsonDeserialize(using = GeometryDeserializer.class)
+    private Geometry gis;
+    /**
+     * 元素分类:point--点;line--线;face--面
+     */
+    private String kind;
+    /**
+     * 所属任务的唯一ID
+     */
+    private String jobId;
+}

+ 5 - 5
src/main/java/com/shkpr/service/alambizplugin/dto/GisSurveyCheckResult.java

@@ -19,7 +19,7 @@ import java.util.List;
 @Data
 public class GisSurveyCheckResult {
     /**
-     * 检查状态:0:进行中,1:成功,2:失败,3:不存在
+     * 检查状态:0:进行中,1:成功,2:失败,3:不存在,4:中断
      */
     private Integer checkStatus;
     /**
@@ -53,19 +53,19 @@ public class GisSurveyCheckResult {
     /**
      * 孤立点code
      */
-    private List<String> isolatedPoints;
+    private List<GisSurveyCheckElement> isolatedPoints;
     /**
      * 孤立线code
      */
-    private List<List<String>> isolatedLines;
+    private List<List<GisSurveyCheckElement>> isolatedLines;
     /**
      * 重复点code集合
      */
-    private List<List<String>> duplicatePoints;
+    private List<List<GisSurveyCheckElement>> duplicatePoints;
     /**
      * 重叠线code集合
      */
-    private List<List<String>> overlapLines;
+    private List<List<GisSurveyCheckElement>> overlapLines;
 
     /**
      * 进行中

+ 2 - 2
src/main/java/com/shkpr/service/alambizplugin/dto/GisSurveyLayerApplyLine.java

@@ -1,7 +1,7 @@
 package com.shkpr.service.alambizplugin.dto;
 
 import lombok.Data;
-import org.locationtech.jts.geom.LineSegment;
+import org.locationtech.jts.geom.LineString;
 
 /**
  * 采集元素处理申请线
@@ -30,7 +30,7 @@ public class GisSurveyLayerApplyLine {
     /**
      * 坐标值
      */
-    private LineSegment gis;
+    private LineString gis;
     /**
      * 操作标记:add/update/delete
      */

+ 1 - 1
src/main/resources/mapper/GisSurveyLayerApplyMapper.xml

@@ -21,7 +21,7 @@
         <result column="layer" jdbcType="VARCHAR" property="layer"/>
         <result column="kind" jdbcType="VARCHAR" property="kind"/>
         <result column="gis" jdbcType="VARCHAR" property="gis"
-                typeHandler="com.shkpr.service.alambizplugin.dbdao.pgtype.GeomLineSegmentTypeHandlePg"/>
+                typeHandler="com.shkpr.service.alambizplugin.dbdao.pgtype.GeomLineStringTypeHandlePg"/>
         <result column="apply" jdbcType="VARCHAR" property="apply"/>
         <result column="source" jdbcType="SMALLINT" property="source"/>
         <result column="up_node" jdbcType="VARCHAR" property="upNode"/>