Commit 84ded3b1 by 泽锋 李

推送采购建议加日志

parent aa681b6b
...@@ -23,6 +23,7 @@ namespace AutoGeneratePurchaseAdvise ...@@ -23,6 +23,7 @@ namespace AutoGeneratePurchaseAdvise
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("2020-11-28 17:06:00"))); //PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("2020-11-28 17:06:00")));
//PurchaseAdviseServices.AutoPushBuySys(1); //PurchaseAdviseServices.AutoPushBuySys(1);
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"))); //PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
//PurchaseAdviseServices.AutoPushBuySys(4);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -341,10 +341,12 @@ namespace AutoTurnOver.Services ...@@ -341,10 +341,12 @@ namespace AutoTurnOver.Services
var other_datas = new List<dc_auto_purchase_advise_detailed_dto>(); var other_datas = new List<dc_auto_purchase_advise_detailed_dto>();
// 查询当前有缺货的sku // 查询当前有缺货的sku
Console.WriteLine($"拆分ebay+wish 的逻辑");
var shortageSkuList = purchase_advise.ShortageSkuList(new List<string> { "ebay","wish"},new List<string> { "张莹霞" }); var shortageSkuList = purchase_advise.ShortageSkuList(new List<string> { "ebay","wish"},new List<string> { "张莹霞" });
alone_datas = datas.Where(s => shortageSkuList.Any(v => v == s.bailun_sku)).ToList(); alone_datas = datas.Where(s => shortageSkuList.Any(v => v == s.bailun_sku)).ToList();
other_datas = datas.Where(s => !shortageSkuList.Any(v => v == s.bailun_sku)).ToList(); other_datas = datas.Where(s => !shortageSkuList.Any(v => v == s.bailun_sku)).ToList();
Console.WriteLine($"ebay+wish 总数:{alone_datas.Count()}");
Console.WriteLine($"其他总数:{alone_datas.Count()}");
if (alone_datas != null && alone_datas.Count > 0) if (alone_datas != null && alone_datas.Count > 0)
{ {
PushBuySys(1,alone_datas, user, is_skip_error,"ebay+wish"); PushBuySys(1,alone_datas, user, is_skip_error,"ebay+wish");
...@@ -393,14 +395,19 @@ namespace AutoTurnOver.Services ...@@ -393,14 +395,19 @@ namespace AutoTurnOver.Services
{ {
mainID = purchase_advise.ImportDuLiShortageDetailed(0); mainID = purchase_advise.ImportDuLiShortageDetailed(0);
} }
Console.WriteLine($"采购建议生成,id:{mainID}");
List<dc_auto_purchase_advise_detailed_dto> datas = new List<dc_auto_purchase_advise_detailed_dto>(); List<dc_auto_purchase_advise_detailed_dto> datas = new List<dc_auto_purchase_advise_detailed_dto>();
var total = 0; var total = 0;
datas.AddRange(PurchaseAdviseServices.DetailList(new dc_auto_purchase_advise_detailed_search_dto { main_id = mainID, ispush = false }, 0, int.MaxValue, ref total)); datas.AddRange(PurchaseAdviseServices.DetailList(new dc_auto_purchase_advise_detailed_search_dto { main_id = mainID, ispush = false }, 0, int.MaxValue, ref total));
Console.WriteLine($"查询建议数,total:{datas.Count}");
//datas.AddRange(PurchaseAdviseServices.DetailList(new dc_auto_purchase_advise_detailed_search_dto { main_id = mainID, ispush = false }, 0, int.MaxValue, ref total)); //datas.AddRange(PurchaseAdviseServices.DetailList(new dc_auto_purchase_advise_detailed_search_dto { main_id = mainID, ispush = false }, 0, int.MaxValue, ref total));
if (true) if (true)
{ {
Console.WriteLine($"进入推送逻辑");
PurchaseAdviseServices.PushBuySysSplit(datas, new UserData { UserName = "admin" }, true); PurchaseAdviseServices.PushBuySysSplit(datas, new UserData { UserName = "admin" }, true);
Console.WriteLine($"完成推送");
} }
else else
{ {
......
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