Browse Source

打包数据 2

wuweihao 3 years ago
parent
commit
c5e6b1cd09

+ 8 - 2
720yun_local_manage/gis_pano/src/main/java/com/gis/cms/service/impl/OpsServiceImpl.java

@@ -179,8 +179,14 @@ public class OpsServiceImpl  implements OpsService {
     private void zipWork(String workId) {
         String outPath = configConstant.serverBasePath + "/download/" + workId +".zip";
         String intPath = configConstant.serverBasePath + "/download/" + workId ;
-        String cmd = StrUtil.format("zip -r {} {} ", outPath,  intPath);
-        CmdUtils.callCmd(cmd);
+
+        String cmd = CmdConstant.zip;
+        cmd = cmd.replaceAll("@output", outPath);
+        cmd = cmd.replaceAll("@workPace", configConstant.serverBasePath + "/download" );
+        cmd = cmd.replaceAll("@inDir", intPath);
+
+        CmdUtils.callShLine(cmd, 100);
+
     }
 
     private void copyScene(String workId, String sceneCodes) {