瀏覽代碼

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

Robert 1 年之前
父節點
當前提交
1800457720
共有 1 個文件被更改,包括 6 次插入0 次删除
  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);