|
|
@@ -121,6 +121,31 @@ namespace DataVAPI.Controllers |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 根据客户端ID 设备名称查询当日未处理信息 |
|
|
|
/// </summary> |
|
|
|
/// <param name="clientId"></param> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
public JsonMsg<List<AlarmTable>> QueryClientIdName(string clientId,string name) |
|
|
|
{ |
|
|
|
st = System.Reflection.MethodBase.GetCurrentMethod().Name; |
|
|
|
try |
|
|
|
{ |
|
|
|
List<AlarmTable> al = mg.QueryClientIdNameO(clientId, name); |
|
|
|
al?.ForEach(par => |
|
|
|
{ |
|
|
|
if (par.State == "y") { par.StatusMS = "未处理"; par.StatusColor = new { r = 255, g = 0, b = 0, a = 1 }; } |
|
|
|
else { par.StatusMS = "已处理"; par.StatusColor = new { r = 51, g = 232, b = 34, a = 1 }; } |
|
|
|
}); |
|
|
|
al.Sort((a, b) => -a.State.CompareTo(b.State)); |
|
|
|
return JsonMsg<List<AlarmTable>>.OK(al, st); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
return JsonMsg<List<AlarmTable>>.Error(null, st, ex.Message); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 根据客户端ID查询最近告警 |
|
|
|
/// </summary> |
|
|
|
/// <param name="clientId"></param> |
|
|
|