重现步骤

[步骤]

CODE:N0027014
Error:15_102_1_-2146232060
SQL:
               SELECT Count(1) FROM  dbo.RB_OrderInfo  oi (NOLOCK)
                    INNER JOIN RB_OrderInfo_BeikuExpand ep  (NOLOCK)
                             ON oi.CustomerID = ep.CustomerID
                                               AND oi.OrderCode = ep.OrderCode
                                LEFT OUTER JOIN RB_OrderSource (NOLOCK) os
                                    ON oi.OrderSourceID = os.ID
                                       AND oi.CustomerID = os.CustomerID
                                LEFT OUTER JOIN RB_Transport (NOLOCK) ts
                                    ON oi.TransportID = ts.ID
                                       AND oi.CustomerID = ts.CustomerID
                                LEFT JOIN RB_Transport (NOLOCK) secondts
                                    ON secondts.ID = ep.SecondTransportID AND secondts.CustomerID=ep.CustomerID
                                LEFT JOIN dbo.RB_WareHouse (NOLOCK) wh
                                    ON oi.CustomerID = wh.CustomerID
                                       AND oi.WareHouseID = wh.ID
                                LEFT JOIN dbo.RB_WareHouse (NOLOCK) towh
                                    ON oi.CustomerID = towh.CustomerID
                                       AND oi.ToWareHouseID = towh.ID
                                 LEFT JOIN RB_OrderInfo_Beiku (NOLOCK) beiku
                                    ON beiku.CustomerID = oi.CustomerID
                                       AND beiku.OrderCode = oi.OrderCode
                                LEFT JOIN RB_RestockOrder_ApprovalExecutor(NOLOCK) ae ON ae.CustomerId = oi.CustomerID  AND ae.OrderCode = oi.OrderCode                                 
                                LEFT JOIN RB_Admin rba WITH(nolock) ON rba.CustomerID = os.CustomerID AND rba.ID = os.SaleAdminID
                                LEFT JOIN RB_BusinessTeam bt WITH(nolock) ON bt.CustomerID = os.CustomerID AND bt.ID = rba.BusinessTeamID
                            WHERE oi.CustomerID = @CustomerID
                                  AND oi.IsSystem = 0
                                  AND oi.IsStockOrder = 1 AND ep.OrderBuildType=3 AND towh.WareHouseType <>1 AND towh.WareHouseType <>3  AND wh.WareHouseType =1   AND oi.AddTime >=@StartTime   AND oi.AddTime<=@EndTime  AND ep.IsShipOnReceipt = 1  AND ep.IsShipOnReceipt = 1  AND oi.OrderStatus IN ( 订单状态(可多选) ) AND oi.OrderCode IN ( SELECT d.MergerPackageNo
                                                  FROM RB_Procurement_Order_Package d WITH (NOLOCK)
                                                  WHERE d.CustomerID = @CustomerID AND d.ID in (SELECT item FROM dbo.CharSplitForIn(@KeyWordStr,',')) )  option(recompile,maxdop 16)
PARAMS:@CustomerID = 1 ,@StartTime = 2023/7/6 0:00:00 ,@EndTime = 2024/3/5 23:59:59 ,@KeyWordStr = 46627290,46158076,45939682,45777727,45739520,45717167,45710704,45624402,46995839,46221187,46135142,46135137,46009872,46010075,45939689,45939684,45918119,45799730,45739916,45739895,45566717,45339625,45275038 ,
MESSAGE:Incorrect syntax near '('.
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.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.ExecuteScalar()
   在 RB.DAL.DBOperator.GetSingle(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)   在 RB.DAL.DBOperator.toCommonTipException(SqlException ex, String sql, SqlParameter[] cmdParms)
   在 RB.DAL.DBOperator.GetSingle(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
   在 RB.DALExtendV2.RB_OrderInfoExtendV2.GetOverseaModelListForReStock(CM_OverSeaOrderListParam param, Int32& recordCount)
   在 PandaBuy.ERP.Web.IrobotBox.Restock.OverSea.OverSeaOrderList.Page_Load(Object sender, EventArgs e)
   在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(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.ProcessRequestWithNoAssert(HttpContext context)
   在 System.Web.UI.Page.ProcessRequest(HttpContext context)
   在 ASP.irobotbox_restock_oversea_overseaorderlist_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)

[结果]


[期望]

修复 错误 
历史记录  
  1. 2024-03-06 11:44:18, 由 袁慧斌 创建。
  2. 2024-03-06 11:45:46, 由 李乐同 指派给 程伟。
    修改了 指派给,旧值为 "liletong",新值为 "chengwei"。
  3. 2024-03-06 12:07:19, 由 程伟 指派给 鞠智明。
    修改了 指派给,旧值为 "chengwei",新值为 "juzhiming"。
  4. 2024-03-06 16:29:55, 由 鞠智明 解决,方案为 非BUG-纯属误判 。
    修改了 解决方案,旧值为 "",新值为 "feiBUG"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2024-03-06 16:27:19"。
    修改了 指派给 ,旧值为 "juzhiming",新值为 "yuanhuibin"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "juzhiming"。

    正式环境按着客户操作没有问题


    针对订单状态拼接sql导致报错  有一个一个优化


  5. 2024-03-07 16:42:26, 由 刘超 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "yuanhuibin",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "liuchao"。
    修改了 关闭日期,旧值为 "",新值为 "2024-03-07 16:42:26"。

所属项目 技术中心-需求池
所属模块 供应链   仓储物流   备库订单
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P1
Bug状态 已关闭
业务部门
影响功能
开发责任人
测试责任人
解决时效 0
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2024-03-07 16:42:26
截止日期 0000-00-00
上线时间
上线时效
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 袁慧斌 于 2024-03-06 11:44:17
影响环境 577
由谁解决 鞠智明 于 2024-03-06 16:27:19
解决版本 主干
解决方案 非BUG-纯属误判
由谁关闭 刘超 于 2024-03-07 16:42:26
最后修改 刘超 于 2024-03-07 16:42:26
相关Bug