Commit ff435be4 by 泽锋 李

fix

parent 4de78890
......@@ -23,10 +23,10 @@ namespace ResetOutofstock
try
{
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")}");
var now = DateTime.Now;
report_cash_flow_dao.CalculationRefundOrder(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")}");
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)
{
......@@ -38,25 +38,26 @@ namespace ResetOutofstock
}
});
//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.CalculationOrderCostLogistics(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