1 changed files with 52 additions and 0 deletions
@ -0,0 +1,52 @@ |
|||
package com.zdxt.app.controller.external.company; |
|||
|
|||
import com.zdxt.auth.dto.DeptBean; |
|||
import com.zdxt.auth.feign.DeptApi; |
|||
import com.zdxt.common.ZDResponse; |
|||
import com.zdxt.common.controller.BaseController; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author: kylin |
|||
* @Date: 2024/5/1 3:00 下午 |
|||
* @Version: 1.0 |
|||
* @Desc: TODO |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/external/dept") |
|||
public class OutDepaController extends BaseController { |
|||
@Autowired |
|||
private DeptApi deptApi; |
|||
|
|||
@GetMapping("/listDeptApp") |
|||
@ResponseBody |
|||
public ZDResponse listDeptApp(DeptBean dept) { |
|||
List<DeptBean> list = deptApi.selectDeptByParentId(dept); |
|||
return ZDResponse.success("查询成功",list); |
|||
} |
|||
|
|||
@GetMapping("/listDeptAppNoPermission") |
|||
@ResponseBody |
|||
public ZDResponse listDeptAppNoPermission(DeptBean dept) { |
|||
List<DeptBean> list = deptApi.listDeptAppNoPermission(dept); |
|||
return ZDResponse.success("查询成功",list); |
|||
} |
|||
|
|||
/** |
|||
* 根据根据部门的parentId获取上一个parentId |
|||
* @param dept |
|||
* @return |
|||
*/ |
|||
@GetMapping("/nextDeptByparentId") |
|||
@ResponseBody |
|||
public ZDResponse nextDeptByparentId(DeptBean dept) { |
|||
DeptBean parent = deptApi.getDeptById(dept.getParentId()); |
|||
return ZDResponse.success("查询成功",parent); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue