瀏覽代碼

树形结构

搜索出单位
tags/24080901
niohe·erbao 1 年之前
父節點
當前提交
faa31774f9
共有 2 個文件被更改,包括 16 次插入5 次删除
  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 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存