StationExtension.cs 769 B

123456789101112131415161718192021222324
  1. using ServiceCenter.Redis;
  2. using WCS.Core;
  3. using WCS.Entity.Protocol.Station;
  4. using WCS.WorkEngineering.Worlds.Logs;
  5. namespace WCS.WorkEngineering.Extensions
  6. {
  7. public class Station : Device<IStation520, IStation521, IStation523>
  8. {
  9. public Station(Device device, World world) : base(device, world)
  10. {
  11. }
  12. /// <summary>
  13. /// 入库站点是否被禁止
  14. /// </summary>
  15. /// <returns></returns>
  16. public void StorageStationIsForbid()
  17. {
  18. var config = RedisHub.Default.Get("ForbidTubuEnter").Split(",");
  19. if (config.Contains(Entity.Code)) throw new KnownException("当前入库口已被禁用,请联系运维人员了解具体情况", LogLevelEnum.High);
  20. }
  21. }
  22. }