Commit 71757a38 by 泽锋 李

fix

parent 68540e0a
......@@ -1315,6 +1315,14 @@ GROUP BY platform_type,website";
{
sql = $" select sum(`val`) as 'val' from dc_report_cash_flow_log as t1 where t1.is_delete=0 and `val`!=0 ";
}
else
{
if (search.view_type == 2)
{
sql = $@" select t1.data_type,t1.pay_type,sum(`val`) as 'val'
from dc_report_cash_flow_log as t1 left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code where t1.is_delete=0 and `val`!=0 ";
}
}
DynamicParameters parameters = new DynamicParameters();
if (search.type == 1)
{
......@@ -1354,6 +1362,10 @@ GROUP BY platform_type,website";
sql += " and t1.data_type in @data_type ";
parameters.Add("data_type", search.data_type);
}
if (search.view_type == 2)
{
sql += "group by t1.data_type ";
}
if (search.issum)
{
return new Page<dc_report_cash_flow_log_dto>()
......
......@@ -236,6 +236,7 @@ namespace AutoTurnOver.Models
public string warehouse_code { get; set; }
public string platform_type { get; set; }
public string web_site { get; set; }
public int? view_type { get; set; }
}
public class dc_report_cash_flow_sku_group
......
......@@ -133,7 +133,7 @@ namespace AutoTurnOver.Controllers
}
[HttpGet]
public JsonResult LogPage(int limit, int offset, string order, string sort, DateTime? btime, DateTime? etime, string bailun_sku, string data_type = null, int? type = null, string platform_type = null, string warehouse_code = null, string web_site = "")
public JsonResult LogPage(int limit, int offset, string order, string sort, DateTime? btime, DateTime? etime, string bailun_sku, string data_type = null, int? type = null, string platform_type = null, string warehouse_code = null, string web_site = "", int? view_type = 1)
{
try
{
......@@ -152,7 +152,8 @@ namespace AutoTurnOver.Controllers
sord = order,
sidx = sort,
warehouse_code = warehouse_code,
web_site = web_site
web_site = web_site,
view_type = view_type
};
......
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