|
@@ -323,8 +323,7 @@ public class ApiController extends BaseController {
|
|
|
|
|
|
@PostMapping(value = "/exportUserReportExcel")
|
|
|
@ResponseBody
|
|
|
- public Object exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto,
|
|
|
- @RequestHeader("userId") String userId) throws Exception {
|
|
|
+ public Object exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto) throws Exception {
|
|
|
if (StringUtils.isBlank(dto.getStartDate())) {
|
|
|
return ResultUtil.error("开始日期不可以为空");
|
|
|
}
|
|
@@ -334,8 +333,8 @@ public class ApiController extends BaseController {
|
|
|
// 清空分页查询
|
|
|
dto.setPageNumber(null);
|
|
|
dto.setPageSize(null);
|
|
|
- if (StringUtils.isBlank(dto.getDepartId())) {
|
|
|
- List<SapReportAuth> auths = authService.selectListByWxUserId(userId);
|
|
|
+ if (StringUtils.isBlank(dto.getDepartId()) && StringUtils.isNotBlank(dto.getLoginWxUserId())) {
|
|
|
+ List<SapReportAuth> auths = authService.selectListByWxUserId(dto.getLoginWxUserId());
|
|
|
List<Long> departIds = Lists.newArrayList();
|
|
|
for (SapReportAuth auth : auths) {
|
|
|
departIds.add(auth.getWxDepartId());
|