Commit 2baa0999 by zhouminghui

backgroundservice

parent 2569ea7a
...@@ -35,7 +35,7 @@ namespace Bailun.DC.SyncMonthSalesProfitNew ...@@ -35,7 +35,7 @@ namespace Bailun.DC.SyncMonthSalesProfitNew
var result = Init(); var result = Init();
if (result) if (result)
{ {
Console.WriteLine("同步月利润销售报告任务运行完成 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Console.WriteLine($"同步月利润销售报告任务运行完成,返回结果为【{result}" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
} }
else else
{ {
...@@ -45,8 +45,15 @@ namespace Bailun.DC.SyncMonthSalesProfitNew ...@@ -45,8 +45,15 @@ namespace Bailun.DC.SyncMonthSalesProfitNew
else if (now.Hour == 2) else if (now.Hour == 2)
{ {
Console.WriteLine("同步生成销售额和成本的汇总数据开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Console.WriteLine("同步生成销售额和成本的汇总数据开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
new FinanceService().SyncMonthSalesProfiOrderDetail(""); var result = Init2();
Console.WriteLine("同步生成销售额和成本的汇总数据任务运行完成 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); if (result)
{
Console.WriteLine("同步生成销售额和成本的汇总数据任务运行完成 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
else
{
Console.WriteLine($"同步生成销售额和成本的汇总数据任务出现了bug,程序返回结果【{result}】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
} }
else else
{ {
...@@ -62,5 +69,9 @@ namespace Bailun.DC.SyncMonthSalesProfitNew ...@@ -62,5 +69,9 @@ namespace Bailun.DC.SyncMonthSalesProfitNew
{ {
return new FinanceService().SyncMonthSalesProfit(""); return new FinanceService().SyncMonthSalesProfit("");
} }
private bool Init2()
{
return new FinanceService().SyncMonthSalesProfiOrderDetail("");
}
} }
} }
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