This commit is contained in:
linfso 2025-05-23 14:25:24 +08:00
parent ee1f84c5a4
commit 20b3f1b7bf

View File

@ -772,7 +772,6 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
BigDecimal deductionMoney = BigDecimal.ZERO;
/* other_money */
BigDecimal otherMoney = BigDecimal.ZERO;
// refund_money
BigDecimal refundMoney = BigDecimal.ZERO;
@ -868,16 +867,18 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
newBill.setRecedMoney(totalMoney);
newBill.setSatisfyMoney(satisfyMoney);
newBill.setAllowanceMoney(allowanceMoney);
newBill.setDeductionMoney(deductionMoney);
newBill.setOtherMoney(otherMoney);
// 退款金额
newBill.setRefundMoney(refundMoney);
// 更新账单收款状态 收款金额
int rstDif=totalMoney.compareTo(oldBill.getRecMoney());
log.debug("reCalcSettleBillPayStatus===>收款金额:{},应收:{}",totalMoney,oldBill.getRecMoney());
if( totalAllPayMoney.compareTo(BigDecimal.ZERO) == 0 ){
newBill.setPaymentStatus("0");
emisSettleBillMapper.updateEmisSettleBill(newBill);
}else{
int rstDif=totalAllPayMoney.compareTo(oldBill.getRecMoney());
if( rstDif >= 0 ){
// 已收款
newBill.setPaymentStatus("1");
@ -889,7 +890,7 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
emisSettleBillMapper.updateEmisSettleBill(newBill);
}
}
emisSettleBillMapper.updateEmisSettleBill(newBill);
}
}
else{
@ -910,16 +911,18 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
newBill.setRecedMoney(totalMoney);
newBill.setSatisfyMoney(satisfyMoney);
newBill.setAllowanceMoney(allowanceMoney);
newBill.setDeductionMoney(deductionMoney);
newBill.setOtherMoney(otherMoney);
// 退款金额
newBill.setRefundMoney(refundMoney);
// 更新账单收款状态 收款金额
int rstDif=totalMoney.compareTo(oldBill.getRecMoney());
log.debug("reCalcSettleBillPayStatus===>收款金额:{},应收:{}",totalMoney,oldBill.getRecMoney());
if( totalAllPayMoney.compareTo(BigDecimal.ZERO) == 0 ){
newBill.setPaymentStatus("0");
emisSettleBillMapper.updateEmisSettleBill(newBill);
}else{
int rstDif=totalAllPayMoney.compareTo(oldBill.getRecMoney());
if( rstDif >= 0 ){
// 已收款
newBill.setPaymentStatus("1");
@ -931,7 +934,7 @@ public class EmisSettleBillServiceImpl extends EmisBaseService implements IEmisS
emisSettleBillMapper.updateEmisSettleBill(newBill);
}
}
emisSettleBillMapper.updateEmisSettleBill(newBill);
// 未收款则更新运单状态未收款状态
List<EmisSettleSubBill> list = emisBaseService.selectSubBillListBySettleBillNo(settleBillNo);