From 7a7dbbd34179b79caf3b74dedf2d5b84f30d0c05 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 26 四月 2024 11:13:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 95 insertions(+), 0 deletions(-) diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java b/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java new file mode 100644 index 0000000..14c68e7 --- /dev/null +++ b/ycl-server/src/main/java/com/ycl/platform/controller/CalculateReportController.java @@ -0,0 +1,95 @@ +package com.ycl.platform.controller; + +import com.ycl.platform.domain.form.CalculateReportBackfillForm; +import com.ycl.system.domain.group.Update; +import com.ycl.system.domain.group.Add; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import lombok.RequiredArgsConstructor; +import java.util.List; +import org.springframework.validation.annotation.Validated; +import jakarta.validation.constraints.NotEmpty; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.ycl.platform.service.CalculateReportService; +import com.ycl.system.Result; +import com.ycl.platform.domain.form.CalculateReportForm; +import com.ycl.platform.domain.query.CalculateReportQuery; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +/** + * 鏍哥畻鎶ュ憡 鍓嶇鎺у埗鍣� + * + * @author xp + * @since 2024-04-23 + */ +@Validated +@RequiredArgsConstructor +@Api(value = "鏍哥畻鎶ュ憡", tags = "鏍哥畻鎶ュ憡绠$悊") +@RestController +@RequestMapping("/calculate-report") +public class CalculateReportController { + + private final CalculateReportService calculateReportService; + +// @PostMapping +// @ApiOperation(value = "娣诲姞", notes = "娣诲姞") +// public Result add(@RequestBody @Validated(Add.class) CalculateReportForm form) { +// return calculateReportService.add(form); +// } + +// @PutMapping +// @ApiOperation(value = "淇敼", notes = "淇敼") +// public Result update(@RequestBody @Validated(Update.class) CalculateReportForm form) { +// return calculateReportService.update(form); +// } + + @PutMapping + @ApiOperation(value = "淇敼閲戦", notes = "淇敼閲戦") + @PreAuthorize("@ss.hasPermi('system:calculate:report:edit:money')") + public Result adjustMoney(@RequestBody @Validated(Update.class) CalculateReportForm form) { + return calculateReportService.update(form); + } + + @GetMapping("/page") + @ApiOperation(value = "鍒嗛〉", notes = "鍒嗛〉") + @PreAuthorize("@ss.hasPermi('system:calculate:report:page')") + public Result page(CalculateReportQuery query) { + return calculateReportService.page(query); + } + + @GetMapping("/backfill/money") + @ApiOperation(value = "鍥炲~鎵f閲戦", notes = "鍥炲~鎵f閲戦") + @PreAuthorize("@ss.hasPermi('system:calculate:report:backfill')") + public Result backfill(@Validated @RequestBody CalculateReportBackfillForm form) { + return calculateReportService.backfill(form); + } + + @GetMapping("/{id}") + @ApiOperation(value = "璇︽儏", notes = "璇︽儏") + @PreAuthorize("@ss.hasPermi('system:calculate:report:detail')") + public Result detail(@PathVariable("id") String id) { + return calculateReportService.detail(id); + } + +// @GetMapping("/list") +// @ApiOperation(value = "鍒楄〃", notes = "鍒楄〃") +// public Result list() { +// return calculateReportService.all(); +// } + +// @DeleteMapping("/{id}") +// @ApiOperation(value = "ID鍒犻櫎", notes = "ID鍒犻櫎") +// public Result removeById(@PathVariable("id") String id) { +// return calculateReportService.removeById(id); +// } +// +// @DeleteMapping("/batch") +// @ApiOperation(value = "鎵归噺鍒犻櫎", notes = "鎵归噺鍒犻櫎") +// public Result remove(@RequestBody @NotEmpty(message = "璇烽�夋嫨鏁版嵁") List<String> ids) { +// return calculateReportService.remove(ids); +// } + + +} -- Gitblit v1.8.0