From 4b8d14958e5a5ccb6f64abef72a4ec7086de0f1d Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期二, 18 七月 2023 09:53:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java | 2 Source/UBCS-WEB/.gitignore | 1 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/AttributeMapConfig.java | 2 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java | 49 +++++++-- Source/UBCS-WEB/src/components/Master/MasterTransfer.vue | 77 +++++++++++++++ Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue | 111 ++++++++++++++++++--- Source/UBCS-WEB/src/components/template/SetPersonnel.vue | 4 Source/UBCS-WEB/src/main.js | 3 Source/UBCS-WEB/vue.config.js | 4 Source/UBCS-WEB/src/components/Master/MasterTree.vue | 4 Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmProductCodeServiceImpl.java | 12 + Source/UBCS-WEB/src/components/Tree/attrCrud.vue | 29 ++++- 12 files changed, 244 insertions(+), 54 deletions(-) diff --git a/Source/UBCS-WEB/.gitignore b/Source/UBCS-WEB/.gitignore index 38bac29..dac7a4b 100644 --- a/Source/UBCS-WEB/.gitignore +++ b/Source/UBCS-WEB/.gitignore @@ -5,6 +5,7 @@ /tests/e2e/videos/ /tests/e2e/screenshots/ + # local env files .env.local .env.*.local diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue index 26286f1..a3c4375 100644 --- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue @@ -67,15 +67,20 @@ :type="edit" :visible.sync="DataVisible"></FormTemplateDialog> <!-- 鍙戝竷--> - <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow"></set-personnel> + <set-personnel :parameter="this.parameter" :visible.sync="visibleFlow" :title="title"></set-personnel> +<!-- 鍋滅敤--> + <set-personnel :parameter="this.parameter" :visible.sync="visibleDeactivate" :title="title"></set-personnel> +<!-- 鍚敤--> + <set-personnel :parameter="this.parameter" :visible.sync="visibleEnable" :title="title"></set-personnel> +<!-- 鍥炴敹--> + <set-personnel :parameter="this.parameter" :visible.sync="visibleRecovery" :title="title"></set-personnel> <!-- 楂樼骇鏌ヨ--> <advanced-query :options="this.options" :visible.sync="findvisible" @echoContion="echoContion"></advanced-query> - - <integration-transfer :data="transferData" :props="transferProps" :visible.sync="dialogPush" - @save="handelTransferSave"></integration-transfer> +<!-- 瀵煎嚭--> + <MasterTransfer :visible.sync="dialogPush" :tableHeadData="tableHeadFindData"></MasterTransfer> +<!-- 鐩镐技椤�--> <ResembleQueryDialog :codeClassifyOid="codeClassifyOid" :codeRuleOid="this.codeRuleOid" :rowOid="rowOid" :templateOid="templateOid" :visible.sync="similarVisible"></ResembleQueryDialog> - <div class="block" style="display: flex; justify-content: flex-end"> <el-pagination :current-page="page.currentPage" :page-size="page.pageSizes" :page-sizes="page.pageSizes" :total="page.total" layout="total, sizes, prev, pager, next, jumper" @@ -166,7 +171,8 @@ parameter: { ids: [], code: "", - type: "PUBLIC", + type: '', + // this.visibleDeactivate ?'ENABLE':this.visibleEnable ? 'DISABLE' :this.visibleRecovery ? 'ROLLBACK' :'PUBLIC' template: "", vars: { codeClassifyOid: "", @@ -174,7 +180,15 @@ } }, visibleNames:[], + //鍙戝竷 visibleFlow: false, + //鍋滅敤 + visibleDeactivate:false, + //鍚敤 + visibleEnable:false, + //鍥炴敹 + visibleRecovery:false, + title:'', transferData: [], transferProps: { key: "oid", @@ -308,16 +322,6 @@ this.$refs.dataTable.doLayout() } }, - // 鍙戝竷 - setHandler() { - if (this.selectRow.length <= 0) { - this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�"); - } else { - this.userName = localStorage.getItem("username"); - this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; - this.visibleFlow = true; - } - }, openVis(visible) { console.log(visible) this[visible] = true @@ -334,9 +338,14 @@ // if(uniqueFlag === 'CODEEDIT') return this.openBatchImport('batchApplyCode') if (uniqueFlag === 'CODESTARTPROCESS') return this.setHandler() if (uniqueFlag === 'CODEUPREVISION') return this.DataChange() - if (uniqueFlag === 'CODERECYCLE') return this.huishouHandler() if (uniqueFlag === 'CODEEXPORT') return this.openD() if (uniqueFlag === 'CODEQUERY') return this.findHandler() + //鍋滅敤 + if (uniqueFlag === 'CODEDISABLE') return this.Deactivate() + //鍚敤 + if (uniqueFlag === 'CODEENABLE') return this.Enable() + //鍥炴敹 + if (uniqueFlag === 'CODERECYCLE') return this.Recovery() // 鐩镐技椤规煡璇� // if(uniqueFlag === 'CODEEDIT') return this.similarHandler() }); @@ -361,6 +370,74 @@ rend() { this.tableData = this.tableHeadData; }, + // 鍙戝竷 + setHandler() { + // let EditFlag1=false + // let EditFlag2=false + // if(EditFlag1){ + // this.$message.warning('鍙湁鐘舵�佹槸銆愮紪杈戜腑銆戠殑鏁版嵁鎵嶅彲浠ュ彂璧锋祦绋�') + // }else if(EditFlag2){ + // this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹叏閮ㄤ负銆愮紪杈戜腑銆戞墠鍙互鍙戣捣娴佺▼') + // } + this.selectRow.forEach(item=>{ + if(this.selectRow.length === 1 && item.lcstatus !== "Editing"){ + this.$message.warning('鍙湁鐘舵�佹槸銆愮紪杈戜腑銆戠殑鏁版嵁鎵嶅彲浠ュ彂璧锋祦绋�') + }else if(item.lcstatus !== 'Editing'){ + this.$message.warning('鎮ㄩ�夋嫨鐨勬暟鎹叏閮ㄤ负銆愮紪杈戜腑銆戞墠鍙互鍙戣捣娴佺▼') + }else { + this.userName = localStorage.getItem("username"); + this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; + this.parameter.type='PUBLIC' + this.title='娴佺▼瀹℃壒' + this.visibleFlow = true; + } + }) + // if (this.selectRow.length <= 0) { + // this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�"); + // } else { + // this.userName = localStorage.getItem("username"); + // this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; + // this.parameter.type='PUBLIC' + // this.title='娴佺▼瀹℃壒' + // this.visibleFlow = true; + // } + }, + //鍋滅敤 + Deactivate(){ + if (this.selectRow.length <= 0) { + this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�"); + } else { + this.userName = localStorage.getItem("username"); + this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; + this.parameter.type='DISABLE' + this.title='鍋滅敤锛堝喕缁擄級缂栫爜鏁版嵁' + this.visibleDeactivate=true; + } + }, + //鍚敤 + Enable(){ + if (this.selectRow.length <= 0) { + this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�"); + } else { + this.userName = localStorage.getItem("username"); + this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; + this.parameter.type='ENABLE' + this.title='鍚敤锛堣В鍐伙級缂栫爜鏁版嵁' + this.visibleEnable=true; + } + }, + //鍥炴敹 + Recovery(){ + if (this.selectRow.length <= 0) { + this.$message.warning("璇烽�夋嫨涓�鏉℃暟鎹�"); + } else { + this.userName = localStorage.getItem("username"); + this.parameter.template = this.userName + "-鍙戝竷" + "[鐗╁搧]"; + this.parameter.type='ROLLBACK' + this.title='鍥炴敹缂栫爜鏁版嵁' + this.visibleRecovery=true; + } + }, handleSizeChange(val) { this.isLoading = true; setTimeout(() => { diff --git a/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue new file mode 100644 index 0000000..ccfc623 --- /dev/null +++ b/Source/UBCS-WEB/src/components/Master/MasterTransfer.vue @@ -0,0 +1,77 @@ +<template> +<el-dialog :visible.sync="dialogPush" append-to-body :close-on-click-modal="false" @close="recoverPage" title="瀵煎嚭"> + <div style="margin-bottom: 10px"> + <el-radio-group v-model="radio"> + <el-radio :label="0">閫夋嫨</el-radio> + <el-radio :label="1">鍏ㄩ儴</el-radio> + <el-radio :label="2">椤电爜</el-radio> + </el-radio-group> + </div> + <div style="text-align: center"> + <el-transfer + style="text-align: left; display: inline-block" + filterable + :filter-method="filterMethod" + filter-placeholder="璇疯緭鍏ュ煄甯傛嫾闊�" + v-model="value" + :data="data"> + </el-transfer> + </div> +</el-dialog> +</template> + +<script> +export default { +name: "MasterTransfer", + props:['visible','tableHeadData'], + data(){ + const generateData = () => { + const data = []; + const cities = ['涓婃捣', '鍖椾含', '骞垮窞', '娣卞湷', '鍗椾含', '瑗垮畨', '鎴愰兘']; + cities.forEach((city, index) => { + data.push({ + label: city, + key: index, + }); + }); + return data; + }; + return { + data: generateData(), + value: [], + filterMethod(query, item) { + return item.label.indexOf(query) > -1; + }, + dialogPush:this.visible, + radio:0, + tableHeadFindData:[] + }; + }, + watch:{ + //鐩戝惉鍒濆鍖� + visible (){ + this.dialogPush = this.visible; + }, + tableHeadData(){ + this.tableHeadFindData=this.tableHeadData; + + } + }, + computed:{ + + }, + mounted() { + console.log(this.tableHeadData) + }, + methods:{ + //鍏抽棴椤甸潰 + recoverPage(){ + this.$emit('update:visible', false); + } + } +} +</script> + +<style scoped lang="scss"> + +</style> diff --git a/Source/UBCS-WEB/src/components/Master/MasterTree.vue b/Source/UBCS-WEB/src/components/Master/MasterTree.vue index cf5f526..2a583b3 100644 --- a/Source/UBCS-WEB/src/components/Master/MasterTree.vue +++ b/Source/UBCS-WEB/src/components/Master/MasterTree.vue @@ -121,9 +121,7 @@ codeClassifyOid: this.nodeClickList.oid, functionId: 5, }).then(res => { - console.log('1-', res.data) - console.log('123-', res.data.buttons) - const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEBATCHADD", "CODESTARTPROCESS", "CODEEXPORT", "CODEQUERY"]; + const flagsToDeleteBtn = ["CODEIMPORTHISTORY", "CODEEXPORT", "CODEQUERY","batchApplyCode"]; //涓嶅悓鑺傜偣鏄剧ず涓嶅悓鎸夐挳 if (!res.data.leaf) { this.masterVrBtnList = res.data.buttons.filter(obj => flagsToDeleteBtn.includes(obj.uniqueFlag)); diff --git a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue index 7c68f93..cc66270 100644 --- a/Source/UBCS-WEB/src/components/Tree/attrCrud.vue +++ b/Source/UBCS-WEB/src/components/Tree/attrCrud.vue @@ -242,7 +242,7 @@ </div> <el-table :data="ProData" style="width: 100%" - height="280" + height="750" @cell-click="handleCellClicks" @select="selectHandle" @selection-change="selectionChange" @@ -1637,15 +1637,26 @@ }, //鏋氫妇娉ㄥ叆淇濆瓨 enumAddHandle() { - if (this.enumRow.length < 1) { - this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�') - } else { - if(this.CurrentCell){ - this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.enumRow)); + let hasError = false; // 娣诲姞涓�涓彉閲� + this.tableData.forEach((item, index) => { + if (item.key === '') { + this.$message.warning(`绗�${index + 1}琛岀殑閫夐」鍊间笉鑳戒负绌篳); + hasError = true; + return; + } else if (item.value === '') { + this.$message.warning(`绗�${index + 1}琛岀殑閫夐」涓枃鏍囩涓嶈兘涓虹┖`); + hasError = true; + return; + } + }); + // 淇濆瓨鎵ц閫昏緫 + if (!hasError) { + if (this.CurrentCell) { + this.$set(this.CurrentCell, 'enumString', JSON.stringify(this.tableData)); this.enumVisible = false; - }else { - this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.enumRow)); - this.tableData=[] + } else { + this.$set(this.attrSelectList[0], 'enumString', JSON.stringify(this.tableData)); + this.tableData=[]; this.enumVisible = false; } } diff --git a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue index 2c7a417..cf03538 100644 --- a/Source/UBCS-WEB/src/components/template/SetPersonnel.vue +++ b/Source/UBCS-WEB/src/components/template/SetPersonnel.vue @@ -118,10 +118,8 @@ }, mounted() { - console.log('---',this.parameter) }, - created() { - console.log('parameter',this.parameter) + created() { }, methods: { setSaveParam() { diff --git a/Source/UBCS-WEB/src/main.js b/Source/UBCS-WEB/src/main.js index 7ad2bdd..ae013f3 100644 --- a/Source/UBCS-WEB/src/main.js +++ b/Source/UBCS-WEB/src/main.js @@ -51,7 +51,7 @@ import FlowPath from "@/components/template/FlowPath"; import Stage from "@/components/template/Stage"; import businesswork from "@/components/work/BusinessWork" - +import MasterTransfer from "@/components/Master/MasterTransfer"; // 灏嗗伐鍏峰嚱鏁版坊鍔犲埌鍏ㄥ眬 import utilFunc from './util/func' import flowPath from "@/views/flow/flowPath"; @@ -104,6 +104,7 @@ Vue.component('Stage',Stage) Vue.component('Divider', Divider) Vue.component('businesswork', businesswork) +Vue.component('MasterTransfer', MasterTransfer) // 鍔犺浇鐩稿叧url鍦板潃 Object.keys(urls).forEach(key => { diff --git a/Source/UBCS-WEB/vue.config.js b/Source/UBCS-WEB/vue.config.js index ad43a75..63a88c9 100644 --- a/Source/UBCS-WEB/vue.config.js +++ b/Source/UBCS-WEB/vue.config.js @@ -26,9 +26,9 @@ proxy: { '/api': { //鏈湴鏈嶅姟鎺ュ彛鍦板潃 - target: 'http://localhost:37000', + // target: 'http://localhost:37000', // target: 'http://192.168.1.51:37000', - // target: 'http://192.168.1.46:37000', + target: 'http://192.168.1.46:37000', // target: 'http://dev.vci-tech.com:37000', // target: 'http://192.168.1.51:37000/', // target: 'http://192.168.1.104:37000', diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java index 5cfa714..e1611d5 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmIOServiceImpl.java @@ -8,7 +8,6 @@ import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; import com.vci.ubcs.code.dto.CodeOrderDTO; import com.vci.ubcs.code.entity.CodeAllCode; -import com.vci.ubcs.code.entity.CodeClassify; import com.vci.ubcs.code.enumpack.CodeDefaultLC; import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum; import com.vci.ubcs.code.lifecycle.CodeAllCodeLC; @@ -33,7 +32,6 @@ import com.vci.ubcs.starter.revision.model.BaseModel; import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; import com.vci.ubcs.starter.util.LocalFileUtil; -import com.vci.ubcs.starter.util.MdmBtmTypeConstant; import com.vci.ubcs.starter.web.constant.QueryOptionConstant; import com.vci.ubcs.starter.web.enumpck.BooleanEnum; import com.vci.ubcs.starter.web.enumpck.UserSecretEnum; @@ -41,7 +39,6 @@ import com.vci.ubcs.starter.web.pagemodel.*; import com.vci.ubcs.starter.web.toolmodel.DateConverter; import com.vci.ubcs.starter.web.util.*; -import lombok.AllArgsConstructor; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.map.HashedMap; @@ -51,7 +48,6 @@ import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.RichTextString; import org.apache.poi.ss.usermodel.Workbook; -import org.springblade.core.cache.utils.CacheUtil; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.tool.api.R; import org.springframework.beans.BeanUtils; @@ -68,6 +64,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import static com.alibaba.druid.util.FnvHash.Constants.LIMIT; @@ -1455,8 +1452,8 @@ @Override public R batchImportData(List<CodeImprotSaveDatVO> codeImprotSaveDatVOList, String classifyAttr, boolean isImprot) { - - boolean success=true; + WriteExcelOption eo = new WriteExcelOption(); + AtomicBoolean success= new AtomicBoolean(true); codeImprotSaveDatVOList.stream().forEach(codeImprotSaveDatVO -> { List<SheetRowData> rowDataList = new ArrayList<>(); List<ClientBusinessObject>cboList=new ArrayList<>(); @@ -1573,7 +1570,7 @@ log.error("鎵归噺浜х敓缂栫爜鐨勬椂鍊欏嚭閿欎簡", e); thisCbos.stream().forEach(cbo -> { String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); - errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";绯荤粺閿欒锛屽瓨鍌ㄦ暟鎹殑鏃跺�欏嚭閿欎簡"); + errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";绯荤粺閿欒锛屽瓨鍌ㄦ暟鎹殑鏃跺�欏嚭閿欎簡:"+e.getMessage()); }); } } @@ -1595,14 +1592,34 @@ try { productCodeService.productCodeAndSaveData(classifyFullInfo, codeClassifyTemplateVO, ruleVO, orderDTO.getSecDTOList(), dataCBOList); } catch (Exception e) { - e.printStackTrace(); + log.error("鎵归噺浜х敓缂栫爜鐨勬椂鍊欏嚭閿欎簡", e); + needSaveCboList.stream().forEach(cbo -> { + String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); + errorMap.put(rowIndex, errorMap.getOrDefault(rowIndex, "") + ";绯荤粺閿欒锛屽瓨鍌ㄦ暟鎹殑鏃跺�欏嚭閿欎簡:"+e.getMessage()); + }); } //濡傛灉鏄紪鐮佺敓鎴愬け璐ワ紝鍒欑洿鎺ュ氨澶辫触浜嗭紝鍏朵粬鐨勫垽鏂嚭鏉ユ湁閿欒鐨勬垜浠兘缁熶竴杩斿洖鍒癳xcel閲岄潰 engineService.batchSaveSelectChar(codeClassifyTemplateVO, dataCBOList); } } + if(errorMap.size()>0) { + success.set(false); + LinkedList<WriteExcelData> excelDataList = new LinkedList<>(); + excelDataList.add(new WriteExcelData(0, 0, "閿欒淇℃伅")); + final int[] index = {1}; + errorMap.forEach((key,v)->{ + excelDataList.add(new WriteExcelData(index[0]++, 0, "绗�"+(Integer.parseInt(key)+1)+"琛屾暟鎹細"+v)); + }); + eo.addSheetDataList(codeClassifyTemplateVO.getName() + "瀵煎叆妯℃澘", excelDataList); + } }); - return R.success(isImprot?"鎵归噺鍘嗗彶瀵煎叆鎴愬姛":"鎵归噺鐢宠鎴愬姛"); + if(!success.get()){ + String excelName = LocalFileUtil.getDefaultTempFolder() + File.separator + (isImprot?"鎵归噺鍘嗗彶閿欒淇℃伅.xls":"鎵归噺鐢宠閿欒淇℃伅.xls"); + ExcelUtil.writeDataToFile(excelName,eo); + return R.fail(excelName); + }else { + return R.success(isImprot ? "鎵归噺鍘嗗彶瀵煎叆鎴愬姛" : "鎵归噺鐢宠鎴愬姛"); + } } /*** @@ -2723,6 +2740,7 @@ Integer userSecret = VciBaseUtil.getCurrentUserSecret(); cbo.setAttributeValue(SECRET_FIELD,String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret)); } + cbo.setLcStatus(CodeDefaultLC.EDITING.getValue()); }else{ //姝ゆ椂杩樻病鏈夎浆鎹㈣矾寰� //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath)); @@ -2779,6 +2797,7 @@ Integer userSecret = VciBaseUtil.getCurrentUserSecret(); cbo.setAttributeValue(SECRET_FIELD,String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret)); } + cbo.setLcStatus(CodeDefaultLC.EDITING.getValue()); }else{ //姝ゆ椂杩樻病鏈夎浆鎹㈣矾寰� //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath)); @@ -3624,13 +3643,15 @@ } } private List<ClientBusinessObject> ChangeMapTOClientBusinessObjects(List<Map<String,String>> oldDataMap){ - List<ClientBusinessObject> clientBusinessObjectList=new CopyOnWriteArrayList<>(); - oldDataMap.parallelStream().forEach(dataMap->{ + List<ClientBusinessObject> clientBusinessObjectList=new ArrayList<>(); + oldDataMap.stream().forEach(dataMap->{ ClientBusinessObject clientBusinessObject=new ClientBusinessObject(); DefaultAttrAssimtUtil.copplyDefaultAttrAssimt(dataMap,clientBusinessObject); - dataMap.forEach((key,value)->{ - clientBusinessObject.setAttributeValue(key,value); - }); + for (String key:dataMap.keySet()){ + Object value= dataMap.getOrDefault(key,""); + clientBusinessObject.setAttributeValue(key,value.toString()); + } + clientBusinessObjectList.add(clientBusinessObject); }); return clientBusinessObjectList; } 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 95e3f5a..5b86905 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 @@ -104,6 +104,7 @@ String[] secLengths = cbo.getData().get(CODE_SEC_LENGTH_FIELD).split("#"); cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//灏嗘key闄ゅ幓 cbo.getData().remove(IMPORT_ROW_INDEX);//灏嗘key闄ゅ幓 + cbo.getData().remove("codeclassifyid");//灏嗘key闄ゅ幓 List<CodeBasicSecVO> secVOList = ruleVO.getSecVOList().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); Map<String/**鐮佹鐨勪富閿�**/,String/**鐮佹鐨勫��**/> serialValueMap = new HashMap<>(); Map<String, CodeBasicSecVO> secVOMap = secVOList.stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); @@ -290,6 +291,9 @@ for (int i = 0; i < dataCBOList.size(); i++) { BaseModel cbo = dataCBOList.get(i); + cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//灏嗘key闄ゅ幓 + cbo.getData().remove(IMPORT_ROW_INDEX);//灏嗘key闄ゅ幓 + cbo.getData().remove("codeclassifyid");//灏嗘key闄ゅ幓 List<String> thisSecValueList = new LinkedList<>(); for (int j = 0; j < secValueList.size(); j++) { thisSecValueList.add(secValueList.get(j)); @@ -323,15 +327,17 @@ } saveSerialValue( ruleVO, lastMaxSerialValueMap, maxSerialValueMap); + allCodeDOList.stream().forEach( + allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} + ); + + Map<String, String> statusMap = allCodeDOList.stream().collect(Collectors.toMap(s -> s.getOid(), s -> s.getLcStatus())); allCodeDOList.stream().filter(s -> StringUtils.equalsIgnoreCase("codeallcode",s.getBtmname())).forEach(s -> { s.setLcStatus(statusMap.get(s.getOid())); }); - allCodeDOList.stream().forEach( - allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} - ); codeAllCodeService.saveBatch(allCodeDOList); // iCodeWupinService.saveBatch(dataCBOList); diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java index e941cac..1abb780 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/UniversalInterfaceImpl.java @@ -65,7 +65,7 @@ @Slf4j @VciWebservice(path = "/universalInterface") public class UniversalInterfaceImpl<IDockingLogeServiceing> implements UniversalInterfaceI { - @Value("${code.checkConfig:true}") + @Value("${code.universalinterface.checkSystemConfig:true}") public boolean CODE_CHECKCONFIG; @Autowired(required = false) private AttributeMapConfig attributeMapConfig; diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/AttributeMapConfig.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/AttributeMapConfig.java index 126250c..f3e376d 100644 --- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/AttributeMapConfig.java +++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/webService/config/AttributeMapConfig.java @@ -6,7 +6,7 @@ import java.util.List; import java.util.Map; -@ConfigurationProperties(prefix="attrconfig") +@ConfigurationProperties(prefix="code.universalinterface.attrconfig") @Component public class AttributeMapConfig { private Map<String,String> system_attrmap; -- Gitblit v1.9.3