Commit 18ded2b3 LN

增加报警提示

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