From 67943d276b21e8d8f971ac9ac1e2e1f05e135a80 Mon Sep 17 00:00:00 2001 From: dev01 Date: Mon, 15 May 2023 12:49:15 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E5=8F=B0][=E6=B0=B4=E9=9B=BB?= =?UTF-8?q?=E5=A0=B1=E8=A1=A8]=20=E5=BE=8C=E7=AB=AF=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=88=A4=E6=96=B7=E5=BE=AE=E8=AA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/HydroMeterController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FrontendWebApi/ApiControllers/HydroMeterController.cs b/FrontendWebApi/ApiControllers/HydroMeterController.cs index 7369e71..b571da1 100644 --- a/FrontendWebApi/ApiControllers/HydroMeterController.cs +++ b/FrontendWebApi/ApiControllers/HydroMeterController.cs @@ -166,7 +166,7 @@ namespace FrontendWebApi.ApiControllers apiResult.Msg = "棟別沒有被選取"; return BadRequest(apiResult); } - else if (input.tableType == null || tableType.Contains(input.tableType)) + else if (input.tableType == null || !tableType.Contains(input.tableType)) { apiResult.Code = "9999"; apiResult.Msg = "表單類別錯誤"; @@ -177,7 +177,7 @@ namespace FrontendWebApi.ApiControllers { var startTime = input.tableType == "day" || input.tableType == "week" ? input.startTime + "-01" - : input.tableType == "month" || input.tableType == "month" ? input.startTime + "-01-01" + : input.tableType == "month" || input.tableType == "year" ? input.startTime + "-01-01" : null; var endTime = input.tableType == "day" || input.tableType == "week" ? input.startTime.Split("-")[0] + "-" + (Int32.Parse(input.startTime.Split("-")[1]) + 1).ToString().PadLeft(2, '0') + "-01"