From 63013400c2790a650878445c8352992df71103b2 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 19 七月 2023 11:42:59 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java                     |    8 
 Source/UBCS-WEB/src/components/Tree/classifyTrees.vue                                                             |   35 +
 Source/UBCS/ubcs-service-api/ubcs-user-api/src/main/java/com/vci/ubcs/system/user/feign/IUserClient.java          |    8 
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/RoleMapper.java                     |    9 
 Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml                                     |   20 +
 Source/UBCS-WEB/src/api/GetItem.js                                                                                |   12 
 Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java               |    8 
 Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserSearchServiceImpl.java |    5 
 Source/UBCS-WEB/src/components/template/FlowPath.vue                                                              |   28 +
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java       |  223 +++++++++++++--
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java          |    9 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java      |    2 
 Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/feign/UserClient.java                   |    5 
 Source/UBCS-WEB/src/components/work/BusinessWork.vue                                                              |   13 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java    |   15 +
 Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/RoleMapper.xml                                     |    8 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java             |    2 
 Source/UBCS-WEB/src/views/system/menu.vue                                                                         |   16 +
 Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClient.java              |   40 ++
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/tt.xml                            |   63 +++-
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java           |   13 
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IRoleService.java                  |    8 
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java          |   11 
 Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java       |    7 
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java                       |   20 +
 Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java                  |   11 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/xxx.json    |  154 ++--------
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java         |   25 +
 Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClientFallback.java      |   14 +
 Source/UBCS-WEB/src/components/Tree/TemplatePro.vue                                                               |    6 
 Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserSearchService.java         |    7 
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue                                                                  |   24 +
 32 files changed, 606 insertions(+), 223 deletions(-)

diff --git a/Source/UBCS-WEB/src/api/GetItem.js b/Source/UBCS-WEB/src/api/GetItem.js
index f19df54..af5f940 100644
--- a/Source/UBCS-WEB/src/api/GetItem.js
+++ b/Source/UBCS-WEB/src/api/GetItem.js
@@ -32,7 +32,7 @@
 // 鏂板鏁版嵁
 export function addSaveCode(data) {
   return request({
-    url: 'api/ubcs-code/ubcs-code/mdmEngineController/addSaveCode',
+    url: 'api/ubcs-code/mdmEngineController/addSaveCode',
     method: 'post',
     data
   })
@@ -40,7 +40,7 @@
 //淇敼鏁版嵁
 export function editSaveCode(data) {
   return request({
-    url: 'api/ubcs-code/ubcs-code/mdmEngineController/editSaveCode',
+    url: 'api/ubcs-code/mdmEngineController/editSaveCode',
     method: 'put',
     data
   })
@@ -56,3 +56,11 @@
     }
   })
 }
+// 鎵归噺淇敼鏁版嵁
+export function batchUpdateCode(data) {
+  return request({
+    url: 'api/ubcs-code/mdmEngineController/batchUpdateCode',
+    method: 'post',
+    data
+  })
+}
diff --git a/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue b/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
index 714d5d0..b030217 100644
--- a/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
+++ b/Source/UBCS-WEB/src/components/Tree/TemplatePro.vue
@@ -2,10 +2,10 @@
   <basic-container>
     <avue-tabs :option="Taboption" @change="handleChange"></avue-tabs>
     <span v-if="type.prop==='tab1'">
-      <attrCrud :ProData="ProData" :crudOid="crudOid" :crudArray="crudArray" :Formlist="Formlist" :codeClassifyOid="codeClassifyOid"></attrCrud>
+      <attrCrud :ProData="ProData" :crudOid="crudOid" :crudLCStatus="crudLCStatus" :crudArray="crudArray" :Formlist="Formlist" :codeClassifyOid="codeClassifyOid"></attrCrud>
     </span>
     <span v-else-if="type.prop==='tab2'">
-       <FlowPath :code="this.crudOid"></FlowPath>
+       <FlowPath :code="this.crudOid" :crudLCStatus="crudLCStatus"></FlowPath>
 
     </span>
     <span v-else-if="type.prop==='tab3'">
