重现步骤

[步骤]




[14:32:57]  -------------------------------------------------------------
CODE:N1432571
Error:14_2627_1_-2146232060
SQL:drop table if exists #Tb_Items;
 CREATE TABLE #Tb_Items (Id NVARCHAR(200) PRIMARY KEY);;
insert into #Tb_Items 
exec proc_string_split @Items,',';SELECT * FROM RB_Procurement_CourierNum_SingleNo(NOLOCK)  a    inner join #Tb_Items o on a.CourierNum = o.Id  
PARAMS:@Items = YT7600424431729, YT7600424431729,YT7599299989854 ,
MESSAGE:Violation of PRIMARY KEY constraint 'PK__#Tb_Item__3214EC07FA9B6160'. Cannot insert duplicate key in object 'dbo.#Tb_Items'. The duplicate key value is (YT7600424431729).
The statement has been terminated.
TRACE:   在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   在 System.Data.SqlClient.SqlDataReader.get_MetaData()
   在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)   在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
   在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
   在 RB.DAL.RB_Procurement_CourierNum_SingleNo.GetModelsByCourierNums(List`1 courierNums)
   在 Biz.Irobotbox.ProcurementV2.ProcurementService.BatchAddCourierNumSingleNo(List`1 models, DALHelper db)
   在 Biz.ProcurementAbnormal.AbnormalProcedureService.ImportTrackNumber(Int32 nodeDetalId, Int32 customerId, String trackNumber, Int32 adminId, String userName, Int32 importMode)
   在 PandaBuy.ERP.Web.IrobotBox.ProcurementAbnormal.ResultUpload.ImportTracknumber()
   在 PandaBuy.ERP.Web.IrobotBox.ProcurementAbnormal.ResultUpload.Page_Load(Object sender, EventArgs e)
   在 System.Web.UI.Control.OnLoad(EventArgs e)
   在 System.Web.UI.Control.LoadRecursive()
   在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   在 System.Web.UI.Page.ProcessRequest()
   在 System.Web.UI.Page.ProcessRequest(HttpContext context)
   在 ASP.irobotbox_procurementabnormal_resultupload_aspx.ProcessRequest(HttpContext context)
   在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
   在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
   在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
   在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
   在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

[结果]


[期望]

修复错误
历史记录  
  1. 2026-01-29 14:39:03, 由 袁慧斌 创建。
  2. 2026-01-29 14:39:33, 由 李乐同 指派给 何建宝。
    修改了 指派给,旧值为 "liletong",新值为 "hejianbao"。
  3. 2026-01-29 14:40:17, 由 何建宝 编辑。
    修改了 严重程度,旧值为 "1",新值为 "2"。
    修改了 解决时效,旧值为 "0",新值为 "-1"。
  4. 2026-01-29 14:40:23, 由 何建宝 指派给 谢业福。
    修改了 指派给,旧值为 "hejianbao",新值为 "xieyefu"。
  5. 2026-01-29 16:04:40, 由 谢业福 解决,方案为 程序BUG 。
    修改了 解决方案,旧值为 "",新值为 "code"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2026-01-29 16:04:31"。
    修改了 指派给 ,旧值为 "xieyefu",新值为 "liuchao"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "xieyefu"。
  6. 2026-01-29 16:20:37, 由 陈莉珍 编辑。
    修改了 开发责任人,旧值为 "",新值为 "xieyefu"。
    修改了 测试责任人,旧值为 "",新值为 "liuchao"。
    修改了 解决时效 ,旧值为 "0",新值为 "1.42"。
    修改了 上线时间 ,旧值为 "0000-00-00 00:00:00",新值为 "2026-01-29 16:04:31"。
    修改了 上线时效 ,旧值为 "-1",新值为 "1.42"。
  7. 2026-01-29 16:21:07, 由 刘超 编辑。
    修改了 优先级,旧值为 "2",新值为 "3"。
  8. 2026-01-29 18:06:00, 由 刘超 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "liuchao",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "liuchao"。
    修改了 关闭日期,旧值为 "",新值为 "2026-01-29 18:06:00"。
所属项目 技术中心-需求池
所属模块 供应链   产品采购   采购
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 供应链管理中心
影响功能
开发责任人 谢业福
测试责任人 刘超
解决时效 1.42
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2026-01-29 18:06:00
截止日期 0000-00-00
上线时间 2026-01-29 16:04:31
上线时效 1.42
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 袁慧斌 于 2026-01-29 14:39:02
影响环境 生产环境-业务反馈
由谁解决 谢业福 于 2026-01-29 16:04:31
解决版本 主干
解决方案 程序BUG
由谁关闭 刘超 于 2026-01-29 18:06:00
最后修改 刘超 于 2026-01-29 18:06:00
相关Bug