using HslCommunication;
|
using HslCommunication.Core;
|
using Microsoft.VisualBasic.FileIO;
|
using Quartz;
|
using SixLabors.ImageSharp.PixelFormats;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Linq;
|
using System.Reflection;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEAWCS_Communicator;
|
using WIDESEAWCS_Core.BaseRepository;
|
using WIDESEAWCS_Core.Helper;
|
using WIDESEAWCS_ISystemServices;
|
using WIDESEAWCS_ITaskInfoRepository;
|
using WIDESEAWCS_ITaskInfoService;
|
using WIDESEAWCS_Model.Models;
|
using WIDESEAWCS_QuartzJob;
|
using WIDESEAWCS_QuartzJob.DeviceBase;
|
using WIDESEAWCS_QuartzJob.Service;
|
using WIDESEAWCS_QuartzJob.StackerCrane.Enum;
|
|
namespace WIDESEAWCS_Tasks
|
{
|
[DisallowConcurrentExecution]
|
public class DeviceAlarmMonitorJob : IJob
|
{
|
IRgvoperainformService _rgvoperainformService;
|
public DeviceAlarmMonitorJob(IRgvoperainformService rgvoperainformService)
|
{
|
_rgvoperainformService = rgvoperainformService;
|
}
|
|
public Task Execute(IJobExecutionContext context)
|
{
|
try
|
{
|
SpeStackerCrane speStackerCrane = (SpeStackerCrane)context.JobDetail.JobDataMap.Get("JobParams");
|
|
if (speStackerCrane != null)
|
{
|
_rgvoperainformService.LogAlarmToDatabase(speStackerCrane.DeviceCode);
|
}
|
}
|
catch (Exception ex)
|
{
|
|
}
|
|
return Task.CompletedTask;
|
}
|
}
|
|
|
}
|