Commit cf38a356 by lizefeng

广州03 出采购建议的时候,记录当时未发货的百伦单号

parent d3a2f399
...@@ -333,7 +333,7 @@ where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise= ...@@ -333,7 +333,7 @@ where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise=
_connection.Execute(@" INSERT into dc_auto_purchase_advise_detailed(`bailun_sku`,`source_warehouse_code`,`warehouse_code`,`quantity_init_advise`,`quantity_final_advise`, _connection.Execute(@" INSERT into dc_auto_purchase_advise_detailed(`bailun_sku`,`source_warehouse_code`,`warehouse_code`,`quantity_init_advise`,`quantity_final_advise`,
`product_inner_code`,`goods_quantity_init_advise`,`goods_moq`,`good_sku_codes`,`goods_history_fourteenday_sales`,`history_fourteenday_sales`, `product_inner_code`,`goods_quantity_init_advise`,`goods_moq`,`good_sku_codes`,`goods_history_fourteenday_sales`,`history_fourteenday_sales`,
`quantity_actual`,`main_id`, `quantity_actual`,`main_id`,
`forecast_formula`,`fit_forecast_formula`,`turnover_days`,`supplier_delivery`,`inspection_delivery`,`transfer_delivery`,`sales_upper_limit`,`ispush`,`type`,`suppliers_id`,`quantity_out_stock`,`purchase_type_jit`) `forecast_formula`,`fit_forecast_formula`,`turnover_days`,`supplier_delivery`,`inspection_delivery`,`transfer_delivery`,`sales_upper_limit`,`ispush`,`type`,`suppliers_id`,`quantity_out_stock`,`purchase_type_jit`,`bailun_order_ids`)
( (
select select
t1.bailun_sku, t1.bailun_sku,
...@@ -360,7 +360,8 @@ where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise= ...@@ -360,7 +360,8 @@ where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise=
2 as 'type', 2 as 'type',
t6.suppliers_id, t6.suppliers_id,
t7.quantity_out_stock, t7.quantity_out_stock,
0 as 'purchase_type_jit' 0 as 'purchase_type_jit',
t7.bailun_order_ids
from dc_base_stock as t1 from dc_base_stock as t1
left join dc_auto_sales as t2 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code left join dc_auto_sales as t2 on t1.bailun_sku = t2.bailun_sku and t1.warehouse_code = t2.warehouse_code
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
......
...@@ -160,6 +160,11 @@ namespace AutoTurnOver.Models ...@@ -160,6 +160,11 @@ namespace AutoTurnOver.Models
/// </summary> /// </summary>
public int purchase_type_jit { get; set; } public int purchase_type_jit { get; set; }
/// <summary>
/// 相关的百伦单号
/// </summary>
public string bailun_order_ids { get; set; }
} }
public enum purchase_type_jit_enum public enum purchase_type_jit_enum
{ {
......
...@@ -177,7 +177,7 @@ namespace AutoTurnOver.Controllers ...@@ -177,7 +177,7 @@ namespace AutoTurnOver.Controllers
DataTable table = new DataTable(); DataTable table = new DataTable();
string[] cols = new string[] { "初始建议数", "系统建议数", "采购数量", "是否已推送","jit备货类型", "时间", "sku", "产品名称", "产品14日日均", "仓库编码","仓库名称","源仓库", string[] cols = new string[] { "初始建议数", "系统建议数", "采购数量", "是否已推送","jit备货类型", "时间", "sku", "产品名称", "产品14日日均", "仓库编码","仓库名称","源仓库",
"内部商品编码", "商品建议采购", "商品14日日均", "商品moq", "日均加权销量","安全库存", "缺货","实时缺货", "调拨在途", "采购在途", "库存数", "内部商品编码", "商品建议采购", "商品14日日均", "商品moq", "日均加权销量","安全库存", "缺货","实时缺货", "调拨在途", "采购在途", "库存数",
"采购金额", "供应链长度", "供应商名称", "采购类型","采购员","突增关注" "采购金额", "供应链长度", "供应商名称", "采购类型","采购员","突增关注","待发货百伦单号"
}; };
foreach (var item in cols) foreach (var item in cols)
{ {
...@@ -216,6 +216,7 @@ namespace AutoTurnOver.Controllers ...@@ -216,6 +216,7 @@ namespace AutoTurnOver.Controllers
row["采购类型"] = itemData.type_str; row["采购类型"] = itemData.type_str;
row["采购员"] = itemData.buyer_name; row["采购员"] = itemData.buyer_name;
row["突增关注"] = itemData.sudden_increase; row["突增关注"] = itemData.sudden_increase;
row["待发货百伦单号"] = itemData.bailun_order_ids;
table.Rows.Add(row); table.Rows.Add(row);
} }
......
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