@@ -18,7 +18,7 @@
 <script>
 export default {
   name: "TemplatePro.vue",
-  props: ['ProData','crudOid','crudArray','Formlist','codeClassifyOid'],
+  props: ['ProData','crudOid','crudLCStatus','crudArray','Formlist','codeClassifyOid'],
   data: function () {
     return {
       type: {},
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index cc66270..43120ab 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -3,31 +3,31 @@
     <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag">
 
       <!--鏂板-->
-      <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">娣诲姞 {{ msg }}</el-button>
+      <el-button v-if="attrEditVisible == false && attrFlagChiledren==false && crudLCStatus=='Editing'" size="small" type="primary" icon="el-icon-plus" @click="busineHandle">娣诲姞 {{ msg }}</el-button>
       <!--        鍏ㄥ睆缂栬緫-->
-      <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">鍏ㄥ睆缂栬緫</el-button>
+      <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false && crudLCStatus=='Editing'" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">鍏ㄥ睆缂栬緫</el-button>
       <!--        楠岃瘉瑙勫垯-->
-      <el-button icon="el-icon-info" size="small" @click="ruleAddHandler">楠岃瘉瑙勫垯</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" icon="el-icon-info" size="small" @click="ruleAddHandler">楠岃瘉瑙勫垯</el-button>
       <!--        灞炴�у垎缁�-->
-      <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">灞炴�у垎缁�</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" icon="el-icon-menu" size="small" @click="attrVisibleHandle">灞炴�у垎缁�</el-button>
 
 
       <!--        鍒嗙被娉ㄥ叆-->
-      <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">鍒嗙被娉ㄥ叆</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" icon="el-icon-magic-stick" size="small" @click="injectBtn">鍒嗙被娉ㄥ叆</el-button>
         <!--    缁勫悎瑙勫垯-->
-        <el-button size="small" @click="isShowHandler">缁勫悎瑙勫垯</el-button>
+        <el-button v-if="crudLCStatus=='Editing'" size="small" @click="isShowHandler">缁勫悎瑙勫垯</el-button>
       <!--        鏋氫妇娉ㄥ叆-->
-      <el-button size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" size="small" @click="enmuVisHandle">鏋氫妇娉ㄥ叆</el-button>
       <!--    绾ц仈灞炴��-->
-      <el-button size="small" @click="CascadeHandle">绾ц仈灞炴��</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" size="small" @click="CascadeHandle">绾ц仈灞炴��</el-button>
       <!--    棰勮鎺掑簭-->
         <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">棰勮鎺掑簭</el-button>
 
 
       <!--    淇濆瓨-->
-      <el-button size="small" @click="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" size="small" @click="addsHandler" icon="el-icon-check">淇濆瓨</el-button>
       <!--    鍒犻櫎-->
-      <el-button size="small" @click="CrudRemove" icon="el-icon-delete">鍒犻櫎</el-button>
+      <el-button v-if="crudLCStatus=='Editing'" size="small" @click="CrudRemove" icon="el-icon-delete">鍒犻櫎</el-button>
       <!--    閲嶇疆-->
       <el-button size="small" @click="reset" icon="el-icon-refresh-right">閲嶇疆</el-button>
       <!--    鍚屾鍒板叾浠栨ā鏉�-->
@@ -316,6 +316,10 @@
       type: String,
       default: ''
     },
+    crudLCStatus: {
+      type: String,
+      default: 'Editing'
+    },
     crudArray: {
       type: Array,
     },
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index ed4565f..265d4ee 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -3,7 +3,7 @@
   <el-container>
     <!--    宸︿晶鑿滃崟-->
     <el-aside >
-      <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
+      <basic-container style="overflow:hidden;">
         <div>
         <div>
           <div style="display: flex; flex-direction: column;">
@@ -62,7 +62,7 @@
         </el-dialog>
         <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false"
                    :option="Treeoption"
-                   style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"
+                   style="height: calc(100vh - 230px);"
                    @node-click="nodeClick"
                    class="classifyTree"
         >
@@ -71,7 +71,7 @@
       </basic-container>
     </el-aside>
     <el-main>
-      <basic-container style="height: 85vh; max-height: 155vh; ">
+      <basic-container style="height: calc(100vh - 150px);">
         <!--        鍙充晶琛ㄦ牸-->
         <avue-tabs :option="tabOption" @change="handleChange"></avue-tabs>
         <span v-if="type.prop==='tab1'">
@@ -124,10 +124,10 @@
                       <div style="margin-bottom: 5px"><el-tag>涓婚搴撳垎绫�</el-tag></div>
                       <!--                      鍏嬮殕妯℃澘鐨勬爲 娌跨敤棣栭〉鏍戠殑loading鍜宱ption锛屼絾鏄痙ata鍜寁-model缁戝畾鐨勬暟鎹垱寤轰竴涓柊鐨勫彉閲忥紝鍙﹀鐐瑰嚮鏂规硶涔熸槸閲嶆柊鑾峰彇鏉ユ搷浣滃厠闅嗘ā鏉跨殑鏁版嵁-->
                         <avue-tree  v-model="TreeAvueform" v-loading="loading" :data="Treedata"
-                                   :defaultExpandAll="false"
-                                   :option="Treeoption"
-                                   style="height: 50.5vh;margin-right: 10px"
-                                   @node-click="ClonenodeClick"
+                                    :defaultExpandAll="false"
+                                    :option="Treeoption"
+                                    style="height: 50.5vh;margin-right: 10px"
+                                    @node-click="ClonenodeClick"
                         >
                         </avue-tree>
                     </el-aside>
@@ -172,11 +172,12 @@
             </template>
                   <template #menu="{ size, row ,index}">
                     <el-button type="text"
-                               v-if="row.lcStatus != 'Released'"
+                               v-if="row.lcStatus == 'Editing'"
                                icon="el-icon-edit-outline "
-                                :size="size"
-                                @click="$refs.textCrud.rowEdit(row)">缂栬緫</el-button>
+                               :size="size"
+                               @click="$refs.textCrud.rowEdit(row)">缂栬緫</el-button>
                     <el-button type="text"
+                               v-if="row.lcStatus == 'Editing'"
                                icon="el-icon-delete"
                                :size="size"
                                @click="$refs.textCrud.rowDel(row,index)">鍒犻櫎</el-button>
@@ -211,7 +212,7 @@
           </avue-crud>
 
           </basic-container>
-          <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro>
+          <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudLCStatus="this.crudLCStatus" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro>
         </span>
         <!--     缂栫爜瑙勫垯-->
         <el-dialog  :visible.sync="MasterdialogVisible"   title="涓恒�愮紪鐮佽鍒欍�戦�夊彇鍊�" append-to-body>
@@ -414,6 +415,8 @@
       addFlag:false,
       // 琛ㄦ牸褰撳墠琛宨d
       crudOid:"",
+      //褰撳墠閫変腑妯℃澘鐘舵��
+      crudLCStatus:'',
       //琛ㄦ牸褰撳墠閫夋嫨鏁扮粍
       crudArray:[],
       //妯℃澘灞炴�у睍绀哄唴瀹�
@@ -922,6 +925,7 @@
     //琛屽崟閫変簨浠�
     selectHandle(selection,row){
       this.crudOid=row.oid;
+      this.crudLCStatus=row.lcStatus;
       this.crudArray=selection;
       console.log(selection,row)
       gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': row.oid}).then(res => {
@@ -1390,6 +1394,15 @@
 </script>
 
 <style lang="scss" scoped>
+.el-container{
+  height: 100%;
+}
+.el-aside {
+  height: calc(100% - 30px);
+}
+.el-main {
+  height: calc(100% - 30px);
+}
 .el-form {
   display: flex;
   flex-wrap: wrap; /* 璁剧疆鍙崲琛岋紝浠ヤ究鍦ㄥ皬灞忓箷璁惧涓婁娇鐢ㄥ琛屽竷灞� */
diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue
index 24ccf03..36aa624 100644
--- a/Source/UBCS-WEB/src/components/template/FlowPath.vue
+++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -1,5 +1,5 @@
 <template>
-        <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page"
+        <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page"   :permission="permissionList"
             :search.sync="search" @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete"
             @row-update="handleEdit" @refresh-change="handleRefresh" @size-change="handleSizePage"
             @current-change="handleCurrentPage">
@@ -8,14 +8,19 @@
 
 <script>
 import { getFlowpathList, getStartList, flowpathSave, flowpathDelete } from '@/api/template/flowpath.js'
+import {mapGetters} from "vuex";
 export default {
     name: 'FlowPath',
     props: {
-        code: {
-            typeof: String,
-            required: true,
-            default: ""
-        }
+      code: {
+        typeof: String,
+        required: true,
+        default: ""
+      },
+      crudLCStatus: {
+        type: String,
+        default: 'Editing'
+      }
     },
     data() {
         return {
@@ -98,6 +103,17 @@
     created() {
         this.getStart()
     },
+  computed:{
+    ...mapGetters([ "permission"]),
+    permissionList() {
+      return {
+        addBtn: this.crudLCStatus=='Editing',
+        viewBtn: false,
+        delBtn: this.crudLCStatus=='Editing',
+        editBtn: this.crudLCStatus=='Editing'
+      };
+    },
+  },
     methods: {
         async getStart() {
             const response = await getStartList()
diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
index a324059..e30e6dd 100644
--- a/Source/UBCS-WEB/src/components/work/BusinessWork.vue
+++ b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
@@ -53,11 +53,14 @@
 
 <script>
 import {businese} from '@/api/work/businese'
-import {FlowTable} from "@/api/GetItem";
+import {FlowTable, batchUpdateCode} from "@/api/GetItem";
 import {validatenull} from "@/util/validate";
 import {getDictionary} from "@/api/system/dict";
+import vciWebRefer from "../refer/vciWebRefer.vue";
+
 export default {
   name: "BusinessWork",
+  components: { vciWebRefer },
   props:['ids','templateId',"taskId","modelKey","codeClassifyOid"],
   data() {
     return {
@@ -99,7 +102,13 @@
     HandlerSave(){
       this.editingRow = null;
       //淇濆瓨
-      this.$message.success(this.tableData[0].tuhao)
+      batchUpdateCode(this.tableData).then(res => {
+        console.log(res)
+        if(res.data.data.success){
+          this.$message.success("淇濆瓨鎴愬姛");
+        }
+
+      })
     },
     //琛ㄦ牸澶存覆鏌�
     CrudHeaderRend() {
diff --git a/Source/UBCS-WEB/src/views/system/menu.vue b/Source/UBCS-WEB/src/views/system/menu.vue
index d31fcc6..30e004c 100644
--- a/Source/UBCS-WEB/src/views/system/menu.vue
+++ b/Source/UBCS-WEB/src/views/system/menu.vue
@@ -226,6 +226,22 @@
               ]
             },
             {
+              label: "璺敱缂撳瓨",
+              prop: "keepAlive",
+              type: "switch",
+              dicData: [
+                {
+                  label: "鍚�",
+                  value: false
+                },
+                {
+                  label: "鏄�",
+                  value: true
+                }
+              ],
+              hide: true
+            },
+            {
               label: "鑿滃崟澶囨敞",
               prop: "remark",
               type: "textarea",
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/xxx.json b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/xxx.json
index d9d24f7..2df8208 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/xxx.json
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/attrmap/xxx.json
@@ -3,133 +3,57 @@
     "classifys": {
       "classify": [
         {
-          "classCode": "010301",
+          "classCode": "020201",
           "fullclsfNamePath": "",
-          "library": "EqpLib",
+          "library": "wupin",
+          "sections": {
+            "section": [
+              {
+                "name": "鍥哄畾鐮佹2",
+                "value": ""
+              },
+              {
+                "name": "鍒嗙被鐮佹鐖�",
+                "value": "001"
+              },
+              {
+                "name": "鍒嗙被鐮佹瀛�",
+                "value": "0012"
+              },
+              {
+                "name": "鍙彉鐮佹",
+                "value": ""
+              },
+              {
+                "name": "test",
+                "value": "7E1C92A2-9B6F-4DB3-48C7-F42D1304E36B"
+              },
+              {
+                "name": "娴佹按鐮佹",
+                "value": ""
+              }
+            ]
+          },
           "objects": {
             "object": [
               {
                 "code": "",
-                "creator": "weidy",
-                "id": "20",
+                "id": "111111112222222233333333",
+                "status": "Released",
                 "operate": "create",
-                "prop": [
-                  {
-                    "key": "fpNo",
-                    "text": "璁惧鍨嬪彿",
-                    "value": "11sdsa22"
-                  },
-                  {
-                    "key": "fpName",
-                    "text": "璁惧鍚嶇О",
-                    "value": "椤堕《椤堕《12"
-                  },
-                  {
-                    "key": "manufacturer",
-                    "text": "鐢熶骇鍘傚",
-                    "value": "鍛滃憸鍛滃憸2"
-                  },
-                  {
-                    "key": "belongSystem",
-                    "text": "鎵�灞炵郴缁�",
-                    "value": "鍛滃憸鍛滃憸2"
-                  },
-                  {
-                    "key": "responsibilityInfo",
-                    "text": "璐d换浜轰俊鎭�",
-                    "value": "鏂囧憙鍛冨憙2"
-                  },
-                  {
-                    "key": "fpWeight",
-                    "text": "閲嶉噺锛圞G锛�",
-                    "value": "12"
-                  },
-                  {
-                    "key": "gravityX",
-                    "text": "閲嶅績X",
-                    "value": "22"
-                  },
-                  {
-                    "key": "gravityY",
-                    "text": "閲嶅績Y",
-                    "value": "32"
-                  },
-                  {
-                    "key": "gravityZ",
-                    "text": "閲嶅績Z",
-                    "value": "42"
-                  },
-                  {
-                    "key": "inertiaX",
-                    "text": "杞姩鎯噺X",
-                    "value": "52"
-                  },
-                  {
-                    "key": "inertiaY",
-                    "text": "杞姩鎯噺Y",
-                    "value": "62"
-                  },
-                  {
-                    "key": "inertiaZ",
-                    "text": "杞姩鎯噺Z",
-                    "value": "72"
-                  },
-                  {
-                    "key": "inertiaXY",
-                    "text": "杞姩鎯噺XY",
-                    "value": "82"
-                  },
-                  {
-                    "key": "inertiaYZ",
-                    "text": "杞姩鎯噺YZ",
-                    "value": "92"
-                  },
-                  {
-                    "key": "inertiaXZ",
-                    "text": "杞姩鎯噺XZ",
-                    "value": "102"
-                  },
-                  {
-                    "key": "operatingTemperatureLimit",
-                    "text": "宸ヤ綔娓╁害闄愬埗",
-                    "value": "162"
-                  },
-                  {
-                    "key": "equipmentPower",
-                    "text": "璁惧鍔熺巼锛堜緵鐢靛姛鐜囥�佽緪灏勫姛鐜囷級",
-                    "value": "172"
-                  },
-                  {
-                    "key": "electricModel",
-                    "text": "鐢佃繛鎺ュ櫒鍨嬪彿",
-                    "value": "182"
-                  },
-                  {
-                    "key": "fpAgreement",
-                    "text": "鎴愬搧鍗忚涔�",
-                    "value": "192"
-                  }
-                ],
-                "status": "Released"
-              }
-            ]
-          },
-          "sections": {
-            "section": [
-              {
-                "name": "灞傜骇鐮佹",
-                "value": "010301"
+                "creator": "weidy",
+                "prop": []
               }
             ]
           }
         }
       ]
     },
-    "systemId": "RLM",
+    "systemId": "MPM",
     "user": {
-      "ip": "0:0:0:0:0:0:0:1",
-      "trueName": "weidy",
-      "userName": "weidy"
+      "ip": "192.168.0.1",
+      "trueName": "llz",
+      "userName": "llz"
     }
   }
-}
\ No newline at end of file
+}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClient.java b/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClient.java
index bd46a13..8d0a2d6 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClient.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClient.java
@@ -17,6 +17,8 @@
 package com.vci.ubcs.system.feign;
 
 import com.vci.ubcs.system.entity.*;
+import com.vci.ubcs.system.vo.DeptVO;
+import com.vci.ubcs.system.vo.RoleVO;
 import org.springblade.core.launch.constant.AppConstant;
 import org.springblade.core.tool.api.R;
 import org.springframework.cloud.openfeign.FeignClient;
@@ -42,7 +44,9 @@
 	String MENU = API_PREFIX + "/menu";
 	String MENU_BUTTON = API_PREFIX + "/menu-button";
 	String DEPT = API_PREFIX + "/dept";
+	String TREE = API_PREFIX + "/tree";
 	String DEPT_IDS = API_PREFIX + "/dept-ids";
+	String DEPT_LIST = API_PREFIX + "/dept-list";
 	String DEPT_IDS_FUZZY = API_PREFIX + "/dept-ids-fuzzy";
 	String DEPT_NAME = API_PREFIX + "/dept-name";
 	String DEPT_NAMES = API_PREFIX + "/dept-names";
@@ -53,6 +57,8 @@
 	String POST_NAME = API_PREFIX + "/post-name";
 	String POST_NAMES = API_PREFIX + "/post-names";
 	String ROLE = API_PREFIX + "/role";
+	String ROLE_TREE = API_PREFIX + "/role-tree";
+	String ROLE_LIST = API_PREFIX + "/role-list";
 	String ROLE_IDS = API_PREFIX + "/role-ids";
 	String ROLE_NAME = API_PREFIX + "/role-name";
 	String ROLE_NAMES = API_PREFIX + "/role-names";
@@ -97,6 +103,24 @@
 	 */
 	@GetMapping(DEPT)
 	R<Dept> getDept(@RequestParam("id") Long id);
+
+	/**
+	 * 鑾峰彇閮ㄩ棬
+	 *
+	 * @param tenantId 涓婚敭
+	 * @return List<Dept></Dept>
+	 */
+	@GetMapping(TREE)
+	public R<List<DeptVO>> tree(@RequestParam("tenantId")String tenantId);
+
+	/**
+	 * 鑾峰彇閮ㄩ棬
+	 *
+	 * @param tenantId 涓婚敭
+	 * @return List<Dept></Dept>
+	 */
+	@GetMapping(DEPT_LIST)
+	public R<List<DeptVO>> deptList(@RequestParam("tenantId")String tenantId);
 
 	/**
 	 * 鑾峰彇閮ㄩ棬id
@@ -211,6 +235,22 @@
 	@GetMapping(ROLE_IDS)
 	R<String> getRoleIds(@RequestParam("tenantId") String tenantId, @RequestParam("roleNames") String roleNames);
 
+	/***
+	 * 鑾峰彇瑙掕壊
+	 * @param tenantId 绉熸埛id
+	 * @return 瑙掕壊
+	 */
+	@GetMapping(ROLE_TREE)
+	R<List<RoleVO>> roleTree(@RequestParam("tenantId") String tenantId);
+
+	/***
+	 * 鑾峰彇瑙掕壊
+	 * @param tenantId 绉熸埛id
+	 * @return 瑙掕壊
+	 */
+	@GetMapping(ROLE_LIST)
+	R<List<RoleVO>>  roleList(@RequestParam("tenantId") String tenantId);
+
 	/**
 	 * 鑾峰彇瑙掕壊鍚�
 	 *
diff --git a/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClientFallback.java b/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClientFallback.java
index 738acdf..742f018 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClientFallback.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-system-api/src/main/java/com/vci/ubcs/system/feign/ISysClientFallback.java
@@ -17,6 +17,8 @@
 package com.vci.ubcs.system.feign;
 
 import com.vci.ubcs.system.entity.*;
+import com.vci.ubcs.system.vo.DeptVO;
+import com.vci.ubcs.system.vo.RoleVO;
 import org.springblade.core.tool.api.R;
 import org.springframework.stereotype.Component;
 
@@ -44,6 +46,12 @@
 	public R<Dept> getDept(Long id) {
 		return R.fail("鑾峰彇鏁版嵁澶辫触");
 	}
+
+	@Override
+	public R<List<DeptVO>> tree(String tenantId) {return R.fail("鑾峰彇鏁版嵁澶辫触");}
+
+	@Override
+	public R<List<DeptVO>> deptList(String tenantId)  {return R.fail("鑾峰彇鏁版嵁澶辫触");}
 
 	@Override
 	public R<String> getDeptIds(String tenantId, String deptNames) {
@@ -106,6 +114,12 @@
 	}
 
 	@Override
+	public R<List<RoleVO>> roleTree(String tenantId) {return R.fail("鑾峰彇鏁版嵁澶辫触");}
+
+	@Override
+	public R<List<RoleVO>> roleList(String tenantId) {return R.fail("鑾峰彇鏁版嵁澶辫触");}
+
+	@Override
 	public R<String> getRoleName(Long id) {
 		return R.fail("鑾峰彇鏁版嵁澶辫触");
 	}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-user-api/src/main/java/com/vci/ubcs/system/user/feign/IUserClient.java b/Source/UBCS/ubcs-service-api/ubcs-user-api/src/main/java/com/vci/ubcs/system/user/feign/IUserClient.java
index ff1cb42..eac5887 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-user-api/src/main/java/com/vci/ubcs/system/user/feign/IUserClient.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-user-api/src/main/java/com/vci/ubcs/system/user/feign/IUserClient.java
@@ -42,6 +42,7 @@
 
 	String API_PREFIX = "/client";
 	String USER_INFO = API_PREFIX + "/user-info";
+	String USER_ALL = API_PREFIX + "/user-all";
 	String USER_INFO_BY_TYPE = API_PREFIX + "/user-info-by-type";
 	String USER_INFO_BY_ID = API_PREFIX + "/user-info-by-id";
 	String USER_INFO_BY_ACCOUNT = API_PREFIX + "/user-info-by-account";
@@ -82,6 +83,13 @@
 	R<UserInfo> userInfo(@RequestParam("tenantId") String tenantId, @RequestParam("account") String account);
 
 	/**
+	 * 鑾峰彇鎵�鏈夌敤鎴�
+	 * @return
+	 */
+	@GetMapping(USER_ALL)
+	R<List<User>> selectAllUser();
+
+	/**
 	 * 鑾峰彇鐢ㄦ埛淇℃伅
 	 *
 	 * @param tenantId 绉熸埛ID
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java
index 4a08af9..7bf46f2 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/VciBaseUtil.java
@@ -1294,7 +1294,7 @@
 	 * @return Map瀵硅薄
 	 * @version 2016骞�3鏈�20鏃� 11:03:01
 	 */
-	public static Map convertBean2Map(Object bean) throws Exception {
+	public static Map convertBean2Map(Object bean,Set<String> existFild) throws Exception {
 		Class type = bean.getClass();
 		Map returnMap = new HashMap();
 		BeanInfo beanInfo = Introspector.getBeanInfo(type);
@@ -1332,7 +1332,16 @@
 
 				if (result != null) {
 					if ("data".equals(propertyName)){
-						returnMap.putAll((Map) result);
+						if(existFild == null){
+							returnMap.putAll((Map) result);
+						}else{
+							Map resulMap = (Map) result;
+							for (Object o : resulMap.keySet()) {
+								if(existFild.contains(o)){
+									returnMap.put(o,resulMap.get(o));
+								}
+							}
+						}
 					}else {
 						returnMap.put(fieldMap.containsKey(propertyName)?fieldMap.get(propertyName):propertyName, result);
 					}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
index 110603b..d8cbf35 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java
@@ -309,7 +309,7 @@
 		List<TableColVO> uiTableFieldVOs = new ArrayList<>();
 		// 蹇�熸煡璇㈠垪
 		List<TableColVO> queryColumns = new ArrayList<>();
-		if(!codeReferConfig.getCodeShowFieldConfigVOS().isEmpty()){
+		if(!CollectionUtils.isEmpty(codeReferConfig.getCodeShowFieldConfigVOS())){
 			codeReferConfig.getCodeShowFieldConfigVOS().stream().forEach(showField ->{
 				TableColVO tableColVO = new TableColVO();
 				BeanUtil.copy(showField,tableColVO);
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
index ecb1dc6..eb7a13d 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -400,7 +400,6 @@
     public String addSaveCode(CodeOrderDTO orderDTO) throws Exception {
         VciBaseUtil.alertNotNull(orderDTO, "缂栫爜鐢宠鐩稿叧鐨勫睘鎬у拰鐮佹鐨勫唴瀹归兘涓虹┖", orderDTO.getCodeClassifyOid(), "涓婚搴撳垎绫荤殑涓婚敭",
                 orderDTO.getTemplateOid(), "妯℃澘鐨勪富閿�", orderDTO.getCodeRuleOid(), "缂栫爜瑙勫垯鐨勪富閿�");
-		VciSystemVarConstants.getSystemVarValueMap();
         CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid());
         CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid());
         CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(orderDTO.getCodeRuleOid());
@@ -918,7 +917,7 @@
 
 //						baseModels.stream().forEach(model-> {
                         try {
-                            map = VciBaseUtil.convertBean2Map(cbo);
+                            map = VciBaseUtil.convertBean2Map(cbo,null);
                         } catch (Exception e) {
                             throw new VciBaseException("绫诲瀷杞崲閿欒锛�" + e.getMessage());
                         }
@@ -3254,11 +3253,19 @@
         if (!listR.isSuccess() || listR.getData().size() == 0) {
             throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
         }
-        //灏哹ean杞负map,mybatis缁熶竴澶勭悊
+		//鑾峰彇褰撳墠涓氬姟绫诲瀷鎵�鏈夊瓧娈电敤鏉ュ仛瀵规瘮
+		R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(btmType);
+		if (!allAttributeByBtmId.isSuccess() || allAttributeByBtmId.getData().getAttributes().size() == 0) {
+			throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲瀛楁淇℃伅锛岃妫�鏌ワ紒");
+		}
+		Set<String> existFild = allAttributeByBtmId.getData().getAttributes().stream().map(btmTypeAttributeVO -> {
+			return btmTypeAttributeVO.getId();
+		}).collect(Collectors.toSet());
+		//灏哹ean杞负map,mybatis缁熶竴澶勭悊
         List<Map<String, String>> maps = new ArrayList<>();
         baseModels.stream().forEach(model -> {
             try {
-                maps.add(VciBaseUtil.convertBean2Map(model));
+                maps.add(VciBaseUtil.convertBean2Map(model,existFild));
             } catch (Exception e) {
                 throw new VciBaseException("绫诲瀷杞崲閿欒锛�" + e.toString());
             }
@@ -3409,12 +3416,20 @@
         if (!listR.isSuccess() || listR.getData().size() == 0) {
             throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
         }
+		//鑾峰彇褰撳墠涓氬姟绫诲瀷鎵�鏈夊瓧娈电敤鏉ュ仛瀵规瘮
+		R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(btmType);
+		if (!allAttributeByBtmId.isSuccess() || allAttributeByBtmId.getData().getAttributes().size() == 0) {
+			throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲瀛楁淇℃伅锛岃妫�鏌ワ紒");
+		}
+		Set<String> existFild = allAttributeByBtmId.getData().getAttributes().stream().map(btmTypeAttributeVO -> {
+			return btmTypeAttributeVO.getId();
+		}).collect(Collectors.toSet());
         //灏哹ean杞负map,mybatis缁熶竴澶勭悊
         List<Map<String, String>> maps = new ArrayList<>();
 
         baseModels.stream().forEach(model -> {
             try {
-                maps.add(VciBaseUtil.convertBean2Map(model));
+                maps.add(VciBaseUtil.convertBean2Map(model,existFild));
             } catch (Exception e) {
                 throw new VciBaseException("绫诲瀷杞崲閿欒锛�" + e.getMessage());
             }
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
index e1611d5..248fb60 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java
@@ -1884,7 +1884,7 @@
 				//濡傛灉鏄紪鐮佺敓鎴愬け璐ワ紝鍒欑洿鎺ュ氨澶辫触浜嗭紝鍏朵粬鐨勫垽鏂嚭鏉ユ湁閿欒鐨勬垜浠兘缁熶竴杩斿洖鍒癳xcel閲岄潰
 				engineService.batchSaveSelectChar(templateVO, dataCBOList);
 				// if(!isProcess){
-				needSaveCboList.stream().forEach(needSaveCbo->{
+				dataCBOList.stream().forEach(needSaveCbo->{
 					XMLResultDataObjectDetailDO resultDataObjectDetailDO=new XMLResultDataObjectDetailDO();
 					resultDataObjectDetailDO.setCode(needSaveCbo.getId());
 					String oid=needSaveCbo.getOid();
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
index 5b86905..519f132 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java
@@ -3,15 +3,18 @@
 import com.alibaba.nacos.common.utils.StringUtils;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO;
 import com.vci.ubcs.code.dto.CodeOrderSecDTO;
 import com.vci.ubcs.code.entity.CodeAllCode;
+import com.vci.ubcs.code.entity.CodeClassifyValue;
 import com.vci.ubcs.code.entity.CodeSerialValue;
 import com.vci.ubcs.code.enumpack.CodeCutTypeEnum;
 import com.vci.ubcs.code.enumpack.CodeGetValueTypeEnum;
 import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum;
 import com.vci.ubcs.code.enumpack.CodeSecTypeEnum;
 import com.vci.ubcs.code.lifecycle.CodeAllCodeLC;
+import com.vci.ubcs.code.mapper.CodeClassifyValueMapper;
 import com.vci.ubcs.code.mapper.CodeSerialValueMapper;
 import com.vci.ubcs.code.service.ICodeWupinService;
 import com.vci.ubcs.code.service.MdmEngineService;
@@ -49,6 +52,12 @@
 	 */
 	@Resource
 	private CodeSerialValueMapper serialValueMapper;
+
+	/**
+	 * 娴佹按鍙风殑鐩稿叧鐨勪俊鎭�
+	 */
+	@Resource
+	private CodeClassifyValueMapper codeClassifyValueMapper;
 
 	/**
 	 * 鎵�鏈夌殑缂栫爜鐨勫唴瀹�
@@ -506,6 +515,10 @@
 				break;
 			case CODE_CLASSIFY_SEC:
 				//鍒嗙被鐮佹鐨勶紝涔熸槸浠庡墠绔�夋嫨浜嗙爜鍊煎嵆鍙紝涓嶈鐮佸�肩殑闀垮害鏄灏�
+				CodeClassifyValue codeClassifyValueDO= codeClassifyValueMapper.selectById(secValue);
+				if(codeClassifyValueDO!=null) {
+					secValue = codeClassifyValueDO.getId();
+				}
 				break;
 			case CODE_LEVEL_SEC:
 				//灞傜骇鐮佹锛岄渶瑕佷粠鍒嗙被涓婅幏鍙栫浉搴旂殑淇℃伅
@@ -789,7 +802,7 @@
 	private String getValueByFormulaForCBO(BaseModel cbo,String rule)  {
 		Map<String, Object> dataMap = null;
 		try{
-			dataMap = VciBaseUtil.convertBean2Map(cbo);
+			dataMap = VciBaseUtil.convertBean2Map(cbo,null);
 		}catch(Exception e){
 			throw new VciBaseException("mapToBeanError:"+e);
 		}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
index 1abb780..0ec9aa8 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java
@@ -43,6 +43,11 @@
 import com.vci.ubcs.starter.web.pagemodel.SessionInfo;
 import com.vci.ubcs.starter.web.util.BeanUtilForVCI;
 import com.vci.ubcs.starter.web.util.VciBaseUtil;
+import com.vci.ubcs.system.feign.ISysClient;
+import com.vci.ubcs.system.user.entity.User;
+import com.vci.ubcs.system.user.feign.IUserClient;
+import com.vci.ubcs.system.vo.DeptVO;
+import com.vci.ubcs.system.vo.RoleVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springblade.core.tool.api.R;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -85,6 +90,18 @@
 	 */
 	@Autowired
 	private IBtmTypeClient btmTypeClient;
+
+	/**
+	 * 浜哄憳鏈嶅姟
+	 */
+	@Autowired
+	private  ISysClient sysClient;
+
+	/**
+	 * 浜哄憳鏈嶅姟
+	 */
+	@Autowired
+	private IUserClient userClient;
 
 	/**
 	 * 閫氱敤鏌ヨ
@@ -955,44 +972,159 @@
 										coderefersecSearchVO = JSONObject.toJavaObject(JSONObject.parseObject(referConfig), CoderefersecSearchVO.class);
 									}
 									String buildSqlwhere="";
-									if(coderefersecSearchVO!=null){
-										Map<String,Object> condtionMap=new HashMap<>();
-										List<CodeSrchCondConfigVO> codeSrchCondConfigVOList=coderefersecSearchVO.getCodeSrchCondConfigVOS();
+									if(coderefersecSearchVO!=null) {
+										if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.DEFAULT.getValue()) || coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.GRID.getValue())) {//榛樿鏍峰紡/鍒楄〃
+											Map<String, Object> condtionMap = new HashMap<>();
+											List<CodeSrchCondConfigVO> codeSrchCondConfigVOList = coderefersecSearchVO.getCodeSrchCondConfigVOS();
 
-										if(!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) {
-											codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> {
-												condtionMap.put(codeSrchCondConfigVO.getFilterField()+codeSrchCondConfigVO.getFilterType(),codeSrchCondConfigVO.getFilterValue());
-											});
-											buildSqlwhere=	UBCSSqlKeyword.buildSqlwhere(condtionMap);
+											if (!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) {
+												codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> {
+													condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue());
+												});
+												buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap);
+											}
+
+											//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
+											R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId));
+											if (!listR.isSuccess() || listR.getData().size() == 0) {
+												throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+											}
+											String referTable = listR.getData().get(0).getTableName();
+											StringBuffer sb = new StringBuffer();
+											sb.append(" select * from  ");
+											sb.append(referTable);
+											sb.append(" where 1=1  ");
+											if (StringUtils.isNotBlank(buildSqlwhere)) {
+												sb.append(buildSqlwhere);
+											}
+											List<Map> ListMap = commonsMapper.selectBySql(sb.toString());
+											String valueField = coderefersecSearchVO.getValueField();
+											String textField = coderefersecSearchVO.getTextField();
+											final int[] num = {0};
+											if (!CollectionUtils.isEmpty(ListMap)) {
+												ListMap.stream().forEach(map -> {
+													num[0]++;
+													String id = map.getOrDefault("OID".toUpperCase(Locale.ROOT), "").toString();
+													String value = map.getOrDefault(valueField.toUpperCase(Locale.ROOT), "").toString();
+													String text = map.getOrDefault(textField.toUpperCase(Locale.ROOT), "").toString();
+													String description = map.getOrDefault("description".toUpperCase(Locale.ROOT), "").toString();
+													CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, text, "", description);
+													codeSectionValueVOList.add(sectionValueVO);
+												});
+											}
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.TREE.getValue())) {//鏍戝舰
+
+										/*	Map<String, Object> condtionMap = new HashMap<>();
+											List<CodeSrchCondConfigVO> codeSrchCondConfigVOList = coderefersecSearchVO.getCodeSrchCondConfigVOS();
+											List<CodeShowFieldConfigVO> codeShowFieldConfigVOS=coderefersecSearchVO.getCodeShowFieldConfigVOS();
+
+											if (!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) {
+												codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> {
+													condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue());
+												});
+												buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap);
+											}
+											//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
+											R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId));
+											if (!listR.isSuccess() || listR.getData().size() == 0) {
+												throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
+											}
+											String referTable = listR.getData().get(0).getTableName();
+											StringBuffer sb = new StringBuffer();
+											sb.append(" select * from  ");
+											sb.append(referTable);
+
+
+
+											sb.append(" where 1=1  ");
+											if (StringUtils.isNotBlank(buildSqlwhere)) {
+												sb.append(buildSqlwhere);
+											}
+											List<Map> ListMap = commonsMapper.selectBySql(sb.toString());
+											String valueField = coderefersecSearchVO.getValueField();
+											String textField = coderefersecSearchVO.getTextField();
+											final int[] num = {0};
+											if (!CollectionUtils.isEmpty(ListMap)) {
+												ListMap.stream().forEach(map -> {
+													num[0]++;
+													String id = map.getOrDefault("OID".toUpperCase(Locale.ROOT), "").toString();
+													String value = map.getOrDefault(valueField.toUpperCase(Locale.ROOT), "").toString();
+													String text = map.getOrDefault(textField.toUpperCase(Locale.ROOT), "").toString();
+													String description = map.getOrDefault("description".toUpperCase(Locale.ROOT), "").toString();
+													CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, text, "", description);
+													codeSectionValueVOList.add(sectionValueVO);
+												});
+											}
+*/
+
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.ORGDEPARTMENTGRIDREFERS.getValue()) ||////閮ㄩ棬鍒楄〃
+											coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.ORGDEPARTMENTREFER.getValue())//閮ㄩ棬鏍�
+										) {
+											R<List<DeptVO>> r = sysClient.deptList("");
+											if (r.isSuccess()) {
+												List<DeptVO> deptVOList = r.getData();
+												if (!CollectionUtils.isEmpty(deptVOList)) {
+													deptVOList.stream().forEach(deptVO -> {
+														String id = String.valueOf(deptVO.getId());
+														int num = deptVO.getSort();
+														String value = String.valueOf(deptVO.getId());
+														String text = deptVO.getDeptName();
+														String description = deptVO.getRemark();
+														String pid = deptVO.getParentId() + "";
+														CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num + "", value, text, pid, description);
+														codeSectionValueVOList.add(sectionValueVO);
+													});
+												}
+											}
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.SMUSERREFER.getValue())//鐢ㄦ埛
+											|| coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.SMUSERGRIDREFER.getValue())//鐢ㄦ埛鍒楄〃
+										) {
+											R<List<User>>  r=userClient.selectAllUser();
+											if (r.isSuccess()) {
+												List<User> userList = r.getData();
+												if (!CollectionUtils.isEmpty(userList)) {
+													final int[] num = {0};
+													userList.stream().forEach(user -> {
+													 	String value=StringUtils.isBlank(user.getAccount())?"":user.getAccount();
+														//String value= String.valueOf(StringUtils.isBlank(user.getCode())?"":user.getCode());
+														String text=StringUtils.isBlank(user.getName())?"":user.getName();
+														String pid=user.getDeptId();
+														num[0]++;
+														String description="";
+														String id= String.valueOf(user.getId());
+														CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num[0] + "", value, text, pid, description);
+														codeSectionValueVOList.add(sectionValueVO);
+													});
+												}
+											}
+
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.SMROLEREFER.getValue())) {//瑙掕壊鍒楄〃
+
+											R<List<RoleVO>> r = sysClient.roleTree("");
+											if (r.isSuccess()) {
+												List<RoleVO> roleVOList = r.getData();
+												if (!CollectionUtils.isEmpty(roleVOList)) {
+													roleVOList.stream().forEach(roleVO -> {
+														String id = String.valueOf(roleVO.getId());
+														int num = roleVO.getSort();
+														String value = String.valueOf(roleVO.getId());
+														String text = roleVO.getRoleName();
+														String description = roleVO.getRoleAlias();
+														String pid = roleVO.getParentId() + "";
+														CodeSectionValueVO sectionValueVO = new CodeSectionValueVO(id, num + "", value, text, pid, description);
+														codeSectionValueVOList.add(sectionValueVO);
+													});
+												}
+											}
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.ORGDUTYREFER.getValue())) {//鑱屽姟
+
+
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.SMWORKTYPEREFER.getValue())) {//宸ョ
+
+
+										} else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.WFPROCESSTEMPLATEREFER.getValue())) {//娴佺▼妯℃澘
+
 										}
-									}
-									//浣跨敤浼犲叆鐨勪笟鍔$被鍨嬫煡璇㈣〃
-									R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId));
-									if (!listR.isSuccess() || listR.getData().size() == 0) {
-										throw new VciBaseException("浼犲叆涓氬姟绫诲瀷鏈煡璇㈠埌鐩稿簲琛ㄥ崟锛岃妫�鏌ワ紒");
-									}
-									String referTable = listR.getData().get(0).getTableName();
-									StringBuffer sb=new StringBuffer();
-									sb.append(" select * from  ");
-									sb.append(referTable);
-									sb.append(" where 1=1  ");
-									if(StringUtils.isNotBlank(buildSqlwhere)){
-										sb.append( buildSqlwhere );
-									}
-									List<Map> ListMap=	commonsMapper.selectBySql(sb.toString());
-									String valueField=coderefersecSearchVO.getValueField();
-									String textField=coderefersecSearchVO.getTextField();
-									final int[] num = {0};
-									if(!CollectionUtils.isEmpty(ListMap)){
-										ListMap.stream().forEach(map->{
-											num[0]++;
-											String id= map.getOrDefault("OID".toUpperCase(Locale.ROOT),"").toString();
-											String value= map.getOrDefault(valueField.toUpperCase(Locale.ROOT),"").toString();
-											String text=map.getOrDefault(textField.toUpperCase(Locale.ROOT),"").toString();
-											String description=map.getOrDefault("description".toUpperCase(Locale.ROOT),"").toString();
-											CodeSectionValueVO sectionValueVO=new CodeSectionValueVO(id, num[0]+"",value,text,"",description);
-											codeSectionValueVOList.add(sectionValueVO);
-										});
 									}
 									log.info(libId);
 								}else if(secType.equals("codelevelsec")) {//灞傜骇鐮佹
@@ -1157,9 +1289,11 @@
 		});
 		Map<String,CodeClassifyVO> codeClassifyVOMap= classifyFullInfo.getParentClassifyVOs().stream().collect(Collectors.toMap(s -> s.getId(), t -> t,(o1, o2)->o2));
 		List<CodeOrderSecDTO> codeOrderSecDTOList=new ArrayList<>();
+		Map<String,String> errorMap=new HashMap<>();
 		for(CodeBasicSecVO codeBasicSecVO: codeBasicSecVOS) {
 			String sectype = codeBasicSecVO.getSecType();
 			String classifySecOid= codeBasicSecVO.getOid();
+			String message="";
 			if (!sectype.equals(CodeSecTypeEnum.CODE_SERIAL_SEC.getValue())) {
 				String name = codeBasicSecVO.getName();
 				String sectypeText = codeBasicSecVO.getSecTypeText();
@@ -1181,19 +1315,28 @@
 								CodeClassifyValue codeClassifyValue=   codeClassifyValueDOMap.get(sectypeValue);
 								sectypeValue=codeClassifyValue.getOid();
 							}else {
-								objerrorCode = "101";
-								throw new Throwable("浼犲叆鐨勫垎绫荤爜娈碉細銆�" + name + " 鍊硷細" + sectypeValue + "銆戯紝涓嶇鍚堝綋鍓嶅垎绫诲眰绾т唬鍙�");
+								//throw new Throwable("浼犲叆鐨勫垎绫荤爜娈碉細銆�" + name + " 鍊硷細" + sectypeValue + "銆戯紝涓嶇鍚堝綋鍓嶅垎绫诲眰绾т唬鍙�");
+								message="浼犲叆鐨勫垎绫荤爜娈碉細銆�" + name + " 鍊硷細" + sectypeValue + "銆戯紝涓嶇鍚堝綋鍓嶅垎绫诲眰绾т唬鍙�";
+								errorMap.put("error",errorMap.getOrDefault("error","")+";"+message);
 							}
 						}
+					}
+					if(StringUtils.isBlank(sectypeValue)){
+						message="浼犲叆鐨勫垎绫荤爜娈碉細銆�" + name + " 銆戠殑鍊间笉鍏佽涓虹┖";
+						errorMap.put("error",errorMap.getOrDefault("error","")+";"+message);
 					}
 					CodeOrderSecDTO.setSecValue(sectypeValue);
 					codeOrderSecDTOList.add(CodeOrderSecDTO);
 				} else {
-					objerrorCode="101";
-					throw new Throwable("浼犲叆鐨勭爜娈佃鍒欑己灏�" + name + "鐮佹");
+					message="浼犲叆鐨勭爜娈佃鍒欑己灏�" + name + "鐮佹";
+					errorMap.put("error",errorMap.getOrDefault("error","")+";"+message);
 				}
 			}
 		}
+		if(errorMap.size()>0){
+			objerrorCode="101";
+			throw new Throwable(errorMap.getOrDefault("error",""));
+		}
 		return codeOrderSecDTOList;
 	}
 	/***
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/tt.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/tt.xml
index 8543b16..8071b54 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/tt.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/tt.xml
@@ -1,20 +1,45 @@
-<?xml version="1.0" encoding="utf-8"?>
-<data systemId="DMS">
-    <user userName="1" trueName="娴嬭瘯[1]" ip="172.16.0.30"/>
-    <classifys>
-        <classify classCode="ECOLib" library="ECOLib" fullclsfNamePath="">
-        <sections>
-            <section name="浜у搧浠e彿" value="CH4-0000"/>
-            <section name="鍥哄畾鐮佹" value="-"/>
-            <section name="鍥哄畾鐮佹" value="GG"/>
-            <section name="鏃ユ湡鐮佹" value="2023"/>
-            <section name="鍥哄畾鐮佹" value="-"/>
-        </sections>
-        <objects>
-            <object code="" id="474EDA77-E498-44B8-8D4A-21EAC0B5643C" status="Editing" operate="create" creator="1">
-                <prop key="name" text="鍚嶇О" value=""/>
-            </object>
-        </objects>
+<?xml version="1.0" encoding="UTF-8" ?>
+<data>
+    <errorid>0</errorid>
+    <msg>鎴愬姛!</msg>
+    <library id="wupin" name="">
+        <classify id="46B5DB5E-F783-DFE9-B48A-C4A367D02AC0" name="閿�" pid="0C600A6A-6398-FC30-D13E-121201FDA908" classCode="020201" description="閿�" fullPathName="" lcStatus="Enabled" isLeaf="false">
+            <codeRule id="1673234841140858880" ruleCode="csfjl" num="" name="csfjl" description="">
+                <codeSection id="1673235191453323264" sectionCode="gdmd" num="1" name="鍥哄畾鐮佹2" description="" secType="codefixedsec" secTypeText="鍥哄畾鐮佹" pkCodeRule="1673234841140858880" codeSecLengthType="code_sec_length_variable" codeSecLength="10" parentClassifySecOid="" codeDateFormatStr="">
+                    <sectionValue>
+                        <sectionValue id="1673235273523269632" num="2" name="" value="002" pid="" description=""/>
+                        <sectionValue id="1673235247598276608" num="1" name="" value="001" pid="" description=""/>
+                    </sectionValue>
+                </codeSection>
+                <codeSection id="1673235394948370432" sectionCode="flmdf" num="2" name="鍒嗙被鐮佹鐖�" description="" secType="codeclassifysec" secTypeText="鍒嗙被鐮佹" pkCodeRule="1673234841140858880" codeSecLengthType="code_sec_length_variable" codeSecLength="10" parentClassifySecOid="" codeDateFormatStr="">
+                    <sectionValue>
+                        <sectionValue id="1673235471532167168" num="1" name="浜�" value="001" pid="" description=""/>
+                        <sectionValue id="1673235449524654080" num="1" name="涓�" value="001" pid="" description=""/>
+                    </sectionValue>
+                </codeSection>
+                <codeSection id="1673235616541839360" sectionCode="flmdz" num="3" name="鍒嗙被鐮佹瀛�" description="" secType="codeclassifysec" secTypeText="鍒嗙被鐮佹" pkCodeRule="1673234841140858880" codeSecLengthType="code_sec_length_variable" codeSecLength="10" parentClassifySecOid="1673235394948370432" codeDateFormatStr="">
+                    <sectionValue>
+                        <sectionValue id="1673235791276544000" num="1" name="灏忎簩" value="0012" pid="1673235471532167168" description=""/>
+                        <sectionValue id="1673235759584382976" num="1" name="灏忎竴" value="0011" pid="1673235449524654080" description=""/>
+                    </sectionValue>
+                </codeSection>
+                <codeSection id="1673235886290112512" sectionCode="kbmd" num="4" name="鍙彉鐮佹" description="" secType="codevariablesec" secTypeText="鍙彉鐮佹" pkCodeRule="1673234841140858880" codeSecLengthType="code_sec_length_variable" codeSecLength="10" parentClassifySecOid="" codeDateFormatStr="">
+                    <sectionValue/>
+                </codeSection>
+                <codeSection id="1673988942388662272" sectionCode="test" num="5" name="test" description="test" secType="coderefersec" secTypeText="寮曠敤鐮佹" pkCodeRule="1673234841140858880" codeSecLengthType="code_sec_length_variable" codeSecLength="" parentClassifySecOid="" codeDateFormatStr="">
+                    <sectionValue>
+                        <sectionValue id="1639320528018317313" num="2" name="test" value="1639320528018317313" pid="0" description=""/>
+                        <sectionValue id="1645315334091575297" num="2" name="娴嬭瘯" value="1645315334091575297" pid="0" description=""/>
+                        <sectionValue id="1669250221378990082" num="2" name="testadd" value="1669250221378990082" pid="0" description=""/>
+                        <sectionValue id="1638774609350848520" num="2" name="鍝堝搱鍝�" value="1638774609350848520" pid="0" description="1"/>
+                        <sectionValue id="1679395918649556993" num="2" name="閲嶅簡" value="1679395918649556993" pid="0" description=""/>
+                        <sectionValue id="1636660930383716368" num="2" name="瀹忓崥杩滆揪" value="1636660930383716368" pid="0" description=""/>
+                    </sectionValue>
+                </codeSection>
+                <codeSection id="1676064343214657536" sectionCode="flow" num="6" name="娴佹按鐮佹" description="娴佹按鐮佹" secType="codeserialsec" secTypeText="娴佹按鐮佹" pkCodeRule="1673234841140858880" codeSecLengthType="code_sec_length_variable" codeSecLength="4" parentClassifySecOid="" codeDateFormatStr="">
+                    <sectionValue/>
+                </codeSection>
+            </codeRule>
         </classify>
-    </classifys>
-</data>
\ No newline at end of file
+    </library>
+</data>
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java
index 4480390..2aafe53 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/feign/SysClient.java
@@ -18,6 +18,8 @@
 
 import com.vci.ubcs.system.entity.*;
 import com.vci.ubcs.system.service.*;
+import com.vci.ubcs.system.vo.DeptVO;
+import com.vci.ubcs.system.vo.RoleVO;
 import lombok.AllArgsConstructor;
 import org.springblade.core.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
@@ -78,6 +80,15 @@
 	public R<String> getDeptIds(String tenantId, String deptNames) {
 		return R.data(deptService.getDeptIds(tenantId, deptNames));
 	}
+	@Override
+	public R<List<DeptVO>> tree(String tenantId) {
+		return R.data(deptService.tree(tenantId));
+	}
+
+	@Override
+	public R<List<DeptVO>> deptList(String tenantId) {
+		return R.data(deptService.deptList(tenantId));
+	}
 
 	@Override
 	public R<String> getDeptIdsByFuzzy(String tenantId, String deptNames) {
@@ -137,7 +148,14 @@
 	public R<String> getRoleIds(String tenantId, String roleNames) {
 		return R.data(roleService.getRoleIds(tenantId, roleNames));
 	}
-
+	@Override
+	public R<List<RoleVO>> roleTree(String tenantId) {
+		return R.data(roleService.tree(tenantId));
+	}
+	@Override
+	public R<List<RoleVO>>  roleList(String tenantId) {
+		return R.data(roleService.roleList(tenantId));
+	}
 	@Override
 	@GetMapping(ROLE_NAME)
 	public R<String> getRoleName(Long id) {
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java
index ee6f598..12c342a 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/DeptMapper.java
@@ -65,5 +65,11 @@
 	 * @return
 	 */
 	List<String> getDeptNames(Long[] ids);
-
+	/**
+	 * 鑾峰彇鏍戝舰鑺傜偣
+	 *
+	 * @param tenantId
+	 * @return
+	 */
+	List<DeptVO> deptList(String tenantId);
 }
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/RoleMapper.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/RoleMapper.java
index adb4fa1..a2a630f 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/RoleMapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/mapper/RoleMapper.java
@@ -49,6 +49,15 @@
 	List<RoleVO> tree(String tenantId, String excludeRole);
 
 	/**
+	 * 鑾峰彇鏍戝舰鑺傜偣
+	 *
+	 * @param tenantId
+	 * @param excludeRole
+	 * @return
+	 */
+	List<RoleVO> roleList(String tenantId);
+
+	/**
 	 * 鑾峰彇瑙掕壊鍚�
 	 *
 	 * @param ids
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java
index 3f4c0ff..5c9a2bd 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IDeptService.java
@@ -20,7 +20,9 @@
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.vci.ubcs.system.entity.Dept;
 import com.vci.ubcs.system.vo.DeptVO;
+import com.vci.ubcs.system.vo.RoleVO;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
 
 import java.util.List;
 import java.util.Map;
@@ -42,7 +44,7 @@
 	 */
 	IPage<DeptVO> lazyList(String tenantId, Long parentId, Map<String, Object> param, Query query);
 
