|
@@ -2396,7 +2396,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
|
|
|
//获取当前试验记录的中的元素表的附件文件
|
|
//获取当前试验记录的中的元素表的附件文件
|
|
List<TableFile> tableFileList = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getTrialRecordId, id));
|
|
List<TableFile> tableFileList = tableFileService.getBaseMapper().selectList(Wrappers.<TableFile>query().lambda().eq(TableFile::getTabId, pkeyId + "").eq(TableFile::getTrialRecordId, id));
|
|
-
|
|
|
|
if (tableFileList.size() > 0) {
|
|
if (tableFileList.size() > 0) {
|
|
tableFileList.sort(Comparator.comparing(TableFile::getType));
|
|
tableFileList.sort(Comparator.comparing(TableFile::getType));
|
|
List<String> dataListPdf = tableFileList.stream().filter(tableFile ->
|
|
List<String> dataListPdf = tableFileList.stream().filter(tableFile ->
|
|
@@ -2413,23 +2412,25 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
FileUtils.mergePdfPublicMethods(dataListPdf, pdfPath2);
|
|
FileUtils.mergePdfPublicMethods(dataListPdf, pdfPath2);
|
|
|
|
|
|
BladeFile bladeFile2 = newIOSSClient.uploadFile(pkeyId + "2.pdf", pdfPath2);
|
|
BladeFile bladeFile2 = newIOSSClient.uploadFile(pkeyId + "2.pdf", pdfPath2);
|
|
-
|
|
|
|
- //查询是否存在关系
|
|
|
|
- String sqlQuery = "select id from u_trial_self_data_record where record_id = " + id + " and tab_id = " + pkeyId;
|
|
|
|
- List<TrialSelfDataRecord> query = jdbcTemplate.query(sqlQuery, new BeanPropertyRowMapper<>(TrialSelfDataRecord.class));
|
|
|
|
- String sql;
|
|
|
|
- if (query.size() == 0) {
|
|
|
|
- //新增关系
|
|
|
|
- sql = "insert into u_trial_self_data_record(id,record_id,tab_id,is_buss_show,is_tab_pdf,is_tab_file_type,pdf_url) values" +
|
|
|
|
- "(" + SnowFlakeUtil.getId() + "," + id + "," + pkeyId + "," + 1 + "," + 2 + "," + 1 + ",'" + bladeFile2.getLink() + "')";
|
|
|
|
- } else {
|
|
|
|
- //修改pdfUrl
|
|
|
|
- sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile2.getLink() + "' where record_id = " + id + " and tab_id = " + pkeyId;
|
|
|
|
|
|
+ if (bladeFile2 != null) {
|
|
|
|
+ bladeFile.setLink(bladeFile2.getLink());
|
|
}
|
|
}
|
|
- jdbcTemplate.execute(sql);
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- return bladeFile2.getLink();
|
|
|
|
|
|
+ //查询是否存在关系
|
|
|
|
+ String sqlQuery = "select id from u_trial_self_data_record where record_id = " + id + " and tab_id = " + pkeyId;
|
|
|
|
+ List<TrialSelfDataRecord> query = jdbcTemplate.query(sqlQuery, new BeanPropertyRowMapper<>(TrialSelfDataRecord.class));
|
|
|
|
+ String sql;
|
|
|
|
+ if (query.size() == 0) {
|
|
|
|
+ //新增关系
|
|
|
|
+ sql = "insert into u_trial_self_data_record(id,record_id,tab_id,is_buss_show,is_tab_pdf,is_tab_file_type,pdf_url) values" +
|
|
|
|
+ "(" + SnowFlakeUtil.getId() + "," + id + "," + pkeyId + "," + 1 + "," + 2 + "," + 1 + ",'" + bladeFile.getLink() + "')";
|
|
|
|
+ } else {
|
|
|
|
+ //修改pdfUrl
|
|
|
|
+ sql = "update u_trial_self_data_record set pdf_url ='" + bladeFile.getLink() + "' where record_id = " + id + " and tab_id = " + pkeyId;
|
|
}
|
|
}
|
|
|
|
+ jdbcTemplate.execute(sql);
|
|
|
|
+
|
|
return bladeFile.getLink();
|
|
return bladeFile.getLink();
|
|
}
|
|
}
|
|
return "";
|
|
return "";
|