Commit 0fd53f7a by lizefeng

aims 周转表,调拨在途点击查看明细

parent 5cab1cee
......@@ -40,7 +40,8 @@ sum(dat.quantity_transfer) as 'quantity_transfer',
sum(t2.oneday_sales) as 'oneday_sales',
sum(t2.forecast_oneday_sales) as 'forecast_oneday_sales2',
sum(dat.quantity_final_advise) as 'quantity_final_advise',
sum(dat.quantity_promotion) as 'quantity_promotion'
sum(dat.quantity_promotion) as 'quantity_promotion',
sum(dat.quantity_safe_inventory) as 'quantity_safe_inventory'
from dc_auto_turnover as dat
left join dc_auto_sales as t2 on t2.bailun_sku=dat.bailun_sku and dat.warehouse_code = t2.warehouse_code
left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
......
......@@ -186,5 +186,15 @@ namespace AutoTurnOver.Models
/// 产品内部编码
/// </summary>
public string product_inner_code { get; set; }
/// <summary>
/// 实时采购在途
/// </summary>
public int realtime_quantity_purchase { get; set; }
/// <summary>
/// 实时调拨在途
/// </summary>
public int realtime_quantity_transfer { get; set; }
}
}
......@@ -33,23 +33,41 @@ namespace AutoTurnOver.Models
/// </summary>
public string purchase_id { get; set; }
/// <summary>
/// 采购数量
/// 在途数量
/// </summary>
public int purchaseQuantity { get; set; }
public int dailyQuantity { get; set; }
/// <summary>
/// 入库数量
/// 预计到货
/// </summary>
public int inboundQuantity { get; set; }
public DateTime? estimated_arrival_time { get; set; }
}
/// <summary>
/// 调拨明细
/// </summary>
public class dc_transfer_daily_dto
{
public string bailun_sku { get; set; }
public string warehouse_code { get; set; }
public string transfer_order_id { get; set; }
public string estimated_arrival_time { get; set; }
public string create_time { get; set; }
/// <summary>
/// 在途数量
/// </summary>
public int dailyQuantity { get
{
return purchaseQuantity - inboundQuantity;
} }
public string count { get; set; }
public string warehouse_name { get; set; }
}
}
......@@ -21,6 +21,18 @@ namespace AutoTurnOver.Services
return DB.daily.List(sku, warehouse_code);
}
/// <summary>
/// 查询调拨在途数据
/// </summary>
/// <param name="sku">sku</param>
/// <param name="warehouse_code">仓库编码</param>
/// <returns></returns>
public IEnumerable<dc_transfer_daily_dto> TransferList(string sku, string warehouse_code)
{
return DB.daily.TransferList(sku, warehouse_code);
}
public IEnumerable<dc_base_stock_dto> RealtimeList(string sku, string warehouse_code, string product_inner_code, string sku_title_cn, int offset, int limit, ref int total, string warehousetype, int? warehousearea)
{
return DB.daily.RealtimeList(sku, warehouse_code,product_inner_code,sku_title_cn,offset, limit, ref total,warehousetype,warehousearea);
......
......@@ -31,6 +31,28 @@ namespace AutoTurnOver.Controllers
}
/// <summary>
/// 调拨在途
/// </summary>
/// <param name="warehousecode"></param>
/// <param name="sku"></param>
/// <returns></returns>
[HttpGet]
public JsonResult TransferList(string warehousecode, string sku)
{
var service = new Services.DailyServices();
var list = service.TransferList(sku, warehousecode);
return new JsonResult(new
{
rows = list,
total = list.Count()
});
}
/// <summary>
/// 实时库存
/// </summary>
/// <param name="sku"></param>
......@@ -65,7 +87,7 @@ namespace AutoTurnOver.Controllers
var list = services.RealtimeList(sku, warehousecode, product_inner_code, sku_title_cn, 0, int.MaxValue, ref total,warehousetype,warehousearea);
DataTable table = new DataTable();
string[] cols = new string[] { "Sku", "采购名称", "中文名", "英文名称","内部编码", "仓库编码", "仓库名称", "货主编码"
string[] cols = new string[] { "Sku", "采购名称", "中文名", "英文名称","内部编码", "仓库编码", "仓库名称", "货主编码","实时采购在途","实时调拨在途"
,"订货数量","运输在途","中转仓库存","冻结库存","供应商库存","预售库存","不良品库存","在途库存","收货待检"
,"待上架","可配库存","销售可用库存(聚合)","销售可用库存(私有)","销售可用库存(共享)","在仓库存(共享)","在仓库存(私有)","在仓库存(聚合)","仓库占用(共享)"
,"仓库占用(私有)","仓库占用(聚合)","活动占用","单占用(私有)","订单占用(共享)","订单占用(聚合)","环球更新时间"
......@@ -113,6 +135,9 @@ namespace AutoTurnOver.Controllers
row["订单占用(聚合)"] = itemData.occupy_order_share;
row["环球更新时间"] = itemData.update_time;
row["实时采购在途"] = itemData.realtime_quantity_purchase;
row["实时调拨在途"] = itemData.realtime_quantity_transfer;
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