Commit a38503fc by lizefeng

新增下午6点推送采购建议

parent 125b1efe
...@@ -34,9 +34,16 @@ namespace AutoGeneratePurchaseAdvise ...@@ -34,9 +34,16 @@ namespace AutoGeneratePurchaseAdvise
if (now.Hour == 6 && now.Minute == 1) if (now.Hour == 6 && now.Minute == 1)
{ {
Console.WriteLine($"开始采购平均值统计任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"开始推送采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys(); PurchaseAdviseServices.AutoPushBuySys();
Console.WriteLine($"结束采购平均值统计任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"结束推送采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
if (now.Hour == 18 && now.Minute == 1)
{
Console.WriteLine($"开始推送采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys();
Console.WriteLine($"结束推送采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -199,7 +199,7 @@ WHERE ...@@ -199,7 +199,7 @@ WHERE
/// <param name="sku">sku</param> /// <param name="sku">sku</param>
/// <param name="warehouse_code">仓库编码</param> /// <param name="warehouse_code">仓库编码</param>
/// <returns></returns> /// <returns></returns>
public static List<dc_base_stock_dto> RealtimeList(string sku,string bailun_sku, string warehouse_code, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, ref int total, string warehousetype, int? warehousearea, bool isSum = false, string order = null, string sort = null) public static List<dc_base_stock_dto> RealtimeList(string sku,string bailun_sku, string warehouse_code, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, ref int total, string warehousetype, int? warehousearea, bool isSum = false, string order = null, string sort = null,int? has_tort = null)
{ {
var sql = ""; var sql = "";
if (isSum) if (isSum)
...@@ -239,6 +239,7 @@ from ...@@ -239,6 +239,7 @@ from
dc_base_stock as t1 dc_base_stock as t1
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code 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_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 t_base.bailun_sku = t5.bailun_sku
where 1=1"; where 1=1";
} }
else else
...@@ -251,12 +252,14 @@ t4.quantity_purchase as 'purchase_daily_quantity', ...@@ -251,12 +252,14 @@ t4.quantity_purchase as 'purchase_daily_quantity',
t3.buyer_name,t3.sku_title_en,t3.product_inner_code, 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', 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, 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',
t1.* t1.*
from from
dc_base_stock as t1 dc_base_stock as t1
left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku 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_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_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 t_base.bailun_sku = t5.bailun_sku
where 1=1 where 1=1
"; ";
} }
...@@ -269,11 +272,26 @@ from ...@@ -269,11 +272,26 @@ from
dc_base_stock as t1 dc_base_stock as t1
left join dc_base_warehouse as dbw on t1.warehouse_code = dbw.warehouse_code 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_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 t_base.bailun_sku = t5.bailun_sku
where 1=1 where 1=1
"; ";
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
parameters.Add("time", DateTime.Now.ToString("yyyy-MM-dd 00:00:00")); parameters.Add("time", DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
if (has_tort != null)
{
if (has_tort == 0)
{
sql += " and t5.id is null ";
countSql += " and t5.id is null ";
}
else if (has_tort == 1)
{
sql += " and t5.id is not null ";
countSql += " and t5.id is not null ";
}
}
if (!string.IsNullOrWhiteSpace(warehousetype)) if (!string.IsNullOrWhiteSpace(warehousetype))
{ {
sql += " and dbw.hq_type = @hq_type "; sql += " and dbw.hq_type = @hq_type ";
......
...@@ -45,6 +45,7 @@ sum(dat.quantity_safe_inventory) as 'quantity_safe_inventory' ...@@ -45,6 +45,7 @@ sum(dat.quantity_safe_inventory) as 'quantity_safe_inventory'
from dc_auto_turnover as dat from dc_auto_turnover as dat
left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code
left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
where 1=1 "; where 1=1 ";
} }
else else
...@@ -53,7 +54,7 @@ where 1=1 "; ...@@ -53,7 +54,7 @@ where 1=1 ";
t4.bailun_category_name, t4.bailun_category_name,
( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status',t4.suppliers_link, ( case when t5.`status`=0 or t5.`status` is null then 0 else 1 end ) as 'monitor_status',t4.suppliers_link,
(t4.supplier_delivery - t6.virtual_delivery_days) as 'delivery_days_error',t4.weight,t4.unit_price,t7.usable_stock,t7.shipped_stock, (t4.supplier_delivery - t6.virtual_delivery_days) as 'delivery_days_error',t4.weight,t4.unit_price,t7.usable_stock,t7.shipped_stock,
t4.develop_time t4.develop_time,(case when t8.id is null then '未侵权' else '侵权' end) as 'has_tort'
from dc_auto_turnover as dat 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_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 left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
...@@ -61,22 +62,39 @@ left join dc_base_sku as t4 on dat.bailun_sku = t4.bailun_sku ...@@ -61,22 +62,39 @@ left join dc_base_sku as t4 on dat.bailun_sku = t4.bailun_sku
left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code
left join dc_average_purchase as t6 on dat.bailun_sku = t6.bailun_sku and dat.warehouse_code =t6.warehouse_code and t4.suppliers_id = t6.supplier_id left join dc_average_purchase as t6 on dat.bailun_sku = t6.bailun_sku and dat.warehouse_code =t6.warehouse_code and t4.suppliers_id = t6.supplier_id
left join dc_base_stock as t7 on dat.bailun_sku = t7.bailun_sku and dat.warehouse_code = t7.warehouse_code left join dc_base_stock as t7 on dat.bailun_sku = t7.bailun_sku and dat.warehouse_code = t7.warehouse_code
left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
where 1=1 "; where 1=1 ";
} }
string sqlCount = @"select count(1) string sqlCount = @"select count(1)
from dc_auto_turnover as dat from dc_auto_turnover as dat
left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
"; ";
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
if (m.monitor_status != null) if (m.monitor_status != null)
{ {
sqlCount += " left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code "; sqlCount += " left join dc_auto_config_sku_warehouse as t5 on dat.bailun_sku = t5.bailun_sku and dat.warehouse_code = t5.warehouse_code ";
} }
sqlCount += " where 1=1 "; sqlCount += " where 1=1 ";
if (m.has_tort != null)
{
if (m.has_tort == 0)
{
sql += " and t8.id is null ";
sqlCount += " and t8.id is null ";
}
else if (m.has_tort == 1)
{
sql += " and t8.id is not null ";
sqlCount += " and t8.id is not null ";
}
}
if (m.categoryModels != null) if (m.categoryModels != null)
{ {
...@@ -224,7 +242,7 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code ...@@ -224,7 +242,7 @@ left join dc_base_warehouse as t3 on dat.warehouse_code = t3.warehouse_code
catch (Exception ex) catch (Exception ex)
{ {
return new List<Models.dc_auto_turnover_Extend>(); throw;
} }
} }
......
...@@ -277,7 +277,7 @@ namespace AutoTurnOver.Models ...@@ -277,7 +277,7 @@ namespace AutoTurnOver.Models
public string buyer_name { get; set; } public string buyer_name { get; set; }
public string supplier_name { get; set; } public string supplier_name { get; set; }
public int? has_tort { get; set; }
/// <summary> /// <summary>
/// 仓库编码 /// 仓库编码
...@@ -403,5 +403,7 @@ namespace AutoTurnOver.Models ...@@ -403,5 +403,7 @@ namespace AutoTurnOver.Models
public string suppliers_link { get; set; } public string suppliers_link { get; set; }
public DateTime? develop_time { get; set; } public DateTime? develop_time { get; set; }
public string has_tort { get; set; }
} }
} }
...@@ -217,5 +217,7 @@ namespace AutoTurnOver.Models ...@@ -217,5 +217,7 @@ namespace AutoTurnOver.Models
/// 单价 /// 单价
/// </summary> /// </summary>
public decimal? unit_price { get; set; } public decimal? unit_price { get; set; }
public string has_tort { get; set; }
} }
} }
...@@ -33,9 +33,9 @@ namespace AutoTurnOver.Services ...@@ -33,9 +33,9 @@ namespace AutoTurnOver.Services
} }
public List<dc_base_stock_dto> RealtimeList(string sku,string bailun_sku, string warehouse_code, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, ref int total, string warehousetype, int? warehousearea,bool isSum = false,string order = null,string sort = null) public List<dc_base_stock_dto> RealtimeList(string sku,string bailun_sku, string warehouse_code, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, ref int total, string warehousetype, int? warehousearea,bool isSum = false,string order = null,string sort = null,int? has_tort = null)
{ {
return DB.daily.RealtimeList(sku, bailun_sku, warehouse_code,product_inner_code,sku_title_cn, supplier_name, offset, limit, ref total,warehousetype,warehousearea, isSum, order, sort); return DB.daily.RealtimeList(sku, bailun_sku, warehouse_code,product_inner_code,sku_title_cn, supplier_name, offset, limit, ref total,warehousetype,warehousearea, isSum, order, sort, has_tort:has_tort);
} }
......
...@@ -61,12 +61,12 @@ namespace AutoTurnOver.Controllers ...@@ -61,12 +61,12 @@ namespace AutoTurnOver.Controllers
/// <param name="offset"></param> /// <param name="offset"></param>
/// <param name="limit"></param> /// <param name="limit"></param>
/// <returns></returns> /// <returns></returns>
public JsonResult RealtimeList(string sku,string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea) public JsonResult RealtimeList(string sku,string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea,int? has_tort = null)
{ {
var services = new DailyServices(); var services = new DailyServices();
var total = 0; var total = 0;
var list = services.RealtimeList(sku, bailun_sku, warehousecode,product_inner_code, sku_title_cn, supplier_name, offset, limit, ref total,warehousetype,warehousearea,order: order, sort: sort); var list = services.RealtimeList(sku, bailun_sku, warehousecode,product_inner_code, sku_title_cn, supplier_name, offset, limit, ref total,warehousetype,warehousearea,order: order, sort: sort, has_tort : has_tort);
return new JsonResult(new return new JsonResult(new
{ {
...@@ -75,12 +75,12 @@ namespace AutoTurnOver.Controllers ...@@ -75,12 +75,12 @@ namespace AutoTurnOver.Controllers
}); });
} }
public JsonResult RealtimeListSumFooter(string sku, string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea) public JsonResult RealtimeListSumFooter(string sku, string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn,string supplier_name, int offset, int limit, string order, string sort, string warehousetype, int? warehousearea,int? has_tort = null)
{ {
var services = new DailyServices(); var services = new DailyServices();
var total = 0; var total = 0;
var list = services.RealtimeList(sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, offset, limit, ref total, warehousetype, warehousearea,true); var list = services.RealtimeList(sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, offset, limit, ref total, warehousetype, warehousearea,true, has_tort: has_tort);
return new JsonResult(list == null || list.Count <= 0 ? new dc_base_stock_dto() : list[0]); return new JsonResult(list == null || list.Count <= 0 ? new dc_base_stock_dto() : list[0]);
} }
...@@ -115,17 +115,17 @@ namespace AutoTurnOver.Controllers ...@@ -115,17 +115,17 @@ namespace AutoTurnOver.Controllers
/// <param name="sku"></param> /// <param name="sku"></param>
/// <param name="warehousecode"></param> /// <param name="warehousecode"></param>
/// <returns></returns> /// <returns></returns>
public FileResult ExportRealtime(string sku,string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn,string supplier_name, string warehousetype, int? warehousearea) public FileResult ExportRealtime(string sku,string bailun_sku, string warehousecode, string product_inner_code, string sku_title_cn,string supplier_name, string warehousetype, int? warehousearea,int? has_tort = null)
{ {
var services = new DailyServices(); var services = new DailyServices();
var total = 0; var total = 0;
var list = services.RealtimeList(sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, 0, int.MaxValue, ref total,warehousetype,warehousearea); var list = services.RealtimeList(sku, bailun_sku, warehousecode, product_inner_code, sku_title_cn, supplier_name, 0, int.MaxValue, ref total,warehousetype,warehousearea, has_tort: has_tort);
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)
{ {
...@@ -178,6 +178,8 @@ namespace AutoTurnOver.Controllers ...@@ -178,6 +178,8 @@ namespace AutoTurnOver.Controllers
row["单价"] = itemData.unit_price; row["单价"] = itemData.unit_price;
row["已发货库存"] = itemData.shipped_stock; row["已发货库存"] = itemData.shipped_stock;
row["实时缺货"] = itemData.quantity_out_stock; row["实时缺货"] = itemData.quantity_out_stock;
row["是否侵权"] = itemData.has_tort;
table.Rows.Add(row); table.Rows.Add(row);
} }
......
...@@ -28,7 +28,7 @@ namespace AutoTurnOver.Controllers ...@@ -28,7 +28,7 @@ namespace AutoTurnOver.Controllers
/// <param name="pagesize">每页记录数</param> /// <param name="pagesize">每页记录数</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public JsonResult List(int limit, int offset, string order, string sort, int? searchType, string key_words, string buyer_name, int? IsRedundant, int? IsStockOut, string warehousecode,string supplier_name, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null) public JsonResult List(int limit, int offset, string order, string sort, int? searchType, string key_words, string buyer_name, int? IsRedundant, int? IsStockOut, string warehousecode,string supplier_name, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null,int? has_tort = null)
{ {
var m = new Condition_AutoTurnOver var m = new Condition_AutoTurnOver
...@@ -45,8 +45,8 @@ namespace AutoTurnOver.Controllers ...@@ -45,8 +45,8 @@ namespace AutoTurnOver.Controllers
categoryIds = categoryIds, categoryIds = categoryIds,
monitor_status = monitor_status, monitor_status = monitor_status,
buyer_name = buyer_name, buyer_name = buyer_name,
supplier_name = supplier_name supplier_name = supplier_name,
has_tort = has_tort
}; };
var total = 0; var total = 0;
...@@ -89,7 +89,8 @@ namespace AutoTurnOver.Controllers ...@@ -89,7 +89,8 @@ namespace AutoTurnOver.Controllers
p.shipped_stock, p.shipped_stock,
p.suppliers_link, p.suppliers_link,
p.buyer_name, p.buyer_name,
p.develop_time p.develop_time,
p.has_tort
}); });
...@@ -101,7 +102,7 @@ namespace AutoTurnOver.Controllers ...@@ -101,7 +102,7 @@ namespace AutoTurnOver.Controllers
}); });
} }
public JsonResult ListSumFooter(string supplier_name, int limit, int offset, string order, string sort, int? searchType, string key_words,string buyer_name, string sku_prefix, int? IsRedundant, int? IsStockOut, string warehousecode, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null) public JsonResult ListSumFooter(string supplier_name, int limit, int offset, string order, string sort, int? searchType, string key_words,string buyer_name, string sku_prefix, int? IsRedundant, int? IsStockOut, string warehousecode, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null,int? has_tort = null)
{ {
var m = new Condition_AutoTurnOver var m = new Condition_AutoTurnOver
{ {
...@@ -117,7 +118,8 @@ namespace AutoTurnOver.Controllers ...@@ -117,7 +118,8 @@ namespace AutoTurnOver.Controllers
categoryIds = categoryIds, categoryIds = categoryIds,
monitor_status = monitor_status, monitor_status = monitor_status,
buyer_name = buyer_name, buyer_name = buyer_name,
supplier_name = supplier_name supplier_name = supplier_name,
has_tort = has_tort
}; };
var total = 0; var total = 0;
var service = new Services.SkuAutoTurnServices(); var service = new Services.SkuAutoTurnServices();
...@@ -132,7 +134,7 @@ namespace AutoTurnOver.Controllers ...@@ -132,7 +134,7 @@ namespace AutoTurnOver.Controllers
/// <param name="sku"></param> /// <param name="sku"></param>
/// <param name="warehousecode"></param> /// <param name="warehousecode"></param>
/// <returns></returns> /// <returns></returns>
public FileResult Export(string supplier_name, int limit, int offset, string order, string sort, int? searchType, string key_words, string buyer_name, string sku_prefix, int? IsRedundant, int? IsStockOut, string warehousecode, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null) public FileResult Export(string supplier_name, int limit, int offset, string order, string sort, int? searchType, string key_words, string buyer_name, string sku_prefix, int? IsRedundant, int? IsStockOut, string warehousecode, string warehousetype, int? warehousearea, bool? hasDefectConfig, bool? hasAadvise = null, string categoryIds = null, int? monitor_status = null,int? has_tort = null)
{ {
var m = new Condition_AutoTurnOver var m = new Condition_AutoTurnOver
{ {
...@@ -148,7 +150,8 @@ namespace AutoTurnOver.Controllers ...@@ -148,7 +150,8 @@ namespace AutoTurnOver.Controllers
categoryIds = categoryIds, categoryIds = categoryIds,
monitor_status = monitor_status, monitor_status = monitor_status,
buyer_name = buyer_name, buyer_name = buyer_name,
supplier_name = supplier_name supplier_name = supplier_name,
has_tort = has_tort
}; };
var total = 0; var total = 0;
...@@ -195,14 +198,15 @@ namespace AutoTurnOver.Controllers ...@@ -195,14 +198,15 @@ namespace AutoTurnOver.Controllers
p.history_fourteenday_sales_ebay, p.history_fourteenday_sales_ebay,
p.history_thirtyday_sales_ebay, p.history_thirtyday_sales_ebay,
p.shipped_stock, p.shipped_stock,
p.develop_time p.develop_time,
p.has_tort
}); });
DataTable table = new DataTable(); DataTable table = new DataTable();
string[] cols = new string[] { "Sku","商品编码", "内部编码", "sku标题", "仓库编码", "仓库名称", "MOQ", string[] cols = new string[] { "Sku","商品编码", "内部编码", "sku标题", "仓库编码", "仓库名称", "MOQ",
"采购在途", "调拨在途", "昨日销量", "明日销量", "未来7天日均", "未来14天日均", "建议采购数", "活动促销数量", "采购在途", "调拨在途", "昨日销量", "明日销量", "未来7天日均", "未来14天日均", "建议采购数", "活动促销数量",
"实际库存", "安全库存", "周转天数", "供应商交期", "质检入库天数", "调拨头程天数", "预测是否断货", "缺货数量","监控状态","供应商","采购员","交期异常", "实际库存", "安全库存", "周转天数", "供应商交期", "质检入库天数", "调拨头程天数", "预测是否断货", "缺货数量","监控状态","供应商","采购员","交期异常",
"过去7天日均","过去14天日均","过去30天日均","重量","单价","实时库存","ebay最近7天日均销量","ebay最近14天日均销量","ebay最近30天日均销量","已发货库存","开发时间" "过去7天日均","过去14天日均","过去30天日均","重量","单价","实时库存","ebay最近7天日均销量","ebay最近14天日均销量","ebay最近30天日均销量","已发货库存","开发时间","是否侵权"
}; };
foreach (var item in cols) foreach (var item in cols)
{ {
...@@ -250,7 +254,8 @@ namespace AutoTurnOver.Controllers ...@@ -250,7 +254,8 @@ namespace AutoTurnOver.Controllers
row["ebay最近14天日均销量"] = itemData.history_fourteenday_sales_ebay; row["ebay最近14天日均销量"] = itemData.history_fourteenday_sales_ebay;
row["ebay最近30天日均销量"] = itemData.history_thirtyday_sales_ebay; row["ebay最近30天日均销量"] = itemData.history_thirtyday_sales_ebay;
row["已发货库存"] = itemData.shipped_stock; row["已发货库存"] = itemData.shipped_stock;
row["开发时间"] = itemData.develop_time; row["开发时间"] = itemData.develop_time;
row["是否侵权"] = itemData.has_tort;
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