Commit 9272cfa7 张东亮

1

1 个父辈 98fa3faa
...@@ -198,14 +198,14 @@ namespace BLL ...@@ -198,14 +198,14 @@ namespace BLL
{ {
string value = string.Format("在仓储等待离开信号超时{0:F}分钟", tt); string value = string.Format("在仓储等待离开信号超时{0:F}分钟", tt);
DisplayBoard.Add(name, "lineAgv." + name + ".StandTimeOut", value, 0); DisplayBoard.Add(name, "lineAgv." + name + ".StandTimeOut", value, 0);
Common.log.Info(agv.Name + " 上传报告 " + value); Common.log.Debug(agv.Name + " 上传报告 " + value);
agv.LogJson.SetErrorStart(agv.TaskName, value); agv.LogJson.SetErrorStart(agv.TaskName, value);
} }
else else
{ {
string value = string.Format("在去{0}途中停留超时{1:F}分钟,{2}", agv.Place, tt, agv.MissionText); string value = string.Format("在去{0}途中停留超时{1:F}分钟,{2}", agv.Place, tt, agv.MissionText);
DisplayBoard.Add(name, "lineAgv." + name + ".StandTimeOut", value, 0); DisplayBoard.Add(name, "lineAgv." + name + ".StandTimeOut", value, 0);
Common.log.Info(agv.Name + " 上传报告 " + value); Common.log.Debug(agv.Name + " 上传报告 " + value);
agv.LogJson.SetErrorStart(agv.TaskName, value); agv.LogJson.SetErrorStart(agv.TaskName, value);
} }
} }
......
...@@ -50,17 +50,19 @@ namespace BLL ...@@ -50,17 +50,19 @@ namespace BLL
public Result StorageGet(string place) public Result StorageGet(string place)
{ {
Common.log.Info("storage[GET] place=" + place); Result result = Storage(place);
return Storage(place); Common.log.Info($"storage[GET] place={place},{result.Msg}");
return result;
} }
public Result StoragePost(Stream info) public Result StoragePost(Stream info)
{ {
StreamReader sr = new StreamReader(info); StreamReader sr = new StreamReader(info);
string s = sr.ReadToEnd(); string s = sr.ReadToEnd();
Common.log.Info("storage[POST] " + s);
s = s.ToLower().Replace("place=", ""); s = s.ToLower().Replace("place=", "");
return Storage(s); Result result = Storage(s);
Common.log.Info($"storage[POST] {s},{result.Msg}");
return result;
} }
...@@ -68,7 +70,7 @@ namespace BLL ...@@ -68,7 +70,7 @@ namespace BLL
private Result TakeOld(string place) private Result TakeOld(string place)
{ {
Result res = new Result(); Result res = new Result();
try try
{ {
place = place.ToUpper(); place = place.ToUpper();
...@@ -96,7 +98,7 @@ namespace BLL ...@@ -96,7 +98,7 @@ namespace BLL
private Result SendNew(string from, string place) private Result SendNew(string from, string place)
{ {
Result res = new Result(); Result res = new Result();
try try
{ {
from = from.ToUpper(); from = from.ToUpper();
...@@ -127,10 +129,11 @@ namespace BLL ...@@ -127,10 +129,11 @@ namespace BLL
private Result Storage(string place) private Result Storage(string place)
{ {
Result res = new Result(); Result res = new Result();
try try
{ {
place = place.ToUpper(); place = place.ToUpper();
string agv = FindAgv();
if (place == Common.STORAGE_ENTER_4C.ToUpper()) if (place == Common.STORAGE_ENTER_4C.ToUpper())
{ {
res.Msg = "OK,4C"; res.Msg = "OK,4C";
...@@ -143,19 +146,42 @@ namespace BLL ...@@ -143,19 +146,42 @@ namespace BLL
} }
else if (place == Common.STORAGE_LEAVE.ToUpper()) else if (place == Common.STORAGE_LEAVE.ToUpper())
{ {
SteelManage.StorageWorkAdd(place); if (!string.IsNullOrEmpty(agv))
{
SteelManage.StorageWorkAdd(place);
res.Msg = "OK," + agv;
}
else
{
res.Msg = "NG," + agv;
}
} }
else if (place == Common.STORAGE_IO_ON.ToUpper()) else if (place == Common.STORAGE_IO_ON.ToUpper())
{ {
Common.StorageDockFinish = true; Common.StorageDockFinish = true;
UpdateStorageIO(); UpdateStorageIO();
res.Msg = "OK," + FindAgv(); if (string.IsNullOrEmpty(agv))
{
res.Msg = "NG," + agv;
}
else
{
res.Msg = "OK," + agv;
}
} }
else if (place == Common.STORAGE_IO_OFF.ToUpper()) else if (place == Common.STORAGE_IO_OFF.ToUpper())
{ {
Common.StorageDockFinish = false; Common.StorageDockFinish = false;
UpdateStorageIO(); UpdateStorageIO();
res.Msg = "OK," + FindAgv(); if (string.IsNullOrEmpty(agv))
{
res.Msg = "NG," + agv;
}
else
{
res.Msg = "OK," + agv;
}
} }
else else
{ {
......
此文件类型无法预览
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!