You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
978 B
C#

using DS.WMS.Core.QuarztJobs.Interface;
using NLog;
2 months ago
using Quartz;
namespace DS.WMS.Core.Jobs
{
/// <summary>
/// 定时获取进项发票
/// </summary>
public class InInvoiceJob : IJob
{
private readonly IInInvoiceJobService _ininvice;
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
2 months ago
public InInvoiceJob(IInInvoiceJobService ininvice)
{
_ininvice = ininvice;
}
public async Task Execute(IJobExecutionContext context)
{
//定时获取进项发票
try
{
_logger.Info($"定时任务-获取进项发票{DateTime.Now}");
2 months ago
await _ininvice.GetInInvoiceData();
2 months ago
}
catch (Exception ex)
{
_logger.Error($"定时任务-获取进项发票报错{DateTime.Now};错误内容{ex.Message}");
2 months ago
}
}
}
}