Commit f862e078 by 泽锋 李

fix

parent b8031617
......@@ -23,7 +23,7 @@ namespace ResetOutofstock
// throw;
//}
//report.ResetCashFlowData();
report.ResetCashFlowData();
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
......
......@@ -16,48 +16,48 @@ namespace ResetOutofstock
{
Task.Factory.StartNew(() =>
{
while (true)
{
try
{
Console.WriteLine($"开始 刷新现金流 采购数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
var now = DateTime.Now;
report_cash_flow_dao.CalculationPurchaseOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
Console.WriteLine($"结束刷新现金流 采购数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Thread.Sleep(240 * 60 * 60 * 1000);
}
});
Task.Factory.StartNew(() =>
{
while (true)
{
try
{
var now = DateTime.Now;
Console.WriteLine($"开始 刷新订单 调拨 数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
Console.WriteLine($"结束 刷新订单 调拨 数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Thread.Sleep(240 * 60 * 60 * 1000);
}
});
//Task.Factory.StartNew(() =>
//{
// while (true)
// {
// try
// {
// Console.WriteLine($"开始 刷新现金流 采购数据,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
// var now = DateTime.Now;
// report_cash_flow_dao.CalculationPurchaseOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
// Console.WriteLine($"结束刷新现金流 采购数据,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
// }
// catch (Exception ex)
// {
// Console.WriteLine(ex.Message);
// }
// Thread.Sleep(240 * 60 * 60 * 1000);
// }
//});
//Task.Factory.StartNew(() =>
//{
// while (true)
// {
// try
// {
// var now = DateTime.Now;
// Console.WriteLine($"开始 刷新订单 调拨 数据,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
// report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
// Console.WriteLine($"结束 刷新订单 调拨 数据,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
// }
// catch (Exception ex)
// {
// Console.WriteLine(ex.Message);
// }
// Thread.Sleep(240 * 60 * 60 * 1000);
// }
//});
Task.Factory.StartNew(() =>
......
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