package com.mortals.xhx.common.code;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 产品资源部署
 *
 * @author: zxfei
 * @date: 2024/9/14 14:21
 */
public enum ProductDisEnum {
    网关服务("smart-gateway", "smart-gateway"),
    基础服务后端("base-manager", "base-manager"),
    基础服务前端("base-manager-ui", "base-manager-ui"),
    门户服务后端("portal-manager", "portal-manager"),
    门户服务前端("portal-manager-ui", "portal-manager-ui"),
    日志管理服务后端("log-manager", "log-manager"),
    日志管理服务前端("log-manager-ui", "log-manager-ui"),
    设备管理服务后端("device-manager", "device-manager"),
    设备管理服务前端("device-manager-ui", "device-manager-ui"),
    填单服务后端("fill-manager", "fill-manager"),
    填单管理前端("write-doc-manager-ui", "write-doc-manager-ui"),
    样表服务后端("sample-form-manager", "sample-form-manager"),
    样表前端("sample-form-manager-ui", "sample-form-manager-ui"),
    考勤绩效后端("attendance-performance-manager", "attendance-performance-manager"),
    考勤绩效前端("attendance-performance-manager-ui", "attendance-performance-manager-ui"),
    自助服务后端("sst-manager", "sst-manager"),
    自助服务前端("self-service-manage", "self-service-manage"),
    证照打印后端("certificate-manager", "certificate-manager"),
    证照打印前端("license-print-manger", "license-print-manger"),
    DATAV管理后台后端("datav-manager", "datav-manager"),
    DATAV管理后台前端("datav-portal", "datav-portal"),
    报表系统管理后端("bill-manager", "bill-manager"),
    报表系统管理前端("bill-manager-ui", "bill-manager-ui"),
    存取件前端("access-manager-ui", "access-manager-ui"),
    窗口服务行为监察前端("ai-xnjc-ui", "ai-xnjc-ui"),
    窗口服务行为监察PHP后端("monitor", "monitor"),
    背靠背评价系统管理后台前端("back-to-back-pc-ui", "back-to-back-pc-ui"),
    数据驾驶舱前端("cabin", "cabin"),
    数据资源管理后台前端("data-resources", "data-resources"),
    导视系统管理前端("guide-manager", "guide-manager"),
    信息发布管理前端("information-publish", "information-publish"),
    网络理政管理前端("network-system", "network-system"),
    办不成事管理前端("nothing-manager", "nothing-manager"),
    排号系统管理前端("number-manager", "number-manager"),
    预约系统管理前端("order-manager", "order-manager"),
    报表管理前端("report-system", "report-system"),
    可视化播控前端("bokong-manager", "bokong-manager"),
    微官网前端("weChat-ui", "weChat-ui"),
    窗口评价前端("window-evaluate", "window-evaluate"),
    排号系统PHP后端("zwfw4", "zwfw4"),
    ;
    private String value;
    private String desc;

    ProductDisEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }

    public static ProductDisEnum getByValue(String value) {
        for (ProductDisEnum productDisEnum : ProductDisEnum.values()) {
            if (productDisEnum.getValue().equals(value)) {
                return productDisEnum;
            }
        }
        return null;
    }

    /**
     * 获取Map集合
     *
     * @param eItem 不包含项
     * @return
     */
    public static Map<String, String> getEnumMap(String... eItem) {
        Map<String, String> resultMap = new LinkedHashMap<>();
        for (ProductDisEnum item : ProductDisEnum.values()) {
            try {
                boolean hasE = false;
                for (String e : eItem) {
                    if (item.getValue().equals(e)) {
                        hasE = true;
                        break;
                    }
                }
                if (!hasE) {
                    resultMap.put(item.getValue() + "", item.getDesc());
                }
            } catch (Exception ex) {

            }
        }
        return resultMap;
    }
}