Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM pirms 1 gada
vecāks
revīzija
7a759ece98
2 mainītis faili ar 8 papildinājumiem un 5 dzēšanām
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java
  2. +6
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java Parādīt failu

@@ -45,8 +45,8 @@ public class DingOrganizationController {

@PostMapping("/get-child-list")
@ApiOperation("获取组织架构的树状结构(单位筛选列表)")
public List<OrganizationTreeVO> getChildOrganizationList(@RequestParam(value = "parentCode", required = false) String parentCode) {
return organizationManage.getChildOrganizationList(parentCode);
public List<OrganizationTreeVO> getChildOrganizationList(@RequestParam(value = "parentCode", required = false) String parentCode,@RequestParam(value = "orgName", required = false) String orgName) {
return organizationManage.getChildOrganizationList(parentCode,orgName);
}

@ApiOperation("组织树状列表筛选(前端定制化接口不可复用)")


+ 6
- 3
pmapi/src/main/java/com/ningdatech/pmapi/organization/manage/OrganizationManage.java Parādīt failu

@@ -92,17 +92,20 @@ public class OrganizationManage {
return pageVo;
}

public List<OrganizationTreeVO> getChildOrganizationList(String parentCode) {
public List<OrganizationTreeVO> getChildOrganizationList(String parentCode, String orgName) {
List<String> parentCodeList = new ArrayList<>();
List<DingOrganization> dingOrganizationList = new ArrayList<>();
if (StrUtils.isBlank(parentCode)) {
parentCodeList = dingOrganizationProperties.getDeptVisibleScopes();
dingOrganizationList = iDingOrganizationService.list(Wrappers.lambdaQuery(DingOrganization.class)
.like(StringUtils.isNotBlank(orgName), DingOrganization::getOrganizationName, orgName)
.in(DingOrganization::getOrganizationCode, parentCodeList));
} else {
parentCodeList = CollectionUtil.toList(parentCode);
dingOrganizationList = iDingOrganizationService
.list(Wrappers.lambdaQuery(DingOrganization.class).in(DingOrganization::getParentCode, parentCodeList));
.list(Wrappers.lambdaQuery(DingOrganization.class)
.like(StringUtils.isNotBlank(orgName), DingOrganization::getOrganizationName, orgName)
.in(DingOrganization::getParentCode, parentCodeList));
}

if (CollectionUtils.isEmpty(dingOrganizationList)) {
@@ -232,7 +235,7 @@ public class OrganizationManage {
public void treeVOList(Boolean needMember, List<KeyTreeVO> basicOrgKeyTreeVOList) {
for (KeyTreeVO basicOrgKeyTreeVO : basicOrgKeyTreeVOList) {
String parentCode = basicOrgKeyTreeVO.getKey();
List<OrganizationTreeVO> childOrganizationList = getChildOrganizationList(parentCode);
List<OrganizationTreeVO> childOrganizationList = getChildOrganizationList(parentCode, null);

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


Notiek ielāde…
Atcelt
Saglabāt