|
@@ -27,9 +27,7 @@ import org.springblade.business.mapper.EntrustInfoMapper;
|
|
|
import org.springblade.business.mapper.TrialMaterialMobilizationMapper;
|
|
|
import org.springblade.business.mapper.TrialSampleInfoMapper;
|
|
|
import org.springblade.business.mapper.TrialSelfInspectionRecordMapper;
|
|
|
-import org.springblade.business.service.IEntrustInfoService;
|
|
|
-import org.springblade.business.service.ITrialNumberRuleService;
|
|
|
-import org.springblade.business.service.ITrialSelfInspectionRecordService;
|
|
|
+import org.springblade.business.service.*;
|
|
|
import org.springblade.business.utils.FileUtils;
|
|
|
import org.springblade.business.utils.FileUtils2;
|
|
|
import org.springblade.business.utils.StringSPUtils;
|
|
@@ -100,6 +98,8 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
|
private final TrialDetectionDataServiceImpl trialDetectionDataService;
|
|
|
private final IEntrustInfoService entrustInfoService;
|
|
|
private final ITrialNumberRuleService trialNumberRuleService;
|
|
|
+ private final TrialCyThirdReportService trialCyThirdReportService;
|
|
|
+ private final TrialCyFinishTestReportService trialCyFinishTestReportService;
|
|
|
|
|
|
@Override
|
|
|
public IPage<TrialSelfInspectionRecordVO> selfPage(IPage<TrialSelfInspectionRecord> page, TrialSelfInspectionRecordPageDTO dto) throws FileNotFoundException {
|
|
@@ -1975,12 +1975,11 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
|
if (informationQuery != null) {
|
|
|
List<String> pdfList = new ArrayList<>();
|
|
|
//------自检------
|
|
|
+ if (informationQuery.getPdfTrialUrl() != null) {
|
|
|
+ //如果当前存在第三方、外委的pdf,那么拼接
|
|
|
+ pdfList.add(informationQuery.getPdfTrialUrl());
|
|
|
+ }
|
|
|
if (dto.getType().equals(1)) {
|
|
|
- if (informationQuery.getPdfTrialUrl() != null) {
|
|
|
- //如果当前存在第三方、外委的pdf,那么拼接
|
|
|
- pdfList.add(informationQuery.getPdfTrialUrl());
|
|
|
- }
|
|
|
-
|
|
|
//自检pdf
|
|
|
List<TrialSelfInspectionRecord> trialSelfInspectionRecords = baseMapper.selectList(Wrappers.<TrialSelfInspectionRecord>lambdaQuery()
|
|
|
.select(TrialSelfInspectionRecord::getPdfUrl,TrialSelfInspectionRecord::getContractId,TrialSelfInspectionRecord::getId,TrialSelfInspectionRecord::getType)
|
|
@@ -1995,11 +1994,6 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
|
// pdfList.addAll(pdfURLs);
|
|
|
//------第三方、外委------
|
|
|
} else if (dto.getType().equals(2) || dto.getType().equals(3)) {
|
|
|
- if (informationQuery.getPdfTrialUrl() != null) {
|
|
|
- //如果当前存在试验自检的pdf,那么拼接
|
|
|
- pdfList.add(informationQuery.getPdfTrialUrl());
|
|
|
- }
|
|
|
-
|
|
|
//第三方、外委pdf
|
|
|
List<TrialDetectionData> trialDetectionData = trialDetectionDataService.getBaseMapper().selectList(Wrappers.<TrialDetectionData>lambdaQuery().in(TrialDetectionData::getId, Func.toLongList(dto.getIds())));
|
|
|
List<String> pdfURLs = new ArrayList<>();
|
|
@@ -2014,6 +2008,17 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
|
|
|
pdfList.addAll(pdfURLs);
|
|
|
}
|
|
|
|
|
|
+ //成渝自检
|
|
|
+ if (dto.getType().equals(11)){
|
|
|
+ List<TrialCyFinishTestReport> trialCyFinishTestReports = trialCyFinishTestReportService.getBaseMapper().selectList(Wrappers.<TrialCyFinishTestReport>lambdaQuery().in(TrialCyFinishTestReport::getTaskId, Func.toLongList(dto.getIds())));
|
|
|
+ List<String> collect = trialCyFinishTestReports.stream().map(TrialCyFinishTestReport::getReportFilePath).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ pdfList.addAll(collect);
|
|
|
+ }else if(dto.getType().equals(12) || dto.getType().equals(13)){
|
|
|
+ List<TrialCyThirdReport> trialCyThirdReports = trialCyThirdReportService.getBaseMapper().selectList(Wrappers.<TrialCyThirdReport>lambdaQuery().in(TrialCyThirdReport::getId, Func.toLongList(dto.getIds())));
|
|
|
+ List<String> collect = trialCyThirdReports.stream().map(TrialCyThirdReport::getReportDocFilePath).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ pdfList.addAll(collect);
|
|
|
+ }
|
|
|
+
|
|
|
if (pdfList.size() > 0) {
|
|
|
//合并试验自检、第三方、外委的pdf
|
|
|
List<String> collect = pdfList.stream().filter(Objects::nonNull).collect(Collectors.toList());
|