Browse Source

添加方法

LAPTOP-BJJ3IV5R\SIWEI 9 months ago
parent
commit
6ec8dc2328

+ 3 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/analyse/HttpAnalyseService.java

@@ -13,12 +13,14 @@ import java.util.Map;
 
 public interface HttpAnalyseService {
 
+    public Object getHttpAnalyse(Object objectVo);
+
     public List<String> intersectsTableWkt(IntersectsTableWktVo analyseUtilsVo);
 
     public String intersectionTableWkt(IntersectionTableWktVo intersectionTableWktVo);
 
     public List<Map> rawTable(RawTableVo rawTableVo);
 
-    public  List<Map>  targetTable(TargetTableVo targetTableVo);
+    public List<Map> targetTable(TargetTableVo targetTableVo);
 
 }

+ 22 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/analyse/impl/HttpAnalyseServiceImpl.java

@@ -20,6 +20,28 @@ public class HttpAnalyseServiceImpl implements HttpAnalyseService {
     @Resource
     private AnalyseService analyseService;
 
+    public Object getHttpAnalyse(Object objectVo) {
+        RequestResult result = new RequestResult();
+        if (objectVo instanceof IntersectsTableWktVo) {
+            result = analyseService.rawTable((RawTableVo) objectVo);
+        }
+        if (StringUtils.isNull(result)) {
+            return null;
+        }
+        Object code = result.get("code");
+        Object statuscode = result.get("statuscode");
+        if (code == null && statuscode == null) {
+            return null;
+        }
+        if (code != null) {
+            return null;
+        }
+        if (statuscode != null && (Integer) statuscode != 200) {
+            return null;
+        }
+        return result.get("data");
+    }
+
     public List<String> intersectsTableWkt(IntersectsTableWktVo analyseUtilsVo) {
         RequestResult result = analyseService.intersectsTableWkt(analyseUtilsVo);
         if (StringUtils.isNull(result)) {