|
@@ -1385,15 +1385,17 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
//TODO ------ 试验pdf关联部位工程及信息 liuYC 2023-03-13 ------
|
|
|
//获取试验记录id
|
|
|
List<String> recordIds = baseMapper.queryTrialRecordId(nodeId).stream().distinct().collect(Collectors.toList());
|
|
|
- String recordInfoSql = "select detection_category,detection_result,task_status,pdf_url from u_trial_self_inspection_record where id in(" + StringUtils.join(recordIds, ",") + ")";
|
|
|
- List<TrialSelfInspectionRecord> query = jdbcTemplate.query(recordInfoSql, new BeanPropertyRowMapper<>(TrialSelfInspectionRecord.class));
|
|
|
- if (query.size() > 0) {
|
|
|
- //只获取已审批合格自检记录,追加试验pdf到质检后面
|
|
|
- List<String> pdfUrlsTrail = query.stream().filter(f -> ("已审批").equals(f.getTaskStatus())
|
|
|
- && (new Integer(1).equals(f.getDetectionResult()))
|
|
|
- && (new Integer(1).equals(f.getDetectionCategory()))).map(TrialSelfInspectionRecord::getPdfUrl).collect(Collectors.toList());
|
|
|
- if (pdfUrlsTrail.size() > 0) {
|
|
|
- data.addAll(pdfUrlsTrail);
|
|
|
+ if (recordIds.size() > 0) {
|
|
|
+ String recordInfoSql = "select detection_category,detection_result,task_status,pdf_url from u_trial_self_inspection_record where id in(" + StringUtils.join(recordIds, ",") + ")";
|
|
|
+ List<TrialSelfInspectionRecord> query = jdbcTemplate.query(recordInfoSql, new BeanPropertyRowMapper<>(TrialSelfInspectionRecord.class));
|
|
|
+ if (query.size() > 0) {
|
|
|
+ //只获取已审批合格自检记录,追加试验pdf到质检后面
|
|
|
+ List<String> pdfUrlsTrail = query.stream().filter(f -> ("已审批").equals(f.getTaskStatus())
|
|
|
+ && (new Integer(1).equals(f.getDetectionResult()))
|
|
|
+ && (new Integer(1).equals(f.getDetectionCategory()))).map(TrialSelfInspectionRecord::getPdfUrl).collect(Collectors.toList());
|
|
|
+ if (pdfUrlsTrail.size() > 0) {
|
|
|
+ data.addAll(pdfUrlsTrail);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|