Parcourir la source

修改发票链接访问方式

yaoyu il y a 1 an
Parent
commit
6d5363d1c6
1 fichiers modifiés avec 13 ajouts et 4 suppressions
  1. 13 4
      arap/arap/src/client/nc/ui/arap/bill/LinkHyperListener.java

+ 13 - 4
arap/arap/src/client/nc/ui/arap/bill/LinkHyperListener.java

@@ -2,6 +2,9 @@ package nc.ui.arap.bill;
 
 import java.net.URL;
 
+import nc.bs.framework.common.InvocationInfoProxy;
+import nc.bs.framework.common.NCLocator;
+import nc.itf.th.IThOcrService;
 import nc.sfbase.client.ClientToolKit;
 import nc.ui.pub.bill.BillCardPanel;
 import nc.ui.pub.bill.BillItemHyperlinkEvent;
@@ -13,6 +16,7 @@ public class LinkHyperListener implements BillItemHyperlinkListener{
 
 	private BillCardPanel billCardPanel;
 	private BillListPanel billListPanel;
+	private String billmaker = InvocationInfoProxy.getInstance().getUserId();
 	
 	public LinkHyperListener(BillCardPanel billCardPanel) {
         this.billCardPanel = billCardPanel;
@@ -24,14 +28,19 @@ public class LinkHyperListener implements BillItemHyperlinkListener{
 	
 	@Override
 	public void hyperlink(BillItemHyperlinkEvent event) {
-		if ("def41".equals(event.getItem().getKey())) {
-			String val = event.getValue().toString();
 			try {
-				ClientToolKit.showDocument(new URL(val), "_blank");
+				if ("def41".equals(event.getItem().getKey())) {
+					String val = event.getValue().toString();
+					if(val.indexOf("mypiaojia") != -1){
+						IThOcrService  ocrservice = (IThOcrService) NCLocator.getInstance().lookup(IThOcrService.class.getName());
+						val += "&token="+ocrservice.getToken(billmaker);
+					}
+					ClientToolKit.showDocument(new URL(val), "_blank");
+				}
 			} catch (Exception e) {
 				ExceptionUtils.wrappBusinessException(e.getMessage());
 			}
-		}
+		
 	}