From e1dd1dc9ba7135e3d64a65587d6c1be2c3e18c5a Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期三, 25 六月 2025 11:01:22 +0800 Subject: [PATCH] 提交最新优化代码 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/干膜仓/StackerCraneJob_GM.cs | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" index e8111b2..30525cb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\345\271\262\350\206\234\344\273\223/StackerCraneJob_GM.cs" @@ -275,7 +275,6 @@ WriteError(commonStackerCrane.DeviceCode, $"绉诲簱鎺ュ彛璋冪敤閿欒"); _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"绉诲簱鎺ュ彛璋冪敤閿欒"); return null; - } if (task.TaskNum == taskDTO.TaskNum) { @@ -286,10 +285,17 @@ Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO); //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц Dt_Task existTask = _taskService.QueryStackerExistTask(reloTask.PalletCode, reloTask.SourceAddress); - if (existTask != null) + if (existTask != null && existTask.TaskState == (int)TaskStatusEnum.SC_Execute) { + Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => (x.StationCode == task.NextAddress || x.StackerCraneStationCode == task.NextAddress) && x.StackerCraneCode == task.DeviceCode); + existTask.NextAddress = stationManger.StackerCraneStationCode; + _taskRepository.UpdateData(existTask); return existTask; } + else if (existTask != null && existTask.TaskState != (int)TaskStatusEnum.SC_Execute) + { + return null; + } else { reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); -- Gitblit v1.9.3