| using AutoMapper; | 
| using Quartz; | 
| using System; | 
| using System.Collections.Generic; | 
| using System.Linq; | 
| using System.Text; | 
| using System.Threading.Tasks; | 
| using WIDESEAWCS_IBasicInfoRepository; | 
| using WIDESEAWCS_ITaskInfoService; | 
| using WIDESEAWCS_QuartzJob; | 
| using WIDESEAWCS_QuartzJob.Service; | 
|   | 
| namespace WIDESEAWCS_Tasks | 
| { | 
|     [DisallowConcurrentExecution] | 
|     public partial class AGV_CPJob : JobBase, IJob | 
|     { | 
|         public readonly ITaskService _taskService; | 
|         private readonly ITaskExecuteDetailService _taskExecuteDetailService; | 
|         private readonly IRouterService _routerService; | 
|         private readonly IStationMangerRepository _stationMangerRepository; | 
|         private readonly IMapper _mapper; | 
|   | 
|         public AGV_CPJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, IMapper mapper) | 
|         { | 
|             _taskService = taskService; | 
|             _taskExecuteDetailService = taskExecuteDetailService; | 
|             _routerService = routerService; | 
|             _stationMangerRepository = stationMangerRepository; | 
|             _mapper = mapper; | 
|         } | 
|         public Task Execute(IJobExecutionContext context) | 
|         { | 
|             try | 
|             { | 
|                 //任务发送 | 
|                 SendAGVTask(); | 
|                 //继续执行 | 
|                 ContinueAGVTask(); | 
|             } | 
|             catch (Exception ex) | 
|             { | 
|                 Console.Out.WriteLine(nameof(AGV_CPJob) + ":" + ex.Message); | 
|             } | 
|             return Task.CompletedTask; | 
|         } | 
|     } | 
| } |