Browse Source

树形结构

搜索出单位
tags/24080901
niohe·erbao 1 year ago
parent
commit
faa31774f9
2 changed files with 16 additions and 5 deletions
  1. +13
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java
  2. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/organization/model/po/ReqSynthesizePO.java

+ 13
- 3
pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java View File

@@ -109,16 +109,26 @@ public class OrganizationManage {

public List<KeyTreeVO> treeRubbishVOList(ReqSynthesizePO request) {
String organizationCode = request.getOrganizationCode();
String organizationName = request.getOrganizationName();

List<DingOrganization> dingOrganizationList = new ArrayList<>();
List<String> organizationCodeList = new ArrayList<>();
if (StrUtils.isBlank(organizationCode)) {
if (StringUtils.isNotBlank(organizationName)) {
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class)
.like(DingOrganization::getOrganizationName, organizationName));
if (dingOrganizationList.size() == 0) {
return new ArrayList<>();
}
} else if (StrUtils.isBlank(organizationCode)) {
organizationCodeList = dingOrganizationProperties.getDeptVisibleScopes();
} else {
organizationCodeList = CollectionUtil.toList(organizationCode);
}
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class)
.in(DingOrganization::getOrganizationCode, organizationCodeList));

if (CollectionUtil.isEmpty(dingOrganizationList)) {
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class)
.in(DingOrganization::getOrganizationCode, organizationCodeList));
}

List<KeyTreeVO> orgKeyTreeVOList = dingOrganizationList.stream().map(r -> {
KeyTreeVO keyTreeVO = new KeyTreeVO();


+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/organization/model/po/ReqSynthesizePO.java View File

@@ -4,8 +4,6 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
* @author liuxinxin
* @date 2023/3/28 上午10:11
@@ -20,4 +18,7 @@ public class ReqSynthesizePO {

@ApiModelProperty("是否需要组织成员列表")
private Boolean needMember = false;

@ApiModelProperty("单位名称")
private String organizationName;
}

Loading…
Cancel
Save