diff --git a/FrontendWebApi/ApiControllers/HydroMeterController.cs b/FrontendWebApi/ApiControllers/HydroMeterController.cs index 293ae3b..3d9dfcf 100644 --- a/FrontendWebApi/ApiControllers/HydroMeterController.cs +++ b/FrontendWebApi/ApiControllers/HydroMeterController.cs @@ -69,7 +69,7 @@ namespace FrontendWebApi.ApiControllers var endTime = input.tableType == "day" || input.tableType == "week" ? input.startTime.Split("-")[0] + "-" + (Int32.Parse(input.startTime.Split("-")[1]) + 1).ToString().PadLeft(2, '0') + "-01" : input.tableType == "month" ? (Int32.Parse(input.startTime.Split("-")[0]) + 1) + "-01-01" - : input.tableType == "year" ? input.endTime + "-01-01" + : input.tableType == "year" ? (Int32.Parse(input.endTime) + 1).ToString() + "-01-01" : null; string sqlWhere = ""; string sqlGroup = ""; @@ -194,7 +194,7 @@ namespace FrontendWebApi.ApiControllers var endTime = input.tableType == "day" || input.tableType == "week" ? input.startTime.Split("-")[0] + "-" + (Int32.Parse(input.startTime.Split("-")[1]) + 1).ToString().PadLeft(2, '0') + "-01" : input.tableType == "month" ? (Int32.Parse(input.startTime.Split("-")[0]) + 1) + "-01-01" - : input.tableType == "year" ? input.endTime + "-01-01" + : input.tableType == "year" ? (Int32.Parse(input.endTime) + 1).ToString() + "-01-01" : null; string sqlWhere = ""; string sqlGroup = "";