| | |
| | | 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; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | |
| | | public AjaxResult list(SysDept dept) |
| | | { |
| | | List<SysDept> depts = deptService.selectDeptList(dept); |
| | | return success(depts); |
| | | } |
| | | |
| | | @GetMapping("/flowable/all") |
| | | public AjaxResult all() |
| | | { |
| | | List<StringTreeSelect> depts = deptService.flowableAll(); |
| | | return success(depts); |
| | | } |
| | | |
| | |
| | | { |
| | | return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); |
| | | } |
| | | else if (dept.getParentId().equals(deptId)) |
| | | else if (Objects.nonNull(dept.getParentId()) && dept.getParentId().equals(deptId)) |
| | | { |
| | | return error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); |
| | | } |