This commit is contained in:
@ -572,29 +572,33 @@ namespace Epost.DAL
|
||||
{
|
||||
ResultsModel resultModel = new ResultsModel();
|
||||
HttpHelper http = new HttpHelper();
|
||||
string ControlIP = "http://" + model.ControlIP + ":8000/param/";
|
||||
string ControlIP = "http://" + model.ControlIP + ":8000/param/";
|
||||
string result = "";
|
||||
SendParamModel sendModel = new SendParamModel();
|
||||
sendModel.Address = model.Address;
|
||||
sendModel.Command = model.Command;
|
||||
sendModel.Parameter = model.Parameter;
|
||||
sendModel.Type = model.Type;
|
||||
sendModel.Uid = model.Uid;
|
||||
sendModel.Quantity = model.Quantity;
|
||||
sendModel.Timeout = model.Timeout;
|
||||
sendModel.Mode = model.Mode;
|
||||
try
|
||||
{
|
||||
string postStr = JsonHelper.SerializeObject(sendModel);
|
||||
result = http.HttpPost_Old(ControlIP, postStr);
|
||||
resultModel = JsonHelper.DeserializeObject<ResultsModel>(result);
|
||||
LogHelper.WriteLogInfo("---------------------------------------" + ControlIP+"-----------"+ postStr);
|
||||
LogHelper.WriteLogInfo("---------------------------------------" + ControlIP + "-----------" + postStr);
|
||||
if (!resultModel.Status.Equals("OK"))
|
||||
{
|
||||
LogHelper.WriteLogInfo("发送指令失败-发送指令:" + postStr);
|
||||
LogHelper.WriteLogInfo("发送指令失败-返回信息:" + result);
|
||||
LogHelper.WriteLogInfo("发送指令失败-发送指令:" + postStr, Log_Type.ERROR);
|
||||
LogHelper.WriteLogInfo("发送指令失败-返回信息:" + result, Log_Type.ERROR);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogHelper.WriteLogInfo("发送指令异常:" + e.Message);
|
||||
LogHelper.WriteLogInfo("发送指令异常:" + e.Message, Log_Type.ERROR);
|
||||
// throw;
|
||||
}
|
||||
if (resultModel != null && resultModel.Status.Equals("OK"))
|
||||
|
Reference in New Issue
Block a user