1.优化合同清单导入识别

S
This commit is contained in:
weiyunlong 2025-03-05 15:50:40 +08:00
parent ae637b2b48
commit 204ce8a32c
1 changed files with 8 additions and 1 deletions

View File

@ -316,8 +316,9 @@ public class ContractFormPlugin extends AbstractFormPlugin implements UploadList
Row row = sheet.getRow(j); Row row = sheet.getRow(j);
//第一列断号 //第一列断号
String seq = row.getCell(0).toString(); String seq = row.getCell(0).toString();
seq = seq.split("\\.")[0]; // 取第一个部分
if (StringUtils.isEmpty(seq)) { if (StringUtils.isEmpty(seq)) {
System.out.println(); System.out.println("" + (j + 1) + " 行第一列是空值,跳过");
continue; continue;
} }
//第一列不包含数字 //第一列不包含数字
@ -326,6 +327,12 @@ public class ContractFormPlugin extends AbstractFormPlugin implements UploadList
System.out.println(); System.out.println();
continue; continue;
} }
// 第一列只能是数字
boolean isOnlyDigits = seq.matches("\\d+");
if (!isOnlyDigits) {
System.out.println("" + (j + 1) + " 行第一列不是纯数字,跳过");
continue;
}
//合同明细清单 qeug_contractsummarylist //合同明细清单 qeug_contractsummarylist
// 存合同id,sheet名字 // 存合同id,sheet名字