diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrIdentifyController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrIdentifyController.java index afba740..ccf0869 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrIdentifyController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/ocr/controller/OcrIdentifyController.java @@ -97,10 +97,15 @@ public class OcrIdentifyController extends JeecgController idList = pageList.getRecords().stream().map(p -> p.getId()).collect(Collectors.toList()); - List ocrIdentifyDetailList = ocrIdentifyDetailService.list(new LambdaQueryWrapper().in(OcrIdentifyDetail::getIdentifyId, idList)); + List ocrIdentifyDetailList = null; + if (idList.size()>0) { + ocrIdentifyDetailList = ocrIdentifyDetailService.list(new LambdaQueryWrapper().in(OcrIdentifyDetail::getIdentifyId, idList)); + + } + List 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