diff --git a/Service/Charger/ChargerService.cs b/Service/Charger/ChargerService.cs index f05783b..6dbd128 100644 --- a/Service/Charger/ChargerService.cs +++ b/Service/Charger/ChargerService.cs @@ -142,14 +142,14 @@ public class ChargerService { BatteryStatusInfoResp batteryStatusInfoResp = new BatteryStatusInfoResp(); List binInfos = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1); - if (binInfos.Count > 0) + if(binInfos.Count>0) batteryStatusInfoResp.btyTotalCount = binInfos.Count(); List 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 chargingCounts = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1&&i.ChargeStatus==1); - if (chargingCounts.Count > 0) - batteryStatusInfoResp.chargingCount = chargingCounts.Count(); - return Result.Fail(); + if(chargingCounts.Count>0) + batteryStatusInfoResp.chargingCount = chargingCounts.Count(); + return Result.Success(batteryStatusInfoResp); } } \ No newline at end of file