fix: 88096 企业标准-导入数据导不进去
This commit is contained in:
@@ -345,7 +345,7 @@ public class ImportUtil {
|
||||
// 树形单选
|
||||
if ((FieldShowTypeEnum.TREE_STRUCTURE_SINGLE_SELECT.getValue().equals(tag.getFieldShowType()) ||
|
||||
FieldShowTypeEnum.TREE_STRUCTURE_MULTI_SELECT.getValue().equals(tag.getFieldShowType())) &&
|
||||
(!FieldCommon.STANDARD_SYSTEM.equals(tag.getDbFieldName()))
|
||||
(!FieldCommon.STANDARD_SYSTEM.equals(tag.getDbFieldName()))
|
||||
) {
|
||||
// 根据tag找到dictCode
|
||||
String dictCode = tag.getDictField();
|
||||
@@ -815,11 +815,9 @@ public class ImportUtil {
|
||||
continue; // 跳过空行
|
||||
}
|
||||
// 获取第四行前两个单元格的内容
|
||||
String cellContent1 = getCellContent(row.getCell(0));
|
||||
String cellContent2 = getCellContent(row.getCell(1));
|
||||
String cellContent3 = getCellContent(row.getCell(2));
|
||||
// 执行valid方法进行校验
|
||||
if (!valid(cellContent1, cellContent2, cellContent3, deaprtMap, departPartMap)) {
|
||||
if (!valid(cellContent3, deaprtMap, departPartMap)) {
|
||||
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) {
|
||||
// 这里只做简单的非空校验
|
||||
if (content1 != null && !content1.trim().isEmpty() && content2 != null && !content2.trim().isEmpty()) {
|
||||
if (StrUtil.isNotBlank(content3)) {
|
||||
return multiOrgValid(content3, deaprtMap, departPartMap);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
private boolean valid(String content3, Map<String, List<SysDepart>> deaprtMap, Map<String, String> departPartMap) {
|
||||
if (StrUtil.isNotBlank(content3)) {
|
||||
return multiOrgValid(content3, deaprtMap, departPartMap);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user