|
|
@@ -145,7 +145,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
|
|
|
Double bk_amount = fundtransferdetail.getFtd_nowbalance();
|
|
|
//付款方
|
|
|
Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
|
|
|
- Double beginamount = bankinformation.getBk_beginamount();
|
|
|
+ Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
|
|
|
Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
|
|
|
Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
|
|
|
bankinformation.setBk_thisamount(beginamount + incomme - spending - bk_amount);
|
|
|
@@ -154,7 +154,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
|
|
|
|
|
|
//收款方
|
|
|
Bankinformation inbankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
|
|
|
- Double inbeginamount = inbankinformation.getBk_beginamount();
|
|
|
+ Double inbeginamount = inbankinformation.getBk_beginamount()== null ? new Double(0) : inbankinformation.getBk_beginamount();
|
|
|
Double inspending = inbankinformation.getBk_spending() == null ? new Double(0) : inbankinformation.getBk_spending();
|
|
|
Double inincomme = inbankinformation.getBk_income() == null ? new Double(0) : inbankinformation.getBk_income();
|
|
|
inbankinformation.setBk_thisamount(inbeginamount + inincomme - inspending + bk_amount);
|
|
|
@@ -202,7 +202,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
|
|
|
Double bk_amount = fundtransferdetail.getFtd_nowbalance();
|
|
|
//付款方
|
|
|
Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
|
|
|
- Double beginamount = bankinformation.getBk_beginamount();
|
|
|
+ Double beginamount = bankinformation.getBk_beginamount()== null ? new Double(0) : bankinformation.getBk_beginamount();
|
|
|
Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
|
|
|
Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
|
|
|
bankinformation.setBk_thisamount(beginamount + incomme - spending + bk_amount);
|
|
|
@@ -211,7 +211,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
|
|
|
|
|
|
//收款方
|
|
|
Bankinformation inbankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
|
|
|
- Double inbeginamount = inbankinformation.getBk_beginamount();
|
|
|
+ Double inbeginamount = inbankinformation.getBk_beginamount()== null ? new Double(0) : inbankinformation.getBk_beginamount();
|
|
|
Double inspending = inbankinformation.getBk_spending() == null ? new Double(0) : inbankinformation.getBk_spending();
|
|
|
Double inincomme = inbankinformation.getBk_income() == null ? new Double(0) : inbankinformation.getBk_income();
|
|
|
inbankinformation.setBk_thisamount(inbeginamount + inincomme - inspending - bk_amount);
|
|
|
@@ -314,9 +314,13 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
|
|
|
throw new BizException(BizExceptionCode.NULL_CODE);
|
|
|
}
|
|
|
Long companyId = BaseContextHolder.getCompanyId();
|
|
|
- Integer count = "0".equals(String.valueOf(id)) ? fundtransferMapper.validateCodeWhenInsert(code, companyId) :
|
|
|
- fundtransferMapper.validateCodeWhenUpdate(code, id, companyId);
|
|
|
- return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.FUNDTRANSFER.getCaller()).getData();
|
|
|
+ String codeString = null;
|
|
|
+ synchronized(FundtransferServiceImpl.class) {
|
|
|
+ Integer count = "0".equals(String.valueOf(id)) ? fundtransferMapper.validateCodeWhenInsert(code, companyId) :
|
|
|
+ fundtransferMapper.validateCodeWhenUpdate(code, id, companyId);
|
|
|
+ codeString = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.FUNDTRANSFER.getCaller()).getData();
|
|
|
+ }
|
|
|
+ return codeString;
|
|
|
}
|
|
|
|
|
|
private List<Fundtransfer> getListByMode(ListReqDTO req) {
|