Commit 70311462 张东亮

1、获取库位时上报入料口信息;2、清理出库托盘时上报。

1 个父辈 d93c5c2b
...@@ -403,6 +403,45 @@ namespace OnlineStore.DeviceLibrary ...@@ -403,6 +403,45 @@ namespace OnlineStore.DeviceLibrary
return msg; return msg;
} }
private static string Addr_clearOutTask = "/rest/api/qisda/device/clearOutTask";
public static string clearOutTask(string deviceName, string barcode)
{
string msg = "";
try
{
if (string.IsNullOrEmpty(serverAddr))
{
LogUtil.error(deviceName + "clearOutTask [" + barcode + "] :未找到服务器地址");
return msg;
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("barcode", barcode);
string server = GetAddr(Addr_clearOutTask, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "clearOutTask " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
CancelData data = JsonHelper.DeserializeJsonToObject<CancelData>(resultStr);
if (data == null)
{
return msg = deviceName + " cancelPutInTask【 " + barcode + "】 没有收到服务器反馈";
}
else if (data.code.Equals(0).Equals(false))
{
return msg = deviceName + " cancelPutInTask【 " + barcode + "】 :" + data.msg;
}
return "";
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
public static GetPosResult GetPosId(string deviceName, List<string> codeList, int height, int width, string rfid, int feedEquipId) public static GetPosResult GetPosId(string deviceName, List<string> codeList, int height, int width, string rfid, int feedEquipId)
{ {
GetPosResult result = new GetPosResult(); GetPosResult result = new GetPosResult();
...@@ -437,6 +476,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -437,6 +476,7 @@ namespace OnlineStore.DeviceLibrary
Dictionary<string, string> paramMap = new Dictionary<string, string>(); Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("cids", LineServer.GetAllCID(feedEquipId)); paramMap.Add("cids", LineServer.GetAllCID(feedEquipId));
paramMap.Add("code", codeStr); paramMap.Add("code", codeStr);
paramMap.Add("entrance", deviceName);
paramMap.Add(ParamDefine.rfid, rfid); paramMap.Add(ParamDefine.rfid, rfid);
string server = GetAddr(Addr_PosForPutin, paramMap); string server = GetAddr(Addr_PosForPutin, paramMap);
......
...@@ -232,6 +232,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -232,6 +232,26 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
public static void ClearOutstore(TrayInfo tray, string opLog = "手动清空托盘")
{
if (tray == null)
{
return;
}
//如果是出库托盘,需要清理出库消息
if (tray.InOrOutStore.Equals(2) && tray.InoutPar.IsNG.Equals(false) && (!tray.InoutPar.PosId.Equals("")))
{
int storeId = tray.InoutPar.GetStoreId();
if (storeId > 0 && LineManager.Line.MoveEquipMap.ContainsKey(storeId))
{
MoveEquip moveEquip = LineManager.Line.MoveEquipMap[storeId];
moveEquip.RemoveOutStore(tray.InoutPar, opLog);
//手动清空托盘时出库任务调用
SServerManager.clearOutTask(opLog, tray.InoutPar.WareCode);
}
}
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!