anderx лет назад: 4
Родитель
Сommit
ead0108037

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

@@ -109,13 +109,13 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	private TOrderMidMapper	tOrderMidMapper;
 	@Autowired
 	private AsyncUtils	asyncUtils;
-	
-	
+
+
 
 
 	@Override
 	public int addCompany(ThirdPartyCompany t,Integer calculation,Integer type) {
-		
+
 			CompanyLibrary c=new CompanyLibrary();
 			String aid=TokenManager.getAdminId();
 			if(calculation==0) {
@@ -140,7 +140,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	}
 
 
-	
+
 
 
 	@Override
@@ -161,7 +161,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			t.setTotalAmount(t.getUnitPrice().multiply(new BigDecimal(t.getQuantity())));
 		}
 		thirdPartyCompanyMapper.updateByPrimaryKeySelective(t);
-		return 1; 
+		return 1;
 	}
 
 
@@ -229,7 +229,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			if(!list.isEmpty()) op=tOrderOutsourceMapper.selectByTid(tid);
 			//外包type
 				for (OutThirdPartyCompany oc : list) {
-					// start_type	0外包 1供应商	
+					// start_type	0外包 1供应商
 					if (oc.getStartType()==1) {
 						//project_tyoe 0 正常 1专利 2软著 3审计
 						if(op==null)op=new outProjectBo();
@@ -264,7 +264,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			Integer tpcId=Integer.valueOf(id);
 			ThirdPartyCompany tpc=thirdPartyCompanyMapper.selectByPrimaryKey(tpcId);
 			thirdPartyCompanyMapper.deleteByPrimaryKey(tpcId);
-			
+
 			List<outOrderPayment> list=tOrderPaymentMapper.selectList(tpcId, null, null);
 			for (outOrderPayment o : list) {
 					TOrderPayment t=new TOrderPayment();
@@ -310,7 +310,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 					t.setStatus(4);
 					tOrderPaymentMapper.updateByPrimaryKeySelective(t);
 			}
-			
+
 		}
 		return 1;
 	}
@@ -352,7 +352,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			op.setInitialTotalAmount(tpc.getTotalAmount().toString());
 			op.setInitialUnitPrice(tpc.getUnitPrice().toString());
 			op.setInitialPaymentAmount(tpc.getPartyAmount().toString());
-			 
+
 		}else if (type==1&&tp.getStatus()!=4) {
 			PaymentNode pn=paymentNodeMapper.selectByPrimaryKey(tp.getNodeId());
 			op.setInitialQuantity(pn.getQuantity());
@@ -381,7 +381,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 //				op.setInitialTotalAmount("***");
 //			}
 //		}
-//		
+//
 //	}
 		return op;
 	}
@@ -414,7 +414,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		}else if (p.getStatus()==3) {
 			type=NoticeStatus.PAYMENT_COMPLETE.getCode();
 			tp.setPaymentAmount(p.getPaymentAmount()!=null?p.getPaymentAmount():p.getApplicationAmount());
-			
+
 			confirmPayment(p);
 			auditStr="审核完成";
 		}else if(p.getStatus()==4) {
@@ -498,7 +498,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	public int addfinancialPayment(InuptFinancialPayment f) {
 		f.setPaymentTime(DateUtils.StringToDate(f.getPaymentTimes(), AFTConstants.YYYYMMDD));
 		financialPaymentMapper.insertSelectiveGetId(f);
-		return f.getId(); 
+		return f.getId();
 	}
 
 
@@ -522,8 +522,8 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 				||type==NoticeStatus.PAYMENT_COMPLETE.getCode()) {
 			n.setAid(in.getTechId());
 			bo.setAddress(in.getTechEmail());
-		} 
-		
+		}
+
 		n.setNoticeType(type);
 		n.setContent(str);
 		n.setReaded(0);//未读
@@ -560,7 +560,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 				list=tOrderPaymentMapper.selectList(null,p.getNodeId(),p.getChooseType());
 			}
 			for (outOrderPayment o : list) {
-					a=a.add(new BigDecimal(o.getApplicationAmount()));	
+					a=a.add(new BigDecimal(o.getApplicationAmount()));
 			}
 			if (p.getChooseType()==0) {
 				ThirdPartyCompany t=thirdPartyCompanyMapper.selectByPrimaryKey(p.getTpcId());
@@ -568,7 +568,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			}else if (p.getChooseType()==1) {
 				PaymentNode n=paymentNodeMapper.selectByPrimaryKey(p.getNodeId());
 				total=n.getTotalAmount();
-			} 
+			}
 			if (a.compareTo(total) == 1) {
 				return -1;
 			}
