#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include "../Config.h"
#include "../Log/log.h"
#include "../ShareMemory/shmMem.h"
#include "../Define/define.h"

//------------------------------------------------------------------------------
void ClearAbnormalStatus_GB(uint8_t gun_index)
{
    bool isCleanCheck = false;
    char code[7];
    struct SysConfigData *pSysConfig = (struct SysConfigData *)GetShmSysConfigData();
    struct InfoCodeData *pInfoCode = (struct InfoCodeData *)GetShmInfoCodeData();
    struct ChargingInfoData *pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(gun_index);

    if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "", 6) == EQUAL) {
        return;
    }

    if (true) {
        if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023702", 6) == EQUAL &&
                pInfoCode->InfoEvents.bits.GbEvCommFail == YES) {
            memcpy(code, "023702", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023900", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_LOS_CC1 == YES) {
            memcpy(code, "023900", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023901", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL == YES) {
            memcpy(code, "023901", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023902", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BATTERY_INCOMPATIBLE == YES) {
            memcpy(code, "023902", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023903", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BMS_BROAA_TIMEOUT == YES) {
            memcpy(code, "023903", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023904", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT == YES) {
            memcpy(code, "023904", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023905", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT == YES) {
            memcpy(code, "023905", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023906", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE == YES) {
            memcpy(code, "023906", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023907", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE == YES) {
            memcpy(code, "023907", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023908", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT == YES) {
            memcpy(code, "023908", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023909", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_ADC_MORE_THAN_10V == YES) {
            memcpy(code, "023909", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023910", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_ADC_MORE_THAN_60V == YES) {
            memcpy(code, "023910", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023911", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD == YES) {
            memcpy(code, "023911", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023912", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD == YES) {
            memcpy(code, "023912", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023913", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_ISOLATION_RESULT_FAIL == YES) {
            memcpy(code, "023913", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023914", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK == YES) {
            memcpy(code, "023914", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023915", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT == YES) {
            memcpy(code, "023915", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023916", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT == YES) {
            memcpy(code, "023916", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023917", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT == YES) {
            memcpy(code, "023917", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023918", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT == YES) {
            memcpy(code, "023918", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023919", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V == YES) {
            memcpy(code, "023919", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023930", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BHM_TIMEOUT == YES) {
            memcpy(code, "023930", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023931", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BRM_TIMEOUT == YES) {
            memcpy(code, "023931", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023932", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BCP_TIMEOUT == YES) {
            memcpy(code, "023932", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023933", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BRO_TIMEOUT == YES) {
            memcpy(code, "023933", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023934", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BCL_TIMEOUT == YES) {
            memcpy(code, "023934", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023935", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BCS_TIMEOUT == YES) {
            memcpy(code, "023935", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023936", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BSM_TIMEOUT == YES) {
            memcpy(code, "023936", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023937", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BST_TIMEOUT == YES) {
            memcpy(code, "023937", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023938", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BSD_TIMEOUT == YES) {
            memcpy(code, "023938", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023939", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BEM_OTHER_TIMEOUT == YES) {
            memcpy(code, "023939", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023940", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CRM_TIMEOUT == YES) {
            memcpy(code, "023940", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023941", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CRMAA_TIMEOUT == YES) {
            memcpy(code, "023941", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023942", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CTS_CML_TIMEOUT == YES) {
            memcpy(code, "023942", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023943", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CRO_TIMEOUT == YES) {
            memcpy(code, "023943", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023944", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CCS_TIMEOUT == YES) {
            memcpy(code, "023944", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023945", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CST_TIMEOUT == YES) {
            memcpy(code, "023945", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023946", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CSD_TIMEOUT == YES) {
            memcpy(code, "023946", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023947", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_BEM_OTHER_TIMEOUT == YES) {
            memcpy(code, "023947", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023950", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_SOC_GOAL == YES) {
            memcpy(code, "023950", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023951", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL == YES) {
            memcpy(code, "023951", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023952", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CELL_VOLTAGE_GOAL == YES) {
            memcpy(code, "023952", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023953", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_GET_CST == YES) {
            memcpy(code, "023953", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023954", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_ISOLATION == YES) {
            memcpy(code, "023954", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023955", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP == YES) {
            memcpy(code, "023955", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023956", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_COMPONENT == YES) {
            memcpy(code, "023956", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023957", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CHARGE_CONNECTOR == YES) {
            memcpy(code, "023957", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023958", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_OTP == YES) {
            memcpy(code, "023958", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023959", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_OTHER == YES) {
            memcpy(code, "023959", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023960", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_HIGH_V == YES) {
            memcpy(code, "023960", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023961", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CC2 == YES) {
            memcpy(code, "023961", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023962", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CURRENT == YES) {
            memcpy(code, "023962", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023963", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BST_VOLTAGE == YES) {
            memcpy(code, "023963", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023964", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_GET_BST_NO_REASON == YES) {
            memcpy(code, "023964", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023970", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_CELL_OVER_VOLTAGE == YES) {
            memcpy(code, "023970", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023971", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_CELL_UNDER_VOLTAGE == YES) {
            memcpy(code, "023971", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023972", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_OVER_SOC == YES) {
            memcpy(code, "023972", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023973", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_UNDER_SOC == YES) {
            memcpy(code, "023973", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023974", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_CURRENT == YES) {
            memcpy(code, "023974", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023975", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_TEMPERATURE == YES) {
            memcpy(code, "023975", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023976", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_ISOLATE == YES) {
            memcpy(code, "023976", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        } else if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "023977", 6) == EQUAL &&
                   pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_OUTPUT_CONNECTOR == YES) {
            memcpy(code, "023977", 6);
            memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
            isCleanCheck = true;
        }
    }

    if (isCleanCheck) {
        for (uint8_t index = 0; index < pSysConfig->TotalConnectorCount; index++) {
            pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(index);

            if (index != gun_index || pSysConfig->TotalConnectorCount == 1) {
                log_info("GBT clean error : index = %d, EvConnAlarmCode = %s, code = %s \n",
                         index,
                         pDcChargingInfo->EvConnAlarmCode,
                         code);

                if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, code, 6) != EQUAL) {
                    if (strncmp(code, "023702", 6) == EQUAL) { pInfoCode->InfoEvents.bits.GbEvCommFail = NO; }
                    if (strncmp(code, "023900", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_LOS_CC1 = NO; }
                    if (strncmp(code, "023901", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CONNECTOR_LOCK_FAIL = NO; }
                    if (strncmp(code, "023902", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BATTERY_INCOMPATIBLE = NO; }
                    if (strncmp(code, "023903", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BMS_BROAA_TIMEOUT = NO; }
                    if (strncmp(code, "023904", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CSU_PRECHARGE_TIMEOUT = NO; }
                    if (strncmp(code, "023905", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BMS_PRESENT_VOLTAGE_FAULT = NO; }
                    if (strncmp(code, "023906", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BMS_VOLTAGE_OVER_RANGE = NO; }
                    if (strncmp(code, "023907", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_BSM_CHARGE_ALLOW_00_10MIN_COUUNTDONE = NO; }
                    if (strncmp(code, "023908", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_WAIT_GROUNDFAULT_TIMEOUT = NO; }
                    if (strncmp(code, "023909", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_ADC_MORE_THAN_10V = NO; }
                    if (strncmp(code, "023910", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_ADC_MORE_THAN_60V = NO; }
                    if (strncmp(code, "023911", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CHARGER_GET_NORMAL_STOP_CMD = NO; }
                    if (strncmp(code, "023912", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_CHARGER_GET_EMERGENCY_STOP_CMD = NO; }
                    if (strncmp(code, "023913", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_ISOLATION_RESULT_FAIL = NO; }
                    if (strncmp(code, "023914", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_MOTHER_BOARD_MISS_LINK = NO; }
                    if (strncmp(code, "023915", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_LIMIT = NO; }
                    if (strncmp(code, "023916", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_REQ_CURRENT_MORE_THAN_LIMIT = NO; }
                    if (strncmp(code, "023917", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_OUTPUT_VOLTAGE_MORE_THAN_10_PERCENT = NO; }
                    if (strncmp(code, "023918", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_OUTPUT_VOLTAGE_DIFF_BCS_5_PERCENT = NO; }
                    if (strncmp(code, "023919", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GBT_STOP_ADC_MORE_THAN_10V = NO; }
                    if (strncmp(code, "023930", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BHM_TIMEOUT = NO; }
                    if (strncmp(code, "023931", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BRM_TIMEOUT = NO; }
                    if (strncmp(code, "023932", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BCP_TIMEOUT = NO; }
                    if (strncmp(code, "023933", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BRO_TIMEOUT = NO; }
                    if (strncmp(code, "023934", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BCL_TIMEOUT = NO; }
                    if (strncmp(code, "023935", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BCS_TIMEOUT = NO; }
                    if (strncmp(code, "023936", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BSM_TIMEOUT = NO; }
                    if (strncmp(code, "023937", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BST_TIMEOUT = NO; }
                    if (strncmp(code, "023938", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BSD_TIMEOUT = NO; }
                    if (strncmp(code, "023939", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_CEM_BEM_OTHER_TIMEOUT = NO; }
                    if (strncmp(code, "023940", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CRM_TIMEOUT = NO; }
                    if (strncmp(code, "023941", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CRMAA_TIMEOUT = NO; }
                    if (strncmp(code, "023942", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CTS_CML_TIMEOUT = NO; }
                    if (strncmp(code, "023943", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CRO_TIMEOUT = NO; }
                    if (strncmp(code, "023944", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CCS_TIMEOUT = NO; }
                    if (strncmp(code, "023945", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CST_TIMEOUT = NO; }
                    if (strncmp(code, "023946", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_CSD_TIMEOUT = NO; }
                    if (strncmp(code, "023947", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BEM_BEM_OTHER_TIMEOUT = NO; }
                    if (strncmp(code, "023950", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_SOC_GOAL = NO; }
                    if (strncmp(code, "023951", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_TOTAL_VOLTAGE_GOAL = NO; }
                    if (strncmp(code, "023952", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CELL_VOLTAGE_GOAL = NO; }
                    if (strncmp(code, "023953", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_GET_CST = NO; }
                    if (strncmp(code, "023954", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_ISOLATION = NO; }
                    if (strncmp(code, "023955", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_OUTPUT_CONNECTOR_OTP = NO; }
                    if (strncmp(code, "023956", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_COMPONENT = NO; }
                    if (strncmp(code, "023957", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CHARGE_CONNECTOR = NO; }
                    if (strncmp(code, "023958", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_OTP = NO; }
                    if (strncmp(code, "023959", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_OTHER = NO; }
                    if (strncmp(code, "023960", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_HIGH_V = NO; }
                    if (strncmp(code, "023961", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CC2 = NO; }
                    if (strncmp(code, "023962", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_CURRENT = NO; }
                    if (strncmp(code, "023963", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BST_VOLTAGE = NO; }
                    if (strncmp(code, "023964", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_GET_BST_NO_REASON = NO; }
                    if (strncmp(code, "023970", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_CELL_OVER_VOLTAGE = NO; }
                    if (strncmp(code, "023971", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_CELL_UNDER_VOLTAGE = NO; }
                    if (strncmp(code, "023972", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_OVER_SOC = NO; }
                    if (strncmp(code, "023973", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_UNDER_SOC = NO; }
                    if (strncmp(code, "023974", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_CURRENT = NO; }
                    if (strncmp(code, "023975", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_TEMPERATURE = NO; }
                    if (strncmp(code, "023976", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_ISOLATE = NO; }
                    if (strncmp(code, "023977", 6) == EQUAL) { pInfoCode->InfoEvents.bits.ERROR_CODE_BSM_OUTPUT_CONNECTOR = NO; }
                }
            }
        }
    }
    pDcChargingInfo = (struct ChargingInfoData*)GetDcChargingInfoData(gun_index);
    if (strncmp((char *)pDcChargingInfo->EvConnAlarmCode, "", 6) != EQUAL) {
        memcpy(pDcChargingInfo->EvConnAlarmCode, "", 6);
    }
}