package com.fzzy.igds.constant;
|
|
import java.util.HashMap;
|
import java.util.Map;
|
import java.util.Set;
|
|
/**
|
* @Description 出入库流程枚举
|
* @Author CZT
|
* @Date 2025/11/25 13:22
|
*/
|
public class InoutProgress {
|
|
/**
|
* 用于存放粮类型code -name
|
*/
|
public static Map<String, String> mapProgressName = new HashMap<>();
|
|
/**
|
* 根据名称找编码
|
*
|
* @param msg
|
* @return
|
*/
|
public static String getCode(String msg) {
|
Set<String> keys = mapProgressName.keySet();
|
if (null == keys || keys.isEmpty()) return msg;
|
|
for (String key : keys) {
|
if (mapProgressName.get(key).equals(msg)) {
|
return key;
|
}
|
}
|
return msg;
|
}
|
|
/**
|
* 根据编码找名称
|
* @param code
|
* @return
|
*/
|
public static String getMsg(String code) {
|
if (null == code) return "未配置";
|
|
return mapProgressName.get(code);
|
}
|
}
|