package com.ruoyi.account.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.service.impl.AccountingServiceImpl; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** * @author :yys * @date : 2026/1/17 10:40 */ @Tag(name = "会计核算") @RestController @RequestMapping("/accounting") @AllArgsConstructor public class AccountingController extends BaseController { private AccountingServiceImpl accountingService; @Operation(summary = "总计") @GetMapping("/total") public AjaxResult total(@RequestParam Integer year) { return accountingService.total(year); } @Operation(summary = "设备类型分布") @GetMapping("/deviceTypeDistribution") public AjaxResult deviceTypeDistribution(@RequestParam Integer year) { return accountingService.deviceTypeDistribution(year); } @Operation(summary = "设备分页查询计算折旧") @GetMapping("/calculateDepreciation") public AjaxResult calculateDepreciation(Page page, @RequestParam Integer year) { return accountingService.calculateDepreciation(page,year); } }