-	/**
+		/**
 	 * 鏍戝舰缁撴瀯
 	 *
 	 * @param tenantId
@@ -118,4 +120,11 @@
 	 */
 	List<DeptVO> search(String deptName, Long parentId);
 
+	/**
+	 * 鏍戝舰缁撴瀯
+	 *
+	 * @param tenantId
+	 * @return
+	 */
+	List<DeptVO> deptList(String tenantId);
 }
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IRoleService.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IRoleService.java
index d335036..879d3aa 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IRoleService.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/IRoleService.java
@@ -20,6 +20,7 @@
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.vci.ubcs.system.entity.Role;
 import com.vci.ubcs.system.vo.RoleVO;
+import org.springblade.core.tool.api.R;
 
 import javax.validation.constraints.NotEmpty;
 import java.util.List;
@@ -49,6 +50,13 @@
 	List<RoleVO> tree(String tenantId);
 
 	/**
+	 * 鍔犺浇瑙掕壊鍒楄〃
+	 * @param tenantId
+	 * @return
+	 */
+	List<RoleVO> roleList(String tenantId);
+
+	/**
 	 * 鏉冮檺閰嶇疆
 	 *
 	 * @param roleIds      瑙掕壊id闆嗗悎
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java
index 565deda..b59aab3 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/DeptServiceImpl.java
@@ -20,6 +20,7 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.system.vo.RoleVO;
 import org.springblade.core.log.exception.ServiceException;
 import com.vci.ubcs.system.cache.SysCache;
 import com.vci.ubcs.system.entity.Dept;
@@ -30,6 +31,7 @@
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.node.ForestNodeMerger;
 import org.springblade.core.tool.utils.Func;
@@ -86,6 +88,15 @@
 		return baseMapper.lazyList(tenantId, parentId, param, Condition.getPage(query));
 	}
 
+
+
+	@Override
+	public List<DeptVO> deptList(String tenantId) {
+		// 杩欓噷鍒ゆ柇鎴戜滑鑷繁閰嶇疆鐨勭鐞嗙粍绉熸埛锛屽彲浠ユ煡璇㈡墍鏈�
+		List<DeptVO> tree = baseMapper.deptList(tenantId.equals(this.tenantId) ? "":tenantId);
+		return tree;
+	}
+
 	@Override
 	public List<DeptVO> tree(String tenantId) {
 		// 杩欓噷鍒ゆ柇鎴戜滑鑷繁閰嶇疆鐨勭鐞嗙粍绉熸埛锛屽彲浠ユ煡璇㈡墍鏈�
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java
index dc6025a..8ec1b9b 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/service/impl/RoleServiceImpl.java
@@ -24,10 +24,12 @@
 import com.vci.ubcs.system.service.IRoleMenuService;
 import com.vci.ubcs.system.service.IRoleScopeService;
 import com.vci.ubcs.system.service.IRoleService;
+import com.vci.ubcs.system.vo.DeptVO;
 import com.vci.ubcs.system.wrapper.RoleWrapper;
 import lombok.AllArgsConstructor;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.constant.RoleConstant;
 import org.springblade.core.tool.node.ForestNodeMerger;
@@ -79,6 +81,13 @@
 	}
 
 	@Override
+	public List<RoleVO> roleList(String tenantId) {
+		// 杩欓噷鍒ゆ柇鎴戜滑鑷繁閰嶇疆鐨勭鐞嗙粍绉熸埛锛屽彲浠ユ煡璇㈡墍鏈�
+		List<RoleVO> tree = baseMapper.roleList(tenantId.equals(tenantId) ? "":tenantId);
+		return tree;
+	}
+
+	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public boolean grant(@NotEmpty List<Long> roleIds, List<Long> menuIds, List<Long> dataScopeIds, List<Long> apiScopeIds) {
 		return grantRoleMenu(roleIds, menuIds) && grantDataScope(roleIds, dataScopeIds) && grantApiScope(roleIds, apiScopeIds);
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml b/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml
index 8272ac3..f7e1f17 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/DeptMapper.xml
@@ -111,5 +111,23 @@
         </foreach>
         and is_deleted = 0
     </select>
-
+    <select id="deptList" resultMap="deptVOResultMap">
+        SELECT
+        dept.* ,
+        (
+        SELECT
+        CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
+        FROM
+        pl_org_dept
+        WHERE
+        parent_id = dept.id and is_deleted = 0
+        ) AS "has_children"
+        FROM
+        pl_org_dept dept
+        WHERE dept.is_deleted = 0
+        <if test="_parameter!=null and _parameter!=''">
+            and tenant_id = #{_parameter}
+        </if>
+        ORDER BY sort
+    </select>
 </mapper>
diff --git a/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/RoleMapper.xml b/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/RoleMapper.xml
index 051c4d9..297ecf2 100644
--- a/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/RoleMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-system/src/main/resources/mapper/RoleMapper.xml
@@ -24,6 +24,14 @@
         select * from pl_org_role where is_deleted = 0
     </select>
 
+    <select id="roleList" resultMap="roleResultMap">
+        select * from pl_org_role
+        WHERE is_deleted = 0
+        <if test="_parameter!=null and _parameter!=''">
+            and tenant_id = #{_parameter}
+        </if>
+    </select>
+
     <select id="tree" resultMap="treeNodeResultMap">
         select id, parent_id, role_name as title, id as "value", id as "key" from pl_org_role where is_deleted = 0
         <if test="param1!=null">
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/feign/UserClient.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/feign/UserClient.java
index 225c05a..85a5e4d 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/feign/UserClient.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/feign/UserClient.java
@@ -65,6 +65,11 @@
 	public R<UserInfo> userInfo(String tenantId, String account, String userType) {
 		return R.data(service.userInfo(tenantId, account, UserEnum.of(userType)));
 	}
+	@Override
+	@GetMapping(USER_ALL)
+	public R<List<User>> selectAllUser() {
+		return R.data(service.selectAllUser());
+	}
 
 	@Override
 	@PostMapping(USER_AUTH_INFO)
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserSearchService.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserSearchService.java
index 6bb4860..bc21b44 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserSearchService.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserSearchService.java
@@ -37,7 +37,12 @@
 	 */
 	List<User> listByUser(List<Long> userId);
 
