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