Commit d48ce3bf 张东亮

优化显示信息

1 个父辈 e2a05607
...@@ -261,7 +261,7 @@ namespace AGVControl ...@@ -261,7 +261,7 @@ namespace AGVControl
} }
if (MessageBox.Show("确定删除产线任务[" + cmbBoxLineName.SelectedItem.ToString() + "]", "手动删除解绑任务", MessageBoxButtons.YesNo) == DialogResult.No) if (MessageBox.Show("确定删除产线任务[" + cmbBoxLineName.SelectedItem.ToString() + "]", "手动删除解绑任务", MessageBoxButtons.YesNo) == DialogResult.No)
return; return;
if (txtRfid.Text.ToUpper().StartsWith("D") || txtRfid.Text.ToUpper().StartsWith("C")) // if (txtRfid.Text.ToUpper().StartsWith("D") || txtRfid.Text.ToUpper().StartsWith("C"))
{ {
int idx = AGVManager.nodeInfo.FindIndex(s => s.AliceName.Equals(cmbBoxLineName.SelectedItem.ToString())); int idx = AGVManager.nodeInfo.FindIndex(s => s.AliceName.Equals(cmbBoxLineName.SelectedItem.ToString()));
if (idx > -1) if (idx > -1)
......
...@@ -128,7 +128,7 @@ namespace DeviceLibrary ...@@ -128,7 +128,7 @@ namespace DeviceLibrary
LogUtil.info(string.Format("{0} Add_Mission [{1}] Fail", agv.Name, taskName)); LogUtil.info(string.Format("{0} Add_Mission [{1}] Fail", agv.Name, taskName));
} }
} }
agv.StateKanban.SetCurTask(MissionSys.GetAliceNameByTaskName(taskName)+"\r\n"+agv.CurTaskID); agv.StateKanban.SetCurTask(MissionSys.GetAliceNameByTaskName(taskName) + "\r\n" + agv.CurTaskID);
} }
return rtn; return rtn;
} }
...@@ -157,7 +157,8 @@ namespace DeviceLibrary ...@@ -157,7 +157,8 @@ namespace DeviceLibrary
/// <returns></returns> /// <returns></returns>
public static bool CheckTaskFinished(Agv_Info agv, string taskName, string curTaskState) public static bool CheckTaskFinished(Agv_Info agv, string taskName, string curTaskState)
{ {
LogUtil.debug(agv.Name + " 检查当前任务是否结束: " + taskName + " " + curTaskState); if (GetMissionGuidByTaskName(taskName).Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done))
LogUtil.info(agv.Name + " " + taskName + " " + curTaskState);
return GetMissionGuidByTaskName(taskName).Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done); return GetMissionGuidByTaskName(taskName).Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done);
} }
/// <summary> /// <summary>
......
...@@ -238,9 +238,9 @@ namespace DeviceLibrary ...@@ -238,9 +238,9 @@ namespace DeviceLibrary
&& (s.StateEquals(eNodeStatus.NeedD) || s.StateEquals(eNodeStatus.NeedEnter)) && s.IsUse); && (s.StateEquals(eNodeStatus.NeedD) || s.StateEquals(eNodeStatus.NeedEnter)) && s.IsUse);
if (tarIdx > -1) if (tarIdx > -1)
{ {
//tarIdx = agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is EmptyShelfBackJob tarIdx = agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is EmptyShelfBackJob
//&& ((((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace) != null) && ((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace.Equals(SettingString.A5)); && ((((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace) != null) && ((EmptyShelfBackJob)s.CurJob).EmptyShelfTargetPlace.Equals(SettingString.A5));
//if (tarIdx == -1) if (tarIdx == -1)
{ {
nodeName = SettingString.A5; nodeName = SettingString.A5;
log.Debug(string.Format("{0} {1}需要小料架", agv.Name, SettingString.A5)); log.Debug(string.Format("{0} {1}需要小料架", agv.Name, SettingString.A5));
...@@ -693,13 +693,13 @@ namespace DeviceLibrary ...@@ -693,13 +693,13 @@ namespace DeviceLibrary
{ {
if (clientNode.Name.Equals(SettingString.RoomCFeederOut) || clientNode.Name.Equals(SettingString.RoomDFeederOut)) if (clientNode.Name.Equals(SettingString.RoomCFeederOut) || clientNode.Name.Equals(SettingString.RoomDFeederOut))
{ {
warnMsg = string.Format("线体[{0}]外侧料架[{1}]未解绑,已解绑料架:{2}", clientNode.AliceName, clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray())); warnMsg = string.Format("佳世达线体[{0}]外侧料架[{1}]未解绑,已解绑料架:{2}", clientNode.AliceName, clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray()));
log.Debug(warnMsg); log.Debug(warnMsg);
} }
else else
{ {
string res = HttpManager.GetRFIDs(clientNode.LineName); string res = HttpManager.GetRFIDs(clientNode.LineName);
warnMsg = string.Format("线体[{0}]外侧料架[{1}]未解绑,已解绑料架:{2}", clientNode.AliceName, clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray())); warnMsg = string.Format("佳世达线体[{0}]外侧料架[{1}]未解绑,已解绑料架:{2}", clientNode.AliceName, clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray()));
log.Debug(warnMsg); log.Debug(warnMsg);
} }
return false; return false;
...@@ -721,13 +721,13 @@ namespace DeviceLibrary ...@@ -721,13 +721,13 @@ namespace DeviceLibrary
{ {
if (clientNode.Name.Equals(SettingString.RoomCFeederOut) || clientNode.Name.Equals(SettingString.RoomDFeederOut)) if (clientNode.Name.Equals(SettingString.RoomCFeederOut) || clientNode.Name.Equals(SettingString.RoomDFeederOut))
{ {
clientNode.WarnMsg = string.Format("外侧料架[{0}]未解绑,已解绑料架:{1}", clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray())); clientNode.WarnMsg = string.Format("佳世达外侧料架[{0}]未解绑,已解绑料架:{1}", clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray()));
return false; return false;
} }
else else
{ {
string res = HttpManager.GetRFIDs(clientNode.LineName); string res = HttpManager.GetRFIDs(clientNode.LineName);
clientNode.WarnMsg = string.Format("外侧料架[{0}]未解绑,已解绑料架:{1}", clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray())); clientNode.WarnMsg = string.Format("佳世达外侧料架[{0}]未解绑,已解绑料架:{1}", clientNode.RFID, string.Join(",", unlockManager.GetUnlockRfids(clientNode.Name).ToArray()));
return false; return false;
} }
} }
......
...@@ -75,23 +75,23 @@ namespace DeviceLibrary ...@@ -75,23 +75,23 @@ namespace DeviceLibrary
} }
else else
{ {
res = new Result() { Succeed = true, ResultData = rfid, ErrorMessage = "" }; res = new Result() { Succeed = true, ResultData = rfid.Trim().ToUpper(), ErrorMessage = "" };
Log.Debug(string.Format("Unlock Request(POST) [emptyStation={0},rfid={1}]", emptyStation, rfid.ToUpper())); Log.Debug(string.Format("Unlock Request(POST) [emptyStation={0},rfid={1}]", emptyStation, rfid.Trim().ToUpper()));
if (!AGVManager.unlockManager.AddMission(value, rfid.ToUpper())) if (!AGVManager.unlockManager.AddMission(value, rfid.Trim().ToUpper()))
{ {
if(rfid.Equals("")) if(rfid.Equals(""))
{ {
Log.Error(string.Format("添加空架任务失败 节点[{0}] RFID=null", value)); Log.Error(string.Format("添加空架任务失败 节点[{0}] RFID=null", value));
res = new Result() { Succeed = false, ResultData = "true", ErrorMessage = "CreateEmptyRecycleTask failed: emptyStation=" + emptyStation + " rfid=" + rfid }; res = new Result() { Succeed = false, ResultData = "true", ErrorMessage = "CreateEmptyRecycleTask failed: emptyStation=" + emptyStation + " rfid=" + rfid.Trim().ToUpper() };
} }
else else
{ {
Log.Error(string.Format("添加空架任务失败 节点[{0}]RFID={1} 重复", value,rfid.ToUpper())); Log.Error(string.Format("添加空架任务失败 节点[{0}]RFID={1} 重复", value,rfid.Trim().ToUpper()));
res = new Result() { Succeed = false, ResultData = "true", ErrorMessage = "CreateEmptyRecycleTask failed due it has been created: emptyStation=" + emptyStation + " rfid=" + rfid}; res = new Result() { Succeed = false, ResultData = "true", ErrorMessage = "CreateEmptyRecycleTask failed due it has been created: emptyStation=" + emptyStation + " rfid=" + rfid.Trim().ToUpper()};
} }
} }
else else
Log.Info("任务[POST]:" + value + " 出空料架 [location=" + emptyStation + ",rfid=" + rfid.ToUpper() + "]"); Log.Info("任务[POST]:" + value + " 出空料架 [location=" + emptyStation + ",rfid=" + rfid.Trim().ToUpper() + "]");
} }
// AGVControl.Common.log.Debug("WebService POST Response OK"); // AGVControl.Common.log.Debug("WebService POST Response OK");
} }
...@@ -117,16 +117,16 @@ namespace DeviceLibrary ...@@ -117,16 +117,16 @@ namespace DeviceLibrary
} }
if (AGVManager.GetNodeNameByLineName(line, out string value)) if (AGVManager.GetNodeNameByLineName(line, out string value))
{ {
Log.Debug(string.Format("Unlock Request(GET) [emptyStation={0},rfid={1}]", line, RFID.ToUpper())); Log.Debug(string.Format("Unlock Request(GET) [emptyStation={0},rfid={1}]", line, RFID.Trim().ToUpper()));
if (!AGVManager.unlockManager.AddMission(value,RFID.ToUpper())) if (!AGVManager.unlockManager.AddMission(value,RFID.Trim().ToUpper()))
{ {
Log.Error(string.Format("添加空架任务失败 节点[{0}]RFID={1} 重复/RFID为空", value, RFID.ToUpper())); Log.Error(string.Format("添加空架任务失败 节点[{0}]RFID={1} 重复/RFID为空", value, RFID.Trim().ToUpper()));
res = new Result() { Succeed = false, ResultData = "true", ErrorMessage = "CreateEmptyRecycleTask failed due it has been created or rfid=null: emptyStation=" + line + " rfid=" + RFID }; res = new Result() { Succeed = false, ResultData = "true", ErrorMessage = "CreateEmptyRecycleTask failed due it has been created or rfid=null: emptyStation=" + line + " rfid=" + RFID.Trim().ToUpper() };
} }
else else
{ {
res = new Result() { Succeed = true, ResultData = RFID, ErrorMessage = "" }; res = new Result() { Succeed = true, ResultData = RFID.Trim(), ErrorMessage = "" };
Log.Info("任务[GET]:" + value + " 出空料架 [emptyStation=" + line + ",rfid=" + RFID.ToUpper() + "]"); Log.Info("任务[GET]:" + value + " 出空料架 [emptyStation=" + line + ",rfid=" + RFID.Trim().ToUpper() + "]");
} }
} }
else else
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!