|
@@ -132,7 +132,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
Code = 2999,
|
|
|
Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "Availability", ex.ToString())
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -193,7 +193,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
Code = 2999,
|
|
|
Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "ChangeConfiguration", ex.ToString())
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -251,7 +251,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
Code = 2999,
|
|
|
Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "GetConfiguration", ex.ToString())
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -317,7 +317,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
Code = 2999,
|
|
|
Message = EVCBConfiguration.ERROR_MSG_UNEXPECTEDERROR,
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "GetDiagonostics", ex.ToString())
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -364,7 +364,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -481,7 +481,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "StartTransaction", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -504,9 +504,17 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
{
|
|
|
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse() { Code = 2101, Message = EVCBConfiguration.ERROR_MSG_CHARGEBOXID_ISNT_EXIST_OR_OFFLINE });
|
|
|
+ }
|
|
|
+
|
|
|
+ var _ConnectorId = chargePointService.GetConnectorwithOngoingTransaction(ChargeBoxId, TransactionId);
|
|
|
+
|
|
|
+ if (_ConnectorId == -1)
|
|
|
+ {
|
|
|
+ // 充完電 & 這個充電序不存在
|
|
|
+ return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse() { Code = 2106, Message = EVCBConfiguration.ERROR_MSG_TX_FINISHED_OR_NOTFOUND });
|
|
|
}
|
|
|
|
|
|
- var _ConnectorStatus = chargePointService.GetChargePointCurrentSatus(ChargeBoxId, TransactionId % 10);
|
|
|
+ var _ConnectorStatus = chargePointService.GetChargePointCurrentSatus(ChargeBoxId, _ConnectorId);
|
|
|
|
|
|
if (!(_ConnectorStatus.HasValue && _ConnectorStatus == ChargePointStatus.Charging))
|
|
|
{
|
|
@@ -549,7 +557,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -637,7 +645,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
});
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -698,7 +706,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "CancelResrvation", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -759,7 +767,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "Reset", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -845,7 +853,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "SendLocalList", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -900,7 +908,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "ClearCache", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -1038,7 +1046,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
|
|
|
-
|
|
|
+
|
|
|
return Request.CreateResponse(HttpStatusCode.BadRequest, new ErrorResponse()
|
|
|
{
|
|
|
Code = 2999,
|
|
@@ -1104,7 +1112,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "TriggerMessage", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -1163,7 +1171,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
|
|
|
});
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
@@ -1227,7 +1235,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
ErrorDetail = string.Format(EVCBConfiguration.ERRORMESSAGE_FORMAT, "CompositeSchedule", ex.ToString())
|
|
|
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return Request.CreateResponse(statusCode, result);
|