master
周文涛 2 years ago
parent 26bd0bf88a
commit 35d3d117c3

@ -265,7 +265,7 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
ocrIdentifyDetailList = ocrIdentifyDetailService.list(new LambdaQueryWrapper<OcrIdentifyDetail>().eq(OcrIdentifyDetail::getIdentifyId, id)); ocrIdentifyDetailList = ocrIdentifyDetailService.list(new LambdaQueryWrapper<OcrIdentifyDetail>().eq(OcrIdentifyDetail::getIdentifyId, id));
List<OcrIdentifyDetail> identifyDetailList = new ArrayList<>(); List<OcrIdentifyDetail> identifyDetailList = new ArrayList<>();
if ("1".equals(ocrIdentify.getStatus()) &&ocrIdentifyDetailList!=null&&ocrIdentifyDetailList.size()>0) { /* if ("1".equals(ocrIdentify.getStatus()) &&ocrIdentifyDetailList!=null&&ocrIdentifyDetailList.size()>0) {
//判断明细是否识别成功 //判断明细是否识别成功
identifyDetailList = ocrIdentifyDetailList.stream().filter(o -> o.getIdentifyId().equals(ocrIdentify.getId())).collect(Collectors.toList()); identifyDetailList = ocrIdentifyDetailList.stream().filter(o -> o.getIdentifyId().equals(ocrIdentify.getId())).collect(Collectors.toList());
if (identifyDetailList.size()>0) { if (identifyDetailList.size()>0) {
@ -276,7 +276,7 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
//失败 //失败
ocrIdentify.setTaskResult("0"); ocrIdentify.setTaskResult("0");
} }
} }*/
if (StringUtils.isNotBlank(ocrIdentify.getTaskResultInfo())) { if (StringUtils.isNotBlank(ocrIdentify.getTaskResultInfo())) {
List<OcrResult2> ocrResult2s = JSONObject.parseArray(ocrIdentify.getTaskResultInfo()).toJavaList(OcrResult2.class); List<OcrResult2> ocrResult2s = JSONObject.parseArray(ocrIdentify.getTaskResultInfo()).toJavaList(OcrResult2.class);

@ -98,7 +98,8 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
ocrIdentifyDetail.setIdentifyId(identifyId); ocrIdentifyDetail.setIdentifyId(identifyId);
ocrIdentifyDetail.setImageName(imgName); ocrIdentifyDetail.setImageName(imgName);
ocrIdentifyDetail.setImageUrl(imgPath); ocrIdentifyDetail.setImageUrl(imgPath);
ocrIdentifyDetail.setStatus(taskStatus); //ocrIdentifyDetail.setStatus(taskStatus);
ocrIdentifyDetail.setStatus("0");
ocrIdentifyDetail.setMessage(message); ocrIdentifyDetail.setMessage(message);
ocrIdentifyDetail.setExecutionTime(executionTime); ocrIdentifyDetail.setExecutionTime(executionTime);
ocrIdentifyDetail.setSemanticResult(semanticResult.toJSONString()); ocrIdentifyDetail.setSemanticResult(semanticResult.toJSONString());
@ -182,9 +183,9 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
//其中有一个字段 全部都是 失败,则该图片失败. //其中有一个字段 全部都是 失败,则该图片失败.
if (fieldRightMap != null && fieldRightMap.values().size() > 0 && !fieldRightMap.containsValue(false)) { if (fieldRightMap != null && fieldRightMap.values().size() > 0 && !fieldRightMap.containsValue(false)) {
ocrIdentifyDetail.setStatus("0");//全部通过 ocrIdentifyDetail.setStatus("1");//全部通过
} else { } else {
ocrIdentifyDetail.setStatus("1");//有失败的 ocrIdentifyDetail.setStatus("0");//有失败的
ocrIdentifyDetail.setMessage(rMessage.toString()); ocrIdentifyDetail.setMessage(rMessage.toString());
} }
ocrIdentifyDetail.setDataStructured(JSONArray.toJSONString(ocrResultList));//数据结构化 ocrIdentifyDetail.setDataStructured(JSONArray.toJSONString(ocrResultList));//数据结构化

Loading…
Cancel
Save