|
@@ -660,11 +660,27 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
@Override
|
|
|
public ResultData resetCad(String num){
|
|
|
|
|
|
- ScenePro scenePro = sceneProService.findBySceneNum(num);
|
|
|
ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
if(Objects.isNull(scenePlus))
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService
|
|
|
+ .getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
+ String path = scenePlusExt.getDataSource();
|
|
|
|
|
|
+ //户型图上传
|
|
|
+ String userEditPath = UploadFilePath.USER_EDIT_PATH + "floor-cad-%s.%s";
|
|
|
+ String floorCadPath = path + "/results/floorplan_cad";
|
|
|
+ List<String> floorCadList = FileUtil.getFileList(floorCadPath);
|
|
|
+ if(CollUtil.isNotEmpty(floorCadList)){
|
|
|
+ floorCadList.stream().forEach(str->{
|
|
|
+ String substring = str.substring(str.lastIndexOf(File.separator) + 1);
|
|
|
+ String[] arr = substring.split("floor");
|
|
|
+ String[] arr2 = arr[1].split("\\.");
|
|
|
+ uploadToOssUtil.upload(str, String.format(userEditPath, num, arr2[0], arr2[1]));
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ ScenePro scenePro = sceneProService.findBySceneNum(num);
|
|
|
SceneEditInfo sceneEditInfoDb = this.getByScenePlusId(scenePlus.getId());
|
|
|
SceneEditInfoExt sceneEditInfoExt = null;
|
|
|
if(Objects.nonNull(sceneEditInfoDb)){
|