using LeaRun.Application.Busines.PipeNetworkManage; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace LeaRun.Application.Web.Areas.PipeNetworkManage.Controllers { /// /// 曲线分析 /// public class CurvesAnalysisController : MvcControllerBase { private AnalysisBLL analysisBll = new AnalysisBLL(); public ActionResult Index() { return View(); } public ActionResult MinFlowCurves() { return View(); } /// /// 瞬时流量 /// /// /// /// /// public string GetFlowRate(string deviceId, string start, string end) { if (string.IsNullOrEmpty(deviceId)) return "[]"; return analysisBll.GetFlowRate(deviceId, start, end); } /// /// 获取每小时用水量(一天) /// /// /// /// public string GetHourFlow(string deviceId, string time) { if (string.IsNullOrEmpty(deviceId)) return "[]"; return analysisBll.GetHourFlow(deviceId, time); } /// /// 前三天平均用水量 /// /// /// /// public string GetHourAvgFlow(string deviceId, string time) { if (string.IsNullOrEmpty(deviceId)) return "[]"; return analysisBll.GetHourAvgFlow(deviceId, time); } /// /// 每日用水量 /// /// /// /// public string GetDayFlow(string deviceId, string time) { if (string.IsNullOrEmpty(deviceId)) return "[]"; return analysisBll.GetDayFlow(deviceId, time); } /// /// 每月用水量 /// /// /// /// public string GetMonthFlow(string deviceId, string time) { if (string.IsNullOrEmpty(deviceId)) return "[]"; return analysisBll.GetMonthFlow(deviceId, time); } /// /// 最小流量分析 /// /// /// /// /// public string GetMinFlowData(string deviceId, string start, string end) { return analysisBll.GetMinFlow(deviceId, start, end); } } }