业务需求
需求描述

[步骤]




[18:47:16]  -------------------------------------------------------------
CODE:O1847161
Error:16_8623_1_-2146232060
SQL:
select 
orderfee.BusinessTeamID GROUPID
,orderfee.BusinessTeamName GroupName
,orderfee.OperateFeeRMB
,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB
,orderfee.SalesPriceFeeUSD
,ISNULL(ordernum.OrderNum,0) OrderNum
,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD
,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD
,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis
,orderfee.DateToday 
from 
(
select 
CustomerID
    ,BusinessTeamID
    ,case when  BusinessTeamName='' then '未分组' else BusinessTeamName end  BusinessTeamName
    ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday
,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD
,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB 
,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD
,SUM(SalesRefunds) FundMoneyRMB
,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD
    ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB
    ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD
from RB_Report_OrderSettlement with(nolock)
='2025-07-01' and ShipDate

仓库



,24471,24469,24468,24467,24470,14677,14675,19679)
)AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName
) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName 
and ordernum.SalesWeek=orderfee.DateToday
order by orderfee.BusinessTeamID,orderfee.DateToday asc
MESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
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)
   在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command)
   在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command)
   在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)   在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException  , String  )
   在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)
   在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.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)

[结果]


[期望]

排查 并修复故障 怎么有这么多 仓库ID  导致SQL异常了 
验收标准
价值描述
5000
历史记录  
  1. 2025-07-29 15:49:22, 由 林很 Bug转化而来,Bug编号为 58498 。
  2. 2025-07-29 15:49:36, 由 林很 编辑。
    修改了 所属计划,旧值为 "",新值为 "2125"。
    修改了 所处阶段,旧值为 "wait",新值为 "planned"。
  3. 2025-07-29 16:26:41, 由 林很 编辑。
    修改了 优先级,旧值为 "2",新值为 "3"。
  4. 2025-07-29 17:30:36, 由 林很 变更。
    修改了 版本号 ,旧值为 "1",新值为 "2"。
    修改了 需求名称,区别为:
    001- 【订单利润】关闭销售团小组报告和人员维度报告
    001+ 【订单利润】关闭订单利润销售小组报告和人员维度报告
    001- 【订单利润】关闭销售团小组报告和人员维度报告
    001+ 【订单利润】关闭订单利润销售小组报告和人员维度报告
    修改了 需求描述,区别为:
    003- [18:47:16]  -------------------------------------------------------------CODE:O1847161Error:16_8623_1_-2146232060SQL:select orderfee.BusinessTeamID GROUPID,orderfee.BusinessTeamName GroupName,orderfee.OperateFeeRMB,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB,orderfee.SalesPriceFeeUSD,ISNULL(ordernum.OrderNum,0) OrderNum,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis,orderfee.DateToday from ( select  CustomerID    ,BusinessTeamID    ,case when  BusinessTeamName='' then '未分组' else BusinessTeamName end  BusinessTeamName    ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday ,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD ,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB  ,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD ,SUM(SalesRefunds) FundMoneyRMB ,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD    ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB    ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD from RB_Report_OrderSettlement with(nolock) ='2025-07-01' and ShipDate
    003+ [18:47:16] -------------------------------------------------------------CODE:O1847161Error:16_8623_1_-2146232060SQL:select orderfee.BusinessTeamID GROUPID,orderfee.BusinessTeamName GroupName,orderfee.OperateFeeRMB,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB,orderfee.SalesPriceFeeUSD,ISNULL(ordernum.OrderNum,0) OrderNum,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis,orderfee.DateToday from ( select CustomerID ,BusinessTeamID ,case when BusinessTeamName='' then '未分组' else BusinessTeamName end BusinessTeamName ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday ,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD ,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB ,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD ,SUM(SalesRefunds) FundMoneyRMB ,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD from RB_Report_OrderSettlement with(nolock) ='2025-07-01' and ShipDate
    007- ,24471,24469,24468,24467,24470,14677,14675,19679) )AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName and ordernum.SalesWeek=orderfee.DateTodayorder by orderfee.BusinessTeamID,orderfee.DateToday ascMESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.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)   在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command)   在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command)   在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)   在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException  , String  )   在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)   在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.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)[结果]
    007+ ,24471,24469,24468,24467,24470,14677,14675,19679) )AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName and ordernum.SalesWeek=orderfee.DateTodayorder by orderfee.BusinessTeamID,orderfee.DateToday ascMESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.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) 在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command) 在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command) 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB) 在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException , String ) 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB) 在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.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)[结果]
    009- 排查 并修复故障 怎么有这么多 仓库ID  导致SQL异常了 
    009+ 排查 并修复故障 怎么有这么多 仓库ID 导致SQL异常了
    003- <p><br /><br />[18:47:16]  -------------------------------------------------------------<br />CODE:O1847161<br />Error:16_8623_1_-2146232060<br />SQL:<br />select <br />orderfee.BusinessTeamID GROUPID<br />,orderfee.BusinessTeamName GroupName<br />,orderfee.OperateFeeRMB<br />,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB<br />,orderfee.SalesPriceFeeUSD<br />,ISNULL(ordernum.OrderNum,0) OrderNum<br />,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD<br />,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD<br />,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis<br />,orderfee.DateToday <br />from <br />(<br /> select <br /> CustomerID<br />    ,BusinessTeamID<br />    ,case when  BusinessTeamName='' then '未分组' else BusinessTeamName end  BusinessTeamName<br />    ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday<br /> ,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD<br /> ,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB <br /> ,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD<br /> ,SUM(SalesRefunds) FundMoneyRMB<br /> ,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD<br />    ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB<br />    ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD<br /> from RB_Report_OrderSettlement with(nolock)<br /><span><span> </span>='2025-07-01' and ShipDate</span><br /></p>
    003+ <p><br /><br />[18:47:16] -------------------------------------------------------------<br />CODE:O1847161<br />Error:16_8623_1_-2146232060<br />SQL:<br />select <br />orderfee.BusinessTeamID GROUPID<br />,orderfee.BusinessTeamName GroupName<br />,orderfee.OperateFeeRMB<br />,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB<br />,orderfee.SalesPriceFeeUSD<br />,ISNULL(ordernum.OrderNum,0) OrderNum<br />,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD<br />,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD<br />,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis<br />,orderfee.DateToday <br />from <br />(<br /> select <br /> CustomerID<br /> ,BusinessTeamID<br /> ,case when BusinessTeamName='' then '未分组' else BusinessTeamName end BusinessTeamName<br /> ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday<br /> ,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD<br /> ,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB <br /> ,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD<br /> ,SUM(SalesRefunds) FundMoneyRMB<br /> ,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD<br /> ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB<br /> ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD<br /> from RB_Report_OrderSettlement with(nolock)<br /><span><span> </span>='2025-07-01' and ShipDate</span></p>
    007- ,24471,24469,24468,24467,24470,14677,14675,19679)<br /><span> </span>)AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName<br />) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName <br />and ordernum.SalesWeek=orderfee.DateToday<br />order by orderfee.BusinessTeamID,orderfee.DateToday asc<br />MESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.<br />TRACE:   在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)<br />   在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)<br />   在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)<br />   在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()<br />   在 System.Data.SqlClient.SqlDataReader.get_MetaData()<br />   在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)<br />   在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)<br />   在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)<br />   在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)<br />   在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)<br />   在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br />   在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br />   在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)<br />   在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command)<br />   在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command)<br />   在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)   在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException  , String  )<br />   在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)<br />   在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.ProcessRequest(HttpContext context)<br />   在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()<br />   在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)<br />   在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)<br />   在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)<br />   在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)<br />   在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)<br />   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)<br />   在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)<br /><br /><p>[结果]</p>
    007+ ,24471,24469,24468,24467,24470,14677,14675,19679)<br /><span> </span>)AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName<br />) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName <br />and ordernum.SalesWeek=orderfee.DateToday<br />order by orderfee.BusinessTeamID,orderfee.DateToday asc<br />MESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.<br />TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)<br /> 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)<br /> 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)<br /> 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()<br /> 在 System.Data.SqlClient.SqlDataReader.get_MetaData()<br /> 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)<br /> 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)<br /> 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)<br /> 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)<br /> 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)<br /> 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /> 在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /> 在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)<br /> 在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command)<br /> 在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command)<br /> 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB) 在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException , String )<br /> 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)<br /> 在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.ProcessRequest(HttpContext context)<br /> 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()<br /> 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)<br /> 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)<br /> 在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)<br /> 在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)<br /> 在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)<br /> 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)<br /> 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)<br /><br /><p>[结果]</p>
    009- 排查 并修复故障 怎么有这么多 仓库ID  导致SQL异常了 
    009+ 排查 并修复故障 怎么有这么多 仓库ID 导致SQL异常了
  5. 2025-07-29 20:11:01, 由 林很 变更。
    修改了 版本号 ,旧值为 "2",新值为 "3"。
    修改了 需求描述,区别为:
    001- [步骤]
    001+ <a href="https://alidocs.dingtalk.com/i/nodes/r1R7q3QmWe7BrgLah7r53kwqJxkXOEP2">https://alidocs.dingtalk.com/i/nodes/r1R7q3QmWe7BrgLah7r53kwqJxkXOEP2
    002-
    003- [18:47:16] -------------------------------------------------------------CODE:O1847161Error:16_8623_1_-2146232060SQL:select orderfee.BusinessTeamID GROUPID,orderfee.BusinessTeamName GroupName,orderfee.OperateFeeRMB,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB,orderfee.SalesPriceFeeUSD,ISNULL(ordernum.OrderNum,0) OrderNum,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis,orderfee.DateToday from ( select CustomerID ,BusinessTeamID ,case when BusinessTeamName='' then '未分组' else BusinessTeamName end BusinessTeamName ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday ,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD ,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB ,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD ,SUM(SalesRefunds) FundMoneyRMB ,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD from RB_Report_OrderSettlement with(nolock) ='2025-07-01' and ShipDate
    004- 仓库
    005-
    006-
    007- ,24471,24469,24468,24467,24470,14677,14675,19679) )AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName and ordernum.SalesWeek=orderfee.DateTodayorder by orderfee.BusinessTeamID,orderfee.DateToday ascMESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.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&amp; 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&amp; 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&amp; task, Boolean&amp; 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) 在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command) 在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command) 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB) 在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException , String ) 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB) 在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.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&amp; 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)[结果]
    008- [期望]
    009- 排查 并修复故障 怎么有这么多 仓库ID 导致SQL异常了
    001- <p>[步骤]</p>
    001+ <p><a href="https://alidocs.dingtalk.com/i/nodes/r1R7q3QmWe7BrgLah7r53kwqJxkXOEP2">https://alidocs.dingtalk.com/i/nodes/r1R7q3QmWe7BrgLah7r53kwqJxkXOEP2</a></p>
    002- <p><br /></p>
    003- <p><br /><br />[18:47:16] -------------------------------------------------------------<br />CODE:O1847161<br />Error:16_8623_1_-2146232060<br />SQL:<br />select <br />orderfee.BusinessTeamID GROUPID<br />,orderfee.BusinessTeamName GroupName<br />,orderfee.OperateFeeRMB<br />,orderfee.OperateFeeUSD,orderfee.SalesPriceFeeRMB<br />,orderfee.SalesPriceFeeUSD<br />,ISNULL(ordernum.OrderNum,0) OrderNum<br />,orderfee.FundMoneyRMB,orderfee.FundMoneyUSD<br />,orderfee.SalesRefundsV2RMB,orderfee.SalesRefundsV2USD<br />,cast(MONTH(orderfee.DateToday) AS varchar) + '/'+ cast(DAY(orderfee.DateToday) AS varchar) AS XAxis<br />,orderfee.DateToday <br />from <br />(<br /> select <br /> CustomerID<br /> ,BusinessTeamID<br /> ,case when BusinessTeamName='' then '未分组' else BusinessTeamName end BusinessTeamName<br /> ,CONVERT(NVARCHAR(50),ShipDate,23) DateToday<br /> ,SUM(Profits) OperateFeeRMB,SUM(Profits/USD_ExchangeRMB) OperateFeeUSD<br /> ,SUM(SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0)) SalesPriceFeeRMB <br /> ,SUM((SalesPrice+TransportPay+SalesRefunds+PromotionRebates+OtherCredits+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))/USD_ExchangeRMB) SalesPriceFeeUSD<br /> ,SUM(SalesRefunds) FundMoneyRMB<br /> ,SUM(SalesRefunds/USD_ExchangeRMB) FundMoneyUSD<br /> ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END))) SalesRefundsV2RMB<br /> ,ABS(SUM((CASE WHEN ISNULL(SalesRefunds,0)=0 THEN 0 ELSE ISNULL(SalesRefunds,0)+ISNULL(PromotionRebates,0)+ISNULL(OtherCredits,0)+ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0) END)/USD_ExchangeRMB)) SalesRefundsV2USD<br /> from RB_Report_OrderSettlement with(nolock)<br /><span><span> </span>='2025-07-01' and ShipDate</span></p>
    004- <p>仓库</p>
    005- <p><br /></p>
    006- <p><br /></p>
    007- ,24471,24469,24468,24467,24470,14677,14675,19679)<br /><span> </span>)AS tmporder GROUP BY tmporder.CustomerID,SalesWeek,tmporder.BusinessTeamID,tmporder.BusinessTeamName<br />) AS ordernum on ordernum.CustomerID=orderfee.CustomerID and ordernum.BusinessTeamID=orderfee.BusinessTeamID and orderfee.BusinessTeamName=ordernum.BusinessTeamName <br />and ordernum.SalesWeek=orderfee.DateToday<br />order by orderfee.BusinessTeamID,orderfee.DateToday asc<br />MESSAGE:The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.<br />TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)<br /> 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)<br /> 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)<br /> 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()<br /> 在 System.Data.SqlClient.SqlDataReader.get_MetaData()<br /> 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)<br /> 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)<br /> 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)<br /> 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)<br /> 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)<br /> 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /> 在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)<br /> 在 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)<br /> 在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteDataset(IDbCommand command)<br /> 在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(SqlCommand command)<br /> 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB) 在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException , String )<br /> 在 PandaBuy.ERP.DAL.DBOperator.GetDSExecuteSqlNoTimeOut(String p_Sql, Boolean IsWriteDB)<br /> 在 PandaBuy.ERP.Web.ASHX.IrobotBox.SalesTeamDateReportHandler.ProcessRequest(HttpContext context)<br /> 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()<br /> 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)<br /> 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)<br /> 在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)<br /> 在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)<br /> 在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)<br /> 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)<br /> 在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)<br /><br /><p>[结果]</p>
    008- <br /><p>[期望]</p>
    009- 排查 并修复故障 怎么有这么多 仓库ID 导致SQL异常了
  6. 2025-07-30 19:28:43, 由 张明磊 编辑。
    修改了 预计工时,旧值为 "16",新值为 "2"。
    修改了 成本 ,旧值为 "8000",新值为 "1000"。
    修改了 ROI ,旧值为 "3.75",新值为 "30.00"。
    工时:2H
    1. 订单利润V1&产品利润入口关闭 2H
  7. 2025-07-31 10:14:05, 由 张明磊 记录评审结果,结果为 确认通过。
  8. 2025-07-31 10:14:28, 由 周杰 关联到迭代 主干_8月V2版本_20250812 。
  9. 2025-07-31 10:15:25, 由 周杰 编辑。
    修改了 计划上线,旧值为 "0000-00-00",新值为 "2025-08-12"。
  10. 2025-07-31 18:13:46, 由 周杰 编辑。
    修改了 计划验收时间,旧值为 "0000-00-00",新值为 "2025-08-15"。
  11. 2025-08-04 10:48:21, 由 曾倩 编辑。
    修改了 测试人员,旧值为 "",新值为 "zengqian"。
  12. 2025-08-12 14:06:30, 由 周杰 编辑。
    修改了 所处阶段 ,旧值为 "tested",新值为 "bepending"。
    修改了 设置阶段者,旧值为 "",新值为 "zhoujie"。
  13. 2025-09-02 17:19:33, 由 许瑞丰 编辑。
    修改了 所处阶段,旧值为 "业务验收中",新值为 "业务验收通过"。
    功能验收:验收通过
    满意度:满意
    价值验收:基本达成
    原因备注:无
  14. 2025-09-08 09:18:29, 由 周杰 关闭,原因为 已完成 。
    修改了 由谁关闭,旧值为 "",新值为 "zhoujie"。
    修改了 关闭日期,旧值为 "0000-00-00 00:00:00",新值为 "2025-09-08 09:18:28"。
    修改了 指派给 ,旧值为 "zhangminglei",新值为 "closed"。
    修改了 当前状态,旧值为 "active",新值为 "closed"。
    修改了 所处阶段,旧值为 "verified",新值为 "closed"。
    修改了 关闭原因,旧值为 "",新值为 "done"。
  15. 2025-12-05 19:45:10, 由 许瑞丰 编辑。
    修改了 业务回填价值,旧值为 "0",新值为 "5000"。
    修改了 actualAchieveDesc ,旧值为 "",新值为 ""。
