合同识别到空空格报错修复

This commit is contained in:
李贵强 2025-04-25 15:18:11 +08:00
parent fe424557f5
commit 8b2d6bbc4c
1 changed files with 6 additions and 1 deletions

View File

@ -313,7 +313,12 @@ public class ContractFormPlugin extends AbstractFormPlugin implements UploadList
Row row = sheet.getRow(j);
if (null != row) {
//第一列断号
String seq = row.getCell(0).toString();
String seq = null;
try {
seq = row.getCell(0).toString();
} catch (Exception e) {
continue;
}
seq = seq.split("\\.")[0]; // 取第一个部分
if (StringUtils.isEmpty(seq)) {
System.out.println("" + (j + 1) + " 行第一列是空值,跳过");