fix: 88096 企业标准-导入数据导不进去
This commit is contained in:
@@ -815,11 +815,9 @@ public class ImportUtil {
|
|||||||
continue; // 跳过空行
|
continue; // 跳过空行
|
||||||
}
|
}
|
||||||
// 获取第四行前两个单元格的内容
|
// 获取第四行前两个单元格的内容
|
||||||
String cellContent1 = getCellContent(row.getCell(0));
|
|
||||||
String cellContent2 = getCellContent(row.getCell(1));
|
|
||||||
String cellContent3 = getCellContent(row.getCell(2));
|
String cellContent3 = getCellContent(row.getCell(2));
|
||||||
// 执行valid方法进行校验
|
// 执行valid方法进行校验
|
||||||
if (!valid(cellContent1, cellContent2, cellContent3, deaprtMap, departPartMap)) {
|
if (!valid(cellContent3, deaprtMap, departPartMap)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -860,16 +858,11 @@ public class ImportUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 必填校验
|
// 必填校验
|
||||||
private boolean valid(String content1, String content2, String content3, Map<String, List<SysDepart>> deaprtMap, Map<String, String> departPartMap) {
|
private boolean valid(String content3, Map<String, List<SysDepart>> deaprtMap, Map<String, String> departPartMap) {
|
||||||
// 这里只做简单的非空校验
|
|
||||||
if (content1 != null && !content1.trim().isEmpty() && content2 != null && !content2.trim().isEmpty()) {
|
|
||||||
if (StrUtil.isNotBlank(content3)) {
|
if (StrUtil.isNotBlank(content3)) {
|
||||||
return multiOrgValid(content3, deaprtMap, departPartMap);
|
return multiOrgValid(content3, deaprtMap, departPartMap);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user