|
@@ -21,7 +21,7 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
|
|
|
internal partial class ProfileHandler
|
|
|
{
|
|
|
- private List<string> idtag_RejecttionList = new List<string>() { "AC5CDC3D", "48C4CBD9257A" };
|
|
|
+ private List<string> idtag_RejecttionList = new List<string>() { "AC5CDC3D", "48C4CBD9257A","3DDC5CAC" };
|
|
|
int counnter = 0;
|
|
|
internal MessageResult ExecuteCoreRequest(Actions action, ClientData session, IRequest request)
|
|
|
{
|
|
@@ -172,6 +172,7 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
{
|
|
|
foreach (var sampleVaule in item.sampledValue)
|
|
|
{
|
|
|
+ decimal value = Convert.ToDecimal(sampleVaule.value);
|
|
|
|
|
|
string sp = "[dbo].[uspInsertMeterValueRecord] @ChargeBoxId," +
|
|
|
"@ConnectorId,@Value,@CreatedOn,@ContextId,@FormatId,@MeasurandId,@PhaseId,@LocationId,@UnitId,@TransactionId";
|
|
@@ -180,7 +181,7 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
{
|
|
|
new SqlParameter("ChargeBoxId",session.ChargeBoxId),
|
|
|
new SqlParameter("ConnectorId", (byte)_request.connectorId),
|
|
|
- new SqlParameter("Value",sampleVaule.value),
|
|
|
+ new SqlParameter("Value",value),
|
|
|
new SqlParameter("CreatedOn",item.timestamp),
|
|
|
new SqlParameter("ContextId",sampleVaule.context.HasValue ? (int)sampleVaule.context : 0),
|
|
|
new SqlParameter("FormatId",sampleVaule.format.HasValue ? (int)sampleVaule.format : 0),
|
|
@@ -207,7 +208,7 @@ namespace EVCB_OCPP.WSServer.Message
|
|
|
{
|
|
|
StartTransactionRequest _request = request as StartTransactionRequest;
|
|
|
long _pastTime = DateTimeOffset.Now.AddYears(-20).ToUnixTimeSeconds();
|
|
|
- int _tranId = (int)(_pastTime % 100000000) * 10 + 1;
|
|
|
+ int _tranId = (int)(_pastTime % 100000000) * 10 + _request.connectorId;
|
|
|
|
|
|
|
|
|
//需處理StopTransactionOnInvalidId 情境,時間若和當前時間差距10秒,發動Authorize詢問後在回覆
|