zss
6 天以前 0611c6769abdb9136ed7371a42efc37cecef9e2a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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;
 
/**
 * <p>
 * 财务管理--付款申请 前端控制器
 * </p>
 *
 * @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<IPage<AccountPaymentApplicationVo>> listPageAccountPaymentApplication(Page page, AccountPaymentApplicationDto accountPaymentApplicationDto) {
        IPage<AccountPaymentApplicationVo> 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);
    }
 
}