Commit 99a09c7a LN

料盘高度改为配置,移栽放料逻辑修改

1 个父辈 b8691c9e
......@@ -63,6 +63,7 @@
<add key="UseHCBoard" value="1" />
<add key="ShowIOForm" value="0" />
<add key="RfidServer_Port" value="12001" />
<add key ="TrayHeightList" value ="8;12;16;20;24;28;36;48"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -100,5 +100,8 @@ namespace OnlineStore.Common
public static string ConfigPath_TrayList = "ConfigPath_TrayList";
public static string DisTraySave = "DisTraySave";
public static string TrayHeightList = "TrayHeightList";
}
}
......@@ -726,7 +726,7 @@ namespace OnlineStore.DeviceLibrary
int num = MoveInfo.MoveParam.TrayNumber;
MoveInfo.NextMoveStep(LineMoveStep.MI_08_WaitBox);
LogInfo("入库【" + posId + "】 " + MoveInfo.SLog + ": 物品已移走,更新托盘【" + num + "】为空盘,删除入库任务");
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanReviceTray());
MoveInfo.WaitList.Add(WaitResultInfo.WaitBoxCanInstore());
TrayManager.UpdateTrayInfo(num);
RemoveInStore(MoveInfo.MoveParam);
if (OnlyProOutTray)
......
......@@ -253,9 +253,33 @@ namespace OnlineStore.DeviceLibrary
}
}
private static List<int> trayHeightList = new List<int>() { 8, 12, 16, 20, 24, 28, 36, 48 };
private static List<int> trayHeightList = new List<int>();
public static List<int> GetTrayList()
{
if (trayHeightList.Count <= 0)
{
string config = ConfigAppSettings.GetValue(Setting_Init.TrayHeightList);
string[] array = config.Split(';');
foreach (string s in array)
{
try
{
int v = Convert.ToInt32(s.Trim());
if (v > 0)
{
trayHeightList.Add(v);
}
}
catch (Exception ex)
{
}
}
if (trayHeightList.Count <= 0)
{
trayHeightList = new List<int>() { 8, 12, 16, 20, 24, 28, 36, 48 };
}
}
return trayHeightList;
}
}
......
......@@ -255,13 +255,13 @@ namespace OnlineStore.DeviceLibrary
return wait;
}
public static WaitResultInfo WaitCanInstore()
{
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = WaitEnum.W008_InStoreCheckOK;
return wait;
}
public static WaitResultInfo WaitBoxCanReviceTray( )
//public static WaitResultInfo WaitCanInstore()
//{
// WaitResultInfo wait = new WaitResultInfo();
// wait.WaitType = WaitEnum.W008_InStoreCheckOK;
// return wait;
//}
public static WaitResultInfo WaitBoxCanInstore( )
{
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = WaitEnum.W009_BoxCanInstore;
......
......@@ -141,6 +141,7 @@ namespace OnlineStore.DeviceLibrary
if (box != null)
{
LineRunStatus runs = (LineRunStatus)box.SRunStatus;
LineStatus movestatus = (LineStatus)box.SStatus;
TimeSpan span = DateTime.Now - box.LastMsgTime;
if (span.TotalSeconds > ClientKeepSecond)
{
......@@ -168,6 +169,14 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
else if (runs.Equals(LineRunStatus.Busy) && movestatus.Equals(LineStatus.OutStoreBoxEnd))
{
return true;
}
else
{
NotOkMsg = $" [料仓{id}{str}:忙碌中] ";
}
}
else
{
......@@ -180,6 +189,10 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
else if (runs.Equals(LineRunStatus.Busy) && movestatus.Equals(LineStatus.InStoreEnd))
{
return true;
}
else
{
NotOkMsg = $" [料仓{id}{str}:忙碌中] ";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!