Browse Source

获取负责人管理巴列表

anderx 3 years ago
parent
commit
4c28c759bf

+ 4 - 0
src/main/java/com/goafanti/ambSystem/service/Impl/AmbInvestServiceImpl.java

@@ -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);
         }