|
@@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
@@ -79,6 +80,7 @@ public class UploadShootingListener {
|
|
|
Set<Integer> indexs = new HashSet<>();
|
|
|
String basePath = ConstantFilePath.BUILD_MODEL_PATH + "upload_while_shooting/" + uuid + "/";
|
|
|
//遍历检查点位相关文件是否齐全,如果齐全改为进入计算
|
|
|
+ List<OrigFileUploadBatch> updateList = new ArrayList<>();
|
|
|
for (OrigFileUploadBatch batch : batches) {
|
|
|
List<OrigFileUpload> fileUploadList = origFileUploadService.getByBatchId(batch.getBatchId());
|
|
|
String workPath = basePath;
|
|
@@ -90,12 +92,15 @@ public class UploadShootingListener {
|
|
|
HttpUtilExt.downloadFileAndCheck(origFileUpload.getFileUrl(), workPath + origFileUpload.getFileName(), 60000);
|
|
|
}
|
|
|
|
|
|
- if(batch.getPtIndex() != -1){
|
|
|
+ if(batch.getPtIndex() != null && batch.getPtIndex() != -1){
|
|
|
//如果是点位上传批次,需要校验文件上传是否齐全
|
|
|
boolean lackFille = uploadShootingService.checkLackFille(batch.getPtIndex(), fileUploadList);
|
|
|
if(!lackFille){
|
|
|
indexs.add(batch.getPtIndex());
|
|
|
+ updateList.add(batch);
|
|
|
}
|
|
|
+ }else{
|
|
|
+ updateList.add(batch);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -111,6 +116,11 @@ public class UploadShootingListener {
|
|
|
}
|
|
|
mqProducer.sendByWorkQueue("laser-preview-scene-handler", playLoad);
|
|
|
|
|
|
+ if(CollUtil.isNotEmpty(updateList)){
|
|
|
+ updateList.stream().forEach(v->v.setStatus(2));
|
|
|
+ origFileUploadBatchService.updateBatchById(updateList);
|
|
|
+ }
|
|
|
+
|
|
|
// String batchKey = RedisConstants.BATCH_ID_UPLOAD_SHOOTING.replace("@uuid@", uuid).replace("@index@", String.valueOf(index));
|
|
|
// redisUtil.del(batchKey);
|
|
|
|