package com.fizz.business.constants;

import com.fizz.business.constants.enums.DeviceEnum;

import static com.fizz.business.constants.enums.DeviceEnum.COAT;



public class CommonConstants {

    public static final double RO = 7.86;  //硅钢密度
    public static final int OPERATE_FROM_WEB = 1;
    public static final String SYSTEM_MODULE = "CPG";

    public static class RocketMQ {

    }

    public static class CoilMeasure {

        // ======是否展示track_measure的websocket======
        public static final String SHOW_APP_WEB = "0"; // APP\WEB都展示
        public static final String SHOW_APP = "1"; // APP展示
        public static final String SHOW_WEB = "2"; // WEB展示
        public static final String SHOW_NONE = "3"; // APP\WEB都不展示

        // 硅钢密度
        public static final double RO = 7.86;

        // 新焊缝判定值
        public static final String NEW_COIL_WD_OFFSET = "NEW_COIL_WD_OFFSET";

        // 新带头判定值
        public static final String NEW_HEAD_SL_MIN = "NEW_HEAD_SL_MIN";
        // 新带头判定值
        public static final String NEW_HEAD_SL_MAX = "NEW_HEAD_SL_MAX";


        //机组运行判定最小速度
        public static final String MIN_PRO_SPEED_LIMIT = "MIN_PRO_SPEED_LIMIT";

        //卷取机上钢卷号生成最小重量[KG]
        public static final String MIN_TR_COIL_WEIGHT = "MIN_TR_COIL_WEIGHT";

        //最小剪切长度
        public static final String MIN_EXIT_CUT_LENGTH = "MIN_EXIT_CUT_LENGTH";

        //并卷带头最小距离，机组总长(600)+余量(500)
        public static final String MIN_MERGE_POS_LENGTH = "MIN_MERGE_POS_LENGTH";

        //带钢段 2米为一段
        public static final String SEG_STRIP_LEN = "SEG_STRIP_LEN";

        //卷取机前一个设备idx
        public static final DeviceEnum BEFORE_TR_IDX = COAT;

        // 工艺规程点位代码
        public static final String SETUP_POINT_CODE = "SETUP_POINT_CODE";
        // 工艺规程下限代码
        public static final String SETUP_LOWER_CODE = "SETUP_LOWER_CODE";
        // 工艺规程上限代码
        public static final String SETUP_UPPER_CODE = "SETUP_UPPER_CODE";

        public static final String MAX_UNIT_SPEED = "MAX_UNIT_SPEED";
    }

    public class RabbitMQ {
        public static final String RECEIVE_MODEL = "plateform.hmi.queue";
        public static final String RECEIVE_REAL_TIME = "plateform.realtime.queue";

        public static final String SEND_MODEL = "plateform.modpt.queue";

    }

    public static class Redis {
        public static final String CACHE = SYSTEM_MODULE + ":cache:";


        //******************COMMON_CACHE******************
        public static final String COMMON_CACHE = CACHE + "common:";
        public static final String VIRTUAL_PLAN_KEY = COMMON_CACHE + "virtual-plan"; // 虚拟计划
        public static final String ALARM_KEY_PREFIX = COMMON_CACHE + "alarm:"; // 点位报警前缀


        //******************COIL_CACHE******************
        public static final String COIL_CACHE = CACHE + "coil:";
        public static final String COIL_POSITION_KEY = COIL_CACHE + "position"; // 带钢当前位置
        public static final String COIL_STRIP_LOCATION_KEY = COIL_CACHE + "strip-location"; // 带钢上一次焊缝位
        public static final String COIL_POR_IDX_KEY = COIL_CACHE + "por-idx"; // 带钢上一次所在开卷机
        public static final String COIL_SEG_NUM_KEY = COIL_CACHE + "seg-num"; // 带钢segment数量
        public static final String COIL_SEG_LIST_KEY = COIL_CACHE + "seg-list"; // segment list
        public static final String COIL_HEAD_CUT_LEN_KEY = COIL_CACHE + "head-cut-len:"; // 带钢头部废料剪切长度
        public static final String COIL_MATMAP_LIST_KEY = COIL_CACHE + "matmap-list"; // matmap list
        public static final String COIL_HEAD_LIST_KEY = COIL_CACHE + "head-list"; // head list
        public static final String COIL_PREV_HEAD_KEY = COIL_CACHE + "prev-head"; // prev head
        public static final String COIL_MERGE_HEAD_KEY = COIL_CACHE + "merge-head"; // merge head
        public static final String COIL_MERGE_END_POS_KEY = COIL_CACHE + "merge-end-pos"; // 并卷结束位置
        public static final String EXIT_CUT_LAST_END_POS_KEY = COIL_CACHE + "exit-cut-last-end-pos"; // 出口剪切结束位置
        public static final String HEAD_DEFECT_START_POS = COIL_CACHE + "head-defect-start-pos"; // 头部缺陷起始位置
        public static final String TAIL_DEFECT_START_POS = COIL_CACHE + "tail-defect-start-pos"; // 尾部缺陷起始位置
        public static final String COIL_SETUP_KEY = COIL_CACHE + "setup:"; // 带钢工艺规程数据


        //******************COUNTER_CACHE******************
        public static final String COUNTER_CACHE = CACHE + "counter:";
        public static final String COUNTER_EXIT_CUT_KEY = COUNTER_CACHE + "exit-cut"; // 出口剪切计数
        public static final String COUNTER_HEAD_CUT_KEY = COUNTER_CACHE + "head-cut"; // 头部剪切计数
        public static final String COUNTER_POR_ONLINE_KEY = COUNTER_CACHE + "por-online"; // 钢卷上线计数
        public static final String COUNTER_POR_PAY_OVER_KEY = COUNTER_CACHE + "por-pay-over"; // 开卷机甩尾计数
        public static final String COUNTER_TR_UNLOAD_KEY = COUNTER_CACHE + "tr-unload"; // 卷取机卸卷计数
    }
}
