环境:K3 Cloud 5.1
描述:在列表界面只选一张单时不会出现,而选择多张单据则会出现此问题。
代码截图:
问题:请该如何优化或者修改此代码?
报错详情:
[{"operation":"STK_InvCheckResult.BClick.FBTNOK."}]
发生时间:10:36:20
错误来源: Kingdee.BOS.ServiceHelper
错误信息:此操作对该事务的状态无效。
===================================================
调用堆栈:
Server stack trace:
在 System.Transactions.TransactionState.EnlistPromotableSinglePhase(InternalTransaction tx, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
在 System.Transactions.Transaction.EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
在 System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
在 System.Data.ProviderBase.DbConnectionPool.PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, Transaction transaction)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
在 System.Data.SqlClient.SqlConnection.Open()
在 Kingdee.BOS.App.Data.AbstractDatabase.GetNewOpenConnection()
在 Kingdee.BOS.App.Data.TransactionScopeConnections.GetConnection(IDatabase db)
在 Kingdee.BOS.App.Data.AbstractDatabase.GetOpenConnection(Boolean disposeInnerConnection)
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteScalar(DbCommand command, SqlParam[] paramList)
在 Kingdee.BOS.App.Data.DBUtils.ExecuteScalar(Context ctx, String strSQL, List`1 paramList)
在 Kingdee.BOS.App.Core.SequenceReader.HasSqlServerTable(String tableName)
在 Kingdee.BOS.App.Core.SequenceReader.VerifyAndCreateSequence(String key, Boolean isInt32)
在 Kingdee.BOS.App.Core.AbstractOprerationService.VerifyAndCreateSequenceByAllTable(BusinessInfo info, SequenceReader seqReader)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperatinTransaction(DynamicObject[] objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(DynamicObject[] dataEntities)
在 Kingdee.BOS.App.Core.SaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataEntities, OperateOption option, String operationNumber)
Exception rethrown at [0]:
在 Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.Save(Context ctx, BusinessInfo businessInfo, DynamicObject[] dataObject, OperateOption option, String operationNumber)
在 XC_kingdee.Business.HeyGears.Service.WaiFaZuZhuangbtn.EndOperationTransaction(EndOperationTransactionArgs e) 位置 d:\插件\XC_kingdee.Business.HeyGears.Service\XC_kingdee.Business.HeyGears.Service\5WaiFaZuZhuangbtn.cs:行号 194
【第194行的代码为:Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.Save(this.Context, ContainerTrackBill.BusinessInfo, dtlist.ToArray());】
在 Kingdee.BOS.App.Core.PlugInProxy.OperationServicePlugInProxy.FireEndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperatinTransaction(DynamicObject[] objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(Object[] ids)
在 Kingdee.BOS.App.Core.SetStatusService.SetBillStatus(Context ctx, BusinessInfo businessInfo, List`1 pkEntryIds, List`1 paras, String operationNumber, OperateOption option)
Exception rethrown at [1]:
在 Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.SetBillStatus(Context ctx, BusinessInfo businessInfo, List`1 pkEntryIds, List`1 paras, String operationNumber, OperateOption option)
在 Kingdee.BOS.Business.Bill.Operation.AbstractStatusConvert.BatStatusConvert(Int32 loopTimes, Int32 iBat, Object[] ids, List`1 paras)
在 Kingdee.BOS.Business.Bill.Operation.AbstractStatusConvert.ExecuteStatusConvert(List`1 paras)
在 Kingdee.BOS.Business.Bill.Operation.UnAudit.UnAuditIdeaPrompt()
在 Kingdee.BOS.Business.Bill.Operation.UnAudit.ExecuteOperation()
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Operation(CallBackWfAfterOperation callbackwf, IOperationResult result)
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Execute(InvokeFormOperation4WfParam param, CallBackWfAfterOperation callbackwf)
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.RedoOperation(FormResult formResult, IInteractionResult result)
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.<>c__DisplayClass11.
在 Kingdee.BOS.Web.DynamicForm.DynamicWebFormView.DoCallBackAction(Object returnData, Action`1 action)
在 Kingdee.BOS.Web.DynamicForm.DynamicWebFormView.FormClosedCallBack(String id, Boolean isSyncCall)
在 Kingdee.BOS.Web.DynamicForm.AbstractDynamicWebFormView.CloseWindow()
在 Kingdee.BOS.Web.DynamicForm.AbstractDynamicWebFormView.OnClose()
在 Kingdee.BOS.Core.DynamicForm.PlugIn.DynamicFormViewPlugInProxy.FireButtonClick(ButtonClickEventArgs e)
在 Kingdee.BOS.Web.DynamicForm.DynamicWebFormView.ButtonClick(String key, String menuKey)
在 Kingdee.BOS.Web.DynamicForm.DynamicWebFormController.ButtonClick(String buttonKey, String menuKey, JSONArray postDatas)
错误数据: System.Collections.ListDictionaryInternal
推荐阅读