Commit 0223cd3f LN

D7放料bug修改:D7增加当前库位号上传。

1 个父辈 73b283c3
...@@ -142,14 +142,19 @@ namespace OnlineStore.AssemblyLine ...@@ -142,14 +142,19 @@ namespace OnlineStore.AssemblyLine
str = "出料机构"; str = "出料机构";
} }
if (box != null) if (box != null)
{ {
string posId = "";
if (!String.IsNullOrEmpty(box.CurrPosId))
{
posId = "[" + box.CurrPosId + "]";
}
if ((DateTime.Now - box.LastMsgTime).TotalSeconds < LineServer.ClientKeepSecond) if ((DateTime.Now - box.LastMsgTime).TotalSeconds < LineServer.ClientKeepSecond)
{ {
online = "✔"; online = "✔";
if (box.SAlarmType.Equals(LineAlarmType.None)) if (box.SAlarmType.Equals(LineAlarmType.None))
{ {
lblBox.Text = str+"[" + box.CId.ToString() + "]:" + online + " " + box.ToShowStr(); lblBox.Text = str+"[" + box.CId.ToString() + "]:" + online + " " +posId+ box.ToShowStr();
if (box.SRunStatus.Equals((int)LineRunStatus.Busy)) if (box.SRunStatus.Equals((int)LineRunStatus.Busy))
{ {
lblBox.BackColor = Color.LightGreen; lblBox.BackColor = Color.LightGreen;
...@@ -161,13 +166,13 @@ namespace OnlineStore.AssemblyLine ...@@ -161,13 +166,13 @@ namespace OnlineStore.AssemblyLine
} }
else else
{ {
lblBox.Text = str + "[" + box.CId.ToString() + "]:" + online + " "+box.SAlarmType+" " + box.ToShowStr(); lblBox.Text = str + "[" + box.CId.ToString() + "]:" + online + " " + posId + box.SAlarmType+" " + box.ToShowStr();
lblBox.BackColor = Color.Red; lblBox.BackColor = Color.Red;
} }
} }
else else
{ {
lblBox.Text = str + "[" + box.CId.ToString() + "]:" + online + " " + box.ToShowStr(); lblBox.Text = str + "[" + box.CId.ToString() + "]:" + online + " " + posId + box.ToShowStr();
lblBox.BackColor = Color.Gray; lblBox.BackColor = Color.Gray;
} }
......
...@@ -708,12 +708,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -708,12 +708,17 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_15_SendPosToStore)) else if (MoveInfo.IsStep(LineMoveStep.MI_15_SendPosToStore))
{ {
if (!LineServer.IsInStorePro(DeviceID, MoveInfo.MoveParam.PosId)) string sendPos = posId;
if (MoveInfo.MoveParam.IsNG)
{
sendPos = "";
}
if (!LineServer.IsInStorePro(DeviceID, sendPos))
{ {
string msg = "料仓开始入库"; string msg = "料仓开始入库";
if (OnlyProOutTray) if (OnlyProOutTray)
{ {
msg = "出料机构取料"; msg = "出料机构取料["+ sendPos + "]";
} }
MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore); MoveInfo.NextMoveStep(LineMoveStep.MI_15_SendPosToStore);
InLog("入库 " + MoveInfo.SLog + ",再次通知" + msg + ",等待3000"); InLog("入库 " + MoveInfo.SLog + ",再次通知" + msg + ",等待3000");
......
...@@ -344,9 +344,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -344,9 +344,9 @@ namespace OnlineStore.DeviceLibrary
case LineStatus.InTrouble: case LineStatus.InTrouble:
aa = "故障中"; aa = "故障中";
break; break;
//case LineStatus.OutStoreBoxEnd: case LineStatus.OutStoreBoxEnd:
// aa = "料盘出仓位完成"; aa = "出库执行中";
// break; break;
case LineStatus.OutStoreExecute: case LineStatus.OutStoreExecute:
aa = "出库执行中"; aa = "出库执行中";
break; break;
......
...@@ -15,9 +15,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -15,9 +15,10 @@ namespace OnlineStore.DeviceLibrary
SAlarmType = LineAlarmType.None; SAlarmType = LineAlarmType.None;
HasTray = 0; HasTray = 0;
WaitInStoreList = new List<string>(); WaitInStoreList = new List<string>();
CurrPosId = "";
} }
public BoxInfo(int id,string cid,int seq,int ss,int runs,int hasTray,int alarmType,List<string> inList) public BoxInfo(int id,string cid,int seq,int ss,int runs,int hasTray,int alarmType,List<string> inList,string currPosId)
{ {
this.ID = id; this.ID = id;
CId = cid; CId = cid;
...@@ -28,6 +29,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -28,6 +29,7 @@ namespace OnlineStore.DeviceLibrary
LastMsgTime = DateTime.Now; LastMsgTime = DateTime.Now;
this.HasTray = hasTray; this.HasTray = hasTray;
this.WaitInStoreList = inList; this.WaitInStoreList = inList;
this.CurrPosId = currPosId;
} }
public string ToShowStr() public string ToShowStr()
......
...@@ -99,8 +99,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -99,8 +99,9 @@ namespace OnlineStore.DeviceLibrary
if (runs.Equals(LineRunStatus.Busy)) if (runs.Equals(LineRunStatus.Busy))
{ {
bool isOutP = status.Equals(LineStatus.OutStoreExecute) || status.Equals(LineStatus.OutStoreBoxEnd); bool isOutP = status.Equals(LineStatus.OutStoreExecute) || status.Equals(LineStatus.OutStoreBoxEnd);
bool isNg = (isOutP && String.IsNullOrEmpty(posId) && String.IsNullOrEmpty(box.CurrPosId));
if ((isOutP && box.CurrPosId.Equals(posId)) || if ((isOutP && box.CurrPosId.Equals(posId)) ||
(isOutP && String.IsNullOrEmpty(posId) && String.IsNullOrEmpty(box.CurrPosId)) || isNg ||
box.WaitInStoreList.Contains(posId)) box.WaitInStoreList.Contains(posId))
{ {
return true; return true;
...@@ -452,7 +453,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -452,7 +453,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
int id = storeSMsg.StoreId; int id = storeSMsg.StoreId;
BoxInfo box = new BoxInfo(storeSMsg.StoreId, storeSMsg.Cid, storeSMsg.Seq, storeSMsg.SStatus, storeSMsg.SRunStatus, storeSMsg.DoorHasTray, storeSMsg.AlarmType, storeSMsg.WaitInStoreList); BoxInfo box = new BoxInfo(storeSMsg.StoreId, storeSMsg.Cid, storeSMsg.Seq, storeSMsg.SStatus, storeSMsg.SRunStatus, storeSMsg.DoorHasTray, storeSMsg.AlarmType, storeSMsg.WaitInStoreList,storeSMsg.CurrPosId);
SaveBoxClient(id, box, client ); SaveBoxClient(id, box, client );
string cmd = storeSMsg.Cmd; string cmd = storeSMsg.Cmd;
...@@ -552,6 +553,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -552,6 +553,8 @@ namespace OnlineStore.DeviceLibrary
//public string tShelfI = ""; //public string tShelfI = "";
public List<string> WaitInStoreList = new List<string>(); public List<string> WaitInStoreList = new List<string>();
public InOutData data = null; public InOutData data = null;
public string CurrPosId = "";
} }
public class InOutData public class InOutData
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!