|
@@ -154,7 +154,7 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
switch (modelFileFormat){
|
|
|
case "obj" : resultFormat = "glb";
|
|
|
url = uploadObjOss(unzipPath,modelFile);break;
|
|
|
- case "laz" :
|
|
|
+ case "laz" : url = uploadLazOss(unzipPath,modelFile); break;
|
|
|
case "shp" : url = uploadOss(unzipPath,modelFile); break;
|
|
|
case "b3dm" : url = uploadB3dm(unzipPath,modelFile); break;
|
|
|
case "las" :
|
|
@@ -209,7 +209,16 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
rabbitMqProducer.sendByWorkQueue("queue-model-osgbToB3dm",map);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ private String uploadLazOss(String unzipPath,File modelFile) {
|
|
|
+ String ossPath = unzipPath.replace(OssPath.localPath,"");
|
|
|
+ String modelOssPath = modelFile.getPath().replace(OssPath.localPath, "");
|
|
|
+ ShellUtil.yunUpload(unzipPath,ossPath);
|
|
|
+ if(!fYunFileServiceInterface.fileExist(modelOssPath)){
|
|
|
+ throw new BusinessException(ResultCode.UPLOAD_FILE_ERROR);
|
|
|
+ }
|
|
|
+ FileUtil.del(unzipPath);
|
|
|
+ return ossUrlPrefix + ossPath;
|
|
|
+ }
|
|
|
|
|
|
private String uploadOss(String unzipPath,File modelFile) {
|
|
|
String ossPath = unzipPath.replace(OssPath.localPath,"");
|