Commit 5f24d5c7 by 泽锋 李

中午1点的服装那次推送,由特地站点改完未全推送

parent 10807c1c
...@@ -89,20 +89,11 @@ namespace AutoGeneratePurchaseAdvise ...@@ -89,20 +89,11 @@ namespace AutoGeneratePurchaseAdvise
// 要上班才推 // 要上班才推
if (ApiServices.GetSchedulings()) if (ApiServices.GetSchedulings())
{ {
if(now.Year==2019 && now.Month==11 && now.Day == 28)
{
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(5);
PurchaseAdviseServices.AutoPushBuySys(2); PurchaseAdviseServices.AutoPushBuySys(2);
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")}");
} }
else
{
Console.WriteLine($"开始推送 服装采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys(5);
Console.WriteLine($"结束推送 服装采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
}
} }
......
...@@ -164,17 +164,22 @@ where tdb.usable_stock>0 "; ...@@ -164,17 +164,22 @@ where tdb.usable_stock>0 ";
sql += " and t1.source =@source "; sql += " and t1.source =@source ";
parameters.Add("source", search.source); parameters.Add("source", search.source);
} }
if (!string.IsNullOrWhiteSpace(search.product_code))
{
sql += " and t1.product_code =@product_code ";
parameters.Add("product_code", search.product_code);
}
if (search.listing_status == 1) if (search.listing_status == 1)
{ {
// 可上架 // 可上架
var fields = GetShowField(search.warehouse_code); var fields = GetShowField(search.warehouse_code);
sql += $"and tdb.usable_stock>0 and ( {string.Join(" or ", fields.Select(v=>"t11.{v} <= 0 "))} )"; sql += $"and tdb.usable_stock>0 and ( {string.Join(" or ", fields.Select(v=>$"t11.{v} <= 0 "))} )";
} }
if (search.listing_status == 2) if (search.listing_status == 2)
{ {
// 无在线 // 无在线
var fields = GetShowField(search.warehouse_code); var fields = GetShowField(search.warehouse_code);
sql += $"and tdb.usable_stock>0 and ( {string.Join(" and ", fields.Select(v => "t11.{v} <= 0 "))} )"; sql += $"and tdb.usable_stock>0 and ( {string.Join(" and ", fields.Select(v => $"t11.{v} <= 0 "))} )";
} }
} }
return _connection.Page<listing_status_view_dto>(sql, search, parameters); return _connection.Page<listing_status_view_dto>(sql, search, parameters);
......
...@@ -128,5 +128,6 @@ namespace AutoTurnOver.Models ...@@ -128,5 +128,6 @@ namespace AutoTurnOver.Models
/// 品牌 /// 品牌
/// </summary> /// </summary>
public string brand { get; set; } public string brand { get; set; }
public string product_code { get; set; }
} }
} }
...@@ -23,7 +23,7 @@ namespace AutoTurnOver.Purchase.AverageTarget ...@@ -23,7 +23,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
Console.WriteLine("采购平均值计算任务启动..."); Console.WriteLine("采购平均值计算任务启动...");
// 创建采购计划 // 创建采购计划
//Console.WriteLine($"开始同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); //Console.WriteLine($"开始同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
daily.SynchroPPSSkuStatus(); //daily.SynchroPPSSkuStatus();
//Console.WriteLine($"结束同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); //Console.WriteLine($"结束同步sku刊登状态,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
var builder = new HostBuilder().ConfigureServices((hostContext, services) => var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
......
...@@ -228,7 +228,7 @@ namespace AutoTurnOver.Controllers ...@@ -228,7 +228,7 @@ namespace AutoTurnOver.Controllers
} }
public JsonResult GetListingStatusPage(int offset, int limit, string order, string sort, public JsonResult GetListingStatusPage(int offset, int limit, string order, string sort,
DateTime? end_date, DateTime? start_date, string brand, int? has_tort, int? listing_status, int? warehousearea, int? source, string warehousetype, string warehouse_code, int? product_type) DateTime? end_date, DateTime? start_date, string brand, int? has_tort, int? listing_status, int? warehousearea, int? source, string warehousetype, string warehouse_code, int? product_type, string product_code)
{ {
try try
{ {
...@@ -236,6 +236,7 @@ namespace AutoTurnOver.Controllers ...@@ -236,6 +236,7 @@ namespace AutoTurnOver.Controllers
var page_data = services.GetListingStatusPage(new listing_status_view_search_dto var page_data = services.GetListingStatusPage(new listing_status_view_search_dto
{ {
product_type= product_type, product_type= product_type,
product_code = product_code,
source = source, source = source,
warehouse_code = warehouse_code, warehouse_code = warehouse_code,
warehousetype = warehousetype, warehousetype = warehousetype,
......
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