liyong
5 天以前 9d66bfbfcda297f628e6a857e343f98422f4534a
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
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;
 
/**
 * <p>
 * 财务管理--付款单 前端控制器
 * </p>
 *
 * @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<IPage<AccountPurchasePaymentVo>> listPageAccountPurchasePayment(Page page, AccountPurchasePaymentDto accountPurchasePaymentDto) {
        IPage<AccountPurchasePaymentVo> 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);
    }
}