( CASE WHEN ( `t1`.`warehouse_code` IN ( 'QYBLZZ', 'GZBLWH' ) ) THEN 'QYBLZZ-GZBLWH' ELSE `t1`.`warehouse_code` END ) as 'warehouse_code_extend',
t1.`shipping_deadline_real`
from dc_base_oms_sku as t1
from dc_base_oms_sku_30 as t1
left join dc_base_warehouse as t_db on t1.warehouse_code = t_db.warehouse_code
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
where t1.company_id=1 and t1.has_innersale=0 and t1.create_time>'2019-03-01 12:00:00' and t1.bailun_picking_status!='TotalPicked' and t1.bailun_order_status = 'Handling' and t1.has_delete=0 and t1.has_scalp=0 and t1.has_buyer_remark = 0
...
...
@@ -2056,7 +2056,7 @@ INSERT into dc_base_oms_sku_7_temp (
t1.`has_fba_s`,
t1.`bailun_sku_quantity_pushed`,
( CASE WHEN ( `t1`.`warehouse_code` IN ( 'QYBLZZ', 'GZBLWH' ) ) THEN 'QYBLZZ-GZBLWH' ELSE `t1`.`warehouse_code` END ) as 'warehouse_code_extend'
from dc_base_oms_sku as t1
from dc_base_oms_sku_30 as t1
left join dc_base_warehouse as t_db on t1.warehouse_code = t_db.warehouse_code
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
where t1.company_id=1 and t1.has_innersale=0 and t1.create_time>@time and t1.has_delete=0 and t1.has_scalp=0 and t1.has_buyer_remark = 0
varsql=@" select t1.*,(case when t1.platform_type='ebay' then t3.warehouse_code else t2.warehouse_code end) as 'warehouse_code' from dc_base_crm_refund as t1
left join dc_base_oms_sku as t2 on t1.origin_order_id = t2.origin_order_id and t1.bailun_sku = t2.bailun_sku
left join dc_base_oms_sku as t3 on t1.origin_order_id = t3.transaction_id and t1.bailun_sku = t3.bailun_sku
left join dc_base_oms_sku_30 as t2 on t1.origin_order_id = t2.origin_order_id and t1.bailun_sku = t2.bailun_sku
left join dc_base_oms_sku_30 as t3 on t1.origin_order_id = t3.transaction_id and t1.bailun_sku = t3.bailun_sku
where t1.gmt_create>=@btime and t1.gmt_create<=@etime ";