| | |
| | | List<Dt_Task> YKtasks = _taskService.QueryStackerCraneYKTasks(commonStackerCrane.DeviceCode); |
| | | |
| | | |
| | | |
| | | if (task != null) |
| | | { |
| | | |
| | |
| | | |
| | | foreach (var item in tasks) |
| | | { |
| | | //if (item.TargetAddress == "2021"||item.TargetAddress == "2020") |
| | | //{ |
| | | // ////bool IsOccupied = _lineJob.GetPick(); |
| | | |
| | | // //if (!IsOccupied) |
| | | // //{ |
| | | // // return null; |
| | | // //} |
| | | //} |
| | | if (OutTaskStationIsOccupied(item) != null) |
| | | { |
| | | if (item.Roadway == "SC01") |
| | |
| | | if (device != null) |
| | | { |
| | | OtherDevice conveyorLine = (OtherDevice)device; |
| | | DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == task.NextAddress && x.DeviceProParamName == "IsOccupied"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | if (deviceProDTO != null) |
| | | |
| | | if (task.TargetAddress == "2021" || task.TargetAddress == "2020" || task.TargetAddress == "2009") |
| | | { |
| | | bool B_Event_Test = conveyorLine.Communicator.Read<bool>(deviceProDTO.DeviceProAddress); //夿è¾é线æ¯å¦å
许æ¾è´§ä¿¡å· |
| | | if (!B_Event_Test) |
| | | DeviceProDTO? deviceProDTO2007 = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == "2007" && x.DeviceProParamName == "IsOccupied"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == task.NextAddress && x.DeviceProParamName == "IsOccupied"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | |
| | | if (deviceProDTO != null) |
| | | { |
| | | return task; |
| | | bool B_Event_Test = conveyorLine.Communicator.Read<bool>(deviceProDTO.DeviceProAddress); //夿è¾é线æ¯å¦å
许æ¾è´§ä¿¡å· |
| | | bool B_Event_Test2007 = conveyorLine.Communicator.Read<bool>(deviceProDTO2007.DeviceProAddress); //夿2007è¾é线æ¯å¦å
许æ¾è´§ä¿¡å· |
| | | |
| | | if (!B_Event_Test && !B_Event_Test2007) |
| | | { |
| | | return task; |
| | | } |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | DeviceProDTO? deviceProDTO = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == task.NextAddress && x.DeviceProParamName == "IsOccupied"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | if (deviceProDTO != null) |
| | | { |
| | | bool B_Event_Test = conveyorLine.Communicator.Read<bool>(deviceProDTO.DeviceProAddress); //夿è¾é线æ¯å¦å
许æ¾è´§ä¿¡å· |
| | | if (!B_Event_Test) |
| | | { |
| | | return task; |
| | | } |
| | | } |
| | | } |
| | | //if (task.NextAddress == "2021" || task.NextAddress == "2020") |
| | | //{ |
| | | // DeviceProDTO? deviceProDTO1 = conveyorLine.DeviceProDTOs.FirstOrDefault(x => x.DeviceChildCode == "2008" || x.DeviceChildCode == "2009" || x.DeviceChildCode == "2015" || x.DeviceChildCode == "2016" && x.DeviceProParamName == "IsOccupied"); //æ ¹æ®å åæºå°åï¼å°ååç§°æ¾åè®® |
| | | // if (deviceProDTO != null) |
| | | // { |
| | | // bool IsOccupied2008 = conveyorLine.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2008"); |
| | | // bool IsOccupied2009 = conveyorLine.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2009"); |
| | | // bool IsOccupied2015 = conveyorLine.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2015"); |
| | | // bool IsOccupied2016 = conveyorLine.GetValue<W_ConveyorLineDB, bool>(W_ConveyorLineDB.IsOccupied, "2016"); |
| | | |
| | | // //夿æ¯å¦æç« |
| | | // if (IsOccupied2008 && IsOccupied2009 && IsOccupied2015 && IsOccupied2016) |
| | | // { |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // return task; |
| | | // } |
| | | // } |
| | | //} |
| | | } |
| | | } |
| | | catch (Exception ex) |