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

dep_nodyang
nodyang 1 year ago
parent 82f5fdd609
commit 112fbef84d

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

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