From 268a899e2e1044e879e074f7b7ba23298c1fd4f9 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期五, 26 五月 2023 00:08:37 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeWupin.java                      |    2 
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java                 |    9 
 Source/UBCS-WEB/src/components/Tree/classifyTrees.vue                                                                 |  112 ++++++----
 Source/UBCS-WEB/src/components/Crud/Crud.vue                                                                          |   19 +
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/service/RevisionModelUtil.java |    1 
 Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue                                                              |   10 
 Source/UBCS-WEB/src/views/MasterData/items.vue                                                                        |   77 +++++++
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeKeyAttrRepeat.java              |    4 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeSerialValue.java                |    2 
 Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml                                   |    7 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java          |   22 +-
 Source/UBCS-WEB/src/views/modeling/classifyTree.vue                                                                   |    1 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeBasicSecServiceImpl.java          |    7 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java             |   98 +++++----
 Source/UBCS-WEB/src/main.js                                                                                           |    2 
 Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/DockingPreApplyFormVO.java    |    1 
 Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/BeanUtilForVCI.java            |  142 ++++++++++++++
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java        |    4 
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java       |    5 
 Source/UBCS-WEB/src/components/Tree/attrCrud.vue                                                                      |   23 +-
 Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodePhaseAttrMapper.xml                                  |   12 
 21 files changed, 429 insertions(+), 131 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Crud/Crud.vue b/Source/UBCS-WEB/src/components/Crud/Crud.vue
new file mode 100644
index 0000000..30b5efe
--- /dev/null
+++ b/Source/UBCS-WEB/src/components/Crud/Crud.vue
@@ -0,0 +1,19 @@
+<template>
+  <avue-crud :data="data" ></avue-crud>
+</template>
+
+<script>
+export default {
+  name: "Crud.vue",
+  data(){
+    return{
+      data:[],
+      option:{}
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
index e5871d2..4121adf 100644
--- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue
@@ -539,7 +539,7 @@
             cell: false,
             labelWidth: 110,
             width: 125,
-            sortable: true,
+            sortable: false,
           },
           {
             label: "灞炴�т腑鏂囧悕绉�",
@@ -860,16 +860,17 @@
     },
     // 鎺掑簭
     sortChange(val) {
-      switch (val.order) {
-        // case "ascending":
-        //   this.data = this.data.sort((a,b) => { return b['name'].localeCompare(a['name']) })
-        //   this.data = this.data.sort((a,b) => { return b['id'].localeCompare(a['id']) })
-        //   break;
-        // case "descending":
-        //   this.data = this.data.sort((a,b) => { return a['name'].localeCompare(b['name']) })
-        //   this.data = this.data.sort((a,b) => { return a['id'].localeCompare(b['id']) })
-        //   break;
-      }
+      console.log(val)
+      // switch (val.order) {
+      //   // case "ascending":
+      //   //   this.data = this.data.sort((a,b) => { return b['name'].localeCompare(a['name']) })
+      //   //   this.data = this.data.sort((a,b) => { return b['id'].localeCompare(a['id']) })
+      //   //   break;
+      //   // case "descending":
+      //   //   this.data = this.data.sort((a,b) => { return a['name'].localeCompare(b['name']) })
+      //   //   this.data = this.data.sort((a,b) => { return a['id'].localeCompare(b['id']) })
+      //   //   break;
+      // }
     }
   }
 }
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
index dadabd7..5ff1791 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTreeform.vue
@@ -42,7 +42,8 @@
           },
           {
             label:"鎻忚堪",
-            prop:"description"
+            prop:"description",
+            labelWidth:128,
           },
           {
             label: '瀛樺偍鐨勪笟鍔$被鍨�',
@@ -57,17 +58,18 @@
           },
           {
             label:"缂栫爜瑙勫垯",
-            prop:"coderuleoidName"
+            prop:"coderuleoidName",
+            labelWidth:128,
           },
           {
-            label:"蹇界暐澶у皬鍐欐煡閲�",
+            label:"鍏抽敭灞炴�ф煡璇㈣鍒�",
             prop:"codekeyattrrepeatoidName",
             labelWidth:128,
           },
           {
             label:"鐩镐技鏌ヨ瑙勫垯",
             prop:"codeResembleRuleOidName",
-            labelWidth:100,
+            labelWidth:128,
           },
         ]
       },
diff --git a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
index 4039188..f3d1fd1 100644
--- a/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
+++ b/Source/UBCS-WEB/src/components/Tree/classifyTrees.vue
@@ -12,7 +12,6 @@
             <el-button plain size="small" type="primary" @click="flushed">鍒锋柊</el-button>
           </div>
           <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px">
-
           </div>
         </div>
         <!--        鏍戣妭鐐规坊鍔犲璇濇-->
@@ -50,9 +49,9 @@
         </el-dialog>
         <!--        淇敼瀵硅瘽妗�-->
         <el-dialog :visible.sync="TreeEditFormVisible" append-to-body title="淇敼鍒嗙被">
-          <classifyTreeform ref="childForm" :TreeNewForm="TreeList" :nodeList="nodeList"></classifyTreeform>
+          <classifyTreeform ref="childForm" :loneTreeNewForm="TreeList" :nodeList="nodeList"></classifyTreeform>
         </el-dialog>
-        <avue-tree ref="tree" v-model="TreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false"
+        <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"
                    @node-click=" nodeClick"
@@ -74,6 +73,7 @@
                           @row-save="CrudRowSave"
                           @row-del="CrudRowDel"
                           @row-update="CrudRowUpdata"
+                          :before-close="beforeClose"
                >
             <template slot="menuLeft">
               <el-button plain size="small" type="primary" @click="FindFormVisible = true;">鏌ヨ</el-button>
@@ -118,12 +118,12 @@
                   <el-container>
                     <el-aside width="300px">
                       <div style="margin-bottom: 5px"><el-tag>涓婚搴撳垎绫�</el-tag></div>
+                      <!--                      鍏嬮殕妯℃澘鐨勬爲 娌跨敤棣栭〉鏍戠殑loading鍜宱ption锛屼絾鏄痙ata鍜寁-model缁戝畾鐨勬暟鎹垱寤轰竴涓柊鐨勫彉閲忥紝鍙﹀鐐瑰嚮鏂规硶涔熸槸閲嶆柊鑾峰彇鏉ユ搷浣滃厠闅嗘ā鏉跨殑鏁版嵁-->
                         <avue-tree ref="tree" v-model="TreeAvueform" v-loading="loading" :data="Treedata"
                                    :defaultExpandAll="false"
                                    :option="Treeoption"
                                    style="height: 50.5vh;margin-right: 10px"
