8 天以前 77bbe488ca8aa21d81a4f8f4fcef205fd890ef83
yys
1.批量回款,付款
已修改4个文件
25 ■■■■ 文件已修改
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -14,6 +14,7 @@
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;
@@ -69,8 +70,12 @@
     */
    @Log(title = "付款登记", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody PaymentRegistration paymentRegistration) {
        return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult add(@RequestBody List<PaymentRegistration> paymentRegistrationList) {
        for (PaymentRegistration paymentRegistration : paymentRegistrationList) {
            paymentRegistrationService.insertPaymentRegistration(paymentRegistration);
        }
        return toAjax(1);
    }
    /**
src/main/java/com/ruoyi/purchase/service/impl/PaymentRegistrationServiceImpl.java
@@ -97,6 +97,9 @@
    @Override
    public int insertPaymentRegistration(PaymentRegistration paymentRegistration) {
        PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(paymentRegistration.getPurchaseLedgerId());
        if(purchaseLedger == null){
            throw new RuntimeException("关联采购台账不存在");
        }
        SalesLedger salesLedger = salesLedgerMapper.selectOne(new QueryWrapper<SalesLedger>().
                eq("sales_contract_no", purchaseLedger.getSalesContractNo()));
//        if (salesLedger == null) {
src/main/java/com/ruoyi/purchase/service/impl/TicketRegistrationServiceImpl.java
@@ -362,7 +362,7 @@
        if (!ObjectUtils.isEmpty(ticketRegistration.getStatus())) {
            if (ticketRegistration.getStatus()) {
                ticketRegistrationIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.00").equals(receiptPaymentDto1.getUnPaymentAmountTotal()));
                ticketRegistrationIPage.getRecords().removeIf(receiptPaymentDto1 -> new BigDecimal("0.000").equals(receiptPaymentDto1.getUnPaymentAmountTotal()));
                ticketRegistrationIPage.setTotal(ticketRegistrationIPage.getRecords().size());
            }
        }
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
@@ -18,6 +18,7 @@
import com.ruoyi.sales.service.ReceiptPaymentService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
@@ -36,12 +37,16 @@
    /**
     * 回款登记新增
     * @param receiptPayment
     * @param receiptPaymentList
     * @return
     */
    @PostMapping("/saveOrUpdate")
    public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) {
        receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment);
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPaymentList) {
        for (ReceiptPayment receiptPayment : receiptPaymentList) {
            receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment);
        }
        return AjaxResult.success();
    }