join dc_base_oms_sku t1 on t1.bailun_order_id=t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku and 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.company_id=1 and t1.platform_type!='Ebay' and t1.platform_type!='FBA'
where t2.has_delete=0 and t2.shipping_status='TotalShipping' and t2.company_id=1 and t2.shipping_time>='{day.ToString("yyyy-MM-dd")}' and t2.shipping_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' group by platform_type
union all
select platform_type,sum(amount_sales*seller_order_exchange_rate) amount,sum(cost_platform_fee*seller_order_exchange_rate) cost_platform_fee,sum(cost_fba_fee*seller_order_exchange_rate) cost_fba_fee from dc_base_oms_order where platform_type='FBA' and create_time>='{day.ToString("yyyy-MM-dd")}' and create_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' and company_id=1 and bailun_order_status!='Canceled' and has_scalp=0 and has_innersale=0
select platform_type,sum(amount_sales*seller_order_exchange_rate) amount,sum((cost_platform_fee+cost_fba_fee)*seller_order_exchange_rate) cost_platform_fee,sum(cost_fba_fee*seller_order_exchange_rate) cost_fba_fee from dc_base_oms_order where platform_type='FBA' and create_time>='{day.ToString("yyyy-MM-dd")}' and create_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' and company_id=1 and bailun_order_status!='Canceled' and has_scalp=0 and has_innersale=0
sql=$@"select sum(t1.other_to_cny_money) amount,if(t2.platform is null,'Joom',t2.platform) as platform_type from dc_base_finance_cashierdetail t1
left join dc_base_seller_account t2 on t1.salesl_platform=t2.platform_id
sql=$@"select sum(t1.other_to_cny_money) amount,t2.english_name as platform_type from dc_base_finance_cashierdetail t1
join dc_base_finance_salesplatform t2 on t1.salesl_platform=t2.platform_id and t2.platform_id!=100
where t1.status=2 and daozhang_time>='{day.ToString("yyyy-MM-dd")}' and daozhang_time<'{day.AddDays(1).ToString("yyyy-MM-dd")}' group by salesl_platform";