Commit 3fb04cbf by 泽锋 李

首次采购时间算法修改

parent 1885895e
...@@ -1914,10 +1914,12 @@ set t1.first_inbound_date = t2.min_time ...@@ -1914,10 +1914,12 @@ set t1.first_inbound_date = t2.min_time
where t1.bailun_sku_warehouse_area=t2.bailun_sku_warehouse_area;", commandTimeout: 0); where t1.bailun_sku_warehouse_area=t2.bailun_sku_warehouse_area;", commandTimeout: 0);
_connection.Execute(@"-- 刷新首次采购时间 _connection.Execute(@"-- 刷新首次采购时间
set session transaction isolation level read uncommitted;
start transaction;
update dc_base_stock as t1, update dc_base_stock as t1,
(select t1.bailun_sku,t1.warehouse_from_code as 'warehouse_code',min(t1.create_time) as 'min_time' from dc_base_purchase_details as t1 (select t1.bailun_sku,t1.warehouse_into_code as 'warehouse_code',min(t1.create_time) as 'min_time' from dc_base_purchase_details as t1
where `status`!=-1 where `status`!=-1
GROUP BY t1.bailun_sku,t1.warehouse_from_code) as t2 GROUP BY t1.bailun_sku,t1.warehouse_into_code) as t2
set t1.first_purchase_date = t2.min_time set t1.first_purchase_date = t2.min_time
where t1.bailun_sku = t2.bailun_sku and t1.warehouse_code=t2.warehouse_code; where t1.bailun_sku = t2.bailun_sku and t1.warehouse_code=t2.warehouse_code;
"); ");
......
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