【第12期】金蝶云·星空-协同开发 | 产品应用典型/热门问答精选 2023年9月发布原创
金蝶云社区-OUT_MAN
OUT_MAN
84人赞赏了该文章 1039次浏览 未经作者许可,禁止转载编辑于2024年02月05日 10:24:12
封面

各位社区的小伙伴们,大家好,我是  版主 OUT_MAN  @OUT_MAN


在金蝶云·星空-协同开发产品应用中,你需要了解的典型/热门问答都在这里!  

本帖每月持续更新,欢迎小伙伴们点赞,收藏本帖,CTRL+F关键词搜索,以便随时查看、扩充知识哟


【第12期】

  更新日期:2023-9


1、 公有云转私有云附件迁移问题,这个该怎么处理呢?

问题描述:
公有云转私有云附件迁移问题,这个该怎么处理呢?也按照说明配置的,但是报错: 
     
注:所有文件夹都赋了Network Service

image.png

解决方案:

公有云转私有云需要同时下载账套和附件备份到本地后进行恢复,

详情可以参考链接处理:星空公有云转线下私有云,附件映射文件服务器指南 (kingdee.com)

问题来源:https://vip.kingdee.com/link/s/ldvGr        


2、 怎么从WebApi中获取数据中心的列表?

问题描述:
我在WebAPI中找了好久没找到能返回数据中心列表的WebAPI。我想先获取数据中心列表渲染到页面再使用获取到的数据中心ID登录对应的数据中心。

解决方案:

WebAPI获取数据中心列表的接口URL地址:

http://ip:port/k3cloud/Kingdee.BOS.ServiceFacade.ServicesStub.Account.AccountService.GetDataCenterList.common.kdsvc

问题来源:https://vip.kingdee.com/link/s/ldvch 


3、 无法从用法中推断出方法“ServiceHelper.GetService()”的类型参数

问题描述:
无法从用法中推断出方法“ServiceHelper.GetService()”的类型参数

image.png

解决方案:

看到这个<T>了吗,要加一个类型;

image.png


比如:

IDBService service = ServiceHelper.GetService<IDBService>();

image.png

问题来源:https://vip.kingdee.com/link/s/ldvpn 


4、 bos签出提示System.Collections.ListDictionaryInternal,扩展没问题

问题描述:
发生时间:	2023-09-20 15:48:02
错误来源:	mscorlib
错误信息:	The node 'D:\WorkSpace\QZOR\银利达\DataModel_20\XSYFX_5abbbf1b\550c78d5-32e1-4ac8-a0b6-55ed47552f73.2052.dymx' was not found.
===================================================
调用堆栈:

Server stack trace: 
   at Kingdee.BOS.VersionControl.SVNSCCProvider.svnClient_SvnError(Object sender, SvnErrorEventArgs e)
   at SharpSvn.SvnClient.raise_SvnError(Object sender, SvnErrorEventArgs e)
   at SharpSvn.SvnClient.OnSvnError(SvnErrorEventArgs e)
   at SharpSvn.SvnClient.HandleClientError(SvnErrorEventArgs e)
   at SharpSvn.SvnClientArgs.HandleResult(SvnClientContext client, SvnException error, Object targets)
   at SharpSvn.SvnClientArgs.HandleResult(SvnClientContext client, svn_error_t* error, Object targets)
   at SharpSvn.SvnClient.Resolve(String path, SvnAccept choice, SvnResolveArgs args)
   at Kingdee.BOS.VersionControl.SVNSCCProvider.Add(String[] items, Boolean immediatelyDo, String comment)
   at Kingdee.BOS.VersionControl.SVNSCCProvider.MyRemoteLock(String path)
   at Kingdee.BOS.VersionControl.SVNSCCProvider.CheckOut(String[] items)
   at Kingdee.BOS.IDE.Core.AbstractNode.CheckOut(IViewManager isv, Boolean recursion, Boolean AutoUpdate)
   at Kingdee.BOS.IDE.Designer.BizObjectNode.<>n__FabricatedMethod29(IViewManager , Boolean , Boolean )
   at Kingdee.BOS.IDE.Designer.BizObjectNode.<>c__DisplayClass27.<CheckOut>b__26()
   at Kingdee.BOS.IDE.Designer.BizObjectNode.<>c__DisplayClass2b.<CallWithTimeout>b__2a()
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at System.Action.EndInvoke(IAsyncResult result)
   at Kingdee.BOS.IDE.Designer.BizObjectNode.CallWithTimeout(Action action, Int32 timeoutMilliseconds)
   at Kingdee.BOS.IDE.Designer.BizObjectNode.CheckOut(IViewManager isv, Boolean recursion, Boolean AutoUpdate)
   at Kingdee.BOS.IDE.Core.Utils.CheckOut(AbstractNode abstractNode, IViewManager ivm)
   at Kingdee.BOS.IDE.Core.Utils.CheckOutCommand(AbstractNode abstractNode, IViewManager ivm)
   at Kingdee.BOS.DomainModelDesigner.ViewManager.MDIParent_BarItemClick(Object sender, BarItemClickArgs e)
   at Kingdee.BOS.IDE.frmMain.barManager_ItemClick(Object sender, ItemClickEventArgs e)
错误数据:	System.Collections.ListDictionaryInternal

解决方案:

尝试以下操作

刷新SVN节点

image.png

移除对象后重新引入

image.png

问题来源:https://vip.kingdee.com/link/s/ldv6J  

        

5、 金蝶云星空客户端每隔1-3天左右突然就会变的很卡,无法正常使用

问题描述:
金蝶云星空客户端每隔1-2天左右突然就会变的很卡,无法正常使用,而且是不定时的,有时候白天,有时候晚上。随时都有可能会卡死,每次都需要重启数据库服务器,就可以恢复正常。这种是什么原因造成的?

SQL索引每周是有正常运行的

image.png

解决方案:

应该是CPU爆了把  数据库服务占用太大 把数据库服务器内存设置小点

image.png

问题来源:https://vip.kingdee.com/link/s/ldvoo 


6、 DBUtils.ExecuteScalar 函数是干啥的

问题描述:
decimal num5 = DBUtils.ExecuteScalar<decimal>(base.KDContext.Session.AppContext, text10, 0m, new SqlParam[0]);

DBUtils.ExecuteScalar 函数是干啥的
各参数是啥

解决方案:

DBUtils.ExecuteScalar函数的用途是:

执行某个SQL并获取第一行第一列的值,如果数据未找到或为DBNULL,那么将返回缺省值

入参说明:

   第一个参数:ctx,即上下文。

   第二个参数:strSql,即要执行的SQL语句。

  第三个参数:defaultValue,即默认值,如果执行SQL查不到任何数据记录或为DBNULL,那么函数将返回此默认值。

 第四个参数:paramList,即查询参数列表,可以理解为SQL语句中的动态过滤条件,可以强制指定为null,这样就不需要操心这个参数的组织了。


返回值说明:

SQL查询结果,如果查不到,则返回第三个参数指定的默认值。

代码示例

示例根据条件获取记录数,若没有数据,记录数为0
C#Copy Code
string sql = " SELECT COUNT(1) FROM T_DEMO ";
int count = DBUtils.ExecuteScalar<int>(this.Context, sql, 0, null);


问题来源:https://vip.kingdee.com/link/s/ldv2s


7、 bos设计器可以正常登录,所有项目点击开发都提示未能从程序集“Kingdee.BOS.VersionControl

问题描述:
bos设计器可以正常登录,所有项目点击开发都提示未能从程序集“Kingdee.BOS.VersionControl。有没有大神知道怎么处理?错误详情如下:发生时间:	2023-09-19 17:53:48错误来源:	System.Windows.Forms错误信息:	未能从程序集“Kingdee.BOS.VersionControl, Version=8.1.620.12, Culture=neutral, PublicKeyToken=null”中加载类型“Kingdee.BOS.VersionControl.SvnIDEStatus”。===================================================调用堆栈:   在 System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)   在 System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)   在 System.Windows.Forms.Control.Invoke(Delegate method)   在 Kingdee.BOS.WinForm.KDWaitForm.<>c__DisplayClass5.<PrivateDoTask>b__4()   在 Kingdee.BOS.WinForm.KDWaitForm.PrivateDoTask(Form owner, Action act)   在 Kingdee.BOS.WinForm.KDWaitForm.OnShown(EventArgs e)   在 System.Windows.Forms.Form.CallShownEvent()   在 System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)   在 System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)   在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)   在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   在 System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)   在 System.Windows.Forms.Control.InvokeMarshaledCallbacks()错误数据:	System.Collections.ListDictionaryInternal

解决方案:

环境出问题了,参考下列步骤卸载、重装一下

1、打开下图所示文件夹,找到Kingdee.BOS.DeskClient.Shell

image.png

2、双击打开Kingdee.BOS.DeskClient.Shell

image.png

3、找到Bos设计器(金蝶云星空集成开发平台)选项,点击“卸载”按钮

