Commit dba00e9e by 泽锋 李

fix

parent 44731190
...@@ -1828,7 +1828,7 @@ sum(case when occur_time>=@btime and data_type not in (2) then val else 0 end ) ...@@ -1828,7 +1828,7 @@ sum(case when occur_time>=@btime and data_type not in (2) then val else 0 end )
sum(case when occur_time<@btime and data_type in (2) then val else 0 end ) as 'last_income', sum(case when occur_time<@btime and data_type in (2) then val else 0 end ) as 'last_income',
sum(case when occur_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend', sum(case when occur_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend',
1 as 'type' 1 as 'type'
from dc_report_cash_flow_log where occur_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12) and warehouse_code!='' from dc_report_cash_flow_log where occur_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12) and warehouse_code!='' and is_delete=0
GROUP BY bailun_sku,warehouse_code; GROUP BY bailun_sku,warehouse_code;
insert dc_report_cash_flow_sku_group_temp(`warehouse_code`,`bailun_sku`,`balance`,`current_date_begin`,`current_date_end`,`last_date_begin`,`last_date_end`,`current_income`,`current_expend`,`last_income`,`last_expend`,`type`) insert dc_report_cash_flow_sku_group_temp(`warehouse_code`,`bailun_sku`,`balance`,`current_date_begin`,`current_date_end`,`last_date_begin`,`last_date_end`,`current_income`,`current_expend`,`last_income`,`last_expend`,`type`)
...@@ -1845,7 +1845,7 @@ sum(case when pay_time>=@btime and data_type not in (2) then val else 0 end ) as ...@@ -1845,7 +1845,7 @@ sum(case when pay_time>=@btime and data_type not in (2) then val else 0 end ) as
sum(case when pay_time<@btime and data_type in (2) then val else 0 end ) as 'last_income', sum(case when pay_time<@btime and data_type in (2) then val else 0 end ) as 'last_income',
sum(case when pay_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend', sum(case when pay_time<@btime and data_type not in (2) then val else 0 end ) as 'last_expend',
2 as 'type' 2 as 'type'
from dc_report_cash_flow_log where pay_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12) and warehouse_code!='' from dc_report_cash_flow_log where pay_time>=@lastBtime and data_type in (2,3,5,8,9,10,11,12) and warehouse_code!='' and is_delete=0
GROUP BY bailun_sku,warehouse_code; GROUP BY bailun_sku,warehouse_code;
......
...@@ -1161,7 +1161,7 @@ GROUP BY platform_type,website"; ...@@ -1161,7 +1161,7 @@ GROUP BY platform_type,website";
datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 11 }, date_type_str = "fba费", remarks = " ", dates = new List<report_cash_flow_view_dto.date_dto>() }); datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 11 }, date_type_str = "fba费", remarks = " ", dates = new List<report_cash_flow_view_dto.date_dto>() });
datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 12 }, date_type_str = "paypal费", remarks = " ", dates = new List<report_cash_flow_view_dto.date_dto>() }); datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 12 }, date_type_str = "paypal费", remarks = " ", dates = new List<report_cash_flow_view_dto.date_dto>() });
datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 4, 3 }, date_type_str = "汇总利润", remarks = " oms 中的订单,销售额 - 销售成本 - 尾程费 - 头程费 - 退款 - 平台费 - fba费 -paypal 费 (不包含广告费、上架费)", dates = new List<report_cash_flow_view_dto.date_dto>() }); datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 4, 3 }, date_type_str = "汇总利润", remarks = " oms 中的订单,销售额 - 销售成本 - 尾程费 - 头程费 - 退款 - 平台费 - fba费 -paypal 费 (不包含广告费、上架费)", dates = new List<report_cash_flow_view_dto.date_dto>() });
datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 2, 9, 10, 5, 8, 11, 12 }, date_type_str = "现金流结余", remarks = " 销售金额 - 新增采购费用 - 新增头程费用 - 平台费用 - 尾程费用 ", dates = new List<report_cash_flow_view_dto.date_dto>() }); datas.Add(new report_cash_flow_view_dto { date_type = new List<int> { 2, 3, 5, 8, 9, 10, 11, 12 }, date_type_str = "现金流结余", remarks = " 销售金额 - 新增采购费用 - 新增头程费用 - 平台费用 - 尾程费用 ", dates = new List<report_cash_flow_view_dto.date_dto>() });
var btime = DateTime.Now.AddDays(-8).ToDayHome(); var btime = DateTime.Now.AddDays(-8).ToDayHome();
var etime = DateTime.Now.AddDays(-1).ToDayEnd(); var etime = DateTime.Now.AddDays(-1).ToDayEnd();
if (search.btime != null) if (search.btime != null)
...@@ -1179,8 +1179,8 @@ GROUP BY platform_type,website"; ...@@ -1179,8 +1179,8 @@ GROUP BY platform_type,website";
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
if (!string.IsNullOrWhiteSpace(search.bailun_sku)) if (!string.IsNullOrWhiteSpace(search.bailun_sku))
{ {
occur_sql = " select occur_time as 'date',val,data_type,1 as 'type',platform_type,web_site from dc_report_cash_flow_log where is_delete=0 and occur_time >=@btime and occur_time<=@etime and bailun_sku=@bailun_sku and warehouse_code = @warehouse_code "; occur_sql = " select occur_time as 'date',sum(val) as 'val',data_type,1 as 'type',platform_type,web_site from dc_report_cash_flow_log where is_delete=0 and occur_time >=@btime and occur_time<=@etime and bailun_sku=@bailun_sku and warehouse_code = @warehouse_code ";
pay_sql = " select pay_time as 'date',val,data_type,1 as 'type',platform_type,web_site from dc_report_cash_flow_log where is_delete=0 and pay_time >=@btime and pay_time<=@etime and bailun_sku=@bailun_sku and warehouse_code = @warehouse_code "; pay_sql = " select pay_time as 'date',sum(val) as 'val',data_type,1 as 'type',platform_type,web_site from dc_report_cash_flow_log where is_delete=0 and pay_time >=@btime and pay_time<=@etime and bailun_sku=@bailun_sku and warehouse_code = @warehouse_code ";
parameters.Add("bailun_sku",search.bailun_sku); parameters.Add("bailun_sku",search.bailun_sku);
parameters.Add("warehouse_code", search.warehouse_code); parameters.Add("warehouse_code", search.warehouse_code);
......
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