Commit 44f8627d by lizefeng

报表新增汇总,固定列

parent 456a945d
...@@ -6,6 +6,10 @@ namespace AutoTurnOver.Models.Report ...@@ -6,6 +6,10 @@ namespace AutoTurnOver.Models.Report
{ {
public class bailun_sku_website_sales_search_dto public class bailun_sku_website_sales_search_dto
{ {
/// <summary>
/// 是否汇总
/// </summary>
public bool? has_sum { get; set; }
public string platform_type { get; set; } public string platform_type { get; set; }
} }
public class bailun_sku_website_sales_dto public class bailun_sku_website_sales_dto
...@@ -36,7 +40,9 @@ namespace AutoTurnOver.Models.Report ...@@ -36,7 +40,9 @@ namespace AutoTurnOver.Models.Report
public class bailun_sku_goods_search_dto public class bailun_sku_goods_search_dto
{ {
public bool? has_sum { get; set; }
public string product_inner_code { get; set; } public string product_inner_code { get; set; }
public string platform_type { get; set; }
} }
public class bailun_sku_goods_dto public class bailun_sku_goods_dto
{ {
......
...@@ -32,6 +32,7 @@ namespace AutoTurnOver.Models.Report ...@@ -32,6 +32,7 @@ namespace AutoTurnOver.Models.Report
public class supplier_sales_search_dto public class supplier_sales_search_dto
{ {
public bool? has_sum { get; set; }
public string supplier_name { get; set; } public string supplier_name { get; set; }
} }
} }
...@@ -693,13 +693,18 @@ namespace AutoTurnOver.Services ...@@ -693,13 +693,18 @@ namespace AutoTurnOver.Services
} }
public static List<platform_type_website_dto> PlatformtypeWebsiteList() public static List<platform_type_website_dto> PlatformtypeWebsiteList(string platform_type)
{ {
//查询采购建议明细 //查询采购建议明细
return RedisHelper.Get(RedisConsts.platform_type_website, () => var datas = RedisHelper.Get(RedisConsts.platform_type_website, () =>
{ {
return report.GetPlatformWebsite(); return report.GetPlatformWebsite();
}); });
if (!string.IsNullOrWhiteSpace(platform_type))
{
datas = datas.Where(s => platform_type.Equals(s.platform_type, StringComparison.OrdinalIgnoreCase)).ToList();
}
return datas;
} }
} }
......
...@@ -138,9 +138,9 @@ namespace AutoTurnOver.Controllers ...@@ -138,9 +138,9 @@ namespace AutoTurnOver.Controllers
var datas = ApiServices.PlatformList(); var datas = ApiServices.PlatformList();
return new JsonResult(datas); return new JsonResult(datas);
} }
public JsonResult PlatformtypeWebsiteList() public JsonResult PlatformtypeWebsiteList(string platform_type)
{ {
var datas = ApiServices.PlatformtypeWebsiteList(); var datas = ApiServices.PlatformtypeWebsiteList(platform_type);
return new JsonResult(datas); return new JsonResult(datas);
} }
......
...@@ -640,6 +640,20 @@ namespace AutoTurnOver.Controllers ...@@ -640,6 +640,20 @@ namespace AutoTurnOver.Controllers
}); });
} }
public JsonResult GetSkuWebsiteSalesSumFooter(string platform_type)
{
bailun_sku_website_sales_search_dto search_data = new bailun_sku_website_sales_search_dto
{
platform_type = platform_type,
has_sum =true
};
var list = new ReportServices().GetSkuWebsiteSales(search_data);
return new JsonResult(list == null || list.Count <= 0 ? new dc_base_stock_dto() : list[0]);
}
public JsonResult SupplierSalesList(string supplier_name, int offset, int limit, string order, string sort) public JsonResult SupplierSalesList(string supplier_name, int offset, int limit, string order, string sort)
{ {
var m = new supplier_sales_search_dto var m = new supplier_sales_search_dto
...@@ -657,11 +671,27 @@ namespace AutoTurnOver.Controllers ...@@ -657,11 +671,27 @@ namespace AutoTurnOver.Controllers
}); });
} }
public JsonResult GetGoods(string product_inner_code, int offset, int limit, string order, string sort) public JsonResult SupplierSalesListSumFooter(string supplier_name)
{
var m = new supplier_sales_search_dto
{
supplier_name = supplier_name,
has_sum = true
};
var services = new ReportServices();
var total = 0;
var list = services.SupplierSalesList(m, 0, 0, ref total, order: "", sort: "");
return new JsonResult(list == null || list.Count <= 0 ? new supplier_sales_dto() : list[0]);
}
public JsonResult GetGoods(string product_inner_code,string platform_type, int offset, int limit, string order, string sort)
{ {
var m = new bailun_sku_goods_search_dto var m = new bailun_sku_goods_search_dto
{ {
product_inner_code = product_inner_code, product_inner_code = product_inner_code,
platform_type = platform_type
}; };
var services = new ReportServices(); var services = new ReportServices();
var total = 0; var total = 0;
...@@ -673,5 +703,21 @@ namespace AutoTurnOver.Controllers ...@@ -673,5 +703,21 @@ namespace AutoTurnOver.Controllers
total = total, total = total,
}); });
} }
public JsonResult GetGoodsSumFooter(string product_inner_code, string platform_type)
{
var m = new bailun_sku_goods_search_dto
{
product_inner_code = product_inner_code,
platform_type = platform_type,
has_sum = true
};
var services = new ReportServices();
var total = 0;
var list = services.GetGoods(m, 0, 0, ref total, order: "", sort: "");
return new JsonResult(list == null || list.Count <= 0 ? new supplier_sales_dto() : list[0]);
}
} }
} }
\ No newline at end of file
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