From 654668c8e2b56e6b334dd96ffce21b25cf70199a Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期日, 17 九月 2023 21:41:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/views/docking/data.vue                                                                                                     |    5 
 Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue                                                                                         |  137 ++++++++--------
 Source/UBCS-WEB/src/views/code/code.vue                                                                                                        |    3 
 Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue                                                                              |    4 
 Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue                                                                              |   11 +
 Source/UBCS-WEB/src/views/docking/infoForm.vue                                                                                                 |    4 
 Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue                                                                                   |    1 
 Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java                |   10 
 Source/UBCS-WEB/src/views/docking/task.vue                                                                                                     |    5 
 Source/UBCS-WEB/src/views/docking/loge.vue                                                                                                     |    6 
 Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java |  262 ++++++++++++++++++--------------
 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/util/gennerAttrMapUtil.java                                                 |    9 +
 Source/UBCS-WEB/src/components/work/BusinessWork.vue                                                                                           |    4 
 13 files changed, 258 insertions(+), 203 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
index 4eb070b..14f0c2d 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -26,6 +26,7 @@
       </template>
       <template :slot="item.prop + ''" v-for="item in slotColumnList">
         <vciWebRefer
+          :key="item.prop" :data-key="item.prop"
           v-if="item.type == 'refer'"
           :referConfig="item.referConfig || {}"
           :value="form[item.referConfig.field] || item.value"
diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
index 7f41850..adfb9af 100644
--- a/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
+++ b/Source/UBCS-WEB/src/components/Theme/ThemeAttrCrud.vue
@@ -1824,59 +1824,65 @@
             input.focus();
           }
         });
-        if (column.property == 'referConfig') {
-          this.referConfigVisble = true;
-          this.referConfigOption = {
-            referConfig: this.CurrentCell.referConfig || '',
-          }
-          if (this.CurrentCell.referConfig == '') {
+        const columnActions = {
+          referConfig: () => {
+            this.referConfigVisble = true;
             this.referConfigOption = {
-              referConfig: '',
+              referConfig: this.CurrentCell.referConfig || '',
+            }
+            if (this.CurrentCell.referConfig == '') {
+              this.referConfigOption = {
+                referConfig: '',
+              }
+            }
+          },
+          classifyInvokeText: () => {
+            this.injectVisible = true;
+            if (this.CurrentCell.classifyInvokeAttr != '') {
+              this.injectOption = {
+                classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
+                classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
+                classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
+                classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
+                classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
+              };
+            }
+          },
+          componentRule: () => {
+            this.isShowformulaEdit = true;
+          },
+          enumString: () => {
+            this.enumVisible = true;
+            this.tableData = [];
+            if (this.CurrentCell.enumString != "") {
+              this.tableData = JSON.parse(this.CurrentCell.enumString)
+              return;
+            }
+          },
+          parentCode: () => {
+            gridCodeClassifyTemplateAttr({
+              'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
+              'conditionMap[oid_notequal]': this.CurrentCell.oid,
+              limit: -1
+            }).then(res => {
+              this.CascadeData = res.data.data;
+            })
+            this.CascadeVisible = true;
+          },
+          verifyRule: () => {
+            this.RulesForm.expressionTextt = this.CurrentCell.verifyRule;
+            this.rulesVisible = true;
+          },
+          attributeGroup: () => {
+            this.attrVisible = true;
+            if (this.CurrentCell.attributeGroup !== '') {
+              this.attrModel = this.CurrentCell.attributeGroup
             }
           }
-          // this.$refs.referConfigFormDialog.onloadAttrData();
-        } else if (column.property == 'classifyInvokeText') {
-          this.injectVisible = true;
-          if (this.CurrentCell.classifyInvokeAttr != '') {
-            this.injectOption = {
-              classifyInvokeAttr: this.CurrentCell.classifyInvokeAttr,
-              classifyInvokeAttrName: this.CurrentCell.classifyInvokeAttrName,
-              classifyInvokeEditFlag: this.CurrentCell.classifyInvokeEditFlag,
-              classifyInvokeLevel: this.CurrentCell.classifyInvokeLevel == 'min' ? 'min' : 'max',
-              classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel
-            };
-          } else {
-            // this.injectHandleReset();
-          }
-        } else if (column.property == 'componentRule') {
-          if (this.CurrentCell) {
-            // this.CurrentCell.componentRule = this.componentRuleText;
-          }
-          this.isShowformulaEdit = true;
-        } else if (column.property == 'enumString') {
-          this.enumVisible = true;
-          this.tableData=[];
-          if (this.CurrentCell.enumString != "") {
-            this.tableData = JSON.parse(this.CurrentCell.enumString)
-            return
-          }
-        } else if (column.property == 'parentCode') {
-          gridCodeClassifyTemplateAttr({
-            'conditionMap[classifyTemplateOid]': this.Formlist[0].oid,
-            'conditionMap[oid_notequal]': this.CurrentCell.oid,
-            limit: -1
-          }).then(res => {
-            this.CascadeData = res.data.data;
-          })
-          this.CascadeVisible = true;
-        } else if (column.property == 'verifyRule') {
-          this.RulesForm.expressionTextt = this.CurrentCell.verifyRule;
-          this.rulesVisible = true;
-        } else if (column.property == 'attributeGroup') {
-          this.attrVisible = true;
-          if (this.CurrentCell.attributeGroup !== '') {
-            this.attrModel = this.CurrentCell.attributeGroup
-          }
+        };
+
+        if (column.property in columnActions) {
+          columnActions[column.property]();
         }
       }
     },
