Commit 6ad0c8c7 by 泽锋 李

优化采购平均值计算

parent 6121cc69
...@@ -30,7 +30,7 @@ left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku ...@@ -30,7 +30,7 @@ left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku
where t1.supplier_id>0 and buy_status=4 and t1.gmt_create>=@c_time where t1.supplier_id>0 and buy_status=4 and t1.gmt_create>=@c_time
-- and EXISTS ( select * from dc_base_stock as t2 where t1.bailun_sku =t2.bailun_sku and t1.warehouse_code = t2.warehouse_code) -- and EXISTS ( select * from dc_base_stock as t2 where t1.bailun_sku =t2.bailun_sku and t1.warehouse_code = t2.warehouse_code)
-- and t1.bailun_sku='366628401' and t1.warehouse_code='GZBLWH' -- and t1.bailun_sku='366628401' and t1.warehouse_code='GZBLWH'
GROUP BY t1.bailun_sku,t1.warehouse_code,t1.supplier_id ",new { c_time = DateTime.Now.AddMonths(-1)}); GROUP BY t1.bailun_sku,t1.warehouse_code,t1.supplier_id ",new { c_time = DateTime.Now.AddDays(-7)});
//return _connection.Query<temp_sku_dto>("select t1.bailun_sku,t1.warehouse_code,t1.supplier_id from dc_base_purchase as t1 where t1.update_time>=@time group by t1.bailun_sku,t1.warehouse_code,t1.supplier_id ", parameters); //return _connection.Query<temp_sku_dto>("select t1.bailun_sku,t1.warehouse_code,t1.supplier_id from dc_base_purchase as t1 where t1.update_time>=@time group by t1.bailun_sku,t1.warehouse_code,t1.supplier_id ", parameters);
} }
......
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