Example #1
0
        /// <summary>
        /// 倒库专用:找到上砖摆渡轨道
        /// </summary>
        /// <param name="trans"></param>
        /// <returns></returns>
        public List <uint> GetFerryTrackSortIds(StockTrans trans, bool istrackid)
        {
            List <uint>       list   = new List <uint>();
            List <AreaDevice> ferrys = AreaDevList.FindAll(c => c.area_id == trans.area_id && c.DevType == DeviceTypeE.摆渡);

            if (ferrys != null && ferrys.Count > 0)
            {
                foreach (AreaDevice device in ferrys)
                {
                    if (AreaDevTraList.Exists(c => c.device_id == device.device_id &&
                                              c.area_id == device.area_id &&
                                              c.track_id == trans.give_track_id))
                    {
                        if (istrackid)
                        {
                            uint trackid = PubMaster.Device.GetFerryTrackId(device.device_id);
                            if (trackid > 0)
                            {
                                list.Add(trackid);
                            }
                        }
                        else
                        {
                            list.Add(device.device_id);
                        }
                    }
                }
            }

            return(list);
        }
Example #2
0
 public List <AreaDevice> GetAreaDevList(uint area_id)
 {
     return(AreaDevList.FindAll(c => c.area_id == area_id));
 }
Example #3
0
 public List <AreaDevice> GetAreaDevList(uint area_id, DeviceTypeE devtype)
 {
     return(AreaDevList.FindAll(c => c.area_id == area_id && c.DevType == devtype));
 }
Example #4
0
 public List <AreaDevice> GetAreaDevListWithType(DeviceTypeE devtype)
 {
     return(AreaDevList.FindAll(c => c.DevType == devtype));
 }