using ServiceCenter.Logs; using ServiceCenter.Redis; using WCS.Core; using WCS.Entity.Protocol.Station; namespace WCS.WorkEngineering.Extensions { public class Station : Device { public Station(Device device, World world) : base(device, world) { } /// /// 入库站点是否被禁止 /// /// public void StorageStationIsForbid() { var config = RedisHub.Default.Check("ForbidTubuEnter") ?? throw new Exception("请在Redis中配置互斥量值"); var configs = config.Split(","); if (configs.Contains(Entity.Code)) throw new KnownException("当前入库口已被禁用,请联系运维人员了解具体情况", LogLevelEnum.High); } } }