From bb98d179dd020e0b003446cb35ce422651ab8acd Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期一, 25 九月 2023 09:40:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/refer/vciWebRefer.vue                                                                     |    6 
 Source/UBCS-WEB/src/page/login/index.vue                                                                                 |    6 
 Source/UBCS-WEB/src/api/system/user.js                                                                                   |   13 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java     |   50 --
 Source/UBCS-WEB/src/views/integration/systemInfo.vue                                                                     |   90 ++++
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationLogTypeEnum.java               |   18 +
 Source/UBCS-WEB/package.json                                                                                             |    2 
 Source/UBCS-WEB/src/api/integration/sysInfo.js                                                                           |   18 
 Source/UBCS-WEB/src/views/docking/loge.vue                                                                               |   35 +
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java              |  361 +++++++++++++-------
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/SystemClassifyRoleMapper.java                  |    3 
 Source/UBCS-WEB/src/page/login/userlogin.vue                                                                             |    1 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/json/tt.json        |    4 
 Source/UBCS-WEB/src/page/login/sso.vue                                                                                   |   28 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeApplyWebManagementService.java           |    3 
 Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue                                                                   |    3 
 Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml                                |   13 
 Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue                                                             |  129 +++++++
 Source/UBCS-WEB/src/store/modules/user.js                                                                                |    6 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java     |    2 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/data.json         |    5 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java |  112 ++++++
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java   |   27 +
 Source/UBCS-WEB/src/components/FormTemplate/index.vue                                                                    |   17 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java   |    6 
 Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue                                                   |    7 
 Source/UBCS-WEB/src/main.js                                                                                              |    4 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java      |   23 +
 Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue                                                                 |   28 
 29 files changed, 736 insertions(+), 284 deletions(-)

diff --git a/Source/UBCS-WEB/package.json b/Source/UBCS-WEB/package.json
index 9c10428..a168825 100644
--- a/Source/UBCS-WEB/package.json
+++ b/Source/UBCS-WEB/package.json
@@ -15,7 +15,7 @@
     "axios": "^0.18.0",
     "babel-polyfill": "^6.26.0",
     "classlist-polyfill": "^1.2.0",
-    "crypto-js": "^4.0.0",
+    "crypto-js": "^4.1.1",
     "element-ui": "^2.15.6",
     "instead": "^1.0.3",
     "js-base64": "^2.5.1",
diff --git a/Source/UBCS-WEB/src/api/integration/sysInfo.js b/Source/UBCS-WEB/src/api/integration/sysInfo.js
index 17bc628..258df6a 100644
--- a/Source/UBCS-WEB/src/api/integration/sysInfo.js
+++ b/Source/UBCS-WEB/src/api/integration/sysInfo.js
@@ -45,10 +45,18 @@
   })
 }
 // 鍒嗙被鎺堟潈
-export const batchAddSave = (params) => {
+// export const batchAddSave = (systemOid,systemId,data) => {
+//   return request({
+//     url: '/api/ubcs-code/codeApplyWebManagementController/batchAddSave',
+//     method: 'post',
+//     data: data
+//   })
+// }
+// 鍒嗙被鎺堟潈
+export const batchAddSave = (systemOid, systemId, data) => {
   return request({
-    url: '/api/ubcs-code/codeApplyWebManagementController/batchAddSave',
+    url: `/api/ubcs-code/codeApplyWebManagementController/batchAddSave?systemOid=${systemOid}&systemId=${systemId}`,
     method: 'post',
-    params: params
-  })
-}
+    data: data
+  });
+};
diff --git a/Source/UBCS-WEB/src/api/system/user.js b/Source/UBCS-WEB/src/api/system/user.js
index ed42c7e..041d64c 100644
--- a/Source/UBCS-WEB/src/api/system/user.js
+++ b/Source/UBCS-WEB/src/api/system/user.js
@@ -160,16 +160,13 @@
   })
 }
 //鍗曠偣鐧诲綍鎺ュ彛
-export const oaSsos =(userName) => {
+export const ssoLogin =(empCode) => {
   return request({
-    url: '/api/ubcs-code/passwordFree/oaSsos',
-    method: 'post',
+    url: '/api/ubcs-code/passwordFree/ssoLogin',
+    method: 'get',
     params:{
-      userName
-    },
-    headers: {
-      'empCode': 'ZVKcWmOH1JvFYaM7BuNVm1BWbaw6OcMi04aAT2H+X3Y='
-    },
+      empCode
+    }
   })
 }
 
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
index 3e341d5..9f69e9b 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -211,10 +211,11 @@
           trigger = "blur";
         }
         let fieldMapKey=''
-        if( formItem.type == "refer"){
-          if(!formItem.fieldMap){
-            fieldMapKey=formItem.field+'Id'
-          }
+        if( formItem.type == "refer" && !formItem.fieldMap){
+          fieldMapKey=formItem.field+'Id'
+          formItem.fieldMap={}
+          formItem.fieldMap[fieldMapKey]='id'
+          formItem.fieldMap[formItem.field+'id']='id'
         }
         let columnItem = {
           label: formItem.text,
@@ -249,7 +250,7 @@
                 title: formItem.text,
                 showField: formItem.showField || formItem.field,
                 field: formItem.field,
-                fieldMap:formItem.fieldMap || {fieldMapKey:'id'},
+                fieldMap:formItem.fieldMap || {},
                 placeholder: formItem.inputTip,
                 options: formItem.referConfig
               }
@@ -294,8 +295,121 @@
 
       this.geDictData(dictKeys);
       this.getFormDetail();
-      // console.log('selfColumnConfig',this.selfColumnConfig)
 
+    },
+    //淇敼绾ц仈椤�
+    changeChildItem(items,TreeValue) {
+      let column = this.option.column;
+      let group = this.option.group;
+      items.forEach((item) => {
+        let formItem = this.resetFormConfig(item);
+        if (formItem.field == "lcstatus") {
+          formItem.field = formItem.field + "_text";
+          formItem.readOnly = true;
+        }
+        // 璁剧疆琛ㄥ崟鏍¢獙鐨勮鍒欙紝鏂囨湰
+        let message = "璇烽�夋嫨";
+        let trigger = "change";
+        if (formItem.type === "text") {
+          message = "璇疯緭鍏�";
+          trigger = "blur";
+        }
+        let fieldMapKey = ''
+        if (formItem.type == "refer" && !formItem.fieldMap) {
+          fieldMapKey = formItem.field + 'Id'
+          formItem.fieldMap = {}
+          formItem.fieldMap[fieldMapKey] = 'id'
+          formItem.fieldMap[formItem.field + 'id'] = 'id'
+        }
+        let columnItem = {
+          label: formItem.text,
+          labelslot: true,
+          prop: this.$utilFunc.isValuableObj(formItem.referConfig)
+            ? formItem.showField || formItem.field
+            : formItem.field,
+          field: formItem.field,
+          type: this.columnType[formItem.type],
+          dicData: this.getDataList(formItem.type, formItem.data),
+          disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false),
+          prepend: this.preOrSufFixShow("text", formItem.prefix),
+          append: this.preOrSufFixShow("text", formItem.suffix),
+          prefixIcon: this.preOrSufFixShow("icon", formItem.prefix),
+          suffixIcon: this.preOrSufFixShow("icon", formItem.suffix),
+          valueFormat: formItem.dateFormate,
+          format: formItem.dateFormate,
+          keyAttr: formItem.keyAttr,
+          value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) ||
+            (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null),
+          placeholder: formItem.inputTip,
+          comboxKey: formItem.comboxKey,
+          tip: formItem.tooltips,
+          // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false,
+          // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false ,
+          display: !formItem.hidden,
+          maxlength: formItem.maxlength,
+          filterable: true,
+          referConfig:
+            formItem.type == "refer"
+              ? {
+                title: formItem.text,
+                showField: formItem.showField || formItem.field,
+                field: formItem.field,
+                fieldMap: formItem.fieldMap || {},
+                placeholder: formItem.inputTip,
+                options: formItem.referConfig
+              }
+              : {},
+          span: formItem.span
+            ? formItem.span
+            : formItem.type === "textarea"
+              ? 24
+              : this.localTrendsSpan,
+          rules: [
+            {
+              required: formItem.required,
+              message: `${message}${formItem.text}`,
+              trigger,
+            },
+            {
+              // 濡傛灉娌℃湁姝e垯鍒欏尮閰嶄换浣曞瓧绗�
+              pattern: formItem.verify ? formItem.verify : /[\s\S.]*/g,
+              message: formItem.tooltips,
+              trigger,
+            },
+          ],
+          props: {
+            label: "value",
+            value: "key",
+          },
+        };
+
+        if (group.length === 0) {
+          this.slotColumnList.forEach((index, colItem) => {
+            if (colItem.field == columnItem.field) {
+              this.slotColumnList[index] = columnItem;
+              column[index] = columnItem;
+              return;
+            }
+          })
+        } else {
+          this.slotColumnList.forEach((index, colItem) => {
+            if (colItem.field == columnItem.field) {
+              this.slotColumnList[index] = columnItem;
+              return;
+            }
+          })
+          group.forEach((index, groupItem) => {
+            groupItem.column.forEach((colIndex, colItem) => {
+              if (colItem.field == columnItem.field) {
+                group[index].column[colIndex] = columnItem;
+                return;
+              }
+            })
+          });
+        }
+      });
+      this.$set(this.option, "column", column);
+      this.$set(this.option, "group", group);
     },
     // 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃�
     resetFormConfig(formItem) {
@@ -404,7 +518,6 @@
       );
     },
     setReferValue(data) {
-      debugger;
       if (data.field) {
         this.form[data.field] = data.value || "";
         this.form[data.showField] = data.text || "";
@@ -447,8 +560,8 @@
             this.form[key] = value.join(',');
           }
         }
