From cebd0800e9b5e1a1055a48d5e52f3f8a85e8d82c Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 13 一月 2025 20:59:26 +0800 Subject: [PATCH] 1 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/油墨仓/CommonHoisterJob.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" index e057bee..9246eaf 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\262\271\345\242\250\344\273\223/CommonHoisterJob.cs" @@ -93,8 +93,7 @@ task.NextAddress = locationCode; task.DeviceCode = stationManger.StackerCraneCode; task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); - _taskRepository.UpdateData(task); - + _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, currentAddress: task.CurrentAddress, nextAddress: task.NextAddress); bool isWrite = hoister.SetValue(HoisterDBName.RequestIn, false, deviceChildCode); } else @@ -107,13 +106,15 @@ Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskType != TaskTypeEnum.MesOutbound.ObjToInt()); if (task != null) { + task.TaskState=TaskStatusEnum.HT_Executing.ObjToInt(); + _taskService.UpdateTask(task, TaskStatusEnum.HT_Executing); bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, true, deviceChildCode); WriteError(hoister.DeviceName, $"璇锋眰鍑哄簱,璁惧缂栧彿:{deviceChildCode},浠诲姟鍙�:{task.TaskNum}"); } } else if (!leisure && !tray && !requestIn && !inbounding && requestOut && outbounding) { - Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.New.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType)); + Dt_Task task = _taskRepository.QueryFirst(x => x.TaskState == TaskStatusEnum.HT_Executing.ObjToInt() && string.IsNullOrEmpty(x.TargetAddress) && _taskService.TaskOutboundTypes.Contains(x.TaskType)); if (task != null) { Dt_StationManger? stationManger = stationMangers.FirstOrDefault(x => x.StationCode == deviceChildCode); @@ -127,8 +128,7 @@ task.NextAddress = stationManger.StackerCraneStationCode; ; task.DeviceCode = stationManger.StackerCraneCode; task.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); - _taskRepository.UpdateData(task); - + _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.DeviceCode, targetAddress: task.TargetAddress, nextAddress: task.NextAddress); bool isWrite = hoister.SetValue(HoisterDBName.RequestOut, false, deviceChildCode); } else -- Gitblit v1.9.3