Commit c9f08061 LN

taskCount修改。bug修改

1 个父辈 4c2365c5
......@@ -943,12 +943,18 @@ namespace OnlineStore.DeviceLibrary
}
else
{
string msg = StoreManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, CurrShelfID + "@" + posLoc.ToString());
int newTaskCount = 0;
string msg = StoreManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, CurrShelfID + "@" + posLoc.ToString(),out newTaskCount);
if (String.IsNullOrEmpty(msg).Equals(false))
{
LogUtil.error(Name + "【" + MoveInfo.MoveParam.WareCode + "】【" + CurrShelfID + "】【" + posLoc + "】UpdateTrayLoc 结果:" + msg);
serverShelfData = null;
}
if(newTaskCount> MoveInfo.MoveParam.taskCount)
{
InOutStoreLog("UpdateTrayLoc 返回 newTaskCount="+ newTaskCount+ ",原有 taskCount="+ MoveInfo.MoveParam.taskCount + ",使用新数据");
MoveInfo.MoveParam.taskCount = newTaskCount;
}
}
});
}
......
......@@ -329,8 +329,9 @@ namespace OnlineStore.DeviceLibrary
/// 地址: /rest/api/qisda/device/updateLocInfo
/// </summary>
private static string Addr_updateLocInfo = "/rest/api/qisda/device/updateLocInfo";
public static string UpdateTrayLoc(string deviceName, string barcode, string locInfo)
public static string UpdateTrayLoc(string deviceName, string barcode, string locInfo,out int taskCount)
{
taskCount = 0;
string msg = "";
try
{
......@@ -354,8 +355,18 @@ namespace OnlineStore.DeviceLibrary
}
else if (serverResult.code.Equals(0).Equals(false))
{
if (serverResult.data != null && (String.IsNullOrEmpty(serverResult.data.taskCount).Equals(false)))
{
try
{
taskCount = Convert.ToInt32(serverResult.data.taskCount);
}catch(Exception ex)
{
}
}
// code: 0为正常,其他为异常, msg: 消息, data: 为空
msg = deviceName + " UpdateTrayLoc【 " + barcode + "】【" + "INSHELF" + "】【" + locInfo + "】 :" + "[" + serverResult.code + "]" + serverResult.msg;
msg = deviceName + " UpdateTrayLoc【 " + barcode + "】【" + "INSHELF" + "】【" + locInfo + "】 :" + "[" + serverResult.code + "]" + serverResult.msg+ ",taskCount="+ taskCount;
}
if (!msg.Equals(""))
{
......@@ -463,7 +474,7 @@ namespace OnlineStore.DeviceLibrary
public class ServerData
{
//{"code":0,"msg":"ok","data":"7"}
//返回: {"code": 0, "msg":"ok", "data":{"rfid":"xxx","smallEmpty":0,"bigEmpty":0, "packageEmpty":0,"cutPackageTask":0,"packageTask":10,"cutTask":10, "smallTask":5, "bigTask":5}
//返回: {"code": 0, "msg":"ok", "data":{"rfid":"xxx","smallEmpty":0,"bigEmpty":0, "packageEmpty":0,"cutPackageTask":0,"packageTask":10,"cutTask":10, "smallTask":5, "bigTask":5,"taskCount":"3"}
public int code { get; set; }
public string msg { get; set; }
......@@ -474,6 +485,11 @@ namespace OnlineStore.DeviceLibrary
public class ShelfData
{
/// <summary>
/// UpdateTrayLoc后,会返回taskCount
/// </summary>
public string taskCount { get; set; }
/// <summary>
/// rfid: 当前料架的RFID
/// </summary>
public string rfid { get; set; }
......
......@@ -124,6 +124,7 @@ namespace OnlineStore.DeviceLibrary
LastSetpTime = DateTime.Now;
WaitList = new List<WaitResultInfo>();
currShelfIndex = -1;
SingleInstore = false;
}
public void EndMove()
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!