组织机构异步查询接口补充根节点查询
This commit is contained in:
@ -15,6 +15,11 @@ public class Constants {
|
|||||||
public static final String ANNO_MODE_VO_B = "BizAnnoVoBtable";
|
public static final String ANNO_MODE_VO_B = "BizAnnoVoBtable";
|
||||||
public static final String ANNO_MODE_VO_M = "BizAnnoVoMtable";
|
public static final String ANNO_MODE_VO_M = "BizAnnoVoMtable";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织结构书根节点
|
||||||
|
*/
|
||||||
|
public static final String ROOT_NODE = "10000000";
|
||||||
|
|
||||||
public static final String EBTP_TENANT_BY = "EBTP";
|
public static final String EBTP_TENANT_BY = "EBTP";
|
||||||
|
|
||||||
public static final String DELETE_FLAG_NORMAL = "normal";
|
public static final String DELETE_FLAG_NORMAL = "normal";
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package com.chinaunicom.zyhy.ebtp.supplier.base.controller;
|
package com.chinaunicom.zyhy.ebtp.supplier.base.controller;
|
||||||
|
|
||||||
import com.chinaunicom.mall.ebtp.common.base.entity.*;
|
import com.chinaunicom.mall.ebtp.common.base.entity.*;
|
||||||
|
import com.chinaunicom.mall.ebtp.login.common.Constants;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.service.IOrgService;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.service.IOrgService;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.service.IUserService;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.service.IUserService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cloud.openfeign.SpringQueryMap;
|
import org.springframework.cloud.openfeign.SpringQueryMap;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -34,6 +37,10 @@ public class OrgController {
|
|||||||
@ApiOperation("查询机构列表")
|
@ApiOperation("查询机构列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public BaseResponse<List<SysOrg>> getOrglist(@ApiParam(value = "查询对象数据", required = false) @SpringQueryMap SysOrg param){
|
public BaseResponse<List<SysOrg>> getOrglist(@ApiParam(value = "查询对象数据", required = false) @SpringQueryMap SysOrg param){
|
||||||
|
// 如果上级机构ID和机构ID都为空,则以根节点为起点查下级
|
||||||
|
if(StringUtils.isEmpty(param.getOrgId()) && StringUtils.isEmpty(param.getUpOrgId())) {
|
||||||
|
param.setUpOrgId(Constants.ROOT_NODE);
|
||||||
|
}
|
||||||
return orgService.getOrglist(param);
|
return orgService.getOrglist(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user