Commit ffa0ff02 by 泽锋 李

优化采购评价值算法

parent 6ad0c8c7
......@@ -27,10 +27,10 @@ namespace AutoTurnOver.DB
return _connection.Query<temp_sku_dto>(@"select t2.hq_type,t1.bailun_sku,t1.warehouse_code,t1.supplier_id,t3.buyer_name from dc_base_purchase as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
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.update_time>=@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 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.AddDays(-7)});
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);
}
......
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