| | |
| | | package com.ycl.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.common.core.domain.StringTreeSelect; |
| | |
| | | private final static Long userPortId = 101L; |
| | | //审批端id |
| | | private final static Long approvalPortId = 102L; |
| | | |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | // @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @GetMapping("/list") |
| | | public AjaxResult list(SysDept dept) |
| | | { |
| | |
| | | { |
| | | return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); |
| | | } |
| | | else if (dept.getParentId().equals(deptId)) |
| | | else if (Objects.nonNull(dept.getParentId()) && dept.getParentId().equals(deptId)) |
| | | { |
| | | return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); |
| | | } |
| | |
| | | public Result approvalList() { |
| | | SysDept dept = new SysDept(); |
| | | dept.setParentId(approvalPortId); |
| | | return deptService.all(dept); |
| | | return Result.ok().data(deptService.selectDeptListNoAuth(dept)); |
| | | } |
| | | } |