|
@@ -74,7 +74,7 @@ namespace WCS.WorkEngineering.Extensions
|
|
|
/// 入库站点是否被禁止
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public static void 入库站点是否被禁止(this Device<IStation520, IStation521, IStation523, IStation91> device)
|
|
|
+ public static void 入库站点是否被禁止(this Device<IStation520, IStation521, IStation523> device)
|
|
|
{
|
|
|
var config = RedisHub.Default.Check("ForbidTubuEnter") ?? throw new Exception("请在Redis中配置入库口禁用");
|
|
|
var configs = config.Split(",");
|
|
@@ -92,6 +92,17 @@ namespace WCS.WorkEngineering.Extensions
|
|
|
if (configs.Contains(device.Entity.Code)) throw new KnownException("当前入库口已被禁用,请联系运维人员了解具体情况", LogLevelEnum.High);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 入库站点是否被禁止
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static void 入库站点是否被禁止(this Device<IStation520, IStation521, IStation523, IStation91> device)
|
|
|
+ {
|
|
|
+ var config = RedisHub.Default.Check("ForbidTubuEnter") ?? throw new Exception("请在Redis中配置入库口禁用");
|
|
|
+ var configs = config.Split(",");
|
|
|
+ if (configs.Contains(device.Entity.Code)) throw new KnownException("当前入库口已被禁用,请联系运维人员了解具体情况", LogLevelEnum.High);
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 入库站点是否被禁止
|
|
|
/// </summary>
|
|
@@ -107,7 +118,7 @@ namespace WCS.WorkEngineering.Extensions
|
|
|
/// 入库站点是否满足执行条件
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public static void 入库站点是否满足执行条件(this Device<IStation520, IStation521, IStation523, IStation91> device)
|
|
|
+ public static void 入库站点是否满足执行条件(this Device<IStation520, IStation521, IStation523> device)
|
|
|
{
|
|
|
if (device.Data.VoucherNo != device.Data2.VoucherNo) throw new KnownException($"凭证号不一致,DB520:{device.Data.VoucherNo}-DB521:{device.Data2.VoucherNo}", LogLevelEnum.High);
|
|
|
if (device.Data3.Status.HasFlag(StationStatus.Run)) throw new KnownException("设备运行中", LogLevelEnum.Low);
|
|
@@ -129,6 +140,19 @@ namespace WCS.WorkEngineering.Extensions
|
|
|
if (!device.Data3.Status.HasFlag(StationStatus.OT_Status)) throw new KnownException("站台货物信息与实际占用不一致", LogLevelEnum.Low);
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 入库站点是否满足执行条件
|
|
|
+ /// </summary>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static void 入库站点是否满足执行条件(this Device<IStation520, IStation521, IStation523, IStation91> device)
|
|
|
+ {
|
|
|
+ if (device.Data.VoucherNo != device.Data2.VoucherNo) throw new KnownException($"凭证号不一致,DB520:{device.Data.VoucherNo}-DB521:{device.Data2.VoucherNo}", LogLevelEnum.High);
|
|
|
+ if (device.Data3.Status.HasFlag(StationStatus.Run)) throw new KnownException("设备运行中", LogLevelEnum.Low);
|
|
|
+ if (device.Data3.Status.HasFlag(StationStatus.PH_Status) && device.Data2.Request == 0) throw new KnownException("有光电无请求", LogLevelEnum.Mid);
|
|
|
+ if (!device.Data3.Status.HasFlag(StationStatus.PH_Status) && device.Data2.Request == 1) throw new KnownException("无光电有请求", LogLevelEnum.Mid);
|
|
|
+ if (!device.Data3.Status.HasFlag(StationStatus.OT_Status)) throw new KnownException("站台货物信息与实际占用不一致", LogLevelEnum.Low);
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 入库站点是否满足执行条件
|
|
|
/// </summary>
|