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.
39 lines
965 B
C#
39 lines
965 B
C#
using DS.WMS.Core.QuarztJobs.Interface;
|
|
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;
|
|
|
|
public BankStatementJob(IBankStatementService bank)
|
|
{
|
|
_bank = bank;
|
|
}
|
|
|
|
public async Task Execute(IJobExecutionContext context)
|
|
{
|
|
//定时获取银行流水
|
|
try
|
|
{
|
|
await _bank.GetBankStatement();
|
|
Console.WriteLine($"定时获取银行流水: {DateTime.Now}");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine($"定时获取银行流水报错: {DateTime.Now};错误内容{ex.Message}");
|
|
}
|
|
}
|
|
}
|
|
}
|