Commit 1d9b2793 by jianshuqin

修改逻辑:平台利润从2021年12月23号后过虑 美美哒和达馨账号数据

parent 8d4f9824
......@@ -1627,8 +1627,8 @@ namespace Bailun.DC.Services
sql += " and tb.purchase_create_time<@createend";
sqlparam.Add("createend", createend.Value.AddDays(1));
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and tb.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and purchase_create_time >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and tb.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') and purchase_create_time >= '2021-12-23')";
sql += " group by tb.platform_type";
......@@ -1856,8 +1856,8 @@ namespace Bailun.DC.Services
sqlparam.Add("createend", createend.Value.AddDays(1));
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and tb.id not in (SELECT id from dc_base_oms_sku WHERE seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') AND purchase_create_time >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and tb.id not in (SELECT id from dc_base_oms_sku WHERE seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') AND purchase_create_time >= '2021-12-23')";
if (statistictype == 0)
{
......@@ -2274,8 +2274,8 @@ namespace Bailun.DC.Services
sql += " and t1.profit_rate<" + (rate_end.Value / 100);
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and t1.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and purchase_create_time >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and t1.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') and purchase_create_time >= '2021-12-23')";
if (!string.IsNullOrEmpty(parameter.sort))
......@@ -2382,8 +2382,8 @@ namespace Bailun.DC.Services
sql += " and t1.profit_rate<" + (rate_end.Value / 100);
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and t1.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and purchase_create_time >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and t1.id not in (select id from dc_base_oms_order where seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') and purchase_create_time >= '2021-12-23')";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
{
......@@ -2834,7 +2834,7 @@ namespace Bailun.DC.Services
sqlparam.Add("platform_type", platform);
}
var sql = $@"select {showcol} as count,t0.platform_type,t2.category_simple_id,t2.category_simple_name from (select t1.bailun_sku,{selcol},platform_type from dc_base_oms_sku t1 where t1.has_scalp=0 and t1.has_delete=0 and t1.has_innersale=0 and t1.bailun_order_status!='Canceled' and t1.has_innersale=0 and t1.bailun_interception_status in ('','None','Failed') and t1.company_id=1 and ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA') and t1.id not in ( select id from dc_base_oms_sku where seller_account in ('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') and purchase_create_time >= '2021-12-23')
var sql = $@"select {showcol} as count,t0.platform_type,t2.category_simple_id,t2.category_simple_name from (select t1.bailun_sku,{selcol},platform_type from dc_base_oms_sku t1 where t1.has_scalp=0 and t1.has_delete=0 and t1.has_innersale=0 and t1.bailun_order_status!='Canceled' and t1.has_innersale=0 and t1.bailun_interception_status in ('','None','Failed') and t1.company_id=1 and ((t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle') or t1.platform_type='FBA') and t1.id not in ( select id from dc_base_oms_sku where seller_account in ('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') and purchase_create_time >= '2021-12-23')
and t1.paid_time >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.paid_time < '{end.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss")}' {sqlwhere}) t0
left join dc_base_sku t2 on t0.bailun_sku = t2.bailun_sku
group by t0.platform_type,t2.category_simple_id";
......@@ -5352,16 +5352,16 @@ namespace Bailun.DC.Services
}
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += @" and t1.id not in (
select t2.id from dc_base_crm_refund t2
inner join dc_base_oms_order t3
on t2.origin_order_id = t3.origin_order_id
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t3.purchase_create_time >= '2021-12-23'
where 1 = 1
and t2.platform_type = 'FBA'
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t2.refund_time >= '2021-12-23'
)";
......@@ -5533,16 +5533,16 @@ namespace Bailun.DC.Services
}
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += @" and t1.id not in (
select t2.id from dc_base_crm_refund t2
inner join dc_base_oms_order t3
on t2.origin_order_id = t3.origin_order_id
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t3.purchase_create_time >= '2021-12-23'
where 1 = 1
and t2.platform_type = 'FBA'
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t2.refund_time >= '2021-12-23'
)";
......@@ -5703,16 +5703,16 @@ namespace Bailun.DC.Services
}
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += @" and t1.id not in (
select t2.id from dc_base_crm_refund t2
inner join dc_base_oms_order t3
on t2.origin_order_id = t3.origin_order_id
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t3.purchase_create_time >= '2021-12-23'
where 1 = 1
and t2.platform_type = 'FBA'
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t2.refund_time >= '2021-12-23'
)";
......@@ -5856,16 +5856,16 @@ namespace Bailun.DC.Services
sql += " and t1.shipping_status in ('TotalShipping','PartShipping') ";
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += @" and t1.id not in (
select t2.id from dc_base_crm_refund t2
inner join dc_base_oms_order t3
on t2.origin_order_id = t3.origin_order_id
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t3.seller_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t3.purchase_create_time >= '2021-12-23'
where 1 = 1
and t2.platform_type = 'FBA'
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
and t2.bailun_account in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
and t2.refund_time >= '2021-12-23'
)";
......@@ -5933,11 +5933,11 @@ namespace Bailun.DC.Services
SELECT t2.id FROM dc_base_crm_refund t2
INNER JOIN dc_base_oms_order t3
ON t2.origin_order_id = t3.origin_order_id
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t3.purchase_create_time >= '2021-12-23'
WHERE 1 = 1
AND t2.platform_type = 'FBA'
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t2.refund_time >= '2021-12-23'
)";
......@@ -6101,8 +6101,8 @@ namespace Bailun.DC.Services
sql += " and t1.type=" + type.Value;
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and t1.id not in ( select id from dc_base_finance_amazon_ad_product where account_name in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and t1.report_date >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and t1.id not in ( select id from dc_base_finance_amazon_ad_product where account_name in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') and t1.report_date >= '2021-12-23')";
......@@ -6204,8 +6204,8 @@ namespace Bailun.DC.Services
{
sql += " and t1.type=" + type.Value;
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and t1.id not in ( select id from dc_base_finance_amazon_ad_product where account_name in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and t1.report_date >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and t1.id not in ( select id from dc_base_finance_amazon_ad_product where account_name in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') and t1.report_date >= '2021-12-23')";
using (var cn = new MySqlConnection(Common.GlobalConfig.ConnectionString_read))
{
......@@ -6312,8 +6312,8 @@ namespace Bailun.DC.Services
sql += " and t1.report_date<@end";
sqlparam.Add("end", end.Value.AddDays(1));
}
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU') 数据
sql += " and t1.id not in ( select id from dc_base_finance_amazon_ad_product where account_name in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU') and t1.report_date >= '2021-12-23')";
//从2021年12月23号后过虑 美美哒和达馨('Lagunamoon_Beauty','Lagunamoon Nail Varnish','dawarmthEU','dawarmth') 数据
sql += " and t1.id not in ( select id from dc_base_finance_amazon_ad_product where account_name in ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth') and t1.report_date >= '2021-12-23')";
......
......@@ -1213,11 +1213,11 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website ";
SELECT t2.id FROM dc_base_crm_refund t2
INNER JOIN dc_base_oms_order t3
ON t2.origin_order_id = t3.origin_order_id
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t3.purchase_create_time >= '2021-12-23'
WHERE 1 = 1
AND t2.platform_type = 'FBA'
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t2.refund_time >= '2021-12-23'
)
GROUP BY
......@@ -1250,11 +1250,11 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website ";
SELECT t2.id FROM dc_base_crm_refund t2
INNER JOIN dc_base_oms_order t3
ON t2.origin_order_id = t3.origin_order_id
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t3.purchase_create_time >= '2021-12-23'
WHERE 1 = 1
AND t2.platform_type = 'FBA'
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t2.refund_time >= '2021-12-23'
)");
}
......@@ -1287,11 +1287,11 @@ AND s2.datacenter_col like '%{input.FeeName}' group by s2.platform,s1.website ";
SELECT t2.id FROM dc_base_crm_refund t2
INNER JOIN dc_base_oms_order t3
ON t2.origin_order_id = t3.origin_order_id
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t3.seller_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t3.purchase_create_time >= '2021-12-23'
WHERE 1 = 1
AND t2.platform_type = 'FBA'
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU')
AND t2.bailun_account IN ('Lagunamoon_Beauty', 'Lagunamoon Nail Varnish', 'dawarmthEU','dawarmth')
AND t2.refund_time >= '2021-12-23'
)");
}
......
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