|
@@ -67,7 +67,7 @@ public class ConvertServiceImpl implements IConvertService {
|
|
|
if(CollUtil.isEmpty(fullphotoFileindices)){
|
|
|
return ResultData.error(ServerCode.RESOURCE_NOT_EXIST);
|
|
|
}
|
|
|
- List<JSONObject> fileList = fullphotoFileindices.stream().map(v -> {
|
|
|
+ List<JSONObject> fileList = fullphotoFileindices.stream().filter(v->StrUtil.isNotEmpty(v.getFileUrl())).map(v -> {
|
|
|
JSONObject item = new JSONObject();
|
|
|
item.put("fileName", v.getFileName());
|
|
|
item.put("fileType", v.getFileType());
|
|
@@ -116,27 +116,44 @@ public class ConvertServiceImpl implements IConvertService {
|
|
|
List<FullphotoUprecord> list = fullphotoUprecordService.list(new LambdaQueryWrapper<FullphotoUprecord>().select(FullphotoUprecord::getStationCode, FullphotoUprecord::getEntityId).groupBy(FullphotoUprecord::getStationCode, FullphotoUprecord::getEntityId));
|
|
|
for (FullphotoUprecord fullphotoUprecord : list) {
|
|
|
|
|
|
- List<FullphotoUprecord> list1 = fullphotoUprecordService.list(
|
|
|
- new LambdaQueryWrapper<FullphotoUprecord>()
|
|
|
- .eq(FullphotoUprecord::getStationCode, fullphotoUprecord.getStationCode())
|
|
|
- .eq(FullphotoUprecord::getEntityId, fullphotoUprecord.getEntityId())
|
|
|
- .orderByDesc(FullphotoUprecord::getUpTime));
|
|
|
+ try {
|
|
|
+ List<FullphotoUprecord> list1 = fullphotoUprecordService.list(
|
|
|
+ new LambdaQueryWrapper<FullphotoUprecord>()
|
|
|
+ .eq(FullphotoUprecord::getStationCode, fullphotoUprecord.getStationCode())
|
|
|
+ .eq(FullphotoUprecord::getEntityId, fullphotoUprecord.getEntityId())
|
|
|
+ .orderByDesc(FullphotoUprecord::getUpTime));
|
|
|
|
|
|
- for(int i = 0; i < list1.size(); i++){
|
|
|
- FullphotoUprecord fullphotoUprecord1 = list1.get(i);
|
|
|
- ScenePushDTO scenePushDTO = new ScenePushDTO();
|
|
|
- scenePushDTO.setStationCode(fullphotoUprecord1.getStationCode());
|
|
|
- scenePushDTO.setEntityId(fullphotoUprecord1.getEntityId());
|
|
|
- scenePushDTO.setUpTime(fullphotoUprecord1.getUpTime());
|
|
|
- scenePushDTO.setUploadId(fullphotoUprecord1.getUploadId());
|
|
|
- String convertType = null;
|
|
|
- if(i == 0){
|
|
|
- convertType = "upTime";//默认vr系统已经是
|
|
|
- }else{
|
|
|
- convertType = "old";
|
|
|
+ for(int i = 0; i < list1.size(); i++){
|
|
|
+ FullphotoUprecord fullphotoUprecord1 = list1.get(i);
|
|
|
+ ScenePushDTO scenePushDTO = new ScenePushDTO();
|
|
|
+ scenePushDTO.setStationCode(fullphotoUprecord1.getStationCode());
|
|
|
+ scenePushDTO.setEntityId(fullphotoUprecord1.getEntityId());
|
|
|
+ scenePushDTO.setUpTime(fullphotoUprecord1.getUpTime());
|
|
|
+ scenePushDTO.setUploadId(fullphotoUprecord1.getUploadId());
|
|
|
+ String convertType = null;
|
|
|
+ Boolean push = false;
|
|
|
+ if(i == 0){
|
|
|
+ convertType = "upTime";//默认vr系统已经是
|
|
|
+ push = true;
|
|
|
+ }else{
|
|
|
+ convertType = "old";
|
|
|
+ List<FullphotoFileindex> objList = fullphotoFileindexService.list(
|
|
|
+ new LambdaQueryWrapper<FullphotoFileindex>()
|
|
|
+ .eq(FullphotoFileindex::getUploadId, fullphotoUprecord1.getUploadId())
|
|
|
+ .eq(FullphotoFileindex::getFileType, "11"));
|
|
|
+ if(CollUtil.isNotEmpty(objList)){
|
|
|
+ push = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //如果是更新上传时间或者是历史且有obj才推送
|
|
|
+ if(push){
|
|
|
+ this.scenePush(scenePushDTO, convertType);
|
|
|
+ }
|
|
|
}
|
|
|
- this.scenePush(scenePushDTO, convertType);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.warn("资源系统数据异常, stationcode:{}, entityId:{}", fullphotoUprecord.getStationCode(), fullphotoUprecord.getEntityId(), e);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|