Commit 31ff08a5 by 泽锋 李

新增一个【采购-首单】【调拨-首单】的数据统计类型(如果1个月后出单了,则从该节点分摊到各个平台)

parent ad37feff
......@@ -605,11 +605,11 @@ namespace AutoTurnOver.DB
if (platforms != null && platforms.Count >= 1)
{
// 把原本未挂载平台的数据删除
conn.Execute(" delete from dc_report_cash_flow_log where data_type=@data_type and bailun_sku=@bailun_sku and `no`=@purchase_id and platform_type='' ", new
conn.Execute(" delete from dc_report_cash_flow_log where data_type=@data_type and bailun_sku=@bailun_sku and `no`=@purchase_id ", new
{
bailun_sku = order_item.bailun_sku,
purchase_id = order_item.purchase_id,
data_type = (int)dc_report_cash_flow_log_data_type_enum.新增采购费用
data_type = (int)dc_report_cash_flow_log_data_type_enum.新增采购费用_首单
});
foreach (var platformItem in platforms)
......@@ -668,7 +668,7 @@ namespace AutoTurnOver.DB
dc_report_cash_flow_log item = new dc_report_cash_flow_log()
{
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.status == -1) ? 1 : 0,
item = order_item.purchase_id,
update_time = now,
......@@ -862,11 +862,11 @@ where t1.create_time>=@btime and t1.create_time<=@etime ";
if (platforms != null && platforms.Count >= 1)
{
// 把原本未挂载平台的数据删除
conn.Execute(" delete from dc_report_cash_flow_log where data_type=@data_type and bailun_sku=@bailun_sku and `no`=@transfer_order_id and platform_type='' ", new
conn.Execute(" delete from dc_report_cash_flow_log where data_type=@data_type and bailun_sku=@bailun_sku and `no`=@transfer_order_id ", new
{
bailun_sku = order_item.bailun_sku,
transfer_order_id = order_item.transfer_order_id,
data_type = (int)dc_report_cash_flow_log_data_type_enum.新增头程费用
data_type = (int)dc_report_cash_flow_log_data_type_enum.新增头程费用_首单
});
foreach (var platformItem in platforms)
......@@ -920,7 +920,7 @@ where t1.create_time>=@btime and t1.create_time<=@etime ";
dc_report_cash_flow_log item = new dc_report_cash_flow_log()
{
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.deleted == 1) ? 1 : 0,
item = order_item.transfer_order_id,
update_time = now,
......
......@@ -111,7 +111,9 @@ namespace AutoTurnOver.Models
新增采购费用 = 9,
新增头程费用 = 10,
FBA = 11,
PayPal = 12
PayPal = 12,
新增采购费用_首单 = 13,
新增头程费用_首单 = 14
}
public enum dc_report_cash_flow_log_pay_type_enum
......
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