[步骤]
测试环境:http://10.158.158.22:8080/Manager/index.aspx
合并单号:M202204061566199

[结果]
CODE:N1551052Error:16_8152_10_-2146232060
SQL:
DELETE FROM RB_OrderPackage_TransportRecord
WHERE CustomerID = @CustomerID
AND OrderCode IN ( SELECT item FROM dbo.CharSplitForIn(@orderCodes, '') );
PARAMS:@CustomerID = 1 ,@orderCodes = 202203241704825235,202203241706825246,202203241704825236,202203241705825237,202203241706825247,202203241725825248,202203241705825238,202203241705825239,202203241705825240,202203241705825241,202203241705825242,202203241705825243,202203241706825244,202204061433825299,202204061434825300,202204061434825301,202204061436825302,202204061436825303,202204061436825304,202204061436825321,202204061436825322,202204061436825323,202204061436825324,202204061436825325,202204061436825326,202204061436825327,202204061436825328,202204061437825329,202204061437825330,202204061436825305,202204061436825306,202204061436825307,202204061436825308,202204061436825309,202204061436825310,202204061436825311,202204061436825312,202204061436825313,202204061436825314,202204061436825315,202204061436825316,202204061436825317,202204061436825318,202204061436825319,202204061436825320,202204061437825331,202204061437825332,202204061437825333,202204061437825334 ,
MESSAGE:将截断字符串或二进制数据。
语句已终止。
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
在 RB.DAL.DBOperator.ExecuteSql(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms) 在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
在 RB.DAL.DBOperator.ExecuteSql(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms)
在 RB.DALExtend.RB_OrderPackage_TransportRecordExtend.DeleteByOrderCode(Int32 customerId, List`1 orderCodeLst)
在 PandaBuy.ERP.Web.IrobotBox.Restock.StockOrderCancelMerge.CancelMerge()
在 PandaBuy.ERP.Web.IrobotBox.Restock.StockOrderCancelMerge.OnPreInit(EventArgs e)
在 System.Web.UI.Page.PerformPreInit()
在 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.ProcessRequestWithNoAssert(HttpContext context)
在 System.Web.UI.Page.ProcessRequest(HttpContext context)
在 ASP.irobotbox_restock_stockordercancelmerge_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)
[期望]

开发报告
合并包裹解除关联原来改该功能就存在问题,订单号字符串是用逗号拼接的 ,但是在查询的sql中就没有用逗号进行拆分
导致多有订单号拼接的串去查询,
已优化,加上分割符逗号