|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
import com.fdkankan.common.constant.CommonStatus;
|
|
import com.fdkankan.common.constant.CommonStatus;
|
|
import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
import com.fdkankan.common.constant.CommonSuccessStatus;
|
|
import com.fdkankan.common.constant.SceneStatus;
|
|
import com.fdkankan.common.constant.SceneStatus;
|
|
|
|
+import com.fdkankan.contro.constant.RedisConstants;
|
|
import com.fdkankan.contro.entity.*;
|
|
import com.fdkankan.contro.entity.*;
|
|
import com.fdkankan.contro.service.*;
|
|
import com.fdkankan.contro.service.*;
|
|
import com.fdkankan.contro.util.HttpUtilExt;
|
|
import com.fdkankan.contro.util.HttpUtilExt;
|
|
@@ -77,15 +78,15 @@ public class UploadShootingListener {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- Set<Integer> indexs = new HashSet<>();
|
|
|
|
|
|
+ Set<String> indexs = new HashSet<>();
|
|
String basePath = ConstantFilePath.BUILD_MODEL_PATH + "upload_while_shooting/" + uuid + "/";
|
|
String basePath = ConstantFilePath.BUILD_MODEL_PATH + "upload_while_shooting/" + uuid + "/";
|
|
//遍历检查点位相关文件是否齐全,如果齐全改为进入计算
|
|
//遍历检查点位相关文件是否齐全,如果齐全改为进入计算
|
|
List<OrigFileUploadBatch> updateList = new ArrayList<>();
|
|
List<OrigFileUploadBatch> updateList = new ArrayList<>();
|
|
for (OrigFileUploadBatch batch : batches) {
|
|
for (OrigFileUploadBatch batch : batches) {
|
|
List<OrigFileUpload> fileUploadList = origFileUploadService.getByBatchId(batch.getBatchId());
|
|
List<OrigFileUpload> fileUploadList = origFileUploadService.getByBatchId(batch.getBatchId());
|
|
String workPath = basePath;
|
|
String workPath = basePath;
|
|
- if(index != -1){
|
|
|
|
- workPath = workPath + index + "/";
|
|
|
|
|
|
+ if(batch.getPtIndex() != -1){
|
|
|
|
+ workPath = workPath + batch.getPtIndex() + "/";
|
|
}
|
|
}
|
|
//下载文件
|
|
//下载文件
|
|
for (OrigFileUpload origFileUpload : fileUploadList) {
|
|
for (OrigFileUpload origFileUpload : fileUploadList) {
|
|
@@ -96,7 +97,7 @@ public class UploadShootingListener {
|
|
//如果是点位上传批次,需要校验文件上传是否齐全
|
|
//如果是点位上传批次,需要校验文件上传是否齐全
|
|
boolean lackFille = uploadShootingService.checkLackFille(batch.getPtIndex(), fileUploadList);
|
|
boolean lackFille = uploadShootingService.checkLackFille(batch.getPtIndex(), fileUploadList);
|
|
if(!lackFille){
|
|
if(!lackFille){
|
|
- indexs.add(batch.getPtIndex());
|
|
|
|
|
|
+ indexs.add(String.valueOf(batch.getPtIndex()));
|
|
updateList.add(batch);
|
|
updateList.add(batch);
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -107,6 +108,7 @@ public class UploadShootingListener {
|
|
JSONObject playLoad = new JSONObject();
|
|
JSONObject playLoad = new JSONObject();
|
|
playLoad.put("uuid", uuid);
|
|
playLoad.put("uuid", uuid);
|
|
playLoad.put("path", basePath);
|
|
playLoad.put("path", basePath);
|
|
|
|
+ playLoad.put("sceneCode", num);
|
|
if(indexs.size() > 0){
|
|
if(indexs.size() > 0){
|
|
playLoad.put("indexs", indexs);
|
|
playLoad.put("indexs", indexs);
|
|
}else if(index == -1){
|
|
}else if(index == -1){
|
|
@@ -119,12 +121,12 @@ public class UploadShootingListener {
|
|
if(CollUtil.isNotEmpty(updateList)){
|
|
if(CollUtil.isNotEmpty(updateList)){
|
|
updateList.stream().forEach(v->v.setStatus(2));
|
|
updateList.stream().forEach(v->v.setStatus(2));
|
|
origFileUploadBatchService.updateBatchById(updateList);
|
|
origFileUploadBatchService.updateBatchById(updateList);
|
|
|
|
+ for (OrigFileUploadBatch origFileUploadBatch : updateList) {
|
|
|
|
+ String batchKey = RedisConstants.BATCH_ID_UPLOAD_SHOOTING.replace("@uuid@", uuid).replace("@index@", String.valueOf(origFileUploadBatch.getPtIndex()));
|
|
|
|
+ redisUtil.del(batchKey);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
-// String batchKey = RedisConstants.BATCH_ID_UPLOAD_SHOOTING.replace("@uuid@", uuid).replace("@index@", String.valueOf(index));
|
|
|
|
-// redisUtil.del(batchKey);
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
log.error("场景预览文件处理出错, num:{}", num, e);
|
|
log.error("场景预览文件处理出错, num:{}", num, e);
|
|
}finally {
|
|
}finally {
|