using Autofac.Core; using HslCommunication; using HslCommunication.Core; using Microsoft.VisualBasic.FileIO; using Quartz; using SixLabors.ImageSharp.PixelFormats; using SqlSugar; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Communicator; using WIDESEAWCS_Core.BaseRepository; using WIDESEAWCS_Core.Helper; using WIDESEAWCS_IBasicInfoService; using WIDESEAWCS_ITaskInfoService; using WIDESEAWCS_Model.Models; using WIDESEAWCS_QuartzJob; using WIDESEAWCS_QuartzJob.DeviceBase; using WIDESEAWCS_QuartzJob.StackerCrane.Enum; namespace WIDESEAWCS_Tasks { [DisallowConcurrentExecution] public partial class TaskJob : JobBase, IJob { private readonly ITaskService _taskService; private readonly IApiInfoService _apiInfoService; private readonly IRGVLocationInfoService _rGVLocationInfoService; private readonly IStationMangerService _stationMangerService; private readonly ITrackloginfoService _trackloginfoService; private readonly IUnitOfWorkManage _unitOfWorkManage; public TaskJob(ITaskService taskService, IApiInfoService apiInfoService, IRGVLocationInfoService rGVLocationInfoService, IStationMangerService stationMangerService, ITrackloginfoService trackloginfoService, IUnitOfWorkManage unitOfWorkManage) { _taskService = taskService;//注入 _apiInfoService = apiInfoService; _rGVLocationInfoService = rGVLocationInfoService; _stationMangerService = stationMangerService; _trackloginfoService = trackloginfoService; _unitOfWorkManage = unitOfWorkManage; } public Task Execute(IJobExecutionContext context) { try { //SendNewTask(); //SendWaitToTask(); } catch (Exception ex) { Console.Out.WriteLine(nameof(TaskJob) + ":" + ex.Message); } return Task.CompletedTask; } } }