瀏覽代碼

获取负责人管理巴列表

anderx 3 年之前
父節點
當前提交
4c28c759bf
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/main/java/com/goafanti/ambSystem/service/Impl/AmbInvestServiceImpl.java

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