package cn.iocoder.yudao.module.trade.enums.foreign;
|
|
import cn.iocoder.yudao.framework.common.core.ArrayValuable;
|
import lombok.AllArgsConstructor;
|
import lombok.Getter;
|
|
import java.util.Arrays;
|
|
/**
|
* 外贸单据类型枚举
|
*
|
* @author mom
|
*/
|
@Getter
|
@AllArgsConstructor
|
public enum TradeForeignDocTypeEnum implements ArrayValuable<String> {
|
|
CONTRACT("contract", "外销合同"),
|
PACKING_LIST("packing_list", "装箱单"),
|
PRODUCT_OUTBOUND("product_outbound", "成品出库单"),
|
PORT_INBOUND("port_inbound", "港口入库单据"),
|
CUSTOMS_DECLARATION("customs_declaration", "报关单"),
|
RELEASE_NOTICE("release_notice", "放行通知书"),
|
EXPORT_INVOICE("export_invoice", "出口发票"),
|
OTHER("other", "其他");
|
|
private final String type;
|
private final String name;
|
|
public static final String[] ARRAYS = Arrays.stream(values()).map(TradeForeignDocTypeEnum::getType).toArray(String[]::new);
|
|
public static String getNameByType(String type) {
|
if (type == null) {
|
return null;
|
}
|
for (TradeForeignDocTypeEnum e : values()) {
|
if (e.getType().equals(type)) {
|
return e.getName();
|
}
|
}
|
return null;
|
}
|
|
@Override
|
public String[] array() {
|
return ARRAYS;
|
}
|
|
}
|