-                                   @node-click=" nodeClick"
-                                   @check-change="checkChange"
+                                   @node-click="ClonenodeClick"
                         >
                         </avue-tree>
                     </el-aside>
@@ -244,6 +244,7 @@
       TreeAddFormVisible: false,
       //褰撳墠鐐瑰嚮椤�
       nodeClickList: "",
+      ClonenodeClickList:"",
       //鍒嗙被鍜屼富棰樺簱鐘舵��
       TreeFlag: false,
       //鏍戝姞杞�
@@ -264,7 +265,10 @@
       },
       //avue-tree鏁版嵁锛屾殏鏃舵病鏈変綔鐢紝閲岄潰鍔熻兘鐢╡lement鍐欎簡锛屽彧鐢╝vue鐨勪竴涓爲缁勪欢涓嶇敤鍐呯疆琛ㄥ崟浜嗐��
       TreeAvueform: {},
+      //鍏嬮殕鏍�
+      CloneTreeAvueform:{},
       Treedata: [],
+      CloneTreedata:[],
       Treeoption: {
         addBtn: false,
         editBtn: false,
@@ -290,7 +294,7 @@
       CloneSelectOptions: [{
         value: '0',
         label: '妯℃澘缂栧彿'
-        },
+      },
         {
           value: '1',
           label: '妯℃澘鍚嶇О'
@@ -343,7 +347,7 @@
           },
           {
             label: "妯℃澘鍚嶇О",
-            prop: "name"
+            prop: "name",
           },
           {
             label: "妯℃澘鎻忚堪",
@@ -401,18 +405,20 @@
     getAttr() {
       getAtrrList().then(res => {
         this.Treedata = res.data;
-        this.Treedata.forEach(() => {
+        this.CloneTreedata = res.data;
+        this.Treedata.forEach((item) => {
           for (let i = 0; i < this.Treedata.length; i++) {
             this.Treedata[i].value = i;
           }
         })
         //璋冪敤淇敼灞炴�у悕鏂规硶
         this.ModifyProperties(this.Treedata, 'text', 'label');
+        this.ModifyProperties(this.CloneTreedata, 'text', 'label');
       }).catch(res => {
         this.$message.error(res)
       })
     },
-    //瀹氫箟涓�涓慨鏀瑰璞″睘鎬у悕鐨勬柟娉� 杩欓噷鍒敼锛侊紒锛佸ソ鍍忔槸鍚庡彴鎺ュ彛鏁版嵁瀛楁涓嶄竴鑷达紝娣诲姞鐨勬柟娉曘�傚叿浣撲粈涔堝師鍥犳垜涔熷繕璁颁簡
+    //瀹氫箟涓�涓慨鏀规暟鎹睘鎬у悕鐨勬柟娉�
     ModifyProperties(obj, oldName, newName) {
       for (let key in obj) {
         if (key === oldName) {
@@ -598,21 +604,12 @@
         })
         //妯℃澘绠$悊琛ㄦ牸鏁版嵁
         await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res => {
-          if (this.CloneVisible != true) {
-            this.Formlist = res.data.data.filter(item => {
-              if (item.codeclassifyoid != "") {
-                this.codeClassifyOid = item.codeclassifyoid
-                return item.codeclassifyoid == this.nodeClickList.oid
-              }
-            })
-          } else {
-            this.CloneFormlist = res.data.data.filter(item => {
-              if (item.codeclassifyoid != "") {
-                this.codeClassifyOid = item.codeclassifyoid
-                return item.codeclassifyoid == this.nodeClickList.oid
-              }
-            })
-          }
+          this.Formlist = res.data.data.filter(item => {
+            if (item.codeclassifyoid != "") {
+              this.codeClassifyOid = item.codeclassifyoid
+              return item.codeclassifyoid == this.nodeClickList.oid
+            }
+          })
           gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => {
             this.ProData = res.data.data
             console.log(this.ProData)
@@ -633,9 +630,22 @@
         console.log(error)
       }
     },
+    //鍏嬮殕妯℃澘鏍戠殑鐐瑰嚮鍒囨崲鏁版嵁
+    async ClonenodeClick(data){
+      this.ClonenodeClickList=data;
+      console.log("aaa",this.ClonenodeClickList.oid)
+      await gridCodeClassifyTemplate({'conditionMap[codeclassifyoid]': data.oid}).then(res=>{
+        this.CloneFormlist = res.data.data.filter(item => {
+          if (item.codeclassifyoid != "") {
+            this.codeClassifyOid = item.codeclassifyoid
+            return item.codeclassifyoid == this.ClonenodeClickList.oid
+          }
+        })
+      })
+    },
     //tab鏍忓垏鎹�
     handleChange(column) {
-      this.type = column
+      this.type = column;
     },
     // //楂樼骇鏌ヨ鎸夐挳
     // handleSelectChange(key) {
@@ -702,22 +712,24 @@
         this.Formlist = res.data.data
       })
     },
+
     //妯℃澘绠$悊琛ㄦ牸娣诲姞
     CrudRowSave(row,done) {
-      debugger
-      console.log(nodeClickList.length)
       if (this.nodeClickList.length <= 0) {
         this.$message({
           type: 'warning',
           message: '璇峰厛浠庢爲涓婇�夋嫨涓�鏉℃暟鎹�!'
         });
       } else {
-        console.log(this.nodeClickList)
         let codeClassifyOid = this.codeClassifyOid
         this.$set(row, "codeclassifyoid", codeClassifyOid)
         addSave(row).then(res => {
+          this.$message({
+            type: "success",
+            message: "娣诲姞鎴愬姛!"
+          });
+          done(row)
           this.CrudRend()
-          done()
         }).catch(res => {
           this.$message({
             type: 'info',
@@ -727,14 +739,16 @@
       }
     },
     //妯℃澘绠$悊淇敼
-    CrudRowUpdata(row) {
-      editSave(row).then(() => {
+    CrudRowUpdata(row,index,done) {
+      editSave(row).then((res) => {
         this.CrudRend()
-      }).catch(res => {
         this.$message({
-          type: 'info',
-          message: res
+          type: "success",
+          message: "鎿嶄綔鎴愬姛!"
         });
+        done()
+      }).catch(res => {
+        console.log(res)
       })
     },
     //妯℃澘绠$悊鍒犻櫎
@@ -777,7 +791,7 @@
     },
     //鍏嬮殕妯℃澘閫夋嫨纭畾
     Clonehandler(){
-      if(this.CloneFormlist.length <= 0){
+      if(this.CloneSelect.length <= 0){
         this.$message({
           type: 'warning',
           message: '璇烽�夋嫨瑕佸厠闅嗙殑妯℃澘!'
@@ -788,7 +802,8 @@
           message: '鍙兘閫夋嫨涓�鏉℃暟鎹�!'
         });
       } else {
-        this.CloneinnerVisible=true
+        this.CloneinnerVisible=true;
+
       }
     },
     //鐐瑰嚮浠庡叾瀹冩ā鏉垮厠闅�
@@ -804,16 +819,27 @@
     },
     //鍏嬮殕妯℃澘鍗曢�夋鏀瑰彉
     selectionChange(row){
-      console.log(row)
-      this.CloneSelect=row
+      this.CloneSelect=row;
+      //鍙屽悜缁戝畾锛屾彁浜よ〃鍗曡緭鍏ユ鍥炲~涓婂綋鍓嶉�夋嫨鐨勬暟鎹�
       this.CloneModel.id=row[0].id;
       this.CloneModel.name=row[0].name;
+      //杩欓噷鏈夌偣缁曪紝CloneSelect鏄垜閫夋嫨妗嗛�夋嫨鐨勬暟鎹�傜瓑浜巘his.nodeClickList.oid鏄洜涓猴紝鍏嬮殕妯℃澘浼犻�掓暟鎹鎶婂綋鍓嶉�夋嫨鏍戠殑oid浼犻�掔粰鍚庣銆傝�屼笉鏄綋鍓嶈鍏嬮殕妯℃澘鐨刼id
+      this.CloneSelect[0].codeclassifyoid=this.nodeClickList.oid
     },
     //鍏嬮殕琛ㄥ崟鎻愪氦
-    Clonesubmit(done){
+    Clonesubmit(row,done){
+      //閲嶆柊璧嬪�糃loneSelect浼犻�掔殑鏁版嵁涓鸿緭鍏ユ鍙互淇敼鐨勬暟鎹紝CloneModel鎻愪氦琛ㄥ崟杈撳叆妗嗗弻鍚戠粦瀹氭暟鎹�
+      this.CloneSelect[0].id=this.CloneModel.id;
+      this.CloneSelect[0].name=this.CloneModel.name;
       copy(this.CloneSelect[0]).then(res=>{
-        console.log(res)
-        done()
+        //鍥犱负鏄祵濂楀脊绐楁墍浠ユ墜鍔ㄥ叧闂瑿loneinnerVisible锛孋loneVisible涓や釜寮圭獥銆�
+        this.CloneinnerVisible=false
+        this.CloneVisible=false
+        this.$message.success("澶嶅埗鎴愬姛")
+        this.CrudRend()
+        done(row)
+      }).catch(res=>{
+        done(res)
       })
     },
     //鍒锋柊
@@ -831,10 +857,6 @@
       setTimeout(() => {
         this.FormLoing = false
       }, 600);
-    },
-    // 宸︽爲澶氶��
-    checkChange(val) {
-      console.log(val)
     },
   }
 }
diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js
index eed0da5..890402b 100644
--- a/Source/UBCS-WEB/src/main.js
+++ b/Source/UBCS-WEB/src/main.js
@@ -40,6 +40,7 @@
 import referConfigCrudDialog from "@/components/code-dialog-page/referConfigCrudDialog"
 import referConfigFormDialog from "@/components/code-dialog-page/referConfigFormDialog"
 import businessAdd from "@/views/modeling/BusinessAdd"
+import TableCrud from "@/components/Crud/Crud"
 
 // 灏嗗伐鍏峰嚱鏁版坊鍔犲埌鍏ㄥ眬
 import utilFunc from './util/func'
@@ -81,6 +82,7 @@
 Vue.component('referConfigFormDialog',referConfigFormDialog)
 Vue.component('businessAdd',businessAdd)
 Vue.component('attrCrud',attrCrud)
+Vue.component('TableCrud',TableCrud)
 
 
 
diff --git a/Source/UBCS-WEB/src/views/MasterData/items.vue b/Source/UBCS-WEB/src/views/MasterData/items.vue
new file mode 100644
index 0000000..94b1072
--- /dev/null
+++ b/Source/UBCS-WEB/src/views/MasterData/items.vue
@@ -0,0 +1,77 @@
+<template>
+    <el-container>
+      <el-aside>
+        <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
+          <avue-tree  :option="option" :data="data"  v-model="form" style="height: 80.5vh;padding-top: 5px;padding-bottom: 30px"></avue-tree>
+        </basic-container>
+      </el-aside>
+      <el-main>
+      <TableCrud></TableCrud>
+      </el-main>
+    </el-container>
+</template>
+
+<script>
+export default {
+  name: "items.vue",
+  data(){
+    return{
+      form:{},
+      data:[
+        {
+          value:0,
+          label:'涓�绾ч儴闂�',
+          children:[
+            {
+              value:1,
+              label:'涓�绾ч儴闂�1',
+            },{
+              value:2,
+              label:'涓�绾ч儴闂�2',
+            }
+          ]
+        },{
+          value:3,
+          label:'浜岀骇閮ㄩ棬',
+          children:[
+            {
+              value:4,
+              label:'浜岀骇閮ㄩ棬1',
+            },{
+              value:5,
+              label:'浜岀骇閮ㄩ棬2',
+            }
+          ]
+        }
+      ],
+      option:{
+        title:'鎴戞槸鏍囬',
+        filterText:"鎼滅储鍏抽敭瀛楄嚜瀹氫箟",
+        defaultExpandAll:true,
+        addBtnText:'鏂板鑷畾涔夋枃妗�',
+        editBtnText:'淇敼鑷畾涔夋枃妗�',
+        delBtnText:'鍒犻櫎鑷畾涔夋枃妗�',
+        defaultExpandedKeys:[1],
+        height:900,
+        formOption:{
+          labelWidth:100,
+          column:[{
+            label:'鑷畾涔夐」',
+            prop:'label'
+          }],
+        },
+        props:{
+          labelText:'鏍囬',
+          label:'label',
+          value:'value',
+          children:'children'
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>
diff --git a/Source/UBCS-WEB/src/views/modeling/classifyTree.vue b/Source/UBCS-WEB/src/views/modeling/classifyTree.vue
index 761a794..d3596ee 100644
--- a/Source/UBCS-WEB/src/views/modeling/classifyTree.vue
+++ b/Source/UBCS-WEB/src/views/modeling/classifyTree.vue
@@ -15,6 +15,7 @@
       crudTreeOption: {
         index: true,
         border: true,
+        height:180,
         column: [
           {
             label: "妯℃澘缂栧彿",
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeKeyAttrRepeat.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeKeyAttrRepeat.java
index 254edc7..9b70ab5 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeKeyAttrRepeat.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeKeyAttrRepeat.java
@@ -126,7 +126,7 @@
 	 *
 	 */
 	@ApiModelProperty(value = "")
-	private Short revisionseq;
+	private Integer revisionseq;
 	/**
 	 *
 	 */
@@ -136,7 +136,7 @@
 	 *
 	 */
 	@ApiModelProperty(value = "")
-	private Short versionseq;
+	private Integer versionseq;
 	/**
 	 *
 	 */
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeSerialValue.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeSerialValue.java
index 4fbaffc..0084f53 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeSerialValue.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeSerialValue.java
@@ -13,7 +13,7 @@
  * @date 2022-3-1
  */
 @Data
-@TableName("PL_CODE_CODESERIALVALUE")
+@TableName("PL_CODE_SERIALVALUE")
 @ApiModel(value = "CodeSerialValue瀵硅薄", description = "缂栫爜瑙勫垯鐨勬祦姘村��")
 @EqualsAndHashCode(callSuper = true)
 public class CodeSerialValue extends BaseModel {
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeWupin.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeWupin.java
index 2d98fbf..3d8c88c 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeWupin.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/entity/CodeWupin.java
@@ -116,7 +116,7 @@
 	 *
 	 */
 	@ApiModelProperty(value = "")
-	private Short materialtype;
+	private Integer materialtype;
 	/**
 	 *
 	 */
diff --git a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/DockingPreApplyFormVO.java b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/DockingPreApplyFormVO.java
index 54655e6..2832160 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/DockingPreApplyFormVO.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-code-api/src/main/java/com/vci/ubcs/code/vo/pagemodel/DockingPreApplyFormVO.java
@@ -1,6 +1,5 @@
 package com.vci.ubcs.code.vo.pagemodel;
 
-import javax.xml.soap.SAAJResult;
 
 /**
  * 璁板綍闆嗘垚灞炴暟鎹敵璇穒d
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/service/RevisionModelUtil.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/service/RevisionModelUtil.java
index 40100cc..9579b51 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/service/RevisionModelUtil.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/revision/service/RevisionModelUtil.java
@@ -55,6 +55,7 @@
 						oidValues.add(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField(s, doObject)));
 					});
 					tree.setOid((String)oidValues.stream().collect(Collectors.joining(wrapperOptions.getOidValueSep())));
+					tree.setName((String) VciBaseUtil.getValueFromField("name", doObject));
 					if (f != null) {
 						tree.setText((String)f.apply(doObject));
 					} else {
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
index bb09378..0baa065 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/pagemodel/Tree.java
@@ -14,6 +14,7 @@
 	private static final long serialVersionUID = 6886695271635257882L;
 	private String oid;
 	private String text;
+	private String name;
 	private boolean leaf = false;
 	private boolean showCheckbox = false;
 	private boolean checked = false;
@@ -44,6 +45,14 @@
 		this.oid = oid;
 	}
 
+	public String getName() {
+		return this.name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
 	public String getText() {
 		return this.text;
 	}
diff --git a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/BeanUtilForVCI.java b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/BeanUtilForVCI.java
index 880ca54..abaaa10 100644
--- a/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/BeanUtilForVCI.java
+++ b/Source/UBCS/ubcs-service-api/ubcs-util-api/src/main/java/com/vci/ubcs/starter/web/util/BeanUtilForVCI.java
@@ -7,9 +7,19 @@
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
 import org.springframework.util.CollectionUtils;
+import org.springframework.util.ObjectUtils;
 
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
 import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigDecimal;
 import java.util.*;
 
 public class BeanUtilForVCI {
@@ -159,4 +169,136 @@
 			return result;
 		}
 	}
+
+	/**
+	 * 灏嗕竴涓� Map 瀵硅薄杞寲涓轰竴涓� JavaBean
+	 * @param clazz 瑕佽浆鍖栫殑绫诲瀷
+	 * @param map 鍖呭惈灞炴�у�肩殑 map
+	 * @return 杞寲鍑烘潵鐨� JavaBean 瀵硅薄
+	 * @throws IntrospectionException
+	 *             濡傛灉鍒嗘瀽绫诲睘鎬уけ璐�
+	 * @throws IllegalAccessException
+	 *             濡傛灉瀹炰緥鍖� JavaBean 澶辫触
+	 * @throws InstantiationException
+	 *             濡傛灉瀹炰緥鍖� JavaBean 澶辫触
+	 * @throws InvocationTargetException
+	 *             濡傛灉璋冪敤灞炴�х殑 setter 鏂规硶澶辫触
+	 */
+	public static <T>T convertMap(Class<T> clazz, Map map) throws IntrospectionException, IllegalAccessException, InstantiationException, InvocationTargetException {
+		BeanInfo beanInfo = Introspector.getBeanInfo(clazz); // 鑾峰彇绫诲睘鎬�
+		T obj = clazz.newInstance();
+		// 缁� JavaBean 瀵硅薄鐨勫睘鎬ц祴鍊�
+		PropertyDescriptor[] propertyDescriptors =  beanInfo.getPropertyDescriptors();
+		for (int i = 0; i< propertyDescriptors.length; i++) {
+			PropertyDescriptor descriptor = propertyDescriptors[i];
+			String propertyName = descriptor.getName();
+
+			if (map.containsKey(propertyName)) {
+				// 涓嬮潰涓�鍙ュ彲浠� try 璧锋潵锛岃繖鏍峰綋涓�涓睘鎬ц祴鍊煎け璐ョ殑鏃跺�欏氨涓嶄細褰卞搷鍏朵粬灞炴�ц祴鍊笺��
+				Object value = map.get(propertyName);
+
+				Object[] args = new Object[1];
+				args[0] = value;
+				Field privateField = getPrivateField(propertyName, clazz);
+				if (privateField == null) {
+				}
+				privateField.setAccessible(true);
+				String type = privateField.getGenericType().toString();
+				if (type.equals("class java.lang.String")) {
+					privateField.set(obj, value);
+				} else if (type.equals("class java.lang.Boolean")) {
+					privateField.set(obj, Boolean.parseBoolean(String.valueOf(value)));
+				} else if (type.equals("class java.lang.Long")) {
+					privateField.set(obj, Long.parseLong(String.valueOf(value)));
+				} else if (type.equals("class java.lang.Integer")) {
+					privateField.set(obj, Integer.parseInt(String.valueOf(value)));
+				} else if (type.equals("class java.lang.Double")) {
+					privateField.set(obj,Double.parseDouble(String.valueOf(value)));
+				} else if (type.equals("class java.lang.Float")) {
+					privateField.set(obj,Float.parseFloat(String.valueOf(value)));
+				} else if (type.equals("class java.math.BigDecimal")){
+					privateField.set(obj,new BigDecimal(String.valueOf(value)));
+				}//鍙户缁拷鍔犵被鍨�
+			}
+		}
+		return obj;
+	}
+	/*鎷垮埌鍙嶅皠鐖剁被绉佹湁灞炴��*/
+	private static Field getPrivateField(String name, Class cls) {
+		Field declaredField = null;
+		try {
+			declaredField = cls.getDeclaredField(name);
+		} catch (NoSuchFieldException ex) {
+
+			if (cls.getSuperclass() == null) {
+				return declaredField;
+			} else {
+				declaredField = getPrivateField(name, cls.getSuperclass());
+			}
+		}
+		return declaredField;
+	}
+
+	/**
+	 * 鑾峰彇鍒板璞′腑灞炴�т负null鐨勫睘鎬у悕
+	 *
+	 * @param source
+	 * @return
+	 */
+	private static String[] getNullPropertyNames(Object source) {
+		final BeanWrapper src = new BeanWrapperImpl(source);
+		PropertyDescriptor[] pds = src.getPropertyDescriptors();
+
+		Set<String> emptyNames = new HashSet<>();
+		for (PropertyDescriptor pd : pds) {
+			Object srcValue = src.getPropertyValue(pd.getName());
+			if (ObjectUtils.isEmpty(srcValue)) {
+				emptyNames.add(pd.getName());
+			}
+		}
+		String[] result = new String[emptyNames.size()];
+		return emptyNames.toArray(result);
+	}
+
+	/**
+	 * 鎷疯礉闈炵┖瀵硅薄灞炴�у��
+	 *
+	 * @param source
+	 * @param target
+	 */
+	public static void copyPropertiesIgnoreNull(Object source, Object target) {
+		BeanUtils.copyProperties(source, target, getNullPropertyNames(source));
+	}
+
+	/**
+	 * 闆嗗悎鎷疯礉闈炵┖鏁版嵁
+	 *
+	 * @param source       鏁版嵁婧�
+	 * @param target       鐩爣
+	 * @param propertyName 瑕佸尮閰嶇殑灞炴�у悕,渚嬪涓や釜闆嗗悎浣跨敤id杩涜鍖归厤鎷疯礉 propertyName: "id"
+	 */
+	public static void copyListPropertiesIgnoreNull(List<?> source, List<?> target, String propertyName) {
+		if (CollectionUtils.isEmpty(source)) {
+			throw new NullPointerException("copyListPropertiesIgnoreNull source婧愭暟鎹负绌�!");
+		}
+		Map<Object, Object> map = new HashMap<>(source.size());
+		source.forEach(s -> {
+			final BeanWrapper sourceBean = new BeanWrapperImpl(s);
+			Object value = sourceBean.getPropertyValue(propertyName);
+			if (value == null) {
+				throw new NullPointerException("copyListPropertiesIgnoreNull鑾峰彇鍙傛暟寮傚父");
+			}
+			map.put(value, s);
+		});
+		target.forEach(s -> {
+			final BeanWrapper targetBean = new BeanWrapperImpl(s);
+			Object value = targetBean.getPropertyValue(propertyName);
+			if (value == null) {
+				throw new NullPointerException("copyListPropertiesIgnoreNull鑾峰彇鍙傛暟寮傚父");
+			}
+			Object o = map.get(value);
+			copyPropertiesIgnoreNull(o, s);
+		});
+	}
+
 }
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 ed02a92..9bfc72b 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
@@ -687,13 +687,14 @@
 		if(StringUtils.isBlank(ruleOid)){
 			return new ArrayList<>();
 		}
-		Map<String,String> conditionMap = new HashMap<>();
-		conditionMap.put("pkCodeRule",ruleOid);
+//		Map<String,String> conditionMap = new HashMap<>();
+//		conditionMap.put("pkCodeRule",ruleOid);
 //		PageHelper pageHelper = new PageHelper(-1);
 //		pageHelper.addDefaultAsc("ordernum");
 		QueryWrapper<CodeBasicSec> wrapper = new QueryWrapper<>();
+		wrapper.eq("pkCodeRule",ruleOid);
 		wrapper.orderByAsc("ordernum");
-		List<CodeBasicSec> secDOList = codeBasicSecMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper);
+		List<CodeBasicSec> secDOList = baseMapper.selectList(wrapper);//.selectByCondition(conditionMap, pageHelper);
 		return codeBasicSecDO2VOs(secDOList,true);
 	}
 
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
index 98d8b8e..03ef145 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClassifyServiceImpl.java
@@ -25,6 +25,7 @@
 import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO;
 import com.vci.ubcs.code.vo.pagemodel.CodeKeyAttrRepeatRuleVO;
 import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO;
+import com.vci.ubcs.core.log.exception.ServiceException;
 import com.vci.ubcs.starter.bo.WriteExcelData;
 import com.vci.ubcs.starter.exception.VciBaseException;
 import com.vci.ubcs.starter.poi.bo.ReadExcelOption;
@@ -45,7 +46,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springblade.core.cache.utils.CacheUtil;
-import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
@@ -255,7 +255,7 @@
 		if(StringUtils.isBlank(oid)){
 			throw new ServiceException("oid涓嶈兘涓虹┖锛�");
 		}
-		return !codeClassifyMapper.checkHasChild(oid.trim());
+		return codeClassifyMapper.checkHasChild(oid.trim());
 	}
 
 
@@ -1089,14 +1089,16 @@
 		CodeClassify classifyDO = selectByOid(codeClassifyOid);
 		//鏌ヨ涓婄骇
 		fullInfo.setCurrentClassifyVO(codeClassifyDO2VO(classifyDO));
-		List<Map<String, Object>> maps = codeClassifyMapper.selectAllLevelParentByOid(codeClassifyOid);
-		List<CodeClassify> codeClassifyList = new ArrayList<>();
-		for (Map<String, Object> map : maps) {
-			CodeClassify codeClassify = new CodeClassify();
-			codeClassify.setOid(String.valueOf(map.get("OID")));
-			codeClassify.setOid(String.valueOf(map.get("LEVEL")));
-			codeClassifyList.add(codeClassify);
-		}
+//		List<Map<String, Object>> maps = codeClassifyMapper.selectAllLevelParentByOid(codeClassifyOid);
+//		List<Map<String, Object>> maps = selectAllLevelParentByOid(codeClassifyOid);
+		List<CodeClassify> codeClassifyList = selectAllLevelParentByOid(codeClassifyOid);
+//		for (Map<String, Object> map : maps) {
+//			CodeClassify codeClassify = new CodeClassify();
+//			codeClassify.setOid(String.valueOf(map.get("OID")));
+//			codeClassify.setDataLevel((Integer) map.get("LEVEL"));
+//			codeClassifyList.add(codeClassify);
+//		}
+
 		fullInfo.setParentClassifyVOs(codeClassifyDO2VOs(codeClassifyList));
 		if(!CollectionUtils.isEmpty(fullInfo.getParentClassifyVOs())){
 			fullInfo.setTopClassifyVO(fullInfo.getParentClassifyVOs().stream().filter(s->StringUtils.isBlank(s.getParentcodeclassifyoid())).findFirst().orElseGet(()->null));
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
index d8af1a4..bfb5344 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/CodeClstemplateServiceImpl.java
@@ -648,7 +648,10 @@
 		codeClassifyTemplateDO_old.setDescription(codeClassifyDTO.getDescription());//鎻忚堪
 		codeClassifyTemplateDO_old.setCodeClassifyOid(codeClassifyOid);//鍒嗙被oid
 		codeClassifyTemplateDO_old.setOid(newOid);
-		List<CodeClassifyTemplate> codeClassifyTemplateDOList = new ArrayList<CodeClassifyTemplate>();
+		codeClassifyTemplateDO_old.setTs(new Date());
+		codeClassifyTemplateDO_old.setCreateTime(new Date());
+		codeClassifyTemplateDO_old.setLastModifyTime(new Date());
+		List<CodeClassifyTemplate> codeClassifyTemplateDOList = new ArrayList<>();
 		codeClassifyTemplateDOList.add(codeClassifyTemplateDO_old);
 
 		//澶嶅埗妯℃澘灞炴��
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 08960e7..f96f6f5 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
@@ -21,6 +21,9 @@
 import com.vci.ubcs.code.vo.pagemodel.*;
 import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO;
 import com.vci.ubcs.code.vo.pagemodel.UITablePageVO;
+import com.vci.ubcs.omd.feign.IEnumClient;
+import com.vci.ubcs.omd.feign.IEnumItemClient;
+import com.vci.ubcs.omd.vo.EnumVO;
 import com.vci.ubcs.starter.exception.VciBaseException;
 import com.vci.ubcs.starter.revision.model.TreeWrapperOptions;
 import com.vci.ubcs.starter.revision.service.RevisionModelUtil;
@@ -31,12 +34,10 @@
 import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum;
 import com.vci.ubcs.starter.web.pagemodel.*;
 import com.vci.ubcs.starter.web.toolmodel.DateConverter;
-import com.vci.ubcs.starter.web.util.VciBaseUtil;
-import com.vci.ubcs.starter.web.util.VciDateUtil;
-import com.vci.ubcs.starter.web.util.VciQueryWrapperForDO;
-import com.vci.ubcs.starter.web.util.WebUtil;
+import com.vci.ubcs.starter.web.util.*;
 import com.vci.ubcs.system.entity.DictBiz;
 import com.vci.ubcs.system.feign.IDictBizClient;
+import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils;
 import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -44,10 +45,13 @@
 import org.springblade.core.tool.api.R;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cglib.beans.BeanMap;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.Resource;
+import java.beans.IntrospectionException;
+import java.lang.reflect.InvocationTargetException;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
@@ -84,10 +88,15 @@
 	@Resource
 	private MdmProductCodeService productCodeService;
 	/**
-	 * 瀛楀吀鐨勬湇鍔�
+	 * 鍙緭鍙�夌殑鏈嶅姟
 	 */
 	@Resource
 	IDictBizClient iDictBizClient;
+	/**
+	 * 瀛楀吀鐨勬湇鍔�
+	 */
+	@Resource
+	IEnumClient enumClient;
 	/**
 	 * 鍏紡鐨勬湇鍔�
 	 */
@@ -244,19 +253,19 @@
 	 */
 	@Override
 	public List<KeyValue> listComboboxItems(CodeClassifyTemplateAttrVO attrVO) {
-		List<KeyValue> comboboxKVs = null;
+		List<KeyValue> comboboxKVs = new ArrayList<>();
 		if (StringUtils.isNotBlank(attrVO.getEnumString())) {
 			comboboxKVs = JSONObject.parseArray(attrVO.getEnumString(), KeyValue.class);
 		} else {
 //			comboboxKVs = enumService.getEnum(attrVO.getEnumid());
 //		 	Dict dict = new Dict();
 //			dict.setParentId(Long.valueOf(attrVO.getEnumid()));
-			R<List<DictBiz>> list = iDictBizClient.getList(attrVO.getEnumId());
+			R<List<EnumVO>> list = enumClient.getList(attrVO.getEnumId());
 			if(list.isSuccess()){
-				for (DictBiz datum : list.getData()) {
+				for (EnumVO datum : list.getData()) {
 					KeyValue keyValue = new KeyValue();
-					keyValue.setKey(datum.getDictKey());
-					keyValue.setValue(datum.getDictValue());
+					keyValue.setKey(datum.getItemValue());
+					keyValue.setValue(datum.getItemName());
 					comboboxKVs.add(keyValue);
 				}
 			}
@@ -563,7 +572,9 @@
 		//娌℃湁闄愬埗鍒嗙被锛屼絾鏄竴涓ā鏉垮彧鍙兘鍦ㄤ竴涓笟鍔$被鍨嬮噷闈紝鎵�浠ョ洿鎺ユ煡璇㈣繖涓笟鍔$被鍨嬪嵆鍙�
 
 		if (!CollectionUtils.isEmpty(conditionMap)) {
-			final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
+			//琛ㄩ渶瑕佹敼
+//			final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "};
+			final String[] sql = {"select count(*) from pl_code_wupin t where 1 = 1 "};
 			conditionMap.forEach((key, value) -> {
 				sql[0] += " and " + key + " = " + value;
 			});
@@ -700,7 +711,7 @@
 	 */
 	private void copyValueToCBO(CodeClassifyFullInfoBO classifyFullInfo, CodeWupin cbo,
 								CodeOrderDTO orderDTO, CodeClassifyTemplateVO templateVO,
-								boolean edit) {
+								boolean edit)  {
 		String fullPath = "";
 		if (!CollectionUtils.isEmpty(classifyFullInfo.getParentClassifyVOs())) {
 			fullPath = classifyFullInfo.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel())))
@@ -710,8 +721,8 @@
 		}
 
 //		BeanUtils.
-		BeanUtils.copyProperties(orderDTO.getData(),cbo);
-		cbo.setMaterialtype(Short.valueOf("1001"));
+//		BeanUtils.copyProperties(orderDTO.getData(),cbo);
+//		cbo.setMaterialtype(Short.valueOf("1001"));
 //		orderDTO.getData().forEach((key, value) -> {
 //			if (!edit || (!checkUnAttrUnEdit(key) &&
 //				!VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(key))) {
@@ -722,18 +733,19 @@
 //				}
 //			}
 //		});
+//		BeanMap beanMap = BeanMap.create(cbo);
+//		beanMap.putAll(orderDTO.getData());
+
 		try {
+
+			BeanUtilForVCI.copyPropertiesIgnoreNull(BeanUtilForVCI.convertMap(CodeWupin.class,orderDTO.getData()),cbo);
 
 			cbo.setCodeclsfid(classifyFullInfo.getCurrentClassifyVO().getOid());
 			cbo.setCodetemplateoid(templateVO.getOid());
 			cbo.setCodeclsfpath(fullPath);
-//			cbo.setMaterialclassify("model_type");
-//			cbo.setMaterialname(orderDTO.getData().get("materialname"));
-//			cbo.setShifoupihaoguanli("true");
-//			cbo.setKucunwl("true");
-//			cbo.setXiaoshouwl("false");
+			cbo.setTs(new Date());
 			if (!edit && StringUtils.isBlank(orderDTO.getLcStatus())) {
-				//鎵剧敓鍛藉懆鏈熺殑璧峰鐘舵�侊紝鎻掍釜鐐癸紝鐪嬬敓鍛藉懆鏈熸槸鍚﹂渶瑕佸垱寤�
+				//鎵剧敓鍛藉懆鏈熺殑璧峰鐘舵�侊紝鎻掍釜鐐癸紝鐢熷懡鍛ㄦ湡鏄惁闇�瑕佸垱寤�
 				if (StringUtils.isNotBlank(cbo.getLctid())) {
 //					OsLifeCycleVO lifeCycleVO = lifeCycleService.getLifeCycleById(cbo.getLctid());
 //					if (lifeCycleVO != null) {
@@ -748,7 +760,7 @@
 
 			}
 
-			int secret = VciBaseUtil.getInt(cbo.getSecretGrade().toString());
+			int secret = VciBaseUtil.getInt(String.valueOf(cbo.getSecretGrade()));
 			//鎻掍釜鐐癸紝鍚庣画鐪嬪瘑绾ф湇鍔℃槸鍚﹀彲鐢�
 //			if (secret == 0 || !secretService.checkDataSecret(secret)) {
 			if (secret == 0 ) {
@@ -789,13 +801,13 @@
 //		}
 //		ClientBusinessObject cbo = cloneClientBusinessObject(hasCreatedCbos.get(btmName));
 
-		QueryWrapper<CodeOsbtmtypeEntity> btmWrapper = new QueryWrapper<>();
-		btmWrapper.eq("ID",btmName);
-		CodeOsbtmtypeEntity btmTypeVO = codeOsbtmtypeMapper.selectOne(btmWrapper);
+//		QueryWrapper<CodeOsbtmtypeEntity> btmWrapper = new QueryWrapper<>();
+//		btmWrapper.eq("ID",btmName);
+//		CodeOsbtmtypeEntity btmTypeVO = codeOsbtmtypeMapper.selectOne(btmWrapper);
 //		OsBtmTypeVO btmTypeVO = btmService.getBtmById(boName);
 		String userName = AuthUtil.getUser().getUserName();
 		CodeWupin wupinEntity = new CodeWupin();
-		wupinEntity.setOid(null);
+		wupinEntity.setOid(VciBaseUtil.getPk());
 //		bo.setRevisionid((new ObjectUtility()).getNewObjectID36());
 //		bo.setNameoid((new ObjectUtility()).getNewObjectID36());
 		wupinEntity.setBtmname(btmName);
@@ -807,13 +819,13 @@
 		wupinEntity.setCreateTime(new Date());
 		wupinEntity.setLastModifier(userName);
 		wupinEntity.setLastModifyTime(new Date());
-		wupinEntity.setRevisionRule(btmTypeVO.getRevisionruleid());
-		wupinEntity.setVersionRule(String.valueOf(btmTypeVO.getVersionRule()));
-		if(StringUtils.isNotBlank(btmTypeVO.getRevisionruleid())){
-			//鎻掍釜鐐癸紝闇�瑕侀棶鍕囧摜鐗堟湰闂锛屽睍绀洪粯璁や负1
+		wupinEntity.setRevisionRule("numberversionrule");
+		wupinEntity.setVersionRule("0");
+//		if(StringUtils.isNotBlank(btmTypeVO.getRevisionruleid())){
+			//
 //			OsRevisionRuleVO revisionRuleVO = revisionRuleService.getRevisionRuleById(btmTypeVO.getRevisionruleid());
-			wupinEntity.setRevisionValue("1");
-		}
+		wupinEntity.setRevisionValue("1");
+//		}
 
 		wupinEntity.setRevisionSeq(1);
 		wupinEntity.setVersionSeq(1);
@@ -827,7 +839,7 @@
 		wupinEntity.setOwner(userName);
 		wupinEntity.setCheckinby(userName);
 		wupinEntity.setCopyFromVersion("");
-		wupinEntity.setMaterialtype((short) 1001);
+		wupinEntity.setMaterialtype(1001);
 		wupinEntity.setCaigouwl("true");
 		wupinEntity.setShifoupihaoguanli("true");
 		wupinEntity.setKucunwl("true");
@@ -1341,7 +1353,7 @@
 			maps.stream().forEach(map -> {
 				Map<String, String> data = new HashMap<>();
 				map.forEach((key, value) -> {
-					data.put(((String) key).toLowerCase(Locale.ROOT), (String) value);
+					data.put(((String) key).toLowerCase(Locale.ROOT), String.valueOf(value));
 				});
 				dataList.add(data);
 			});
@@ -1514,8 +1526,9 @@
 					referVO.setValueField(VciQueryWrapperForDO.OID_FIELD);
 					referVO.setTextField("name");
 				}
-
-				String referTable = VciBaseUtil.getTableName(referVO.getReferType());
+				//琛ㄩ渶瑕佹敼
+//				String referTable = VciBaseUtil.getTableName(referVO.getReferType());
+				String referTable = "pl_code_wupin";
 				String referTableNick = attrVO.getId() + "0";
 				String left = " left join " + referTable + " " + referTableNick + " on " + referTableNick + "." + referVO.getValueField() + " =  t." + attrVO.getId();
 				joinTableList.put(attrVO.getId(), left);
@@ -1603,7 +1616,9 @@
 			}
 			whereSql += " and ( t.secretGrade <= " + userSecret + ") ";
 		}
-		String tableName = VciBaseUtil.getTableName(btmType);
+		//瑕佹敼锛岃〃鏄庤幏鍙栨湁闂
+//		String tableName = VciBaseUtil.getTableName(btmType);
+		String tableName = "pl_code_wupin";
 		String sql = "select " + selectFieldList.stream().map(s -> (s.contains(".") ? s : ("t." + s))).collect(Collectors.joining(","))
 			+ " from " + tableName + SPACE + "t" + SPACE
 			+ joinTableList.values().stream().collect(Collectors.joining(SPACE))
@@ -2049,12 +2064,13 @@
 		if (!classifyService.checkHasChild(codeClassifyOid)) {
 			conditionMap.put(CODE_CLASSIFY_OID_FIELD, codeClassifyOid);
 		} else {
-			conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY)
-				+ " where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED +
+			//琛ㄩ渶瑕佹敼
+//			conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY)
+			conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from pl_code_wupin where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED +
 				"' start with parentCodeClassifyOid = '" + codeClassifyOid + "' CONNECT BY PRIOR OID = parentCodeClassifyOid )");
 		}
-		conditionMap.put("islastr", "1");
-		conditionMap.put("islastv", "1");
+		conditionMap.put("lastr", "1");
+		conditionMap.put("lastv", "1");
 		return queryGrid(btmTypeId, templateVO, conditionMap, pageHelper);
 //        List<String> selectFieldList = templateVO.getAttributes().stream().map(CodeClassifyTemplateAttrVO::getId).collect(Collectors.toList());
 //        //鍙傜収璁╁钩鍙扮洿鎺ユ煡璇㈠氨琛�
@@ -2437,7 +2453,7 @@
 			executionId = executionId.substring(0, executionId.lastIndexOf("."));
 		}
 		String sql = "select wm_concat(distinct (t.codetempattrOidArr)) codetempattroidarr\n" +
-			"from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY_PROCESS_TEMPLATE) + " t\n" +
+			"from pl_code_wupin t\n" +
 			"join PLFLOWINSTANCE plfi on t.ID = plfi.PLTEMPLATEPUID\n" +
 			"where plfi.PLEXECUTIONID = '" + executionId + "' and t.CLASSIFYTEMPLATEOID = '" + templateOid + "' and t.CODEPROCESSUSE = '" + processUse + "'";
 //		List<ClientBusinessObject> tempAttrOidArr = boService.queryByOnlySql(sql);
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 396b6f0..6a785bc 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
@@ -20,6 +20,7 @@
 import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO;
 import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO;
 import com.vci.ubcs.starter.exception.VciBaseException;
+import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil;
 import com.vci.ubcs.starter.web.constant.QueryOptionConstant;
 import com.vci.ubcs.starter.web.constant.RegExpConstant;
 import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum;
@@ -304,6 +305,9 @@
 				s.setLcStatus(statusMap.get(s.getOid()));
 
 			});
+			allCodeDOList.stream().forEach(
+				allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");}
+			);
 			codeAllCodeService.saveBatch(allCodeDOList);
 			iCodeWupinService.saveBatch(dataCBOList);
 //			batchCBO.getCreateCbos().stream().filter(s -> StringUtils.equalsIgnoreCase("codeallcode",s.getBtmName())).forEach(s -> {
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
index 44b7b0c..b054ef5 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodeCLassifyMapper.xml
@@ -52,9 +52,9 @@
     </select>
 
     <select id="checkHasChild" resultType="java.lang.Boolean">
-        select count(oid)
+        <![CDATA[select count(oid)
         from PL_CODE_CLASSIFY
-        where parentCodeClassifyOid = #{oid}
+        where parentCodeClassifyOid = #{oid}]]>
     </select>
 
     <select id="selectCodeClassifyVOByTree" resultMap="plCodeClassifyResultMap">
@@ -141,7 +141,8 @@
     </select>
 
     <select id="selectAllLevelParentByOid" resultType="java.util.HashMap">
-        select oid,level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid
+        select oid,
+               level from pl_code_classify start with oid= #{oid} connect by prior PARENTCODECLASSIFYOID = oid
     </select>
 
     <select id="selectByFieldNamePath"  resultMap="plCodeClassifyResultMap">
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodePhaseAttrMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodePhaseAttrMapper.xml
index b23f6e2..09e3ded 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodePhaseAttrMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CodePhaseAttrMapper.xml
@@ -80,31 +80,27 @@
                description,
                oid,
                versionseq,
-               checkinby,
                revisionrule,
                lctid,
                id,
                owner,
-               checkoutby,
                creator,
                createtime,
-               isfirstv,
+               firstv,
                attributegroup,
                revisionoid,
                btmname,
-               checkouttime,
                revisionvalue,
                versionrule,
                name,
-               islastr,
+               lastr,
                lastmodifytime,
                copyfromversion,
                nameoid,
                lcstatus,
-               islastv,
-               checkintime,
+               lastv,
                codephaseoid,
-               isfirstr
+               firstr
         from PL_CODE_PHASEATTR
         where codephaseoid in
               (#{oids})

--
Gitblit v1.9.3