找回密码
 注册账号

QQ登录

只需一步,快速开始

手机号码,快捷登录

手机号码,快捷登录

初学者课程:T3自学|T6自学|U8自学软件下载课件下载工具下载资料:通资料|U8资料|NC|培训|年结积分规则 | 使用常见问题Q&A
知识库:U8 | | NC | U9 | OA | 政务U8|U9|NCC|NC65|NC65客开|NCC客开新手必读 | 任务 | 快速增金币用友QQ群[微信群]
查看: 13998|回复: 6

[学习] NC6x上下文环境

[复制链接]
发表于 2020-12-16 08:49:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册账号

×
nc.bs.framework.common.RuntimeEnv
nc.bs.framework.server.BusinessAppServer
InvocationInfoProxy
WorkbenchEnvironment
ClientEnvironment
//后端获取客户端信息
ClientInvocationInfo.getClientInvocationInfo()

客户端获得上下文
groupCode = WorkbenchEnvironment.getInstance().getGroupVO().getCode();
acountCode = WorkbenchEnvironment.getInstance().getLoginBusiCenter().getCode();
serverURL = WorkbenchEnvironment.getServerURL();

后端获得上下文:
acountCode =InvocationInfoProxy.getInstance().getBizCenterCode()
String account=InvocationInfoProxy.getInstance().getBizCenterCode();
String groupid=InvocationInfoProxy.getInstance().getGroupId();
String serverBase = BusinessAppServer.getInstance().getServerBase() ;  获得home目录

nc.bs.framework.server.ClientRequestHolder
ServerConfiguration config = ServerConfiguration.getServerConfiguration()
String serverUrl= config.getServerEndpointURL(config.getServerName());


 楼主| 发表于 2021-4-13 12:58:34 | 显示全部楼层
在private 代码中获取外部交换平台的地址:                        String account=InvocationInfoProxy.getInstance().getBizCenterCode();
                        String groupid=this.queryCodeByPk("org_group", "code", "pk_group", InvocationInfoProxy.getInstance().getGroupId())   ;
                        ServerConfiguration config = ServerConfiguration.getServerConfiguration();
                        String serverUrl = config.getServerEndpointURL(config.getServerName());
                        URL url =new URL(serverUrl);
                        String pfxxUrl =serverUrl.replaceAll(url.getPath(), "")+"/service/XChangeServlet?account="+account+"&groupcode=" + groupid;

回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2021-6-18 16:47:51 | 显示全部楼层
                // XXX:leijun+2009-8 增加服务器信息   
                ServerInstance si = NCLocator.getInstance().lookup(LiveServerAgent.class).getServerInstance();
               //类全名:nc.bs.framework.server.LiveServerAgent
               
                // wl.setServername(si.getName());
                wl.setServername(si.getName() + "/" + si.getAddress());
                wl.setServerinstanceid(si.getInstanceId());
回复 点赞 拍砖

使用道具 举报

发表于 2021-6-28 21:20:55 | 显示全部楼层
回复 点赞 拍砖

使用道具 举报

发表于 2021-6-30 15:25:17 | 显示全部楼层
这个有嘛用呀,没看懂你发的
回复 点赞 拍砖

使用道具 举报

 楼主| 发表于 2021-11-29 08:56:22 | 显示全部楼层
nc.bs.framework.common.RuntimeEnv
nc.bs.framework.server.BusinessAppServer
InvocationInfoProxy
WorkbenchEnvironment
ClientEnvironment
//后端获取客户端信息
ClientInvocationInfo.getClientInvocationInfo()

客户端获得上下文
groupCode = WorkbenchEnvironment.getInstance().getGroupVO().getCode();
acountCode = WorkbenchEnvironment.getInstance().getLoginBusiCenter().getCode();
serverURL = WorkbenchEnvironment.getServerURL();

后端获得上下文:
acountCode =InvocationInfoProxy.getInstance().getBizCenterCode()
String account=InvocationInfoProxy.getInstance().getBizCenterCode();
String groupid=InvocationInfoProxy.getInstance().getGroupId();
String serverBase = BusinessAppServer.getInstance().getServerBase() ;  获得home目录

nc.bs.framework.server.ClientRequestHolder
ServerConfiguration config = ServerConfiguration.getServerConfiguration()
String serverUrl= config.getServerEndpointURL(config.getServerName());

回复 点赞 拍砖

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号

本版积分规则

QQ|站长微信|Archiver|手机版|小黑屋|用友之家 ( 蜀ICP备07505338号|51072502110008 )

GMT+8, 2024-4-25 11:54 , Processed in 0.033405 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表