工作信息--客户要求只要显示第一行明细记录

This commit is contained in:
dxfeng 2024-03-12 15:46:29 +08:00
parent 9e304ffc4c
commit 1aae9e5bb7
1 changed files with 16 additions and 15 deletions

View File

@ -86,12 +86,12 @@ public class ResumeIdentifyServiceImpl extends Service implements ResumeIdentify
for (int i = 0; i < jsonArray.size(); i++) {
Object obj = jsonArray.get(i);
String s = parseJsonString(obj);
if(StringUtils.isBlank(s)){
if (StringUtils.isBlank(s)) {
continue;
}
list.add(s);
}
return StringUtils.join(list,"\n");
return StringUtils.join(list, "\n");
} else if (value instanceof JSONObject) {
JSONObject jsonObject = (JSONObject) value;
Set<String> stringSet = jsonObject.keySet();
@ -394,19 +394,20 @@ public class ResumeIdentifyServiceImpl extends Service implements ResumeIdentify
JSONArray gzjl = obj.getJSONArray("工作信息");
List<Map<String, String>> workList = new ArrayList<>();
if (null != gzjl && gzjl.size() > 0) {
for (int i = 0; i < gzjl.size(); i++) {
JSONObject o = (JSONObject) gzjl.get(i);
Map<String, String> workMap = new HashMap<>();
// 工作单位
workMap.put("gzdw", o.getString("工作单位"));
// 岗位名称
workMap.put("gwmc", o.getString("工作岗位"));
// 工作经历
workMap.put("gzjl", o.getString("工作内容"));
// 工作年限
workMap.put("gznx", o.getString("工作时间"));
workList.add(workMap);
}
//for (int i = 0; i < gzjl.size(); i++) {
// 客户要求只要显示第一行明细记录
JSONObject o = (JSONObject) gzjl.get(0);
Map<String, String> workMap = new HashMap<>();
// 工作单位
workMap.put("gzdw", o.getString("工作单位"));
// 岗位名称
workMap.put("gwmc", o.getString("工作岗位"));
// 工作经历
workMap.put("gzjl", o.getString("工作内容"));
// 工作年限
workMap.put("gznx", o.getString("工作时间"));
workList.add(workMap);
//}
}
detailMap.put("gzjl", workList);