package com.ruoyi.account.controller.purchase; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.account.bean.dto.purchase.AccountPurchasePaymentDto; import com.ruoyi.account.bean.vo.purchase.AccountPurchasePaymentVo; import com.ruoyi.account.pojo.purchase.AccountPurchasePayment; import com.ruoyi.account.service.purchase.AccountPurchasePaymentService; 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; /** *

* 财务管理--付款单 前端控制器 *

* * @author 芯导软件(江苏)有限公司 * @since 2026-05-19 04:14:51 */ @RestController @RequestMapping("/accountPurchasePayment") @Tag(name = "财务管理--付款单") @RequiredArgsConstructor public class AccountPurchasePaymentController { private final AccountPurchasePaymentService accountPurchasePaymentService; @GetMapping("/listPageAccountPurchasePayment") @Log(title = "付款单台账", businessType = BusinessType.OTHER) @Operation(summary = "财务管理--付款单台账") public R> listPageAccountPurchasePayment(Page page, AccountPurchasePaymentDto accountPurchasePaymentDto) { IPage listPage = accountPurchasePaymentService.listPageAccountPurchasePayment(page,accountPurchasePaymentDto); return R.ok(listPage); } @PostMapping("/addAccountPurchasePayment") @Log(title = "新增付款单", businessType = BusinessType.INSERT) @Operation(summary = "财务管理--新增付款单") public R addAccountPurchasePayment(@RequestBody AccountPurchasePayment accountPurchasePayment) { return R.ok(accountPurchasePaymentService.addAccountPurchasePayment(accountPurchasePayment)); } @PutMapping("/updateAccountPurchasePayment") @Log(title = "编辑付款单", businessType = BusinessType.UPDATE) @Operation(summary = "财务管理--编辑付款单") public R updateAccountPurchasePayment(@RequestBody AccountPurchasePayment accountPurchasePayment) { return R.ok(accountPurchasePaymentService.updateById(accountPurchasePayment)); } @DeleteMapping("/deleteAccountPurchasePayment") @Log(title = "删除付款单", businessType = BusinessType.DELETE) @Operation(summary = "财务管理--删除付款单") public R deleteAccountPurchasePayment(@RequestParam("ids") Long[] ids) { return R.ok(accountPurchasePaymentService.deleteAccountPurchasePayment(Arrays.asList(ids))); } @PostMapping("/exportAccountPurchasePayment") @Operation(summary = "导出付款单文件") @Log(title = "导出付款单文件", businessType = BusinessType.EXPORT) public void exportAccountPurchasePayment(HttpServletResponse response, AccountPurchasePaymentDto accountPurchasePaymentDto) { accountPurchasePaymentService.exportAccountPurchasePayment(response,accountPurchasePaymentDto); } }