package com.vci.web.service;
|
|
import com.vci.corba.omd.etm.EnumType;
|
import com.vci.pagemodel.KeyValue;
|
import com.vci.pagemodel.OsEnumItemVO;
|
import com.vci.pagemodel.OsEnumVO;
|
import com.vci.starter.web.exception.VciBaseException;
|
|
import java.util.Collection;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @Description 枚举服务接口
|
* @Author dangsn
|
* @Date 2024/11/28 11:18
|
*/
|
public interface WebEnumServiceI {
|
|
/**
|
* 根据枚举的key获取枚举的对象
|
* @param enumCode 枚举的编号
|
* @return 枚举包含的值
|
* @throws VciBaseException 获取枚举出错的时候会抛出异常
|
*/
|
List<KeyValue> getEnum(String enumCode) throws VciBaseException;
|
|
/**
|
* 根据枚举的值,获取对应的显示文本
|
* @param enumCode 枚举的编号
|
* @param enumKey 枚举的值
|
* @return 枚举的文本
|
* @throws VciBaseException 获取枚举出错的时候会抛出异常
|
*/
|
String getValue(String enumCode, String enumKey);
|
|
/**
|
* 枚举的数据对象转换为显示对象
|
* @param enumType 数据对象
|
* @return 显示对象
|
*/
|
OsEnumVO enumDO2VO(EnumType enumType);
|
|
/**
|
* 枚举明细转换为KV
|
* @param enumItemVOS 枚举明细显示对象
|
* @return KV
|
*/
|
List<KeyValue> enumItem2KV(Collection<OsEnumItemVO> enumItemVOS);
|
|
/**
|
* 查询所有的枚举映射
|
* @return key是枚举的英文名称
|
*/
|
Map<String,OsEnumVO> selectAllEnumMap();
|
|
/**
|
* 查询所有的枚举
|
* @return 枚举的显示对象
|
*/
|
List<OsEnumVO> selectAllEnum();
|
|
/**
|
* 枚举的数据对象转换为显示对象
|
* @param enumItems 枚举的对象
|
* @return 显示对象
|
*/
|
List<OsEnumVO> enumDO2VOs(Collection<EnumType> enumItems);
|
|
/**
|
* 获取枚举的映射
|
* @param enumCode 枚举的编号
|
* @return 枚举的值
|
* @throws VciBaseException 获取枚举出错的时候会抛出异常
|
*/
|
Map<String,String> getEnumValueMap(String enumCode);
|
}
|