From 455ef305a2109205dfb7b0c79785b3018c4b9ea1 Mon Sep 17 00:00:00 2001 From: CZ Date: Fri, 5 Jul 2024 10:47:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E7=94=B5=E6=97=B6=E4=B8=8A=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Charger/Handler/RecordChargeHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Service/Charger/Handler/RecordChargeHandler.cs b/Service/Charger/Handler/RecordChargeHandler.cs index 1f638a0..01f01e5 100644 --- a/Service/Charger/Handler/RecordChargeHandler.cs +++ b/Service/Charger/Handler/RecordChargeHandler.cs @@ -82,7 +82,7 @@ namespace Service.Charger.Handler StartSoc = msg.SocBefore, StopSoc = msg.SocAfter, - ChargeTimeCount = timeSpan.Hours * 60 + timeSpan.Minutes, + ChargeTimeCount = (int)timeSpan.TotalMinutes, ElecCount = Convert.ToDecimal(msg.ChargingPower), AcElecCount = Convert.ToDecimal(msg.AcMeterElecCount), StartAcElec = Convert.ToDecimal(msg.AcMeterDataBefore), @@ -111,7 +111,7 @@ namespace Service.Charger.Handler db.StartSoc = msg.SocBefore; db.StopSoc = msg.SocAfter; TimeSpan? timeSpan = (db.EndTime - db.StartTime); - db.ChargeTimeCount= timeSpan?.Hours * 60 + timeSpan?.Minutes; + db.ChargeTimeCount= (int)timeSpan?.TotalMinutes; db.ElecCount = Convert.ToDecimal(msg.ChargingPower); db.AcElecCount = Convert.ToDecimal(msg.AcMeterElecCount); db.StartAcElec = Convert.ToDecimal(msg.AcMeterDataBefore);