浏览代码

增加场景下载功能

wuweihao 3 年之前
父节点
当前提交
f73d6536ed

+ 4 - 2
720yun_local_manage/gis_common/src/main/java/com/gis/common/util/CmdUtils.java

@@ -10,9 +10,10 @@ public class CmdUtils {
 
 
     /**
+     * 直接运行命令
      * @param command
      */
-    public static void callShell(String command){
+    public static void callCmd(String command){
         log.info("cmd: {}", command);
         try {
             Process process = Runtime.getRuntime().exec(command);
@@ -46,9 +47,10 @@ public class CmdUtils {
 //    }
 
     /**
-     *
+     * 运行xx.sh 脚本
      * @param command 命令
      * @param lineSize 日志输出行数 ,可以为null
+     *
      */
     public static void callShLine(String command, Integer lineSize){
         log.info("cmd: " + command);

+ 1 - 1
720yun_local_manage/gis_common/src/main/java/com/gis/common/util/ImgUtil.java

@@ -41,7 +41,7 @@ public class ImgUtil {
         cmd = cmd.replace("@output", saveCompressImgPath);
 
         // 开始压缩
-        CmdUtils.callShell(cmd);
+        CmdUtils.callCmd(cmd);
         log.info("压缩图片完成: {}", saveCompressImgPath);
 
         boolean file = FileUtil.isFile(saveCompressImgPath);

+ 4 - 2
720yun_local_manage/gis_common/src/main/java/com/gis/common/util/StreamGobblerLine.java

@@ -44,10 +44,12 @@ public class StreamGobblerLine extends Thread {
             while ( (line = br.readLine()) != null) {
                 if (lineSize != null) {
                     if (i % lineSize == 0) {
-                        log.info(type + "," + i +" : >" + line);
+//                        log.info(type + "," + i +" : >" + line);
+                        System.out.println(type + ">" + line);
                     }
                 } else {
-                    log.info(type + ","  + i +" : >" + line);
+//                    log.info(type + ","  + i +" : >" + line);
+                    System.out.println(type + ">" + line);
                 }
                 i++;