From 60c439c4219ac9663d882613c40b585e7fd522b8 Mon Sep 17 00:00:00 2001 From: lch <1627445470@qq.com> Date: Fri, 31 May 2024 16:38:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=94=B5=E6=B1=A0=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Charger/ChargerService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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