liding
6 天以前 360f96ffb62a0ba418c0de0a4a5b5f537912872e
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -1,5 +1,7 @@
package com.ruoyi.purchase.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
@@ -13,17 +15,17 @@
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * 付款登记Controller
 *
 *
 * @author ruoyi
 * @date 2025-05-15
 */
@RestController
@RequestMapping("/purchase/paymentRegistration")
public class PaymentRegistrationController extends BaseController
{
public class PaymentRegistrationController extends BaseController {
    @Autowired
    private IPaymentRegistrationService paymentRegistrationService;
@@ -32,8 +34,7 @@
     */
//    @PreAuthorize("@ss.hasPermi('system:registration:list')")
    @GetMapping("/list")
    public TableDataInfo list(PaymentRegistrationDto paymentRegistrationDto)
    {
    public TableDataInfo list(PaymentRegistrationDto paymentRegistrationDto) {
        startPage();
        List<PaymentRegistrationDto> list = paymentRegistrationService.selectPaymentRegistrationList(paymentRegistrationDto);
        return getDataTable(list);
@@ -55,8 +56,7 @@
     * 获取付款登记详细信息
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getInfo(@PathVariable("id") Long id) {
        return success(paymentRegistrationService.selectPaymentRegistrationById(id));
    }
@@ -65,8 +65,7 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody PaymentRegistration paymentRegistration)
    {
    public AjaxResult add(@RequestBody PaymentRegistration paymentRegistration) {
        return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
    }
@@ -75,8 +74,7 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration)
    {
    public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) {
        return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration));
    }
@@ -84,9 +82,8 @@
     * 删除付款登记
     */
    @Log(title = "付款登记", businessType = BusinessType.DELETE)
   @DeleteMapping("/del")
    public AjaxResult remove(@RequestBody Long[] ids)
    {
    @DeleteMapping("/del")
    public AjaxResult remove(@RequestBody Long[] ids) {
        return toAjax(paymentRegistrationService.deletePaymentRegistrationByIds(ids));
    }
@@ -94,8 +91,7 @@
     * 获取付款登记详细信息
     */
    @GetMapping(value = "/byPurchaseId/{id}")
    public AjaxResult getPurchaseInfo(@PathVariable("id") Long id)
    {
    public AjaxResult getPurchaseInfo(@PathVariable("id") Long id) {
        return success(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
    }
@@ -103,8 +99,18 @@
     * 获取付款登记详细信息
     */
    @GetMapping(value = "/paymentLedgerList")
    public AjaxResult paymentLedgerList(PaymentLedgerDto paymentLedgerDto)
    {
        return success(paymentRegistrationService.selectPaymentLedgerList(paymentLedgerDto));
    public AjaxResult paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
                                        Integer detailPageNum,
                                        Integer detailPageSize) {
        IPage<Map<String, Object>> mapIPage = paymentRegistrationService.selectPaymentLedgerList(paymentLedgerDto, page, detailPageNum, detailPageSize);
        return success(mapIPage);
    }
    /**
     * 获取本月应付信息
     */
    @GetMapping(value = "/paymentMonthList")
    public AjaxResult paymentMonthList() {
        return success(paymentRegistrationService.paymentMonthList());
    }
}