|
@@ -172,21 +172,24 @@ public class WorkOfflineListener implements ChannelAwareMessageListener {
|
|
|
CmdUtils.callLineSh(cmd);
|
|
|
log.info("删除mesh场景文件夹完成:{}", meshBasePath);
|
|
|
}
|
|
|
-
|
|
|
+ redisUtil.set(progressKey, 80);
|
|
|
//处理全景看看离线包
|
|
|
-
|
|
|
+ String batContent = String.format(CmdConstant.EXE_CONTENT, param.getWorkId());
|
|
|
+ FileUtil.writeUtf8String(batContent, param.getPath()+File.separator+CmdConstant.EXE_NAME);
|
|
|
+ log.info("写入Bat脚本完成");
|
|
|
// //打成zip包
|
|
|
-// String zipName=workEntity.getId()+"_offline.zip";
|
|
|
-// String zipPath="";
|
|
|
- redisUtil.set(progressKey, 80);
|
|
|
-// //上传zip包
|
|
|
-// String zipOssKey = "720yun_fd_manage/"+workEntity.getId()+"/" + zipName;
|
|
|
-// fileAndOssUtil.uploadBySh(zipPath, zipOssKey);
|
|
|
-// String ossUrl= fileStorageTemplate.calculateUrl("") + zipOssKey;
|
|
|
+ String zipName=workEntity.getId()+"_offline.zip";
|
|
|
+
|
|
|
+ String zipCmd = CmdConstant.ZIP_OFFLINE;
|
|
|
+ zipCmd = zipCmd.replace("@target", param.getPath());
|
|
|
+ zipCmd = zipCmd.replace("@path", zipName);
|
|
|
+ CmdUtils.callLineSh(zipCmd);
|
|
|
+
|
|
|
+ log.info("开始将文件上传OSS");
|
|
|
+ String zipOssKey = "720yun_fd_manage/"+workEntity.getId()+"/" + zipName;
|
|
|
redisUtil.set(progressKey, 90);
|
|
|
-// //通知场景完成
|
|
|
+ OssShUtil.yunUpload(param.getPath() + File.separator + zipName,zipOssKey);
|
|
|
redisUtil.set(progressKey, 100);
|
|
|
-// //修改完成进度
|
|
|
workService.updateOfflineStatus(param.getWorkId(), 3);
|
|
|
// WorkOfflineDoneDTO workOfflineDoneDTO=new WorkOfflineDoneDTO();
|
|
|
// workOfflineDoneDTO.setWorkId(workEntity.getId());
|