修改电池状态信息

zw
lch 6 months ago
parent 6e66601ef1
commit 60c439c421

@ -142,14 +142,14 @@ public class ChargerService
{
BatteryStatusInfoResp batteryStatusInfoResp = new BatteryStatusInfoResp();
List<BinInfo> binInfos = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1);
if (binInfos.Count > 0)
if(binInfos.Count>0)
batteryStatusInfoResp.btyTotalCount = binInfos.Count();
List<BinInfo> canSwapCounts = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1&&i.Soc > Convert.ToDecimal(StaticStationInfo.SwapSoc));
if (canSwapCounts.Count > 0)
if(canSwapCounts.Count>0)
batteryStatusInfoResp.canSwapCount = canSwapCounts.Count();
List<BinInfo> chargingCounts = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1&&i.ChargeStatus==1);
if (chargingCounts.Count > 0)
if(chargingCounts.Count>0)
batteryStatusInfoResp.chargingCount = chargingCounts.Count();
return Result<BatteryStatusInfoResp>.Fail();
return Result<BatteryStatusInfoResp>.Success(batteryStatusInfoResp);
}
}
Loading…
Cancel
Save