Commit 528ca474 by lizefeng

如果是海外仓暂时不算平均交期,否则算出来30几天的平均值,影响计划单交期调整的推进

parent d522577e
......@@ -24,7 +24,8 @@ namespace AutoTurnOver.DB
{
DynamicParameters parameters = new DynamicParameters();
parameters.Add("time", DateTime.Now.AddDays(0 - day).ToString("yyyy-MM-dd 00:00:00"));
return _connection.Query<temp_sku_dto>(@"select t1.bailun_sku,t1.warehouse_code,t1.supplier_id from dc_base_purchase as t1
return _connection.Query<temp_sku_dto>(@"select t2.hq_type,t1.bailun_sku,t1.warehouse_code,t1.supplier_id from dc_base_purchase as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
where t1.supplier_id>0 and buy_status=4
-- 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'
......@@ -270,5 +271,7 @@ and t_w.hq_type!='国内仓'
public string warehouse_code { get; set; }
public int? supplier_id { get; set; }
public string hq_type { get; set; }
}
}
......
......@@ -86,7 +86,8 @@ namespace AutoTurnOver.Services
// 平均采购交期
var temp_delivery_days = delivery_days / purchaseList.Count;
//够5个单才算平均值给系统用
if (purchase_order_count >= 5)
// 如果是海外仓暂时不算,否则算出来30几天的平均值,影响计划单交期调整的推进
if (purchase_order_count >= 5 && skuItem.hq_type=="国内仓")
{
data.delivery_days = temp_delivery_days;
}
......
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