|
|
|
@ -348,6 +348,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
if (ocrArray.size()>0) {
|
|
|
|
|
ocrArrayFor: for (int i = 0; i < ocrArray.size(); i++) {
|
|
|
|
|
JSONObject ocrItem = ocrArray.get(i);
|
|
|
|
|
text = null;
|
|
|
|
|
text = ocrItem.getString("text");//ocr 识别的文本
|
|
|
|
|
probability = ocrItem.getDouble("probability");//置信度
|
|
|
|
|
log.info("ocrItem:");
|
|
|
|
@ -376,7 +377,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
}else{
|
|
|
|
|
rMessage.append(value.getFieldName() + "_参数未获取到结果<br>");
|
|
|
|
|
mapPutIfTrue(fieldRightMap, field, false);
|
|
|
|
|
ocrResultAdd(ocrResultList,value.getFieldName(), field, inputText, text, probability, imgPath, value.getFieldName() + "_参数未获取到结果", false);
|
|
|
|
|
ocrResultAdd(ocrResultList,value.getFieldName(), field, inputText, null, probability, imgPath, value.getFieldName() + "_参数未获取到结果", false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
@ -400,7 +401,6 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
identifyDetail.setStatus("0");//有失败的
|
|
|
|
|
identifyDetail.setMessage(rMessage.toString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
identifyDetail.setDataStructured(JSONArray.toJSONString(ocrResultList));//数据结构化
|
|
|
|
|
ocrIdentifyDetailService.updateById(identifyDetail);
|
|
|
|
|
}
|
|
|
|
|