Browse Source

add main commit c68aa87def4a21618c5a9a2facf1de118f3df6a8
Commit c68aa87d: 調整 GetDiagnostic API 回傳結果邏輯

Robert 1 year ago
parent
commit
1800457720
1 changed files with 6 additions and 0 deletions
  1. 6 0
      EVCB_OCPP.WEBAPI/Services/ServerTriggerService.cs

+ 6 - 0
EVCB_OCPP.WEBAPI/Services/ServerTriggerService.cs

@@ -197,6 +197,12 @@ namespace EVCB_OCPP.WEBAPI.Services
                         excution.Code = 1;
                         excution.Detail = operation.EVSE_Value;
                     }
+                    else if (operation.Action == "GetDiagnostics")
+                    {
+                        excution.Code = ConverttoCode(operation.EVSE_Value);
+                        excution.Code = excution.Code == -1 ? (operation.EVSE_Status >= 1 ? 1 : excution.Code) : excution.Code;
+                        excution.Detail = operation.EVSE_Value;
+                    }
                     else
                     {
                         excution.Code = ConverttoCode(operation.EVSE_Value);