Commit a0d0cea9 LN

增加报警提示

1 个父辈 1747cc6c
......@@ -506,7 +506,7 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W009_BoxCanInstore))
{
int storeId = moveInfo.MoveParam.GetStoreId();
wait.IsEnd = LineServer.BoxCanReviceTray(storeId);
wait.IsEnd = LineServer.BoxCanReviceTray(storeId,out NotOkMsg);
}
else
{
......
......@@ -157,7 +157,7 @@ namespace OnlineStore.DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W009_BoxCanInstore))
{
int storeId = checkWaitInfo.MoveParam.GetStoreId();
wait.IsEnd = LineServer.BoxCanReviceTray(storeId);
wait.IsEnd = LineServer.BoxCanReviceTray(storeId,out NotOkMsg);
}
else if (wait.WaitType.Equals(WaitEnum.W010_SWCanTopUp))
{
......
......@@ -122,12 +122,29 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public static bool BoxCanReviceTray(int id)
public static bool BoxCanReviceTray(int id, out string NotOkMsg)
{
NotOkMsg = " [料仓" + id + "可以入库:离线] ";
BoxInfo box = GetBoxInfo(id);
if (box != null)
{
TimeSpan span = DateTime.Now - box.LastMsgTime;
if (span.TotalSeconds > ClientKeepSecond)
{
NotOkMsg = " [料仓" + id + "可以入库:离线] ";
return false;
}
else if (!box.HasTray.Equals(0))
{
NotOkMsg = " [料仓" + id + "可以入库:仓门口有料] ";
return false;
}
else if (!box.SAlarmType.Equals(LineAlarmType.None))
{
NotOkMsg = " [料仓" + id + "可以入库:报警中] ";
return false;
}
if (span.TotalSeconds < ClientKeepSecond && box.HasTray.Equals(0) && box.SAlarmType.Equals(LineAlarmType.None))
{
LineRunStatus runs = (LineRunStatus)box.SRunStatus;
......@@ -136,6 +153,10 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
else
{
NotOkMsg = " [料仓" + id + "可以入库:忙碌中] ";
}
}
}
return false;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!