This commit is contained in:
linfso 2024-11-05 09:23:02 +08:00
parent e5d4374ee1
commit 42c1660377

View File

@ -109,14 +109,17 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
}
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0
if("1".equals(emisSettlePayRecord.getRecType())) {
if (emisSettlePayRecord.getPayMoney() == null || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0) {
throw new EmisBizError(EmisBizErrorType.FAIL, "收款金额不能为0");
if (emisSettlePayRecord.getPayMoney() == null ) {
throw new EmisBizError(EmisBizErrorType.FAIL, "收款金额不能为空");
}
}
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getRefundMoney()) == 0
else if("2".equals(emisSettlePayRecord.getRecType())) {
if (emisSettlePayRecord.getRefundMoney()== null || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getRefundMoney()) == 0) {
throw new EmisBizError(EmisBizErrorType.FAIL, "退款金额不能为0");
if (emisSettlePayRecord.getRefundMoney()== null ) {
throw new EmisBizError(EmisBizErrorType.FAIL, "退款金额不能为空");
}
}