|
@@ -46,11 +46,9 @@ public class SapReportController extends BaseController {
|
|
|
|
|
|
@PostMapping(value = "/saveReportAuth", produces = "application/json;charset=utf-8")
|
|
@PostMapping(value = "/saveReportAuth", produces = "application/json;charset=utf-8")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- public Object saveReportAuth(@RequestBody SapReportAuthSaveDTO dto, @RequestHeader("userId") String userId)
|
|
|
|
- throws Exception {
|
|
|
|
- ParamUtil.isBlank(userId, "header参数userId不可以为空");
|
|
|
|
|
|
+ public Object saveReportAuth(@RequestBody SapReportAuthSaveDTO dto) throws Exception {
|
|
|
|
+ ParamUtil.isBlank(dto.getWxUserId(), "参数wxUserId不可以为空");
|
|
ParamUtil.isBlank(dto.getWxDepartIds(), "参数wxDepartIds不可以为空");
|
|
ParamUtil.isBlank(dto.getWxDepartIds(), "参数wxDepartIds不可以为空");
|
|
- dto.setWxUserId(userId);
|
|
|
|
service.save(dto);
|
|
service.save(dto);
|
|
return ResultUtil.success();
|
|
return ResultUtil.success();
|
|
}
|
|
}
|
|
@@ -76,10 +74,10 @@ public class SapReportController extends BaseController {
|
|
ParamUtil.isBlank(userId, "header参数userId不可以为空");
|
|
ParamUtil.isBlank(userId, "header参数userId不可以为空");
|
|
ParamUtil.isNull(dto.getPageSize(), "参数pageSize不可以为空");
|
|
ParamUtil.isNull(dto.getPageSize(), "参数pageSize不可以为空");
|
|
ParamUtil.isNull(dto.getPageNumber(), "参数pageNumber不可以为空");
|
|
ParamUtil.isNull(dto.getPageNumber(), "参数pageNumber不可以为空");
|
|
- if(StringUtils.isBlank(dto.getDepartId())) {
|
|
|
|
|
|
+ if (StringUtils.isBlank(dto.getDepartId())) {
|
|
List<SapReportAuth> auths = service.selectListByWxUserId(userId);
|
|
List<SapReportAuth> auths = service.selectListByWxUserId(userId);
|
|
List<Long> departIds = Lists.newArrayList();
|
|
List<Long> departIds = Lists.newArrayList();
|
|
- for(SapReportAuth auth : auths) {
|
|
|
|
|
|
+ for (SapReportAuth auth : auths) {
|
|
departIds.add(auth.getWxDepartId());
|
|
departIds.add(auth.getWxDepartId());
|
|
}
|
|
}
|
|
dto.setDepartIds(departIds);
|
|
dto.setDepartIds(departIds);
|