From 2e5d53bdde2df2419f879d4acad8f39fdbcf5b1a Mon Sep 17 00:00:00 2001 From: 肖洋 <cathay_xy@163.com> Date: 星期五, 22 十一月 2024 10:20:42 +0800 Subject: [PATCH] 代码更新 --- Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs index 99de6e7..08a7d4b 100644 --- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs +++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs @@ -27,6 +27,8 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Threading.Tasks; +using WIDESEAWCS_BasicInfoRepository; +using WIDESEAWCS_BasicInfoService; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_Core; using WIDESEAWCS_Core.Helper; @@ -50,14 +52,16 @@ private readonly ITaskExecuteDetailService _taskExecuteDetailService; private readonly IRouterService _routerService; private readonly IMapper _mapper; + private readonly IDt_StationManagerService _stationManagerService; - public CommonConveyorLine_AfterJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository) + public CommonConveyorLine_AfterJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository,IDt_StationManagerService stationManagerService) { _taskService = taskService; _taskExecuteDetailService = taskExecuteDetailService; _routerService = routerService; _mapper = mapper; _taskRepository = taskRepository; + _stationManagerService = stationManagerService; } public Task Execute(IJobExecutionContext context) @@ -67,6 +71,7 @@ CommonConveyorLine_After conveyorLine = (CommonConveyorLine_After)context.JobDetail.JobDataMap.Get("JobParams"); if (conveyorLine != null) { + List<Dt_StationManager> stationManagers = _stationManagerService.GetAllStationByDeviceCode(conveyorLine.DeviceCode); List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); //List<Task> tasks = new List<Task>(); foreach (string childDeviceCode in childDeviceCodes) @@ -106,14 +111,13 @@ /// <param name="conveyorLine">杈撻�佺嚎瀹炰緥瀵硅薄</param> /// <param name="command">璇诲彇鐨勮姹備俊鎭�</param> /// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param> - /// <param name="ProtocalDetailValue">绾夸綋褰撳墠bool璇诲彇鍋忕Щ鍦板潃</param> public void RequestInbound(CommonConveyorLine_After conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode) { var taskNew = _taskService.QueryCraneConveyorLineTask(command.ConveyorLineTaskNum.ObjToInt(), childDeviceCode); if (taskNew == null) { string barcode = command.ConveyorLineBarcode.TrimEnd(); - if (_taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode).Status) + if (_taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode).Result.Status) { Dt_Task task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode); if (task != null) @@ -142,8 +146,6 @@ _taskService.UpdateTaskStatusToNext(inTask); } - - } /// <summary> -- Gitblit v1.9.3