Commit 6c82f706 by allan0815

解决

parent 85b0e608
......@@ -27,6 +27,7 @@ namespace Bailun.DC.HappenAmount
{
try
{
hl_amount_pay = 0;
var now = DateTime.Now;
if (now.Hour == 23 && now.Minute == 59) //每天 23:59分启动
......@@ -35,17 +36,7 @@ namespace Bailun.DC.HappenAmount
Console.WriteLine("开始启动 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
Init(DateTime.Parse(now.ToShortDateString()), DateTime.Parse(now.AddDays(1).ToShortDateString()));
var result = new Bailun.DC.Services.FinanceReportServices().AddLogisticsWaitPay(day, hl_amount_pay);
if (string.IsNullOrEmpty(result))
{
Console.WriteLine("生成物流供应商应付款余额记录成功 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
else
{
Console.WriteLine("生成物流供应商应付款余额记录失败: "+result+ " " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
Console.WriteLine("任务运行完成 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
else if ((now.Hour== 12) && now.Minute == 1)
......@@ -55,7 +46,7 @@ namespace Bailun.DC.HappenAmount
while (start.AddDays(1) < DateTime.Now)
{
new Services().Init(start, start.AddDays(1));
new Bailun.DC.Services.FinanceReportServices().AddLogisticsWaitPay(start, hl_amount_pay);
//new Bailun.DC.Services.FinanceReportServices().AddLogisticsWaitPay(start, hl_amount_pay);
start = start.AddDays(1);
}
}
......@@ -252,6 +243,17 @@ namespace Bailun.DC.HappenAmount
else
{
Console.WriteLine(m.day + " 保存成功!");
var lg_result = new Bailun.DC.Services.FinanceReportServices().AddLogisticsWaitPay(m.day, m.hl_amount_pay);
if (string.IsNullOrEmpty(lg_result))
{
Console.WriteLine("生成物流供应商应付款余额记录成功 " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
else
{
Console.WriteLine("生成物流供应商应付款余额记录失败: " + result + " " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
}
}
}
......
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