mirror of https://gitee.com/stylefeng/roses
【8.0】【权限】更新组织机构界面
parent
5b7a119302
commit
7381e31579
|
@ -58,5 +58,25 @@ public interface PermissionCodeConstants {
|
|||
*/
|
||||
String DELETE_POSITION = "DELETE_POSITION";
|
||||
|
||||
/**
|
||||
* 组织机构界面-新增机构
|
||||
*/
|
||||
String ADD_ORG = "ADD_ORG";
|
||||
|
||||
/**
|
||||
* 组织机构界面-修改机构
|
||||
*/
|
||||
String EDIT_ORG = "EDIT_ORG";
|
||||
|
||||
/**
|
||||
* 组织机构界面-删除机构
|
||||
*/
|
||||
String DELETE_ORG = "DELETE_ORG";
|
||||
|
||||
/**
|
||||
* 组织机构界面-设置审批人
|
||||
*/
|
||||
String ASSIGN_APPROVER = "ASSIGN_APPROVER";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
|||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.PermissionCodeConstants;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrgApprover;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrgApproverRequest;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrgApproverService;
|
||||
|
@ -35,7 +36,8 @@ public class HrOrgApproverController {
|
|||
* @author fengshuonan
|
||||
* @since 2022/9/26 10:44
|
||||
*/
|
||||
@GetResource(name = "获取组织机构审批人类型列表", path = "/hrOrgApprover/getApproverTypeList")
|
||||
@GetResource(name = "获取组织机构审批人类型列表", path = "/hrOrgApprover/getApproverTypeList", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.ASSIGN_APPROVER)
|
||||
public ResponseData<List<SimpleDict>> getApproverTypeList() {
|
||||
return new SuccessResponseData<>(hrOrgApproverService.getApproverTypeList());
|
||||
}
|
||||
|
@ -46,8 +48,10 @@ public class HrOrgApproverController {
|
|||
* @author fengshuonan
|
||||
* @since 2022/09/13 23:15
|
||||
*/
|
||||
@GetResource(name = "获取组织机构审批人绑定列表", path = "/hrOrgApprover/getBindingList")
|
||||
public ResponseData<List<HrOrgApprover>> getOrgApproverList(@Validated(HrOrgApproverRequest.list.class) HrOrgApproverRequest hrOrgApproverRequest) {
|
||||
@GetResource(name = "获取组织机构审批人绑定列表", path = "/hrOrgApprover/getBindingList", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.ASSIGN_APPROVER)
|
||||
public ResponseData<List<HrOrgApprover>> getOrgApproverList(
|
||||
@Validated(HrOrgApproverRequest.list.class) HrOrgApproverRequest hrOrgApproverRequest) {
|
||||
return new SuccessResponseData<>(hrOrgApproverService.getOrgApproverList(hrOrgApproverRequest));
|
||||
}
|
||||
|
||||
|
@ -57,8 +61,10 @@ public class HrOrgApproverController {
|
|||
* @author fengshuonan
|
||||
* @since 2022/09/13 23:15
|
||||
*/
|
||||
@PostResource(name = "更新组织机构绑定审批人", path = "/hrOrgApprover/bindUserList")
|
||||
public ResponseData<HrOrgApprover> bindUserList(@RequestBody @Validated(HrOrgApproverRequest.add.class) HrOrgApproverRequest hrOrgApproverRequest) {
|
||||
@PostResource(name = "更新组织机构绑定审批人", path = "/hrOrgApprover/bindUserList", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.ASSIGN_APPROVER)
|
||||
public ResponseData<HrOrgApprover> bindUserList(
|
||||
@RequestBody @Validated(HrOrgApproverRequest.add.class) HrOrgApproverRequest hrOrgApproverRequest) {
|
||||
hrOrgApproverService.bindUserList(hrOrgApproverRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
@ -69,7 +75,8 @@ public class HrOrgApproverController {
|
|||
* @author fengshuonan
|
||||
* @since 2022/09/13 23:15
|
||||
*/
|
||||
@PostResource(name = "删除审批人的绑定", path = "/hrOrgApprover/delete")
|
||||
@PostResource(name = "删除审批人的绑定", path = "/hrOrgApprover/delete", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.ASSIGN_APPROVER)
|
||||
public ResponseData<?> delete(@RequestBody @Validated(HrOrgApproverRequest.delete.class) HrOrgApproverRequest hrOrgApproverRequest) {
|
||||
hrOrgApproverService.del(hrOrgApproverRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
|
|
@ -7,6 +7,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
|||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.PermissionCodeConstants;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.entity.HrOrganization;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.pojo.request.HrOrganizationRequest;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.org.service.HrOrganizationService;
|
||||
|
@ -35,8 +36,10 @@ public class HrOrganizationController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:23
|
||||
*/
|
||||
@PostResource(name = "添加组织机构", path = "/hrOrganization/add")
|
||||
public ResponseData<HrOrganization> add(@RequestBody @Validated(HrOrganizationRequest.add.class) HrOrganizationRequest hrOrganizationRequest) {
|
||||
@PostResource(name = "添加组织机构", path = "/hrOrganization/add", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.ADD_ORG)
|
||||
public ResponseData<HrOrganization> add(
|
||||
@RequestBody @Validated(HrOrganizationRequest.add.class) HrOrganizationRequest hrOrganizationRequest) {
|
||||
hrOrganizationService.add(hrOrganizationRequest);
|
||||
return new SuccessResponseData<>();
|
||||
}
|
||||
|
@ -47,7 +50,8 @@ public class HrOrganizationController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:23
|
||||
*/
|
||||
@PostResource(name = "删除组织机构", path = "/hrOrganization/delete")
|
||||
@PostResource(name = "删除组织机构", path = "/hrOrganization/delete", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.DELETE_ORG)
|
||||
public ResponseData<?> delete(@RequestBody @Validated(HrOrganizationRequest.delete.class) HrOrganizationRequest hrOrganizationRequest) {
|
||||
hrOrganizationService.del(hrOrganizationRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
@ -59,7 +63,8 @@ public class HrOrganizationController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:23
|
||||
*/
|
||||
@PostResource(name = "批量删除组织机构", path = "/hrOrganization/batchDelete")
|
||||
@PostResource(name = "批量删除组织机构", path = "/hrOrganization/batchDelete", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.DELETE_ORG)
|
||||
public ResponseData<?> batchDelete(@RequestBody @Validated(BaseRequest.batchDelete.class) HrOrganizationRequest hrOrganizationRequest) {
|
||||
hrOrganizationService.batchDelete(hrOrganizationRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
@ -71,7 +76,8 @@ public class HrOrganizationController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:23
|
||||
*/
|
||||
@PostResource(name = "编辑组织机构", path = "/hrOrganization/edit")
|
||||
@PostResource(name = "编辑组织机构", path = "/hrOrganization/edit", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.EDIT_ORG)
|
||||
public ResponseData<?> edit(@RequestBody @Validated(HrOrganizationRequest.edit.class) HrOrganizationRequest hrOrganizationRequest) {
|
||||
hrOrganizationService.edit(hrOrganizationRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
|
Loading…
Reference in New Issue