员工业绩目标固定查询角色为销售的所有员工
This commit is contained in:
parent
0dfcf47093
commit
de49d148b1
@ -161,7 +161,9 @@ public class CrmAchievementServiceImpl implements CrmAchievementService {
|
|||||||
AdminUserPageApiDTO userPageReqVO = new AdminUserPageApiDTO();
|
AdminUserPageApiDTO userPageReqVO = new AdminUserPageApiDTO();
|
||||||
userPageReqVO.setPageNo(pageReqVO.getPageNo());
|
userPageReqVO.setPageNo(pageReqVO.getPageNo());
|
||||||
userPageReqVO.setPageSize(pageReqVO.getPageSize());
|
userPageReqVO.setPageSize(pageReqVO.getPageSize());
|
||||||
PageResult<AdminUserApiVO> pageResult = adminUserApi.getUserPage(userPageReqVO).getCheckedData();
|
// -- 这里固定查询销售的
|
||||||
|
userPageReqVO.setRoleCode("sale");
|
||||||
|
PageResult<AdminUserApiVO> pageResult = adminUserApi.getUserBringDeptPage(userPageReqVO).getCheckedData();
|
||||||
PageResult<UserAchieveRespVO> pageResult1 = BeanUtils.toBean(pageResult, UserAchieveRespVO.class);
|
PageResult<UserAchieveRespVO> pageResult1 = BeanUtils.toBean(pageResult, UserAchieveRespVO.class);
|
||||||
List<Long> typeIds = new ArrayList<>();
|
List<Long> typeIds = new ArrayList<>();
|
||||||
for (UserAchieveRespVO vo : pageResult1.getList()) {
|
for (UserAchieveRespVO vo : pageResult1.getList()) {
|
||||||
|
@ -116,4 +116,8 @@ public interface AdminUserApi {
|
|||||||
@GetMapping(PREFIX + "/getUserListBySubordinateIds")
|
@GetMapping(PREFIX + "/getUserListBySubordinateIds")
|
||||||
@Operation(summary = "获取当前部门以及下级部门所有人员(负责人)")
|
@Operation(summary = "获取当前部门以及下级部门所有人员(负责人)")
|
||||||
CommonResult<List<Long>> getUserListBySubordinateIds(@RequestParam(name = "adminId") Long adminId);
|
CommonResult<List<Long>> getUserListBySubordinateIds(@RequestParam(name = "adminId") Long adminId);
|
||||||
|
|
||||||
|
@PostMapping(PREFIX + "/getUserBringDeptPage")
|
||||||
|
@Operation(summary = "获取用户分页列表通过条件")
|
||||||
|
CommonResult<PageResult<AdminUserApiVO>> getUserBringDeptPage(@RequestBody AdminUserPageApiDTO userPageReqVO);
|
||||||
}
|
}
|
||||||
|
@ -40,4 +40,7 @@ public class AdminUserPageApiDTO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "考勤组ids", example = "1024")
|
@Schema(description = "考勤组ids", example = "1024")
|
||||||
private List<Long> groupIds;
|
private List<Long> groupIds;
|
||||||
|
|
||||||
|
@Schema(description = "角色code", example = "1")
|
||||||
|
private String roleCode;
|
||||||
}
|
}
|
||||||
|
@ -145,4 +145,13 @@ public class AdminUserApiImpl implements AdminUserApi {
|
|||||||
return success(ids);
|
return success(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonResult<PageResult<AdminUserApiVO>> getUserBringDeptPage(AdminUserPageApiDTO dto) {
|
||||||
|
PageResult<AdminUserApiVO> vo = new PageResult<>();
|
||||||
|
UserPageReqVO userPageReqVO = BeanUtil.copyProperties(dto, UserPageReqVO.class);
|
||||||
|
PageResult<AdminUserDO> pageResult = userService.getUserBringDeptPage(userPageReqVO);
|
||||||
|
BeanUtil.copyProperties(pageResult, vo);
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,4 +45,7 @@ public class UserPageReqVO extends PageParam {
|
|||||||
@Schema(description = "考勤组ids", example = "1024")
|
@Schema(description = "考勤组ids", example = "1024")
|
||||||
private List<Long> groupIds;
|
private List<Long> groupIds;
|
||||||
|
|
||||||
|
@Schema(description = "角色编码", example = "1024")
|
||||||
|
private String roleCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,10 @@
|
|||||||
<if test="vo.groupIds != null and vo.groupIds.size() > 0">
|
<if test="vo.groupIds != null and vo.groupIds.size() > 0">
|
||||||
left join kq_attendance_group_user c on a.id = c.user_id
|
left join kq_attendance_group_user c on a.id = c.user_id
|
||||||
</if>
|
</if>
|
||||||
|
<if test="vo.roleCode != null and vo.roleCode != ''">
|
||||||
|
left join system_user_role as d on a.id = d.user_id AND d.deleted = 0
|
||||||
|
left join system_role as e on d.role_id = e.id AND e.deleted = 0
|
||||||
|
</if>
|
||||||
<where>
|
<where>
|
||||||
a.deleted = 0
|
a.deleted = 0
|
||||||
and a.user_type = 1
|
and a.user_type = 1
|
||||||
@ -166,6 +170,9 @@
|
|||||||
#{groupId}
|
#{groupId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="vo.roleCode != null and vo.roleCode != ''">
|
||||||
|
and e.code = #{vo.roleCode}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectListByCondition"
|
<select id="selectListByCondition"
|
||||||
@ -201,4 +208,6 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user