From 5e81b7eba5eb3e29ef00287733221915a6c61bbe Mon Sep 17 00:00:00 2001
From: wangyifei <1522824457@qq.com>
Date: 星期二, 29 十月 2024 19:05:13 +0800
Subject: [PATCH] 降水范围校验接口第一次提交

---
 src/main/java/com/se/simu/controller/SimuController.java |   70 +++++++++++++++++++++++++++++-----
 1 files changed, 59 insertions(+), 11 deletions(-)

diff --git a/src/main/java/com/se/simu/controller/SimuController.java b/src/main/java/com/se/simu/controller/SimuController.java
index cff90ca..f0c40b4 100644
--- a/src/main/java/com/se/simu/controller/SimuController.java
+++ b/src/main/java/com/se/simu/controller/SimuController.java
@@ -1,6 +1,9 @@
 package com.se.simu.controller;
 
+import cn.hutool.json.JSONArray;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.se.simu.domain.dto.GeDb;
+import com.se.simu.domain.dto.GeLayer;
 import com.se.simu.domain.po.DataPo;
 import com.se.simu.domain.po.SimuPo;
 import com.se.simu.domain.vo.CreateSimuVo;
@@ -155,14 +158,48 @@
         return System.currentTimeMillis();
     }
 
+    @ApiOperation(value = "testCallExe *")
+    @GetMapping("/testCallExe")
+    public R<Object> testCallExe() {
+        try {
+            DataPo data = new DataPo();
+            data.setInPath("20241010095328");
+
+            String str = uwService.callExe(data);
+
+            return success(str);
+        } catch (Exception ex) {
+            return fail(ex, null);
+        }
+    }
+
     @ApiOperation(value = "testResuslt *")
     @GetMapping("/testResuslt")
     public R<Object> testResuslt() {
         try {
-            //DataPo data = new DataPo("20240913", "20240913", "20240913", 116.64388473935195, 39.884315914604464, 116.64754729082588, 39.887069143903496, 50.0, 25);
-            //Object rs = gedbService.test(data);
+            DataPo data = new DataPo();
+            data.setEpsg(4548);
+            data.setInPath("20241010095328");
+            data.setStartTime(StringHelper.YMDHMS_FORMAT.parse("2024-09-30 00:00:00"));
 
-            Object rs = resultService.testResuslt();
+            resultService.process(data);
+
+            return success("ok");
+        } catch (Exception ex) {
+            return fail(ex, null);
+        }
+    }
+
+    @ApiOperation(value = "testSww2Tif *")
+    @GetMapping("/testSww2Tif")
+    public R<Object> testSww2Tif() {
+        try {
+            DataPo data = new DataPo();
+            data.setEpsg(4548);
+            data.setInPath("20241010095328");
+            data.setStartTime(StringHelper.YMDHMS_FORMAT.parse("2024-09-30 00:00:00"));
+
+            Object rs = uwService.copeDrainFiles(data);
 
             return success(rs);
         } catch (Exception ex) {
@@ -170,16 +207,27 @@
         }
     }
 
-    @ApiOperation(value = "testKeyFrame *")
-    @GetMapping("/testKeyFrame")
-    public R<Object> testKeyFrame() {
+
+    /**
+     * 浣跨敤绌洪棿鑼冨洿鏌ヨ 绠$偣,绠$嚎,寤虹瓚鐗� 3涓浘灞傦紝涓旀瘡涓浘灞傜殑鏁伴噺澶т簬0锛岃繑鍥� true銆�
+     */
+    @ApiOperation(value = "闄嶆按鑼冨洿鏍¢獙")
+    @GetMapping("/rangeVerif")
+    public R<Object> rangeVerif(@RequestParam @ApiParam("鏈�灏廥")  Double minx,
+                                @RequestParam @ApiParam("鏈�灏弝")  Double miny,
+                                @RequestParam @ApiParam("鏈�澶")  Double maxx,
+                                @RequestParam @ApiParam("鏈�澶")  Double maxy) {
         try {
             DataPo data = new DataPo();
-            data.setInPath("20241010095328");
-
-            Object rs = uwService.getKeyFrame(data);
-
-            return success(rs);
+            data.setMinx(minx);
+            data.setMiny(miny);
+            data.setMaxx(maxx);
+            data.setMaxy(maxy);
+            data.setEpsg(4326);
+            String token = gedbService.getToken();
+            GeDb db = gedbService.connectGedb(token, data);
+            List<GeLayer> layers = gedbService.getLayers(token, db);
+            return success(gedbService.queryBboxCount(token,db, layers));
         } catch (Exception ex) {
             return fail(ex, null);
         }

--
Gitblit v1.9.3