Commit c6afded8ba0ba24e856bd4f63adcf3cab82d6c41

Authored by yeqianyong
1 parent 7ca84a0e

楚江erp:客户简称导入相关接口开发

... ... @@ -63,6 +63,7 @@ public class CustomerShortImportListener extends ExcelImportListener<CustomerSho
63 63 }
64 64 data.setDeptId(office.getId());
65 65 // 区域
  66 + deptWrapper.clear();
66 67 deptWrapper.eq(SysDept::getName, data.getRegionName());
67 68 SysDept region = sysDeptService.getOne(deptWrapper);
68 69 if (region == null) {
... ... @@ -75,7 +76,7 @@ public class CustomerShortImportListener extends ExcelImportListener<CustomerSho
75 76 + "]不属于[" + data.getDeptName() + "],请检查后再次导入!");
76 77 }
77 78 List<String> regionNameList = regionList.stream().map(SysDept::getName).collect(Collectors.toList());
78   - if (regionNameList.contains(region.getName())) {
  79 + if (!regionNameList.contains(region.getName())) {
79 80 throw new DefaultClientException("第" + context.readRowHolder().getRowIndex() + "行,[" + data.getRegionName()
80 81 + "]不属于[" + data.getDeptName() + "],请检查后再次导入!");
81 82 }
... ...