Commit bc63015d by lizefeng

实时库存新增日均销量字段

parent bd057649
......@@ -253,6 +253,8 @@ t3.buyer_name,t3.sku_title_en,t3.product_inner_code,
t4.quantity_purchase as 'realtime_quantity_purchase',t4.quantity_transfer as 'realtime_quantity_transfer',
t1.bailun_sku,t1.warehouse_code,t4.quantity_out_stock,t4.gmt_out_stock_modified,t3.weight,t3.unit_price,
(case when t5.id is null then '未侵权' else '侵权' end) as 'has_tort',
t6.history_sevenday_sales,t6.history_fourteenday_sales,t6.history_thirtyday_sales,
t6.history_sevenday_sales_ebay,t6.history_fourteenday_sales_ebay,t6.history_thirtyday_sales_ebay,
t1.*
from
dc_base_stock as t1
......@@ -260,6 +262,7 @@ left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code
left join dc_mid_transit as t4 on t1.bailun_sku = t4.bailun_sku and t1.warehouse_code = t4.warehouse_code
left join dc_base_tort as t5 on t1.bailun_sku = t5.bailun_sku
left join dc_auto_turnover as t6 on t1.bailun_sku = t6.bailun_sku and t1.bailun_sku = t6.bailun_sku
where 1=1
";
}
......
......@@ -219,5 +219,36 @@ namespace AutoTurnOver.Models
public decimal? unit_price { get; set; }
public string has_tort { get; set; }
/// <summary>
/// 过去7日销量(日均)
/// </summary>
public decimal history_sevenday_sales { get; set; }
/// <summary>
/// 过去14日日均销量
/// </summary>
public decimal history_fourteenday_sales { get; set; }
/// <summary>
/// 过去30天日均销量
/// </summary>
public decimal history_thirtyday_sales { get; set; }
/// <summary>
/// 过去7日销量(日均)
/// </summary>
public decimal history_sevenday_sales_ebay { get; set; }
/// <summary>
/// /// <summary>
/// 过去14日销量(日均) - ebay
/// </summary>
/// </summary>
public decimal history_fourteenday_sales_ebay { get; set; }
/// <summary>
/// /// <summary>
/// 过去30日销量(日均) - ebay
/// </summary>
/// </summary>
public decimal history_thirtyday_sales_ebay { get; set; }
}
}
......@@ -125,7 +125,8 @@ namespace AutoTurnOver.Controllers
string[] cols = new string[] { "Sku", "采购名称", "中文名", "英文名称","内部编码", "仓库编码", "仓库名称", "货主编码","实时采购在途","实时调拨在途"
,"订货数量","运输在途","中转仓库存","冻结库存","供应商库存","预售库存","不良品库存","在途库存","收货待检"
,"待上架","可配库存","销售可用库存(聚合)","销售可用库存(私有)","销售可用库存(共享)","在仓库存(共享)","在仓库存(私有)","在仓库存(聚合)","仓库占用(共享)"
,"仓库占用(私有)","仓库占用(聚合)","活动占用","单占用(私有)","订单占用(共享)","订单占用(聚合)","环球更新时间","供应商","采购员","重量","单价","已发货库存","实时缺货","是否侵权"
,"仓库占用(私有)","仓库占用(聚合)","活动占用","单占用(私有)","订单占用(共享)","订单占用(聚合)","环球更新时间","供应商","采购员","重量","单价","已发货库存","实时缺货","是否侵权",
"过去7日日均销量", "过去14日日均销量", "过去30日日均销量", "过去7日Eaby日均销量", "过去14日Eaby日均销量", "过去30日Eaby日均销量"
};
foreach (var item in cols)
{
......@@ -179,7 +180,14 @@ namespace AutoTurnOver.Controllers
row["已发货库存"] = itemData.shipped_stock;
row["实时缺货"] = itemData.quantity_out_stock;
row["是否侵权"] = itemData.has_tort;
row["过去7日日均销量"] = itemData.history_sevenday_sales;
row["过去14日日均销量"] = itemData.history_fourteenday_sales;
row["过去30日日均销量"] = itemData.history_thirtyday_sales;
row["过去7日Eaby日均销量"] = itemData.history_sevenday_sales_ebay;
row["过去14日Eaby日均销量"] = itemData.history_fourteenday_sales_ebay;
row["过去30日Eaby日均销量"] = itemData.history_thirtyday_sales_ebay;
table.Rows.Add(row);
}
......
......@@ -51,48 +51,7 @@ namespace AutoTurnOver.Controllers
var total = 0;
var service = new Services.SkuAutoTurnServices();
var list = service.List(m, offset, limit, ref total, order, sort).Select(p => new
{
p.bailun_sku,
p.sku_title,
p.warehouse_code,
p.warehouse_name,
p.quantity_minimum_order,
p.quantity_final_advise,
p.quantity_promotion,
p.quantity_inventory,
p.turnover_days,
p.quantity_safe_inventory,
p.inspection_delivery,
p.status,
p.id,
p.quantity_out_stock,
p.supplier_delivery,
p.transfer_delivery,
p.quantity_purchase,
p.quantity_transfer,
p.forecast_fourteenday_sales,
p.forecast_sevenday_sales,
p.history_thirtyday_sales,
p.oneday_sales,
p.forecast_oneday_sales2,
p.product_inner_code,
p.product_code,
p.bailun_category_name,
p.history_fourteenday_sales,
p.history_sevenday_sales,
p.monitor_status,
p.suppliers_name,
p.history_sevenday_sales_ebay,
p.history_fourteenday_sales_ebay,
p.history_thirtyday_sales_ebay,
p.shipped_stock,
p.suppliers_link,
p.buyer_name,
p.develop_time,
p.has_tort
});
var list = service.List(m, offset, limit, ref total, order, sort);
return new JsonResult(new
{
......
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