package com.ruoyi.account.controller;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.account.bean.dto.StatementAccountDto;
|
import com.ruoyi.account.bean.vo.StatementAccountVo;
|
import com.ruoyi.account.service.AccountStatementService;
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
import com.ruoyi.framework.web.domain.R;
|
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import jakarta.servlet.http.HttpServletResponse;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.Arrays;
|
|
/**
|
* <p>
|
* 前端控制器
|
* </p>
|
*
|
* @author 芯导软件(江苏)有限公司
|
* @since 2026-05-19 09:42:47
|
*/
|
@RestController
|
@RequestMapping("/accountStatement")
|
@RequiredArgsConstructor
|
@Tag(name = "财务管理-对账单")
|
public class AccountStatementController {
|
|
private final AccountStatementService accountStatementService;
|
|
@GetMapping("/getAccountStatementDetailsByMonth")
|
@Log(title = "根据客户和月份查询对账单明细", businessType = BusinessType.OTHER)
|
@Operation(summary = "财务管理--根据客户和月份查询对账单明细")
|
public R getAccountStatementDetailsByMonth(StatementAccountDto statementAccountDto) {
|
return R.ok(accountStatementService.getAccountStatementDetailsByMonth(statementAccountDto));
|
}
|
|
@PostMapping("/addAccountStatement")
|
@Log(title = "新增对账单", businessType = BusinessType.INSERT)
|
@Operation(summary = "财务管理--新增对账单")
|
public R addAccountStatement(@RequestBody StatementAccountVo statementAccountVo) {
|
return R.ok(accountStatementService.addAccountStatement(statementAccountVo));
|
}
|
|
@DeleteMapping("/deleteAccountStatement")
|
@Log(title = "删除对账单", businessType = BusinessType.DELETE)
|
@Operation(summary = "财务管理--删除对账单")
|
public R deleteAccountStatement(@RequestParam("ids") Long[] ids) {
|
return R.ok(accountStatementService.deleteAccountStatement(Arrays.asList(ids)));
|
}
|
|
@GetMapping("/listPageAccountStatement")
|
@Log(title = "对账单台账", businessType = BusinessType.OTHER)
|
@Operation(summary = "财务管理--对账单台账")
|
public R<IPage<StatementAccountVo>> listPageAccountStatement(Page page, StatementAccountDto statementAccountDto) {
|
IPage<StatementAccountVo> listPage = accountStatementService.listPageAccountStatement(page,statementAccountDto);
|
return R.ok(listPage);
|
}
|
|
@PostMapping("/exportAccountStatement")
|
@Operation(summary = "导出对账单文件")
|
@Log(title = "导出对账单文件", businessType = BusinessType.EXPORT)
|
public void exportAccountStatement(HttpServletResponse response, StatementAccountDto statementAccountDto) {
|
accountStatementService.exportAccountStatement(response,statementAccountDto);
|
}
|
|
}
|