فهرست منبع

bug:试验检测预览和资料预览,看到的PDF不同

lvy 2 ماه پیش
والد
کامیت
6d105041bf

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

@@ -62,7 +62,6 @@ import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.SingleColumnRowMapper;
 import org.springframework.jdbc.core.SingleColumnRowMapper;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartFile;
 
 
@@ -188,7 +187,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                      }
                      }
                 }
                 }
                 //合并的pdfUrl
                 //合并的pdfUrl
-                String pdf = this.getMergePdfToTrialNew(record.getContractId(), record.getId());
+                String pdf = this.getMergePdfToTrialNew(record.getContractId(), record.getId(), dto.getType());
                 record.setPdfUrl(pdf);
                 record.setPdfUrl(pdf);
             }
             }
 
 
@@ -264,11 +263,12 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
      *新增返回该试验材料报告关联的委托单pdf也拼接在后面
      *新增返回该试验材料报告关联的委托单pdf也拼接在后面
      * @param contractId
      * @param contractId
      * @param nodeId
      * @param nodeId
+     * @param type
      * @return
      * @return
      * @throws FileNotFoundException
      * @throws FileNotFoundException
      */
      */
-    private String getMergePdfToTrialNew(Long contractId, Long nodeId) throws FileNotFoundException {
-        String sql = "select pdf_url,e_visa_pdf_url from u_information_query where wbs_id='" + nodeId + "' and contract_id ='" + contractId + "'";
+    private String getMergePdfToTrialNew(Long contractId, Long nodeId, Integer type) throws FileNotFoundException {
+        String sql = "select pdf_url,e_visa_pdf_url from u_information_query where wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' and classify = '" + type + "'" ;
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps.size() >= 1) {
         if (maps.size() >= 1) {
             Map<String, Object> stringObjectMap = maps.get(0);
             Map<String, Object> stringObjectMap = maps.get(0);