@@ -2018,32 +2024,29 @@
     },
     //鍒嗙被娉ㄥ叆淇濆瓨
     injectAddHandle() {
-      // 瀹氫箟灞曠ず绫诲瀷
-      let data = {
-        "娉ㄥ叆绫诲瀷": this.injectOption.classifyInvokeAttr,
-        "娉ㄥ叆绫诲瀷鍚嶇О": this.injectOption.classifyInvokeAttrName,
-        "灞傜骇璁剧疆": this.injectOption.classifyInvokeLevel == 'max' ? this.injectOption.classifyNumber : 'min',
-        "鏄惁鍙慨鏀�": this.injectOption.classifyInvokeEditFlag
-      }
-      //鍕鹃�夋搷浣�
+      const { classifyInvokeAttr, classifyInvokeAttrName, classifyInvokeLevel, classifyInvokeEditFlag, classifyNumber } = this.injectOption;
+
+      const data = {
+        "娉ㄥ叆绫诲瀷": classifyInvokeAttr,
+        "娉ㄥ叆绫诲瀷鍚嶇О": classifyInvokeAttrName,
+        "灞傜骇璁剧疆": classifyInvokeLevel === 'max' ? classifyNumber : 'min',
+        "鏄惁鍙慨鏀�": classifyInvokeEditFlag
+      };
       for (const key in this.injectOption) {
         this.attrSelectList[0][key] = this.injectOption[key];
-        //濡傛灉鏄寚瀹氬眰璧嬪�间负鏁板瓧
-        if (this.injectOption.classifyInvokeLevel !== 'min') {
-          this.attrSelectList[0].classifyInvokeLevel = this.injectOption.classifyNumber
+        if (classifyInvokeLevel !== 'min') {
+          this.attrSelectList[0].classifyInvokeLevel = classifyNumber;
         } else {
-          this.attrSelectList[0].classifyInvokeLevel = 'min'
+          this.attrSelectList[0].classifyInvokeLevel = 'min';
         }
-        this.$set(this.attrSelectList[0], 'classifyInvokeText', data)
+        this.$set(this.attrSelectList[0], 'classifyInvokeText', data);
       }
-      // this.injectHandleReset()
-      if (this.injectOption.classifyInvokeLevel !== 'min') {
-        this.injectOption.classifyInvokeLevel = this.injectOption.classifyNumber;
+      if (classifyInvokeLevel !== 'min') {
+        this.injectOption.classifyInvokeLevel = classifyNumber;
       } else {
         this.injectOption.classifyNumber = 0;
       }
       this.injectVisible = false;
-
     },
     //鍒嗙被娉ㄥ叆娓呯┖
     injectHandleReset() {
diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
index 0b17c75..0edd298 100644
--- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
+++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -118,7 +118,12 @@
     SaveHandler(){
       let name = this.SearchObject.searchData[this.formInline.type].prop;
       getList(this.page.currentPage, this.page.pageSize, { [`conditionMap[${name}_like]`]: this.formInline.text}).then(res => {
-        console.log(res);
+        if(!res.data.data.records){
+          this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�')
+        }else {
+          let Data=res.data.data;
+          this.$emit('getList',Data);
+        }
       });
     },
     handleSearch() {
@@ -157,8 +162,8 @@
         if(!res.data.data.records){
           this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�')
         }else {
-          let Data=res.data.data.records;
-          this.$emit('getList',Data)
+          let Data=res.data.data;
+          this.$emit('getList',Data);
         }
       });
     }
diff --git a/Source/UBCS-WEB/src/components/work/BusinessWork.vue b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
index 24a6a7e..6a65f49 100644
--- a/Source/UBCS-WEB/src/components/work/BusinessWork.vue
+++ b/Source/UBCS-WEB/src/components/work/BusinessWork.vue
@@ -46,7 +46,9 @@
           :type="item.edit" :format="item.dateFormate" :value-format="item.dateFormate"
           placeholder="閫夋嫨鏃ユ湡">
         </el-date-picker>
-        <vciWebRefer v-if="editingRow === row && editShow== item.prop && item.edit == 'refer'"
+        <vciWebRefer
+          :key="item.prop" :data-key="item.prop"
+          v-if="editingRow === row && editShow== item.prop && item.edit == 'refer'"
           :referConfig="item.referConfig || {}"
           :value="row[item.referConfig.field] || row[item.prop]"
           :text="row[item.referConfig.showField]" :disabled="item.disabled" :display="item.display"
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index dbc4044..942065e 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -1868,8 +1868,7 @@
         if (!this.tipsCodeSecValueMessage(this.codeFixdForm.id)) {
           return;
         }
-        this.codeFixdForm.codeFixedSecOid =
-          this.codefixedsecOrCodeclassifysec.oid;
+        this.codeFixdForm.codeFixedSecOid = this.codefixedsecOrCodeclassifysec.oid;
         addSaveCodeFixedValue(this.codeFixdForm).then(
           () => {
             this.loadFixedValueTableData({
diff --git a/Source/UBCS-WEB/src/views/docking/data.vue b/Source/UBCS-WEB/src/views/docking/data.vue
index e249724..e4abbc5 100644
--- a/Source/UBCS-WEB/src/views/docking/data.vue
+++ b/Source/UBCS-WEB/src/views/docking/data.vue
@@ -190,7 +190,10 @@
   },
   methods: {
     dockingGetList(val){
-      this.data=val;
+      this.data=val.records;
+      this.page.pageSize=val.size;
+      this.page.currentPage=val.current;
+      this.page.total=val.total;
     },
     async cellDbClick(row, column, cell, event) {
       for (const key in row) {
diff --git a/Source/UBCS-WEB/src/views/docking/infoForm.vue b/Source/UBCS-WEB/src/views/docking/infoForm.vue
index 10fb23c..a5772d4 100644
--- a/Source/UBCS-WEB/src/views/docking/infoForm.vue
+++ b/Source/UBCS-WEB/src/views/docking/infoForm.vue
@@ -31,6 +31,7 @@
         <div v-if="formData.dataFlowType=='push'">
           <el-form-item  label="鍒嗙被閫夋嫨" prop="classifyName">
             <vciWebRefer
+              key="classifyName" data-key="classifyName"
               :referConfig="{
                   title: '鍒嗙被閫夋嫨',
                   showField: 'classifyName',
@@ -48,6 +49,7 @@
           </el-form-item>
           <el-form-item label="闆嗘垚绯荤粺" prop="targetSystemName">
             <vciWebRefer
+              key="targetSystemName" data-key="targetSystemName"
               :referConfig="{
                   title: '闆嗘垚绯荤粺',
                   showField: 'targetSystemName',
@@ -69,6 +71,7 @@
 <!--          </el-form-item>-->
           <el-form-item  label="鍒嗙被閫夋嫨" prop="classifyName" v-if="formData.pushType !='5' && formData.pushType !='6'">
             <vciWebRefer
+              key="classifyName" data-key="classifyName"
               :referConfig="{
                   title: '鍒嗙被閫夋嫨',
                   showField: 'classifyName',
@@ -86,6 +89,7 @@
           </el-form-item>
           <el-form-item label="闆嗘垚绯荤粺" prop="sourceSystemName">
             <vciWebRefer
+              key="sourceSystemName" data-key="sourceSystemName"
               :referConfig="{
                   title: '闆嗘垚绯荤粺',
                   showField: 'sourceSystemName',
diff --git a/Source/UBCS-WEB/src/views/docking/loge.vue b/Source/UBCS-WEB/src/views/docking/loge.vue
index 2de73b5..36a1bd8 100644
--- a/Source/UBCS-WEB/src/views/docking/loge.vue
+++ b/Source/UBCS-WEB/src/views/docking/loge.vue
@@ -219,8 +219,10 @@
   },
   methods: {
     dockingGetList(val){
-      console.log(val,'val')
-      this.data=val;
+      this.data=val.records;
+      this.page.pageSize=val.size;
+      this.page.currentPage=val.current;
+      this.page.total=val.total;
     },
     async cellDbClick(row, column, cell, event) {
       for (const key in row) {
diff --git a/Source/UBCS-WEB/src/views/docking/task.vue b/Source/UBCS-WEB/src/views/docking/task.vue
index 2d637e1..00c0348 100644
--- a/Source/UBCS-WEB/src/views/docking/task.vue
+++ b/Source/UBCS-WEB/src/views/docking/task.vue
@@ -243,7 +243,10 @@
   },
   methods: {
     dockingGetList(val){
-      this.data=val;
+      this.data=val.records;
+      this.page.pageSize=val.size;
+      this.page.currentPage=val.current;
+      this.page.total=val.total;
     },
     async cellDbClick(row, column, cell, event) {
       for (const key in row) {
diff --git a/Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue b/Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue
index aa9b662..3a39a37 100644
--- a/Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue
+++ b/Source/UBCS-WEB/src/views/system/PasswordManagement/passwords.vue
@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <basic-container >
     <avue-crud v-model="form" :option="option" :data="data" ref="crud"  @on-load="onLoad" @row-save="rowSave" @row-update="rowUpdate" @row-del="rowDel" :page.sync="page">
       <template slot="menu" slot-scope="{ row, index }">
         <el-button
@@ -132,6 +132,7 @@
         index: true,
         rowKey:'id',
         editBtn:false,
+        height:700,
         delBtn:false,
         column: [
           {
@@ -176,7 +177,6 @@
 
           },
           {
-            //鍐欎袱涓粍鍚堟柟娉曟槸鍥犱负id鍜宯ame涓嶈兘鍚屾椂缁戝畾杩欎釜prop鏉ユ覆鏌擄紝涓�涓〃鏍煎仛闅愯棌鏉ユ暟鎹搷浣滐紙琛ㄥ崟闅愯棌锛夛紝鍙︿竴涓〃鏍煎仛鏄剧ず鍙樉绀哄湪椤甸潰锛堣〃鍗曢殣钘忥級銆�
             label: '缁勫悎鏂规硶',
             prop: 'combinationIds',
             type: "checkbox",
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java
index 49df7b6..1f85f08 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/feigh/MdmInterJtClient.java
@@ -16,6 +16,7 @@
 import org.springblade.core.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.RestController;
@@ -33,6 +34,8 @@
 @AllArgsConstructor
 @Slf4j
 public class MdmInterJtClient implements IMdmInterJtClient {
+	@Value("${docking.apply.partCoe:10}")
+	public String partCoe;
 	/**
 	 * 闆嗗洟鐢宠鍗曟湇鍔�
 	 */
@@ -89,9 +92,6 @@
 			return R.fail("闆嗗洟鐮佹暟鎹慨鏀瑰け璐ワ細"+e.getMessage());
 		}
 	}
-
-
-
 	/*
 	 * 涓绘暟鎹笟鍔℃湇鍔�
 	 */
@@ -165,10 +165,10 @@
 				String jdataid = dockingPreApplyForm.getDataOid();
 				String jdatabtmname = dockingPreApplyForm.getDataBtmName();
 				if (res) {
-
 					//姝ゅ闇�瑕佹煡璇笟鍔℃暟鎹紝鍘绘洿鏀�
 					BaseModel baseModel = new BaseModel();
-					baseModel.setId(customCoding);
+					baseModel.setId("10" + customCoding);
+					baseModel.getData().put("groupcode",customCoding);
 					log.info("鐢宠鍗�:"+applyId+",闆嗗洟鐮侊細"+customCoding+"缂栫爜锛�"+baseModel.getId());
 					editObjectList.add(baseModel);
 				}
diff --git a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java
index 7bd34db..ae69cc9 100644
--- a/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-applyjtcodeservice/src/main/java/com/vci/ubcs/code/applyjtcodeservice/service/impl/GroupMdmInterServiceImpl.java
@@ -41,8 +41,10 @@
 	private String code="";
 
 	private String msg="";
-
-
+	@Value("${docking.apply.partCoe:10}")
+	public String partCoe;
+	@Value("${docking.apply.userFlag:false}")
+	public boolean usedFlag;
 	@Value("${docking.apply.unitCode:41000}")
 	public String dockingApplyUnitCode;
 
@@ -101,108 +103,113 @@
 	@Transactional(rollbackFor = VciBaseException.class)
 	@Override
 	public R applyGroupCode(String oids, String btmName) throws VciBaseException {
-		try {
-			List<BaseModel> updateCbos = new ArrayList<BaseModel>();
-			List<DockingPreApplyForm> dockingPreAttrMappings = new ArrayList<>();
-			VciBaseUtil.alertNotNull(oids, "閫夋嫨鐨勬暟鎹�");
-			VciBaseUtil.alertNotNull(btmName, "涓氬姟绫诲瀷");
-			R<List<BaseModel>> baseModelR =mdmEngineClient.selectByTypeAndOid(btmName,oids);
-			List<BaseModel> dataModelList= baseModelR.getData();
-			if (!CollectionUtils.isEmpty(dataModelList)) {
-				DockingGroupDataVO dockingGroupDataVO = new DockingGroupDataVO();
-				//鐢宠鍗曞拰鐢宠鍗曞璞″叧绯�
-				Map<String, DockingPreApplyForm> addDockingPreApplyFormMap = new HashMap<String, DockingPreApplyForm>();
-				Map<String, DockingPreApplyForm> editDockingPreApplyFormMap = new HashMap<String, DockingPreApplyForm>();
-				Map<String, BaseModel> baseModelMap = new HashMap<String, BaseModel>();
-				//缁勭粐鏁版嵁
-				dockingGroupDataVO = queryApplycodeDataObjects(1, dataModelList, addDockingPreApplyFormMap, editDockingPreApplyFormMap, baseModelMap);
-				DockingResultVO resultDataObject = mdmApplyGroupCodeProvider.receiveAddApply(dockingGroupDataVO);
-				code = resultDataObject.getCode();
-				msg = resultDataObject.getMsg();
-				if ("1".equals(resultDataObject.getCode())) {//缁撴灉姝g‘鐨勬儏鍐�
-					List<DockingDataVO> dataObjectVOList = resultDataObject.getData();
-					dataObjectVOList.stream().forEach(dataObject -> {
-						boolean isEditDatas = false;
-						String code2 = dataObject.getCode();
-						DockingMainDataVO data2 = dataObject.getData();
-						String applyId = data2.getApplyId();//鐢宠鍗昳d
-						String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding();//闆嗗洟鐮佹
-						msg = dataObject.getMsg();
-						if (code2.equals("1")) {//缁撴灉姝g‘鐨勬儏鍐�
-							if (!"".equals(customCoding)) {
-								isEditDatas = true;
+		if(usedFlag) {
+			try {
+				List<BaseModel> updateCbos = new ArrayList<BaseModel>();
+				List<DockingPreApplyForm> dockingPreAttrMappings = new ArrayList<>();
+				VciBaseUtil.alertNotNull(oids, "閫夋嫨鐨勬暟鎹�");
+				VciBaseUtil.alertNotNull(btmName, "涓氬姟绫诲瀷");
+				R<List<BaseModel>> baseModelR = mdmEngineClient.selectByTypeAndOid(btmName, oids);
+				List<BaseModel> dataModelList = baseModelR.getData();
+				if (!CollectionUtils.isEmpty(dataModelList)) {
+					DockingGroupDataVO dockingGroupDataVO = new DockingGroupDataVO();
+					//鐢宠鍗曞拰鐢宠鍗曞璞″叧绯�
+					Map<String, DockingPreApplyForm> addDockingPreApplyFormMap = new HashMap<String, DockingPreApplyForm>();
+					Map<String, DockingPreApplyForm> editDockingPreApplyFormMap = new HashMap<String, DockingPreApplyForm>();
+					Map<String, BaseModel> baseModelMap = new HashMap<String, BaseModel>();
+					//缁勭粐鏁版嵁
+					dockingGroupDataVO = queryApplycodeDataObjects(1, dataModelList, addDockingPreApplyFormMap, editDockingPreApplyFormMap, baseModelMap);
+					DockingResultVO resultDataObject = mdmApplyGroupCodeProvider.receiveAddApply(dockingGroupDataVO);
+					code = resultDataObject.getCode();
+					msg = resultDataObject.getMsg();
+					if ("1".equals(resultDataObject.getCode())) {//缁撴灉姝g‘鐨勬儏鍐�
+						List<DockingDataVO> dataObjectVOList = resultDataObject.getData();
+						dataObjectVOList.stream().forEach(dataObject -> {
+							boolean isEditDatas = false;
+							String code2 = dataObject.getCode();
+							DockingMainDataVO data2 = dataObject.getData();
+							String applyId = data2.getApplyId();//鐢宠鍗昳d
+							String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding();//闆嗗洟鐮佹
+							msg = dataObject.getMsg();
+							if (code2.equals("1")) {//缁撴灉姝g‘鐨勬儏鍐�
+								if (!"".equals(customCoding)) {
+									isEditDatas = true;
+								}
 							}
-						}
-						//闇�瑕佷慨鏀圭殑鐢宠鍗曟暟鎹�
-						if (editDockingPreApplyFormMap.containsKey(applyId)) {
-							DockingPreApplyForm dockingPreApplyForm = editDockingPreApplyFormMap.get(applyId);
-							dockingPreApplyForm.setCode(code2);
+							//闇�瑕佷慨鏀圭殑鐢宠鍗曟暟鎹�
+							if (editDockingPreApplyFormMap.containsKey(applyId)) {
+								DockingPreApplyForm dockingPreApplyForm = editDockingPreApplyFormMap.get(applyId);
+								dockingPreApplyForm.setCode(code2);
+								dockingPreApplyForm.setMsg("鐢宠锛�" + msg);
+								dockingPreApplyForm.setGroupCode(customCoding);
+								ObjectMapper mp = new ObjectMapper();
+								String writeValueAsString = null;
+								try {
+									writeValueAsString = mp.writeValueAsString(dataObject);
+									dockingPreApplyForm.setContent(writeValueAsString);
+								} catch (JsonProcessingException e) {
+								}
+							}
+							//鏂板鐨勭敵璇峰崟鏁版嵁
+							if (addDockingPreApplyFormMap.containsKey(applyId)) {
+								DockingPreApplyForm dockingPreApplyForm = addDockingPreApplyFormMap.get(applyId);
+								dockingPreApplyForm.setCode(code2);
+								dockingPreApplyForm.setMsg("鐢宠锛�" + msg);
+								dockingPreApplyForm.setGroupCode(customCoding);
+								ObjectMapper mp = new ObjectMapper();
+								String writeValueAsString = null;
+								try {
+									writeValueAsString = mp.writeValueAsString(dataObject);
+									dockingPreApplyForm.setContent(writeValueAsString);
+								} catch (JsonProcessingException e) {
+								}
+							}
+							//濡傛灉鏈夐泦鍥㈢爜鍒欐洿鏂版暟鎹�
+							if (isEditDatas) {
+								if (baseModelMap.containsKey(applyId)) {
+									BaseModel baseModel = baseModelMap.get(applyId);
+									baseModel.getData().getOrDefault("codeclassid","");
+									BeanUtilForVCI.copyDeclaredIgnoreCase(baseModel, baseModel);
+									DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel);
+									DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel);
+									//baseModel.setId(customCoding);
+									baseModel.getData().getOrDefault("groupCode", customCoding);
+									updateCbos.add(baseModel);//鏇存柊鏁版嵁闆嗗洟code
+								}
+							}
+						});
+					} else {
+						editDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> {
+							dockingPreApplyForm.setCode("2");
 							dockingPreApplyForm.setMsg("鐢宠锛�" + msg);
-							dockingPreApplyForm.setGroupCode(customCoding);
-							ObjectMapper mp = new ObjectMapper();
-							String writeValueAsString = null;
-							try {
-								writeValueAsString = mp.writeValueAsString(dataObject);
-								dockingPreApplyForm.setContent(writeValueAsString);
-							} catch (JsonProcessingException e) {
-							}
-						}
-						//鏂板鐨勭敵璇峰崟鏁版嵁
-						if (addDockingPreApplyFormMap.containsKey(applyId)) {
-							DockingPreApplyForm dockingPreApplyForm = addDockingPreApplyFormMap.get(applyId);
-							dockingPreApplyForm.setCode(code2);
+							dockingPreApplyForm.setContent("");
+							dockingPreApplyForm.setGroupCode("");
+							DefaultAttrAssimtUtil.updateDefaultAttrAssimt(dockingPreApplyForm);
+						});
+						addDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> {
+							dockingPreApplyForm.setCode("2");
 							dockingPreApplyForm.setMsg("鐢宠锛�" + msg);
-							dockingPreApplyForm.setGroupCode(customCoding);
-							ObjectMapper mp = new ObjectMapper();
-							String writeValueAsString = null;
-							try {
-								writeValueAsString = mp.writeValueAsString(dataObject);
-								dockingPreApplyForm.setContent(writeValueAsString);
-							} catch (JsonProcessingException e) {
-							}
-						}
-						//濡傛灉鏈夐泦鍥㈢爜鍒欐洿鏂版暟鎹�
-						if (isEditDatas) {
-							if (baseModelMap.containsKey(applyId)) {
-								BaseModel baseModel = baseModelMap.get(applyId);
-								BeanUtilForVCI.copyDeclaredIgnoreCase(baseModel, baseModel);
-								DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel);
-								DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel);
-								//baseModel.setId(customCoding);
-								baseModel.getData().getOrDefault("groupCode",customCoding);
-								updateCbos.add(baseModel);//鏇存柊鏁版嵁闆嗗洟code
-							}
-						}
-					});
-				} else {
-					editDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> {
-						dockingPreApplyForm.setCode("2");
-						dockingPreApplyForm.setMsg("鐢宠锛�" + msg);
-						dockingPreApplyForm.setContent("");
-						dockingPreApplyForm.setGroupCode("");
-						DefaultAttrAssimtUtil.updateDefaultAttrAssimt(dockingPreApplyForm);
-					});
-					addDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> {
-						dockingPreApplyForm.setCode("2");
-						dockingPreApplyForm.setMsg("鐢宠锛�" + msg);
-						dockingPreApplyForm.setContent("");
-						dockingPreApplyForm.setGroupCode("");
-						DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreApplyForm, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM);
-					});
+							dockingPreApplyForm.setContent("");
+							dockingPreApplyForm.setGroupCode("");
+							DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreApplyForm, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM);
+						});
+					}
+					if (editDockingPreApplyFormMap.size() > 0) {
+						dockingPreAttrMappings.addAll(editDockingPreApplyFormMap.values());//娣诲姞鐢宠鍗曟暟鎹�
+					}
+					if (addDockingPreApplyFormMap.size() > 0) {
+						dockingPreAttrMappings.addAll(addDockingPreApplyFormMap.values());//闇�瑕佷慨鏀圭殑鐢宠鍗曟暟鎹�
+					}
+					//淇濆瓨琛ㄥ崟鏁版嵁
+					dockingPreApplyFormService.saveOrUpdateBatch(dockingPreAttrMappings);
+					mdmEngineClient.updateBatchByType(btmName, updateCbos);//淇濆瓨鏁版嵁
 				}
-				if (editDockingPreApplyFormMap.size() > 0) {
-					dockingPreAttrMappings.addAll(editDockingPreApplyFormMap.values());//娣诲姞鐢宠鍗曟暟鎹�
-				}
-				if (addDockingPreApplyFormMap.size() > 0) {
-					dockingPreAttrMappings.addAll(addDockingPreApplyFormMap.values());//闇�瑕佷慨鏀圭殑鐢宠鍗曟暟鎹�
-				}
-				//淇濆瓨琛ㄥ崟鏁版嵁
-				dockingPreApplyFormService.saveOrUpdateBatch(dockingPreAttrMappings);
-				mdmEngineClient.updateBatchByType(btmName,updateCbos);//淇濆瓨鏁版嵁
+				return R.success("鐢宠鎺ュ彛璋冪敤鎴愬姛");
+			} catch (VciBaseException e) {
+				return R.fail("鐢宠鎺ュ彛璋冪敤澶辫触" + e);
 			}
-			return R.success("鐢宠鎺ュ彛璋冪敤鎴愬姛");
-		}catch (VciBaseException e){
-			return R.fail("鐢宠鎺ュ彛璋冪敤澶辫触"+e);
+		}else{
+			return R.fail("鐢宠鎺ュ彛寮�鍏冲凡鍏抽棴锛屼笉鐢宠闆嗗洟鐮�");
 		}
 	}
 
@@ -216,10 +223,14 @@
 	@Transactional(rollbackFor = VciBaseException.class)
 	@Override
 	public R receiveEditApply(String oids, String btmName) throws VciBaseException {
-		List<BaseModel> updateCbos=new ArrayList<BaseModel>();
-		List<DockingPreApplyForm> dockingPreAttrMappings=new ArrayList<>();
-		VciBaseUtil.alertNotNull(oids,"閫夋嫨鐨勬暟鎹�");
-		VciBaseUtil.alertNotNull(btmName,"涓氬姟绫诲瀷");
+		if(usedFlag) {
+			log.info("鏇存柊鎺ュ彛鍔熻兘宸插叧闂紒->"+usedFlag);
+			R.success("鏇存柊鎺ュ彛鍔熻兘宸插叧闂紒");
+		}
+		List<BaseModel> updateCbos = new ArrayList<BaseModel>();
+		List<DockingPreApplyForm> dockingPreAttrMappings = new ArrayList<>();
+		VciBaseUtil.alertNotNull(oids, "閫夋嫨鐨勬暟鎹�");
+		VciBaseUtil.alertNotNull(btmName, "涓氬姟绫诲瀷");
 		//List<BaseModelVO> codeWupins=mdmEngineService.listByIds(VciBaseUtil.str2List(oids));
 		List<BaseModel> dataModelList = new ArrayList<>();
 		try {
@@ -282,8 +293,8 @@
 								BaseModel baseModel = baseModelMap.get(applyId);
 								//BeanUtilForVCI.copyDeclaredIgnoreCase(baseModelVO, baseModel);
 								DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel);
-							//	baseModel.setId(customCoding);
-								baseModel.getData().getOrDefault("groupCode",customCoding);
+								//	baseModel.setId(customCoding);
+								baseModel.getData().put("groupCode", customCoding);
 								updateCbos.add(baseModel);//鏇存柊鏁版嵁闆嗗洟code
 							}
 						}
@@ -312,11 +323,11 @@
 				}
 				//淇濆瓨琛ㄥ崟鏁版嵁
 				dockingPreApplyFormService.saveOrUpdateBatch(dockingPreAttrMappings);
-				mdmEngineClient.updateBatchByType(btmName,updateCbos);//淇濆瓨鏁版嵁
+				mdmEngineClient.updateBatchByType(btmName, updateCbos);//淇濆瓨鏁版嵁
 			}
-			return R.success("鐢宠鎺ュ彛璋冪敤鎴愬姛");
-		}catch (VciBaseException e){
-			return R.fail("鐢宠鎺ュ彛璋冪敤澶辫触"+e.getMessage());
+			return R.success("鏇存柊鎺ュ彛璋冪敤鎴愬姛");
+		} catch (VciBaseException e) {
+			return R.fail("鏇存柊鎺ュ彛璋冪敤澶辫触" + e.getMessage());
 		}
 	}
 
@@ -330,6 +341,10 @@
 	public R queryClassModel(String groupClassifyId) throws Throwable {
 		log.info("鑾峰彇闆嗗洟妯″瀷璇︾粏淇℃伅鎵ц淇濆瓨start");
 		String message="鎵ц鎴愬姛锛�";
+		if(usedFlag){
+			log.info("鑾峰彇闆嗗洟妯″瀷璇︾粏淇℃伅鎵ц淇濆瓨鍔熻兘宸插叧闂紒->"+usedFlag);
+			return R.fail("鑾峰彇闆嗗洟妯″瀷璇︾粏淇℃伅鎺ュ彛宸插叧闂�!");
+		}
 		try {
 			if (StringUtils.isBlank(groupClassifyId)) {
 				message = "鍙傛暟锛氶泦鍥㈠垎绫讳富閿紝涓虹┖!";
@@ -354,19 +369,19 @@
 					log.info(message);
 					throw new Throwable(message);
 				}
-			}else{
-				message="鏈粠闆嗗洟鑾峰彇鍒颁换浣曟ā鍨嬩俊鎭�";
+			} else {
+				message = "鏈粠闆嗗洟鑾峰彇鍒颁换浣曟ā鍨嬩俊鎭�";
 				log.info(message);
 				throw new Throwable(message);
 			}
 			return R.success(message);
-		}catch (Throwable e){
-			e.printStackTrace();;
-			log.error("鑾峰彇鏁版嵁妯″瀷璇︾粏淇℃伅澶辫触"+e);
-			R.fail(message);
+		} catch (Throwable e) {
+			e.printStackTrace();
+			log.error("鑾峰彇鏁版嵁妯″瀷璇︾粏淇℃伅澶辫触" + e);
+			return R.fail(message);
+		}finally {
+			log.info("鑾峰彇闆嗗洟妯″瀷璇︾粏淇℃伅鎵ц淇濆瓨end");
 		}
-		log.info("鑾峰彇闆嗗洟妯″瀷璇︾粏淇℃伅鎵ц淇濆瓨end");
-		return R.success(message);
 	}
 
 	/***
@@ -378,6 +393,10 @@
 	public R queryMdmModel() throws Throwable {
 		String message="鎵ц鎴愬姛锛�";
 		log.info("浠庨泦鍥㈣幏鍙栦富妯″瀷淇℃伅鎵ц淇濆瓨鎺ュ彛statr");
+		if(usedFlag){
+			log.info("浠庨泦鍥㈣幏鍙栦富妯″瀷淇℃伅鎵ц淇濆瓨鎺ュ彛鍔熻兘宸插叧闂紒->"+usedFlag);
+			return R.fail("鏌ヨ妯″瀷瑙嗗浘鎺ュ彛宸插叧闂�!");
+		}
 		try {
 			if (StringUtils.isBlank(dockingApplySysName)) {
 				message = "鑾峰彇绯荤粺鏍囪瘑" + dockingApplySysName + "涓虹┖锛岃鏌ョ湅閰嶇疆锛�";
@@ -461,7 +480,10 @@
 	 */
 	@Override
 	public R queryApplyState(String dataOids) throws VciBaseException {
-
+		if(usedFlag){
+			log.info("鏌ヨ鐢宠鍗曠姸鎬佹帴鍙e紑鍏冲凡鍏抽棴");
+			return R.fail("鏌ヨ鐢宠鍗曠姸鎬佹帴鍙e紑鍏冲凡鍏抽棴");
+		}
 		String message="鎵ц鎴愬姛锛�";
 		log.info("鏌ヨ鐢宠鍗曠姸鎬佹帴鍙tatr");
 		try {
@@ -524,6 +546,10 @@
 	 */
 	@Override
 	public R syncClassifyModel(String classifyId, String operationType) throws VciBaseException {
+		if(usedFlag){
+			log.info("鍚屾闆嗗洟妯″瀷淇℃伅寮�鍏冲凡鍏抽棴");
+			return R.fail("鍚屾闆嗗洟妯″瀷淇℃伅寮�鍏冲凡鍏抽棴");
+		}
 		VciBaseUtil.alertNotNull(operationType,"闆嗘垚鎿嶄綔绫诲瀷");
 		try {
 			if(operationType.equals("all")){
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/util/gennerAttrMapUtil.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/util/gennerAttrMapUtil.java
index 8dc780f..8916bdc 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/util/gennerAttrMapUtil.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/util/gennerAttrMapUtil.java
@@ -6,10 +6,12 @@
 import com.vci.ubcs.code.vo.webserviceModel.attrmap.LibraryDO;
 import com.vci.ubcs.code.webService.config.AttributeMapConfig;
 import com.vci.ubcs.starter.util.LocalFileUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import java.util.Map;
 
+@Slf4j
 public class gennerAttrMapUtil {
     @Autowired(required = false)
     private AttributeMapConfig attributeMapConfig;
@@ -27,17 +29,22 @@
      * @param systemId
      */
     public LibraryDO gennerAttrMapBySystem(String systemId, Map<String, String> system_attrmap) throws Throwable{
+		log.info("绯荤粺鏍囪瘑->"+systemId);
         if(StringUtils.isBlank(systemId)){
             throw new Throwable("绯荤粺鏍囪瘑涓虹┖");
         }
         LibraryDO rootDataVO=new LibraryDO();
         if(system_attrmap.containsKey(systemId)){
            String path=system_attrmap.get(systemId);
+		   log.info("绯荤粺鏍囪瘑->"+systemId+"锛涙枃浠跺睘鎬ч厤缃枃浠惰矾寰�->"+path);
            String attributeMapData=  LocalFileUtil.readContentForFile(path);
+		   log.info("璇诲彇鍚庣殑灞炴�ф槧灏勫唴瀹�"+attributeMapData);
            XStream xStream = new XStream(new DomDriver());
            xStream.processAnnotations(LibraryDO.class);
            xStream.autodetectAnnotations(true);
-            rootDataVO = (LibraryDO) xStream.fromXML(attributeMapData);
+			log.info("杞崲鎴愬璞tart");
+           rootDataVO = (LibraryDO) xStream.fromXML(attributeMapData);
+			log.info("杞崲鎴愬璞nd");
 
         }
         return rootDataVO;

--
Gitblit v1.9.3