|
@@ -0,0 +1,54 @@
|
|
|
+package org.fouram.controller;
|
|
|
+
|
|
|
+import org.fouram.core.base.controller.BaseController;
|
|
|
+import org.fouram.core.util.ResultUtil;
|
|
|
+import org.fouram.dto.input.SapReportAuthDTO.SapReportAuthDeleteDTO;
|
|
|
+import org.fouram.dto.input.SapReportAuthDTO.SapReportAuthSaveDTO;
|
|
|
+import org.fouram.dto.input.SapReportAuthDTO.SapReportAuthSelectListDTO;
|
|
|
+import org.fouram.service.SapOrgService;
|
|
|
+import org.fouram.service.SapReportAuthService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+
|
|
|
+@Controller
|
|
|
+@Api(value = "sap打卡接口")
|
|
|
+@RequestMapping(value = "/sapReport")
|
|
|
+public class SapReportAuthController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SapOrgService sapOrgService;
|
|
|
+ @Autowired
|
|
|
+ private SapReportAuthService service;
|
|
|
+
|
|
|
+ @PostMapping(value = "/selectFirstOrgList", produces = "application/json;charset=utf-8")
|
|
|
+ @ResponseBody
|
|
|
+ public Object selectFirstOrgList() throws Exception {
|
|
|
+ return ResultUtil.success(sapOrgService.selectFirstOrgList(), null);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(value = "/saveReportAuth", produces = "application/json;charset=utf-8")
|
|
|
+ @ResponseBody
|
|
|
+ public Object saveReportAuth(@RequestBody SapReportAuthSaveDTO dto) throws Exception {
|
|
|
+ service.save(dto);
|
|
|
+ return ResultUtil.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(value = "/selectReportAuthList", produces = "application/json;charset=utf-8")
|
|
|
+ @ResponseBody
|
|
|
+ public Object selectReportAuthList(@RequestBody SapReportAuthSelectListDTO dto) throws Exception {
|
|
|
+ return ResultUtil.success(service.selectList(dto), "保存成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping(value = "/deleteReportAuth", produces = "application/json;charset=utf-8")
|
|
|
+ @ResponseBody
|
|
|
+ public Object deleteReportAuth(@RequestBody SapReportAuthDeleteDTO dto) throws Exception {
|
|
|
+ service.deleteById(dto.getId());
|
|
|
+ return ResultUtil.success();
|
|
|
+ }
|
|
|
+}
|