Ver código fonte

区域code

tags/24080901
PoffyZhang 1 ano atrás
pai
commit
9bae1f0ed1
2 arquivos alterados com 6 adições e 15 exclusões
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java
  2. +4
    -15
      pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java

+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java Ver arquivo

@@ -43,6 +43,8 @@ public class UserInfo implements Serializable {

private String employeeCode;

private String regionCode;

@TableField(fill = FieldFill.INSERT)
private LocalDateTime createOn;



+ 4
- 15
pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java Ver arquivo

@@ -71,7 +71,7 @@ public class UserInfoManage {
pageVo.setTotal(0L);
return pageVo;
}
List<String> compliantOrgEmpCodeList = getCompliantOrgEmpCodeList(req.getOrgName(), orgCode, regionId);
List<String> compliantOrgEmpCodeList = getCompliantOrgEmpCodeList(req.getOrgName(), orgCode);
if (compliantOrgEmpCodeList != null && compliantOrgEmpCodeList.size() == 0) {
pageVo.setRecords(new ArrayList<>());
pageVo.setTotal(0L);
@@ -82,6 +82,7 @@ public class UserInfoManage {
.like(StringUtils.isNotBlank(phoneNo), UserInfo::getMobile, phoneNo)
.like(StringUtils.isNotBlank(name), UserInfo::getRealName, name)
.in(Objects.nonNull(userIdList), UserInfo::getId, userIdList)
.eq(Objects.nonNull(regionId), UserInfo::getRegionCode,regionId)
.in(Objects.nonNull(compliantOrgEmpCodeList), UserInfo::getEmployeeCode, compliantOrgEmpCodeList)
.orderByDesc(UserInfo::getUpdateOn);

@@ -125,23 +126,11 @@ public class UserInfoManage {
return pageVo;
}

private List<String> getCompliantOrgEmpCodeList(String orgName, String orgCode, Long regionId) {
if (StringUtils.isBlank(orgName) && StringUtils.isBlank(orgCode) && Objects.isNull(regionId)) {
private List<String> getCompliantOrgEmpCodeList(String orgName, String orgCode) {
if (StringUtils.isBlank(orgName) && StringUtils.isBlank(orgCode)) {
return null;
}
List<String> compliantOrgCodeList = new ArrayList<>();
// 查询符合筛选区域条件的组织列表
if (Objects.nonNull(regionId)) {
List<DingOrganization> dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class)
.eq(DingOrganization::getDivisionCode, regionId));
List<String> compliantRegionIdList = dingOrganizationList.stream()
.map(DingOrganization::getOrganizationCode)
.collect(Collectors.toList());
if (CollUtil.isEmpty(compliantRegionIdList)) {
return new ArrayList<>();
}
compliantOrgCodeList.addAll(compliantRegionIdList);
}

// 查重符合筛选条件的组织列表
if (StringUtils.isNotBlank(orgName)) {


Carregando…
Cancelar
Salvar