image.png


4、卸载成功后Bos设计器将会从列表中移除,桌面快捷图标也会被清理

注意:卸载成功后需关闭Kingdee.BOS.DeskClient.Shell程序,否则所有客户端将无法启动

image.png


【安装】

1、登陆云星空后台,点击右上角个人图像弹出下拉选项,根据操作系统位数选择安装相应的Bos设计器

image.png

2、安装过程如下,为全自动安装无须任何操作

image.png

安装完成后弹出如下所示登陆窗口

image.png

并生成相应的桌面快捷图标,至此安装完成

image.png

问题来源:https://vip.kingdee.com/link/s/ldv1H


8、 查询出现异常。System.IO.FileLoadException: 未能加载文件或程序集“Newtonsoft.Js

问题描述:
查询出现异常。System.IO.FileLoadException: 未能加载文件或程序集“Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
文件名:“Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”

Server stack trace:
在 YFCPSRHCBTJB_20230918_ShangJunLong.ServicePlugIn.Class3.BuilderReportSqlAndTempTable(IRptParams filter, String tableName)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.CreateTempTable(IRptParams filter, String tablename)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetDataForVirtual(IRptParams filter)
在 Kingdee.BOS.Core.Report.PlugIn.AbstractSysReportServicePlugIn.GetData(IRptParams filter)
在 Kingdee.BOS.App.Core.PlugInProxy.SysReportServicePlugInProxy.GetReportData(ReportServiceParameter parameter) 位置 d:\k3cloudbuild\BOS_V7_PT\BOS\App\Src\Kingdee.BOS.App.Core\PlugInProxy\SysReportServicePlugInProxy.cs:行号 185
在 Kingdee.BOS.App.Core.SysReportService.GetReportData(ReportServiceParameter parameter) 位置 d:\k3cloudbuild\BOS_V7_PT\BOS\App\Src\Kingdee.BOS.App.Core\Report\SysReportService.cs:行号 80

Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISysReportService.GetReportData(ReportServiceParameter parameter)
在 Kingdee.BOS.ServiceHelper.SysReportServiceHelper.GetReportData(ReportServiceParameter parameter) 位置 d:\k3cloudbuild\BOS_V7_PT\BOS\Common\Src\Kingdee.BOS.ServiceHelper\Report\SysReportServiceHelper.cs:行号 97
在 Kingdee.BOS.Model.Report.SysReportModel.GetData(Int32 start, Int32 rows)
在 Kingdee.BOS.Web.Report.SysReportView.GetListData()
在 Kingdee.BOS.Web.Report.SysReportView.QueryReportData(ApmConfig apmConfig, String processPageId)

警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。
搜索方案中

image.png

解决方案:

  • 你要引用系统版本的DLL(IIS上的dll、工作区里的dll) 4.0的不然会出现版本冲突

  • 发现同一依赖程序集的不同版本间存在无法解决的冲突 这一警告

  • 或者第三方的程序配置文件 App.config 或 Web.config文件

方案1:

  • 通过bindingRedirect节点,即当找到7.0的版本时,给定向到4.0版本试试 修改前记得备份

   <bindingRedirect oldVersion="7.0.0.0" newVersion="4.0.0.0" />

方案2:

  • 对每个版本指定codeBase路径,然后分别放上不同版本的程序集,这样就可以加载两个相同的程序集

runtime>
	 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
	      <dependentAssembly>
	          <assemblyIdentity name="Newtonsoft.Json"
	                            publicKeyToken="30ad4fe6b2a6aeed"
	                            culture="neutral" />
	          <codeBase version="4.0.0.0"
	                    href="E:\4.0\Newtonsoft.Json.dll" />
	      </dependentAssembly>
	      <dependentAssembly>
	          <assemblyIdentity name="Newtonsoft.Json"
	                            publicKeyToken="30ad4fe6b2a6aeed"
	                            culture="neutral" />
	          <codeBase version="7.0.0.0"
	                    href="E:\7.0\Newtonsoft.Json.dll" />
	      </dependentAssembly>
	  </assemblyBinding>
</runtime>
————————————————

原文链接:Newtonsoft.Json版本不一致问题解决

问题来源:https://vip.kingdee.com/link/s/ldvw8 


 

我创建了<<协同开发,轻松入门>>的学习清单,推荐给你,和我一起学习交流吧!

<<协同开发,轻松入门>>


查看往期精选:

【汇总】金蝶云·星空-协同开发 | 产品应用典型/热门问答精选

 

赞 84