电表数据记录去掉 充电时的条件

master
lxw 6 months ago
parent 2279afe5ea
commit e229aa459b

@ -39,9 +39,7 @@ public class EmeterEnergyRecordTask : ITask
var chargerClient = keyValuePair.Value; var chargerClient = keyValuePair.Value;
if (chargerClient.Connected) if (chargerClient.Connected)
{ {
//充电机工作中,正在充电中
if (chargerClient.Workstate == 2 && chargerClient.IsCharged)
{
string id = DateTime.Now.ToString("yyyyMMddHHmmss"); string id = DateTime.Now.ToString("yyyyMMddHHmmss");
EmeterEnergy emeterEnergy = new() EmeterEnergy emeterEnergy = new()
{ {
@ -61,7 +59,7 @@ public class EmeterEnergyRecordTask : ITask
UploadTime = DateTime.Now UploadTime = DateTime.Now
}; };
EmeterEnergyChangeRepository.Insert(emeterEnergyChange); EmeterEnergyChangeRepository.Insert(emeterEnergyChange);
}
} }
} }
} }

Loading…
Cancel
Save