[步骤]
[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)
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)
[结果]
[期望]
修复异常
sql语句有误,已修正,周四发版