123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- 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
- {
- /// <summary>
- /// 用量异常
- /// </summary>
- 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<NBHistoryEntity> data = new List<NBHistoryEntity>();
- 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
- }
- }
|