Commit 65fbb6a3 刘韬

1

1 个父辈 466f9a6d
...@@ -8,6 +8,7 @@ using System.IO; ...@@ -8,6 +8,7 @@ using System.IO;
using System.IO.Ports; using System.IO.Ports;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
...@@ -462,6 +463,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -462,6 +463,7 @@ namespace OnlineStore.DeviceLibrary
private static readonly string Addr_putShelfFinished = "/rest/api/dcs/device/putShelfFinished"; private static readonly string Addr_putShelfFinished = "/rest/api/dcs/device/putShelfFinished";
public static string putShelfFinished(string deviceName,string shelfNum, string rfidLoc, string barcode) public static string putShelfFinished(string deviceName,string shelfNum, string rfidLoc, string barcode)
{ {
retry:
string msg = ""; string msg = "";
try try
{ {
...@@ -479,7 +481,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -479,7 +481,9 @@ namespace OnlineStore.DeviceLibrary
if (data == null) if (data == null)
{ {
return msg = deviceName + " putShelfFinished【 " + barcode + "】 没有收到服务器反馈"; Thread.Sleep(1000);
goto retry;
//return msg = deviceName + " putShelfFinished【 " + barcode + "】 没有收到服务器反馈";
} }
else if (data.code.Equals(0).Equals(false)) else if (data.code.Equals(0).Equals(false))
{ {
...@@ -491,6 +495,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -491,6 +495,8 @@ namespace OnlineStore.DeviceLibrary
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(deviceName + " " + ex.ToString()); LogUtil.error(deviceName + " " + ex.ToString());
Thread.Sleep(1000);
goto retry;
} }
return msg; return msg;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!