1.增加发送指令的日志

2.出库时 物料丢失 优化用户手动去处理后发料的流畅度
This commit is contained in:
hehaibing-1996
2024-06-11 18:41:50 +08:00
parent 95437c2ccf
commit ad36e72b08

View File

@ -194,15 +194,17 @@ namespace WCS.BLL
lock (sendLockObject) lock (sendLockObject)
{ {
tcpClient.Send(message); tcpClient.Send(message);
Task.Run(() =>
{
Logs.Write($"【发送】{BitConverter.ToString(message)}", LogsType.Instructions);
});
//发送自带8ms间隔 //发送自带8ms间隔
Thread.Sleep(8); Thread.Sleep(8);
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
//因异常断连时(网线已经被断了) 尝试重连一次 //因异常断连时(网线已经被断了) 手动重连一次
if (ex is NotConnectedException) if (ex is NotConnectedException)
{ {
Task.Run(() => Task.Run(() =>