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; }