public object Get(string buildId) { try { return(service.GetViewModel(buildId)); } catch (Exception e) { return(e.Message); } }
public void TestGetParamValueViewModelByBuildID_EnergyCode() { HistoryParamService service = new HistoryParamService(); HistoryParamViewModel model = service.GetViewModel("000001G001", "02000"); Console.WriteLine(UtilTest.GetJson(model)); }
public void TestGetParamValueViewModelByBuildID_EnergyCode_CircuitID() { HistoryParamService service = new HistoryParamService(); string circuitID = "000001G0010001"; HistoryParamViewModel model = service.GetViewModel("000001G001", "01000", circuitID); Console.WriteLine(UtilTest.GetJson(model)); }
public void TestGetParamValueViewModelByCircuitID_ParamID_StartTime_step() { HistoryParamService service = new HistoryParamService(); string circuitID = "000001G0010001"; string[] paramIDs = new string[] { "31000000000700", "31000000000701", "31000000000702", "31000000000709", "31000000000711" }; //string[] paramIDs = new string[] { "31000000000201", "31000000000202" }; DateTime today = DateTime.Now; HistoryParamViewModel model = service.GetViewModel(circuitID, paramIDs, "2018-10-30", 10); Console.WriteLine(UtilTest.GetJson(model)); }