ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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);
}