Commit d9a78966 by zhoujinhui

导出新增字段

parent 885c81af
...@@ -757,7 +757,9 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code ...@@ -757,7 +757,9 @@ left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
var sql = @" var sql = @"
SELECT SELECT
t1.bailun_sku, t1.bailun_sku,
t1.occupy_stock,
t3.product_inner_code as 'sku_product_inner_code', t3.product_inner_code as 'sku_product_inner_code',
t3.sku_title_cn as 'base_sku_name',
t3.buyer_name, t3.buyer_name,
t1.warehouse_code, t1.warehouse_code,
dbw.warehouse_name as warehouse_name, dbw.warehouse_name as warehouse_name,
......
...@@ -899,7 +899,7 @@ namespace AutoTurnOver.Services ...@@ -899,7 +899,7 @@ namespace AutoTurnOver.Services
var services = new DailyServices(); var services = new DailyServices();
var fileName = AppContext.BaseDirectory + $@"实时库存-{DateTime.Now.ToString("yyyyMMddHHmmss")}{Guid.NewGuid()}.csv"; var fileName = AppContext.BaseDirectory + $@"实时库存-{DateTime.Now.ToString("yyyyMMddHHmmss")}{Guid.NewGuid()}.csv";
DataTable table = new DataTable(); DataTable table = new DataTable();
string[] cols = new string[] { "Sku", "内部编码", "采购名称", "仓库编码", "仓库名称", "采购在途", "可配库存", "实时缺货", "单价" }; string[] cols = new string[] { "Sku", "内部编码", "中文名", "采购名称", "仓库编码", "仓库名称", "采购在途", "可配库存", "仓库占用(聚合)", "实时缺货", "单价" };
foreach (var item in cols) foreach (var item in cols)
{ {
table.Columns.Add(item); table.Columns.Add(item);
...@@ -911,11 +911,13 @@ namespace AutoTurnOver.Services ...@@ -911,11 +911,13 @@ namespace AutoTurnOver.Services
DataRow row = table.NewRow(); DataRow row = table.NewRow();
row["Sku"] = itemData.bailun_sku; row["Sku"] = itemData.bailun_sku;
row["内部编码"] = itemData.sku_product_inner_code; row["内部编码"] = itemData.sku_product_inner_code;
row["中文名"] = itemData.base_sku_name;
row["采购名称"] = itemData.buyer_name; row["采购名称"] = itemData.buyer_name;
row["仓库编码"] = itemData.warehouse_code; row["仓库编码"] = itemData.warehouse_code;
row["仓库名称"] = itemData.warehouse_name; row["仓库名称"] = itemData.warehouse_name;
row["采购在途"] = itemData.realtime_quantity_purchase; row["采购在途"] = itemData.realtime_quantity_purchase;
row["可配库存"] = itemData.usable_stock; row["可配库存"] = itemData.usable_stock;
row["仓库占用(聚合)"] = itemData.occupy_stock;
row["实时缺货"] = itemData.quantity_out_stock; row["实时缺货"] = itemData.quantity_out_stock;
row["单价"] = itemData.unit_price; row["单价"] = itemData.unit_price;
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