package com.bcxin.ars.strategy.ministerial;

import com.abcxin.smart.validator.annotation.MinisterialAttr;

import java.lang.reflect.Field;

/**
 * @author zhangyutong
 */
public class InstitutionTypeCodeMinDataFormatStrategy implements MinDataFormatStrategy {
    @Override
    public String format(Field columnField, Object data) {
        if(data == null){
            MinisterialAttr resource = columnField.getAnnotation(MinisterialAttr.class);
            return resource.defaultValue();
        }
        String institutionType = (String) data;
        switch (institutionType) {
            case "0102":
                return "GA/T 738.1";
            case "0103":
                return "GA/T 738.5";
            case "0104":
                return "GA/T 738.12";
            default:
                return "";
        }
    }
}
