From 7d0415d10242c445d1cfd79c2c055518fdb58f2f Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 17 Oct 2024 11:28:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B9=E7=9F=A9=E9=98=B5=E7=9A=84=E5=AD=97=E6=AE=B5uuid?= =?UTF-8?q?=E7=94=A8=20key=20=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1268891173486592]配置项矩阵的字段uuid用 key 生成 http://192.168.0.96:8090/demo/rdm.html#/story-detail/939050947543040/939050947543042/1268891173486592 --- .../module/cmdb/matrix/handler/CiDataSourceHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/neatlogic/module/cmdb/matrix/handler/CiDataSourceHandler.java b/src/main/java/neatlogic/module/cmdb/matrix/handler/CiDataSourceHandler.java index c5ecc128..27c8c3e7 100644 --- a/src/main/java/neatlogic/module/cmdb/matrix/handler/CiDataSourceHandler.java +++ b/src/main/java/neatlogic/module/cmdb/matrix/handler/CiDataSourceHandler.java @@ -213,7 +213,7 @@ public class CiDataSourceHandler extends MatrixDataSourceHandlerBase { JSONObject showAttributeObj = new JSONObject(); String showAttributeUuid = oldShowAttributeUuidMap.get(showAttributeLabel); if (showAttributeUuid == null) { - showAttributeUuid = UuidUtil.randomUuid(); + showAttributeUuid = UuidUtil.getCustomUUID(matrixVo.getLabel() + "_" + uniqueIdentifier); } showAttributeObj.put("uuid", showAttributeUuid); CiViewVo ciViewVo = ciViewMap.get(showAttributeLabel); @@ -436,6 +436,7 @@ public class CiDataSourceHandler extends MatrixDataSourceHandlerBase { MatrixAttributeVo matrixAttributeVo = new MatrixAttributeVo(); matrixAttributeVo.setMatrixUuid(matrixUuid); matrixAttributeVo.setName(ciview.getItemLabel()); + matrixAttributeVo.setDefaultUniqueIdentifier(ciview.getItemName()); matrixAttributeVo.setType(MatrixAttributeType.INPUT.getValue()); matrixAttributeVo.setIsDeletable(0); matrixAttributeVo.setSort(sort++); -- Gitee