|
@@ -15,11 +15,11 @@ import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.ucenter.common.PageInfo;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.image.MatrixToImageWriterUtil;
|
|
|
-import com.fdkankan.model.constants.ConstantFilePath;
|
|
|
-import com.fdkankan.model.constants.UploadFilePath;
|
|
|
-import com.fdkankan.model.utils.CreateObjUtil;
|
|
|
+import com.fdkankan.ucenter.common.constants.ConstantFilePath;
|
|
|
+import com.fdkankan.ucenter.common.constants.UploadFilePath;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
|
+import com.fdkankan.ucenter.common.utils.ShellUtil;
|
|
|
import com.fdkankan.ucenter.constant.CameraConstant;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
@@ -341,10 +341,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
vo.setCreateTimeStr(vo.getCreateTime());
|
|
|
}
|
|
|
}
|
|
|
- List<SceneVo> records = sceneVoPage.getRecords();
|
|
|
- List<SceneVo> sceneList = records.parallelStream().filter(entity -> entity.getIsFolder() == 0).collect(Collectors.toList());
|
|
|
- folderList.addAll(sceneList);
|
|
|
- sceneVoPage.setRecords(folderList);
|
|
|
}
|
|
|
//设置协作者信息
|
|
|
if(sceneVoPage.getRecords().size() >0){
|
|
@@ -360,6 +356,21 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(param.getSceneSource().equals("1")){ //增加双目文件夹
|
|
|
+ SceneVo sceneVo = new SceneVo();
|
|
|
+ sceneVo.setId(-1L);
|
|
|
+ sceneVo.setIsFolder(1);
|
|
|
+ sceneVo.setName("双目文件夹");
|
|
|
+ sceneVo.setType("0");
|
|
|
+ Integer count = sceneService.getCountByUserId(user.getId());
|
|
|
+ sceneVo.setSceneNum(Long.valueOf(count));
|
|
|
+ folderList.add(sceneVo);
|
|
|
+ }
|
|
|
+ List<SceneVo> sceneList = sceneVoPage.getRecords().parallelStream().filter(entity -> entity.getIsFolder() == 0).collect(Collectors.toList());
|
|
|
+ if(sceneList.size() >0){
|
|
|
+ folderList.addAll(sceneList);
|
|
|
+ }
|
|
|
+ sceneVoPage.setRecords(folderList);
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("pageInfo",PageInfo.PageInfo(sceneVoPage));
|
|
|
jsonObject.put("sceneNum",sceneVoPage.getTotal() - folderNum);
|
|
@@ -560,10 +571,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
private void downloadFromOldNumFromOss(String sceneNum, String newNum) throws Exception {
|
|
|
- CreateObjUtil.ossUtilCp("images/images" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "images/images" + newNum);
|
|
|
- CreateObjUtil.ossUtilCp("data/data" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "data/data" + newNum);
|
|
|
- CreateObjUtil.ossUtilCp("voice/voice" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "voice/voice" + newNum);
|
|
|
- CreateObjUtil.ossUtilCp("video/video" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "video/video" + newNum);
|
|
|
+ ShellUtil.yunDownload("images/images" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "images/images" + newNum);
|
|
|
+ ShellUtil.yunDownload("data/data" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "data/data" + newNum);
|
|
|
+ ShellUtil.yunDownload("voice/voice" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "voice/voice" + newNum);
|
|
|
+ ShellUtil.yunDownload("video/video" + sceneNum + "/", ConstantFilePath.SCENE_PATH + "video/video" + newNum);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -581,7 +592,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
public void copyFdage(String oldDataSource,String newDataSource,String buildModelPath,String time) throws Exception {
|
|
|
|
|
|
- CreateObjUtil.ossUtilCp(ConstantFilePath.OSS_PREFIX + oldDataSource.replace(buildModelPath, "")+"/", newDataSource);
|
|
|
+ ShellUtil.yunDownload(ConstantFilePath.OSS_PREFIX + oldDataSource.replace(buildModelPath, "")+"/", newDataSource);
|
|
|
// 修改data.fdage
|
|
|
String data = FileUtils.readFile(newDataSource + "/data.fdage");
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
@@ -591,12 +602,12 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
jsonObject.put("uuidtime",time);
|
|
|
FileUtils.writeFile(newDataSource + "/data.fdage", jsonObject.toJSONString());
|
|
|
- CreateObjUtil.ossUtilCpFolder(newDataSource, bucket.concat("/" + ConstantFilePath.OSS_PREFIX + newDataSource.replace(buildModelPath, "")));
|
|
|
+ ShellUtil.yunUpload(newDataSource, bucket.concat("/" + ConstantFilePath.OSS_PREFIX + newDataSource.replace(buildModelPath, "")));
|
|
|
|
|
|
// 复制计算结果
|
|
|
- CreateObjUtil.ossUtilCp(ConstantFilePath.OSS_PREFIX + oldDataSource.concat("_results/").replace(buildModelPath, ""), newDataSource.concat("_results"));
|
|
|
+ ShellUtil.yunDownload(ConstantFilePath.OSS_PREFIX + oldDataSource.concat("_results/").replace(buildModelPath, ""), newDataSource.concat("_results"));
|
|
|
if(new File(newDataSource.concat("_results")).exists()){
|
|
|
- CreateObjUtil.ossUtilCpFolder(newDataSource.concat("_results"),bucket.concat("/" + ConstantFilePath.OSS_PREFIX + newDataSource.concat("_results").replace(buildModelPath, "")));
|
|
|
+ ShellUtil.yunUpload(newDataSource.concat("_results"),bucket.concat("/" + ConstantFilePath.OSS_PREFIX + newDataSource.concat("_results").replace(buildModelPath, "")));
|
|
|
FileUtils.delAllFile(newDataSource.concat("_results"));
|
|
|
}
|
|
|
FileUtils.delAllFile(newDataSource);
|
|
@@ -644,10 +655,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
* @param newNum
|
|
|
*/
|
|
|
private void uploadNewSceneToOss(String newNum) {
|
|
|
- CreateObjUtil.ossUtilCpFolder("/mnt/4Dkankan/scene/images/images" + newNum, bucket.concat("/images/images") + newNum);
|
|
|
- CreateObjUtil.ossUtilCpFolder("/mnt/4Dkankan/scene/data/data" + newNum, bucket.concat("/data/data") + newNum);
|
|
|
- CreateObjUtil.ossUtilCpFolder("/mnt/4Dkankan/scene/voice/voice" + newNum, bucket.concat("/voice/voice") + newNum);
|
|
|
- CreateObjUtil.ossUtilCpFolder("/mnt/4Dkankan/scene/video/video" + newNum, bucket.concat("/video/video") + newNum);
|
|
|
+ ShellUtil.yunUpload("/mnt/4Dkankan/scene/images/images" + newNum, bucket.concat("/images/images") + newNum);
|
|
|
+ ShellUtil.yunUpload("/mnt/4Dkankan/scene/data/data" + newNum, bucket.concat("/data/data") + newNum);
|
|
|
+ ShellUtil.yunUpload("/mnt/4Dkankan/scene/voice/voice" + newNum, bucket.concat("/voice/voice") + newNum);
|
|
|
+ ShellUtil.yunUpload("/mnt/4Dkankan/scene/video/video" + newNum, bucket.concat("/video/video") + newNum);
|
|
|
}
|
|
|
|
|
|
@Override
|