简历识别解析BUG修复

This commit is contained in:
dxfeng 2024-03-25 16:26:49 +08:00
parent 52a7f35980
commit afb13dc392
1 changed files with 26 additions and 1 deletions

View File

@ -185,8 +185,15 @@ public class ResumeRecognitionServiceImpl extends Service implements ResumeRecog
//dataMap.put("jzd", parseArray(obj.getJSONArray("现居住地")));
// 政治面貌
// 在职状态
// 工作经验
dataMap.put("gzjy", parseArray(obj.getJSONArray("工作经验")));
List<Map<String, String>> gzjy = getBrowserArray(parseArray(obj.getJSONArray("工作经验")), this::getWorkExperienceArray);
if (CollectionUtils.isNotEmpty(gzjy)) {
dataMap.put("gzjy", gzjy);
if (!isCard) {
dataMap.put("gzjy", gzjy.stream().map(item -> item.get("id")).collect(Collectors.joining(",")));
}
}
// 最高学位
List<Map<String, String>> zgxw = getBrowserArray(parseArray(obj.getJSONArray("最高学位")), this::getDegreeArray);
if (CollectionUtils.isNotEmpty(zgxw)) {
@ -463,6 +470,24 @@ public class ResumeRecognitionServiceImpl extends Service implements ResumeRecog
return map;
}
/**
* 构建工作经验字段信息
*
* @param text
* @return
*/
private Map<String, String> getWorkExperienceArray(String text) {
Map<String, String> map = new HashMap<>(2);
if (StringUtils.isNotBlank(text)) {
String id = ModeBrowserCommonInfo.getWorkExperience(text);
if (StringUtils.isNotBlank(id)) {
map.put("id", id);
map.put("name", text);
}
}
return map;
}
/**
* 构建浏览按钮字段信息格式
*