package com.phlx.anchorcollect.util;

import com.phlx.anchorcollect.Configs;
import com.phlx.anchorcollect.entity.DictEntity;

import java.util.ArrayList;
import java.util.List;

public class DictUtils {

    public static List<String> getDistNameList(String type){

        List<String> distNames = new ArrayList<>();
        for (DictEntity de:Configs.dictList) {
            if(type.equals(de.getDictType())){
                distNames.add(de.getDictLabel());
            }
        }

        return distNames;
    }

    public static List<DictEntity> getDistList(String type){

        List<DictEntity> dists = new ArrayList<>();
        for (DictEntity de:Configs.dictList) {
            if(type.equals(de.getDictType())){
                dists.add(de);
            }
        }

        return dists;
    }


}
