1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- using LeaRun.Application.Busines.PipeNetworkManage;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using LeaRun.Util.WebControl;
- using LeaRun.Util;
- using Newtonsoft.Json;
- namespace LeaRun.Application.Web.Areas.PipeNetworkManage.Controllers
- {
- public class StatisticalController : MvcControllerBase
- {
- private AnalysisBLL ipmAnalysisBll = new AnalysisBLL();
- #region 试图功能
- /// <summary>
- /// 用水分析
- /// </summary>
- /// <returns></returns>
- public ActionResult WaterAnalysis()
- {
- return View();
- }
- #endregion
- #region 获取数据
- /// <summary>
- /// 月统计
- /// </summary>
- /// <param name="pagination"></param>
- /// <param name="DeviceID"></param>
- /// <param name="time"></param>
- /// <returns></returns>
- public ActionResult GetMonthReport(string DeviceID, string time,Pagination pagination)
- {
- if (string.IsNullOrEmpty(DeviceID) && string.IsNullOrEmpty(time))
- {
- return Content("");
- }
- else
- {
- var data = ipmAnalysisBll.GetMonthAnalysis(DeviceID, time, 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());
- }
- }
-
- /// <summary>
- /// 年统计
- /// </summary>
- /// <param name="DepartmentId"></param>
- /// <param name="TypeID"></param>
- /// <param name="DeviceID"></param>
- /// <param name="time"></param>
- /// <returns></returns>
- public ActionResult GetYearReport(string DeviceID, string time, Pagination pagination)
- {
- if (string.IsNullOrEmpty(DeviceID) && string.IsNullOrEmpty(time))
- {
- return Content("");
- }
- else
- {
- var data = ipmAnalysisBll.GetYearAnalysis(DeviceID, time, 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());
- }
- }
- #endregion
- }
- }
|