即使网络不同 也不会影响上位机的使用

dep_nodyang
nodyang 1 year ago
parent 82f5fdd609
commit 112fbef84d

@ -31,6 +31,7 @@ namespace Mesnac.Action.ChemicalWeighing.InterfaceDocking
{
HttpItem item = new HttpItem()
{
Timeout = 5,
URL = url, //URL 必需项
Method = "post",//URL 可选项 默认为Get
ContentType = "application/json",//返回类型 可选项有默认值

@ -18,7 +18,9 @@ using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Timer = System.Windows.Forms.Timer;
namespace Mesnac.Action.ChemicalWeighing.ManualControl
{
@ -196,11 +198,18 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
deviceNo = deviceNo.ToString(),
state = statu.ToString(),
};
//即使网络不同 也不会影响上位机的使用
ThreadPool.QueueUserWorkItem(delegate
{
HttpResponse httpResponse = new HttpResponse();
// MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求");
string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
// ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest);
MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest);
});
}

Loading…
Cancel
Save