anderx пре 1 година
родитељ
комит
1f40c54c03

+ 10 - 0
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -312,6 +312,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		AdminListBo a =adminMapper.getDeptNameByAid(TokenManager.getAdminId());
 		p.setAid(a.getId());
 		p.setAname(a.getName());
+		//如果是官费
 		if (p.getChooseType()==2) {
 			TOrderTask t=new TOrderTask();
 			t.setId(p.getTid());
@@ -974,18 +975,27 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		return true;
 	}
 
+	/**
+	 * 外包/供应商 计算金额
+	 * @param p
+	 */
 	@Override
 	public void checkGetAmount(TOrderPayment p) {
+		//如果没有金额
 		if(p.getApplicationAmount()==null) {
 			BigDecimal count=new BigDecimal(0);
+			//是第三方 获取第三方列表与金额 录入企业与价格
 			if(p.getChooseType()==0) {
 				ThirdPartyCompany tpc=thirdPartyCompanyMapper.selectByPrimaryKey(p.getTpcId());
 				count=tpc.getUnitPrice().multiply(new BigDecimal(p.getQuantity()));
+				//是催款 计算催款的金额
 			} else if (p.getChooseType()==1) {
 				PaymentNode pn=paymentNodeMapper.selectByPrimaryKey(p.getNodeId());
 				count=pn.getUnitPrice().multiply(new BigDecimal(p.getQuantity()));
+				//是官费 计算官费
 			}else if (p.getChooseType()==2) {
 				ProjectTypePuls ot=tOrderTaskMapper.selectByTidGetDtails(p.getTid());
+				//看项目是否设置有无费减 无费减获取券金额,有费减获取85%金额
 				if (ot.getCostReduction()==0) {
 					count=ot.getOfficialAmount().multiply(new BigDecimal(p.getQuantity()));
 				}else {