| | |
| | | |
| | | import java.util.List; |
| | | |
| | | 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; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class SysDeptController extends BaseController { |
| | | |
| | | private final ISysDeptService deptService; |
| | | |
| | | //业主端id |
| | | private final static Long userPortId = 101L; |
| | | //审批端id |
| | | private final static Long approvalPortId = 102L; |
| | | /** |
| | | * 获取部门列表 |
| | | */ |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | deptService.checkDeptDataScope(deptId); |
| | | return toAjax(deptService.deleteDeptById(deptId)); |
| | | } |
| | | |
| | | @GetMapping("/approvalList") |
| | | @ApiOperation(value = "审批部门下拉列表", notes = "审批部门下拉列表") |
| | | public Result approvalList() { |
| | | SysDept dept = new SysDept(); |
| | | dept.setParentId(approvalPortId); |
| | | return deptService.all(dept); |
| | | } |
| | | } |