zss
6 天以前 0611c6769abdb9136ed7371a42efc37cecef9e2a
src/main/java/com/ruoyi/account/controller/AccountingController.java
@@ -1,12 +1,16 @@
package com.ruoyi.account.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.account.service.impl.AccountingServiceImpl;
import com.ruoyi.account.bean.dto.AccountReportDto;
import com.ruoyi.account.service.AccountingService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.framework.web.domain.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -16,31 +20,41 @@
 * @author :yys
 * @date : 2026/1/17 10:40
 */
@Api(tags = "会计核算")
@Tag(name = "会计核算")
@RestController
@RequestMapping("/accounting")
@RequiredArgsConstructor
public class AccountingController extends BaseController {
    @Autowired
    private AccountingServiceImpl accountingService;
    private final AccountingService accountingService;
    @ApiOperation("总计")
    @Operation(summary = "总计")
    @GetMapping("/total")
    public AjaxResult total(@RequestParam Integer year) {
        return accountingService.total(year);
    }
    @ApiOperation("设备类型分布")
    @Operation(summary = "设备类型分布")
    @GetMapping("/deviceTypeDistribution")
    public AjaxResult deviceTypeDistribution(@RequestParam Integer year) {
        return accountingService.deviceTypeDistribution(year);
    }
    @ApiOperation("设备分页查询计算折旧")
    @Operation(summary = "设备分页查询计算折旧")
    @GetMapping("/calculateDepreciation")
    public AjaxResult calculateDepreciation(Page page, @RequestParam Integer year) {
        return accountingService.calculateDepreciation(page,year);
    }
    /*****************************************财务报表******************************************************************************/
    @GetMapping("/accountStatementDetailsByMonth")
    @Log(title = "财务报表", businessType = BusinessType.OTHER)
    @Operation(summary = "财务报表")
    public R getAccountStatementDetailsByMonth(AccountReportDto accountReportDto) {
        return R.ok(accountingService.getAccountStatementDetailsByMonth(accountReportDto));
    }
}