|
@@ -1825,7 +1825,7 @@ namespace EVCB_OCPP.WSServer
|
|
|
parameters.Add("@MachineId", client.MachineId, DbType.String, ParameterDirection.Input);
|
|
|
string displayPricestrSql = "";
|
|
|
string strSql = "";
|
|
|
- logger.Debug(client.MachineId + " " + client.IsAC);
|
|
|
+
|
|
|
if (client.IsAC)
|
|
|
{
|
|
|
displayPricestrSql = " SELECT [AC_BillingMethod] as BillingMethod,[AC_FeeName] as FeeName,[AC_Fee] as ChargingFeebyHour" +
|
|
@@ -1846,11 +1846,12 @@ namespace EVCB_OCPP.WSServer
|
|
|
|
|
|
}
|
|
|
var result = await conn.QueryAsync<StationFee>(displayPricestrSql, parameters);
|
|
|
- var stationPrice = result.First();
|
|
|
- if (stationPrice == null)
|
|
|
+ if (result.Count() == 0)
|
|
|
{
|
|
|
return string.Empty;
|
|
|
}
|
|
|
+ var stationPrice = result.First();
|
|
|
+
|
|
|
if (stationPrice.BillingMethod == 1)
|
|
|
{
|
|
|
var chargingPriceResult = await conn.QueryAsync<ChargingPrice>(strSql, parameters);
|