液晶标签协议对接!

This commit is contained in:
hehaibing-1996
2024-12-09 19:40:05 +08:00
parent a37918a95d
commit 1c2a34256e
11 changed files with 460 additions and 621 deletions

View File

@ -27,26 +27,27 @@ namespace WCS.BLL.HardWare
ClientIp = shelfInfo.ClientIp;
LightId = shelfInfo.LightId;
WarningLight = new WarningLight() { LightId = shelfInfo.LightId };
ShelfTypeName = shelfInfo.ShelfTypeName;
//初始化Module
Task.Run(() =>
{
var modules = DbHelp.db.Queryable<ModuleInfo>().Where(t => t.ShelfId == ShelfId).ToList();
foreach (var module in modules)
{
Modules.Add(new SmartShelfModule()
var modules = DbHelp.db.Queryable<ModuleInfo>().Where(t => t.ShelfId == ShelfId).ToList();
foreach (var module in modules)
{
ModuleId = module.Id,
ModuleCode = module.ModuleCode,
BoardId = module.BoardId,
IsEnable = module.IsEnable,
CurrentMode = module.CurrentMode
});
}
ModulesStr = string.Join(";", Modules.Select(t => t.ModuleCode));
Modules.Add(new SmartShelfModule()
{
ModuleId = module.Id,
ModuleCode = module.ModuleCode,
BoardId = module.BoardId,
IsEnable = module.IsEnable,
CurrentMode = module.CurrentMode
});
}
ModulesStr = string.Join(";", Modules.Select(t => t.ModuleCode));
ModuleIds = Modules.Select(t => t.BoardId).ToList();
});
ModuleIds = Modules.Select(t => t.BoardId).ToList();
});
}
@ -113,6 +114,9 @@ namespace WCS.BLL.HardWare
public string WebSocketIpAddress { get; set; } = "127.0.0.2";
public string OutOperateUser { get; set; } = string.Empty;
public List<MXL4ShelfModule> MXL4Modules { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public string ShelfTypeName { get; set; }
#region
public void GoInInstore(string? IPAddress)
{
@ -337,7 +341,7 @@ namespace WCS.BLL.HardWare
if (module.CurrentOutSns == null || module.CurrentOutSns.Count == 0)
{
Logs.Write($"GoInOutstoreByModule货架【{ShelfCode}】,模组【{module.ModuleCode}】,不存在需要继续出的物料,给其复位。", LogsType.Outstore);
//不需要这个模组继续亮灯了
module.GoOutOutStoreMode(TcpCleint);
Thread.Sleep(400);
@ -1467,11 +1471,7 @@ namespace WCS.BLL.HardWare
SolvedGuids = warnings.Select(t => t.Guid).ToList(),
};
WarningManager.SendWarning(warningModel);
//自动消除本地缓存的报警
warnings.ForEach(warning =>
{
WarningManager.ClearWarning(warning, SolveTypeEnum.);
});
ProcessingExceptions.RemoveAll(t => t.BoardId == boardId);
}
@ -2140,12 +2140,6 @@ namespace WCS.BLL.HardWare
SolvedGuids = warnings.Select(t => t.Guid).ToList(),
};
WarningManager.SendWarning(warningModel);
//自动消除本地缓存的报警
warnings.ForEach(warning =>
{
Logs.Write($"ClearWarning,{warning.Guid}", LogsType.Outstore);
WarningManager.ClearWarning(warning, SolveTypeEnum.);
});
ProcessingExceptions.RemoveAll(t => t.BoardId == boardId);
}
break;