package com.casic.missiles.enums.notifyevent;

import com.casic.missiles.enums.equipment.EquipmentApplyProcessEnum;
import com.casic.missiles.enums.system.ApplyFromIdEnum;

import java.util.HashMap;

public enum AwareActionStatusEnum implements ActionStatusBeanEnum {
    EQUIPMENT_APPLY_USE(APPLY_BEAN_NAME, EquipmentApplyProcessEnum.STANDARD_USE),
    EQUIPMENT_APPLY_STOP(APPLY_BEAN_NAME, EquipmentApplyProcessEnum.STOP),
    EQUIPMENT_APPLY_REVOKE(APPLY_BEAN_NAME, EquipmentApplyProcessEnum.REVOKE),
    EQUIPMENT_SUPPORT_STATUS(SUPPORT_BEAN_NAME, ""),
    DEVICE_MANAGING_IDLE(MANAGING_BEAN_NAME, EquipmentApplyProcessEnum.IDLE),
    DEVICE_MANAGING_SEALED(MANAGING_BEAN_NAME, EquipmentApplyProcessEnum.SEALED),
    DEVICE_MANAGING_USE(MANAGING_BEAN_NAME, EquipmentApplyProcessEnum.USE),
    DEVICE_MANAGING_SCRAP(MANAGING_BEAN_NAME, EquipmentApplyProcessEnum.SCRAP),
    DEVICE_MANAGING_MANAGEMENT(MANAGING_BEAN_NAME, EquipmentApplyProcessEnum.MANAGEMENT),
    DEVICE_LEASE_CONSUMING(LEASE_BEAN_NAME, EquipmentApplyProcessEnum.WAIT_COLLECTING),
    DEVICE_LEASE_BORROWED(LEASE_BEAN_NAME, EquipmentApplyProcessEnum.WAIT_BORROWED),
    CERTIFICATE_PRINT_STATUS(CERTIFICATE_BEAN_NAME, ""),
    CERTIFICATE_REPORT_STATUS(CERTIFICATE_REPORT_BEAN_NAME, ""),
    OUTSOURCE_PROJECT_APPLY(OUTSOURCE_PROJECT_APPLY_BEAN_NAME, ""),
    OUTSOURCE_PROJECT_CHECK(OUTSOURCE_PROJECT_CHECK_BEAN_NAME, ""),
    SITE_EXECUTIVE_INFO_CHECK(SITE_EXECUTIVE_INFO_BEAN_NAME, ""),
    ACTION_STATUS_MAP(new HashMap<String, AwareActionStatusEnum>() {
        {
            put(ApplyFromIdEnum.STANDARD_REVERT_APPROVAL.getCode(), EQUIPMENT_APPLY_USE);
            put(ApplyFromIdEnum.STANDARD_PAUSE_APPROVAL.getCode(), EQUIPMENT_APPLY_STOP);
            put(ApplyFromIdEnum.STANDARD_RESUME_APPROVAL.getCode(), EQUIPMENT_APPLY_REVOKE);
            put(ApplyFromIdEnum.STANDARD_CHANGE_APPROVAL.getCode(), EQUIPMENT_SUPPORT_STATUS);     //标准装置更换申请
            put(ApplyFromIdEnum.DEVICE_UNUSED_APPROVAL.getCode(), DEVICE_MANAGING_IDLE);
            put(ApplyFromIdEnum.DEVICE_SEALED_APPROVAL.getCode(), DEVICE_MANAGING_SEALED);
            put(ApplyFromIdEnum.DEVICE_UNSEALED_APPROVAL.getCode(), DEVICE_MANAGING_USE);
            put(ApplyFromIdEnum.DEVICE_SCRAP_APPROVAL.getCode(), DEVICE_MANAGING_SCRAP);
            put(ApplyFromIdEnum.DEVICE_HANDLE_APPROVAL.getCode(), DEVICE_MANAGING_MANAGEMENT);
            put(ApplyFromIdEnum.DEVICE_CONSUMING_APPROVAL.getCode(), DEVICE_LEASE_CONSUMING);           // 设备领用申请
            put(ApplyFromIdEnum.DEVICE_BORROW_APPROVAL.getCode(), DEVICE_LEASE_BORROWED);               // 设备借用申请
            put(ApplyFromIdEnum.CERTIFICATE_PRINT_APPROVAL.getCode(), CERTIFICATE_PRINT_STATUS);           //证书打印审批通过状态回填
            put(ApplyFromIdEnum.CERTIFICATE_REPORT_APPROVAL.getCode(), CERTIFICATE_REPORT_STATUS);           //证书报告审批通过状态回填
            put(ApplyFromIdEnum.OUTSOURCE_PROJECT_APPLY_APPROVAL.getCode(), OUTSOURCE_PROJECT_APPLY);
            put(ApplyFromIdEnum.OUTSOURCE_PROJECT_CHECK_APPROVAL.getCode(), OUTSOURCE_PROJECT_CHECK);
            put(ApplyFromIdEnum.SITE_EXECUTIVE_INFO_APPROVAL.getCode(), SITE_EXECUTIVE_INFO_CHECK); //外场检测审批
        }
    });
    String actionBeanName;
    String status;

    AwareActionStatusEnum(String actionBeanName, String status) {
        this.actionBeanName = actionBeanName;
        this.status = status;
    }

    public String getActionBeanName() {
        return actionBeanName;
    }

    public String getStatus() {
        return status;
    }

    public HashMap<String, AwareActionStatusEnum> actionStatusMap;

    AwareActionStatusEnum(HashMap<String, AwareActionStatusEnum> actionStatusMap) {
        this.actionStatusMap = actionStatusMap;
    }

    public HashMap<String, AwareActionStatusEnum> getActionStatusMap() {
        return actionStatusMap;
    }

}
