liuyc 2 жил өмнө
parent
commit
8b599f5d1f

+ 0 - 68
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1381,8 +1381,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             tabpdf2.delete();
         }
 
-        //String trialPdfUrl = this.trialRecordProjectPositionInfo(nodeId, data, file_path);
-
         //资料填报原始pdf合并
         FileUtils.mergePdfPublicMethods(data, listPdf);
         BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);
@@ -1398,76 +1396,10 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
         }
 
-        //String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' ,sort = " + sort + " ,pdf_trial_url_position= '" + (StringUtils.isNotEmpty(trialPdfUrl) ? trialPdfUrl : null) + "' where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
-
         String sql = "update u_information_query set pdf_url ='" + bladeFile.getLink() + "' ,sort = " + sort + " where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
         jdbcTemplate.execute(sql);
     }
 
-    /*private String trialRecordProjectPositionInfo(String nodeId, List<String> data, String file_path) throws FileNotFoundException {
-        String trialPdfUrl = "";
-        List<String> recordIds = baseMapper.queryTrialRecordId(nodeId).stream().distinct().collect(Collectors.toList());//获取试验记录id
-
-        *//*if (recordIds.size() > 0) {
-            List<String> dataTrialPdfList = new ArrayList<>();
-            String recordInfoSql = "select detection_category,detection_result,task_status,pdf_url from u_trial_self_inspection_record where pdf_url is not null and 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) {
-                    dataTrialPdfList.addAll(data); //质检
-                    dataTrialPdfList.addAll(pdfUrlsTrail); //对应试验的pdf
-                }
-
-                Long id = SnowFlakeUtil.getId();
-
-                String trialPdf = file_path + "/pdf/" + id + ".pdf";
-                File trialPdf2 = ResourceUtil.getFile(trialPdf);
-                if (trialPdf2.exists()) {
-                    trialPdf2.delete();
-                }
-                //合并关联部位工程及信息pdf
-                FileUtils.mergePdfPublicMethods(dataTrialPdfList, trialPdf);
-                BladeFile bladeFile = this.newIOSSClient.uploadFile(id + ".pdf", trialPdf);
-                if (bladeFile != null && ObjectUtils.isNotEmpty(bladeFile.getLink())) {
-                    trialPdfUrl = bladeFile.getLink();
-                }
-            }
-        }*//*
-
-     *//**
-     * 已改逻辑,在资料填报工序-预览全部pdf时再拼接合并显示,当前只做储存
-     *//*
-        if (recordIds.size() > 0) {
-            String recordInfoSql = "select detection_category,detection_result,task_status,pdf_url from u_trial_self_inspection_record where pdf_url is not null and 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) {
-                    Long id = SnowFlakeUtil.getId();
-                    String trialPdf = file_path + "/pdf/" + id + ".pdf";
-                    File trialPdf2 = ResourceUtil.getFile(trialPdf);
-                    if (trialPdf2.exists()) {
-                        trialPdf2.delete();
-                    }
-                    //合并当前所有选择的试验pdf
-                    FileUtils.mergePdfPublicMethods(pdfUrlsTrail, trialPdf);
-                    BladeFile bladeFile = this.newIOSSClient.uploadFile(id + ".pdf", trialPdf);
-                    if (bladeFile != null && ObjectUtils.isNotEmpty(bladeFile.getLink())) {
-                        trialPdfUrl = bladeFile.getLink();
-                    }
-                }
-            }
-        }
-        return trialPdfUrl;
-    }*/
-
     /**
      * 试验 获取填报信息
      */