@@ -2187,14 +2191,14 @@ sum(t1.bailun_sku_quantity_ordered) as 'sales',
sum(t1.bailun_sku_quantity_ordered * t1.amount_sales * t1.order_to_usd_exchange_rate) as 'sales_amount'
from dc_base_oms_sku_30 t1
join dc_base_oms_order t2 on t1.bailun_order_id=t2.bailun_order_id and t2.has_scalp=0 and t2.has_innersale=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_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_source t5 on t4.source = t5.source
join dc_base_warehouse t6 on t3.warehouse_code=t6.warehouse_code
-- 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'
and ( t1.bailun_order_status!='CantHandle')
and t2.paid_time>=@btime and t2.paid_time<@etime
GROUP BY t1.bailun_sku,t1.warehouse_code ",new{btime=DateTime.Now.AddDays(-7).GetWeekFirstDayMon().ToDayHome(),etime=DateTime.Now.AddDays(-7).GetWeekLastDaySun().ToDayEnd()}).ToList();
GROUP BY t1.bailun_sku,t1.warehouse_code ",new{btime=now.Value.AddDays(-7).GetWeekFirstDayMon().ToDayHome(),etime=now.Value.AddDays(-7).GetWeekLastDaySun().ToDayEnd()}).ToList();