コード例 #1
0
        public void TestGetDeviceAlarmViewModelByQuarter()
        {
            DateTime             today     = DateTime.Now;
            AlarmDeviceService   service   = new AlarmDeviceService();
            AlarmDeviceViewModel ViewModel = service.GetViewModel("000001G001", "01000", "SS", today.ToString("yyyy-MM"));

            Console.WriteLine(UtilTest.GetJson(ViewModel));
        }
コード例 #2
0
ファイル: AlarmDeviceController.cs プロジェクト: Mx1014/EMS
 /// <summary>
 /// 获取设备告警
 /// </summary>
 /// <param name="buildId">建筑ID</param>
 /// <param name="energyCode">分类代码</param>
 /// <param name="type">数据类型: "DD":日环比; "MM":月同比; "SS":季度 </param>
 /// <param name="date">结束时间 "日环比":yyyy-MM-dd; "月同比":yyyy-MM; "季度":每个季度最后一个月 </param>
 /// <returns></returns>
 public object Get(string buildId, string energyCode, string type, string date)
 {
     try
     {
         return(service.GetViewModel(buildId, energyCode, type, date));
     }
     catch (Exception e)
     {
         return(e.Message);
     }
 }