wangxinhui
昨天 011ca316e6ec2ed93e31c45a9ebd9d3c66664871
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPC.cs
@@ -75,7 +75,7 @@
                    {
                        DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(R_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        DeviceProDTO? deviceProWrite = device.DeviceProDTOs.Where(x => x.DeviceChildCode == item.StationCode && x.DeviceProParamType == nameof(W_ConveyorLineCPDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault();
                        if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null)
                        if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null && deviceProWrite != null)
                        {
                            R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
                            //码垛满盘生成RGV搬运任务
@@ -91,6 +91,7 @@
                                        Dt_Task taskNew = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.New.ObjToInt()));
                                        if (taskNew != null)
                                        {
                                            device.SetValue(W_ConveyorLineCPDB.W_Command, 1, item.StationCode);
                                            _taskService.UpdateTask(taskNew, TaskStatusEnum.RGV_Execute);
                                        }
                                    }
@@ -103,7 +104,7 @@
                                isUpdate = true;
                                WriteInfo("码垛工位状态更新",$"{item.StationCode}{DateTime.Now}更新工位状态:{conveyorLineInfoRead.Command}");
                            }
                            else if (item.IsOccupied == 0)
                            else if ((conveyorLineInfoRead == null ||(conveyorLineInfoRead != null && conveyorLineInfoRead.Command != 10 && item.IsOccupied == 0)))
                            {
                                item.IsOccupied = 1;
                                isUpdate = true;