anderx пре 4 година
родитељ
комит
dedf8db8c2

+ 5 - 6
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -401,14 +401,13 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 				pn.setPartyAmount(p.getPaymentAmount());
 				paymentNodeMapper.updateByPrimaryKeySelective(pn);
 				tpc=thirdPartyCompanyMapper.selectByPrimaryKey(pn.getCid());
-			}else if(tp.getChooseType()==2){
-				tpc=thirdPartyCompanyMapper.selectByPrimaryKey(tp.getTpcId());
-				tpc.setOfficialAmount(tpc.getOfficialAmount().add(p.getPaymentAmount()));
 			}
-			tpc.setPartyAmount(tpc.getPartyAmount().add(p.getPaymentAmount()));
-			p.setPaymentAmount(p.getApplicationAmount());
+			if(tp.getChooseType()!=2){
+				tpc.setPartyAmount(tpc.getPartyAmount().add(p.getPaymentAmount()));
+				thirdPartyCompanyMapper.updateByPrimaryKeySelective(tpc);
+			}
+			p.setPaymentAmount(tp.getApplicationAmount());
 			financialPaymentMapper.updateOrderCost(p.getId(),p.getPaymentAmount());
-			thirdPartyCompanyMapper.updateByPrimaryKeySelective(tpc);
 	}