|
@@ -1,12 +1,15 @@
|
|
|
package com.fdkankan.contro.service.impl;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
+import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
|
import com.fdkankan.common.constant.SceneStatus;
|
|
|
import com.fdkankan.common.util.CmdUtils;
|
|
|
import com.fdkankan.contro.dto.UploadSceneDTO;
|
|
|
import com.fdkankan.contro.entity.SceneOrigBd;
|
|
|
+import com.fdkankan.contro.entity.ScenePlus;
|
|
|
import com.fdkankan.contro.service.IHaixinService;
|
|
|
import com.fdkankan.contro.service.ISceneOrigBdService;
|
|
|
+import com.fdkankan.contro.service.IScenePlusService;
|
|
|
import com.fdkankan.fyun.config.FYunFileConfig;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.model.constants.ConstantFilePath;
|
|
@@ -17,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.io.File;
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
@@ -28,6 +32,8 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
|
private FYunFileConfig fYunFileConfig;
|
|
|
@Resource
|
|
|
private FYunFileServiceInterface fileServiceInterface;
|
|
|
+ @Autowired
|
|
|
+ private IScenePlusService scenePlusService;
|
|
|
|
|
|
@Override
|
|
|
public ResultData uploadScene(UploadSceneDTO dto) {
|
|
@@ -43,10 +49,19 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void noticHaixin(String num, Integer sceneStatus) throws Exception {
|
|
|
+ public void noticHaixin(String num, boolean buildSuccess) throws Exception {
|
|
|
+
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
+ String taskId = scenePlus.getTaskId();
|
|
|
+ String kNo = scenePlus.getKNo();
|
|
|
|
|
|
String zipPath = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num) + num + ".zip";
|
|
|
- if(sceneStatus == SceneStatus.NO_DISPLAY.code()){//计算成功,把原始资源打压缩包
|
|
|
+ if(buildSuccess){//计算成功,把原始资源打压缩包
|
|
|
+ //复制scene_edit_data/num/data/mapping目录到view目录
|
|
|
+ String editMappingPath = "/oss/4dkankan/" + String.format(UploadFilePath.DATA_EDIT_PATH, num) + "mapping";
|
|
|
+ String viewMappingPath = "/oss/4dkankan/" + String.format(UploadFilePath.DATA_VIEW_PATH, num) + "mapping";
|
|
|
+ FileUtil.copyContent(new File(editMappingPath), new File(viewMappingPath), true);
|
|
|
+
|
|
|
String viewPath = "/oss/4dkankan/" + String.format(UploadFilePath.VIEW_PATH, num);
|
|
|
this.zip(viewPath, zipPath);
|
|
|
}
|