|
@@ -6,6 +6,7 @@ import com.ozs.common.constant.UserConstants;
|
|
|
import com.ozs.common.core.controller.BaseController;
|
|
|
import com.ozs.common.core.domain.AjaxResult;
|
|
|
import com.ozs.common.core.domain.entity.SysDept;
|
|
|
+import com.ozs.common.core.domain.vo.SysDeptVo;
|
|
|
import com.ozs.common.enums.BusinessType;
|
|
|
import com.ozs.common.utils.StringUtils;
|
|
|
import com.ozs.common.utils.poi.ExcelUtil;
|
|
@@ -37,7 +38,7 @@ public class SysDeptController extends BaseController {
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:dept:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public AjaxResult list(SysDept dept) {
|
|
|
+ public AjaxResult list(SysDeptVo dept) {
|
|
|
List<SysDept> depts = deptService.selectDeptList(dept);
|
|
|
for (SysDept sysDept : depts) {
|
|
|
for (SysDept dept1 : depts) {
|
|
@@ -73,7 +74,7 @@ public class SysDeptController extends BaseController {
|
|
|
*/
|
|
|
@GetMapping("/deptTree")
|
|
|
@ApiOperation("获取部门树列表")
|
|
|
- public AjaxResult deptTree(SysDept dept) {
|
|
|
+ public AjaxResult deptTree(SysDeptVo dept) {
|
|
|
return success(deptService.selectDeptTreeList(dept));
|
|
|
}
|
|
|
|
|
@@ -83,7 +84,7 @@ public class SysDeptController extends BaseController {
|
|
|
@PreAuthorize("@ss.hasPermi('system:dept:list')")
|
|
|
@GetMapping("/list/exclude/{deptId}")
|
|
|
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
|
|
|
- List<SysDept> depts = deptService.selectDeptList(new SysDept());
|
|
|
+ List<SysDept> depts = deptService.selectDeptList(new SysDeptVo());
|
|
|
depts.removeIf(d -> d.getDeptId().intValue() == deptId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
|
|
|
return success(depts);
|
|
|
}
|