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 = "回填扣款金额", notes = "回填扣款金额")
|
@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);
|
// }
|
|
|
}
|