充电时上更改

master
CZ 5 months ago
parent ed34978c20
commit 455ef305a2

@ -82,7 +82,7 @@ namespace Service.Charger.Handler
StartSoc = msg.SocBefore, StartSoc = msg.SocBefore,
StopSoc = msg.SocAfter, StopSoc = msg.SocAfter,
ChargeTimeCount = timeSpan.Hours * 60 + timeSpan.Minutes, ChargeTimeCount = (int)timeSpan.TotalMinutes,
ElecCount = Convert.ToDecimal(msg.ChargingPower), ElecCount = Convert.ToDecimal(msg.ChargingPower),
AcElecCount = Convert.ToDecimal(msg.AcMeterElecCount), AcElecCount = Convert.ToDecimal(msg.AcMeterElecCount),
StartAcElec = Convert.ToDecimal(msg.AcMeterDataBefore), StartAcElec = Convert.ToDecimal(msg.AcMeterDataBefore),
@ -111,7 +111,7 @@ namespace Service.Charger.Handler
db.StartSoc = msg.SocBefore; db.StartSoc = msg.SocBefore;
db.StopSoc = msg.SocAfter; db.StopSoc = msg.SocAfter;
TimeSpan? timeSpan = (db.EndTime - db.StartTime); 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.ElecCount = Convert.ToDecimal(msg.ChargingPower);
db.AcElecCount = Convert.ToDecimal(msg.AcMeterElecCount); db.AcElecCount = Convert.ToDecimal(msg.AcMeterElecCount);
db.StartAcElec = Convert.ToDecimal(msg.AcMeterDataBefore); db.StartAcElec = Convert.ToDecimal(msg.AcMeterDataBefore);

Loading…
Cancel
Save