修复bug
This commit is contained in:
Binary file not shown.
@@ -18,14 +18,14 @@ namespace WMS.Web.Domain.QuartzJob
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class ErpDeleteQuartzJob : IJob
|
public class ErpDeleteQuartzJob : IJob
|
||||||
{
|
{
|
||||||
private readonly ILogger<OutStockOrderQuartzJob> _logger;
|
private readonly ILogger<ErpDeleteQuartzJob> _logger;
|
||||||
private readonly IServiceScopeFactory _serviceScopeFactory;
|
private readonly IServiceScopeFactory _serviceScopeFactory;
|
||||||
private readonly AppOptions _options;
|
private readonly AppOptions _options;
|
||||||
private readonly IOutStockTaskService _outStockTaskService;
|
private readonly IOutStockTaskService _outStockTaskService;
|
||||||
private readonly ITransactionRepositories _transactionRepositories;
|
private readonly ITransactionRepositories _transactionRepositories;
|
||||||
private readonly IInStockTaskService _inStockTaskService;
|
private readonly IInStockTaskService _inStockTaskService;
|
||||||
|
|
||||||
public ErpDeleteQuartzJob(ILogger<OutStockOrderQuartzJob> logger,
|
public ErpDeleteQuartzJob(ILogger<ErpDeleteQuartzJob> logger,
|
||||||
IServiceScopeFactory serviceScopeFactory,
|
IServiceScopeFactory serviceScopeFactory,
|
||||||
IOptions<AppOptions> options,
|
IOptions<AppOptions> options,
|
||||||
IOutStockTaskService outStockTaskService,
|
IOutStockTaskService outStockTaskService,
|
||||||
@@ -48,6 +48,9 @@ namespace WMS.Web.Domain.QuartzJob
|
|||||||
public async Task Execute(IJobExecutionContext context)
|
public async Task Execute(IJobExecutionContext context)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
var data = DateTime.Now;
|
||||||
|
if (data.Hour == 8 || data.Hour == 12 || data.Hour == 16 || data.Hour == 20)
|
||||||
{
|
{
|
||||||
|
|
||||||
_logger.LogInformation($"出库单-监测金蝶删单:执行开始时间->{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
|
_logger.LogInformation($"出库单-监测金蝶删单:执行开始时间->{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
|
||||||
@@ -61,6 +64,7 @@ namespace WMS.Web.Domain.QuartzJob
|
|||||||
await _inStockTaskService.ErpDel();
|
await _inStockTaskService.ErpDel();
|
||||||
_logger.LogInformation($"入库单-监测金蝶删单:执行结束时间->{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
|
_logger.LogInformation($"入库单-监测金蝶删单:执行结束时间->{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogInformation($"监测金蝶删单:定时任务执行失败->{ex.Message}");
|
_logger.LogInformation($"监测金蝶删单:定时任务执行失败->{ex.Message}");
|
||||||
|
|||||||
Reference in New Issue
Block a user