|
|
@ -3,9 +3,11 @@ package com.epmet.controller; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
|
|
|
import com.epmet.dto.GovStaffRoleDTO; |
|
|
|
import com.epmet.dto.StaffRoleDTO; |
|
|
|
import com.epmet.dto.form.StaffRoleFormDTO; |
|
|
|
import com.epmet.entity.GovStaffRoleEntity; |
|
|
|
import com.epmet.service.GovStaffRoleService; |
|
|
|
import com.epmet.service.StaffRoleService; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
@ -30,6 +32,9 @@ public class StaffRoleController { |
|
|
|
@Autowired |
|
|
|
private GovStaffRoleService govStaffRoleService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private StaffRoleService staffRoleService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询工作人员具有的角色列表 |
|
|
|
* @return |
|
|
@ -55,12 +60,12 @@ public class StaffRoleController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("staffsinrole") |
|
|
|
public Result<List<GovStaffRoleDTO>> getStaffsInRole(@RequestBody StaffRoleFormDTO staffRoleFormDTO) { |
|
|
|
public Result<List<StaffRoleDTO>> getStaffsInRole(@RequestBody StaffRoleFormDTO staffRoleFormDTO) { |
|
|
|
ValidatorUtils.validateEntity(staffRoleFormDTO, StaffRoleFormDTO.GetStaffsInRole.class); |
|
|
|
String roleKey = staffRoleFormDTO.getRoleKey(); |
|
|
|
String orgId = staffRoleFormDTO.getOrgId(); |
|
|
|
List<GovStaffRoleDTO> roleDTOS = govStaffRoleService.listStaffsInRole(roleKey, orgId); |
|
|
|
return new Result<List<GovStaffRoleDTO>>().ok(roleDTOS); |
|
|
|
List<StaffRoleDTO> staffRoleDTOS = staffRoleService.listStaffsInRole(roleKey, orgId); |
|
|
|
return new Result<List<StaffRoleDTO>>().ok(staffRoleDTOS); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|