执行【成本管理】-【存货核算】-【合法性检查报告】,提示如下,请问如何解决?
违反了 PRIMARY KEY 约束 'PK_STK_INSTOCKPURCOST'。不能在对象 'dbo.T_STK_INSTOCKPURCOST' 中插入重复键。
语句已终止。 StackTrace : at Kingdee.BOS.App.Data.Sql.SqlDatabase.CopyDataToDestination(SqlConnection cn, DataTable table)
at Kingdee.BOS.App.Data.Sql.SqlDatabase.BulkInserts(DbCommand cmd, DataTable dt)
at Kingdee.BOS.App.Data.DBUtils.BulkInserts(Context ctx, String InsertstrSql, String CreateSql, DataTable dt)
at Kingdee.BOS.App.Data.DBUtils.BulkInserts(Context ctx, DataTable dt)
at Kingdee.K3.FIN.HS.App.Core.StorageAccount.MutiPushCalIn.UpdateData.UpdateSrcStockBillData(Context ctx, List`1 stockHookDataList, StorageAccountParaEx storagePara, List`1 instockConfigList)
at Kingdee.K3.FIN.HS.App.Core.StorageAccount.MutiPushCalIn.MutiPushCal.UpdateStockBillData()
at Kingdee.K3.FIN.HS.App.Core.StorageAccount.MutiPushCalIn.MutiPushCal.CaculateCost(Context ctx, StorageAccountPara para)
at Kingdee.K3.FIN.HS.App.Core.HookService.DoCalMaterialCostForMutiPush(Context ctx, StorageAccountPara storagePara)
at Kingdee.K3.FIN.HS.App.Core.HookService.HookCalForList(Context ctx, StorageAccountPara storagePara, List`1 lstHookID)
at Kingdee.K3.FIN.HS.App.Core.HookService.WizardCalMaterialCost(Context ctx, List`1 paraList, Boolean autoCalOtherData)
at Kingdee.K3.FIN.HS.App.Core.OutStockAcctg.HSAutoCalculate.DoCalculate()
at Kingdee.K3.FIN.HS.App.Core.OutStcokCostAcctg.BeforeOutStockAcctg(Context ctx, OutStockAcctgParameters acctgParameters)
at Kingdee.K3.FIN.App.Core.OutAcctg.AbstractAcctgService.BeforeExecution[T](Context ctx, T acctgParameters)
at Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.BeforeExecuteServiceForShedule[T,K](Context ctx, T acctgParameters, CostAcctgServiceObject`1 service)
at Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.ExecutionBatchServiceObject[T,K](Context ctx, T acctgParameters, Dictionary`2 services, CostCalType calType, List`1 checkAttrs, Boolean isLast)
at Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencil.OutStockAcctg(ComputeContext ctx, OutStockAcctgParameters acctgParameters)
at Kingdee.K3.FIN.App.Core.OutAcctg.AcctgStencilService.CostAcctg(ComputeContext ctx, OutStockAcctgParameters acctgParameters)
推荐阅读