| #region << 版 本 注 释 >> | 
| /*---------------------------------------------------------------- | 
|  * 命名空间:WIDESEAWCS_Tasks.ConveyorLineJob | 
|  * 创建者:胡童庆 | 
|  * 创建时间:2024/8/2 16:13:36 | 
|  * 版本:V1.0.0 | 
|  * 描述: | 
|  * | 
|  * ---------------------------------------------------------------- | 
|  * 修改人: | 
|  * 修改时间: | 
|  * 版本:V1.0.1 | 
|  * 修改说明: | 
|  *  | 
|  *----------------------------------------------------------------*/ | 
| #endregion << 版 本 注 释 >> | 
|   | 
| using AutoMapper; | 
| using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; | 
| using Quartz; | 
| using System; | 
| using System.Collections.Generic; | 
| using System.Linq; | 
| using System.Reflection; | 
| using System.Text; | 
| using System.Threading.Tasks; | 
| using WIDESEAWCS_Core; | 
| using WIDESEAWCS_Core.Helper; | 
| using WIDESEAWCS_ITaskInfoService; | 
| using WIDESEAWCS_Model.Models; | 
| using WIDESEAWCS_QuartzJob; | 
| using WIDESEAWCS_QuartzJob.DTO; | 
| using WIDESEAWCS_QuartzJob.Service; | 
| using WIDESEAWCS_Tasks.ConveyorLineJob; | 
|   | 
| namespace WIDESEAWCS_Tasks | 
| { | 
|     [DisallowConcurrentExecution] | 
|     public class CommonConveyorLineJob : JobBase, IJob | 
|     { | 
|         private readonly ITaskService _taskService; | 
|         private readonly ITaskExecuteDetailService _taskExecuteDetailService; | 
|         private readonly IRouterService _routerService; | 
|         private readonly IMapper _mapper; | 
|   | 
|         public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper) | 
|         { | 
|             _taskService = taskService; | 
|             _taskExecuteDetailService = taskExecuteDetailService; | 
|             _routerService = routerService; | 
|             _mapper = mapper; | 
|         } | 
|   | 
|         public Task Execute(IJobExecutionContext context) | 
|         { | 
|             //Console.Out.WriteLine(DateTime.Now); | 
|             try | 
|             { | 
|                 CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams"); | 
|                 if (conveyorLine != null) | 
|                 { | 
|                     List<string> childDeviceCodes = new List<string>(); | 
|   | 
|                     foreach (string childDeviceCode in childDeviceCodes) | 
|                     { | 
|                         R_ConveyorLineInfo command = conveyorLine.ReadCustomer<R_ConveyorLineInfo>(childDeviceCode); | 
|                         if (command != null) | 
|                         { | 
|                             | 
|                         } | 
|                     } | 
|                 } | 
|   | 
|             } | 
|             catch (Exception ex) | 
|             { | 
|                 Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString()); | 
|             } | 
|             finally | 
|             { | 
|                 //Console.Out.WriteLine(DateTime.Now); | 
|             } | 
|             return Task.CompletedTask; | 
|         } | 
|   | 
|         /// <summary> | 
|         /// 输送线请求入库 | 
|         /// </summary> | 
|         /// <param name="conveyorLine">输送线实例对象</param> | 
|         /// <param name="command">读取的请求信息</param> | 
|         /// <param name="childDeviceCode">子设备编号</param> | 
|         public void RequestInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) | 
|         { | 
|              | 
|         } | 
|   | 
|         /// <summary> | 
|         /// 输送线请求入库下一地址 | 
|         /// </summary> | 
|         /// <param name="conveyorLine">输送线实例对象</param> | 
|         /// <param name="command">读取的请求信息</param> | 
|         /// <param name="childDeviceCode">子设备编号</param> | 
|         public void RequestInNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) | 
|         { | 
|             | 
|         } | 
|   | 
|         /// <summary> | 
|         /// 输送线入库完成 | 
|         /// </summary> | 
|         /// <param name="conveyorLine">输送线实例对象</param> | 
|         /// <param name="command">读取的请求信息</param> | 
|         /// <param name="childDeviceCode">子设备编号</param> | 
|         public void ConveyorLineInFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) | 
|         { | 
|              | 
|         } | 
|   | 
|         /// <summary> | 
|         /// 输送线请求出信息 | 
|         /// </summary> | 
|         /// <param name="conveyorLine">输送线实例对象</param> | 
|         /// <param name="command">读取的请求信息</param> | 
|         /// <param name="childDeviceCode">子设备编号</param> | 
|         public void RequestOutbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) | 
|         { | 
|             | 
|         } | 
|   | 
|         /// <summary> | 
|         /// 输送线请求出库下一地址 | 
|         /// </summary> | 
|         /// <param name="conveyorLine">输送线实例对象</param> | 
|         /// <param name="command">读取的请求信息</param> | 
|         /// <param name="childDeviceCode">子设备编号</param> | 
|         public void RequestOutNextAddress(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) | 
|         { | 
|             | 
|         } | 
|   | 
|         /// <summary> | 
|         /// 输送线出库完成 | 
|         /// </summary> | 
|         /// <param name="conveyorLine">输送线实例对象</param> | 
|         /// <param name="command">读取的请求信息</param> | 
|         /// <param name="childDeviceCode">子设备编号</param> | 
|         public void ConveyorLineOutFinish(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode) | 
|         { | 
|             | 
|         } | 
|     } | 
| } |