迭代版本
提报业务部门 技术研发中心
提报人员 林很
需求来源 bug转需求
所属项目 技术中心-需求池
所属模块 财务   财务管理
所属计划
业务价值
开发组 财务开发组
受益业务部门 技术研发中心
验收人员 许瑞丰
业务目标类型
中心业务目标
业务价值 控制风险
每月价值量 5000
每月节省人数 0
优先级 P2
价值类型 长期价值
预计工时 2
成本 250
ROI 20.00
操作手册 否
高价值 -
主被动 被动接收
复杂度 一般性
工作流ID
工作流创建时间 0000-00-00 00:00:00
更新点
是否高危 否
评分
当前状态 已关闭
所处阶段 已关闭
关键词
评审次数 一次
计划上线 2025-08-12
上线时间 2025-08-12
计划验收时间 2025-08-15
业务验收时间 2025-09-02 17:19:33
满意度 满意
价值验收 基本达成
满意度分值 80
业务回填价值 5000
验收达成价值 24000.0
验收达成ROI 24.0
抄送给 袁慧斌  
由谁创建 林很 于 2025-07-29 15:49:22
指派给 Closed 于 2025-09-08 09:18:28
由谁评审 张明磊
评审时间 2025-07-31
由谁关闭 周杰 于 2025-09-08 09:18:28
关闭原因 已完成
最后修改 周杰 于 2025-09-08 09:18:28