where t1.platform_type='Ebay' and t1.website='uk' and t1.bailun_payment_status!='Canceled' and t1.paid_time>='{start.ToString("yyyy-MM-dd")}' and t1.paid_time<'{end.AddDays(1).ToString("yyyy-MM-dd")}') t1";
varsql="select bailun_order_id,GROUP_CONCAT(item_id) as item_id from dc_base_oms_platform_sku where bailun_order_id in ('"+string.Join("','",orderid)+"') group by bailun_order_id;";
varsql=$"select id,account_entry_type,description,bj_date,gross_amount,item_id,account_id,currency,exchange_rate,company_id from dc_base_finance_ebay where bj_date>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and bj_date<'{end.ToString("yyyy-MM-dd HH:mm:ss")}' and account_entry_type in ('{string.Join("','",feetype)}') ";
varsql=$@"select distinct DATE_FORMAT(t1.purchase_create_time,'%Y-%m-%d') from dc_base_oms_sku as t1 where (t1.gmt_modified >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.gmt_modified <='{end.ToString("yyyy-MM-dd HH:mm:ss")}') or (
(t1.has_delete = 1 or t1.has_scalp = 1) and t1.gmt_modified >= '{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t1.gmt_modified <='{end.ToString("yyyy-MM-dd HH:mm:ss")}')";
(select t2.bailun_order_id,t2.bailun_sku,t2.quantity_shipped,t2.warehouse_code,t2.shipping_time,t2.has_delete,t2.pick_order_id from dc_base_oms_pick t2 where t2.gmt_modified>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and t2.gmt_modified<'{end.ToString("yyyy-MM-dd HH:mm:ss")}' and t2.shipping_status='TotalShipping' and t2.company_id=1 {str}{" limit "+(page-1)*pagesize+","+pagesize}) t2
left join dc_base_oms_sku t1 on t1.bailun_order_id=t2.bailun_order_id and t1.bailun_sku=t2.bailun_sku";
varsql=$"select Count(id) id,sum(amount_sales*seller_order_exchange_rate) amount_sales,sum(profit_total) profit_total,sum(profit_total)/sum(amount_sales*seller_order_exchange_rate) as profit_rate from dc_base_oms_order where create_time>='{start.ToString("yyyy-MM-dd HH:mm:ss")}' and create_time<'{end.ToString("yyyy-MM-dd HH:mm:ss")}'";