public void TestAlarmDepartmentFreeTimeByBuildID_Date() { AlarmDepartmentFreeTimeService service = new AlarmDepartmentFreeTimeService(); DateTime today = DateTime.Now.AddDays(-1); AlarmDepartmentFreeTimeViewModel model = service.GetViewModel("000001G001", "01000", today.ToString("yyyy-MM-dd")); Console.WriteLine(UtilTest.GetJson(model)); }
/// <summary> /// 部门用能越限告警(每天设定时间段内用能超过设定阈值) /// </summary> /// <param name="buildId"></param> /// <param name="energyCode">分类代码</param> /// <param name="date">时间("yyyy-MM-dd")</param> /// <returns>所有用能越限的部门</returns> public object Get(string buildId, string energyCode, string date) { try { return(service.GetViewModel(buildId, energyCode, date)); } catch (Exception e) { return(e.Message); } }