存货核算反结账报错
金蝶云社区-漠北
漠北
0人赞赏了该文章 1,290次浏览 未经作者许可,禁止转载编辑于2016年11月03日 13:26:45

存货核算反结账报错
异步任务执行失败System.AggregateException: One or more errors occurred. ---> Kingdee.BOS.KDExceptionDatabase: 违反了 PRIMARY KEY 约束“PK_CB_COSTCALRESULTDETAIL”。不能在对象“dbo.T_CB_COSTMATTERIALDETAIL”中插入重复键。重复键值为 (137594643)。
语句已终止。 ---> System.Data.SqlClient.SqlException: 违反了 PRIMARY KEY 约束“PK_CB_COSTCALRESULTDETAIL”。不能在对象“dbo.T_CB_COSTMATTERIALDETAIL”中插入重复键。重复键值为 (137594643)。
语句已终止。
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Kingdee.BOS.App.Data.Sql.SqlDatabase.ExecuteBatch(List`1 sqlArray, Int32 batchSize, Int32 commandTimeout)
--- End of inner exception stack trace ---
at Kingdee.K3.FIN.App.Core.CommonFunction.DoCheckOutUnCheckOutAction(Context ctx, CheckOutParameters para, CheckOutUnCheckOutAction action, CheckOutItem item, Boolean withTransAction)
at Kingdee.K3.FIN.CB.App.Core.CBCheckOutUnCheckOut.TurnHistoryDataToSource(Context ctx, CheckOutParameters param)
at Kingdee.K3.FIN.CB.App.Core.CBCheckOutUnCheckOut.UnCheckOut(Context ctx, CheckOutParameters unCheckOutParam)
at Kingdee.K3.FIN.HS.App.Core.CheckOutSerice.CheckOutUnCheckOut(Context ctx, CheckOutParameters jsonParameters, IOperationResult operationResult)
at Kingdee.K3.FIN.HS.App.Core.CheckOutSerice.Start(Context ctx, CheckOutParameters jsonParameters, Boolean checkMinStock)
at Kingdee.K3.FIN.HS.ServiceHelper.CheckOutSericeHelper.Start(Context ctx, CheckOutParameters jsonParameters, Boolean checkMinStock)
at Kingdee.K3.FIN.HS.Business.PlugIn.CheckOutUNCheckOutEdit.Start()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) Kingdee.BOS.KDExceptionDatabase: 违反了 PRIMARY KEY 约束“PK_CB_COSTCALRESULTDETAIL”。不能在对象“dbo.T_CB_COSTMATTERIALDETAIL”中插入重复键。重复键值为 (137594643)。
语句已终止。 ---> System.Data.SqlClient.SqlException: 违反了 PRIMARY KEY 约束“PK_CB_COSTCALRESULTDETAIL”。不能在对象“dbo.T_CB_COSTMATTERIALDETAIL”中插入重复键。重复键值为 (137594643)。
语句已终止。
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Kingdee.BOS.App.Data.Sql.SqlDatabase.ExecuteBatch(List`1 sqlArray, Int32 batchSize, Int32 commandTimeout)
--- End of inner exception stack trace ---
at Kingdee.K3.FIN.App.Core.CommonFunction.DoCheckOutUnCheckOutAction(Context ctx, CheckOutParameters para, CheckOutUnCheckOutAction action, CheckOutItem item, Boolean withTransAction)
at Kingdee.K3.FIN.CB.App.Core.CBCheckOutUnCheckOut.TurnHistoryDataToSource(Context ctx, CheckOutParameters param)
at Kingdee.K3.FIN.CB.App.Core.CBCheckOutUnCheckOut.UnCheckOut(Context ctx, CheckOutParameters unCheckOutParam)
at Kingdee.K3.FIN.HS.App.Core.CheckOutSerice.CheckOutUnCheckOut(Context ctx, CheckOutParameters jsonParameters, IOperationResult operationResult)
at Kingdee.K3.FIN.HS.App.Core.CheckOutSerice.Start(Context ctx, CheckOutParameters jsonParameters, Boolean checkMinStock)
at Kingdee.K3.FIN.HS.ServiceHelper.CheckOutSericeHelper.Start(Context ctx, CheckOutParameters jsonParameters, Boolean checkMinStock)
at Kingdee.K3.FIN.HS.Business.PlugIn.CheckOutUNCheckOutEdit.Start()
at System.Threading.Tasks.Task.Execute()<---