|
@@ -0,0 +1,71 @@
|
|
|
+package com.fjhx.account.controller.cost;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.fjhx.account.entity.cost.dto.CostControlDto;
|
|
|
+import com.fjhx.account.entity.cost.dto.CostControlSelectDto;
|
|
|
+import com.fjhx.account.entity.cost.vo.CostControlVo;
|
|
|
+import com.fjhx.account.service.cost.CostControlService;
|
|
|
+import com.ruoyi.common.core.domain.BaseSelectDto;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+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.RestController;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 费控 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2024-03-18
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/costControl")
|
|
|
+public class CostControlController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private CostControlService costControlService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 费控分页
|
|
|
+ */
|
|
|
+ @PostMapping("/page")
|
|
|
+ public Page<CostControlVo> page(@RequestBody CostControlSelectDto dto) {
|
|
|
+ return costControlService.getPage(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 费控明细
|
|
|
+ */
|
|
|
+ @PostMapping("/detail")
|
|
|
+ public CostControlVo detail(@RequestBody BaseSelectDto dto) {
|
|
|
+ return costControlService.detail(dto.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 费控新增
|
|
|
+ */
|
|
|
+ @PostMapping("/add")
|
|
|
+ public void add(@RequestBody CostControlDto costControlDto) {
|
|
|
+ costControlService.add(costControlDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 费控编辑
|
|
|
+ */
|
|
|
+ @PostMapping("/edit")
|
|
|
+ public void edit(@RequestBody CostControlDto costControlDto) {
|
|
|
+ costControlService.edit(costControlDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 费控删除
|
|
|
+ */
|
|
|
+ @PostMapping("/delete")
|
|
|
+ public void delete(@RequestBody BaseSelectDto dto) {
|
|
|
+ costControlService.delete(dto.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+}
|