-        this.$emit("getFormData", this.form);
         this.$emit("referConfigDataUpdate", data);
+        this.$emit("getFormData", this.form);
       }
     },
   },
diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
index 886ce91..858400a 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue
@@ -11,6 +11,7 @@
     @opened="openDialog"
   >
     <FormTemplate
+      key="masterForm" data-key="masterForm"
       v-bind="$attrs"
       :type="type"
       :TreeValue="TreeValue"
@@ -33,7 +34,8 @@
       <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
         <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply">
           <FormTemplate
-            v-bind="$attrs"
+            key="codeApplyForm" data-key="codeApplyForm"
+            secDTOListv-bind="$attrs"
             :type="type"
             :selfColumnType="selfColumnType"
             :selfColumnConfig="selfColumnConfig"
@@ -271,8 +273,8 @@
     },
     // 鑾峰彇鐮佸�肩敵璇锋暟鎹�
     getCodeRule() {
-      let  that = this;
-      getCodeRule({ codeClassifyOid: that.codeClassifyOid }).then((res) => {
+      let that = this;
+      getCodeRule({codeClassifyOid: that.codeClassifyOid}).then((res) => {
         if (res.data && res.data.code === 200) {
           that.codeRuleOid = res.data.data.oid;
           const typeList = [
@@ -298,8 +300,8 @@
           if (that.secVOList.length > 0 && that.type === "add") {
             that.showCodeApply = true;
             that.activeName = "codeApply";
-            that.$nextTick(() => {
-              that.$refs.CodeApply.templateRender(that.secVOList,this.TreeValue);
+            this.$nextTick(() => {
+              that.$refs.CodeApply.templateRender(that.secVOList, this.TreeValue);
             });
           } else {
             that.showCodeApply = false;
@@ -316,16 +318,19 @@
     // 鍙傜収缁勪欢鏁版嵁鍙樻洿
     referConfigDataUpdate(data) {
       const { field } = data;
+      let childItems=[];
       this.secVOList = this.secVOList.map((item) => {
         if (item.parentClassifySecOid === field) {
           this.$refs.CodeApply.form[item.oid] = undefined;
           this.$refs.CodeApply.form[item.name] = undefined;
           item.readOnly=false;
           item.referConfig.extraParams.parentClassifyValueOid=data.value;
+          childItems.push(item)
         }
         return item;
       });
-      this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue);
+      //this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue);
+      this.$refs.CodeApply.changeChildItem(childItems);
     },
     resembleQuerySubmit() {
       this.activeName = "resembleQuery";
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 8b5bc4c..da4f9db 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -853,6 +853,7 @@
           {
             label: "鍙傜収閰嶇疆",
             prop: "referConfig",
+            width: 105
           },
           {
             label: "绾ц仈鏌ヨ灞炴��",
@@ -897,7 +898,7 @@
           {
             label: "鍙栧�艰寖鍥�",
             prop: "valueArea",
-          },
+          }
         ]
       },
       // 瀛樺偍琛ㄦ牸鏁版嵁
diff --git a/Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue b/Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue
index e389526..155d24a 100644
--- a/Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue
+++ b/Source/UBCS-WEB/src/components/code-dialog-page/maxSerialnumDialog.vue
@@ -7,7 +7,7 @@
     </el-form>
     <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
       <el-tab-pane label="鏈�澶ф祦姘村彿" name="codeApply">
-        <form-template v-bind="$attrs" type="add" :selfColumnType="selfColumnType" :trendsSpan="24"
+        <form-template key="codeApplyMaxForm" data-key="codeApplyMaxForm" v-bind="$attrs" type="add" :selfColumnType="selfColumnType" :trendsSpan="24"
                        :selfColumnConfig="selfColumnConfig" ref="CodeApply" @getFormData="getCodeApplyFormData"
                        @referConfigDataUpdate="referConfigDataUpdate"></form-template>
       </el-tab-pane>
@@ -194,16 +194,19 @@
     // 鍙傜収缁勪欢鏁版嵁鍙樻洿
     referConfigDataUpdate(data) {
       const {field} = data;
+      let childItems=[];
       this.secVOList = this.secVOList.map((item) => {
         if (item.parentClassifySecOid === field) {
           this.$refs.CodeApply.form[item.oid] = undefined;
           this.$refs.CodeApply.form[item.name] = undefined;
           item.readOnly = false;
           item.referConfig.extraParams.parentClassifyValueOid = data.value;
+          childItems.push(item)
         }
         return item;
       });
-      this.$refs.CodeApply.templateRender(this.secVOList);
+      //this.$refs.CodeApply.templateRender(this.secVOList);
+      this.$refs.CodeApply.changeChildItem(childItems);
     },
     isRequired(item) {
       return item.nullableFlag != "true";
diff --git a/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue b/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue
index 7ecbfa0..f73ca39 100644
--- a/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue
+++ b/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue
@@ -1,8 +1,8 @@
 <template>
   <div v-if="display">
-    <vciWebReferTree ref="vciWebReferTree" v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTree>
-    <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTable>
-    <vciWebReferDefalut v-else  @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferDefalut>
+    <vciWebReferTree :key="referConfig.field" :data-key="referConfig.field" ref="vciWebReferTree" v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTree>
+    <vciWebReferTable :key="referConfig.field" :data-key="referConfig.field" v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferTable>
+    <vciWebReferDefalut :key="referConfig.field" :data-key="referConfig.field" v-else  @setValue="setValue" :value="value" :text="text" :title="title" :disabled="disabled" :referConfig="referConfig"></vciWebReferDefalut>
 
   </div>
 </template>
diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
index fa3ea8d..f1ac96e 100644
--- a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
+++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
@@ -1,5 +1,6 @@
 <template>
-  <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :blur="valueChange" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree>
+  <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked"
+                   :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree>
 </template>
 
 <script>
@@ -11,6 +12,7 @@
   props:["referConfig","value","text","title","disabled"],
   data() {
     return {
+      visible: false,
       options: this.referConfig.options,
       lazy: this.referConfig.options.loadType == 'node',
       isMuti:("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false,
@@ -127,14 +129,15 @@
 
     },
     getTree() {
+      //鍔犺浇鍏ㄩ儴
       getTree(this.params, this.treeUrl).then(res => {
         res.data.map(item => {
-          if (!item.attribute) {
-            item.attribute = {
+          if (!item.attributes) {
+            item.attributes = {
               data: {}
             }
           } else {
-            item.attribute.data = item.attribute.data || {}
+            item.attributes.data = item.attributes.data || {}
           }
           return {
             ...item,
@@ -145,6 +148,7 @@
       })
     },
     treeLoad: function (treeNode, resolve) {
+      //閫愮骇鍔犺浇
       const parentOid = (treeNode.level === 0) ? 0 : treeNode.data.oid;
       this.params.parentOid=parentOid.indexOf('@vcitreesep@') > -1 ? parentOid.split('@vcitreesep@')[1] : parentOid;
       this.params.parentValue=this.params.parentOid;
@@ -158,12 +162,12 @@
       }
       getLazyTree(this.params,this.treeUrl).then(res => {
         resolve(res.data.data.map(item => {
-          if(!item.attribute){
-            item.attribute={
+          if(!item.attributes){
+            item.attributes={
               data:{}
             }
           }else{
-            item.attribute.data=item.attribute.data || {}
+            item.attributes.data=item.attributes.data || {}
           }
           return {
             ...item,
@@ -178,17 +182,13 @@
       }
     },
     checked(checkedNode, checkedData) {
-      this.checkedData=checkedData
-    },
-    valueChange(){
-      if(this.isMuti){
-        // this.setValue(this.checkedData)
-      }
+      this.setValue(checkedData)
     },
     setValue:function (checkedData){
+      this.checkedData=checkedData
       var value = [];
       var text = [];
-      const textSep =this.config.textSep;
+      const textSep =this.config.textSep;debugger;
       for(var j =0;j<checkedData.checkedNodes.length;j++){
         const item=checkedData.checkedNodes[j];
         var v=this.config.valueField.indexOf("attribute.")>=0?(item.attributes[this.config.valueField.replace("attribute.","")] || item.attributes.data[this.config.valueField.replace("attribute.","")]):(item.attributes[this.config.valueField] || item[this.config.valueField] || item.attributes.data[this.config.valueField])
diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js
index eecd5c0..b4c69fe 100644
--- a/Source/UBCS-WEB/src/main.js
+++ b/Source/UBCS-WEB/src/main.js
@@ -76,8 +76,8 @@
   i18n: (key, value) => i18n.t(key, value)
 });
 //澶嶅埗鎻掍欢
-import VueClipboard from 'vue-clipboard2'
-Vue.use( VueClipboard )
+  import VueClipboard from 'vue-clipboard2'
+  Vue.use( VueClipboard )
 //鏃堕棿鎻掍欢
 import moment from 'moment';
 Vue.prototype.$moment = moment;
diff --git a/Source/UBCS-WEB/src/page/login/index.vue b/Source/UBCS-WEB/src/page/login/index.vue
index 1ec9a95..efca008 100644
--- a/Source/UBCS-WEB/src/page/login/index.vue
+++ b/Source/UBCS-WEB/src/page/login/index.vue
@@ -21,12 +21,6 @@
           </h4>
           <userLogin v-if="activeName==='user'"></userLogin>
           <thirdLogin v-else-if="activeName==='third'"></thirdLogin>
-<!--          <div class="login-menu">-->
-<!--            <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a>-->
-<!--            <a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>-->
-<!--            <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a>-->
-<!--            <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a>-->
-<!--          </div>-->
         </div>
 
       </div>
diff --git a/Source/UBCS-WEB/src/page/login/sso.vue b/Source/UBCS-WEB/src/page/login/sso.vue
index 2d2f699..26e9510 100644
--- a/Source/UBCS-WEB/src/page/login/sso.vue
+++ b/Source/UBCS-WEB/src/page/login/sso.vue
@@ -3,33 +3,31 @@
 </template>
 
 <script>
-import {oaSsos} from "@/api/system/user.js"
+import {ssoLogin} from "@/api/system/user.js"
 import {mapGetters} from "vuex";
 import {setStore} from "@/util/store";
 
 export default {
   name: "sso",
   data() {
-    return {}
+    return {
+      PathString:'',
+    }
   },
-  computed: {},
+  computed: {
+    ...mapGetters(["tagWel"])
+  },
   created() {
     this.onLoad()
   },
+
   methods: {
     onLoad() {
-      
-      console.log(info);
-      const loading = this.$loading({
-        lock: true,
-        text: 'Loading',
-        spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
-      });
-      setTimeout(() => {
-        loading.close();
-      }, 2000);
-
+      this.PathString=this.$route.query.empCode;
+      this.$store.dispatch("LoginBySso", { PathString: this.PathString }).then((res) => {
+        console.log('res', res)
+        this.$router.push({ path: this.tagWel.value });
+      })
     }
   }
 }
diff --git a/Source/UBCS-WEB/src/page/login/userlogin.vue b/Source/UBCS-WEB/src/page/login/userlogin.vue
index 1311274..a368aa4 100644
--- a/Source/UBCS-WEB/src/page/login/userlogin.vue
+++ b/Source/UBCS-WEB/src/page/login/userlogin.vue
@@ -349,7 +349,6 @@
 
     },
     handleLogin: function () {
-      debugger
       this.userInfo = this.$store.state.upadatastatus
       localStorage.setItem('username', this.loginForm.username)
       this.$refs.loginForm.validate(valid => {
diff --git a/Source/UBCS-WEB/src/store/modules/user.js b/Source/UBCS-WEB/src/store/modules/user.js
index 8227677..ac03016 100644
--- a/Source/UBCS-WEB/src/store/modules/user.js
+++ b/Source/UBCS-WEB/src/store/modules/user.js
@@ -5,7 +5,7 @@
 import {deepClone} from '@/util/util'
 import website from '@/config/website'
 import {loginByUsername, loginBySocial, loginBySso, getUserInfo, logout, refreshToken, getButtons} from '@/api/user'
-import {oaSsos} from "@/api/system/user.js"
+import {ssoLogin} from "@/api/system/user.js"
 import {getTopMenu, getRoutes} from '@/api/system/menu'
 import md5 from 'js-md5'
 
@@ -110,9 +110,9 @@
       })
     },
     //鏍规嵁鍗曠偣淇℃伅鐧诲綍
-    LoginBySso({commit}) {
+    LoginBySso({commit},{PathString}) {
       return new Promise((resolve) => {
-        oaSsos().then(res => {
+        ssoLogin(PathString).then(res => {
           const data = res.data;
           if (data.error_description) {
             Message({
diff --git a/Source/UBCS-WEB/src/views/docking/loge.vue b/Source/UBCS-WEB/src/views/docking/loge.vue
index 91a235b..ff50556 100644
--- a/Source/UBCS-WEB/src/views/docking/loge.vue
+++ b/Source/UBCS-WEB/src/views/docking/loge.vue
@@ -90,6 +90,20 @@
             prop: 'interfaceStatus',
             value:7
           },
+          {
+            label: '鏍囧噯鐢宠',
+            prop: 'applyCodeForBZ',
+            value:8          },
+          {
+            label: '閮ㄩ棬鐢宠',
+            prop: 'syncDataForOrg',
+            value:9
+          },
+          {
+            label: '浜哄憳鐢宠',
+            prop: 'syncDataForPerson',
+            value:10
+          },
         ],
       },
       loading: false,
@@ -106,7 +120,6 @@
         calcHeight: 0,
         tip: false,
         searchShow: false,
-        // searchMenuSpan: 12,
         border: true,
         index: true,
         viewBtn: true,
@@ -140,6 +153,24 @@
             sortable:true,
             overHidden: true,
             width: 140
+          },
+          {
+            label: '鏍囧噯鐢宠',
+            prop: 'applyCodeForBZ',
+            sortable:true,
+            width: 130
+          },
+          {
+            label: '閮ㄩ棬鐢宠',
+            prop: 'syncDataForOrg',
+            sortable:true,
+            width: 130
+          },
+          {
+            label: '浜哄憳鐢宠',
+            prop: 'syncDataForPerson',
+            sortable:true,
+            width: 130
           },
           {
             label: '闆嗘垚绯荤粺缂栧彿',
@@ -199,7 +230,7 @@
               value: "key"
             },
             formatter : function (row, column) {
-              return row.interfaceStatus == 'true' || row.interfaceStatus == '' ? '<i class="el-icon-check" style="color: limegreen;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: red;font-size: 20px;font-weight: 800"></i>'
+              return row.interfaceStatus == 'true' || row.interfaceStatus == '' ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>'
             }
           },
         ]
diff --git a/Source/UBCS-WEB/src/views/integration/systemInfo.vue b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
index a6b21e5..4d3dee2 100644
--- a/Source/UBCS-WEB/src/views/integration/systemInfo.vue
+++ b/Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -24,7 +24,8 @@
 
       </template>
     </avue-crud>
-    <el-dialog :visible.sync="dialogVisible" append-to-body class="avue-dialog avue-dialog--top" title="鍒嗙被鎺堟潈" top="-50px">
+    <el-dialog :visible.sync="dialogVisible" append-to-body class="avue-dialog avue-dialog--top" title="鍒嗙被鎺堟潈"
+               top="-50px">
 
       <el-row>
         <el-col :span="10">
@@ -37,19 +38,28 @@
         </el-col>
       </el-row>
       <div slot="footer" class="dialog-footer" style="height: 50px;line-height: 50px">
-        <el-button type="primary" icon="el-icon-plus" size="small" @click="empower">鎺� 鏉�</el-button>
-        <el-button icon="el-icon-close"  size="small" type="danger">閲� 缃�</el-button>
-    </div>
+        <el-button icon="el-icon-plus" size="small" type="primary" @click="empower">鎺� 鏉�</el-button>
+        <el-button icon="el-icon-close" size="small" type="danger">閲� 缃�</el-button>
+      </div>
     </el-dialog>
   </basic-container>
 </template>
 <script>
-import {getSysInfoList, sysInfoAdd, sysInfoEdit, sysInfoDel, sysInfoTree,batchAddSave} from '@/api/integration/sysInfo.js'
+import {
+  getSysInfoList,
+  sysInfoAdd,
+  sysInfoEdit,
+  sysInfoDel,
+  sysInfoTree,
+  batchAddSave
+} from '@/api/integration/sysInfo.js'
 
 export default {
   data() {
     return {
-      checkAll:[],
+      checkAll: {},
+      ParentList: [],
+      ParentRemoveList:[],
       //閬垮厤缂撳瓨
       reload: Math.random(),
       TreeLoading: false,
@@ -126,24 +136,74 @@
       },
     }
   },
-
+  created() {
+  },
   methods: {
-    empower(){
-      batchAddSave({systemOid: this.checkAll.oid, systemId: this.checkAll.id}).then(res=>{
+    empower() {
+      batchAddSave(this.checkAll.oid, this.checkAll.id, this.ParentList).then(res => {
         console.log(res)
       })
     },
     //鍒嗙被鎺堟潈澶氶�夊洖璋�
-    checkChange(row,checked) {
-      if(checked){
-        // console.log('row',row)
-        this.checkAll.push(row);
-        console.log('checkAll',this.checkAll)
+    checkChange(row, checked) {
+      if (checked) {
+        if (!row.parentId && row.children) {
+          const parentRecord = {
+            oid: row.oid,
+            classifyId: row.attributes.classifyId,
+            classifyOid: row.attributes.classifyOid,
+            classParentOid: row.parentId,
+          };
+          this.ParentList.push(parentRecord);
+          // 濡傛灉row鐨刢hildren涓嶄负绌猴紝缁х画寰幆children涓殑姣忎釜瀵硅薄
+          if (row.children && row.children.length > 0) {
+            for (let child of row.children) {
+              const childRecord = {
+                oid: child.oid,
+                classifyId: child.attributes.classifyId,
+                classifyOid: child.attributes.classifyOid,
+                classParentOid: child.parentId,
+              };
+              this.ParentList.push(childRecord);
+              // 濡傛灉瀛愬璞$殑children涓嶄负绌猴紝缁х画寰幆鑾峰彇鏁版嵁
+              if (child.children && child.children.length > 0) {
+                for (let subChild of child.children) {
+                  const subRecord = {
+                    oid: subChild.oid,
+                    classifyId: subChild.attributes.classifyId,
+                    classifyOid: subChild.attributes.classifyOid,
+                    classParentOid: subChild.parentId,
+                  };
+                  this.ParentList.push(subRecord);
+                }
+              }
+            }
+          }
+          console.log(this.ParentList);
+        }
+      } else {
+        if (!row.parentId && row.children) {
+          this.ParentRemoveList = this.ParentList.filter(record => record.oid !== row.oid);
+
+          if (row.children && row.children.length > 0) {
+            for (let child of row.children) {
+              this.ParentRemoveList = this.ParentList.filter(record => record.oid !== child.oid);
+
+              if (child.children && child.children.length > 0) {
+                for (let subChild of child.children) {
+                  this.ParentRemoveList = this.ParentList.filter(record => record.oid !== subChild.oid);
+                }
+              }
+            }
+          }
+        }
+        console.log(this.ParentRemoveList)
       }
     },
     //鍒嗙被鎺堟潈
     classifyHandler(row) {
       this.loading = true;
+      this.checkAll = row
       sysInfoTree({systemOid: row.oid, systemId: row.id}).then(res => {
         this.TreeData = res.data;
         this.ModifyProperties(this.TreeData, 'text', 'label');
@@ -273,7 +333,7 @@
     },
     // enter鎼滅储
     handleEnter() {
-     this.getDataList()
+      this.getDataList()
     },
     // 杈撳叆妗嗘竻绌�
     handleClear() {
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java
index 0f86f0b..73ade5c 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/apply/ApplyDataVO.java
@@ -44,22 +44,7 @@
     @XStreamAsAttribute
     private  String editor;
 
-	/***
-	 * 鏄惁淇
-	 */
-	private boolean amendmentFlag;
-	/***
-	 *鏄惁鏄郴鍒楁爣鍑�
-	 */
-	private boolean seriesStandardFlag;
-	/**
-	 * 鏄惁缁х画缂栧彿
-	 */
-	private boolean continueNumberFlag;
-	/***
-	 * 骞翠唬鍙�
-	 */
-	private String yearNumber;
+
     /***
      * 鏁版嵁灞炴�у璞�
      */
@@ -121,39 +106,6 @@
     public void setProp(List<ProppertyVO> prop) {
         this.prop = prop;
     }
-
-	public boolean isAmendmentFlag() {
-		return amendmentFlag;
-	}
-
-	public void setAmendmentFlag(boolean amendmentFlag) {
-		this.amendmentFlag = amendmentFlag;
-	}
-
-	public boolean isSeriesStandardFlag() {
-		return seriesStandardFlag;
-	}
-
-	public void setSeriesStandardFlag(boolean seriesStandardFlag) {
-		this.seriesStandardFlag = seriesStandardFlag;
-	}
-
-	public boolean isContinueNumberFlag() {
-		return continueNumberFlag;
-	}
-
-	public void setContinueNumberFlag(boolean continueNumberFlag) {
-		this.continueNumberFlag = continueNumberFlag;
-	}
-
-	public String getYearNumber() {
-		return yearNumber;
-	}
-
-	public void setYearNumber(String yearNumber) {
-		this.yearNumber = yearNumber;
-	}
-
 	@Override
     public String toString() {
         return "ApplyDataVO{" +
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java
index 1090c66..56073cd 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZDataVO.java
@@ -40,4 +40,116 @@
 	 */
 	@XStreamImplicit
 	private List<ProppertyVO> prop;
+	/***
+	 * 鏄惁淇
+	 */
+	private boolean amendmentFlag;
+	/***
+	 *鏄惁鏄郴鍒楁爣鍑�
+	 */
+	private boolean seriesStandardFlag;
+	/**
+	 * 鏄惁缁х画缂栧彿
+	 */
+	private boolean continueNumberFlag;
+	/***
+	 * 骞翠唬鍙�
+	 */
+	private String yearNumber;
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getCreator() {
+		return creator;
+	}
+
+	public void setCreator(String creator) {
+		this.creator = creator;
+	}
+
+	public String getEditor() {
+		return editor;
+	}
+
+	public void setEditor(String editor) {
+		this.editor = editor;
+	}
+
+	public List<ProppertyVO> getProp() {
+		return prop;
+	}
+
+	public void setProp(List<ProppertyVO> prop) {
+		this.prop = prop;
+	}
+
+	public boolean isAmendmentFlag() {
+		return amendmentFlag;
+	}
+
+	public void setAmendmentFlag(boolean amendmentFlag) {
+		this.amendmentFlag = amendmentFlag;
+	}
+
+	public boolean isSeriesStandardFlag() {
+		return seriesStandardFlag;
+	}
+
+	public void setSeriesStandardFlag(boolean seriesStandardFlag) {
+		this.seriesStandardFlag = seriesStandardFlag;
+	}
+
+	public boolean isContinueNumberFlag() {
+		return continueNumberFlag;
+	}
+
+	public void setContinueNumberFlag(boolean continueNumberFlag) {
+		this.continueNumberFlag = continueNumberFlag;
+	}
+
+	public String getYearNumber() {
+		return yearNumber;
+	}
+
+	public void setYearNumber(String yearNumber) {
+		this.yearNumber = yearNumber;
+	}
+
+	@Override
+	public String toString() {
+		return "ApplyBZDataVO{" +
+			"id='" + id + '\'' +
+			", code='" + code + '\'' +
+			", status='" + status + '\'' +
+			", creator='" + creator + '\'' +
+			", editor='" + editor + '\'' +
+			", prop=" + prop +
+			", amendmentFlag=" + amendmentFlag +
+			", seriesStandardFlag=" + seriesStandardFlag +
+			", continueNumberFlag=" + continueNumberFlag +
+			", yearNumber='" + yearNumber + '\'' +
+			'}';
+	}
 }
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java
index f27a6fd..f3a302a 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ApplyBZVO.java
@@ -2,7 +2,9 @@
 
 import com.thoughtworks.xstream.annotations.XStreamAlias;
 import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
+import com.vci.ubcs.code.vo.webserviceModel.apply.ClassfyVO;
 import com.vci.ubcs.code.vo.webserviceModel.apply.UserVO;
+
 /**
  *鏁版嵁淇℃伅
  */
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java
index 9319aac..88ae6d2 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/applybz/ClassfyBZVO.java
@@ -27,7 +27,7 @@
 	/**
 	 * 鏁版嵁闆嗗悎
 	 */
-	private ApplyDatasVO objects;
+	private ApplyBZDatasVO objects;
 
 	public String getClassCode() {
 		return classCode;
@@ -53,11 +53,11 @@
 		this.fullclsfNamePath = fullclsfNamePath;
 	}
 
-	public ApplyDatasVO getObjects() {
+	public ApplyBZDatasVO getObjects() {
 		return objects;
 	}
 
-	public void setObjects(ApplyDatasVO objects) {
+	public void setObjects(ApplyBZDatasVO objects) {
 		this.objects = objects;
 	}
 
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/data.json b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/data.json
index 9b0e9c6..d45ed30 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/data.json
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/coderule/data.json
@@ -1,6 +1,6 @@
 {
   "data":{
-    "systemId": "MPM",
+    "systemId": "PDM",
     "user": {
       "userName": "weidy",
       "trueName": "榄忓ぇ鍕�",
@@ -9,8 +9,7 @@
     "library": {
       "id": "wupin",
       "classifyid":[
-        "020201",
-        "020202"
+        "020201"
       ]
     }
   }
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/json/tt.json b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/json/tt.json
index 848d6d3..ef1de0a 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/json/tt.json
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/webserviceModel/result/json/tt.json
@@ -1,7 +1,7 @@
 {
   "data": {
     "classifys": {
-      "classfy": [
+      "classify": [
         {
           "fullclsfNamePath": "鐗╁搧##VCI##鏍囧噯浠�##VCI##铻烘爴",
           "classCode": "020101",
@@ -59,4 +59,4 @@
       ]
     }
   }
-}
\ No newline at end of file
+}
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java
index 21edf3b..c82e622 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/controller/CodeApplyWebManagementController.java
@@ -10,6 +10,7 @@
 import org.springblade.core.tool.api.R;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -52,15 +53,37 @@
 		return R.success("鏌ヨ鎴愬姛");
 	}
 
+	/**
+	 * 鎺ュ彛绋嬪簭鎺堟潈绠$悊涓垎绫绘巿鏉冨姛鑳�
+	 * @param list 鎺堟潈閫変腑鐨勬暟鎹�
+	 * @param systemOid 绯荤粺鐨刼id
+	 * @param systemId	绯荤粺鐨刬d
+	 * @return
+	 */
 	@PostMapping( "/batchAddSave")
 	public R batchAddSave(@RequestBody List<SystemClassifyRole> list,String systemOid,String systemId){
 		return codeApplyWebManagementService.batchAddSave(list,systemOid,systemId);
 //		return R.success("dddd");
 	}
 
+	/**
+	 * 缂栫爜鍒嗙被鏍戞煡璇㈡帴鍙�
+	 * @param systemOid 绯荤粺鐨刼id
+	 * @param systemId 绯荤粺鐨刬d
+	 * @return
+	 */
 	@GetMapping("/getSystemClassifyRoleTree")
 	public List<Tree> getSystemClassifyRoleTree(String systemOid,String systemId){
 		return codeApplyWebManagementService.getSystemClassifyRoleTree(systemOid,systemId);
 	}
 
+	/**
+	 * 鏍囧噯璇风爜鐣岄潰锛屾巿鏉冧簡鐨勬墠鑳芥煡璇㈠埌锛岀紪鐮佸垎绫绘爲鏌ヨ鎺ュ彛
+	 * @param paramMap systemOid绯荤粺鐨刼id,systemId绯荤粺鐨刬d,library缂栫爜鍒嗙被缂栧彿
+	 * @return
+	 */
+	@GetMapping("/getAuthTree")
+	public List<Tree> getAuthTree(@RequestParam HashMap<String,String> paramMap){
+		return codeApplyWebManagementService.getAuthTree(paramMap);
+	}
 }
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationLogTypeEnum.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationLogTypeEnum.java
index 635c733..d0829b3 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationLogTypeEnum.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/enumpack/SysIntegrationLogTypeEnum.java
@@ -36,7 +36,23 @@
 	/***
 	 * 鏁版嵁鏌ヨ
 	 */
-	TYPE_ACCPET_QUERYDATA("queryData","鏁版嵁鏌ヨ");
+	TYPE_ACCPET_QUERYDATA("queryData","鏁版嵁鏌ヨ"),
+
+	/***
+	 * 鏍囧噯鐢宠
+	 */
+	TYPE_ACCPET_APPLYCODEFORBZ("applyCodeForBZ","鏍囧噯鐢宠"),
+
+	/***
+	 * 閮ㄩ棬鐢宠
+	 */
+	TYPE_ACCPET_SYNCDATAFORORG("syncDataForOrg","閮ㄩ棬鐢宠"),
+
+
+	/***
+	 * 浜哄憳鐢宠
+	 */
+	TYPE_ACCPET_SYNCDATAFORPERSON("syncDataForPerson","浜哄憳鐢宠");
 
 	/**
 	 * 鏋氫妇鐨勫��
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/SystemClassifyRoleMapper.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/SystemClassifyRoleMapper.java
index 6bd0191..9a452e6 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/SystemClassifyRoleMapper.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/mapper/SystemClassifyRoleMapper.java
@@ -1,10 +1,13 @@
 package com.vci.ubcs.code.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.vci.ubcs.code.entity.CodeClassify;
 import com.vci.ubcs.code.entity.SystemClassifyRole;
 
 import java.util.List;
 
 public interface SystemClassifyRoleMapper extends BaseMapper<SystemClassifyRole> {
 	public List<SystemClassifyRole> getListSystemClassifyRole(String systemOid, String systemId);
+
+	public List<CodeClassify> getListClassifyRole(String systemOid, String systemId,String library);
 }
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeApplyWebManagementService.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeApplyWebManagementService.java
index 3ea2f51..52a2a80 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeApplyWebManagementService.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/ICodeApplyWebManagementService.java
@@ -5,10 +5,13 @@
 import com.vci.ubcs.starter.web.pagemodel.Tree;
 import org.springblade.core.tool.api.R;
 
+import java.util.HashMap;
 import java.util.List;
 
 public interface ICodeApplyWebManagementService extends IService<SystemClassifyRole> {
 	R batchAddSave(List<SystemClassifyRole> list,String systemOid,String systemId);
 
 	List<Tree> getSystemClassifyRoleTree(String systemOid, String systemId);
+
+	List<Tree> getAuthTree(HashMap<String, String> paramMap);
 }
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java
index ca874f0..f43d83a 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeApplyWebManagementServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.vci.ubcs.code.entity.CodeClassify;
 import com.vci.ubcs.code.entity.SystemClassifyRole;
 import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus;
 import com.vci.ubcs.code.mapper.SystemClassifyRoleMapper;
@@ -12,15 +13,13 @@
 import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
 import com.vci.ubcs.starter.web.pagemodel.Tree;
 import jodd.util.StringUtil;
+import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
@@ -36,6 +35,8 @@
 	 */
 	@Resource
 	private RevisionModelUtil revisionModelUtil;
+	@Resource
+	private CodeClassifyServiceImpl classifyService;
 
 
 	@Override
@@ -87,4 +88,22 @@
 		});
 		return tree;
 	}
+
+	@Override
+	public List<Tree> getAuthTree(HashMap<String, String> paramMap) {
+		//鏌ヨ宸茬粡鎺堟潈浜嗙殑鍒嗙被
+		List<CodeClassify> listClassifyRole = baseMapper.getListClassifyRole(paramMap.get("systemOid"), paramMap.get("systemId"), paramMap.get("library"));
+		if(listClassifyRole.size() == 0){
+			throw new ServiceException("杩樻湭鎺堟潈锛岃鑱旂郴缂栫爜璧勬簮绠$悊绯荤粺绠$悊鍛樻巿鏉冿紒");
+		}
+		List<CodeClassifyVO> voList = classifyService.codeClassifyDO2VOs(listClassifyRole);
+		TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(classifyService.PARENT_FIELD_NAME);
+		//杞崲鎴愭爲褰㈢粨鏋�
+		List<Tree> tree= revisionModelUtil.doList2Trees(voList,treeWrapperOptions,(CodeClassifyVO s) ->{
+			//鍙互鍦ㄨ繖閲屽鐞嗘爲鑺傜偣鐨勬樉绀�
+			return s.getId() + " " + s.getName() + (FrameworkDataLCStatus.DISABLED.getValue().equalsIgnoreCase(s
+				.getLcStatus()) ? (" 銆愬仠鐢ㄣ�� ") : "");
+		});
+		return tree;
+	}
 }
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 a5016f5..6b63a24 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
@@ -17,8 +17,7 @@
 import com.vci.ubcs.code.util.ClientBusinessObject;
 import com.vci.ubcs.code.util.gennerAttrMapUtil;
 import com.vci.ubcs.code.vo.pagemodel.*;
-import com.vci.ubcs.code.vo.webserviceModel.applybz.ApplyBZParamVO;
-import com.vci.ubcs.code.vo.webserviceModel.applybz.ApplyBZVO;
+import com.vci.ubcs.code.vo.webserviceModel.applybz.*;
 import com.vci.ubcs.code.vo.webserviceModel.person.*;
 import com.vci.ubcs.code.vo.webserviceModel.apply.*;
 import com.vci.ubcs.code.vo.webserviceModel.attrmap.*;
@@ -55,7 +54,6 @@
 import com.vci.ubcs.system.vo.DeptVO;
 import com.vci.ubcs.system.vo.RoleVO;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.tools.ant.taskdefs.condition.Http;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
@@ -67,9 +65,7 @@
 
 import javax.annotation.Resource;
 import javax.jws.WebMethod;
-import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Context;
 import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.handler.MessageContext;
 import java.util.*;
@@ -1938,131 +1934,181 @@
 		return resultStr;
 	}
 
+	/***
+	 * 鏍囧噯鍖栫敓鎴愭帴鍙�
+	 * @param data 鏁版嵁淇℃伅
+	 * @param dataType 鏁版嵁鏍煎紡绫诲瀷
+	 * @return
+	 */
 	public String applyCodeForBZ(String data,String dataType){
 		String resultStr = "";
-//		log.info("鏂规硶->applyCodeForBZ start");
-//
-//		final String[] errorid = {"0"};
-//		msg="鎴愬姛";
-//		objerrorCode="0";
-//		objerrorMsg="鎴愬姛";
-//		log.info("鐢宠缂栫爜鐨勬暟鎹弬鏁�:->"+data);
-//		log.info("鐢宠缂栫爜鐨勬暟鎹被鍨�:->"+dataType);
-//		String systemId="";
-//		List<XMLResultClassfyVO> resultClassfyVOList = new ArrayList<>();
-//		LinkedList<XMLResultDataObjectDetailDO> resultDataObjectDetailDOs = new LinkedList<>();
-//		try{
-//			try {
-//				if(StringUtils.isBlank(data)) {
-//					errorid[0] ="101";
-//					throw new Throwable("鎺ュ彛鍙傛暟锛氫紶閫掍负绌�");
-//				}
-//				ApplyBZParamVO applyBZParamVO  =new ApplyBZParamVO();
-//				//濡傛灉dataType鏄痻ml鍒欙紝閫氳繃xml搴忓垪鍖栨垚瀵硅薄褰㈠紡锛屽鏋滄槸json鍒欓�氳繃json杞崲鎴愬璞℃牸寮�
-//				try {
-//					if ("xml".equals(dataType)) {
-//						XStream xStream = new XStream(new DomDriver());
-//						xStream.processAnnotations(RootDataVO.class);
-//						xStream.autodetectAnnotations(true);
-//						ApplyBZVO rootDataVO = (ApplyBZVO) xStream.fromXML(data);
-//						applyBZParamVO.setData(rootDataVO);
-//					} else {
-//						applyBZParamVO = JSONObject.toJavaObject(JSONObject.parseObject(data), ApplyBZParamVO.class);
-//					}
-//				}catch (Throwable e){
-//					errorid[0] ="101";
-//					throw new Throwable("鎺ュ彛鍙傛暟锛氫紶鍏ユ暟鎹弬鏁拌В鏋愬け璐�");
-//				}
-//				ClassfysVO classfysVO = interParameterVO.getData().getClassifys();
-//				systemId = interParameterVO.getData().getSystemId();
-//				UserVO userVo = interParameterVO.getData().getUser();
-//				//鍏嶅瘑鐧诲綍鐢宠token锛宺equest涓坊鍔犵敤鎴蜂俊鎭�
-//				passwordFreeLoginService.passwordFreeLogin(userVo.getUserName(),this.getRequest());
-//				AuthUtil.getUser();
-//				List<ClassfyVO> classVOList = classfysVO.getClassify();
-//				InterParameterVO finalInterParameterVO = interParameterVO;
-//				//杩欐槸璐﹀彿淇℃伅
-//				SessionInfo sessionInfo = new SessionInfo();
-//				sessionInfo.setUserId(userVo.getUserName());
-//				sessionInfo.setUserName(userVo.getTrueName());
-//				sessionInfo.setIp(userVo.getIp());
-//				VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
-////				List<XMLResultDataObjectDetailDO> allResultDataObjectDetailDOS=new ArrayList<>();
-//				String finalSystemId = systemId;
-//			} catch (Throwable e) {
-//				List<ApplyDataVO> applyDataVOList= classVO.getObjects().getObject();
-//				objerrorCode="1";
-//				if(!CollectionUtils.isEmpty(applyDataVOList)) {
-//					applyDataVOList.stream().forEach(applyDataVO -> {
-//						XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
-//						xmlResultDataObjectDetailDO.setCode("");
-//						xmlResultDataObjectDetailDO.setId(applyDataVO.getId());
-//						xmlResultDataObjectDetailDO.setErrorid(objerrorCode);
-//						xmlResultDataObjectDetailDO.setMsg("缂栫爜鐢宠澶辫触:" + e.getMessage());
-//						resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
-//					});
-//				}else{
-//					XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
-//					xmlResultDataObjectDetailDO.setCode("");
-//					xmlResultDataObjectDetailDO.setId("");
-//					xmlResultDataObjectDetailDO.setErrorid(objerrorCode);
-//					xmlResultDataObjectDetailDO.setMsg("缂栫爜鐢宠澶辫触:" + e.getMessage());
-//					resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
-//				}
-//				e.printStackTrace();
-//			}finally {
-//				XMLResultClassfyVO resultClassfyVO = new XMLResultClassfyVO();
-//				resultClassfyVO.setClassCode(classVO.getClassCode());
-//				resultClassfyVO.setLibrary(classVO.getLibrary());
-//				resultClassfyVO.setFullclsfNamePath(classVO.getFullclsfNamePath());
-//				resultClassfyVO.setObjects(resultDataObjectDetailDOs);
-//				resultClassfyVOList.add(resultClassfyVO);
-//			}
-//			XMLResultSystemVO xmlResultSystemVO=new XMLResultSystemVO();
-//			xmlResultSystemVO.setClassifys(resultClassfyVOList);
-//			xmlResultSystemVO.setMsg(msg);
-//			xmlResultSystemVO.setErrorid(errorid[0]);
-//			resultStr= transferResultXMl(xmlResultSystemVO,dataType);
-//		}catch (Throwable e){
-//			e.printStackTrace();
-//			msg="鐢宠缂栫爜澶辫触:"+e.getMessage();
-//          /*  XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO();
-//            XMLResultSystemVO.setErrorid(errorid);
-//            XMLResultSystemVO.setMsg("鐢宠缂栫爜澶辫触锛�->"+e.getMessage());
-//            XMLResultSystemVO.setClassifys(resultClassfyVOList);
-//            resultStr=transferResultXMl(XMLResultSystemVO,dataType);
-//
-//            log.error("鐢宠缂栫爜澶辫触锛�->"+e);
-//            return resultStr;*/
-//		}finally {
-//			XMLResultSystemVO xmlResultSystemVO=new XMLResultSystemVO();
-//			xmlResultSystemVO.setClassifys(resultClassfyVOList);
-//			xmlResultSystemVO.setMsg(msg);
-//			xmlResultSystemVO.setErrorid(errorid[0]);
-//			resultStr= transferResultXMl(xmlResultSystemVO,dataType);
-//			final boolean[] issucess = {true};
-//			if(!errorid[0].equals("0")) {
-//				issucess[0] = false;
-//			}else {
-//				if(!CollectionUtils.isEmpty(resultClassfyVOList)) {
-//					resultClassfyVOList.stream().forEach(xMLResultClassfyVO -> {
-//						xMLResultClassfyVO.getObjects().stream().forEach(objec -> {
-//							if (!(objec.getErrorid().equals("0") || objec.getErrorid().equals("204"))) {
-//								issucess[0] = false;
-//								msg=objec.getMsg();
-//							}
-//						});
-//					});
-//				}
-//			}
-//			try {
-//				//璁板綍鏃ュ織
-//				this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "applyCodeForBZ");
-//			}catch (Throwable e){
-//				e.printStackTrace();
-//			}
-//		}
-//		log.info("杩斿洖鍙傛暟:"+resultStr);
+		log.info("鏂规硶->applyCodeForBZ start");
+		final String[] errorid = {"0"};
+		msg="鎴愬姛";
+		objerrorCode="0";
+		objerrorMsg="鎴愬姛";
+		log.info("鐢宠缂栫爜鐨勬暟鎹弬鏁�:->"+data);
+		log.info("鐢宠缂栫爜鐨勬暟鎹被鍨�:->"+dataType);
+		String systemId="";
+		List<XMLResultClassfyVO> resultClassfyVOList = new ArrayList<>();
+		LinkedList<XMLResultDataObjectDetailDO> resultDataObjectDetailDOs = new LinkedList<>();
+		try {
+			ClassfyBZVO classfyBZVO = null;
+			if (StringUtils.isBlank(data)) {
+				errorid[0] = "101";
+				throw new Throwable("鎺ュ彛鍙傛暟锛歞ataString 浼犻�掍负绌�");
+			}
+			ApplyBZParamVO applyBZParamVO = new ApplyBZParamVO();
+			//濡傛灉dataType鏄痻ml鍒欙紝閫氳繃xml搴忓垪鍖栨垚瀵硅薄褰㈠紡锛屽鏋滄槸json鍒欓�氳繃json杞崲鎴愬璞℃牸寮�
+			try {
+				if ("xml".equals(dataType)) {
+					XStream xStream = new XStream(new DomDriver());
+					xStream.processAnnotations(RootDataVO.class);
+					xStream.autodetectAnnotations(true);
+					ApplyBZVO rootDataVO = (ApplyBZVO) xStream.fromXML(data);
+					applyBZParamVO.setData(rootDataVO);
+				} else {
+					applyBZParamVO = JSONObject.toJavaObject(JSONObject.parseObject(data), ApplyBZParamVO.class);
+				}
+			} catch (Throwable e) {
+				errorid[0] = "101";
+				throw new Throwable("鎺ュ彛鍙傛暟锛氫紶鍏ユ暟鎹弬鏁拌В鏋愬け璐�");
+			}
+			classfyBZVO = applyBZParamVO.getData().getClassify();
+			systemId = applyBZParamVO.getData().getSystemId();
+			UserVO userVo = applyBZParamVO.getData().getUser();
+			//鍏嶅瘑鐧诲綍鐢宠token锛宺equest涓坊鍔犵敤鎴蜂俊鎭�
+			passwordFreeLoginService.pwdFreeLoginByBoolean(userVo.getUserName(), this.getRequest());
+			AuthUtil.getUser();
+			//杩欐槸璐﹀彿淇℃伅
+			SessionInfo sessionInfo = new SessionInfo();
+			sessionInfo.setUserId(userVo.getUserName());
+			sessionInfo.setUserName(userVo.getTrueName());
+			sessionInfo.setIp(userVo.getIp());
+			VciBaseUtil.setCurrentUserSessionInfo(sessionInfo);
+//			List<XMLResultDataObjectDetailDO> allResultDataObjectDetailDOS=new ArrayList<>();
+			String finalSystemId = systemId;
+			String libray="";
+			boolean isCodeOrGroupCode=false;
+			try {
+				libray = classfyBZVO.getLibrary();
+				CodeClassifyVO codeClassifyVO = getClassfy(classfyBZVO,libray);
+				log.info("end锛氬垎绫绘煡璇㈠畬姣�");
+				//鑾峰彇鍒嗙被妯℃澘淇℃伅
+				if(codeClassifyVO==null || StringUtils.isBlank(codeClassifyVO.getOid())){
+					objerrorCode="100";
+					throw  new  Throwable ("鏍规嵁浼犺緭鐨勫垎绫伙紝鏈幏鍙栧埌鍒嗙被淇℃伅");
+				}
+				String operation="";
+				if(CODE_CHECKCONFIG) {
+					//鏍¢獙鏄惁閰嶇疆
+					DockingSystemConfig dockingSystemConfig=null;
+					dockingSystemConfig=checkIspass(finalSystemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue(),codeClassifyVO.getOid());
+					if(dockingSystemConfig==null){
+						errorid[0] ="101";
+						throw new Throwable("绯荤粺鏍囪瘑涓恒��"+ finalSystemId +"銆戯紝闆嗘垚鍒嗙被涓恒��"+codeClassifyVO.getName()+"銆戜互涓婂垎绫伙紝"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"鎺ュ彛閰嶇疆宸插仠鐢ㄦ垨鑰呮湭閰嶇疆锛岃鑱旂郴缂栫爜绠$悊鍛橈紒");
+					}
+					isCodeOrGroupCode="true".equals(dockingSystemConfig.getIsGroupCodeFlag())?true:false;
+				}
+				CodeClassifyTemplateVO templateVO = engineService.getUsedTemplateByClassifyOid(codeClassifyVO.getOid());
+				if(templateVO==null||StringUtils.isBlank(templateVO.getOid())){
+					objerrorCode="1";
+					throw  new  Throwable ("鏍规嵁浼犺緭鐨勫垎绫伙紝鏈幏鍙朚DM绯荤粺涓搴旀ā鏉�");
+				}
+				log.info("end锛氭ā鏉挎煡璇㈠畬姣�");
+				ApplyBZDatasVO applyDatasVO = classfyBZVO.getObjects();
+				DataObjectVO dataObjectVO = new DataObjectVO();
+				List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag())
+				).collect(Collectors.toList());
+				//this.getConfigDatas(finalSystemId, libray, applyDatasVO, attrVOS, dataObjectVO);
+				log.info("end锛氭暟鎹粍缁囧畬姣�");
+				//瑙勫垯鐨勪富閿渶瑕佸幓鑾峰彇
+				CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyVO.getOid());
+				if(classifyFullInfo==null ||classifyFullInfo.getCurrentClassifyVO()==null || StringUtils.isBlank(classifyFullInfo.getCurrentClassifyVO().getOid())){
+					objerrorCode="1";
+					log.info("classifyFullInfo:"+"鏍规嵁浼犺緭鐨勫垎绫伙紝鏈幏鍙栧垎绫荤浉鍏充俊鎭�");
+					throw  new  Throwable ("鏍规嵁浼犺緭鐨勫垎绫伙紝鏈幏鍙栧垎绫荤浉鍏充俊鎭�");
+				}
+				CodeRuleVO ruleVO = engineService.getCodeRuleByClassifyFullInfo(classifyFullInfo);
+				if(ruleVO==null||StringUtils.isBlank(ruleVO.getOid())){
+					objerrorCode="102";
+					throw  new  Throwable ("鏍规嵁浼犺緭鐨勫垎绫伙紝鏈幏鍙朚DM绯荤粺涓搴旇鍒�");
+				}
+				log.info("end锛氳鍒欒幏鍙栧畬姣�");
+				//List<CodeOrderSecDTO> codeOrderSecDTOList = getRuleCodeOrderSecDTOs(ruleVO,classifyFullInfo);
+				log.info("end锛氱爜娈佃幏鍙栧畬姣�");
+				CodeOrderDTO orderDTO = new CodeOrderDTO();
+				orderDTO.setCodeClassifyOid(codeClassifyVO.getOid());//鍒嗙被涓婚敭
+				//orderDTO.setSecDTOList(codeOrderSecDTOList);//鍒嗙被鐮佹
+				mdmIOService.batchSyncApplyCode(orderDTO, dataObjectVO, resultDataObjectDetailDOs,isCodeOrGroupCode);
+				//allResultDataObjectDetailDOS.add(resultDataObjectDetailDOs);
+				log.info("end锛氱敵璇疯幏鍙栧畬姣�");
+			} catch (Throwable e) {
+				List<ApplyBZDataVO> applyDataVOList = classfyBZVO.getObjects().getObject();
+				objerrorCode = "1";
+				if (!CollectionUtils.isEmpty(applyDataVOList)) {
+					applyDataVOList.stream().forEach(applyDataVO -> {
+						XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
+						xmlResultDataObjectDetailDO.setCode("");
+						xmlResultDataObjectDetailDO.setId(applyDataVO.getId());
+						xmlResultDataObjectDetailDO.setErrorid(objerrorCode);
+						xmlResultDataObjectDetailDO.setMsg("缂栫爜鐢宠澶辫触:" + e.getMessage());
+						resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
+					});
+				} else {
+					XMLResultDataObjectDetailDO xmlResultDataObjectDetailDO = new XMLResultDataObjectDetailDO();
+					xmlResultDataObjectDetailDO.setCode("");
+					xmlResultDataObjectDetailDO.setId("");
+					xmlResultDataObjectDetailDO.setErrorid(objerrorCode);
+					xmlResultDataObjectDetailDO.setMsg("缂栫爜鐢宠澶辫触:" + e.getMessage());
+					resultDataObjectDetailDOs.add(xmlResultDataObjectDetailDO);
+				}
+				e.printStackTrace();
+			} finally {
+				XMLResultClassfyVO resultClassfyVO = new XMLResultClassfyVO();
+				resultClassfyVO.setClassCode(classfyBZVO.getClassCode());
+				resultClassfyVO.setLibrary(classfyBZVO.getLibrary());
+				resultClassfyVO.setFullclsfNamePath(classfyBZVO.getFullclsfNamePath());
+				resultClassfyVO.setObjects(resultDataObjectDetailDOs);
+				resultClassfyVOList.add(resultClassfyVO);
+			}
+			XMLResultSystemVO xmlResultSystemVO = new XMLResultSystemVO();
+			xmlResultSystemVO.setClassifys(resultClassfyVOList);
+			xmlResultSystemVO.setMsg(msg);
+			xmlResultSystemVO.setErrorid(errorid[0]);
+			resultStr = transferResultXMl(xmlResultSystemVO, dataType);
+		}catch (Throwable e){
+			e.printStackTrace();
+			msg="鐢宠缂栫爜澶辫触:"+e.getMessage();
+		}finally {
+			XMLResultSystemVO xmlResultSystemVO=new XMLResultSystemVO();
+			xmlResultSystemVO.setClassifys(resultClassfyVOList);
+			xmlResultSystemVO.setMsg(msg);
+			xmlResultSystemVO.setErrorid(errorid[0]);
+			resultStr= transferResultXMl(xmlResultSystemVO,dataType);
+			final boolean[] issucess = {true};
+			if(!errorid[0].equals("0")) {
+				issucess[0] = false;
+			}else {
+				if(!CollectionUtils.isEmpty(resultClassfyVOList)) {
+					resultClassfyVOList.stream().forEach(xMLResultClassfyVO -> {
+						xMLResultClassfyVO.getObjects().stream().forEach(objec -> {
+							if (!(objec.getErrorid().equals("0") || objec.getErrorid().equals("204"))) {
+								issucess[0] = false;
+								msg=objec.getMsg();
+							}
+						});
+					});
+				}
+			}
+			try {
+				//璁板綍鏃ュ織
+				this.saveLogs(systemId, systemId, data, resultStr, issucess[0], msg, "applyCodeForBZ");
+			}catch (Throwable e){
+				e.printStackTrace();
+			}
+		}
+		log.info("杩斿洖鍙傛暟:"+resultStr);
 		//璋冪敤闆嗗洟鐢宠鎺ュ彛鐢宠闆嗗洟鐮�
 		return resultStr;
 	}
@@ -2071,6 +2117,48 @@
 	 * @param classfyVO
 	 */
 	private  CodeClassifyVO getClassfy(ClassfyVO classfyVO,String libray) throws Throwable{
+		CodeClassifyVO classifyVO = new CodeClassifyVO();
+		try {
+			String classCode = classfyVO.getClassCode();
+			String className = classfyVO.getFullclsfNamePath();
+			//鏍规嵁鍒嗙被浠e彿鏌ヨ鍒嗙被淇℃伅
+			if (StringUtils.isNotBlank(classfyVO.getClassCode())) {
+				Map<String, String> conditionMap = new HashMap<>();
+				List<CodeClassify> codeClassifyList = classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().eq(CodeClassify::getId, classCode));
+				final CodeClassify[] newCodeClassify = {new CodeClassify()};
+				if (!CollectionUtils.isEmpty(codeClassifyList)) {
+					codeClassifyList.stream().forEach(codeClassify -> {
+						CodeClassifyVO codeClassifyVO=  classifyService.getTopClassifyVO(codeClassify.getOid());
+						if(codeClassifyVO.getId().equals(libray)){
+							newCodeClassify[0] =codeClassify;
+						}
+					});
+					classifyVO = new CodeClassifyVO();
+					BeanUtilForVCI.copyPropertiesIgnoreCase(newCodeClassify[0], classifyVO);
+					//灏咲TO杞崲涓篋O
+					if(StringUtils.isBlank(classifyVO.getOid())){
+						throw new  Throwable("鐢宠缂栫爜鐨勫垎绫伙細銆�"+classCode+"銆戜笉灞炰簬搴撹妭鐐广��"+libray+"銆戯紝璇锋鏌ュ弬鏁板垎绫昏妭鐐�/搴撹妭鐐逛俊鎭槸鍚﹀尮閰�");
+					}
+				}else{
+					throw new  Throwable("鏍规嵁鍒嗙被浠e彿鏈煡璇㈠埌鐩稿簲鐨勫垎绫讳俊鎭�");
+				}
+			} else {
+				classifyVO = classifyService.getObjectByClsfNamePath(className.replace(separator, "/"));
+				if(StringUtils.isBlank(classifyVO.getOid())){
+					throw new  Throwable("鏍规嵁鍒嗙被鍚嶇О璺緞鏈煡璇㈠埌鐩稿簲鐨勫垎绫讳俊鎭�");
+				}
+			}
+		}catch (Throwable e){
+			objerrorCode="100";
+			throw 	new  Throwable("鑾峰彇鍒嗙被淇℃伅澶辫触:"+e.getMessage());
+		}
+		return classifyVO;
+	}
+	/***
+	 * 鏌ヨ鏍¢獙鍒嗙被淇℃伅
+	 * @param classfyVO
+	 */
+	private  CodeClassifyVO getClassfy(ClassfyBZVO classfyVO,String libray) throws Throwable{
 		CodeClassifyVO classifyVO = new CodeClassifyVO();
 		try {
 			String classCode = classfyVO.getClassCode();
@@ -2122,6 +2210,21 @@
 		});
 		return clientBusinessObjectList;
 	}
+
+
+	private List<CodeOrderSecDTO> getRuleCodeOrderSecDTOsBZ(CodeRuleVO ruleVO,CodeClassifyFullInfoBO classifyFullInfo){
+		List<CodeBasicSecVO>  codeBasicSecVOS= ruleVO.getSecVOList();
+		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="";
+		}
+		return codeOrderSecDTOList;
+	}
+
+
 	/***
 	 * 鏍规嵁绌垮叆鐨勫弬鏁颁俊鎭牎楠岀爜娈佃鍒�
 	 */
@@ -2131,7 +2234,7 @@
 		SectionVOList.stream().forEach(SectionVO->{
 			sectionVOMap.put(SectionVO.getName(),SectionVO.getValue());
 		});
-		Map<String,CodeClassifyVO> codeClassifyVOMap= classifyFullInfo.getParentClassifyVOs().stream().collect(Collectors.toMap(s -> s.getId(), t -> t,(o1, o2)->o2));
+		//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) {
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
index 8c7470e..b71ab12 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/SystemClassifyRoleMapper.xml
@@ -70,7 +70,7 @@
                pc.SYSTEMID,
                p.oid CLASSIFYOID,
                p.id CLASSIFYID,
-               case when pc.selected is null then false else  pc.SELECTED end SELECTED,
+               case when pc.selected is null then false when pc.selected = 0 then false else  pc.SELECTED end SELECTED,
                p.PARENTCODECLASSIFYOID CLASSPARENTOID
         from PL_CODE_CLASSIFY p ,
              PL_CODE_SYSTEM_CLASSIFY_ROLE pc
@@ -79,4 +79,15 @@
           and '${systemId}' = pc.SYSTEMID(+)
     </select>
 
+    <select id="getListClassifyRole" resultType="com.vci.ubcs.code.entity.CodeClassify">
+        select *
+        from PL_CODE_CLASSIFY
+        where oid in( select classifyoid
+                      from PL_CODE_SYSTEM_CLASSIFY_ROLE
+                               start with classifyid = #{library}
+            and SYSTEMID=#{systemId}
+            and SYSTEMOID = #{systemOid}
+        connect by prior classifyoid = classparentoid)
+    </select>
+
 </mapper>

--
Gitblit v1.9.3