账单合并收款
This commit is contained in:
parent
952b06caf0
commit
3472c84596
@ -110,6 +110,8 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
|||||||
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
|
throw new EmisBizError(EmisBizErrorType.FAIL,"账单编号不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0
|
// || BigDecimal.ZERO.compareTo(emisSettlePayRecord.getPayMoney()) == 0
|
||||||
if("1".equals(emisSettlePayRecord.getRecType())) {
|
if("1".equals(emisSettlePayRecord.getRecType())) {
|
||||||
if (emisSettlePayRecord.getPayMoney() == null ) {
|
if (emisSettlePayRecord.getPayMoney() == null ) {
|
||||||
@ -129,6 +131,9 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
|||||||
throw new EmisBizError(EmisBizErrorType.FAIL,"业务账单未确认,不允许收款!");
|
throw new EmisBizError(EmisBizErrorType.FAIL,"业务账单未确认,不允许收款!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 多账单合并收款
|
||||||
|
String [] settleBillNoArr = WaybillHelper.formatQueryValue(emisSettlePayRecord.getSettleBillNo()).split(",");
|
||||||
|
|
||||||
// 不重复的 id流水号
|
// 不重复的 id流水号
|
||||||
String payId= WaybillHelper.genPayId();
|
String payId= WaybillHelper.genPayId();
|
||||||
emisSettlePayRecord.setPayId(payId);
|
emisSettlePayRecord.setPayId(payId);
|
||||||
@ -142,10 +147,15 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
|||||||
|
|
||||||
|
|
||||||
// 插入账单和支付单关联关系
|
// 插入账单和支付单关联关系
|
||||||
|
for(int i=0;i<settleBillNoArr.length;i++) {
|
||||||
|
String settleBillNo = settleBillNoArr[i];
|
||||||
|
if(!StringUtils.isEmpty(settleBillNo)) {
|
||||||
EmisSettlePayBillRel emisSettlePayBillRel = new EmisSettlePayBillRel();
|
EmisSettlePayBillRel emisSettlePayBillRel = new EmisSettlePayBillRel();
|
||||||
emisSettlePayBillRel.setPayId(payId);
|
emisSettlePayBillRel.setPayId(payId);
|
||||||
emisSettlePayBillRel.setSettleBillNo(emisSettlePayRecord.getSettleBillNo());
|
emisSettlePayBillRel.setSettleBillNo(settleBillNo);
|
||||||
emisSettlePayBillRelMapper.insertEmisSettlePayBillRel(emisSettlePayBillRel);
|
emisSettlePayBillRelMapper.insertEmisSettlePayBillRel(emisSettlePayBillRel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 记录收退款运单号
|
// 记录收退款运单号
|
||||||
List<EmisSettlePayRel> listRel=emisSettlePayRecord.getPayRelList();
|
List<EmisSettlePayRel> listRel=emisSettlePayRecord.getPayRelList();
|
||||||
@ -167,8 +177,12 @@ public class EmisSettlePayRecordServiceImpl extends EmisBaseService implements I
|
|||||||
emisSettlePayRecordMapper.insertEmisSettlePayRecord(emisSettlePayRecord);
|
emisSettlePayRecordMapper.insertEmisSettlePayRecord(emisSettlePayRecord);
|
||||||
|
|
||||||
// 重新计算账单收款信息
|
// 重新计算账单收款信息
|
||||||
emisSettleBillService.reCalcSettleBillPayStatus(emisSettlePayRecord.getSettleBillNo());
|
for(int i=0;i<settleBillNoArr.length;i++) {
|
||||||
|
String settleBillNo = settleBillNoArr[i];
|
||||||
|
if(!StringUtils.isEmpty(settleBillNo)) {
|
||||||
|
emisSettleBillService.reCalcSettleBillPayStatus(settleBillNo);
|
||||||
|
}
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user