This commit is contained in:
帅凯 贾
2023-08-14 14:57:24 +08:00
parent b4fd2d4e05
commit 07985264fa
10 changed files with 289 additions and 80 deletions

View File

@ -738,7 +738,55 @@ namespace Epost.BLL
#endregion
#region
public ResultModel Forcedend(string orderid)
{
ResultModel resultModel = new ResultModel();
List<LabelParamModel> list = new List<LabelParamModel>();
try
{
DataTable dt = addrBLL.GetForcedendAddress(orderid);
if (dt != null && dt.Rows.Count > 0)
{
foreach (DataRow item in dt.Rows)
{
LabelParamModel model = new LabelParamModel();
model.ControlIP = item["ControlIP"].ToString();
model.Address = item["address"].ToString();
model.Command = "FORMAT_JOB_DATA";
model.Parameter = "50";
model.Timeout = "0.5";
list.Add(model);
model = new LabelParamModel();
model.ControlIP = item["ControlIP"].ToString();
model.Address = "9999";
model.Parameter = "11111000";
model.Command = "UNLOCK";
model.Timeout = "0.5";
list.Add(model);
LED_OFF_CLEAR(item["ControlIP"].ToString());
}
if (list.Any())
{
resultModel = SendALL_Init(list);
}
}
return resultModel;
}
catch (Exception ex)
{
resultModel.result = "0";
resultModel.msg = "强制结束熄灭失败!";
LogHelper.WriteLogInfo("强制结束异常:" + ex.Message);
}
return resultModel;
}
#endregion
}
}