| | |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Text; |
| | | using WIDESEAWCS_BasicInfoRepository; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core.Caches; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Core.HttpContextUser; |
| | | using WIDESEAWCS_IProcessRepository; |
| | | using WIDESEAWCS_ISystemServices; |
| | | using WIDESEAWCS_ITaskInfo_HtyRepository; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | |
| | | private readonly INoticeService _noticeService; |
| | | private readonly IDt_StationManagerRepository _stationManagerRepository; |
| | | private readonly ITask_HtyRepository _htyRepository; |
| | | private readonly ISys_ConfigService _sys_ConfigService; |
| | | |
| | | public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository) |
| | | public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository, ISys_ConfigService sys_ConfigService) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _noticeService = noticeService; |
| | | _stationManagerRepository = stationManagerRepository; |
| | | _htyRepository = htyRepository; |
| | | _sys_ConfigService = sys_ConfigService; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | |
| | | task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum); |
| | | Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | } |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TargetAddress == "002-021-001") |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001")) |
| | | { |
| | | var TASKHTY = task.Adapt<Dt_Task_Hty>(); |
| | | _taskRepository.DeleteData(task); |
| | |
| | | stackerCraneTaskCommand.StartCommand = 1; |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//判断是否是入库任务 |
| | | { |
| | | if (task.SourceAddress == "1359-4" && task.Roadway.Contains("JZ")) |
| | | var value = _sys_ConfigService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStation, SysConfigKeyConst.JZNGInBoundStation).ConfigValue; |
| | | var valueList = value.Split(',').ToList(); |
| | | if ((valueList.Contains(task.SourceAddress)) && task.Roadway.Contains("JZ")) |
| | | { |
| | | string[] souredCodes = task.CurrentAddress.Split("-"); |
| | | if (souredCodes.Length == 3) |