diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java index 4c12f0abb..0d90a8cbe 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/controller/SysDeptController.java @@ -521,4 +521,9 @@ public class SysDeptController { return new Result>().ok(list); } + @PostMapping("meta/all") + public Result> getAllDept() { + return new Result>().ok(sysDeptService.listAll(new HashMap<>())); + } + } diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/SysDeptDao.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/SysDeptDao.java index e7d775cf8..4d62590d3 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/SysDeptDao.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/dao/SysDeptDao.java @@ -35,6 +35,8 @@ public interface SysDeptDao extends BaseDao { List getList(Map params); + List listAll(Map params); + SysDeptEntity getById(Long id); /** diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java index bd8b42260..0de656e8b 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/SysDeptService.java @@ -44,6 +44,16 @@ public interface SysDeptService extends BaseService { */ List listDefault(Map params); + /** + * 默认列表,无数据权限 + * + * @param params + * @return java.util.List + * @author zhy + * @date 2022/10/11 14:46 + */ + List listAll(Map params); + SysDeptDTO get(Long id); void save(SysDeptDTO dto); diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java index 07caf3241..e0b3e9f33 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/java/com/elink/esua/epdc/service/impl/SysDeptServiceImpl.java @@ -136,6 +136,13 @@ public class SysDeptServiceImpl extends BaseServiceImpl listAll(Map params) { + List entityList = baseDao.listAll(params); + + return ConvertUtils.sourceToTarget(entityList, DeptDTO.class); + } + @Override public List subList(String pid) { QueryWrapper wrapper = new QueryWrapper<>(); diff --git a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml index b99d93244..5300687b3 100644 --- a/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml +++ b/esua-epdc/epdc-admin/epdc-admin-server/src/main/resources/mapper/SysDeptDao.xml @@ -21,6 +21,11 @@ order by t1.sort asc + +