|
@@ -73,7 +73,6 @@ public class RoleAuthInfoController {
|
|
|
@ApiImplicitParam(name = "searchDTO", value = "角色视图 人员列表 查询条件 orgId eq 必填, roleId eq 必填")
|
|
|
@PostMapping(value = "/roleStaffList/_search")
|
|
|
public Result<List<AuthUserDTO>> roleStaffList(SearchDTO searchDTO) {
|
|
|
- //只查询民警和辅警
|
|
|
//职位状态只查询在职、挂职、借调
|
|
|
Searchable searchable = getUserQuerySearchable(searchDTO);
|
|
|
Page<AuthUserDTO> page = authUserInfoFacade.roleAuthRoleViewPage(searchable.toSearchDTO());
|
|
@@ -88,8 +87,6 @@ public class RoleAuthInfoController {
|
|
|
|
|
|
private Searchable getUserQuerySearchable(SearchDTO searchDTO) {
|
|
|
Searchable searchable = Searchable.toSearchable(searchDTO);
|
|
|
- String[] userTypes = new String[]{UserTypeEnum.POLICE.getValue(), UserTypeEnum.HELPER.getValue()};
|
|
|
- searchable.addSearchFilter("userType", SearchOperator.in, userTypes);
|
|
|
searchable.addSearchFilter("id", SearchOperator.ne, authUserInfoFacade.getRootUserId());
|
|
|
String[] jobTypes = new String[]{JobTypeEnum.ZZ.getValue(), JobTypeEnum.GZ.getValue(), JobTypeEnum.JD.getValue()};
|
|
|
searchable.addSearchFilter("relStatus", SearchOperator.in, jobTypes);
|
|
@@ -149,7 +146,6 @@ public class RoleAuthInfoController {
|
|
|
if (null == manageInfo) {
|
|
|
return Result.success(0L,null);
|
|
|
}
|
|
|
- //只查询民警和辅警
|
|
|
//职位状态只查询在职、挂职、借调
|
|
|
Searchable searchable = getUserQuerySearchable(searchDTO);
|
|
|
Page<AuthUserDTO> page = authUserInfoFacade.roleAuthUserViewPage(searchable.toSearchDTO());
|
|
@@ -209,11 +205,14 @@ public class RoleAuthInfoController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "roleName", value = "角色名称"),
|
|
|
@ApiImplicitParam(name = "userId", value = "用户id",required = true),
|
|
|
- @ApiImplicitParam(name = "appName", value = "应用名称")
|
|
|
+ @ApiImplicitParam(name = "appName", value = "应用名称"),
|
|
|
+ @ApiImplicitParam(name = "orgId", value = "机构id",required = true)
|
|
|
})
|
|
|
@GetMapping(value = "/staffRoleList")
|
|
|
- public Result<List<RoleInfoVO>> staffRoleList(@RequestParam(value = "roleName",required = false) String roleName,@RequestParam("userId") String userId,
|
|
|
- @RequestParam(value = "appName",required = false) String appName) {
|
|
|
+ public Result<List<RoleInfoVO>> staffRoleList(@RequestParam(value = "roleName",required = false) String roleName,
|
|
|
+ @RequestParam("userId") String userId,
|
|
|
+ @RequestParam(value = "appName",required = false) String appName,
|
|
|
+ @RequestParam(value = "orgId",required = false) String orgId) {
|
|
|
if (StringUtils.isBlank(userId)) {
|
|
|
return Result.success(new ArrayList<RoleInfoVO>());
|
|
|
}
|
|
@@ -225,6 +224,7 @@ public class RoleAuthInfoController {
|
|
|
if (StringUtils.isNotEmpty(appName)) {
|
|
|
roleSearchable.addSearchFilter("appName",SearchOperator.like,appName);
|
|
|
}
|
|
|
+ roleSearchable.addSearchFilter("orgId", SearchOperator.eq, orgId);
|
|
|
//TODO
|
|
|
//DTO待设计
|
|
|
List<RoleInfoVO> roleInfoVOList = roleInfoFacade.staffRoleList(roleSearchable.toSearchDTO());
|
|
@@ -309,9 +309,10 @@ public class RoleAuthInfoController {
|
|
|
@PostMapping (value = "/staff")
|
|
|
public Result saveStaff(@RequestBody StaffOperateVo staffOperateVo) {
|
|
|
String userId = staffOperateVo.getUserId();
|
|
|
+ String orgId = staffOperateVo.getOrgId();
|
|
|
String saveIds = JSON.toJSONString(staffOperateVo.getSaveIds());
|
|
|
String deleteIds = JSON.toJSONString(staffOperateVo.getDeleteIds());
|
|
|
- StaffAssignDTO staffAssignDTO=new StaffAssignDTO(userId, saveIds, deleteIds);
|
|
|
+ StaffAssignDTO staffAssignDTO=new StaffAssignDTO(userId, orgId, saveIds, deleteIds);
|
|
|
ResponseStatus responseStatus = staffAssignAuthInfoFacade.saveStaff(staffAssignDTO);
|
|
|
Result result = new Result(responseStatus.getStatusCode(),responseStatus.getMessage(),null,null);
|
|
|
return result;
|