public Map<String, String> getSplcName() { List<Map<String,String>> splcName = approveMapper.getysCodeItemsName("XMJG_SPLCLX"); if (!CollectionUtils.isEmpty(splcName)) { Map<String, String> splc = splcName.stream().collect(Collectors.toMap(a -> { return a.get("CODE").toString(); }, a -> { return a.get("NAME").toString(); }, (a, b) -> a)); return splc; } return null; }
Map<String, String> SplcNameList = getSplcName();
//
对应编码的名称
String name = SplcNameList.get('编码');