|
|
@@ -136,11 +136,15 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
|
|
|
if (in.getStatus()==2){
|
|
|
AmbSystem newMy=new AmbSystem();
|
|
|
newMy.setId(myAmb.getId());
|
|
|
+ newMy.setTotalAmount(myAmb.getTotalAmount().subtract(ambInvest.getAmount()));
|
|
|
+ newMy.setReceived(myAmb.getReceived().subtract(ambInvest.getAmount()));
|
|
|
newMy.setSurplus(myAmb.getSurplus().subtract(ambInvest.getAmount()));
|
|
|
newMy.setForeign(myAmb.getForeign().add(ambInvest.getAmount()));
|
|
|
AmbSystem newOther=new AmbSystem();
|
|
|
newOther.setId(other.getId());
|
|
|
newOther.setReceived(other.getReceived().add(ambInvest.getAmount()));
|
|
|
+ newOther.setSurplus(other.getSurplus().add(ambInvest.getAmount()));
|
|
|
+ newOther.setTotalAmount(other.getTotalAmount().add(ambInvest.getAmount()));
|
|
|
ambSystemMapper.updateByPrimaryKeySelective(newMy);
|
|
|
ambSystemMapper.updateByPrimaryKeySelective(newOther);
|
|
|
}
|