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