This commit is contained in:
linfso 2024-08-20 22:44:31 +08:00
parent 24da846b82
commit 5834d5a334

View File

@ -101,8 +101,15 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
}
if(emisSettlePayRecord.getPayMoney()==null|| BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney())==0 ){
throw new EmisBizError(EmisBizErrorType.FAIL,"收款金额不能为0");
if("1".equals(emisSettlePayRecord.getRecType())) {
if (emisSettlePayRecord.getPayMoney() == null || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0) {
throw new EmisBizError(EmisBizErrorType.FAIL, "收款金额不能为0");
}
}
else if("2".equals(emisSettlePayRecord.getRecType())) {
if (emisSettlePayRecord.getRefundMoney()== null || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getRefundMoney()) == 0) {
throw new EmisBizError(EmisBizErrorType.FAIL, "退款金额不能为0");
}
}
EmisSettleBill emisSettleBill=emisSettleBillMapper.selectSettleBillBySettleBillNo(emisSettlePayRecord.getSettleBillNo());
@ -114,7 +121,7 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
String payId= WaybillHelper.genPayId();
emisSettlePayRecord.setPayId(payId);
// 支付成功
// 处理成功
emisSettlePayRecord.setPayStatus("2");
// 插入数据
emisSettlePayRecordMapper.insertEmisSettlePayRecord(emisSettlePayRecord);