using LeaRun.Application.Busines.NBManage; using LeaRun.Application.Entity.NBManage; using LeaRun.Util; using LeaRun.Util.WebControl; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using System.Web.Mvc; namespace LeaRun.Application.Web.Areas.NBManage.Controllers { /// /// 用量异常 /// public class NBWaterUseAbnormalityController : MvcControllerBase { NBHistoryBLL historyBLL = new NBHistoryBLL(); public ActionResult Index() { return View(); } #region 获取数据 public ActionResult GetRecordJson(Pagination pagination, string areaId, string thisDate, string lastDate,string moreUsed,string lessUsed) { var watch = CommonHelper.TimerStart(); List data = new List(); try { if (!string.IsNullOrEmpty(thisDate) && !string.IsNullOrEmpty(lastDate)) { data = historyBLL.GetExceptionUse(pagination, thisDate, lastDate,moreUsed,lessUsed,areaId); var JsonData = new { rows = data, total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return Content(JsonData.ToJson()); } else { var JsonData = new { rows = data, total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return Content(JsonData.ToJson()); } } catch (Exception ex) { var JsonData = new { rows = data, total = pagination.total, page = pagination.page, records = pagination.records, costtime = CommonHelper.TimerEnd(watch) }; return Content(JsonData.ToJson()); } } #endregion } }