充电时长

master
rszn 5 months ago
parent 9f920ca6d2
commit 38b24cd5af

@ -101,7 +101,8 @@ namespace Service.Charger.Handler
db.EndTime = new DateTime(msg.EndYear + 2000, msg.EndMonth, msg.EndDay, msg.EndHour, msg.EndMinute, msg.EndSecond); db.EndTime = new DateTime(msg.EndYear + 2000, msg.EndMonth, msg.EndDay, msg.EndHour, msg.EndMinute, msg.EndSecond);
db.StartSoc = msg.SocBefore; db.StartSoc = msg.SocBefore;
db.StopSoc = msg.SocAfter; db.StopSoc = msg.SocAfter;
db.ChargeTimeCount= msg.ChargingTimeCount; TimeSpan? timeSpan = (db.EndTime - db.StartTime);
db.ChargeTimeCount= timeSpan?.Minutes;
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