From 1abd1f3c5b10b4e82baa021c50125f7099fd9116 Mon Sep 17 00:00:00 2001 From: dev02 Date: Mon, 15 May 2023 17:44:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BE=8C=E7=AB=AF]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8E=92=E7=A8=8B=E5=84=B2=E5=AD=98=E8=B3=87=E6=96=99=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Quartz/Jobs/ArchiveElectricMeterDayJob.cs | 4 ++-- .../Services/Implement/ProcEletricMeterService.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BackendWorkerService/Quartz/Jobs/ArchiveElectricMeterDayJob.cs b/BackendWorkerService/Quartz/Jobs/ArchiveElectricMeterDayJob.cs index 3e45e0b..34812ad 100644 --- a/BackendWorkerService/Quartz/Jobs/ArchiveElectricMeterDayJob.cs +++ b/BackendWorkerService/Quartz/Jobs/ArchiveElectricMeterDayJob.cs @@ -1243,7 +1243,7 @@ namespace BackendWorkerService.Quartz.Jobs arrangeRawData.Add("@avg_rawdata", avg); break; case "sum": - var sum = Convert.ToDecimal(real["@val"].ToString()); + var sum = Decimal.Parse(real["@val"].ToString(), System.Globalization.NumberStyles.Float); arrangeRawData.Add("@sum_rawdata", sum); break; } @@ -1311,7 +1311,7 @@ namespace BackendWorkerService.Quartz.Jobs arrangeRawData.Add("@avg_rawdata", avg); break; case "sum": - var sum = Convert.ToDecimal(real["@val"].ToString()); + var sum = Decimal.Parse(real["@val"].ToString(), System.Globalization.NumberStyles.Float); arrangeRawData.Add("@sum_rawdata", sum); break; } diff --git a/BackendWorkerService/Services/Implement/ProcEletricMeterService.cs b/BackendWorkerService/Services/Implement/ProcEletricMeterService.cs index 4b54c1d..5750872 100644 --- a/BackendWorkerService/Services/Implement/ProcEletricMeterService.cs +++ b/BackendWorkerService/Services/Implement/ProcEletricMeterService.cs @@ -826,7 +826,7 @@ namespace BackendWorkerService.Services.Implement arrangeRawData.Add("@avg_rawdata", avg); break; case "sum": - var sum = Convert.ToDecimal(real["@val"].ToString()); + var sum = Decimal.Parse(real["@val"].ToString(), System.Globalization.NumberStyles.Float); arrangeRawData.Add("@sum_rawdata", sum); break; } @@ -894,7 +894,7 @@ namespace BackendWorkerService.Services.Implement arrangeRawData.Add("@avg_rawdata", avg); break; case "sum": - var sum = Convert.ToDecimal(real["@val"].ToString()); + var sum = Decimal.Parse(real["@val"].ToString(), System.Globalization.NumberStyles.Float); arrangeRawData.Add("@sum_rawdata", sum); break; }