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" 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() { 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); } }); } 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" 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({ 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) { 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', 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) { 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) { 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和name不能同时绑定这个prop来渲染,一个表格做隐藏来数据操作(表单隐藏),另一个表格做显示只显示在页面(表单隐藏)。 label: '组合方法', prop: 'combinationIds', type: "checkbox", 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); } 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())) {//结果正确的情况 List<DockingDataVO> dataObjectVOList = resultDataObject.getData(); dataObjectVOList.stream().forEach(dataObject -> { boolean isEditDatas = false; String code2 = dataObject.getCode(); DockingMainDataVO data2 = dataObject.getData(); String applyId = data2.getApplyId();//申请单id String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding();//集团码段 msg = dataObject.getMsg(); if (code2.equals("1")) {//结果正确的情况 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())) {//结果正确的情况 List<DockingDataVO> dataObjectVOList = resultDataObject.getData(); dataObjectVOList.stream().forEach(dataObject -> { boolean isEditDatas = false; String code2 = dataObject.getCode(); DockingMainDataVO data2 = dataObject.getData(); String applyId = data2.getApplyId();//申请单id String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding();//集团码段 msg = dataObject.getMsg(); if (code2.equals("1")) {//结果正确的情况 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("查询申请单状态接口开关已关闭"); return R.fail("查询申请单状态接口开关已关闭"); } String message="执行成功!"; log.info("查询申请单状态接口statr"); 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")){ 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("转换成对象start"); rootDataVO = (LibraryDO) xStream.fromXML(attributeMapData); log.info("转换成对象end"); } return rootDataVO;