| 
					
				 | 
			
			
				@@ -29,18 +29,14 @@ public class PayApplyBillSRMEditPlugin extends AbstractBillPlugIn { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         super.afterDoOperation(afterDoOperationEventArgs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String opKey = afterDoOperationEventArgs.getOperateKey(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String srmUrl = (String)this.getModel().getValue("nckd_srmurl"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(StringUtils.equals("nckd_returnsrm", opKey)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             OperationResult operationResult = afterDoOperationEventArgs.getOperationResult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             operationResult.setShowMessage(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String ssoUrl = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String message = operationResult.getMessage(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(!StringUtils.isEmpty(message) && message.contains("获取单点地址:")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                ssoUrl = message.replace("获取单点地址:", ""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                message = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             List<IOperateInfo> errorInfos = operationResult.getAllErrorOrValidateInfo(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             boolean isSuccess = operationResult.isSuccess(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(errorInfos.size()>0){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,35 +50,37 @@ public class PayApplyBillSRMEditPlugin extends AbstractBillPlugIn { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(!StringUtils.isEmpty(message)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 this.getView().showTipNotification(message); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else if(!StringUtils.isEmpty(srmUrl)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                openSRMSSOLink(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if(StringUtils.equals("nckd_ssosrm", opKey)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(StringUtils.isEmpty(srmUrl)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.getView().showTipNotification("不是SRM生成的单据,不能单点到SRM系统"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                openSRMSSOLink(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 单点登录到srm系统 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void openSRMSSOLink(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String ssourl = (String) this.getModel().getValue("nckd_srmurl"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, String> returnMap = SRMHelperUtils.buildSSOUrl(ssourl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(returnMap != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if("0".equals(returnMap.get("code"))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ssourl = returnMap.get("msg"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 IClientViewProxy proxy = this.getView().getService(IClientViewProxy.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 Map<String, String> mpUrl = new HashMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                mpUrl.put("url", ssoUrl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                mpUrl.put("url", ssourl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 proxy.addAction("openUrl", mpUrl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if(StringUtils.equals("nckd_ssosrm", opKey)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(this.getModel().getValue("nckd_srmurl") == null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    || "".equals(this.getModel().getValue("nckd_srmurl").toString())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                this.getView().showTipNotification("不是SRM生成的单据"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                String ssourl = (String) this.getModel().getValue("nckd_srmurl"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Map<String, String> returnMap = SRMHelperUtils.buildSSOUrl(ssourl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(returnMap != null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if("0".equals(returnMap.get("code"))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        ssourl = returnMap.get("msg"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        IClientViewProxy proxy = this.getView().getService(IClientViewProxy.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Map<String, String> mpUrl = new HashMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        mpUrl.put("url", ssourl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        proxy.addAction("openUrl", mpUrl); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        this.getView().showTipNotification(returnMap.get("msg")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    this.getView().showTipNotification("获取单点url失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.getView().showTipNotification(returnMap.get("msg")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.getView().showTipNotification("获取单点url失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |