1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using LeaRun.Application.Busines.PipeNetworkManage;
- using LeaRun.Util.WebControl;
- using LeaRun.Util;
- using Newtonsoft.Json;
- namespace LeaRun.Application.Web.Areas.PipeNetworkManage.Controllers
- {
- public class HistoryController : MvcControllerBase
- {
-
- private HistoryBLL ipmhistorybll = new HistoryBLL();
- #region 视图功能
- public ActionResult Index()
- {
- return View();
- }
- /// <summary>
- /// 表单页面
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Form()
- {
- return View();
- }
- /// <summary>
- /// 报警
- /// </summary>
- /// <returns></returns>
- [HttpGet]
- public ActionResult Alerm()
- {
- return View();
- }
-
- #endregion
- #region 获取数据
- /// <summary>
- /// 单点历史记录
- /// </summary>
- /// <param name="deviceId"></param>
- /// <param name="startT"></param>
- /// <param name="endT"></param>
- /// <returns></returns>
- [HttpGet]
- public ActionResult GetListJson(string deviceId, string startT, string endT , Pagination pagination)
- {
- if (!string.IsNullOrEmpty(deviceId) && !string.IsNullOrEmpty(startT) && !string.IsNullOrEmpty(endT))
- {
- var data = ipmhistorybll.GetEntityList(deviceId, startT, endT, pagination);
- var watch = CommonHelper.TimerStart();
- var JsonData = new
- {
- rows = JsonConvert.DeserializeObject(data),
- total = pagination.total,
- page = pagination.page,
- records = pagination.records,
- costtime = CommonHelper.TimerEnd(watch)
- };
- return Content(JsonData.ToJson());
- }
- return Content("");
- }
-
-
- #endregion
-
- }
- }
|