Commit 43b3e3d5 by 泽锋 李

刷新调拨订单数据

parent 0189eda4
...@@ -492,18 +492,36 @@ namespace AutoTurnOver.DB ...@@ -492,18 +492,36 @@ namespace AutoTurnOver.DB
var addList = new List<dc_report_cash_flow_log>(); var addList = new List<dc_report_cash_flow_log>();
var updateList = new List<dc_report_cash_flow_log>(); var updateList = new List<dc_report_cash_flow_log>();
// 未拦截订单
var bailun_interception_status = new List<string>() { "None", "Failed" };
foreach (var order_item in order_list) foreach (var order_item in order_list)
{ {
try try
{ {
var is_delete = (
(!bailun_interception_status.Any(v => v.Equals(order_item.bailun_interception_status, StringComparison.OrdinalIgnoreCase))) // 拦截单
||
order_item.has_innersale == 1 // 内购单
||
"Canceled".Equals(order_item.bailun_order_status, StringComparison.OrdinalIgnoreCase) // 取消单
||
((!"FBA".Equals(order_item.platform_type, StringComparison.OrdinalIgnoreCase)) && "CantHandle".Equals(order_item.bailun_order_status, StringComparison.OrdinalIgnoreCase)) // 非fba 的订单状态为取消
||
order_item.has_scalp == 1 // 刷单
||
order_item.has_delete == 1
||
order_item.company_id != 1
) ? 1 : 0;
#region 尾程费 #region 尾程费
dc_report_cash_flow_log item4 = new dc_report_cash_flow_log() dc_report_cash_flow_log item4 = new dc_report_cash_flow_log()
{ {
bailun_sku = order_item.bailun_sku, bailun_sku = order_item.bailun_sku,
data_type = (int)dc_report_cash_flow_log_data_type_enum.尾程费用, data_type = (int)dc_report_cash_flow_log_data_type_enum.尾程费用,
is_delete = (order_item.has_delete == 1 || order_item.has_scalp == 1) ? 1 : 0, is_delete = is_delete,
item = order_item.bailun_order_id, item = order_item.bailun_order_id,
update_time = now, update_time = now,
no = order_item.bailun_order_id, no = order_item.bailun_order_id,
...@@ -1512,7 +1530,7 @@ GROUP BY platform_type,website"; ...@@ -1512,7 +1530,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, 15, 16 }, 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, 15, 16 }, 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, 3, 5, 8, 9, 10, 11, 12,13,14, 15, 16 }, 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,15,16,5,8,9,13,10,14,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)
......
...@@ -16,11 +16,11 @@ namespace ResetOutofstock ...@@ -16,11 +16,11 @@ namespace ResetOutofstock
{ {
Task.Factory.StartNew(() => Task.Factory.StartNew(() =>
{ {
Console.WriteLine("开始刷新oms订单数据"); Console.WriteLine("开始刷新调拨订单数据");
var now = DateTime.Now; var now = DateTime.Now;
report_cash_flow_dao.CalculationOrder(now.AddMonths(-3),DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59"))); report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
report.ResetCashFlowData(); report.ResetCashFlowData();
Console.WriteLine("结束oms订单数据"); Console.WriteLine("结束调拨订单数据");
}); });
......
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