wujianwei
2026-03-20 b2e717310b8a177b435e0a3532f520839ec26402
service/src/main/java/com/ruoyi/cwgl/service/impl/FundFlowClaimDetailServiceImpl.java
@@ -21,11 +21,13 @@
import com.ruoyi.cwgl.mapper.FundFlowMapper;
import com.ruoyi.cwgl.domain.FundFlowClaimDetail;
import com.ruoyi.cwgl.domain.FundFlow;
import com.ruoyi.cwgl.domain.FundFlowLog;
import com.ruoyi.cwgl.domain.ReceivableBillSettlementDetail;
import com.ruoyi.cwgl.domain.PayableBillSettlementDetail;
import com.ruoyi.cwgl.domain.ReceivableBillManagement;
import com.ruoyi.cwgl.domain.PayableBillManagement;
import com.ruoyi.cwgl.service.IFundFlowClaimDetailService;
import com.ruoyi.cwgl.service.IFundFlowLogService;
import com.ruoyi.cwgl.service.IReceivableBillSettlementDetailService;
import com.ruoyi.cwgl.service.IPayableBillSettlementDetailService;
import com.ruoyi.cwgl.service.IReceivableBillManagementService;
@@ -62,6 +64,9 @@
    
    @Resource
    private IPayableBillManagementService payableBillManagementService;
    @Resource
    private IFundFlowLogService fundFlowLogService;
    /**
@@ -243,7 +248,17 @@
        // 删除结算明细并更新账单状态
        deleteSettlementDetailsAndUpdateBillStatus(claimDetail,fundFlow);
        
        return fundFlowClaimDetailMapper.deleteFundFlowClaimDetailByIds(ids);
        int result = fundFlowClaimDetailMapper.deleteFundFlowClaimDetailByIds(ids);
        // 记录操作日志
        if (result > 0) {
            FundFlowLog log = new FundFlowLog();
            log.setFlowId(fundFlowId);
            log.setOperation("删除账单认领明细,账单编号:" + claimDetail.getBillNo() + ",认领金额:" + deleteAmount + ",资金流水号:" + fundFlow.getBankFlowNo());
            fundFlowLogService.insertFundFlowLog(log);
        }
        return result;
    }
    /**
@@ -314,9 +329,14 @@
        
        // 新增:创建结算明细并更新账单状态
        if (insertResult > 0) {
            
            createSettlementDetailsAndUpdateBillStatus(claimDetail, fundFlow);
            // 记录操作日志
            FundFlowLog log = new FundFlowLog();
            log.setFlowId(fundFlowId);
            log.setOperation("新增账单认领明细,账单编号:" + claimDetail.getBillNo() + ",认领金额:" + claimAmount + ",资金流水号:" + fundFlow.getBankFlowNo());
            fundFlowLogService.insertFundFlowLog(log);
        }
        
        return insertResult;
@@ -397,7 +417,14 @@
                settlementDetail.setClaimDetailId(claimDetailId); // 设置认领明细ID
                settlementDetail.setReceiptAmount(claimAmount);
                settlementDetail.setReceiptDate(fundFlow.getTransactionDate());
                settlementDetail.setSettlementMethod("银行转账"); // 根据实际情况设置
                settlementDetail.setSettlementMethod("0"); // 根据实际情况设置
                // 设置银行账户信息
                settlementDetail.setCustomerBank(fundFlow.getOurBankName()); // 客户开户行(本方账户开户行)
                settlementDetail.setCustomerBankAccount(fundFlow.getOurAccount()); // 客户银行账号(本方账号)
                settlementDetail.setReceivingBank(fundFlow.getCounterpartyName()); // 收款账户开户行(对方户名)
                settlementDetail.setReceivingBankAccount(fundFlow.getCounterpartyAccount()); // 收款银行账号(对方账号)
                settlementDetail.setCreateBy(SecurityUtils.getUsername());
                settlementDetail.setCreateTime(DateUtils.getNowDate());
                
@@ -428,7 +455,14 @@
                settlementDetail.setClaimDetailId(claimDetailId); // 设置认领明细ID
                settlementDetail.setPaymentAmount(claimAmount);
                settlementDetail.setPaymentDate(fundFlow.getTransactionDate());
                settlementDetail.setSettlementMethod("银行转账"); // 根据实际情况设置
                settlementDetail.setSettlementMethod("0"); // 根据实际情况设置
                // 设置银行账户信息
                settlementDetail.setPaymentBank(fundFlow.getOurBankName()); // 付款账户开户行(本方账户开户行)
                settlementDetail.setPaymentBankAccount(fundFlow.getOurAccount()); // 付款账户银行账号(本方账号)
                settlementDetail.setSupplierReceivingBank(fundFlow.getCounterpartyName()); // 供应商收款账户开户行(对方户名)
                settlementDetail.setSupplierReceivingAccount(fundFlow.getCounterpartyAccount()); // 供应商收款银行账户(对方账号)
                settlementDetail.setCreateBy(SecurityUtils.getUsername());
                settlementDetail.setCreateTime(DateUtils.getNowDate());