Commit a2ae15af by lizefeng

缓存采购在途表

parent 3682f75b
...@@ -200,7 +200,7 @@ left join china_warehouse_unshipped as t4 on t1.bailun_sku = t4.bailun_sku and t ...@@ -200,7 +200,7 @@ left join china_warehouse_unshipped as t4 on t1.bailun_sku = t4.bailun_sku and t
left join dc_base_stock as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code left join dc_base_stock as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.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
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_extend = t8.warehouse_code left join buy_ontheway_detail_temp as t8 on t1.bailun_sku = t8.bailun_sku and t1.warehouse_code_extend = t8.warehouse_code
where 1=1 where 1=1
"; ";
} }
...@@ -357,6 +357,24 @@ alter table china_warehouse_unshipped rename china_warehouse_unshippedTemp; ...@@ -357,6 +357,24 @@ alter table china_warehouse_unshipped rename china_warehouse_unshippedTemp;
alter table china_warehouse_unshipped_temp rename china_warehouse_unshipped; alter table china_warehouse_unshipped_temp rename china_warehouse_unshipped;
alter table china_warehouse_unshippedTemp rename china_warehouse_unshipped_temp; alter table china_warehouse_unshippedTemp rename china_warehouse_unshipped_temp;
truncate table china_warehouse_unshipped_temp; ", commandTimeout: 0); truncate table china_warehouse_unshipped_temp; ", commandTimeout: 0);
_connection.Execute(@" -- 刷新缺货明细表
set session transaction isolation level read uncommitted;
start transaction;
-- 清空视图表的数据
Truncate table buy_ontheway_detail_temp;
INSERT into buy_ontheway_detail_temp(`bailun_sku`,`warehouse_code`,`buy_ontheway_detail`) (
select
t1.*
from view_buy_ontheway_detail as t1
);
alter table buy_ontheway_detail rename buy_ontheway_detailTemp;
alter table buy_ontheway_detail_temp rename buy_ontheway_detail;
alter table buy_ontheway_detailTemp rename buy_ontheway_detailtemp;
truncate table buy_ontheway_detailtemp; ", commandTimeout: 0);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment