From 2fa171fc1da9f2ab8ddb8de16105595a8f95ae97 Mon Sep 17 00:00:00 2001 From: zhouwentao <1577701412@qq.com> Date: Tue, 1 Aug 2023 19:12:14 +0800 Subject: [PATCH] updates --- .../ocr/controller/OcrIdentifyController.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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