1
13693261870
2024-10-14 a6fe405947004d6571806edabd8f14357e144cfa
src/main/java/com/se/simu/service/UwService.java
@@ -77,8 +77,8 @@
        try {
            // new String[] { "/bin/sh", "-c", cmd }
            process = Runtime.getRuntime().exec(cmd);
            nr = new BufferedReader(new InputStreamReader(process.getInputStream()));
            er = new BufferedReader(new InputStreamReader(process.getErrorStream()));
            nr = new BufferedReader(new InputStreamReader(process.getInputStream(), "GBK"));
            er = new BufferedReader(new InputStreamReader(process.getErrorStream(), "GBK"));
            String errorLine;
            while ((errorLine = er.readLine()) != null) {
@@ -124,6 +124,22 @@
        }
    }
    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() {
        //
    }