package com.xisc.pm.infra.constant;

import java.math.BigDecimal;

/**
 * 组板常量类
 * 
 * @author jun.zeng
 *
 */
public class PmPlateConstants {
    
    public static final String ALL = "*";
    
    public static final String SELECTED_FLAG = "data";
    public static final String UN_SELECTED_FLAG = "unSelectdata";

    public static final Integer ORDER_COUNT = 56;
    
    public static final BigDecimal ACCURACY = BigDecimal.valueOf(0.001);

    public static final char BACKLOG_Q_MARK_FIRST_CHAR = 'Q';
    public static final char BACKLOG_T_MARK_FIRST_CHAR = 'T';
    public static final char BACKLOG_A_MARK_FIRST_CHAR = 'A';
    public static final char BACKLOG_N_MARK_FIRST_CHAR = 'N';

    public static final String FUR_DEAL_TYPE_Q = "Q";
    public static final String FUR_DEAL_TYPE_A = "A";
    public static final String FUR_DEAL_TYPE_G = "G";
    
    // 加热炉类型C
    public static final String FUR_TYPR_C = "C";
    
    // 默认密度 
    public static final BigDecimal DEFAULT_PROD_DENCITY = BigDecimal.valueOf(7.85f);
    
    /**
     * 长度单位：mm
     * 宽度单位：mm
     * 厚度单位：mm
     * 
     * 重量：T（吨）
     * 密度：克/cm^3
     * 
     * 长度/1000 * 宽度 /1000 * 厚度/1000 * 密度 = 重量（克） ； 
     * 重量（克） / 1000000 = 重量（吨）
     * 
     * 
     */
    // 厘米-毫米
    public static final BigDecimal CM_TO_MM = BigDecimal.TEN;
    
    // 立方厘米 - 立方毫米
    public static final BigDecimal CM3_TO_MM3 = BigDecimal.valueOf(1000);
    
    // 吨- 克
    public static final BigDecimal GRAM_TO_TON = BigDecimal.valueOf(1000000);
    
    // 10倍吨转克
    public static final BigDecimal TEN_GRAM_TO_TON = BigDecimal.valueOf(10000000);
    
    // 精度-收得率
    public static final Integer YIELD_SCALE = 5;
    
    // 精度-长度
    public static final Integer LEN_SCALE = 0;
//    public static final Integer LEN_SCALE = 2;
    
    // 精度-重量、厚度
    public static final Integer WT_SCALE = 4;
    
    // 临时精度
    public static final Integer TEM_SCALE = 8;
    
    // 组板超投原因
    public static final String PD_OVER_CAUSE = "PD_OVER_CAUSE";

    public static final String[] SMALL_PLATE_SPLIT_NO = { "000", "100", "200", "300", "400", "500", "600", "700", "800",
            "900", "A00", "B00", "C00", "D00", "E00", "F00", "G00", "H00", "J00", "K00", "L00", "M00", "N00", "P00",
            "Q00", "R00", "S00", "T00", "U00", "V00", "W00", "X00", "Y00", "Y10", "Y20", "Y30", "Y40", "Y50", "Y60",
            "Y70", "Y80", "Y90", "YA0", "YB0", "YC0", "YD0", "YE0", "YF0", "YG0", "YH0", "YJ0", "YK0", "YL0", "YM0",
            "YN0", "YP0", "YQ0", "YR0", "YS0", "YT0", "YU0", "YV0", "YW0", "YX0", "YY0", "YZ0", "Z00", "Z10", "Z20",
            "Z30", "Z40", "Z50", "Z60", "Z70", "Z80", "Z90", "ZA0", "ZB0", "ZC0", "ZD0", "ZE0", "ZF0", "ZG0", "ZH0",
            "ZJ0", "ZK0", "ZL0", "ZM0", "ZN0", "ZP0", "ZQ0", "ZR0", "ZS0", "ZT0", "ZU0", "ZV0", "ZW0", "ZX0", "ZY0",
            "ZZ0" };

    public static final char[] PLATE_SMALL_SPLIT_NO = {'0', '1','2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D',
            'E', 'F', 'G', 'H','I', 'J', 'K', 'L', 'M', 'N', 'O','P', 'Q', 'R', 'S', 'T', 'U','V', 'W', 'X', 'Y', 'Z'};

    // 氧化铁皮率
    public static final BigDecimal IRON_OXIDE_EFFECT_RATE = BigDecimal.valueOf(0.99);

    // 长度公差
    public static final BigDecimal SLAB_LEN_DIFF = BigDecimal.valueOf(100);

    // 收得率执行分布式锁Key
    public static final String YIELD_EXEC_LOCK_KEY = "xisc.pm.yield.exec.%s.%s";
    
    // 余材组板-新增删除分布式锁key
    public static final String SPLIT_PM_PD_SLAB_KEY = "xisc.pm.slab.split.%s.%s";
    
    // 二次开坯-新增删除分割分布式锁key
    public static final String MID_SPLIT_PM_PD_SLAB_KEY = "xisc.pm.mid.split.%s.%s";
    
    // 余材组板-新增删除分布式锁key
    public static final String FHB_SINGLE_CONFIRM_KEY = "xisc.pm.fhb.single.confirm.%s.%s";

    // 库区代码-5米库区
    public static final String STOCK_CODE_B05 = "B05";
    
    // 复合板材料标记
    public static final String ORDER_TYPE_CODE_QFH = "QFH";
    
    // 切断方式 S
    public static final String CUT_MODE_S = "S";

    public static final long BATCH_MAX_SIZE = 1000L;
    
    public static class EventParam {
        // 超投原因
        public static final String PD_OVER_DEVO_CAUSE = "pdOverDevoCause";
    }

}
