From 0c553fadbaa50a322fbe283ef66cd32d8d26f98b Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期五, 29 十一月 2024 17:38:56 +0800
Subject: [PATCH] 1、获取当前业务类型下的数据权限相关信息接口。 2、保存数据权限数据接口。 3、删除数据权限接口。 4、使用当前用户的类型查询用户接口。

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
index ee21299..5497ddb 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java
@@ -31,6 +31,7 @@
 import com.vci.web.query.UILinkTypeDataQuery;
 import com.vci.web.query.UITreeQuery;
 import com.vci.web.service.*;
+import com.vci.web.util.Func;
 import com.vci.web.util.PlatformClientUtil;
 import com.vci.web.util.WebUtil;
 import org.apache.commons.lang3.StringUtils;
@@ -707,10 +708,28 @@
             clo = boAndLO.lo;
             Map<String,String> cloMap = loService.clo2Map(clo);
             Map<String,String> cbo2Map = boService.cbo2Map(cbo);
+            //灏嗛摼鎺ョ被鍨嬬殑灞炴�т篃鏀捐繘杩涜杩斿洖
+            String linkName = Func.isNotBlank(cloMap.get("linktypename")) ? cloMap.get("linktypename"):parentFieldName;
+            Map<String, String> returnMap = new HashMap<>();
+            cloMap.forEach((key,value)->{
+                //杩囨护鎺夌┖鍊�
+                if(!returnMap.containsKey(linkName + key) && Func.isNotBlank(key) || Func.isNotBlank(value)){
+                    returnMap.put(linkName + key,value);
+                }
+            });
+            //杩囨护鎺夌┖鍊硷紝鐢ㄤ綔杩斿洖鐨刴ap
+           cbo2Map.entrySet().stream().forEach(entry -> {
+                String key = entry.getKey();
+                String value = entry.getValue();
+                if (!returnMap.containsKey(key) && Func.isNotBlank(key) && Func.isNotBlank(value)) {
+                    returnMap.put(key,value);
+                }
+            });
+
             if(!CollectionUtils.isEmpty(cbo2Map)){
                 cbo2Map.forEach((key,value)->{
                     //TODO: 杩欏効涓哄暐瑕佹嫾鎺ヤ笂parentFieldName锛屽鑷村悗闈reemarker琛ㄨ揪寮忔棤娉曟纭浛鎹�
-                    cloMap.put(parentFieldName + "." + key,value);
+                    cloMap.put(/*parentFieldName + "." +*/ key,value);
                 });
             }
             tree.setOid(getValueByExpressForBOAndLO(cloMap,cbo2Map,valueField));
@@ -725,7 +744,7 @@
                 }
             }
 
-            tree.setAttributes(cloMap/*cbo2Map*/);
+            tree.setAttributes(returnMap);
             tree.setIndex(i[0] + "");
             i[0]++;
             tree.setChecked(showCheckBox);

--
Gitblit v1.9.3