perf: 企标外标导入部门验证优化
This commit is contained in:
@@ -277,15 +277,12 @@ public class ImportUtil {
|
||||
// 组织机构
|
||||
if (FieldShowTypeEnum.SINGLE_ORGANIZATION_DIALOG.getValue().equals(tag.getFieldShowType()) ||
|
||||
FieldShowTypeEnum.MULTI_ORGANIZATION_DIALOG.getValue().equals(tag.getFieldShowType())) {
|
||||
List<SysDepart> departList = sysDepartService.list();
|
||||
Map<String, List<SysDepart>> deaprtMap = departList.stream().collect(Collectors.groupingBy(SysDepart::getDepartName));
|
||||
Map<String, String> departPartMap = SysDepart.buildPaths(departList);
|
||||
if (!this.multiOrgValid(cellValue, deaprtMap, departPartMap)) {
|
||||
if (!this.multiOrgValid(cellValue, sysDepartMap, sysDepartPathMap)) {
|
||||
log.error("第" + row + "列" + tag.getDbFieldTxt() + "填写错误 ");
|
||||
errMsg.append("第").append(row).append("列").append(tag.getDbFieldTxt()).append("填写错误 ");
|
||||
} else {
|
||||
// 转为id
|
||||
cellValue = this.convertMultiOrgId(cellValue, deaprtMap, departPartMap);
|
||||
cellValue = this.convertMultiOrgId(cellValue, sysDepartMap, sysDepartPathMap);
|
||||
}
|
||||
}
|
||||
// 单选人员
|
||||
|
||||
Reference in New Issue
Block a user