|
@@ -44,6 +44,7 @@ import com.fdkankan.scene.vo.SceneDataDownloadVO;
|
|
|
import com.fdkankan.scene.vo.SceneEditControlsVO;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import java.io.File;
|
|
|
+import java.io.IOException;
|
|
|
import java.nio.file.FileSystemException;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -377,6 +378,7 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
sceneEditControls = sceneEditControlsService.getBySceneEditId(sceneEditInfo.getId());
|
|
|
|
|
|
//平面图ai识别
|
|
|
+ this.uploadFloorplanAi(num, dataSource, bucket);
|
|
|
LinkedHashMap<Integer, Boolean> detFloorplan = floorplanAiService.detFloorplan(dataSource);
|
|
|
boolean hasFloorplanAi = floorplanAiService.detFloorPlanAi(num, dataSource, detFloorplan, bucket);
|
|
|
if(hasFloorplanAi){
|
|
@@ -437,6 +439,18 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
+ public void uploadFloorplanAi(String num, String path, String bucket) throws IOException {
|
|
|
+ String floorplanPath = path + "/results/floorplan/";
|
|
|
+ List<File> files = FileUtil.loopFiles(floorplanPath);
|
|
|
+ String ossPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan/";
|
|
|
+ if(CollUtil.isNotEmpty(files)){
|
|
|
+ for (File file : files) {
|
|
|
+ ossUtil.uploadFile(bucket,file.getAbsolutePath().replace(new File(floorplanPath).getAbsolutePath(), ossPath),file.getAbsolutePath(), false);
|
|
|
+// fYunFileService.uploadFile(file.getAbsolutePath(), file.getAbsolutePath().replace(floorplanPath, ossPath));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private boolean checkIsExistLinks(String num){
|
|
|
//查询缓存是否有场景关联数据
|
|
|
String key = String.format(RedisKey.SCENE_LINKPAN_DATA, num);
|