sum(t1.bailun_sku_quantity_ordered * t1.amount_sales * t1.order_to_usd_exchange_rate) as 'sales_amount'
sum(t1.bailun_sku_quantity_ordered * t1.amount_sales * t1.order_to_usd_exchange_rate) as 'sales_amount'
from dc_base_oms_sku t1
from dc_base_oms_sku t1
...
@@ -2089,16 +2084,25 @@ join dc_base_oms_order t2 on t1.bailun_order_id=t2.bailun_order_id and t2.has_sc
...
@@ -2089,16 +2084,25 @@ join dc_base_oms_order t2 on t1.bailun_order_id=t2.bailun_order_id and t2.has_sc
left join dc_base_oms_pick t3 on t1.bailun_order_id=t3.bailun_order_id and t1.bailun_sku=t3.bailun_sku and t3.has_delete=0
left join dc_base_oms_pick t3 on t1.bailun_order_id=t3.bailun_order_id and t1.bailun_sku=t3.bailun_sku and t3.has_delete=0
left join dc_base_sku t4 on t1.bailun_sku=t4.bailun_sku
left join dc_base_sku t4 on t1.bailun_sku=t4.bailun_sku
left join dc_base_sku_source t5 on t4.source = t5.source
left join dc_base_sku_source t5 on t4.source = t5.source
join dc_base_warehouse t6 on t3.warehouse_code=t6.warehouse_code and t6.hq_type!='国内仓'
join dc_base_warehouse t6 on t3.warehouse_code=t6.warehouse_code
where t1.has_delete=0 and t1.company_id=1 and t2.bailun_order_status!='Canceled'
where t1.has_delete=0 and t1.company_id=1 and t2.bailun_order_status!='Canceled'
and (t1.platform_type!='FBA' and t1.bailun_order_status!='CantHandle')
and ( t1.bailun_order_status!='CantHandle')
and t2.paid_time>=@btime and t2.paid_time<@etime
and t2.paid_time>=@btime and t2.paid_time<@etime
GROUP BY t1.bailun_sku,t1.warehouse_code;
GROUP BY t1.bailun_sku,t1.warehouse_code ",new{btime=DateTime.Now.AddDays(-7).GetWeekFirstDayMon().ToDayHome(),etime=DateTime.Now.AddDays(-7).GetWeekLastDaySun().ToDayEnd()}).ToList();