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;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Jobs
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 定时任务-获取银行流水
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class BankStatementJob : IJob
|
|
|
|
|
{
|
|
|
|
|
private readonly IBankStatementService _bank;
|
|
|
|
|
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
|
|
|
|
|
|
|
|
|
public BankStatementJob(IBankStatementService bank)
|
|
|
|
|
{
|
|
|
|
|
_bank = bank;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task Execute(IJobExecutionContext context)
|
|
|
|
|
{
|
|
|
|
|
//定时获取银行流水
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
_logger.Info($"定时任务-获取银行流水:{DateTime.Now}");
|
|
|
|
|
await _bank.GetBankStatement();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_logger.Error ($"定时任务-获取银行流水报错:{DateTime.Now};错误内容{ex.Message}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|