From 0890b7861feae74bdcfd1851e577db6b9f31d484 Mon Sep 17 00:00:00 2001 From: xingjinshuang <xingjs@qq.com> Date: 星期四, 20 二月 2025 14:40:39 +0800 Subject: [PATCH] @xingjs@20250220@添加处理sww相关接口类 --- src/main/java/com/se/simu/service/UwService.java | 30 +++++++++--------------------- 1 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/se/simu/service/UwService.java b/src/main/java/com/se/simu/service/UwService.java index ae0b607..c9ca4a6 100644 --- a/src/main/java/com/se/simu/service/UwService.java +++ b/src/main/java/com/se/simu/service/UwService.java @@ -6,7 +6,6 @@ import com.se.simu.domain.po.DataPo; import com.se.simu.helper.StringHelper; import com.se.simu.helper.WebHelper; -import com.sun.xml.internal.messaging.saaj.util.TeeInputStream; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import com.se.simu.Rainfall; @@ -14,12 +13,6 @@ import javax.annotation.Resource; import java.io.*; -/** - * 鍐呮稘姹傝В鍣ㄦ湇鍔$被 - * - * @author WWW - * @date 2024-09-29 - */ @Slf4j @Service @SuppressWarnings("ALL") @@ -37,12 +30,6 @@ return _rainfall; } - /** - * 鍒涘缓闄嶉洦鏂囦欢 - * <p> - * https://blog.csdn.net/Dark_Drgon/article/details/139739924 - * C:\Program Files\matlab\R2020a\runtime\win64 - */ public void createRainFile(DataPo data) throws Exception { String filePath = config.getInPath() + File.separator + data.getInPath() + File.separator + config.getRaingage(); String startTime = StringHelper.YMDHMS_FORMAT.format(data.getStartTime()); @@ -106,7 +93,6 @@ log.error(errorLine); } - // 绛夊緟绋嬪簭鎵ц缁撴潫骞惰緭鍑虹姸鎬� int exitCode = process.waitFor(); return sb.toString(); @@ -139,13 +125,6 @@ } } - /** - * 鎵ц鍛戒护琛�,骞剁瓑寰呭懡浠ゆ墽琛屽畬姣� - * - * @param cmd 鍛戒护,window璁板緱瑕佷娇鐢╟md /c寮�澶�,濡俢md /c ipconfig - * @throws IOException - * @throws InterruptedException - */ private String execCmdLine(String cmd) throws IOException, InterruptedException { Process process = Runtime.getRuntime().exec(cmd); @@ -216,4 +195,13 @@ return exec(cmd); } + public String copeSwwDrainFiles(DataPo data) throws Exception { + String time = StringHelper.YMDHMS_FORMAT.format(data.getStartTime()); + String inPath = "H:\\simu\\semout"; + String sww = "H:\\simu\\semout\\testsem\\.out\\" + "testsem.sww"; + + String cmd = config.getSww2tifBat() + " " + sww + " \"" + time + "\" " + data.getEpsg() + " " + inPath; + + return exec(cmd); + } } -- Gitblit v1.9.3