根据股票代码判断板块属性

根据股票代码判断板块属性
    /**
     * 获取股票板块信息
     * 沪市A股 : 600、601、603 开头
     * 深市A股 : 000开头
     * 中小板 : 002开头
     * 创业板 : 300开头
     * 沪市新股申购:730
     * @param code
     * @return
     */
    public static int getPlateInfo(String code){
    if(code.startsWith("600") || code.startsWith("601") || code.startsWith("603")){
    return 0;
    }else if(code.startsWith("000")){
    return 1;
    }else if(code.startsWith("002")){
    return 2;
    }else if(code.startsWith("300")){
    return 3;
    }else if(code.startsWith("730")){
    return 4;
    }else {
    return 5;
    }
    }

你可能感兴趣的:(根据股票代码判断板块属性)