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.
33 lines
853 B
C#
33 lines
853 B
C#
using DS.WMS.Core.HangfireJob.Interface;
|
|
using Quartz;
|
|
|
|
namespace DS.WMS.Core.Jobs
|
|
{
|
|
/// <summary>
|
|
/// 定时获取进项发票
|
|
/// </summary>
|
|
public class InInvoiceJob : IJob
|
|
{
|
|
private readonly IInInvoiceJobService _ininvice;
|
|
|
|
public InInvoiceJob(IInInvoiceJobService ininvice)
|
|
{
|
|
_ininvice = ininvice;
|
|
}
|
|
|
|
public async Task Execute(IJobExecutionContext context)
|
|
{
|
|
//定时获取进项发票
|
|
try
|
|
{
|
|
await _ininvice.GetInInvoiceData();
|
|
Console.WriteLine($"定时获取进项发票: {DateTime.Now}");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine($"定时获取进项发票报错: {DateTime.Now};错误内容{ex.Message}");
|
|
}
|
|
}
|
|
}
|
|
}
|