Browse Source

前端定制化逻辑接口调整

master
niohe·erbao 1 year ago
parent
commit
b96bf71ff4
1 changed files with 15 additions and 14 deletions
  1. +15
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java

+ 15
- 14
pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java View File

@@ -166,23 +166,24 @@ public class OrganizationManage {
return keyTreeVO;
}).collect(Collectors.toList());

List<DingEmployeeInfo> dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class)
.eq(DingEmployeeInfo::getMainJob, "true")
.eq(DingEmployeeInfo::getOrganizationCode, parentCode));

List<KeyTreeVO> memberChildren = dingEmployeeInfoList.stream().map(r -> {
KeyTreeVO child = new KeyTreeVO();
child.setKey(r.getEmployeeCode());
child.setTitle(r.getEmployeeName());
child.setType("MEMBER");
return child;
}).collect(Collectors.toList());
if (StringUtils.isNotBlank(parentCode) && !needMember){
List<DingEmployeeInfo> dingEmployeeInfoList = iDingEmployeeInfoService.list(Wrappers.lambdaQuery(DingEmployeeInfo.class)
.eq(DingEmployeeInfo::getMainJob, "true")
.eq(DingEmployeeInfo::getOrganizationCode, parentCode));

List<KeyTreeVO> memberChildren = dingEmployeeInfoList.stream().map(r -> {
KeyTreeVO child = new KeyTreeVO();
child.setKey(r.getEmployeeCode());
child.setTitle(r.getEmployeeName());
child.setType("MEMBER");
return child;
}).collect(Collectors.toList());

if (CollUtil.isNotEmpty(memberChildren)) {
orgKeyTreeVOList.addAll(memberChildren);
if (CollUtil.isNotEmpty(memberChildren)) {
orgKeyTreeVOList.addAll(memberChildren);
}
}


// if (needMember && orgKeyTreeVOList.size() > 0) {
// List<String> organizationCodeList = orgKeyTreeVOList.stream()
// .map(KeyTreeVO::getKey).collect(Collectors.toList());


Loading…
Cancel
Save