This commit is contained in:
@ -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
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user