package com.njcn.product.terminal.utils;

/**
 * @Author: cdf
 * @CreateTime: 2025-09-09
 * @Description:
 */
public class TerminalUtils {

    public static String comFlag(Integer comFlag) {
        switch (comFlag) {
            case 0:
                return "中断";
            case 1:
                return "正常";
            default:
                return "";
        }
    }

    public static String runFlag(Integer runFlag) {
        switch (runFlag) {
            case 0:
                return "投运";
            case 1:
                return "热备用";
            case 2:
                return "停运";
            default:
                return "";
        }
    }

    //监测点运行状态（0：投运；1：检修；2：停运；3：调试；4：退运）
    public static String lineRunFlag(Integer runFlag) {
        switch (runFlag) {
            case 0:
                return "投运";
            case 1:
                return "检修";
            case 2:
                return "停运";
            case 3:
                return "调试";
            case 4:
                return "退运";
            default:
                return "";
        }
    }

    public static Integer getRunFlag(String runFlag) {
        switch (runFlag) {
            case "投运":
                return 0;
            case "热备用":
                return 1;
            case "停运":
                return 2;
            default:
                return -1;
        }
    }


    public static String ptType(Integer ptType) {
        switch (ptType) {
            case 0:
                return "星型接线";
            case 1:
                return "三角型接线";
            case 2:
                return "开口三角型接线";
            default:
                return "";
        }
    }

}
