From 41bc947be2b5861bf09026f99fec0e0226f01c84 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期二, 01 八月 2023 18:19:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeMapper.xml | 6 +----- Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 34 ++++++++++++++++++++++++++++++---- Source/UBCS-WEB/src/api/GetItem.js | 9 ++++++++- Source/UBCS-WEB/vue.config.js | 1 + Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java | 9 +++++++-- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/Source/UBCS-WEB/src/api/GetItem.js b/Source/UBCS-WEB/src/api/GetItem.js index 976018e..63ba7d3 100644 --- a/Source/UBCS-WEB/src/api/GetItem.js +++ b/Source/UBCS-WEB/src/api/GetItem.js @@ -75,4 +75,11 @@ data }) } - +//鍒犻櫎 +export function deleteCode(data) { + return request({ + url: 'api/ubcs-code/mdmEngineController/deleteCode', + method: 'DELETE', + data:data + }) +} diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index 33e8bfe..c7299bf 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -95,7 +95,7 @@ </basic-container> </template> <script> -import {MasterTable, TableData, FindData, addSaveCode, editSaveCode} from "@/api/GetItem"; +import {MasterTable, TableData, FindData, addSaveCode, editSaveCode,deleteCode} from "@/api/GetItem"; import {processTS,changeStatus} from "@/api/template/setPersonnel" import {listCodeAttributeByClassId} from "@/api/integration/integration.js"; import integrationTransfer from "@/views/integration/integrationTransfer"; @@ -344,6 +344,8 @@ if (uniqueFlag === 'CODEENABLE') return this.Enable() //鍥炴敹 if (uniqueFlag === 'CODERECYCLE') return this.Recovery() + //鍒犻櫎 + if (uniqueFlag === 'CODEDELETE') return this.enumDeleteRow() // 鐩镐技椤规煡璇� // if(uniqueFlag === 'CODEEDIT') return this.similarHandler() }); @@ -382,10 +384,11 @@ showMessage = false; } else if (showMessage) { processTS({templateId: this.templateOid, buttonTypeKey: 'PUBLIC'}).then(res => { - if (res.data.records != [] && res.data.code != 200) { + if (res.data.records != []) { this.userName = localStorage.getItem("username"); this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; - this.parameter.type = 'PUBLIC' + this.parameter.type = 'PUBLIC'; + this.parameter.code=this.templateOid this.title = '娴佺▼瀹℃壒' this.visibleFlow = true; this.onLoad() @@ -608,7 +611,30 @@ }, //鍒犻櫎 enumDeleteRow(row) { - this.tableData.splice(row, 1); + this.$confirm('鏄惁鍒犻櫎閫変腑鏁版嵁?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + const list=[]; + this.selectRow.forEach((item)=>{list.push(item.oid)}) + console.log(list) + deleteCode({codeClassifyOid:this.codeClassifyOid,oidList:list}).then(res=>{ + console.log(res) + if(res.data.code === 200){ + this.$message({ + type: 'success', + message: '鍒犻櫎鎴愬姛!' + }); + } + this.onLoad() + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); }, // 灏嗘鍦ㄧ紪杈戠殑琛岀殑鐘舵�佸彉涓� null 锛屽嵆閫�鍑虹紪杈戠姸鎬� saveRow() { diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js index 853f29f..0503d9e 100644 --- a/Source/UBCS-WEB/vue.config.js +++ b/Source/UBCS-WEB/vue.config.js @@ -30,6 +30,7 @@ // target: 'http://192.168.1.51:37000', target: 'http://dev.vci-tech.com:37000', // target: 'http://192.168.1.104:37000', + // target: 'http://192.168.0.105:37000', // target: 'http://192.168.0.103:37000', // target: 'http://192.168.1.63:37000', // target: 'http://192.168.3.7:37000', diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java index f248f5a..1a5dc48 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/java/com/vci/ubcs/omd/service/impl/BtmTypeServiceImpl.java @@ -516,6 +516,7 @@ List<BtmTypeAttributeVO> beforeAttributes = btmTypeByOid.getAttributes(); // 澶勭悊灞炴�э紝澶氫綑鐨勫垹闄わ紝涓嶅瓨鍦ㄧ殑娣诲姞 afterAttributes = updateAttributeForBtm(btmTypeByOid.getOid(),beforeAttributes, attributes); + baseMapper.updateByPrimaryKey(btmTypeDO); } BtmTypeVO btmTypeVO = BtmTypeWrapper.build().entityVO(btmTypeDO); //鍦ㄥ垱寤鸿〃鐨勬椂鍊欒繕闇�瑕佹妸榛樿鐨勫瓧娈靛甫涓娿�� @@ -577,8 +578,12 @@ List<BtmTypeAttributeVO> voListAdd = btmTypeAttributeService.checkAndInsert(oid, addList, AuthUtil.getUserAccount(), new Date()); List<BtmTypeAttributeVO> voListUpdate = btmTypeAttributeService.checkAndUpdate(oid, modifyList, AuthUtil.getUserAccount(), new Date()); List<BtmTypeAttributeVO> returnList = new ArrayList<>(); - returnList.addAll(Objects.requireNonNull(voListAdd)); - returnList.addAll(Objects.requireNonNull(voListUpdate)); + if(!CollectionUtils.isEmpty(voListAdd)) { + returnList.addAll(Objects.requireNonNull(voListAdd)); + } + if(!CollectionUtils.isEmpty(voListUpdate)) { + returnList.addAll(Objects.requireNonNull(voListUpdate)); + } return returnList; } diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeMapper.xml b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeMapper.xml index ee86cbd..3657124 100644 --- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeMapper.xml +++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/BtmTypeMapper.xml @@ -159,14 +159,10 @@ sub_life_cycle_name = #{subLifeCycleName,jdbcType=VARCHAR}, view_flag = #{viewFlag,jdbcType=VARCHAR}, view_create_sql = #{viewCreateSql,jdbcType=VARCHAR}, - btm_name =#{btmName,jdbcType=VARCHAR }, - owner = #{owner,jdbcType=VARCHAR }, - creator = #{creator,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=TIMESTAMP}, last_modifier = #{lastModifier,jdbcType=VARCHAR}, last_modify_time = #{lastModifyTime,jdbcType=TIMESTAMP}, ts = #{ts,jdbcType=TIMESTAMP}, - biz-domain = #{bizDomain,jdbcType=VARCHAR}, + biz_domain = #{bizDomain,jdbcType=VARCHAR}, consistence = #{consistence,jdbcType=VARCHAR} where OID = #{oid,jdbcType=VARCHAR} </update> -- Gitblit v1.9.3