From 48fce55ab5d11a1821ab640742153425d594709c Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期四, 27 三月 2025 09:30:05 +0800 Subject: [PATCH] 更新配置和代码逻辑,优化异常处理 --- CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs | 19 ++++--------------- 1 files changed, 4 insertions(+), 15 deletions(-) diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs index d0f6b0d..f4a858c 100644 --- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs +++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs @@ -120,18 +120,6 @@ List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); foreach (string childDeviceCode in childDeviceCodes) { - //ConveyorLineTaskCommand_After command = null; - //if (childDeviceCode == "2236") - //{ - // var stationPLC = _stationManagerRepository.QueryFirst(x => x.stationType == 1 && x.stationChildCode == childDeviceCode).stationPLC; - // IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationPLC); - // CommonConveyorLine_After conveyorLine1 = (CommonConveyorLine_After)device; - // command = conveyorLine1.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); - //} - //else - //{ - // command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); - //} ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); if (command == null) continue; if (command.ConveyorLineBarcode.Trim().Contains("\0")) command.ConveyorLineBarcode = ""; @@ -146,7 +134,7 @@ } } - if (childDeviceCode == "1670" || childDeviceCode == "1666" || childDeviceCode == "1548" || childDeviceCode == "1448") + if (childDeviceCode == "3464" || childDeviceCode == "3460" || childDeviceCode == "3456" ) { Platform platform = _platFormRepository.QueryFirst(x => x.PLCCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active"); if (platform != null) @@ -404,7 +392,7 @@ taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationLocation); } - if ((stationManager.stationPLC == "1018" && stationManager.stationArea == "Cache") || task.TaskType == (int)TaskOutboundTypeEnum.OutTray) //鏇存柊鍦ㄩ�旀暟鎹� + if ((stationManager.stationPLC == "1007" && stationManager.stationArea == "Cache") || task.TaskType == (int)TaskOutboundTypeEnum.OutTray) //鏇存柊鍦ㄩ�旀暟鎹� { dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == stationManager.productLine && x.toArea == stationManager.stationChildCode); @@ -467,6 +455,7 @@ { try { + WriteInfo("鍑哄簱", $"銆恵JsonConvert.SerializeObject(platform)}銆�"); TaskOutboundTypeEnum taskOutboundTypeEnum; if (platform.PlatformType.Contains("OutTray")) taskOutboundTypeEnum = TaskOutboundTypeEnum.OutTray; @@ -515,7 +504,7 @@ return; taskDTO = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString()); - + WriteInfo("鍑哄簱", $"銆恵JsonConvert.SerializeObject(taskDTO)}銆�"); #endregion 璋冪敤WMS鑾峰彇鍑哄簱浠诲姟 CreateAndSendTask(taskDTO); -- Gitblit v1.9.3