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.AccountPaymentApplicationDto; import com.ruoyi.account.bean.vo.purchase.AccountPaymentApplicationVo; import com.ruoyi.account.pojo.purchase.AccountPaymentApplication; import com.ruoyi.account.service.purchase.AccountPaymentApplicationService; 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 03:44:22 */ @RestController @RequestMapping("/accountPaymentApplication") @Tag(name = "财务管理--付款申请") @RequiredArgsConstructor public class AccountPaymentApplicationController { private final AccountPaymentApplicationService accountPaymentApplicationService; @GetMapping("/listPageAccountPaymentApplication") @Log(title = "付款申请台账", businessType = BusinessType.OTHER) @Operation(summary = "财务管理--付款申请台账") public R> listPageAccountPaymentApplication(Page page, AccountPaymentApplicationDto accountPaymentApplicationDto) { IPage listPage = accountPaymentApplicationService.listPageAccountPaymentApplication(page,accountPaymentApplicationDto); return R.ok(listPage); } @GetMapping("/getInboundBatchesBySupplier") @Log(title = "根据供应商查询入库单号(付款申请)", businessType = BusinessType.OTHER) @Operation(summary = "财务管理--根据供应商查询入库单号(付款申请)") public R getInboundBatchesBySupplier(Integer supplierId) { return R.ok(accountPaymentApplicationService.getInboundBatchesBySupplier(supplierId)); } @PostMapping("/addAccountPaymentApplication") @Log(title = "新增付款申请", businessType = BusinessType.INSERT) @Operation(summary = "财务管理--新增付款申请") public R addAccountPaymentApplication(@RequestBody AccountPaymentApplication accountPaymentApplication) { return R.ok(accountPaymentApplicationService.addAccountPaymentApplication(accountPaymentApplication)); } @PutMapping("/updateAccountPaymentApplication") @Log(title = "修改付款申请", businessType = BusinessType.UPDATE) @Operation(summary = "财务管理--修改付款申请") public R updateAccountPaymentApplication(@RequestBody AccountPaymentApplication accountPaymentApplication) { return R.ok(accountPaymentApplicationService.updateById(accountPaymentApplication)); } @PutMapping("/auditAccountPaymentApplication") @Log(title = "审核付款申请", businessType = BusinessType.UPDATE) @Operation(summary = "财务管理--审核付款申请") public R auditAccountPaymentApplication(@RequestBody AccountPaymentApplication accountPaymentApplication) { return R.ok(accountPaymentApplicationService.updateById(accountPaymentApplication)); } @DeleteMapping("/deleteAccountPaymentApplication") @Log(title = "删除付款申请", businessType = BusinessType.DELETE) @Operation(summary = "财务管理--删除付款申请") public R deleteAccountPaymentApplication(@RequestParam("ids") Long[] ids) { return R.ok(accountPaymentApplicationService.deleteAccountPaymentApplication(Arrays.asList(ids))); } @PostMapping("/exportAccountPaymentApplication") @Operation(summary = "导出付款申请文件") @Log(title = "导出付款申请文件", businessType = BusinessType.EXPORT) public void exportAccountPaymentApplication(HttpServletResponse response, AccountPaymentApplicationDto accountPaymentApplicationDto) { accountPaymentApplicationService.exportAccountPaymentApplication(response,accountPaymentApplicationDto); } }