From 94bc1777d6005c380278de054a68bfceac92636b Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 16 十月 2024 15:00:30 +0800
Subject: [PATCH] 1

---
 src/main/java/com/se/simu/service/UwService.java |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/src/main/java/com/se/simu/service/UwService.java b/src/main/java/com/se/simu/service/UwService.java
index 634489b..d4a9c44 100644
--- a/src/main/java/com/se/simu/service/UwService.java
+++ b/src/main/java/com/se/simu/service/UwService.java
@@ -124,27 +124,17 @@
         }
     }
 
-    public String getKeyFrame(DataPo data) throws Exception {
-        String cmd = config.getKeyFrameBat() + " " + config.getInPath() + File.separator + data.getInPath() + File.separator + ".save" + File.separator + data.getInPath() + ".sww";
-
-        String str = exec(cmd);
-        if (StringHelper.isEmpty(str) || !str.contains("[")) {
-            throw new Exception("鐢熸垚鍏抽敭甯у嚭閿�");
-        }
-
-        String rs = str.split("\\[", 2)[1].replace("]", "").replace(" ", "");
-        if (StringHelper.isEmpty(rs)) {
-            throw new Exception("鍏抽敭甯т负绌�");
-        }
-
-        return rs;
-    }
-
     public void copeWaterFiles() {
         //
     }
 
-    public void copeDrainFiles() {
-        //
+    public String copeDrainFiles(DataPo data) throws Exception {
+        String time = StringHelper.YMDHMS_FORMAT.format(data.getStartTime());
+        String inPath = config.getInPath() + File.separator + data.getInPath();
+        String sww = inPath + File.separator + ".save" + File.separator + data.getInPath() + ".sww";
+
+        String cmd = config.getSww2tifBat() + " " + sww + " '" + time + "' " + data.getEpsg() + " " + inPath;
+
+        return exec(cmd);
     }
 }

--
Gitblit v1.9.3