重现步骤

[步骤]

[10:58:05]  [200] [http://888.zhcxkj.com:8093/IrobotBox/Delivery/OrderPackageListV2Main.aspx][10.17.40.166][10.17.40.166/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Http_Referer[https://888.zhcxkj.com/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Message: 数据库处理错误,请联系智汇技术!标识:N10580519--GetType(): Exception--Source: RB.DAL--StackTrace:    在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)
   在 RB.DALExtend.Generate.RB_Procurement_Order_PackageExtend.PackageStatistics(Int32 customerID, CM_StatisticsParam statisticsParam, String orderByType)
   在 PandaBuy.ERP.Web.IrobotBox.Delivery.OrderPackageListV2Main.StatisticsSearch()
   在 System.EventHandler.Invoke(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)



content:[10:58:05]  -------------------------------------------------------------

CODE:N10580519

Error:16_8120_1_-2146232060

SQL:SELECT TOP 50 a.*,

              pro.ImageUrl,

              pro.ProductNameCN,

              whp.PositionCode,

              pro.ClientSKU

FROM   (SELECT d.SKU,

               d.ProductNum,

               p.TransportID,

               Count(0)       PackageNum,

               p.CustomerID,

               p.WareHouseID,

               Isnull(CASE

                        WHEN pro.PlugRelate = 1 THEN c.Plug

                        ELSE ''

                      END, '')Plug,

               t.TransportName,

               w.WareHouseName,p.IsCancelPackagePrintToZFCD

        FROM   RB_Procurement_Order_Package p WITH(nolock)

               INNER JOIN RB_Procurement_Order_Package_Detail d WITH(nolock)

                 ON p.ID = d.PackageID

                    AND p.CustomerID = d.CustomerID

               LEFT JOIN E_Country c WITH(nolock)

                 ON p.Country = c.Shorthand

               LEFT JOIN RB_Product pro WITH(nolock)

                 ON d.SKU = pro.SKU

                    AND d.CustomerID = pro.CustomerID

               LEFT JOIN RB_Transport t WITH(nolock)

                 ON p.TransportID = t.ID

                    AND p.CustomerID = t.CustomerID

                    --AND t.IsActive = 1

               LEFT JOIN RB_WareHouse w WITH(nolock)

                 ON p.CustomerID = w.CustomerID

                    AND p.WareHouseID = w.ID

                    AND w.IsActive = 1 

               WHERE p.AddTime >= @AddTime and p.id IN(SELECT ID

                       FROM   RB_Procurement_Order_Package p WITH(nolock)                               

                       WHERE  p.CustomerID = @CustomerID

                              AND p.PackageState = @PackageState

                              AND p.PackageType = @PackageType

                              AND P.SKUNumberWithPackage <= 1)

               AND p.CustomerID = @CustomerID

               AND p.PackageState = @PackageState

               AND p.PackageType = @PackageType

               AND p.MergerPackageNo NOT IN(SELECT d.MergerPackageNo

                                            FROM   RB_Procurement_Order_Package_OrderDetail d WITH(nolock)

                                                   LEFT JOIN RB_OrderInfo o WITH(nolock)

                                                     ON d.OrderCode = o.OrderCode

                                                        AND d.CustomerID = o.CustomerID

                                            WHERE  d.CustomerID = @CustomerID

                                                   AND o.OrderStatus <> @OrderStatus

                                                   AND o.AddTime >= @OrderStartTime)

               AND p.IsStockOrderWithPackage = @IsStockOrderWithPackage

               

              AND 

              (  

                  ( 

                      p.TrackNumber <> '' 

                      AND

                      (

                          ISNULL(t.TrackingNumberValidDays, 0) = 0

                          OR

                          (

                              p.GetTrackNumberTime IS NOT NULL

                              AND Isnull(t.TrackingNumberValidDays, 0) > 0

                              AND Datediff(SECOND, Getdate(), ( Dateadd(day, t.TrackingNumberValidDays, p.GetTrackNumberTime) )) >= 0 

                          )

                      )

                      AND

  (

   t.AllowTurnPrint = 0

   OR

   (t.AllowTurnPrint = 1 AND ISNULL(p.TurnNumber, '') != '')

  )

                  )

                  OR 

                  ( 

                      p.TrackNumber = ''

                      AND t.AllowPrint = 1

                      AND ISNULL(p.LogisticsOrderNo, '') != '' 

                      AND

                      ( 

                           ISNULL(t.TrackingNumberValidDays, 0) = 0 

                           OR 

                           ( 

                               p.GetTrackNumberTime IS NOT NULL

                               AND Isnull(t.TrackingNumberValidDays, 0) > 0

                               AND Datediff(SECOND, Getdate(), ( Dateadd(day, t.TrackingNumberValidDays, p.GetTrackNumberTime) )) >= 0 

                           )

                      )

                  )

                  OR 

                  ( 

                      p.TrackNumber = ''

                      AND t.AllowPrint = 1

                      AND ISNULL(p.LogisticsOrderNo, '') = ''

                      AND t.AllowLogistPrint = 1 

                      AND ISNULL(p.TurnNumber, '') = ''

                      AND t.AllowTurnPrint = 0

                  ) 

              ) 

              AND t.ID IS NOT NULL AND t.IsActive = 1 

               AND ISNULL(p.PackageFromType,0) <> 1

               

        GROUP  BY d.SKU,

                  d.ProductNum,

                  p.TransportID,

                  p.CustomerID,

                  p.WareHouseID,

                  Isnull(CASE

                           WHEN pro.PlugRelate = 1 THEN c.Plug

                           ELSE ''

                         END, ''),

                  t.TransportName,

                  w.WareHouseName

        HAVING Count(0) > 1) a

       LEFT JOIN RB_Product pro WITH(nolock)

         ON a.SKU = pro.SKU

            AND a.CustomerID = pro.CustomerID

       LEFT JOIN RB_WareHouse_Product wp WITH(nolock)

         ON wp.SKU = a.SKU

            AND wp.CustomerID = a.CustomerID

            AND a.WareHouseID = wp.WareHouseID

       LEFT JOIN RB_WareHouse_Position whp WITH(nolock)

         ON wp.PositionID = whp.ID

            AND wp.CustomerID = whp.CustomerID

WHERE 1 = 1  and a.WareHouseID in( 100000,5312 )   

ORDER BY a.ProductNum ASC,a.PackageNum DESC

PARAMS:@CustomerID = 1 ,@PackageState = 1 ,@OrderStatus = 0 ,@PackageType = 1 ,@IsStockOrderWithPackage = 0 ,@OrderStartTime = 2025/2/11 0:00:00 ,@AddTime = 2025/4/11 0:00:00 ,@SKU =  ,

MESSAGE:Column 'RB_Procurement_Order_Package.IsCancelPackagePrintToZFCD' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

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.DALExtend.Generate.RB_Procurement_Order_PackageExtend.PackageStatistics(Int32 customerID, CM_StatisticsParam statisticsParam, String orderByType)

   在 PandaBuy.ERP.Web.IrobotBox.Delivery.OrderPackageListV2Main.StatisticsSearch()

   在 System.EventHandler.Invoke(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_delivery_orderpackagelistv2main_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. 2025-06-11 11:13:22, 由 袁慧斌 创建。
  2. 2025-06-11 12:25:31, 由 李乐同 指派给 程伟。
    修改了 指派给,旧值为 "liletong",新值为 "chengwei"。
  3. 2025-06-11 13:49:54, 由 程伟 指派给 唐飞飞。
    修改了 指派给,旧值为 "chengwei",新值为 "tangfeifei"。
  4. 2025-06-11 15:23:35, 由 唐飞飞 解决,方案为 程序BUG 。
    修改了 解决方案,旧值为 "",新值为 "code"。
    修改了 解决版本,旧值为 "",新值为 "trunk"。
    修改了 解决日期,旧值为 "",新值为 "2025-06-11 15:23:17"。
    修改了 指派给 ,旧值为 "tangfeifei",新值为 "yuanhuibin"。
    修改了 Bug状态 ,旧值为 "active",新值为 "resolved"。
    修改了 是否确认,旧值为 "0",新值为 "1"。
    修改了 解决者 ,旧值为 "",新值为 "tangfeifei"。

    sql语句有误,已修正,周四发版

  5. 2025-06-13 17:51:42, 由 袁慧斌 编辑。
    修改了 测试责任人,旧值为 "",新值为 "admin"。
    修改了 解决时效 ,旧值为 "0",新值为 "4.17"。
    修改了 重现步骤 ,区别为:
    002- [10:58:05] [200] [http://888.zhcxkj.com:8093/IrobotBox/Delivery/OrderPackageListV2Main.aspx][10.17.40.166][10.17.40.166/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Http_Referer[https://888.zhcxkj.com/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Message: 数据库处理错误,请联系智汇技术!标识:N10580519--GetType(): Exception--Source: RB.DAL--StackTrace: 在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB) 在 RB.DALExtend.Generate.RB_Procurement_Order_PackageExtend.PackageStatistics(Int32 customerID, CM_StatisticsParam statisticsParam, String orderByType) 在 PandaBuy.ERP.Web.IrobotBox.Delivery.OrderPackageListV2Main.StatisticsSearch() 在 System.EventHandler.Invoke(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)
    002+ [10:58:05] [200] [http://888.zhcxkj.com:8093/IrobotBox/Delivery/OrderPackageListV2Main.aspx][10.17.40.166][10.17.40.166/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Http_Referer[https://888.zhcxkj.com/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Message: 数据库处理错误,请联系智汇技术!标识:N10580519--GetType(): Exception--Source: RB.DAL--StackTrace: 在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB) 在 RB.DALExtend.Generate.RB_Procurement_Order_PackageExtend.PackageStatistics(Int32 customerID, CM_StatisticsParam statisticsParam, String orderByType) 在 PandaBuy.ERP.Web.IrobotBox.Delivery.OrderPackageListV2Main.StatisticsSearch() 在 System.EventHandler.Invoke(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)
    002- <p>[10:58:05] [200] [http://888.zhcxkj.com:8093/IrobotBox/Delivery/OrderPackageListV2Main.aspx][10.17.40.166][10.17.40.166/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Http_Referer[https://888.zhcxkj.com/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Message: 数据库处理错误,请联系智汇技术!标识:N10580519--GetType(): Exception--Source: RB.DAL--StackTrace: 在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)<br /> 在 RB.DALExtend.Generate.RB_Procurement_Order_PackageExtend.PackageStatistics(Int32 customerID, CM_StatisticsParam statisticsParam, String orderByType)<br /> 在 PandaBuy.ERP.Web.IrobotBox.Delivery.OrderPackageListV2Main.StatisticsSearch()<br /> 在 System.EventHandler.Invoke(Object sender, EventArgs e)<br /> 在 System.Web.UI.Control.OnLoad(EventArgs e)<br /> 在 System.Web.UI.Control.LoadRecursive()<br /> 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)<br /></p>
    002+ <p>[10:58:05] [200] [http://888.zhcxkj.com:8093/IrobotBox/Delivery/OrderPackageListV2Main.aspx][10.17.40.166][10.17.40.166/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Http_Referer[https://888.zhcxkj.com/IrobotBox/Delivery/OrderPackageListV2Main.aspx]--Message: 数据库处理错误,请联系智汇技术!标识:N10580519--GetType(): Exception--Source: RB.DAL--StackTrace: 在 RB.DAL.DBOperator.Query(String SQLString, SqlCommand cmd, Int32 Times, SqlParameter[] cmdParms, Boolean IsWriteDB)<br /> 在 RB.DALExtend.Generate.RB_Procurement_Order_PackageExtend.PackageStatistics(Int32 customerID, CM_StatisticsParam statisticsParam, String orderByType)<br /> 在 PandaBuy.ERP.Web.IrobotBox.Delivery.OrderPackageListV2Main.StatisticsSearch()<br /> 在 System.EventHandler.Invoke(Object sender, EventArgs e)<br /> 在 System.Web.UI.Control.OnLoad(EventArgs e)<br /> 在 System.Web.UI.Control.LoadRecursive()<br /> 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)</p>
  6. 2025-06-13 17:51:45, 由 袁慧斌 关闭。
    修改了 Bug状态 ,旧值为 "resolved",新值为 "closed"。
    修改了 指派给 ,旧值为 "yuanhuibin",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "yuanhuibin"。
    修改了 关闭日期,旧值为 "",新值为 "2025-06-13 17:51:45"。
  7. 2025-06-19 17:39:39, 由 陈莉珍 编辑。
    修改了 上线时间,旧值为 "0000-00-00 00:00:00",新值为 "2025-06-11 15:25"。
    修改了 上线时效,旧值为 "-1",新值为 "4.19"。
所属项目 技术中心-需求池
所属模块 供应链   仓储物流   备库订单
所属计划
所属迭代
Bug类型
严重程度 一般
优先级 P2
Bug状态 已关闭
业务部门 亚马逊平台运营中心
影响功能
开发责任人 唐飞飞
测试责任人 admin
解决时效 4.17
激活次数 0
激活日期
是否确认 是
当前指派 Closed 于 2025-06-19 17:39:39
截止日期 0000-00-00
上线时间 2025-06-11 15:25:00
上线时效 4.19
操作系统
浏览器
关键词
抄送给
所属迭代
相关需求
相关任务
由谁创建 袁慧斌 于 2025-06-11 11:13:22
影响环境 生产环境-业务反馈
生产环境-线上测试
由谁解决 唐飞飞 于 2025-06-11 15:23:17
解决版本 主干
解决方案 程序BUG
由谁关闭 袁慧斌 于 2025-06-13 17:51:45
最后修改 陈莉珍 于 2025-06-19 17:39:39
相关Bug