master
周文涛 2 years ago
parent 8217f0e367
commit 2fa171fc1d

@ -97,10 +97,15 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
if (pageList != null && pageList.getRecords() != null) {
List<String> idList = pageList.getRecords().stream().map(p -> p.getId()).collect(Collectors.toList());
List<OcrIdentifyDetail> ocrIdentifyDetailList = ocrIdentifyDetailService.list(new LambdaQueryWrapper<OcrIdentifyDetail>().in(OcrIdentifyDetail::getIdentifyId, idList));
List<OcrIdentifyDetail> ocrIdentifyDetailList = null;
if (idList.size()>0) {
ocrIdentifyDetailList = ocrIdentifyDetailService.list(new LambdaQueryWrapper<OcrIdentifyDetail>().in(OcrIdentifyDetail::getIdentifyId, idList));
}
List<OcrIdentifyDetail> identifyDetailList = new ArrayList<>();
for (OcrIdentify record : pageList.getRecords()) {
if ("1".equals(record.getStatus())) {
if ("1".equals(record.getStatus()) &&ocrIdentifyDetailList!=null&&ocrIdentifyDetailList.size()>0) {
//判断明细是否识别成功
identifyDetailList = ocrIdentifyDetailList.stream().filter(o -> o.getIdentifyId().equals(record.getId())).collect(Collectors.toList());
if (identifyDetailList.size()>0) {
@ -112,9 +117,6 @@ public class OcrIdentifyController extends JeecgController<OcrIdentify, IOcrIden
record.setTaskResult("0");
}
}
OcrRuleCheckVo ocrRuleCheckVo = ocrRuleCheckMap.get(record.getRuleCheck());
if (ocrRuleCheckVo!=null && StringUtils.isNotBlank(ocrRuleCheckVo.getMetadataConfigId())) {
record.setMetadataConfigId(ocrRuleCheckVo.getMetadataConfigId());

Loading…
Cancel
Save