|
@@ -12,8 +12,8 @@ import org.fouram.dto.input.SapReportAuthDTO.SapReportAuthSaveDTO;
|
|
|
import org.fouram.dto.input.SapReportAuthDTO.SapReportAuthSelectListDTO;
|
|
|
import org.fouram.entity.SapReportAuth;
|
|
|
import org.fouram.service.SapCheckReportService;
|
|
|
-import org.fouram.service.SapOrgService;
|
|
|
import org.fouram.service.SapReportAuthService;
|
|
|
+import org.fouram.service.WxDepartService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -32,16 +32,16 @@ import io.swagger.annotations.Api;
|
|
|
public class SapReportController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
- private SapOrgService sapOrgService;
|
|
|
- @Autowired
|
|
|
private SapReportAuthService service;
|
|
|
@Autowired
|
|
|
+ private WxDepartService wxDepartService;
|
|
|
+ @Autowired
|
|
|
private SapCheckReportService reportService;
|
|
|
|
|
|
- @PostMapping(value = "/selectFirstOrgList", produces = "application/json;charset=utf-8")
|
|
|
+ @PostMapping(value = "/selectFirstDepartList", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object selectFirstOrgList() throws Exception {
|
|
|
- return ResultUtil.success(sapOrgService.selectFirstOrgList(), null);
|
|
|
+ public Object selectFirstDepartList() throws Exception {
|
|
|
+ return ResultUtil.success(wxDepartService.selectFirstDepartList(), null);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/saveReportAuth", produces = "application/json;charset=utf-8")
|
|
@@ -49,7 +49,7 @@ public class SapReportController extends BaseController {
|
|
|
public Object saveReportAuth(@RequestBody SapReportAuthSaveDTO dto, @RequestHeader("userId") String userId)
|
|
|
throws Exception {
|
|
|
ParamUtil.isBlank(userId, "header参数userId不可以为空");
|
|
|
- ParamUtil.isBlank(dto.getSapOrgIds(), "参数sapOrgIds不可以为空");
|
|
|
+ ParamUtil.isBlank(dto.getWxDepartIds(), "参数wxDepartIds不可以为空");
|
|
|
dto.setWxUserId(userId);
|
|
|
service.save(dto);
|
|
|
return ResultUtil.success();
|
|
@@ -58,7 +58,7 @@ public class SapReportController extends BaseController {
|
|
|
@PostMapping(value = "/selectReportAuthList", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
public Object selectReportAuthList(@RequestBody SapReportAuthSelectListDTO dto) throws Exception {
|
|
|
- return ResultUtil.success(service.selectList(dto), "保存成功");
|
|
|
+ return ResultUtil.success(service.selectList(dto), null);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/deleteReportAuth", produces = "application/json;charset=utf-8")
|
|
@@ -78,9 +78,9 @@ public class SapReportController extends BaseController {
|
|
|
ParamUtil.isNull(dto.getPageNumber(), "参数pageNumber不可以为空");
|
|
|
if(StringUtils.isBlank(dto.getDepartId())) {
|
|
|
List<SapReportAuth> auths = service.selectListByWxUserId(userId);
|
|
|
- List<String> departIds = Lists.newArrayList();
|
|
|
+ List<Long> departIds = Lists.newArrayList();
|
|
|
for(SapReportAuth auth : auths) {
|
|
|
- departIds.add(auth.getSapOrgId());
|
|
|
+ departIds.add(auth.getWxDepartId());
|
|
|
}
|
|
|
dto.setDepartIds(departIds);
|
|
|
}
|