From b11299762d9ee218da893282202851368634f98b Mon Sep 17 00:00:00 2001 From: "jay.chang" Date: Thu, 7 Mar 2024 11:39:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[WebApi]=E4=BF=AE=E6=AD=A3=E6=B0=91?= =?UTF-8?q?=E5=9C=8B=E5=B9=B4=E4=B8=8D=E6=9C=83=E8=87=AA=E5=8B=95=E5=88=A4?= =?UTF-8?q?=E6=96=B7=E7=82=BA=E9=96=8F=E5=B9=B4=EF=BC=8C=E5=B0=8E=E8=87=B4?= =?UTF-8?q?=E6=A8=99=E9=A1=8C=E5=9C=A8=E9=96=8F=E5=B9=B42=E6=9C=88?= =?UTF-8?q?=E4=BB=BD=E5=B0=91=E4=B8=80=E5=A4=A9=E7=9A=84=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/HydroMeterController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrontendWebApi/ApiControllers/HydroMeterController.cs b/FrontendWebApi/ApiControllers/HydroMeterController.cs index d30325a..214b5e0 100644 --- a/FrontendWebApi/ApiControllers/HydroMeterController.cs +++ b/FrontendWebApi/ApiControllers/HydroMeterController.cs @@ -981,7 +981,7 @@ namespace FrontendWebApi.ApiControllers row = sheet.GetRow(rowInit++) ?? sheet.CreateRow(rowInit++); colInit = 0; cell = row.GetCell(colInit++) ?? row.CreateCell(colInit++); - DateTime timeDay = date.AddMonths(1).AddDays(-1); // 用來記錄每個月的最後一天是幾月幾號 + DateTime timeDay = DateTime.Parse(input.startTime).AddMonths(1).AddDays(-1); // 用來記錄每個月的最後一天是幾月幾號 string timeRange = start_year + "." + start_month + ".01~" + timeDay.ToString("yyy.MM.dd"); cell.SetCellValue("電錶週期:" + timeRange); From 7f7996a6817a2990c736cf4ee56581e1fe9921a0 Mon Sep 17 00:00:00 2001 From: "jay.chang" Date: Thu, 7 Mar 2024 14:22:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[WebApi]=E4=BF=AE=E6=AD=A3=E6=B0=91?= =?UTF-8?q?=E5=9C=8B=E5=B9=B4=E4=B8=8D=E6=9C=83=E8=87=AA=E5=8B=95=E5=88=A4?= =?UTF-8?q?=E6=96=B7=E7=82=BA=E9=96=8F=E5=B9=B4=EF=BC=8C=E5=B0=8E=E8=87=B4?= =?UTF-8?q?=E6=A8=99=E9=A1=8C=E5=9C=A8=E9=96=8F=E5=B9=B42=E6=9C=88?= =?UTF-8?q?=E4=BB=BD=E5=B0=91=E4=B8=80=E5=A4=A9=E7=9A=84=E5=95=8F=E9=A1=8C?= =?UTF-8?q?V2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FrontendWebApi/ApiControllers/HydroMeterController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FrontendWebApi/ApiControllers/HydroMeterController.cs b/FrontendWebApi/ApiControllers/HydroMeterController.cs index 214b5e0..aee9686 100644 --- a/FrontendWebApi/ApiControllers/HydroMeterController.cs +++ b/FrontendWebApi/ApiControllers/HydroMeterController.cs @@ -982,7 +982,7 @@ namespace FrontendWebApi.ApiControllers colInit = 0; cell = row.GetCell(colInit++) ?? row.CreateCell(colInit++); DateTime timeDay = DateTime.Parse(input.startTime).AddMonths(1).AddDays(-1); // 用來記錄每個月的最後一天是幾月幾號 - string timeRange = start_year + "." + start_month + ".01~" + timeDay.ToString("yyy.MM.dd"); + string timeRange = start_year + "." + start_month + ".01~" + start_year + "." + timeDay.ToString("MM.dd"); cell.SetCellValue("電錶週期:" + timeRange); //row = sheet.GetRow(rowInit++) ?? sheet.CreateRow(rowInit++);