master
周文涛 2 years ago
parent 47a1ed8eac
commit 276f148cb3

@ -180,27 +180,27 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
JSONArray jsonArray = new JSONArray();
if (Arrays.asList("医生名称","姓名","医生").contains(s)) {
for (String s1 : Arrays.asList("医生名称", "姓名", "医生")) {
JSONArray semantic_result = semanticResult.getJSONObject("semantic_result").getJSONArray(s1);
JSONArray semantic_result = semanticResult.getJSONArray(s1);
if (CollectionUtils.isNotEmpty(semantic_result)) {
jsonArray.addAll(semantic_result);
}
}
}else if (Arrays.asList("科室名称","科室").contains(s)) {
for (String s1 : Arrays.asList("科室名称","科室")) {
JSONArray semantic_result = semanticResult.getJSONObject("semantic_result").getJSONArray(s1);
JSONArray semantic_result = semanticResult.getJSONArray(s1);
if (CollectionUtils.isNotEmpty(semantic_result)) {
jsonArray.addAll(semantic_result);
}
}
}else if (Arrays.asList("医院名称","医院").contains(s)) {
for (String s1 : Arrays.asList("医院名称","医院")) {
JSONArray semantic_result = semanticResult.getJSONObject("semantic_result").getJSONArray(s1);
JSONArray semantic_result = semanticResult.getJSONArray(s1);
if (CollectionUtils.isNotEmpty(semantic_result)) {
jsonArray.addAll(semantic_result);
}
}
}else{
jsonArray = semanticResult.getJSONObject("semantic_result").getJSONArray(s);
jsonArray = semanticResult.getJSONArray(s);
}
if (jsonArray != null && jsonArray.size() > 0) {
ocrArray.addAll(jsonArray.toJavaList(JSONObject.class));

Loading…
Cancel
Save