@@ -617,7 +617,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		}  else if (NewOrderDunType.ZSCQ_GS_SL_XZ.getCode()==Integer.valueOf(""+pn.getProjectType()+pn.getDunType())) {
 			// 0 正常 1专利 2软著 3审计 4双软 5高新 6商标
 			if (tt.getBpType()==1
-					&&(tt.getProjectStatus()==NewProjectStatus.YTJ.getCode()&&tt.getProjectStatus()==NewProjectStatus.YWCXZ.getCode()
+					&&(tt.getProjectStatus()==NewProjectStatus.YTJ.getCode()||tt.getProjectStatus()==NewProjectStatus.YWCXZ.getCode()
 						||tt.getProjectStatus()==NewProjectStatus.YBH.getCode())) {
 				return false;
 			}else if (tt.getBpType()!=1&&(tt.getProjectStatus()==NewProjectStatus.YWCXZ.getCode())){
@@ -633,7 +633,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 				&&(tt.getProjectStatus()==NewProjectStatus.YXZ.getCode())) {
 			return false;
 		}
-			
+
 		return true;
 	}
 
@@ -660,7 +660,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			map.put("lvl", 2);
 		}else  if (TokenManager.hasRole(AFTConstants.TECH)||TokenManager.hasRole(AFTConstants.TECH_MANAGER)) {
 			map.put("lvl", 3);
-		}else if(TokenManager.hasRole(AFTConstants.PATENT_AUDITOR)) 
+		}else if(TokenManager.hasRole(AFTConstants.PATENT_AUDITOR))
 		{
 			map.put("lvl", 4);
 		}else {
@@ -730,7 +730,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			}else {
 				return list.get(0);
 			}
-		
+
 	}
 
 
@@ -799,7 +799,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 				n.setCreateTime(date);
 				n.setNoticeType(NoticeStatus.PAYMENT_COMPLETE.getCode());
 				String str=NoticeStatus.getValueByCode(n.getNoticeType())+": 订单编号 -"+ni.getOrderNo()+
-						",客户名称:"+ni.getBuyerName()+", 操作人:"+a.getName()+"-"+a.getDepartmentName()+"。";	
+						",客户名称:"+ni.getBuyerName()+", 操作人:"+a.getName()+"-"+a.getDepartmentName()+"。";
 				n.setContent(str);
 				n.setReaded(0);//未读
 				nlist.add(n);
@@ -862,7 +862,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			t.setTotalAmount(sw.getUnitPrice().multiply(new BigDecimal(t.getQuantity())));
 		}
 	}
-	
+
 	@Override
 	public void calculationPatentUnitPrice(ThirdPartyCompany t) {
 		PatentPrice p=patentPriceMapper.selectBycid(t.getCid());
@@ -921,7 +921,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		}
 		return true;
 	}
-	
+
 	@Override
 	public void checkGetAmount(TOrderPayment p) {
 		if(p.getApplicationAmount()==null) {
@@ -942,7 +942,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			}
 			p.setApplicationAmount(count);
 		}
-		
+
 	}
 
 
@@ -1030,7 +1030,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			tp.setId(in.getPid());
 			tp.setProcessStatus(processStatus);
 			tOrderPaymentMapper.updateByPrimaryKeySelective(tp);
-			return paymentLogMapper.insertSelective(in);	
+			return paymentLogMapper.insertSelective(in);
 		}else if(StringUtils.isNotBlank(pids)) {
 			List<String> ss=Arrays.asList(pids.split(","));
 			tOrderPaymentMapper.updateByids(ss,processStatus);
@@ -1039,7 +1039,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		}else {
 			return 0;
 		}
-		
+
 	}
 
 
@@ -1092,7 +1092,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			map.put("desc", desc);
 		}
 		return map;
-		
+
 	}
 
 
@@ -1131,7 +1131,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			thirdPartyCompanyMapper.deleteByTid(id);
 			paymentNodeMapper.deleteByParam(null,id);
 			List<outOrderPayment> list=tOrderPaymentMapper.selectByTid(id,null,0);
-			List<String> ss=new ArrayList<String>(); 
+			List<String> ss=new ArrayList<String>();
 			for (outOrderPayment o : list) {
 					TOrderPayment t=new TOrderPayment();
 					t.setId(o.getId());