|
@@ -0,0 +1,68 @@
|
|
|
+package org.springblade.control.controller;
|
|
|
+
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import org.springblade.control.dto.ControlProjectInfoDTO;
|
|
|
+import org.springblade.control.entity.ProjectReimbursement;
|
|
|
+import org.springblade.control.service.IProjectReimbursementService;
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Param
|
|
|
+ * @Author wangwl
|
|
|
+ * @Date 2023/5/15 14:00
|
|
|
+ **/
|
|
|
+@RestController
|
|
|
+@AllArgsConstructor
|
|
|
+@RequestMapping("/projectReimbursement")
|
|
|
+@Api(value = "项目报销接口", tags = "项目报销接口")
|
|
|
+public class ProjectReimbursementController {
|
|
|
+
|
|
|
+ private final IProjectReimbursementService reimbursementService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增报销
|
|
|
+ */
|
|
|
+ @PostMapping("/addReimbursement")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "新增报销")
|
|
|
+ public R addReimbursement(@RequestBody ProjectReimbursement projectReimbursement){
|
|
|
+ reimbursementService.addReimbursement(projectReimbursement);
|
|
|
+ return R.success("新增成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改报销
|
|
|
+ */
|
|
|
+ @PostMapping("/updateReimbursement")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "修改报销")
|
|
|
+ public R updateReimbursement(@RequestBody ProjectReimbursement projectReimbursement){
|
|
|
+ reimbursementService.updateReimbursement(projectReimbursement);
|
|
|
+ return R.success("修改成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除报销
|
|
|
+ */
|
|
|
+ @GetMapping("removeReimbursement")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "删除项目")
|
|
|
+ public R removeReimbursement(Long id){
|
|
|
+ reimbursementService.removeReimbursement(id);
|
|
|
+ return R.success("删除成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据id获取报销信息
|
|
|
+ */
|
|
|
+ @GetMapping("/getReimbursementById")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "根据id获取报销信息")
|
|
|
+ public R getReimbursementById(Long id){
|
|
|
+ return R.data(reimbursementService.getReimbursementById(id));
|
|
|
+ }
|
|
|
+}
|