半夜需求

dep_nodyang
wangsr 1 year ago
parent dc63fbdaf4
commit 4fb0b10928

@ -29,7 +29,7 @@ namespace Mesnac.Action.ChemicalWeighing.InterfaceDocking
catch (Exception ex)
{
string message = $" url:{item.URL} {Environment.NewLine} Data:{item.Postdata} {Environment.NewLine} 异常信息:{ex.Message}";
return ex.Message;
return message;
}
}
}

@ -5,6 +5,8 @@ using log4net;
using log4net.Config;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.FreeDb;
using Mesnac.Action.ChemicalWeighing.InterfaceDocking;
using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
using Mesnac.Basic;
using Mesnac.Controls.Base;
@ -143,8 +145,38 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
timer.Tick += new EventHandler(ReadFromPlc);//添加事件
}
private void Timer1_Tick()
{
}
private void Time(int deviceNo,string statu)
{
TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity()
{
reqCode = System.Guid.NewGuid().ToString(),
reqTime = DateTime.Now,
deviceNo = deviceNo.ToString(),
state = statu.ToString(),
};
HttpResponse httpResponse = new HttpResponse();
ManualLogControl("湿混机1下发请求");
MesnacServiceManager.Instance.LoggingService.Info("湿混机1下发请求");
string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
ManualLogControl("湿混机1返回数据 " + returnTest);
MesnacServiceManager.Instance.LoggingService.Info("湿混机1返回数据" + returnTest);
}
private void ReadFromPlc(object sender, EventArgs e)
{
Timer1_Tick();
flag += 1;
if (flag > 10)
{

Loading…
Cancel
Save