[後端] 修改年份結束日期

This commit is contained in:
dev02 2023-05-15 17:15:24 +08:00
parent a8e836451a
commit 8c0738addf

View File

@ -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 = "";