lyhzzz 1 mês atrás
pai
commit
2c6ffc0bec

+ 8 - 12
src/main/java/com/fdkankan/fusion/down/CaseDownService.java

@@ -418,6 +418,7 @@ public class CaseDownService {
     //http://127.0.0.1:8080/offline.html?caseId=362&app=1&share=1#/show/summary
 
     static String batName = "start-browser.bat";
+    static String batName2 = "信创环境启动(打开后选在终端运行).sh";
    public void cpIndexHtml(Integer caseId){
        log.info("down-offline-cpIndexHtml:{}",caseId);
 
@@ -425,8 +426,13 @@ public class CaseDownService {
        FileUtil.copyContent(new File(FilePath.OFFLINE_TEMPLATE_PATH),new File(caseOfflinePath),true);
 
        String s = FileUtil.readString(caseOfflinePath + File.separator + batName, StandardCharsets.UTF_8);
-       String s1 = s.replaceAll("@caseId", String.valueOf(caseId));
-       FileUtil.writeString(s1, caseOfflinePath + File.separator + batName,"UTF-8");
+       s = s.replaceAll("@caseId", String.valueOf(caseId));
+       FileUtil.writeString(s, caseOfflinePath + File.separator + batName,"UTF-8");
+
+       String s1 = FileUtil.readString(caseOfflinePath + File.separator + batName2, StandardCharsets.UTF_8);
+       s1 = s1.replaceAll("@caseId", String.valueOf(caseId));
+       FileUtil.writeString(s1, caseOfflinePath + File.separator + batName2,"UTF-8");
+
    }
 
 
@@ -481,16 +487,6 @@ public class CaseDownService {
                ShellUtil.unZip(kkzipPath,kknumPath);
                FileUtil.del(kkzipPath);
            }else {
-//               InputStream in = minIoUploadService.getObject(uri);
-//               FileOutputStream out = new FileOutputStream(sszipPath);
-//               byte[] buffer = new byte[1024];
-//               int bytesRead;
-//               while ((bytesRead = in.read(buffer)) != -1) {
-//                   out.write(buffer, 0, bytesRead);
-//               }
-//               out.flush();
-//               out.close();
-//               in.close();
                ShellUtil.yunDownloadSs(uri.replace(queryPath, ""), sszipPath);
                ShellUtil.unZip(sszipPath,ssNumPath);
                FileUtil.del(sszipPath);

+ 2 - 2
src/main/java/com/fdkankan/fusion/httpClient/LaserService.java

@@ -35,14 +35,14 @@ public class LaserService {
             param.setSceneCode(num);
             FdkkResponse responseEntity = laserClient.downOfflineSceneStatus(param);
             if( responseEntity.getCode() != HttpStatus.OK.value()){
-                log.error("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败:{}",responseEntity);
+                log.info("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败:{}",responseEntity);
                 return null;
             }
             vo = JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getData()), SSDownSceneVo.class);
             return vo;
 
         }catch (Exception e){
-            log.error("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败!",e);
+            log.info("downOfflineSceneStatus-根据场景码获取激光转台下载状态失败!",e);
         }
         return null ;
     }