Commit db91d446 by DESKTOP-732ATD8\BLT

修复BUG:月销售平台统计数据

parent aedd9d85
...@@ -477,12 +477,12 @@ and s1.management_cost_name = @managementcostname"; ...@@ -477,12 +477,12 @@ and s1.management_cost_name = @managementcostname";
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
if (isCost) if (isCost)
{ {
sql.Append(@"SELECT t1.platform_type, SUM(t1.cost_product) AS original_amount, sql.Append(@"SELECT t1.platform_type, SUM(t1.cost_product * t1.quantity_shipped) AS original_amount,
SUM(t1.cost_product * t1.quantity_shipped) AS total_amount_sales,COUNT(0) total_order FROM dc_month_sales_profit_orderdetail AS t1 "); SUM(t1.cost_product * t1.quantity_shipped) AS total_amount_sales,COUNT(0) total_order FROM dc_month_sales_profit_orderdetail AS t1 ");
} }
else else
{ {
sql.Append(@"SELECT t1.platform_type, SUM(t1.amount_sales) AS original_amount, sql.Append(@"SELECT t1.platform_type, SUM(t1.amount_sales * t1.quantity_shipped) AS original_amount,
SUM(t1.amount_sales * t1.seller_order_exchange_rate * t1.quantity_shipped) AS total_amount_sales,COUNT(0)AS total_order FROM dc_month_sales_profit_orderdetail AS t1 "); SUM(t1.amount_sales * t1.seller_order_exchange_rate * t1.quantity_shipped) AS total_amount_sales,COUNT(0)AS total_order FROM dc_month_sales_profit_orderdetail AS t1 ");
} }
sql.Append("INNER JOIN dc_base_oms_sku AS t2 ON t1.orderskuid = t2.id "); sql.Append("INNER JOIN dc_base_oms_sku AS t2 ON t1.orderskuid = t2.id ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment