Commit 8ba92607 by 泽锋 李

新增 Shopify 自动备货服务

parent 5b5c8c50
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class dc_auto_jit_inventory
{
public int id { get; set; }
public string bailun_sku { get; set; }
public string bailun_sku_title { get; set; }
public int safe_stock { get; set; }
public string warehouse_code { get; set; }
public string warehouse_name { get; set; }
public int status { get; set; }
public DateTime? date { get; set; }
public DateTime? invalid_date { get; set; }
/// <summary>
/// 默认 =0, 独立站订单=1
/// </summary>
public int type { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace AutoTurnOver.Models
{
public class dc_t_task
{
public int id { get; set; }
public string task_name { get; set; }
public DateTime start_time { get; set; }
public DateTime end_time { get; set; }
}
}
......@@ -38,6 +38,8 @@ namespace ResetOutofstock
//daily.ResetGmvExtendSales(now);
//report.ResetTransExpectArrivaltime();
//base_sku_dao.SynchroSkuCharacter();
//report.ClearShopifyJitInventory();
}
catch (Exception ex)
......
......@@ -428,6 +428,30 @@ namespace ResetOutofstock
});
Task.Factory.StartNew(() =>
{
while (true)
{
try
{
Console.WriteLine($"开始 计算Shopify的备货数量,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
report.ClearShopifyJitInventory();
report.ShopifyJitInventory();
Console.WriteLine($"结束 计算Shopify的备货数量,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Thread.Sleep(60 * 60 * 1000);
}
catch (Exception ex)
{
Console.WriteLine("计算Shopify的备货数量:" + ex.Message);
Console.WriteLine("计算Shopify的备货数量:" + ex.StackTrace);
}
}
});
return Task.CompletedTask;
......
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