https://alidocs.dingtalk.com/i/nodes/Qnp9zOoBVBZjqO74S4ALKa20V1DK0g6l
业务需求
需求描述
验收标准
价值描述
10000
001-销售买家日报告电源处理器 SQL 太大
001+ 【性能优化】销售买家日销量报告SQL优化
001-修改了 需求描述,区别为:销售买家日报告电源处理器 SQL 太大
001+ 【性能优化】销售买家日销量报告SQL优化
002-[09:43:42] -------------------------------------------------------------CODE:N0943422Error:16_8623_1_-2146232060SQL:select tmpfee.SalesDay,tmpfee.OrderSourceID,tmpfee.BusinessAdminID,(cast(tmpfee.SalesYear as varchar)+ N'年' + cast(tmpfee.SalesDay as varchar)+ N'月') as XAxis,CAST(isnull(tmpfee.Profits,0) AS DECIMAL(28,14)) as OperateFee,CAST(isnull(tmpfee.SalesPrice+tmpfee.TransportPay+tmpfee.SalesRefunds+tmpfee.PromotionRebates+tmpfee.OtherCredits+tmpfee.TaxIncome,0) AS DECIMAL(28,14)) as TotalIncome,CAST(isnull(tmpfee.SalesPrice,0) AS DECIMAL(28,14)) as SalesPrice,isnull(tmprest.OrderNum,0) OrderNum,CAST(isnull(tmpfee.TransportPay,0) AS DECIMAL(28,14)) as TransportPay,CAST(isnull(tmpfee.SalesRefunds,0) AS DECIMAL(28,14)) as RefundPrice,CAST(isnull(tmpfee.SalesRefundsV2,0) AS DECIMAL(28,14)) as SalesRefundsV2,CAST(isnull(tmpfee.PromotionRebates,0) AS DECIMAL(28,14)) as PromotionFee,CAST(isnull(tmpfee.OtherCredits,0) AS DECIMAL(28,14)) as OtherIncomeAmount,CAST(isnull(tmpfee.CommisionFee,0) AS DECIMAL(28,14)) as CommissionFee,CAST(isnull(tmpfee.FBATransactionFees,0) AS DECIMAL(28,14)) as FBAOperateFee,CAST(isnull(tmpfee.OrderSourceOtherDebits,0) AS DECIMAL(28,14)) as OrderSourceCost,CAST(isnull(tmpfee.CostOfAdvertising,0) AS DECIMAL(28,14)) as CostOfAdvertising,CAST(isnull(tmpfee.BuyPrice,0) AS DECIMAL(28,14)) as BuyPrice,CAST(isnull(tmpfee.PackageFees,0) AS DECIMAL(28,14)) as PackageShipedPrice,CAST(isnull(tmpfee.OverSeasShipFees,0) AS DECIMAL(28,14)) as OverseaShipPrice,CAST(isnull(tmpfee.FirstLegFees,0) AS DECIMAL(28,14)) as FirstLegPrice,CAST(isnull(tmpfee.TariffFees,0) AS DECIMAL(28,14)) as TraiffPrice,CAST(isnull(tmpfee.ExchangeLost,0) AS DECIMAL(28,14)) as ExchangeLost,CAST(isnull(tmpfee.SalesVatFees,0) AS DECIMAL(28,14)) as SalesVatFees,CAST(isnull(tmpfee.SubsidyPrice,0) AS DECIMAL(28,14)) as SubsidyPrice,CAST(isnull(tmpfee.PackagedCost,0) AS DECIMAL(28,14)) as PackagedCost,CAST(isnull(tmpfee.TaxIncome,0) AS DECIMAL(28,14)) AS TaxIncomefrom ( select datepart(YEAR, ShipDate) SalesYear, month(ShipDate) SalesDay ,OrderSourceID ,BusinessAdminID BusinessAdminID ,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))) SalesRefundsV2 ,SUM(Profits) Profits,SUM(SalesPrice) SalesPrice,SUM(TransportPay) TransportPay,SUM(SalesRefunds) SalesRefunds,SUM(PromotionRebates) PromotionRebates,SUM(OtherCredits) OtherCredits ,SUM(CommisionFee) CommisionFee,SUM(FBATransactionFees) FBATransactionFees ,SUM(OrderSourceOtherDebits) OrderSourceOtherDebits ,SUM(CostOfAdvertising) CostOfAdvertising ,SUM((BuyPrice+ISNULL(DistributionPrice,0))) BuyPrice,SUM(PackagedCost) PackagedCost,SUM(PackageFees) PackageFees ,SUM(OverSeasShipFees) OverSeasShipFees,SUM(FirstLegFees) FirstLegFees,SUM(TariffFees) TariffFees,SUM(ExchangeLost) ExchangeLost ,SUM(ISNULL(SalesVatFee,0)) as SalesVatFees ,SUM(ISNULL(SubsidyPrice,0)) as SubsidyPrice ,Sum((ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))) as TaxIncome from RB_Report_OrderSettlement with(nolock)=@StartDate and ShipDate
002+ [09:43:42] -------------------------------------------------------------CODE:N0943422Error:16_8623_1_-2146232060SQL:select tmpfee.SalesDay,tmpfee.OrderSourceID,tmpfee.BusinessAdminID,(cast(tmpfee.SalesYear as varchar)+ N'年' + cast(tmpfee.SalesDay as varchar)+ N'月') as XAxis,CAST(isnull(tmpfee.Profits,0) AS DECIMAL(28,14)) as OperateFee,CAST(isnull(tmpfee.SalesPrice+tmpfee.TransportPay+tmpfee.SalesRefunds+tmpfee.PromotionRebates+tmpfee.OtherCredits+tmpfee.TaxIncome,0) AS DECIMAL(28,14)) as TotalIncome,CAST(isnull(tmpfee.SalesPrice,0) AS DECIMAL(28,14)) as SalesPrice,isnull(tmprest.OrderNum,0) OrderNum,CAST(isnull(tmpfee.TransportPay,0) AS DECIMAL(28,14)) as TransportPay,CAST(isnull(tmpfee.SalesRefunds,0) AS DECIMAL(28,14)) as RefundPrice,CAST(isnull(tmpfee.SalesRefundsV2,0) AS DECIMAL(28,14)) as SalesRefundsV2,CAST(isnull(tmpfee.PromotionRebates,0) AS DECIMAL(28,14)) as PromotionFee,CAST(isnull(tmpfee.OtherCredits,0) AS DECIMAL(28,14)) as OtherIncomeAmount,CAST(isnull(tmpfee.CommisionFee,0) AS DECIMAL(28,14)) as CommissionFee,CAST(isnull(tmpfee.FBATransactionFees,0) AS DECIMAL(28,14)) as FBAOperateFee,CAST(isnull(tmpfee.OrderSourceOtherDebits,0) AS DECIMAL(28,14)) as OrderSourceCost,CAST(isnull(tmpfee.CostOfAdvertising,0) AS DECIMAL(28,14)) as CostOfAdvertising,CAST(isnull(tmpfee.BuyPrice,0) AS DECIMAL(28,14)) as BuyPrice,CAST(isnull(tmpfee.PackageFees,0) AS DECIMAL(28,14)) as PackageShipedPrice,CAST(isnull(tmpfee.OverSeasShipFees,0) AS DECIMAL(28,14)) as OverseaShipPrice,CAST(isnull(tmpfee.FirstLegFees,0) AS DECIMAL(28,14)) as FirstLegPrice,CAST(isnull(tmpfee.TariffFees,0) AS DECIMAL(28,14)) as TraiffPrice,CAST(isnull(tmpfee.ExchangeLost,0) AS DECIMAL(28,14)) as ExchangeLost,CAST(isnull(tmpfee.SalesVatFees,0) AS DECIMAL(28,14)) as SalesVatFees,CAST(isnull(tmpfee.SubsidyPrice,0) AS DECIMAL(28,14)) as SubsidyPrice,CAST(isnull(tmpfee.PackagedCost,0) AS DECIMAL(28,14)) as PackagedCost,CAST(isnull(tmpfee.TaxIncome,0) AS DECIMAL(28,14)) AS TaxIncomefrom ( select datepart(YEAR, ShipDate) SalesYear, month(ShipDate) SalesDay ,OrderSourceID ,BusinessAdminID BusinessAdminID ,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))) SalesRefundsV2 ,SUM(Profits) Profits,SUM(SalesPrice) SalesPrice,SUM(TransportPay) TransportPay,SUM(SalesRefunds) SalesRefunds,SUM(PromotionRebates) PromotionRebates,SUM(OtherCredits) OtherCredits ,SUM(CommisionFee) CommisionFee,SUM(FBATransactionFees) FBATransactionFees ,SUM(OrderSourceOtherDebits) OrderSourceOtherDebits ,SUM(CostOfAdvertising) CostOfAdvertising ,SUM((BuyPrice+ISNULL(DistributionPrice,0))) BuyPrice,SUM(PackagedCost) PackagedCost,SUM(PackageFees) PackageFees ,SUM(OverSeasShipFees) OverSeasShipFees,SUM(FirstLegFees) FirstLegFees,SUM(TariffFees) TariffFees,SUM(ExchangeLost) ExchangeLost ,SUM(ISNULL(SalesVatFee,0)) as SalesVatFees ,SUM(ISNULL(SubsidyPrice,0)) as SubsidyPrice ,Sum((ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))) as TaxIncome from RB_Report_OrderSettlement with(nolock)=@StartDate and ShipDate
002-<br /><br />[09:43:42] -------------------------------------------------------------<br />CODE:N0943422<br />Error:16_8623_1_-2146232060<br />SQL:select <br />tmpfee.SalesDay<br />,tmpfee.OrderSourceID<br />,tmpfee.BusinessAdminID<br />,(cast(tmpfee.SalesYear as varchar)+ N'年' + cast(tmpfee.SalesDay as varchar)+ N'月') as XAxis<br />,CAST(isnull(tmpfee.Profits,0) AS DECIMAL(28,14)) as OperateFee<br />,CAST(isnull(tmpfee.SalesPrice+tmpfee.TransportPay+tmpfee.SalesRefunds+tmpfee.PromotionRebates+tmpfee.OtherCredits+tmpfee.TaxIncome,0) AS DECIMAL(28,14)) as TotalIncome<br />,CAST(isnull(tmpfee.SalesPrice,0) AS DECIMAL(28,14)) as SalesPrice<br />,isnull(tmprest.OrderNum,0) OrderNum<br />,CAST(isnull(tmpfee.TransportPay,0) AS DECIMAL(28,14)) as TransportPay<br />,CAST(isnull(tmpfee.SalesRefunds,0) AS DECIMAL(28,14)) as RefundPrice<br />,CAST(isnull(tmpfee.SalesRefundsV2,0) AS DECIMAL(28,14)) as SalesRefundsV2<br />,CAST(isnull(tmpfee.PromotionRebates,0) AS DECIMAL(28,14)) as PromotionFee<br />,CAST(isnull(tmpfee.OtherCredits,0) AS DECIMAL(28,14)) as OtherIncomeAmount<br />,CAST(isnull(tmpfee.CommisionFee,0) AS DECIMAL(28,14)) as CommissionFee<br />,CAST(isnull(tmpfee.FBATransactionFees,0) AS DECIMAL(28,14)) as FBAOperateFee<br />,CAST(isnull(tmpfee.OrderSourceOtherDebits,0) AS DECIMAL(28,14)) as OrderSourceCost<br />,CAST(isnull(tmpfee.CostOfAdvertising,0) AS DECIMAL(28,14)) as CostOfAdvertising<br />,CAST(isnull(tmpfee.BuyPrice,0) AS DECIMAL(28,14)) as BuyPrice<br />,CAST(isnull(tmpfee.PackageFees,0) AS DECIMAL(28,14)) as PackageShipedPrice<br />,CAST(isnull(tmpfee.OverSeasShipFees,0) AS DECIMAL(28,14)) as OverseaShipPrice<br />,CAST(isnull(tmpfee.FirstLegFees,0) AS DECIMAL(28,14)) as FirstLegPrice<br />,CAST(isnull(tmpfee.TariffFees,0) AS DECIMAL(28,14)) as TraiffPrice<br />,CAST(isnull(tmpfee.ExchangeLost,0) AS DECIMAL(28,14)) as ExchangeLost<br />,CAST(isnull(tmpfee.SalesVatFees,0) AS DECIMAL(28,14)) as SalesVatFees<br />,CAST(isnull(tmpfee.SubsidyPrice,0) AS DECIMAL(28,14)) as SubsidyPrice<br />,CAST(isnull(tmpfee.PackagedCost,0) AS DECIMAL(28,14)) as PackagedCost<br />,CAST(isnull(tmpfee.TaxIncome,0) AS DECIMAL(28,14)) AS TaxIncome<br />from <br />(<br /> select datepart(YEAR, ShipDate) SalesYear,<br /> month(ShipDate) SalesDay<br /> ,OrderSourceID<br /> ,BusinessAdminID BusinessAdminID<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))) SalesRefundsV2<br /> ,SUM(Profits) Profits,SUM(SalesPrice) SalesPrice,SUM(TransportPay) TransportPay,SUM(SalesRefunds) SalesRefunds,SUM(PromotionRebates) PromotionRebates,SUM(OtherCredits) OtherCredits<br /> ,SUM(CommisionFee) CommisionFee,SUM(FBATransactionFees) FBATransactionFees<br /> ,SUM(OrderSourceOtherDebits) OrderSourceOtherDebits<br /> ,SUM(CostOfAdvertising) CostOfAdvertising<br /> ,SUM((BuyPrice+ISNULL(DistributionPrice,0))) BuyPrice,SUM(PackagedCost) PackagedCost,SUM(PackageFees) PackageFees<br /> ,SUM(OverSeasShipFees) OverSeasShipFees,SUM(FirstLegFees) FirstLegFees,SUM(TariffFees) TariffFees,SUM(ExchangeLost) ExchangeLost<br /> ,SUM(ISNULL(SalesVatFee,0)) as SalesVatFees<br /> ,SUM(ISNULL(SubsidyPrice,0)) as SubsidyPrice<br /> ,Sum((ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))) as TaxIncome<br /> from RB_Report_OrderSettlement with(nolock)<br />=@StartDate and ShipDate
002+ <br /><br />[09:43:42] -------------------------------------------------------------<br />CODE:N0943422<br />Error:16_8623_1_-2146232060<br />SQL:select <br />tmpfee.SalesDay<br />,tmpfee.OrderSourceID<br />,tmpfee.BusinessAdminID<br />,(cast(tmpfee.SalesYear as varchar)+ N'年' + cast(tmpfee.SalesDay as varchar)+ N'月') as XAxis<br />,CAST(isnull(tmpfee.Profits,0) AS DECIMAL(28,14)) as OperateFee<br />,CAST(isnull(tmpfee.SalesPrice+tmpfee.TransportPay+tmpfee.SalesRefunds+tmpfee.PromotionRebates+tmpfee.OtherCredits+tmpfee.TaxIncome,0) AS DECIMAL(28,14)) as TotalIncome<br />,CAST(isnull(tmpfee.SalesPrice,0) AS DECIMAL(28,14)) as SalesPrice<br />,isnull(tmprest.OrderNum,0) OrderNum<br />,CAST(isnull(tmpfee.TransportPay,0) AS DECIMAL(28,14)) as TransportPay<br />,CAST(isnull(tmpfee.SalesRefunds,0) AS DECIMAL(28,14)) as RefundPrice<br />,CAST(isnull(tmpfee.SalesRefundsV2,0) AS DECIMAL(28,14)) as SalesRefundsV2<br />,CAST(isnull(tmpfee.PromotionRebates,0) AS DECIMAL(28,14)) as PromotionFee<br />,CAST(isnull(tmpfee.OtherCredits,0) AS DECIMAL(28,14)) as OtherIncomeAmount<br />,CAST(isnull(tmpfee.CommisionFee,0) AS DECIMAL(28,14)) as CommissionFee<br />,CAST(isnull(tmpfee.FBATransactionFees,0) AS DECIMAL(28,14)) as FBAOperateFee<br />,CAST(isnull(tmpfee.OrderSourceOtherDebits,0) AS DECIMAL(28,14)) as OrderSourceCost<br />,CAST(isnull(tmpfee.CostOfAdvertising,0) AS DECIMAL(28,14)) as CostOfAdvertising<br />,CAST(isnull(tmpfee.BuyPrice,0) AS DECIMAL(28,14)) as BuyPrice<br />,CAST(isnull(tmpfee.PackageFees,0) AS DECIMAL(28,14)) as PackageShipedPrice<br />,CAST(isnull(tmpfee.OverSeasShipFees,0) AS DECIMAL(28,14)) as OverseaShipPrice<br />,CAST(isnull(tmpfee.FirstLegFees,0) AS DECIMAL(28,14)) as FirstLegPrice<br />,CAST(isnull(tmpfee.TariffFees,0) AS DECIMAL(28,14)) as TraiffPrice<br />,CAST(isnull(tmpfee.ExchangeLost,0) AS DECIMAL(28,14)) as ExchangeLost<br />,CAST(isnull(tmpfee.SalesVatFees,0) AS DECIMAL(28,14)) as SalesVatFees<br />,CAST(isnull(tmpfee.SubsidyPrice,0) AS DECIMAL(28,14)) as SubsidyPrice<br />,CAST(isnull(tmpfee.PackagedCost,0) AS DECIMAL(28,14)) as PackagedCost<br />,CAST(isnull(tmpfee.TaxIncome,0) AS DECIMAL(28,14)) AS TaxIncome<br />from <br />(<br /> select datepart(YEAR, ShipDate) SalesYear,<br /> month(ShipDate) SalesDay<br /> ,OrderSourceID<br /> ,BusinessAdminID BusinessAdminID<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))) SalesRefundsV2<br /> ,SUM(Profits) Profits,SUM(SalesPrice) SalesPrice,SUM(TransportPay) TransportPay,SUM(SalesRefunds) SalesRefunds,SUM(PromotionRebates) PromotionRebates,SUM(OtherCredits) OtherCredits<br /> ,SUM(CommisionFee) CommisionFee,SUM(FBATransactionFees) FBATransactionFees<br /> ,SUM(OrderSourceOtherDebits) OrderSourceOtherDebits<br /> ,SUM(CostOfAdvertising) CostOfAdvertising<br /> ,SUM((BuyPrice+ISNULL(DistributionPrice,0))) BuyPrice,SUM(PackagedCost) PackagedCost,SUM(PackageFees) PackageFees<br /> ,SUM(OverSeasShipFees) OverSeasShipFees,SUM(FirstLegFees) FirstLegFees,SUM(TariffFees) TariffFees,SUM(ExchangeLost) ExchangeLost<br /> ,SUM(ISNULL(SalesVatFee,0)) as SalesVatFees<br /> ,SUM(ISNULL(SubsidyPrice,0)) as SubsidyPrice<br /> ,Sum((ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))) as TaxIncome<br /> from RB_Report_OrderSettlement with(nolock)<br />=@StartDate and ShipDate
001-[步骤]
001+ <a href="https://alidocs.dingtalk.com/i/nodes/Qnp9zOoBVBZjqO74S4ALKa20V1DK0g6l">https://alidocs.dingtalk.com/i/nodes/Qnp9zOoBVBZjqO74S4ALKa20V1DK0g6l
002-[09:43:42] -------------------------------------------------------------CODE:N0943422Error:16_8623_1_-2146232060SQL:select tmpfee.SalesDay,tmpfee.OrderSourceID,tmpfee.BusinessAdminID,(cast(tmpfee.SalesYear as varchar)+ N'年' + cast(tmpfee.SalesDay as varchar)+ N'月') as XAxis,CAST(isnull(tmpfee.Profits,0) AS DECIMAL(28,14)) as OperateFee,CAST(isnull(tmpfee.SalesPrice+tmpfee.TransportPay+tmpfee.SalesRefunds+tmpfee.PromotionRebates+tmpfee.OtherCredits+tmpfee.TaxIncome,0) AS DECIMAL(28,14)) as TotalIncome,CAST(isnull(tmpfee.SalesPrice,0) AS DECIMAL(28,14)) as SalesPrice,isnull(tmprest.OrderNum,0) OrderNum,CAST(isnull(tmpfee.TransportPay,0) AS DECIMAL(28,14)) as TransportPay,CAST(isnull(tmpfee.SalesRefunds,0) AS DECIMAL(28,14)) as RefundPrice,CAST(isnull(tmpfee.SalesRefundsV2,0) AS DECIMAL(28,14)) as SalesRefundsV2,CAST(isnull(tmpfee.PromotionRebates,0) AS DECIMAL(28,14)) as PromotionFee,CAST(isnull(tmpfee.OtherCredits,0) AS DECIMAL(28,14)) as OtherIncomeAmount,CAST(isnull(tmpfee.CommisionFee,0) AS DECIMAL(28,14)) as CommissionFee,CAST(isnull(tmpfee.FBATransactionFees,0) AS DECIMAL(28,14)) as FBAOperateFee,CAST(isnull(tmpfee.OrderSourceOtherDebits,0) AS DECIMAL(28,14)) as OrderSourceCost,CAST(isnull(tmpfee.CostOfAdvertising,0) AS DECIMAL(28,14)) as CostOfAdvertising,CAST(isnull(tmpfee.BuyPrice,0) AS DECIMAL(28,14)) as BuyPrice,CAST(isnull(tmpfee.PackageFees,0) AS DECIMAL(28,14)) as PackageShipedPrice,CAST(isnull(tmpfee.OverSeasShipFees,0) AS DECIMAL(28,14)) as OverseaShipPrice,CAST(isnull(tmpfee.FirstLegFees,0) AS DECIMAL(28,14)) as FirstLegPrice,CAST(isnull(tmpfee.TariffFees,0) AS DECIMAL(28,14)) as TraiffPrice,CAST(isnull(tmpfee.ExchangeLost,0) AS DECIMAL(28,14)) as ExchangeLost,CAST(isnull(tmpfee.SalesVatFees,0) AS DECIMAL(28,14)) as SalesVatFees,CAST(isnull(tmpfee.SubsidyPrice,0) AS DECIMAL(28,14)) as SubsidyPrice,CAST(isnull(tmpfee.PackagedCost,0) AS DECIMAL(28,14)) as PackagedCost,CAST(isnull(tmpfee.TaxIncome,0) AS DECIMAL(28,14)) AS TaxIncomefrom ( select datepart(YEAR, ShipDate) SalesYear, month(ShipDate) SalesDay ,OrderSourceID ,BusinessAdminID BusinessAdminID ,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))) SalesRefundsV2 ,SUM(Profits) Profits,SUM(SalesPrice) SalesPrice,SUM(TransportPay) TransportPay,SUM(SalesRefunds) SalesRefunds,SUM(PromotionRebates) PromotionRebates,SUM(OtherCredits) OtherCredits ,SUM(CommisionFee) CommisionFee,SUM(FBATransactionFees) FBATransactionFees ,SUM(OrderSourceOtherDebits) OrderSourceOtherDebits ,SUM(CostOfAdvertising) CostOfAdvertising ,SUM((BuyPrice+ISNULL(DistributionPrice,0))) BuyPrice,SUM(PackagedCost) PackagedCost,SUM(PackageFees) PackageFees ,SUM(OverSeasShipFees) OverSeasShipFees,SUM(FirstLegFees) FirstLegFees,SUM(TariffFees) TariffFees,SUM(ExchangeLost) ExchangeLost ,SUM(ISNULL(SalesVatFee,0)) as SalesVatFees ,SUM(ISNULL(SubsidyPrice,0)) as SubsidyPrice ,Sum((ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))) as TaxIncome from RB_Report_OrderSettlement with(nolock)=@StartDate and ShipDate
001-<p>[步骤]</p>
001+ <p><a href="https://alidocs.dingtalk.com/i/nodes/Qnp9zOoBVBZjqO74S4ALKa20V1DK0g6l">https://alidocs.dingtalk.com/i/nodes/Qnp9zOoBVBZjqO74S4ALKa20V1DK0g6l</a></p>
002-<br /><br />[09:43:42] -------------------------------------------------------------<br />CODE:N0943422<br />Error:16_8623_1_-2146232060<br />SQL:select <br />tmpfee.SalesDay<br />,tmpfee.OrderSourceID<br />,tmpfee.BusinessAdminID<br />,(cast(tmpfee.SalesYear as varchar)+ N'年' + cast(tmpfee.SalesDay as varchar)+ N'月') as XAxis<br />,CAST(isnull(tmpfee.Profits,0) AS DECIMAL(28,14)) as OperateFee<br />,CAST(isnull(tmpfee.SalesPrice+tmpfee.TransportPay+tmpfee.SalesRefunds+tmpfee.PromotionRebates+tmpfee.OtherCredits+tmpfee.TaxIncome,0) AS DECIMAL(28,14)) as TotalIncome<br />,CAST(isnull(tmpfee.SalesPrice,0) AS DECIMAL(28,14)) as SalesPrice<br />,isnull(tmprest.OrderNum,0) OrderNum<br />,CAST(isnull(tmpfee.TransportPay,0) AS DECIMAL(28,14)) as TransportPay<br />,CAST(isnull(tmpfee.SalesRefunds,0) AS DECIMAL(28,14)) as RefundPrice<br />,CAST(isnull(tmpfee.SalesRefundsV2,0) AS DECIMAL(28,14)) as SalesRefundsV2<br />,CAST(isnull(tmpfee.PromotionRebates,0) AS DECIMAL(28,14)) as PromotionFee<br />,CAST(isnull(tmpfee.OtherCredits,0) AS DECIMAL(28,14)) as OtherIncomeAmount<br />,CAST(isnull(tmpfee.CommisionFee,0) AS DECIMAL(28,14)) as CommissionFee<br />,CAST(isnull(tmpfee.FBATransactionFees,0) AS DECIMAL(28,14)) as FBAOperateFee<br />,CAST(isnull(tmpfee.OrderSourceOtherDebits,0) AS DECIMAL(28,14)) as OrderSourceCost<br />,CAST(isnull(tmpfee.CostOfAdvertising,0) AS DECIMAL(28,14)) as CostOfAdvertising<br />,CAST(isnull(tmpfee.BuyPrice,0) AS DECIMAL(28,14)) as BuyPrice<br />,CAST(isnull(tmpfee.PackageFees,0) AS DECIMAL(28,14)) as PackageShipedPrice<br />,CAST(isnull(tmpfee.OverSeasShipFees,0) AS DECIMAL(28,14)) as OverseaShipPrice<br />,CAST(isnull(tmpfee.FirstLegFees,0) AS DECIMAL(28,14)) as FirstLegPrice<br />,CAST(isnull(tmpfee.TariffFees,0) AS DECIMAL(28,14)) as TraiffPrice<br />,CAST(isnull(tmpfee.ExchangeLost,0) AS DECIMAL(28,14)) as ExchangeLost<br />,CAST(isnull(tmpfee.SalesVatFees,0) AS DECIMAL(28,14)) as SalesVatFees<br />,CAST(isnull(tmpfee.SubsidyPrice,0) AS DECIMAL(28,14)) as SubsidyPrice<br />,CAST(isnull(tmpfee.PackagedCost,0) AS DECIMAL(28,14)) as PackagedCost<br />,CAST(isnull(tmpfee.TaxIncome,0) AS DECIMAL(28,14)) AS TaxIncome<br />from <br />(<br /> select datepart(YEAR, ShipDate) SalesYear,<br /> month(ShipDate) SalesDay<br /> ,OrderSourceID<br /> ,BusinessAdminID BusinessAdminID<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))) SalesRefundsV2<br /> ,SUM(Profits) Profits,SUM(SalesPrice) SalesPrice,SUM(TransportPay) TransportPay,SUM(SalesRefunds) SalesRefunds,SUM(PromotionRebates) PromotionRebates,SUM(OtherCredits) OtherCredits<br /> ,SUM(CommisionFee) CommisionFee,SUM(FBATransactionFees) FBATransactionFees<br /> ,SUM(OrderSourceOtherDebits) OrderSourceOtherDebits<br /> ,SUM(CostOfAdvertising) CostOfAdvertising<br /> ,SUM((BuyPrice+ISNULL(DistributionPrice,0))) BuyPrice,SUM(PackagedCost) PackagedCost,SUM(PackageFees) PackageFees<br /> ,SUM(OverSeasShipFees) OverSeasShipFees,SUM(FirstLegFees) FirstLegFees,SUM(TariffFees) TariffFees,SUM(ExchangeLost) ExchangeLost<br /> ,SUM(ISNULL(SalesVatFee,0)) as SalesVatFees<br /> ,SUM(ISNULL(SubsidyPrice,0)) as SubsidyPrice<br /> ,Sum((ISNULL(Tax,0)+ISNULL(MarketplaceFacilitatorTax,0))) as TaxIncome<br /> from RB_Report_OrderSettlement with(nolock)<br />=@StartDate and ShipDate
001-【性能优化】销售买家日销量报告SQL优化
001+ 【性能优化】销售人员V2报告SQL优化
001-【性能优化】销售买家日销量报告SQL优化
001+ 【性能优化】销售人员V2报告SQL优化
001-【性能优化】销售人员V2报告SQL优化
001+ 【性能优化】销售人员V2拆分仓储字段改为独立表来查询
001-【性能优化】销售人员V2报告SQL优化
001+ 【性能优化】销售人员V2拆分仓储字段改为独立表来查询
| 提报业务部门 | 技术研发中心 |
|---|---|
| 提报人员 | 林很 |
| 需求来源 | bug转需求 |
| 所属模块 | 财务 财务管理 |
| 所属计划 |
|
| 开发组 | 财务开发组 |
| 受益业务部门 | 技术研发中心 |
| 验收人员 | 许瑞丰 |
| 业务价值 | 控制风险 |
| 每月价值量 | 10000 |
| 每月节省人数 | 0 |
| 优先级 | P2 |
| 价值类型 | 长期价值 |
| 预计工时 | 3 |
| 成本 | 250 |
| ROI | 40.00 |
| 操作手册 | 否 |
| 更新点 | |
| 是否高危 | 否 |
| 评分 | |
| 当前状态 | 已关闭 |
| 所处阶段 | 已关闭 |
| 关键词 | |
| 计划上线 | |
| 上线时间 | 2025-03-04 |
| 计划验收时间 | 2025-03-07 |
| 业务验收时间 | 2025-03-07 10:09:42 |
| 满意度 | 满意 |
| 价值验收 | 基本达成 |
| 满意度分值 | 80 |
| 业务回填价值 | 10000 |
| 验收达成价值 | 48000.0 |
| 验收达成ROI | 32.0 |
| 由谁创建 | 林很 于 2025-02-14 16:38:19 |
|---|---|
| 指派给 | Closed 于 2025-03-07 14:09:15 |
| 由谁评审 | 何智军 |
| 评审时间 | 2025-02-20 |
| 由谁关闭 | 周杰 于 2025-03-07 14:09:15 |
| 关闭原因 | 已完成 |
| 最后修改 | 周杰 于 2025-03-07 14:09:15 |
| 来源Bug | |
|---|---|
| 相关Bug |
|
| 相关用例 |
|
| 相关需求 |
|
| 细分需求 |
|
满意度:满意
价值验收:基本达成
原因备注:无