From afc58d1d04d8670129d5c7f001c2480aa3475892 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Fri, 31 May 2024 17:48:38 +0800
Subject: [PATCH 1/3] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=89=80=E6=9C=89=E7=BB=84=E4=BB=B6=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E3=80=90=E8=8B=B1=E6=96=87=E5=90=8D=E3=80=91=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
#[1168773799706624]后端-表单所有组件增加【英文名】属性 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1168773799706624
---
.../framework/form/dao/mapper/FormMapper.xml | 15 +++++++++++++++
.../framework/form/dto/AttributeDataVo.java | 9 +++++++++
.../framework/form/dto/FormAttributeVo.java | 3 ++-
.../framework/form/dto/FormVersionVo.java | 5 +++--
.../changelog/2024-05-31/neatlogic_tenant.sql | 6 ++++++
.../framework/changelog/2024-05-31/version.json | 10 ++++++++++
6 files changed, 45 insertions(+), 3 deletions(-)
create mode 100644 src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/neatlogic_tenant.sql
create mode 100644 src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/version.json
diff --git a/src/main/java/neatlogic/framework/form/dao/mapper/FormMapper.xml b/src/main/java/neatlogic/framework/form/dao/mapper/FormMapper.xml
index 1272bc126..8beea1a55 100644
--- a/src/main/java/neatlogic/framework/form/dao/mapper/FormMapper.xml
+++ b/src/main/java/neatlogic/framework/form/dao/mapper/FormMapper.xml
@@ -291,6 +291,7 @@ along with this program. If not, see .-->
SELECT a.`form_uuid` AS formUuid,
a.`formversion_uuid` as formversionUuid,
a.`uuid`,
+ a.`key`,
a.`label`,
a.`type`,
a.`handler`,
@@ -307,6 +308,7 @@ along with this program. If not, see .-->
a.`form_uuid` AS formUuid,
a.`formversion_uuid` as formversionUuid,
a.`uuid`,
+ a.`key`,
a.`label`,
a.`type`,
a.`handler`,
@@ -326,6 +328,7 @@ along with this program. If not, see .-->
b.`form_uuid` AS formUuid,
b.`formversion_uuid` AS formversionUuid,
b.`uuid`,
+ b.`key`,
b.`label`,
b.`type`,
b.`handler`,
@@ -408,6 +411,7 @@ along with this program. If not, see .-->
a.`form_uuid` AS formUuid,
a.`handler`,
a.`attribute_label` AS attributeLabel,
+ a.`attribute_key` AS attributeKey,
a.`attribute_uuid` AS attributeUuid,
a.`data`
FROM `form_attribute_data` a
@@ -422,6 +426,7 @@ along with this program. If not, see .-->
`form_uuid` AS formUuid,
`handler`,
`attribute_label` AS attributeLabel,
+ `attribute_key` AS attributeKey,
`attribute_uuid` AS attributeUuid,
`data`
FROM `form_attribute_data`
@@ -543,6 +548,7 @@ along with this program. If not, see .-->
INSERT INTO `form_attribute` (`form_uuid`,
`formversion_uuid`,
`uuid`,
+ `key`,
`label`,
`type`,
`handler`,
@@ -551,6 +557,7 @@ along with this program. If not, see .-->
VALUES (#{formUuid},
#{formVersionUuid},
#{uuid},
+ #{key},
#{label},
#{type},
#{handler},
@@ -586,12 +593,14 @@ along with this program. If not, see .-->
`form_uuid`,
`handler`,
`attribute_label`,
+ `attribute_key`,
`attribute_uuid`,
`data`)
VALUES (#{id},
#{formUuid},
#{handler},
#{attributeLabel},
+ #{attributeKey},
#{attributeUuid},
#{data,typeHandler=CompressHandler})
ON DUPLICATE KEY
@@ -603,6 +612,7 @@ along with this program. If not, see .-->
`form_uuid`,
`handler`,
`attribute_label`,
+ `attribute_key`,
`attribute_uuid`,
`data`)
VALUES
@@ -611,6 +621,7 @@ along with this program. If not, see .-->
#{item.formUuid},
#{item.handler},
#{item.attributeLabel},
+ #{item.attributeKey},
#{item.attributeUuid},
#{item.data,typeHandler=CompressHandler})
@@ -624,6 +635,7 @@ along with this program. If not, see .-->
`handler`,
`tag`,
`attribute_label`,
+ `attribute_key`,
`attribute_uuid`,
`data`)
VALUES (#{id},
@@ -631,6 +643,7 @@ along with this program. If not, see .-->
#{handler},
#{tag},
#{attributeLabel},
+ #{attributeKey},
#{attributeUuid},
#{data,typeHandler=CompressHandler})
ON DUPLICATE KEY
@@ -643,6 +656,7 @@ along with this program. If not, see .-->
`handler`,
`tag`,
`attribute_label`,
+ `attribute_key`,
`attribute_uuid`,
`data`)
VALUES
@@ -652,6 +666,7 @@ along with this program. If not, see .-->
#{item.handler},
#{item.tag},
#{item.attributeLabel},
+ #{item.attributeKey},
#{item.attributeUuid},
#{item.data,typeHandler=CompressHandler})
diff --git a/src/main/java/neatlogic/framework/form/dto/AttributeDataVo.java b/src/main/java/neatlogic/framework/form/dto/AttributeDataVo.java
index 54e19b4aa..47116b881 100644
--- a/src/main/java/neatlogic/framework/form/dto/AttributeDataVo.java
+++ b/src/main/java/neatlogic/framework/form/dto/AttributeDataVo.java
@@ -33,6 +33,7 @@ public class AttributeDataVo implements Comparable, Serializabl
private String formUuid;
private String tag;
private String attributeUuid;
+ private String attributeKey;
private String attributeLabel;
private String handler;
@JSONField(serialize = false)
@@ -67,6 +68,14 @@ public class AttributeDataVo implements Comparable, Serializabl
this.attributeUuid = attributeUuid;
}
+ public String getAttributeKey() {
+ return attributeKey;
+ }
+
+ public void setAttributeKey(String attributeKey) {
+ this.attributeKey = attributeKey;
+ }
+
public String getAttributeLabel() {
return attributeLabel;
}
diff --git a/src/main/java/neatlogic/framework/form/dto/FormAttributeVo.java b/src/main/java/neatlogic/framework/form/dto/FormAttributeVo.java
index 1f8ef9372..e469e2f31 100644
--- a/src/main/java/neatlogic/framework/form/dto/FormAttributeVo.java
+++ b/src/main/java/neatlogic/framework/form/dto/FormAttributeVo.java
@@ -96,11 +96,12 @@ public class FormAttributeVo implements Serializable {
this.formVersionUuid = formVersionUuid;
}
- public FormAttributeVo(String formUuid, String formVersionUuid, String uuid, String label, String type,
+ public FormAttributeVo(String formUuid, String formVersionUuid, String uuid, String key, String label, String type,
String handler, boolean isRequired, JSONObject config, String data) {
this.uuid = uuid;
this.formUuid = formUuid;
this.formVersionUuid = formVersionUuid;
+ this.key = key;
this.label = label;
this.type = type;
this.handler = handler;
diff --git a/src/main/java/neatlogic/framework/form/dto/FormVersionVo.java b/src/main/java/neatlogic/framework/form/dto/FormVersionVo.java
index 02a0b0e13..723f36b71 100644
--- a/src/main/java/neatlogic/framework/form/dto/FormVersionVo.java
+++ b/src/main/java/neatlogic/framework/form/dto/FormVersionVo.java
@@ -221,7 +221,7 @@ public class FormVersionVo extends BaseEditorVo {
JSONObject controllerObj = controllerList.getJSONObject(i);
JSONObject config = controllerObj.getJSONObject("config");
if (MapUtils.isNotEmpty(config)) {
- formAttributeList.add(new FormAttributeVo(this.getFormUuid(), this.getUuid(), controllerObj.getString("uuid"), controllerObj.getString("label"), controllerObj.getString("type"), controllerObj.getString("handler"), config.getBooleanValue("isRequired"), config, config.getString("defaultValueList")));
+ formAttributeList.add(new FormAttributeVo(this.getFormUuid(), this.getUuid(), controllerObj.getString("uuid"), null, controllerObj.getString("label"), controllerObj.getString("type"), controllerObj.getString("handler"), config.getBooleanValue("isRequired"), config, config.getString("defaultValueList")));
}
}
}
@@ -235,12 +235,13 @@ public class FormVersionVo extends BaseEditorVo {
JSONObject config = componentObj.getJSONObject("config");
if (MapUtils.isNotEmpty(config)) {
String uuid = componentObj.getString("uuid");
+ String key = componentObj.getString("key");
String label = componentObj.getString("label");
String type = componentObj.getString("type");
String handler = componentObj.getString("handler");
boolean isRequired = config.getBooleanValue("isRequired");
String defaultValue = config.getString("defaultValue");
- return new FormAttributeVo(this.getFormUuid(), this.getUuid(), uuid, label, type, handler, isRequired, config, defaultValue);
+ return new FormAttributeVo(this.getFormUuid(), this.getUuid(), uuid, key, label, type, handler, isRequired, config, defaultValue);
}
return null;
}
diff --git a/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/neatlogic_tenant.sql b/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/neatlogic_tenant.sql
new file mode 100644
index 000000000..288163fe1
--- /dev/null
+++ b/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/neatlogic_tenant.sql
@@ -0,0 +1,6 @@
+ALTER TABLE `form_attribute`
+ ADD COLUMN `key` VARCHAR(100) NOT NULL COMMENT '属性英文名' AFTER `uuid`;
+ALTER TABLE `form_attribute_data`
+ ADD COLUMN `attribute_key` VARCHAR(100) NOT NULL COMMENT '属性英文名' AFTER `attribute_label`;
+ALTER TABLE `form_extend_attribute_data`
+ ADD COLUMN `attribute_key` VARCHAR(100) NOT NULL COMMENT '属性英文名' AFTER `attribute_label`;
\ No newline at end of file
diff --git a/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/version.json b/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/version.json
new file mode 100644
index 000000000..5fc265f5d
--- /dev/null
+++ b/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/version.json
@@ -0,0 +1,10 @@
+{
+ "content":[
+ {
+ "type":"新增功能",
+ "detail":[
+ {"msg":"1.表单所有组件增加【英文名】属性"}
+ ]
+ }
+ ]
+}
--
Gitee
From fa7791ccd56d4cc24edbcc6008c8f8552441fa86 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Fri, 31 May 2024 17:56:43 +0800
Subject: [PATCH 2/3] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=89=80=E6=9C=89=E7=BB=84=E4=BB=B6=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E3=80=90=E8=8B=B1=E6=96=87=E5=90=8D=E3=80=91=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
#[1168773799706624]后端-表单所有组件增加【英文名】属性 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1168773799706624
---
.../resources/neatlogic/resources/framework/sqlscript/ddl.sql | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql b/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql
index 7dce884c9..1bbf2fdca 100644
--- a/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql
+++ b/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql
@@ -262,6 +262,7 @@ CREATE TABLE IF NOT EXISTS `form_attribute` (
`form_uuid` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表单uuid',
`formversion_uuid` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表单版本uuid',
`uuid` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性uuid',
+ `key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性英文名',
`label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '属性名',
`type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '属性类型,系统属性不允许修改',
`handler` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '属性处理器',
@@ -278,6 +279,7 @@ CREATE TABLE IF NOT EXISTS `form_attribute_data` (
`form_uuid` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表单uuid',
`handler` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
`attribute_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性名',
+ `attribute_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性英文名',
`attribute_uuid` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性uuid',
`data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '属性值,json格式',
PRIMARY KEY (`id`) USING BTREE
@@ -338,6 +340,7 @@ CREATE TABLE IF NOT EXISTS `form_extend_attribute_data` (
`handler` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
`tag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标签',
`attribute_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性名',
+ `attribute_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性英文名',
`attribute_uuid` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性uuid',
`data` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '属性值,json格式',
PRIMARY KEY (`id`) USING BTREE
--
Gitee
From 9894c520fd5075009cb4124b3223d32b6e135c02 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Tue, 4 Jun 2024 18:23:30 +0800
Subject: [PATCH 3/3] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=89=80=E6=9C=89=E7=BB=84=E4=BB=B6=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E3=80=90=E8=8B=B1=E6=96=87=E5=90=8D=E3=80=91=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
#[1168773799706624]后端-表单所有组件增加【英文名】属性 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1168773799706624
---
.../neatlogic/framework/form/dto/AttributeExtendedDataVo.java | 1 +
src/main/java/neatlogic/framework/util/FormUtil.java | 2 ++
.../changelog/{2024-05-31 => 2024-06-04}/neatlogic_tenant.sql | 0
.../framework/changelog/{2024-05-31 => 2024-06-04}/version.json | 0
4 files changed, 3 insertions(+)
rename src/main/resources/neatlogic/resources/framework/changelog/{2024-05-31 => 2024-06-04}/neatlogic_tenant.sql (100%)
rename src/main/resources/neatlogic/resources/framework/changelog/{2024-05-31 => 2024-06-04}/version.json (100%)
diff --git a/src/main/java/neatlogic/framework/form/dto/AttributeExtendedDataVo.java b/src/main/java/neatlogic/framework/form/dto/AttributeExtendedDataVo.java
index 03a384bb5..aed35619e 100644
--- a/src/main/java/neatlogic/framework/form/dto/AttributeExtendedDataVo.java
+++ b/src/main/java/neatlogic/framework/form/dto/AttributeExtendedDataVo.java
@@ -20,6 +20,7 @@ public class AttributeExtendedDataVo extends AttributeDataVo{
public AttributeExtendedDataVo(AttributeDataVo attributeDataVo, Object extendedData) {
this.setAttributeUuid(attributeDataVo.getAttributeUuid());
+ this.setAttributeKey(attributeDataVo.getAttributeKey());
this.setAttributeLabel(attributeDataVo.getAttributeLabel());
this.setHandler(attributeDataVo.getHandler());
this.extendedData = extendedData;
diff --git a/src/main/java/neatlogic/framework/util/FormUtil.java b/src/main/java/neatlogic/framework/util/FormUtil.java
index d84344a70..cb1d08315 100644
--- a/src/main/java/neatlogic/framework/util/FormUtil.java
+++ b/src/main/java/neatlogic/framework/util/FormUtil.java
@@ -501,6 +501,8 @@ public class FormUtil {
formAttributeVo.setHandler(handler);
String label = componentObj.getString("label");
formAttributeVo.setLabel(label);
+ String key = componentObj.getString("key");
+ formAttributeVo.setKey(key);
String type = componentObj.getString("type");
formAttributeVo.setType(type);
JSONObject config = componentObj.getJSONObject("config");
diff --git a/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/neatlogic_tenant.sql b/src/main/resources/neatlogic/resources/framework/changelog/2024-06-04/neatlogic_tenant.sql
similarity index 100%
rename from src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/neatlogic_tenant.sql
rename to src/main/resources/neatlogic/resources/framework/changelog/2024-06-04/neatlogic_tenant.sql
diff --git a/src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/version.json b/src/main/resources/neatlogic/resources/framework/changelog/2024-06-04/version.json
similarity index 100%
rename from src/main/resources/neatlogic/resources/framework/changelog/2024-05-31/version.json
rename to src/main/resources/neatlogic/resources/framework/changelog/2024-06-04/version.json
--
Gitee