Commit 0fd6611a by zhoujinhui

月销售利润报表统计新增统计字段

parent ca400072
...@@ -14,5 +14,10 @@ ...@@ -14,5 +14,10 @@
/// 对应平台总销售额 /// 对应平台总销售额
/// </summary> /// </summary>
public decimal total_amount_sales { get; set; } public decimal total_amount_sales { get; set; }
/// <summary>
/// 订单数
/// </summary>
public decimal total_order { get; set; }
} }
} }
...@@ -466,7 +466,7 @@ and s1.management_cost_name = @managementcostname"; ...@@ -466,7 +466,7 @@ and s1.management_cost_name = @managementcostname";
public List<PlatformTypeMonthlyStatisticsDto> GetPlatformTypeMonthlyStatistics(string month, string financecategory) public List<PlatformTypeMonthlyStatisticsDto> GetPlatformTypeMonthlyStatistics(string month, string financecategory)
{ {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.Append("SELECT t1.platform_type, SUM(t1.amount_sales)AS total_amount_sales FROM dc_month_sales_profit_orderdetail AS t1 "); sql.Append("SELECT t1.platform_type, SUM(t1.amount_sales)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 ");
sql.Append($"WHERE t1.`month` ='{month}' "); sql.Append($"WHERE t1.`month` ='{month}' ");
if (!string.IsNullOrEmpty(financecategory) && financecategory != "其他") if (!string.IsNullOrEmpty(financecategory) && financecategory != "其他")
......
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