maven
昨天 55c4143362c7df1ece4523597e26947d35e21bda
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
@@ -13,8 +14,10 @@
import com.ruoyi.purchase.pojo.PaymentRegistration;
import com.ruoyi.purchase.service.IPaymentRegistrationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@@ -42,16 +45,17 @@
    }
    /**
     * 导出付款登记列表
     * 导出付款流水列表
     */
//    @Log(title = "付款登记", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, PaymentRegistrationDto paymentRegistrationDto)
//    {
//        List<PaymentRegistrationDto> list = paymentRegistrationService.selectPaymentRegistrationList(paymentRegistrationDto);
//        ExcelUtil<PaymentRegistration> util = new ExcelUtil<PaymentRegistration>(PaymentRegistration.class);
//        util.exportExcel(response, list, "付款登记数据");
//    }
    @Log(title = "导出付款流水列表", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, PaymentRegistrationDto paymentRegistrationDto)
    {
        Page page = new Page<>(-1,-1);
        IPage<PaymentRegistrationDto> paymentRegistrationDtoIPage = paymentHistoryListPage(page, paymentRegistrationDto);
        ExcelUtil<PaymentRegistrationDto> util = new ExcelUtil<PaymentRegistrationDto>(PaymentRegistrationDto.class);
        util.exportExcel(response, paymentRegistrationDtoIPage.getRecords(), "导出付款流水列表");
    }
    /**
     * 获取付款登记详细信息
@@ -66,7 +70,8 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody PaymentRegistration paymentRegistration) {
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult add(@RequestBody List<PaymentRegistration>  paymentRegistration) {
        return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
    }
@@ -75,6 +80,7 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.UPDATE)
    @PutMapping
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) {
        return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration));
    }
@@ -117,6 +123,22 @@
    }
    /**
     * 供应商往来分页接口
     */
    @GetMapping("/supplierNameListPage")
    public AjaxResult supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
        return success(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
    }
    /**
     * 供应商往来分页接口
     */
    @GetMapping("/supplierNameListPageDetails")
    public AjaxResult supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
        return success(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
    }
    /**
     * 获取本月应付信息
     */
    @GetMapping(value = "/paymentMonthList")