8 小时以前 620bb4712a31791231c4381581f0f60088f079fe
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
package com.ruoyi.account.controller.sales;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.account.bean.dto.sales.AccountSalesCollectionDto;
import com.ruoyi.account.bean.vo.sales.AccountSalesCollectionVo;
import com.ruoyi.account.pojo.sales.AccountSalesCollection;
import com.ruoyi.account.service.sales.AccountSalesCollectionService;
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-18 03:49:56
 */
@RestController
@RequestMapping("/accountSalesCollection")
@Tag(name = "财务管理--收款单")
@RequiredArgsConstructor
public class AccountSalesCollectionController {
 
    private final AccountSalesCollectionService accountSalesCollectionService;
 
    @GetMapping("/listPageAccountSalesCollection")
    @Log(title = "收款单台账", businessType = BusinessType.OTHER)
    @Operation(summary = "财务管理--收款单台账")
    public R<IPage<AccountSalesCollectionVo>> listPageAccountSalesCollection(Page page, AccountSalesCollectionDto accountSalesCollectionDto) {
        IPage<AccountSalesCollectionVo> listPage = accountSalesCollectionService.listPageAccountSalesCollection(page,accountSalesCollectionDto);
        return R.ok(listPage);
    }
 
    @GetMapping("/getOutboundBatchesByCustomer")
    @Log(title = "根据客户查询出库单号(收款单)", businessType = BusinessType.OTHER)
    @Operation(summary = "财务管理--根据客户查询出库单号(收款单)")
    public R getOutboundBatchesByCustomer(Integer customerId) {
        return R.ok(accountSalesCollectionService.getOutboundBatchesByCustomer(customerId));
    }
 
    @PostMapping("/addAccountSalesCollection")
    @Log(title = "新增收款单", businessType = BusinessType.INSERT)
    @Operation(summary = "财务管理--新增收款单")
    public R addAccountSalesCollection(@RequestBody AccountSalesCollection accountSalesCollection) {
        return R.ok(accountSalesCollectionService.addAccountSalesCollection(accountSalesCollection));
    }
 
    @PutMapping("/updateAccountSalesCollection")
    @Log(title = "编辑收款单", businessType = BusinessType.UPDATE)
    @Operation(summary = "财务管理--编辑收款单")
    public R updateAccountSalesCollection(@RequestBody AccountSalesCollection accountSalesCollection) {
        return R.ok(accountSalesCollectionService.updateById(accountSalesCollection));
    }
 
    @DeleteMapping("/deleteAccountSalesCollection")
    @Log(title = "删除收款单", businessType = BusinessType.DELETE)
    @Operation(summary = "财务管理--删除收款单")
    public R deleteAccountSalesCollection(@RequestParam("ids") Long[] ids) {
        return R.ok(accountSalesCollectionService.deleteAccountSalesCollection(Arrays.asList(ids)));
    }
 
    @PostMapping("/exportAccountSalesCollection")
    @Operation(summary = "导出收款单文件")
    @Log(title = "导出收款单文件", businessType = BusinessType.EXPORT)
    public void exportAccountSalesCollection(HttpServletResponse response, AccountSalesCollectionDto accountSalesCollectionDto) {
        accountSalesCollectionService.exportAccountSalesCollection(response,accountSalesCollectionDto);
    }
 
}