left join dc_base_warehouse as t_db on t1.warehouse_code = t_db.warehouse_code
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
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
where t1.pay_time>'2019-03-01' and t1.bailun_picking_status!='TotalPicked' and t1.bailun_order_status !='Canceled' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part')
where t1.create_time>'2019-03-01 12:00:00' and t1.bailun_picking_status!='TotalPicked' and t1.bailun_order_status !='Canceled' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part') and t_db.hq_type!='FBA仓'
";
";
sql=@"
sql=@"
select
select
...
@@ -187,7 +187,7 @@ left join (
...
@@ -187,7 +187,7 @@ left join (
FROM
FROM
( `dc_base_oms_sku` `t1` LEFT JOIN `dc_base_warehouse` `t2` ON ( ( `t1`.`warehouse_code` = `t2`.`warehouse_code` ) ) )
( `dc_base_oms_sku` `t1` LEFT JOIN `dc_base_warehouse` `t2` ON ( ( `t1`.`warehouse_code` = `t2`.`warehouse_code` ) ) )
WHERE
WHERE
( ( `t2`.`hq_type` = '国内仓' ) AND ( `t1`.`bailun_picking_status` <> 'TotalPicked' ) AND ( `t1`.`pay_time` > '2019-03-01' ) ) and t1.bailun_order_status !='Canceled' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part')
( ( `t2`.`hq_type` = '国内仓' and t1.warehouse_code not in('GZBLZZG','QYBLZZC','SZBLZZC') ) AND ( `t1`.`bailun_picking_status` <> 'TotalPicked' ) AND ( `t1`.`create_time` > '2019-03-01 12:00:00' ) ) and t1.bailun_order_status !='Canceled' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part')
";
";
if(!string.IsNullOrWhiteSpace(m.bailun_sku))
if(!string.IsNullOrWhiteSpace(m.bailun_sku))
{
{
...
@@ -201,7 +201,7 @@ left join dc_base_stock as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_
...
@@ -201,7 +201,7 @@ left join dc_base_stock as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
left join dc_auto_config_sku_warehouse as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join dc_auto_config_sku_warehouse as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join view_buy_ontheway_detail as t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
left join view_buy_ontheway_detail as t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code = t8.warehouse_code
where t1.bailun_picking_status!='TotalPicked' and t1.pay_time>'2019-03-01' and t1.bailun_order_status !='Canceled' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part')
where t1.bailun_picking_status!='TotalPicked' and t1.create_time>'2019-03-01 12:00:00' and t1.bailun_order_status !='Canceled' and t1.has_delete=0 and t1.has_scalp=0 and t1.bailun_interception_status not in ('Success','Part') and t_db.hq_type!='FBA仓'