/// <summary> /// 今日总报修 /// </summary> /// <param name="userID">用户ID</param> /// <param name="sessionID">当前请求所在设备储存的SessionID</param> /// <returns>今日总报修</returns> public JsonResult Todays(int userID, string sessionID, string date = "") { ServiceResultModel <List <RequestInfo> > result = new ServiceResultModel <List <RequestInfo> >(); try { if (!CheckSessionID(userID, sessionID, result)) { return(MyJson(result, JsonRequestBehavior.AllowGet)); } result.Data = api.Todays(date); } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Error(ex, ex.Message); result.SetFailed(ResultCodes.SystemError, ControlManager.GetSettingInfo().ErrorMessage); } return(MyJson(result, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 今日总报修 /// </summary> /// <returns>今日总报修</returns> public JsonResult Todays(string date = "") { ServiceResultModel <List <RequestInfo> > result = new ServiceResultModel <List <RequestInfo> >(); if (WebConfig.CHECK_SESSION_ON_DASHBORAD_API == true && CheckSession() == false) { return(Json(ResultModelBase.CreateTimeoutModel(), JsonRequestBehavior.AllowGet)); } if (WebConfig.CHECK_SESSION_ON_DASHBORAD_API == true && CheckSessionID() == false) { return(Json(ResultModelBase.CreateLogoutModel(), JsonRequestBehavior.AllowGet)); } try { result.Data = api.Todays(date); } catch (Exception ex) { NLog.LogManager.GetCurrentClassLogger().Error(ex, ex.Message); result.SetFailed(ResultCodes.SystemError, ControlManager.GetSettingInfo().ErrorMessage); } return(JsonNetResult(result, JsonRequestBehavior.AllowGet)); }