yaowanxin
昨天 d09f76ca1ffd2ab091c14327b8e50d92dfa1df7e
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
package com.ruoyi.business.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 
import com.ruoyi.business.dto.ReceiptPaymentDto;
import com.ruoyi.business.entity.ReceiptPayment;
import com.ruoyi.business.service.ReceiptPaymentService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
 
@RestController
@RequestMapping("/receiptPayment")
public class ReceiptPaymentController extends BaseController {
 
    @Autowired
    private ReceiptPaymentService receiptPaymentService;
 
    /**
     * 应收台账新增
     * @param receiptPayment
     * @return
     */
    @PostMapping("/saveOrUpdate")
    public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) {
        receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment);
        return AjaxResult.success();
    }
 
    /**
     * 应收台账修改
     * @param receiptPayment
     * @return
     */
    @PostMapping("/update")
    public AjaxResult receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentUpdate(receiptPayment));
    }
 
    /**
     * 应收台账删除
     * @param ids
     * @return
     */
    @DeleteMapping("/del")
    public AjaxResult receiptPaymentDel (@RequestBody List<Integer> ids) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentDel(ids));
    }
 
    /**
     * 应收台账详情
     * @param id
     * @return
     */
    @GetMapping("/invoiceInfo")
    public AjaxResult invoiceInfo (Integer id) {
        return AjaxResult.success(receiptPaymentService.invoiceInfo(id));
    }
 
    /**
     * 查询应收记录
     */
    @GetMapping("/receiptPaymentHistoryListPage")
    public IPage<ReceiptPaymentDto> receiptPaymentHistoryListPage(Page page, ReceiptPaymentDto receiptPaymentDto) {
        return receiptPaymentService.receiptPaymentHistoryListPage(page,receiptPaymentDto);
    }
 
    /**
     * 查询应收记录不分页
     */
    @GetMapping("/receiptPaymentHistoryListNoPage")
    public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) {
        return receiptPaymentService.receiptPaymentHistoryListNoPage(receiptPaymentDto);
    }
}