From bb51eb4d7daec4fd5f810b5f7c82804799f355b6 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Tue, 3 Sep 2024 18:26:49 +0800
Subject: [PATCH 1/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E7=BB=84=E5=90=88=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1237746444632064]后端-组合过滤条件代码优化 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1237746444632064
---
.../condition/dto/ConditionBaseVo.java | 59 +++++++++++++++++++
.../condition/dto/ConditionConfigBaseVo.java | 47 +++++++++++++++
.../condition/dto/ConditionGroupBaseVo.java | 52 ++++++++++++++++
.../framework/condition/dto/RelVo.java | 51 ++++++++++++++++
.../condition/dto/TestConditionConfigVo.java | 59 +++++++++++++++++++
5 files changed, 268 insertions(+)
create mode 100644 src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java
create mode 100644 src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
create mode 100644 src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java
create mode 100644 src/main/java/neatlogic/framework/condition/dto/RelVo.java
create mode 100644 src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java
diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java
new file mode 100644
index 000000000..dfecbfdc4
--- /dev/null
+++ b/src/main/java/neatlogic/framework/condition/dto/ConditionBaseVo.java
@@ -0,0 +1,59 @@
+/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .*/
+
+package neatlogic.framework.condition.dto;
+
+import java.io.Serializable;
+
+public class ConditionBaseVo implements Serializable {
+ private static final long serialVersionUID = -776692828809703841L;
+
+ protected String uuid;
+ protected String name;
+ protected String expression;
+ protected Object valueList;
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public Object getValueList() {
+ return valueList;
+ }
+
+ public void setValueList(Object valueList) {
+ this.valueList = valueList;
+ }
+}
diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
new file mode 100644
index 000000000..122a9bb38
--- /dev/null
+++ b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.condition.dto;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ConditionConfigBaseVo> implements Serializable {
+
+ private static final long serialVersionUID = 5439300427812355573L;
+
+ protected List conditionGroupList = new ArrayList<>();
+
+ protected List conditionGroupRelList = new ArrayList<>();
+
+ public List getConditionGroupList() {
+ return conditionGroupList;
+ }
+
+ public void setConditionGroupList(List conditionGroupList) {
+ this.conditionGroupList = conditionGroupList;
+ }
+
+ public List getConditionGroupRelList() {
+ return conditionGroupRelList;
+ }
+
+ public void setConditionGroupRelList(List conditionGroupRelList) {
+ this.conditionGroupRelList = conditionGroupRelList;
+ }
+}
diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java
new file mode 100644
index 000000000..142d532ef
--- /dev/null
+++ b/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java
@@ -0,0 +1,52 @@
+/*Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .*/
+
+package neatlogic.framework.condition.dto;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class ConditionGroupBaseVo implements Serializable {
+ private static final long serialVersionUID = 8392325201425982471L;
+
+ protected String uuid;
+ protected List conditionList;
+ protected List conditionRelList;
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public List getConditionList() {
+ return conditionList;
+ }
+
+ public void setConditionList(List conditionList) {
+ this.conditionList = conditionList;
+ }
+
+ public List getConditionRelList() {
+ return conditionRelList;
+ }
+
+ public void setConditionRelList(List conditionRelList) {
+ this.conditionRelList = conditionRelList;
+ }
+
+}
diff --git a/src/main/java/neatlogic/framework/condition/dto/RelVo.java b/src/main/java/neatlogic/framework/condition/dto/RelVo.java
new file mode 100644
index 000000000..faddda734
--- /dev/null
+++ b/src/main/java/neatlogic/framework/condition/dto/RelVo.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.condition.dto;
+
+import java.io.Serializable;
+
+public class RelVo implements Serializable {
+
+ private String from;
+ private String to;
+ private String joinType;
+
+ public String getFrom() {
+ return from;
+ }
+
+ public void setFrom(String from) {
+ this.from = from;
+ }
+
+ public String getTo() {
+ return to;
+ }
+
+ public void setTo(String to) {
+ this.to = to;
+ }
+
+ public String getJoinType() {
+ return joinType;
+ }
+
+ public void setJoinType(String joinType) {
+ this.joinType = joinType;
+ }
+}
diff --git a/src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java b/src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java
new file mode 100644
index 000000000..f5e8542bf
--- /dev/null
+++ b/src/main/java/neatlogic/framework/condition/dto/TestConditionConfigVo.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.condition.dto;
+
+import java.util.List;
+
+public class TestConditionConfigVo extends ConditionConfigBaseVo> {
+
+ public static void main(String[] args) {
+ TestConditionConfigVo testConditionConfigVo = new TestConditionConfigVo();
+ List> conditionGroupList1 = testConditionConfigVo.getConditionGroupList();
+ for (TestConditionGroupVo conditionGroupVo : conditionGroupList1) {
+ System.out.println("conditionGroupVo.getId() = " + conditionGroupVo.getId());
+ List conditionList = conditionGroupVo.getConditionList();
+ for (TestConditionVo conditionVo : conditionList) {
+ System.out.println("conditionVo.getUuid() = " + conditionVo.getUuid());
+ System.out.println("conditionVo.getId() = " + conditionVo.getId());
+ }
+ }
+ }
+
+ public static class TestConditionVo extends ConditionBaseVo {
+ private String id;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+ }
+ public static class TestConditionGroupVo extends ConditionGroupBaseVo {
+ private String id;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+ }
+}
--
Gitee
From 4802cfadc067992ec0ea775fafee3c7ebf1b1da8 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Tue, 3 Sep 2024 18:55:15 +0800
Subject: [PATCH 2/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E7=BB=84=E5=90=88=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1237746444632064]后端-组合过滤条件代码优化 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1237746444632064
---
.../framework/condition/dto/ConditionConfigBaseVo.java | 10 ++++++++++
.../framework/condition/dto/ConditionGroupBaseVo.java | 9 +++++++++
2 files changed, 19 insertions(+)
diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
index 122a9bb38..6fbaf0afd 100644
--- a/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
+++ b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
@@ -20,6 +20,7 @@ package neatlogic.framework.condition.dto;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import java.util.Objects;
public class ConditionConfigBaseVo> implements Serializable {
@@ -44,4 +45,13 @@ public class ConditionConfigBaseVo conditionGroupRelList) {
this.conditionGroupRelList = conditionGroupRelList;
}
+
+ protected T getConditionGroupByUuid(String uuid) {
+ for (T t : conditionGroupList) {
+ if (Objects.equals(t.getUuid(), uuid)) {
+ return t;
+ }
+ }
+ return null;
+ }
}
diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java
index 142d532ef..0cda06745 100644
--- a/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java
+++ b/src/main/java/neatlogic/framework/condition/dto/ConditionGroupBaseVo.java
@@ -17,6 +17,7 @@ package neatlogic.framework.condition.dto;
import java.io.Serializable;
import java.util.List;
+import java.util.Objects;
public class ConditionGroupBaseVo implements Serializable {
private static final long serialVersionUID = 8392325201425982471L;
@@ -49,4 +50,12 @@ public class ConditionGroupBaseVo implements Serializ
this.conditionRelList = conditionRelList;
}
+ protected T getConditionByUuid(String uuid) {
+ for (T t : conditionList) {
+ if (Objects.equals(t.getUuid(), uuid)) {
+ return t;
+ }
+ }
+ return null;
+ }
}
--
Gitee
From b329f4082d9e0a0e1e9e46a96d3b73cc9b9c04ad Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Tue, 3 Sep 2024 19:10:33 +0800
Subject: [PATCH 3/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E7=BB=84=E5=90=88=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1237746444632064]后端-组合过滤条件代码优化 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1237746444632064
---
.../framework/condition/dto/ConditionConfigBaseVo.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
index 6fbaf0afd..148dde6d0 100644
--- a/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
+++ b/src/main/java/neatlogic/framework/condition/dto/ConditionConfigBaseVo.java
@@ -17,12 +17,14 @@
package neatlogic.framework.condition.dto;
+import neatlogic.framework.common.dto.BaseEditorVo;
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
-public class ConditionConfigBaseVo> implements Serializable {
+public class ConditionConfigBaseVo> extends BaseEditorVo implements Serializable {
private static final long serialVersionUID = 5439300427812355573L;
--
Gitee