添加单灯调试

This commit is contained in:
hehaibing-1996
2024-06-25 13:48:57 +08:00
parent 7f35077c07
commit 7228b74cb5
8 changed files with 211 additions and 68 deletions

View File

@ -136,11 +136,17 @@ namespace WCS.BLL.HardWare
//清空错误
ExceptionMessages.Clear();
ProcessingExceptions.Clear();
this.IsWarning = false; //清空报警状态以免报警后 处理了异常后续无法亮灯
//货架所有模组发送指令进入入库模式
Logs.Write($"货架{ShelfCode}开始发送指令进入入库模式", LogsType.Instore);
foreach (var module in Modules.Where(t => t.IsEnable).ToList())
{
Logs.Write($"货架{ShelfCode}模组【{module.ModuleCode}】发送指令进入入库模式", LogsType.Instore);
module.GoInInstoreMode(TcpCleint);
}
Logs.Write($"货架{ShelfCode}指令发送完毕", LogsType.Instore);
//延时获取异常
var timeOut = 3000;
var timeSpan = TimeSpan.FromMilliseconds(0);
@ -178,7 +184,7 @@ namespace WCS.BLL.HardWare
if (notInstoreList.Count > 0)
{
Logs.Write($"货架{ShelfCode}存在模组未进入入库模式", LogsType.Instore);
foreach (var item in notInstoreList)
{
ExceptionMessages.Add($"模组{item.ModuleCode}未进入入库模式!");
@ -205,6 +211,7 @@ namespace WCS.BLL.HardWare
}
//没有报警才亮蓝灯
Logs.Write($"货架{ShelfCode}IsWarning现在为{IsWarning}", LogsType.Instore);
if (!IsWarning)
WarningLight.BlueLight(TcpCleint);
//绑定当前进入入库PDA/WCS前端的IP
@ -399,7 +406,7 @@ namespace WCS.BLL.HardWare
else
{
//剩余物料全出
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},剩余物料灯全亮!", LogsType.Outstore);
Logs.Write($"GoInOutstoreByModule发料单{OrderNumber},剩余所有物料灯全亮(发送命令)", LogsType.Outstore);
}
var shelfIds = outOrderMatDetails.Select(t => t.StoreInfo.ShelfId)
@ -1117,9 +1124,11 @@ namespace WCS.BLL.HardWare
ClientIp = WebSocketIpAddress
};
WarningManager.SendWarning(warningModel);
this.IsWarning = true;
#endregion
Logs.Write($"货架【{ShelfCode},模组{module}发现物料丢失,开始发送红灯】", LogsType.Instore);
WarningLight.WaringLightAlwaysRed(TcpCleint);
Logs.Write($"货架【{ShelfCode},模组{module}发现物料丢失,发送红灯完成】", LogsType.Instore);
}
//库位未配置、返回数据异常
else
@ -1151,9 +1160,11 @@ namespace WCS.BLL.HardWare
ClientIp = WebSocketIpAddress
};
WarningManager.SendWarning(warningModel);
this.IsWarning = true;
#endregion
Logs.Write($"货架【{ShelfCode},模组{module}发现物料未扫描上架,开始发送红灯】", LogsType.Instore);
WarningLight.WaringLightAlwaysRed(TcpCleint);
Logs.Write($"货架【{ShelfCode},模组{module}发现物料未扫描上架,发送红灯完成】", LogsType.Instore);
}
else
{
@ -1809,7 +1820,7 @@ namespace WCS.BLL.HardWare
else
{
//剩余物料全出
Logs.Write($"发料单{OrderNumber},剩余物料灯全亮!", LogsType.Outstore);
Logs.Write($"发料单{OrderNumber},剩余所有物料灯全亮(发送命令)", LogsType.Outstore);
}
var shelfIds = outOrderMatDetails.Select(t => t.StoreInfo.ShelfId)