wangxinhui
2025-07-17 68343df577836d29f8bd106823b1805d365f4a54
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPC.cs
@@ -75,19 +75,13 @@
                    if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null)
                    {
                        R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
                        if (conveyorLineInfoRead.StatusPV == 2 && conveyorLineInfoRead.Command == 11)
                        if (conveyorLineInfoRead != null && conveyorLineInfoRead.StatusPV == 2 && conveyorLineInfoRead.Command == 11)
                        {
                            Dt_Task task = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.RGV_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.New.ObjToInt()));
                            if (task == null)
                            {
                                //获取站台
                                //获取站台生成任务
                                WebResponseContent content = _taskService.RequestWMSTaskSimple("", item.StationCode);
                                //string? locationCode = _taskService.RequestAssignLocation(task.TaskNum, "AGV_CP");
                                //if (string.IsNullOrEmpty(locationCode) && task.TaskType != TaskTypeEnum.EmptyProductBack.ObjToInt())
                                //{
                                //    WriteError(item.StationName, $"请求分配货位返回信息错误,设备编号:{item.StationCode},任务号:{task.TaskNum}");
                                //    continue;
                                //}
                                if (content.Status)
                                {
                                    Dt_Task taskNew = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()));