chen.lin
昨天 b003a49794f49a329e2702918ecfc8d14b371d0d
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
package com.vincent.rsf.server.manager.service;
 
import com.vincent.rsf.server.system.entity.DictData;
 
import java.util.List;
 
/**
 * 订单类型字典:从字典表动态获取(出库单/入库单/调拨单等),兼容 API 的 1/2/3。
 */
public interface OrderTypeDictService {
 
    /**
     * 查询所有启用的订单类型(带缓存)
     */
    List<DictData> listAll();
 
    /**
     * 根据显示名称取类型编码,如 "出库单" -> "out"
     */
    String getTypeByLabel(String label);
 
    /**
     * 根据类型编码取显示名称,如 "out" -> "出库单"
     */
    String getLabelByType(String type);
 
    /**
     * 解析入参为内部类型编码。支持:数字 1/2/3、中文 "出库单"/"入库单"/"调拨单"、内部码 "out"/"in"/"transfer"
     */
    String resolveType(String input);
 
    /**
     * 解析 Integer 类型的 orderType(API 约定 1=出库 2=入库 3=调拨)
     */
    String resolveType(Integer orderType);
 
    void refreshCache();
}