From 61b1a5ee0414ce51e86b034464ca79edb06029f9 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 22 十一月 2024 15:33:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/page/login/userlogin.vue                                              |    7 ++++++-
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/UIDataServiceImpl.java |   29 +++++++++++++++++++++++++----
 Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QueryTemplateDTO.java           |    1 -
 Source/plt-web/plt-web-ui/src/views/test.vue                                                        |    2 +-
 4 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QueryTemplateDTO.java b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QueryTemplateDTO.java
index e0036a1..1ef311c 100644
--- a/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QueryTemplateDTO.java
+++ b/Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/QueryTemplateDTO.java
@@ -1,7 +1,6 @@
 package com.vci.dto;
 
 
-import com.vci.common.qt.object.Condition;
 import com.vci.common.qt.object.OrderInfo;
 import com.vci.common.qt.object.PageInfo;
 import lombok.Data;
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 084c5b0..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
@@ -5,6 +5,7 @@
 import com.vci.corba.omd.btm.BizType;
 import com.vci.corba.omd.data.*;
 import com.vci.corba.omd.lcm.LifeCycle;
+import com.vci.corba.omd.ltm.LinkType;
 import com.vci.dto.*;
 import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus;
 import com.vci.frameworkcore.lcstatuspck.ReleaseDataLCStatus;
@@ -30,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;
@@ -371,7 +373,6 @@
         if(parentFieldName.contains(",")){
             parentFieldName = parentFieldName.split(",")[0];
         }
-        //TODO: 杩欏効涓哄暐瑕佸皢鏍硅妭鐐规樉绀鸿〃杈惧紡鏀惧埌鏌ヨ鏉′欢涓幓锛岃繖鏍峰氨浼氬鑷磋繖涓妭鐐硅褰撴垚鏌ヨ鏉′欢鍘绘煡璇�
         if(StringUtils.isNotBlank(parentFieldName)){
             if(StringUtils.isNotBlank(treeQuery.getParentOid())){
                 treeQuery.getConditionMap().put(parentFieldName,treeQuery.getParentOid());
@@ -446,8 +447,10 @@
                 return cbo2Trees(thisChildren, valueField, textField, parentFieldName, treeQuery.isShowCheckBox(), null);
             }
         }else{
-            OsLinkTypeVO linkTypeVO = linkTypeService.getLinkTypeById(treeDefineVO.getLinkType());
-            queryFieldList.addAll(linkTypeVO.getAttributes().stream().map(OsLinkTypeAttributeVO::getId).collect(Collectors.toList()));
+            //OsLinkTypeVO linkTypeVO = linkTypeService.getLinkTypeById(treeDefineVO.getLinkType());
+            LinkType linkType = platformClientUtil.getLinkTypeService().getLinkType(treeDefineVO.getLinkType());
+            //queryFieldList.addAll(linkTypeVO.getAttributes().stream().map(OsLinkTypeAttributeVO::getId).collect(Collectors.toList()));
+            queryFieldList.addAll(Arrays.asList(linkType.attributes));
             queryFieldList.addAll(WebLoServiceImpl.LO_BASE_FIELD_MAP.values());
 
             addQueryField(queryFieldList,valueField);
@@ -705,6 +708,24 @@
             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琛ㄨ揪寮忔棤娉曟纭浛鎹�
@@ -723,7 +744,7 @@
                 }
             }
 
-            tree.setAttributes(cbo2Map);
+            tree.setAttributes(returnMap);
             tree.setIndex(i[0] + "");
             i[0]++;
             tree.setChecked(showCheckBox);
diff --git a/Source/plt-web/plt-web-ui/src/page/login/userlogin.vue b/Source/plt-web/plt-web-ui/src/page/login/userlogin.vue
index be0f7a6..9a672e3 100644
--- a/Source/plt-web/plt-web-ui/src/page/login/userlogin.vue
+++ b/Source/plt-web/plt-web-ui/src/page/login/userlogin.vue
@@ -212,6 +212,10 @@
       done();
     },
     handleLogin() {
+      if (!this.loginForm.username) {
+        this.$message.error('璇疯緭鍏ョ敤鎴峰悕');
+        return;
+      }
       if (!this.loginForm.password) {
         this.$message.error('璇疯緭鍏ュ瘑鐮�');
         return;
@@ -250,7 +254,8 @@
                 });
                 return false;
               }
-            };
+            }
+            ;
 
             this.$router.push({path: this.tagWel.value});
             loading.close();
diff --git a/Source/plt-web/plt-web-ui/src/views/test.vue b/Source/plt-web/plt-web-ui/src/views/test.vue
index 04e63b9..74c0c98 100644
--- a/Source/plt-web/plt-web-ui/src/views/test.vue
+++ b/Source/plt-web/plt-web-ui/src/views/test.vue
@@ -3,7 +3,7 @@
 </template>
 
 <script>
-  export default {};
+export default {};
 </script>
 
 <style>

--
Gitblit v1.9.3