浏览代码

质检关联试验文件 优先使用电签pdf

chenr 2 月之前
父节点
当前提交
78e4da59a7

+ 5 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialFileSubmitDTO.java

@@ -1,6 +1,7 @@
 package org.springblade.business.dto;
 
 import io.swagger.annotations.ApiModelProperty;
+import io.swagger.models.auth.In;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -23,4 +24,8 @@ public class TrialFileSubmitDTO implements Serializable {
     @ApiModelProperty(value = "合同段id")
     private String contractId;
 
+    @ApiModelProperty(value = "1=施工、2=监理")
+    private Integer classify;
+
+
 }

+ 9 - 4
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -1895,11 +1895,16 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 
                     //自检pdf
                     List<TrialSelfInspectionRecord> trialSelfInspectionRecords = baseMapper.selectList(Wrappers.<TrialSelfInspectionRecord>lambdaQuery()
-                            .select(TrialSelfInspectionRecord::getPdfUrl)
+                            .select(TrialSelfInspectionRecord::getPdfUrl,TrialSelfInspectionRecord::getContractId,TrialSelfInspectionRecord::getId,TrialSelfInspectionRecord::getType)
                             .in(TrialSelfInspectionRecord::getId, Func.toLongList(dto.getIds())));
-                    List<String> pdfURLs = trialSelfInspectionRecords.stream().map(TrialSelfInspectionRecord::getPdfUrl).collect(Collectors.toList());
-                    pdfList.addAll(pdfURLs);
-
+                    if(trialSelfInspectionRecords.size()>0){
+                        for (TrialSelfInspectionRecord record : trialSelfInspectionRecords) {
+                            String pdf = this.getMergePdfToTrialNew(record.getContractId(), record.getId(), record.getType());
+                            pdfList.add(pdf);
+                        }
+                    }
+//                    List<String> pdfURLs = trialSelfInspectionRecords.stream().map(TrialSelfInspectionRecord::getPdfUrl).collect(Collectors.toList());
+//                    pdfList.addAll(pdfURLs);
                     //------第三方、外委------
                 } else if (dto.getType().equals(2) || dto.getType().equals(3)) {
                     if (informationQuery.getPdfTrialUrl() != null) {