|
@@ -61,6 +61,9 @@ public class CaseDownService {
|
|
|
|
|
|
public static String model = "/model/getInfo?modelId=";
|
|
|
public static String caseImg = "/caseImg/getFfmpegImage?caseId=";
|
|
|
+ public static String casePathInfoUrl = "/casePath/info?caseId=";
|
|
|
+ public static String caseAnimationUrl = "/caseAnimation/list?caseId=";
|
|
|
+ public static String getMapConfig = "/notAuth/getMapConfig";
|
|
|
|
|
|
public static String laserData = "/laser/dataset/%s/getDataSet";
|
|
|
public static String laserDataSetAndControlPoint = "/laser/4dage/%s/getDataSetAndControlPoint";
|
|
@@ -107,6 +110,12 @@ public class CaseDownService {
|
|
|
ICaseOfflineService caseOfflineService;
|
|
|
@Autowired
|
|
|
ICaseImgService caseImgService;
|
|
|
+ @Autowired
|
|
|
+ ICasePathService casePathService;
|
|
|
+ @Autowired
|
|
|
+ ICaseAnimationService animationService;
|
|
|
+ @Autowired
|
|
|
+ IMapConfigService mapConfigService;
|
|
|
|
|
|
@Autowired
|
|
|
RedisUtil redisUtil;
|
|
@@ -221,6 +230,14 @@ public class CaseDownService {
|
|
|
for (FusionNumVo fusion : listByCaseId) {
|
|
|
jsonObject.put(basePath+fusionMeter+fusion.getFusionId(), ResultData.ok(fusionMeterService.getListByFusionId(fusion.getFusionId(),null)));
|
|
|
}
|
|
|
+ for (FusionNumVo fusionNumVo : listByCaseId) {
|
|
|
+ //下载媒体库模型
|
|
|
+ if(fusionNumVo.getSceneData() != null){
|
|
|
+ if(fusionNumVo.getSceneData().getType() ==3 && StringUtils.isNotBlank(fusionNumVo.getSceneData().getModelGlbUrl()) ){
|
|
|
+ downModel(caseId,fusionNumVo.getSceneData().getModelGlbUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
List<SceneVo> sceneVos = caseService.sceneList(param);
|
|
|
for (SceneVo sceneData : sceneVos) {
|
|
@@ -264,7 +281,8 @@ public class CaseDownService {
|
|
|
|
|
|
}
|
|
|
if(sceneData.getModelId() != null){
|
|
|
- jsonObject.put(basePath+model+sceneData.getModelId(), ResultData.ok(modelService.getInfo(sceneData.getModelId())));
|
|
|
+ SceneVo info = modelService.getInfo(sceneData.getModelId());
|
|
|
+ jsonObject.put(basePath+model+sceneData.getModelId(), ResultData.ok(info));
|
|
|
}
|
|
|
}
|
|
|
jsonObject.put(basePath+caseScene+caseId, ResultData.ok(sceneVos));
|
|
@@ -292,9 +310,7 @@ public class CaseDownService {
|
|
|
|
|
|
List<CaseFiles> caseFilesList = caseFilesService.allList(caseId, null);
|
|
|
for (CaseFiles files : caseFilesList) {
|
|
|
- //String fileUrl = String.format(FilePath.File_OSS_PATH,environment,files.getFilesId());
|
|
|
- File file = new File(files.getFilesUrl().replace(queryPath, ""));
|
|
|
- downResource(caseId,queryPath +file.getParentFile());
|
|
|
+ downResource(caseId,files.getFilesUrl());
|
|
|
}
|
|
|
jsonObject.put(basePath+caseFiles+caseId, ResultData.ok(caseFilesList));
|
|
|
|
|
@@ -313,8 +329,10 @@ public class CaseDownService {
|
|
|
jsonObject.put(basePath+caseTagPoint+tag.getTagId(), ResultData.ok(caseTagPointService.allList(tag.getTagId())));
|
|
|
downResources(caseId,tag.getTagImgUrl());
|
|
|
downResource(caseId,tag.getHotIconUrl());
|
|
|
+ downResource(caseId,tag.getAudio());
|
|
|
}
|
|
|
|
|
|
+ jsonObject.put(basePath+casePathInfoUrl+caseId, ResultData.ok(casePathService.getByCaseId(caseId)));
|
|
|
List<FusionGuide> fusionGuides = fusionGuideService.getAllList(caseId);
|
|
|
jsonObject.put(basePath+fusionGuide+caseId, ResultData.ok(fusionGuides));
|
|
|
|
|
@@ -345,6 +363,16 @@ public class CaseDownService {
|
|
|
downResource(img.getCaseId(),img.getImgUrl());
|
|
|
}
|
|
|
jsonObject.put(basePath+caseImg+caseId, ResultData.ok(caseImgList));
|
|
|
+
|
|
|
+ List<CaseAnimation> list = animationService.getListByCaseId(caseId);
|
|
|
+ for (CaseAnimation caseAnimation : list) {
|
|
|
+ if(StringUtils.isNotBlank(caseAnimation.getUrl())){
|
|
|
+ downResource(caseId,caseAnimation.getUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ jsonObject.put(basePath+caseAnimationUrl+caseId, ResultData.ok(list));
|
|
|
+ jsonObject.put(basePath+getMapConfig, ResultData.ok(mapConfigService.list()));
|
|
|
+
|
|
|
String jsonString = JSON.toJSONString(jsonObject);
|
|
|
jsonString = jsonString.replaceAll(queryPath,"http://127.0.0.1:9000/oss/");
|
|
|
FileUtil.writeString(jsonString, FilePath.OFFLINE_PACKAGE_PATH+caseId+"/www/package/"+jsonDataName,"UTF-8");
|