|
|
@@ -191,22 +191,31 @@ public class InvAccountIncoiceServiceImpl extends ServiceImpl<InvAccountIncoiceM
|
|
|
}
|
|
|
//判断收款方是内部还是外部
|
|
|
InvAccount revInvAccount = invAccountService.getById(revInvAccountCard.getAccountId());
|
|
|
+ InvAccount outInvAccount = invAccountService.getById(outInvAccountCard.getAccountId());
|
|
|
|
|
|
//转账
|
|
|
- if (revInvAccount.getOuterFlag().equals("0")) {
|
|
|
- InvAccountExcel invAccountExcel = new InvAccountExcel();
|
|
|
- invAccountExcel.setApplyAmount(invAccountIncoice.getPayoutMoney());
|
|
|
- List<InvAccountCard> invAccountCards = insideTransfer(outInvAccountCard, revInvAccountCard, invAccountExcel);
|
|
|
- invAccountCardService.updateBatchById(invAccountCards);
|
|
|
- invAccountOperateService.saveBatch(invAccountOperateList);
|
|
|
-
|
|
|
- } else {
|
|
|
- InvAccountExcel invAccountExcel = new InvAccountExcel();
|
|
|
- invAccountExcel.setOutAccountQuality(revInvAccount.getOuterFlag());
|
|
|
- invAccountExcel.setApplyAmount(invAccountIncoice.getPayoutMoney());
|
|
|
- List<InvAccountCard> invAccountCards = enterDeTransfer(outInvAccountCard, revInvAccountCard, invAccountExcel);
|
|
|
- invAccountCardService.updateBatchById(invAccountCards);
|
|
|
- invAccountOperateService.saveBatch(invAccountOperateList);
|
|
|
+ if (outInvAccount.getOuterFlag().equals("0")){
|
|
|
+ if (revInvAccount.getOuterFlag().equals("0")) {
|
|
|
+ InvAccountExcel invAccountExcel = new InvAccountExcel();
|
|
|
+ invAccountExcel.setApplyAmount(invAccountIncoice.getPayoutMoney());
|
|
|
+ List<InvAccountCard> invAccountCards = insideTransfer(outInvAccountCard, revInvAccountCard, invAccountExcel);
|
|
|
+ invAccountCardService.updateBatchById(invAccountCards);
|
|
|
+ invAccountOperateService.saveBatch(invAccountOperateList);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ InvAccountExcel invAccountExcel = new InvAccountExcel();
|
|
|
+ invAccountExcel.setOutAccountQuality(revInvAccount.getOuterFlag());
|
|
|
+ invAccountExcel.setApplyAmount(invAccountIncoice.getPayoutMoney());
|
|
|
+ List<InvAccountCard> invAccountCards = enterDeTransfer(outInvAccountCard, revInvAccountCard, invAccountExcel);
|
|
|
+ invAccountCardService.updateBatchById(invAccountCards);
|
|
|
+ invAccountOperateService.saveBatch(invAccountOperateList);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ InvAccountOperate invAccountOperate1 = new InvAccountOperate();
|
|
|
+ invAccountOperate1.setOutCardNum(invAccountIncoice1.getOutBankCardNum());
|
|
|
+ invAccountOperate1.setEnterCardId(invAccountIncoice1.getRevBankCardNum());
|
|
|
+ invAccountOperate1.setApplyAmount(invAccountIncoice.getPayoutMoney());
|
|
|
+ invAccountOperateService.insert(invAccountOperate1);
|
|
|
}
|
|
|
|
|
|
|