From 2883921cd4030338936a2c43d2f832038b811b82 Mon Sep 17 00:00:00 2001 From: shuliYao <1397940314@qq.com> Date: Mon, 1 Apr 2024 17:25:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E3=80=81=E7=BB=88=E5=AE=A1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E6=8B=A9=E9=A1=B9=E7=9B=AE=E5=90=8E=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flowable/controller/FlowTaskController.java | 4 ++-- .../xiaoyao/ocr/util/SearchParaFormatting.java | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java index f5dff51c..8fa040d0 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/flowable/controller/FlowTaskController.java @@ -391,9 +391,9 @@ public class FlowTaskController extends BaseController { String[] projectIds = izproject.split(","); // 以逗号拆分字符串 List arrayData = Arrays.asList(projectIds); SearchQueryForm searchQueryForm = new SearchQueryForm(); - searchQuery.addIn("fromprojectid", arrayData); + searchQuery.addIn("fromprojectname", arrayData); } else { - searchQuery.addEqual("fromprojectid", izproject); + searchQuery.addEqual("fromprojectname", izproject); } } if (org.springframework.util.StringUtils.hasText(izplan)) { diff --git a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/SearchParaFormatting.java b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/SearchParaFormatting.java index 029f8224..c0e35ac8 100644 --- a/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/SearchParaFormatting.java +++ b/jyjz-system/jyjz-system-oa/src/main/java/cn/jyjz/xiaoyao/ocr/util/SearchParaFormatting.java @@ -146,10 +146,24 @@ public class SearchParaFormatting { } }catch (Exception e){ } - return "section"; } + //如果不是数字区间,则按字符串处理 + if(!isInRange(searchvalue)){ + return "text"; + } + return "section"; } //3.都不是就按text文本处理 return "text"; } + + /** + * 校验是否是纯数字区间,不是就 + * @param number + * @return + */ + public static boolean isInRange(String number) { + String regex = "\\b(100|[1-9]?\\d)-\\b(100|[1-9]?\\d)"; + return number.matches(regex); + } }