|
|
|
@ -365,7 +365,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
/////明细中,如果有字段成功的,则会覆盖其他明细的匹配失败的情况,如果全都是失败的,会获取第一次失败的.
|
|
|
|
|
for (OcrIdentifyDetail ocrIdentifyDetail : identifyDetailList) {
|
|
|
|
|
String dataStructured = ocrIdentifyDetail.getDataStructured();
|
|
|
|
|
if (org.apache.commons.lang.StringUtils.isNotBlank(dataStructured)) {
|
|
|
|
|
if (StringUtils.isNotBlank(dataStructured)) {
|
|
|
|
|
JSONArray jsonArray = JSONObject.parseArray(dataStructured);
|
|
|
|
|
List<OcrResultDTO> resultList = jsonArray.toJavaList(OcrResultDTO.class);
|
|
|
|
|
for (OcrResultDTO result : resultList) {
|
|
|
|
@ -376,7 +376,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
|
|
|
|
|
fieldRightMap.put(tag, result);
|
|
|
|
|
} else if (lastResult == null || !lastResult.getRuleValidation()) {
|
|
|
|
|
//失败时就是未获取到结果
|
|
|
|
|
result.setFailureReason(result.getTagName() + "未获取到结果");
|
|
|
|
|
result.setFailureReason(result.getTagName() + "不匹配");
|
|
|
|
|
fieldRightMap.put(tag, result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|