-    /**
+	/***
+	 * 鏌ヨ鎵�鏈夌敤鎴�
+	 * @return
+	 */
+	public List<User> listAllUser();
+	/**
 	 * 鏍规嵁閮ㄩ棬ID鏌ヨ鐢ㄦ埛鍒楄〃
 	 *
 	 * @param deptId 閮ㄩ棬ID
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
index b8390e1..74db1d6 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/IUserService.java
@@ -90,6 +90,14 @@
 	 * @return
 	 */
 	List<User> selectAllUser(User user, Long deptId);
+	/**
+	 * 鑾峰彇鎵�鏈�
+	 *
+	 * @param user
+	 * @param deptId
+	 * @return
+	 */
+	List<User>  selectAllUser();
 
 	/**
 	 * 鑷畾涔夊垎椤�
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserSearchServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserSearchServiceImpl.java
index 3b1bfd4..aafc529 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserSearchServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserSearchServiceImpl.java
@@ -43,6 +43,11 @@
 	}
 
 	@Override
+	public List<User> listAllUser() {
+		return this.list();
+	}
+
+	@Override
 	public List<User> listByDept(List<Long> deptId) {
 		LambdaQueryWrapper<User> queryWrapper = Wrappers.lambdaQuery();
 		deptId.forEach(id -> queryWrapper.like(User::getDeptId, id).or());
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
index 4eceb7b..bd7e58d 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
@@ -173,6 +173,13 @@
 		List<User> users = baseMapper.selectUserPage(user, deptIdList, (AuthUtil.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : AuthUtil.getTenantId()));
 		return users;
 	}
+	@Override
+	public List<User> selectAllUser(){
+		LambdaQueryWrapper<User> wrapper=	Wrappers.lambdaQuery();
+		wrapper.eq(User::getIsDeleted,0);
+		List<User> users = baseMapper.selectList(wrapper);
+		return users;
+	}
 
 	@Override
 	public IPage<UserVO> selectUserSearch(UserVO user, Query query) {

--
Gitblit v1.9.3