dengjunjie
2025-01-17 df97e66f99cf081abf212a8d97fc32afe9c6e7a7
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/AGV/AGV_CSJExtend.cs
@@ -11,6 +11,7 @@
using WIDESEAWCS_Model.Models;
using static Dm.net.buffer.ByteArrayBuffer;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_DTO.Agv;
namespace WIDESEAWCS_Tasks
{
@@ -71,6 +72,24 @@
                    }
                }
                _taskService.UpdateData(newTasks);
                //鍑哄簱缁戝畾鏌ヨ
                Dt_Task outBound = _taskService.Db.Queryable<Dt_Task>().Where(x => x.TaskState == TaskStatusEnum.Exception.ObjToInt() && nameof(AGV_CSJJob).Contains(x.DeviceCode) && x.TaskType==TaskTypeEnum.Outbound.ObjToInt()).ToList().OrderBy(x => x.Grade).ThenBy(x=>x.CreateDate).First();
                if (outBound != null)
                {
                    AgvPodBerthAndMatDTO andMatDTO = new AgvPodBerthAndMatDTO()
                    {
                        ReqCode = Guid.NewGuid().ToString().Replace("-", ""),
                        PositionCode=outBound.TargetAddress
                    };
                    WebResponseContent content = _taskService.AgvPodBerthAndMat(andMatDTO);
                    if (content.Status)
                    {
                        outBound.TaskState = TaskStatusEnum.AGV_Execute.ObjToInt();
                        outBound.ExceptionMessage = "";
                        //agvTask.Remark = content.Data.ObjToString();
                        _taskService.UpdateTask(outBound, TaskStatusEnum.AGV_Execute);
                    }
                }
            }
            catch (Exception ex)
            {