|
@@ -384,8 +384,6 @@ public class ChenYuTestScheduled {
|
|
|
}
|
|
|
}
|
|
|
if (CollectionUtil.isNotEmpty(ids)) {
|
|
|
- trialCyFinishTestReportService.removeBatchByIds(ids);
|
|
|
-
|
|
|
List<String> fileUrls = list.stream().map(TrialCyFinishTestReport::getAssembleFile).filter(StringUtil::isNotBlank).collect(Collectors.toList());
|
|
|
if(CollectionUtil.isNotEmpty(fileUrls)){
|
|
|
//删除组合文件
|
|
@@ -393,8 +391,12 @@ public class ChenYuTestScheduled {
|
|
|
String pdfName = f.split("upload")[1];
|
|
|
this.newIOSSClient.removeFile("upload" + pdfName);
|
|
|
});
|
|
|
+ ids.clear();
|
|
|
}
|
|
|
}
|
|
|
+ //获取taskId,把之前的taskId删除
|
|
|
+ List<Integer> taskIds = reports.stream().map(TrialCyFinishTestReport::getTaskId).collect(Collectors.toList());
|
|
|
+ trialCyFinishTestReportService.remove(Wrappers.<TrialCyFinishTestReport>lambdaQuery().in(TrialCyFinishTestReport::getTaskId,taskIds));
|
|
|
|
|
|
trialCyFinishTestReportService.saveBatch(reports);
|
|
|
hasMore = reports.size() >= pageSize;
|
|
@@ -535,7 +537,6 @@ public class ChenYuTestScheduled {
|
|
|
}
|
|
|
//删除旧数据
|
|
|
if (CollectionUtil.isNotEmpty(ids)) {
|
|
|
- trialCyThirdReportService.removeBatchByIds(ids);
|
|
|
List<String> fileUrls = list.stream().map(TrialCyThirdReport::getAssembleFile).filter(StringUtil::isNotBlank).collect(Collectors.toList());
|
|
|
if(CollectionUtil.isNotEmpty(fileUrls)){
|
|
|
//删除组合文件
|
|
@@ -543,9 +544,11 @@ public class ChenYuTestScheduled {
|
|
|
String pdfName = f.split("upload")[1];
|
|
|
this.newIOSSClient.removeFile("upload" + pdfName);
|
|
|
});
|
|
|
+ ids.clear();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ List<String> collect = reports.stream().map(TrialCyThirdReport::getId).collect(Collectors.toList());
|
|
|
+ trialCyThirdReportService.remove(Wrappers.<TrialCyThirdReport>lambdaQuery().in(TrialCyThirdReport::getId, collect));
|
|
|
//添加新数据
|
|
|
trialCyThirdReportService.saveBatch(reports);
|
|
|
hasMore = reports.size() >= pageSize;
|