From 0d9fb6555efa42e27de4d57d3fb7b8d82a78ef45 Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期四, 27 三月 2025 14:10:43 +0800 Subject: [PATCH] 优化任务处理逻辑并清理代码 --- CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs index 1c6e0dd..4ace90d 100644 --- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs +++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_After/CommonConveyorLine_AfterJob.cs @@ -184,18 +184,18 @@ if (stationInfo.stationType != 7) return; var taskNew = _taskRepository.QueryData(x => x.TaskType == (int)TaskOutboundTypeEnum.OutTray); - var need = _needBarcodeRepository.QueryFirst(x => x.toArea == stationInfo.stationChildCode && x.productLine == stationInfo.productLine); + //var need = _needBarcodeRepository.QueryFirst(x => x.toArea == stationInfo.stationChildCode && x.productLine == stationInfo.productLine); //var cache = command.Reserved5; - var proAddress = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationInfo.stationChildCode).Where(x => x.DeviceProParamName == ConveyorLineDBName_After.Reserve5.ToString()).FirstOrDefault().DeviceProAddress; + //var proAddress = conveyorLine.DeviceProDTOs.Where(x => x.DeviceChildCode == stationInfo.stationChildCode).Where(x => x.DeviceProParamName == ConveyorLineDBName_After.Reserve5.ToString()).FirstOrDefault().DeviceProAddress; var cache = Convert.ToInt16(conveyorLine.ReadValue(ConveyorLineDBName_After.Reserve5, stationInfo.stationChildCode)); ConsoleHelper.WriteColorLine($"宸茬粡鏈墈taskNew.Count}涓换鍔�,鍙互鏀緖cache}涓┖鎵樼洏", ConsoleColor.DarkCyan); - if (taskNew.Count + 2 < cache) //涓嶅瓨鍦ㄧ┖妗嗗嚭搴撲换鍔� 鍒欒姹俉MS鍑虹┖搴� + if (taskNew.Count + 1 < cache) //涓嶅瓨鍦ㄧ┖妗嗗嚭搴撲换鍔� 鍒欒姹俉MS鍑虹┖搴� { //ConsoleHelper.WriteWarningLine("璇锋眰绌烘墭鐩�"); if (_taskService.RequestTask(command.ConveyorLineBarcode, stationInfo).Result.Status) { - need.inLineNum += 1; - _needBarcodeRepository.UpdateData(need); + //need.inLineNum += 1; + //_needBarcodeRepository.UpdateData(need); } } } -- Gitblit v1.9.3