diff --git a/src/main/java/com/cm/serviceusercenter/controller/resources/system/department/DepartmentResourceController.java b/src/main/java/com/cm/serviceusercenter/controller/resources/system/department/DepartmentResourceController.java index 8cb7956..56cadf7 100644 --- a/src/main/java/com/cm/serviceusercenter/controller/resources/system/department/DepartmentResourceController.java +++ b/src/main/java/com/cm/serviceusercenter/controller/resources/system/department/DepartmentResourceController.java @@ -3,7 +3,9 @@ package com.cm.serviceusercenter.controller.resources.system.department; import com.cm.common.constants.ISystemConstant; import com.cm.common.exception.ParamsException; import com.cm.common.exception.SearchException; +import com.cm.common.plugin.pojo.bos.department.DepartmentResourceBO; import com.cm.common.pojo.dtos.ZTreeDTO; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.ErrorResult; import com.cm.common.utils.RegexUtil; import com.cm.serviceusercenter.controller.BaseController; @@ -216,4 +218,16 @@ public class DepartmentResourceController extends BaseController { return departmentService.getDepartmentWithAllSubDepartmentById(departmentId); } + + @ApiOperation(value = "部门列表", notes = "部门列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query", dataType = "String"), + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list-sort") + public List listSort() { + Map params = requestParams(); + return departmentService.listSort(params); + } + } diff --git a/src/main/java/com/cm/serviceusercenter/dao/system/department/IDepartmentDao.java b/src/main/java/com/cm/serviceusercenter/dao/system/department/IDepartmentDao.java index 5e35218..6f6eb54 100644 --- a/src/main/java/com/cm/serviceusercenter/dao/system/department/IDepartmentDao.java +++ b/src/main/java/com/cm/serviceusercenter/dao/system/department/IDepartmentDao.java @@ -7,6 +7,7 @@ import com.cm.common.exception.UpdateException; import com.cm.common.plugin.pojo.bos.department.DepartmentResourceBO; import com.cm.common.pojo.bos.DepartmentBO; import com.cm.common.pojo.dtos.ZTreeDTO; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.serviceusercenter.pojo.dtos.DepartmentDTO; import com.cm.serviceusercenter.pojo.dtos.department.DepartmentSimpleDTO; import org.springframework.stereotype.Repository; @@ -180,4 +181,13 @@ public interface IDepartmentDao { * @throws SearchException */ List listDepartmentResource(Map params) throws SearchException; + + /** + * 部门列表 + * + * @param params + * @return + * @throws SearchException + */ + List listSort(Map params) throws SearchException; } diff --git a/src/main/java/com/cm/serviceusercenter/service/system/department/IDepartmentService.java b/src/main/java/com/cm/serviceusercenter/service/system/department/IDepartmentService.java index d5f01fc..f169dab 100644 --- a/src/main/java/com/cm/serviceusercenter/service/system/department/IDepartmentService.java +++ b/src/main/java/com/cm/serviceusercenter/service/system/department/IDepartmentService.java @@ -8,6 +8,7 @@ import com.cm.common.exception.SearchException; import com.cm.common.exception.UpdateException; import com.cm.common.pojo.ListPage; import com.cm.common.pojo.dtos.ZTreeDTO; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; @@ -373,9 +374,18 @@ public interface IDepartmentService { /** * 部门列表 + * * @param params * @return * @throws SearchException */ List listDepartmentSimple(Map params) throws SearchException; + + /** + * 部门列表 + * + * @param params + * @return + */ + List listSort(Map params); } diff --git a/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java b/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java index 00b3f15..1623419 100644 --- a/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java +++ b/src/main/java/com/cm/serviceusercenter/service/system/department/impl/DepartmentServiceImpl.java @@ -13,6 +13,7 @@ import com.cm.common.plugin.service.file.IFileService; import com.cm.common.pojo.ListPage; import com.cm.common.pojo.bos.DepartmentBO; import com.cm.common.pojo.dtos.ZTreeDTO; +import com.cm.common.pojo.dtos.department.DepartmentSortDTO; import com.cm.common.result.SuccessResult; import com.cm.common.result.SuccessResultData; import com.cm.common.result.SuccessResultList; @@ -593,6 +594,11 @@ public class DepartmentServiceImpl extends BaseService implements IDepartmentSer return departmentDao.listDepartmentSimple(params); } + @Override + public List listSort(Map params) { + return departmentDao.listSort(params); + } + /** * 合并组织到指定组织 * diff --git a/src/main/resources/mybatis/mapper/system/department/department-mapper.xml b/src/main/resources/mybatis/mapper/system/department/department-mapper.xml index 9947341..ccf7f6a 100644 --- a/src/main/resources/mybatis/mapper/system/department/department-mapper.xml +++ b/src/main/resources/mybatis/mapper/system/department/department-mapper.xml @@ -142,6 +142,14 @@ + + + + + + + + INSERT INTO sys_department( @@ -991,4 +999,49 @@ + + + \ No newline at end of file diff --git a/src/main/resources/static/route/system/department/get.html b/src/main/resources/static/route/system/department/get.html index f4e20c2..953e81a 100644 --- a/src/main/resources/static/route/system/department/get.html +++ b/src/main/resources/static/route/system/department/get.html @@ -78,6 +78,7 @@ diff --git a/src/main/resources/static/route/system/department/list.html b/src/main/resources/static/route/system/department/list.html index f4fbb48..3f98157 100644 --- a/src/main/resources/static/route/system/department/list.html +++ b/src/main/resources/static/route/system/department/list.html @@ -104,6 +104,9 @@ case 2: value = '部门'; break; + case 3: + value = '委办局'; + break; default: value = '无'; } diff --git a/src/main/resources/static/route/system/department/save-merge.html b/src/main/resources/static/route/system/department/save-merge.html index 2e62e28..1496666 100644 --- a/src/main/resources/static/route/system/department/save-merge.html +++ b/src/main/resources/static/route/system/department/save-merge.html @@ -63,6 +63,7 @@ diff --git a/src/main/resources/static/route/system/department/save-split.html b/src/main/resources/static/route/system/department/save-split.html index 5969014..6c3da0d 100644 --- a/src/main/resources/static/route/system/department/save-split.html +++ b/src/main/resources/static/route/system/department/save-split.html @@ -69,6 +69,7 @@ diff --git a/src/main/resources/static/route/system/department/save.html b/src/main/resources/static/route/system/department/save.html index ca9a52a..0244230 100644 --- a/src/main/resources/static/route/system/department/save.html +++ b/src/main/resources/static/route/system/department/save.html @@ -15,7 +15,7 @@ -
+
@@ -78,6 +78,7 @@
diff --git a/src/main/resources/static/route/system/department/update-split.html b/src/main/resources/static/route/system/department/update-split.html index 496b551..aa0ea9c 100644 --- a/src/main/resources/static/route/system/department/update-split.html +++ b/src/main/resources/static/route/system/department/update-split.html @@ -69,6 +69,7 @@
diff --git a/src/main/resources/static/route/system/department/update.html b/src/main/resources/static/route/system/department/update.html index be8daf6..9978b03 100644 --- a/src/main/resources/static/route/system/department/update.html +++ b/src/main/resources/static/route/system/department/update.html @@ -15,7 +15,7 @@ -
+
@@ -78,6 +78,7 @@