Merge remote-tracking branch 'origin/master'
| | |
| | | .avue--detail .el-col{ |
| | | margin-bottom: 0; |
| | | } |
| | | .avue-dialog .el-dialog__body { |
| | | margin-bottom: 10px |
| | | } |
| | | </style> |
| | |
| | | data:data |
| | | }) |
| | | } |
| | | // ç³è¯·éå¢ç 弿°æ® |
| | | export function applyGroupCode(params) { |
| | | return request({ |
| | | url: 'api/ubcs-applyjtcodeservice/DockingPreApplyCode/applyGroupCode', |
| | | method: 'post', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridDockingSystem', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ |
| | | export const add = (data) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/addSaveSystemConfig', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | // ä¿®æ¹ |
| | | export const edit = (data) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/editSystemConfig', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ |
| | | export const del = (data) => { |
| | | let url = '/api/ubcs-code/dockingManagement/deleteSystemConfigsById' |
| | | return request({ |
| | | url, |
| | | method: 'delete', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | |
| | | // 忥 |
| | | export const push = (data) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/pushData', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // åç¨å¯ç¨ |
| | | export const updateStatus = (data) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/updateStatus', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | message = "请è¾å
¥"; |
| | | trigger = "blur"; |
| | | } |
| | | let fieldMapKey='' |
| | | if( formItem.type == "refer"){ |
| | | if(!formItem.fieldMap){ |
| | | fieldMapKey=formItem.field+'Id' |
| | | } |
| | | } |
| | | let columnItem = { |
| | | label: formItem.text, |
| | | labelslot: true, |
| | |
| | | title: formItem.text, |
| | | showField: formItem.showField || formItem.field, |
| | | field: formItem.field, |
| | | fieldMap:formItem.fieldMap || {fieldMapKey:'id'}, |
| | | placeholder: formItem.inputTip, |
| | | options: formItem.referConfig, |
| | | options: formItem.referConfig |
| | | } |
| | | : {}, |
| | | span: formItem.span |
| | |
| | | if (data.field) { |
| | | this.form[data.field] = data.value || ""; |
| | | this.form[data.showField] = data.text || ""; |
| | | if (data.fieldMap) { |
| | | //说æéè¦æ å° |
| | | for (let key in data.fieldMap) { |
| | | let mapFields = data.fieldMap[key].split(","); |
| | | let value = []; |
| | | data.rawData.forEach(_item => { |
| | | var temp; |
| | | if (!_item.attributes) { |
| | | _item.attributes = _item; |
| | | } |
| | | if (mapFields.length == 1) { |
| | | var mapField = mapFields[0]; |
| | | if (mapField.indexOf("attribute.") > -1) { |
| | | temp = _item['attributes'][mapField.subString("attribute.".length)]; |
| | | } else { |
| | | temp = _item['attributes'][mapField] || _item[mapField]; |
| | | } |
| | | } else { |
| | | //æå¤ä¸ª |
| | | var mutiTemp = []; |
| | | layui.each(mapFields, function (_indexField, _itemField) { |
| | | if (_itemField.indexOf("attribute.") > -1) { |
| | | mutiTemp.push(_item['attributes'][_itemField.subString("attribute.".length)]); |
| | | } else { |
| | | mutiTemp.push(_item['attributes'][_itemField] || _item[_itemField]); |
| | | } |
| | | }); |
| | | temp = mutiTemp.join(' '); |
| | | } |
| | | if (temp != null && temp != '') { |
| | | value.push(temp); |
| | | } |
| | | }) |
| | | this.form[key] = value.join(','); |
| | | } |
| | | } |
| | | this.$emit("getFormData", this.form); |
| | | this.$emit("referConfigDataUpdate", data); |
| | | } |
| | |
| | | showCodeApply: false, |
| | | showResembleQuery: false, |
| | | selfColumnType: { |
| | | codefixedsec: "combox", |
| | | codeclassifysec: "refer", |
| | | codevariablesec: "text", |
| | | codefixedsec: "combox",//åºå®ç 段 |
| | | codeclassifysec: "refer",//åç±»ç æ®µ |
| | | codevariablesec: "text",//å¯åç æ®µ |
| | | coderefersec: "refer",//å¼ç¨ç 段 |
| | | codeattrsec: "text", |
| | | codelevelsec: "text", |
| | | coderefersec: "refer", |
| | | codedatesec: "date" |
| | | }, |
| | | selfColumnConfig: { |
| | |
| | | if (item.parentClassifySecOid === field) { |
| | | this.$refs.CodeApply.form[item.oid] = undefined; |
| | | this.$refs.CodeApply.form[item.name] = undefined; |
| | | item.readOnly=false; |
| | | item.referConfig.extraParams.parentClassifyValueOid=data.value; |
| | | } |
| | | return item; |
| | | }); |
| | |
| | | getReferConfig(item) { |
| | | let params = {}; |
| | | if (item.secType == "codeclassifysec") { |
| | | //åç±»ç æ®µ |
| | | params = { |
| | | isMuti: false, |
| | | type: "grid", |
| | |
| | | }, |
| | | }; |
| | | } else if (item.secType == "coderefersec") { |
| | | //å¼ç¨ç 段 |
| | | params = JSON.parse(item.referValueInfo); |
| | | } |
| | | return params; |
| | |
| | | </basic-container> |
| | | </template> |
| | | <script> |
| | | import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode} from "@/api/GetItem"; |
| | | import {MasterTable, TableData, FindData, addSaveCode, editSaveCode, deleteCode, upSaveCode,applyGroupCode} from "@/api/GetItem"; |
| | | import {processTS, changeStatus} from "@/api/template/setPersonnel" |
| | | import {listCodeAttributeByClassId} from "@/api/integration/integration.js"; |
| | | import integrationTransfer from "@/views/integration/integrationTransfer"; |
| | |
| | | if (uniqueFlag === 'CODERECYCLE') return this.Recovery() |
| | | //å é¤ |
| | | if (uniqueFlag === 'CODEDELETE') return this.enumDeleteRow() |
| | | //ç³è¯·éå¢ç æ°æ® |
| | | if (uniqueFlag === 'applyGroupCode') return this.applyGroupCode() |
| | | //æ´æ°éå¢ç æ°æ® |
| | | // if (uniqueFlag === 'applyGroupCode') return this.applyGroupCode() |
| | | // ç¸ä¼¼é¡¹æ¥è¯¢ |
| | | // if(uniqueFlag === 'CODEEDIT') return this.similarHandler() |
| | | }); |
| | | }, |
| | | //ç³è¯·éå¢ç æ°æ® |
| | | applyGroupCode(){ |
| | | if(this.selectRow.length <= 0){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®æ¨¡æ¿ï¼') |
| | | }else { |
| | | // const requestData = this.selectRow.forEach(item => { |
| | | // return { oids: item.oid, btmName: item.btmname }; |
| | | // }); |
| | | const oids = this.selectRow.map(item => item.oid).join(','); |
| | | applyGroupCode({ oids, btmName: this.selectRow[0].btmname }).then(res => { |
| | | console.log(res); |
| | | }); |
| | | } |
| | | }, |
| | | openD() { |
| | | this.getListCodeByClassId(); |
| | | }, |
| | |
| | | console.log(objcodekey) |
| | | const filteredObj = objcodekey.reduce((acc, key) => { |
| | | const pattern = /[\u4e00-\u9fa5]/; // å¹é
䏿åç¬¦çæ£åè¡¨è¾¾å¼ |
| | | if (!pattern.test(key)) { |
| | | const patterns = /\$/; |
| | | if (!pattern.test(key)&&!patterns.test(key)) { |
| | | acc[key] = this.codeApplyForm[key]; |
| | | } |
| | | return acc; |
| | |
| | | if (item.secType == "codeclassifysec") { |
| | | params = { |
| | | isMuti: false, |
| | | valueField: 'id', |
| | | type: "grid", |
| | | tableConfig: { |
| | | limit: -1, |
| | |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newV) { |
| | | this.text=newV.text; |
| | | this.value=newV.value; |
| | | this.$emit("setReferValue", newV); |
| | | } |
| | | } |
| | |
| | | } else { |
| | | this.option.column = this.options.tableConfig.cols.map(item => { |
| | | if (item.field != 'LAY_TABLE_INDEX' && item.field != 'LAY_CHECKED') { |
| | | let formatter=item.template || item.templet; |
| | | if(typeof formatter == "string" && formatter !=''){ |
| | | formatter=eval("(" + formatter + ")") |
| | | } |
| | | return { |
| | | ...item, |
| | | label: item.title, |
| | | prop: item.field, |
| | | formatter:item.template, |
| | | formatter:formatter, |
| | | search:this.options.tableConfig.queryColumns.some(qItem=>{ |
| | | return qItem.field==item.field |
| | | }) |
| | |
| | | |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList}); |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:this.referConfig.fieldMap}); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |
| | |
| | | } |
| | | } |
| | | getList(Object.assign(params,this.params,this.query, query),page.currentPage, page.pageSize, this.url, this.method).then(res => { |
| | | this.data = res.data.records; |
| | | this.page.total=res.data.total |
| | | this.data = res.data.records || res.data.data.records; |
| | | this.page.total=res.data.total || res.data.data.total; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error=>{ |
| | |
| | | //说æä¼ éäºç |
| | | this.option.column= this.options.tableConfig.cols.map(item => { |
| | | if (item.field != 'LAY_TABLE_INDEX' && item.field != 'LAY_CHECKED') { |
| | | let formatter=item.template || item.templet; |
| | | if(typeof formatter == "string" && formatter !=''){ |
| | | formatter=eval("(" + formatter + ")") |
| | | } |
| | | return { |
| | | ...item, |
| | | label: item.title, |
| | | prop: item.field, |
| | | formatter:item.template, |
| | | formatter:formatter, |
| | | search: this.options.tableConfig.queryColumns.some(qItem=>{ |
| | | return qItem.field==item.field |
| | | }) |
| | |
| | | |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList}); |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList,fieldMap:this.referConfig.fieldMap}); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |
| | |
| | | } |
| | | } |
| | | getList(Object.assign(params,this.params,this.query, query),page.currentPage, page.pageSize, this.url).then(res => { |
| | | this.data = res.data.records; |
| | | this.page.total=res.data.total |
| | | this.data = res.data.records || res.data.data.records; |
| | | this.page.total=res.data.total || res.data.data.total; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error=>{ |
| | |
| | | value: this.value, |
| | | text: this.text || '', |
| | | isTreeMuti:this.isMuti, |
| | | rawData: checkedData.checkedNodes |
| | | rawData: checkedData.checkedNodes, |
| | | fieldMap:this.referConfig.fieldMap |
| | | }); |
| | | } |
| | | }, |
| | |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | <originalAdd ref="originalAdd" @refreshTable="refreshChange" :attribute="editAttribute"></originalAdd> |
| | | <infoForm ref="infoForm" @refreshTable="refreshChange" :formData="editAttribute"></infoForm> |
| | | <!-- é«çº§æ¥è¯¢å¯¹è¯æ¡ --> |
| | | <advanced-query |
| | | :ref="advancedQueryParam.ref" |
| | |
| | | |
| | | <script> |
| | | import { |
| | | getList, |
| | | remove, |
| | | add, |
| | | update, getPage, getApplyRange |
| | | } from "@/api/omd/OmdAttribute"; |
| | | getList,add,edit,del,push,updateStatus |
| | | } from "@/api/docking/info"; |
| | | import {getDictionary} from "@/api/omd/enum"; |
| | | import {mapGetters} from "vuex"; |
| | | import infoForm from "./infoForm.vue"; |
| | | |
| | | export default { |
| | | name: "info", |
| | | components:{infoForm}, |
| | | data() { |
| | | return { |
| | | //æ¥å£ç±»å䏿 |
| | | interfaceTypeList: [{ |
| | | label: 'webService', value: 'webService' |
| | | }, { |
| | | label: '类路å¾', value: 'classPath' |
| | | }, { |
| | | label: 'Http', value: 'http' |
| | | }], |
| | | //åæ°ç±»å䏿 |
| | | paramTypeList: [{ |
| | | label: 'xml', value: 'xml' |
| | | }, { |
| | | label: 'Json', value: 'json' |
| | | }], |
| | | //è¿åå¼ç±»å䏿 |
| | | returnTypeList: [{ |
| | | label: 'xml', value: 'xml' |
| | | }, { |
| | | label: 'Json', value: 'json' |
| | | }], |
| | | //æ¨éç±»å |
| | | pushTypeList: [{value: '1', label: 'æ°æ®æ¨é'}, |
| | | {value: '2', label: 'åç±»æ¨é'}, |
| | | {value: '3', label: 'ç¼ç ç³è¯·'}, |
| | | {value: '4', label: 'ç¼ç æ´æ¹ï¼ç¶æãåæ¶ï¼'}, |
| | | {value: '5', label: 'åç±»æ¥è¯¢'}, |
| | | {value: '6', label: 'å«è§åä¿¡æ¯çåç±»æ¥è¯¢'}, |
| | | {value: '7', label: 'æ°æ®æ¥è¯¢'}], |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 100 |
| | | }, |
| | | selectRow: "", |
| | | selectRow: {}, |
| | | data: [], |
| | | form: {}, |
| | | attribute: { |
| | | nullable: true |
| | | }, |
| | | editAttribute: {}, |
| | | applyRangeData: [], |
| | | selectionList: [], |
| | | option: { |
| | | height: "auto", |
| | |
| | | columnBtn: false, |
| | | column: [{ |
| | | label: 'æ¨éç±»å', |
| | | field: 'pushTypeText', |
| | | prop: 'pushType', |
| | | sortable: true, |
| | | width: 150, |
| | | type: 'select', |
| | | dicData: this.pushType, |
| | | props: { |
| | | label: "value", |
| | | value: "key" |
| | | }, |
| | | formatter:function (d){ |
| | | return this.pushTypeList[d.pushType] |
| | | } |
| | | }, { |
| | | label: 'ç³»ç»åç§°', |
| | | prop: 'sysbasename', |
| | | prop: 'sysBaseName', |
| | | sortable: true, |
| | | search: true, |
| | | width: 150 |
| | | }, { |
| | | label: 'ç³»ç»ç¼å·', |
| | | prop: 'sysbaseid', |
| | | prop: 'sysBaseId', |
| | | sortable: true, |
| | | search: true, |
| | | width: 150 |
| | | }, { |
| | | label: 'æ¥å£å½æ°', |
| | |
| | | width: 150 |
| | | }, { |
| | | label: 'å½å空é´', |
| | | prop: 'namespace', |
| | | prop: 'nameSpace', |
| | | sortable: true, |
| | | width: 150 |
| | | }, { |
| | | label: 'soapAction', |
| | | prop: 'soapaction', |
| | | prop: 'soapAction', |
| | | sortable: true, |
| | | width: 150 |
| | | }, { |
| | |
| | | width: 150 |
| | | }, { |
| | | label: '请æ±å°å', |
| | | prop: 'requesturl', |
| | | prop: 'requestUrl', |
| | | sortable: true, |
| | | width: 150 |
| | | }, { |
| | | label: 'åæ°ç±»å', |
| | | prop: 'paramtype', |
| | | prop: 'paramType', |
| | | sortable: true, |
| | | width: 150 |
| | | width: 150, |
| | | formatter:function (d){ |
| | | return this.paramTypeList[d.paramType] |
| | | } |
| | | }, { |
| | | label: 'è¿åå¼ç±»å', |
| | | prop: 'returntype', |
| | | prop: 'returnType', |
| | | sortable: true, |
| | | width: 150 |
| | | width: 150, |
| | | formatter:function (d){ |
| | | return this.returnTypeList[d.returnType] |
| | | } |
| | | }] |
| | | }, |
| | | itemForm: { |
| | | itemData: {}, |
| | | activeName: "referTab", |
| | | enumInitFlag: false, |
| | | referInitFlag: false, |
| | | form: {} |
| | | }, |
| | | pushType: [{key: '1', value: 'æ°æ®æ¨é'}, |
| | | {key: '2', value: 'åç±»æ¨é'}, |
| | | {key: '3', value: 'ç¼ç ç³è¯·'}, |
| | | {key: '4', value: 'ç¼ç æ´æ¹ï¼ç¶æãåæ¶ï¼'}, |
| | | {key: '5', value: 'åç±»æ¥è¯¢'}, |
| | | {key: '6', value: 'å«è§åä¿¡æ¯çåç±»æ¥è¯¢'}, |
| | | {key: '7', value: 'æ°æ®æ¥è¯¢'}], |
| | | // é«çº§æ¥è¯¢å¯¹è¯æ¡ç¸å
³åæ° |
| | | advancedQueryParam: { |
| | | ref: 'advancedQuery', |
| | |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | if(this.selectionList.length <= 0){ |
| | | this.itemForm.itemData = null |
| | | this.selectRow = null |
| | | this.attribute = null |
| | | } |
| | | if (this.selectionList.length > 0) { |
| | | this.itemForm.itemData = this.selectionList[list.length-1]; |
| | | this.selectRow = this.selectionList[list.length-1].$index; |
| | | this.attribute = this.selectionList[list.length-1]; |
| | | } |
| | | }, |
| | | selectionClear() { |
| | |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | addSave() { |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | const newAttr = {}; |
| | | newAttr.nullable = true; |
| | | this.$refs.originalAdd.attribute = newAttr; |
| | | this.$refs.infoForm.showSubmitDialog = true; |
| | | this.$refs.infoForm.formData = { |
| | | dataFlowType:'push', |
| | | pushType:'1', |
| | | sysIntParamVOs:[], |
| | | sysIntHeaderVOs:[] |
| | | }; |
| | | }, |
| | | updateSave(row,index) { |
| | | this.selectRow = index; |
| | | var json = JSON.stringify(row); |
| | | this.editAttribute = JSON.parse(json); |
| | | this.editAttribute.nullable = row.nullable == 'true' ? true : false; |
| | | this.$refs.originalAdd.attribute = this.editAttribute; |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.checkUsingReferDict(row); |
| | | this.$refs.originalAdd.activeName = this.itemForm.activeName; |
| | | this.$refs.originalAdd.enumInitFlag = this.itemForm.enumInitFlag; |
| | | this.$refs.originalAdd.referInitFlag = this.itemForm.referInitFlag; |
| | | // this.refreshChange() |
| | | this.selectRow = row; |
| | | this.editAttribute = row; |
| | | this.editAttribute.sysIntParamVOs = row.sysIntParamVOs||[]; |
| | | this.editAttribute.sysIntHeaderVOs = row.sysIntHeaderVOs||[]; |
| | | this.$refs.infoForm.formData = this.editAttribute; |
| | | this.$refs.infoForm.showSubmitDialog = true; |
| | | }, |
| | | deleteSave(row,index) { |
| | | this.$confirm("å é¤å
æ°æ®å°æ æ³è¢«æ¢å¤, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | this.$confirm("å 餿°æ®å°æ æ³è¢«æ¢å¤, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | iconClass: 'el-icon-question', |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | ENABLE(row,index){ |
| | | //å¯ç¨ |
| | | this.updateStatus("enable"); |
| | | }, |
| | | DISABLE(row,index){ |
| | | //åç¨ |
| | | this.updateStatus("disable"); |
| | | }, |
| | | updateStatus(able){ |
| | | var that = this; |
| | | var paramTemp = { |
| | | update:able, |
| | | oid:this.selectRow.oid, |
| | | ts:this.selectRow.ts |
| | | }; |
| | | this.$confirm("æ¯å¦è¦"+(able == "enbale" ? "å¯ç¨" : (able == "disable" ? "åç¨": "åå¸")) +"è¿æ¡æ°æ®ï¼", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return updateStatus(paramTemp); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message:(able == "enbale" ? "å¯ç¨æå" : (able == "disable" ? "åç¨æå": "å叿å")) |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | PUSH(){ |
| | | if (this.selectionList.length != 1) { |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ°æ®') |
| | | this.$message.error('è¯·éæ©æ°æ®') |
| | | return false; |
| | | } |
| | | this.$confirm("æ¯å¦è¦"+ (this.selectionList[0].pushType == "1" ? "æ¨éæ°æ®" : "æ¨éåç±»"), { |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | getPage(this.page.currentPage, this.page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | getList(this.page.currentPage, this.page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.data = res.data.data.records; |
| | | this.itemData = this.data[0]; |
| | | }); |
| | | }, |
| | | rowClick(row) { |
| | | this.itemForm.itemData = row; |
| | | this.selectRow = row.$index; |
| | | this.attribute = row; |
| | | |
| | | this.selectRow = row; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.$refs.crud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | //this.checkUsingReferDict(row); |
| | | }, |
| | | checkUsingReferDict(row){ |
| | | if (row.referToId !== null && row.referToId !== ""){ |
| | | this.itemForm.activeName = 'referTab'; |
| | | this.itemForm.referInitFlag = true; |
| | | this.itemForm.enumInitFlag = false; |
| | | }else if (row.usingDict === 'true'){ |
| | | this.itemForm.activeName = 'enumTab'; |
| | | this.itemForm.referInitFlag = false; |
| | | this.itemForm.enumInitFlag = true; |
| | | getDictionary({code: row.dictCode}).then(res => { |
| | | this.editAttribute.dictValue = res.data.data[0].label; |
| | | this.itemForm.itemData.dictValue = this.editAttribute.dictValue; |
| | | this.$refs.originalAdd.dictEnums = res.data.data; |
| | | }) |
| | | }else { |
| | | this.itemForm.activeName = 'referTab'; |
| | | this.itemForm.referInitFlag = true; |
| | | this.itemForm.enumInitFlag = false; |
| | | } |
| | | }, |
| | | selectBtmType() { |
| | | this.referType.display = true; |
| | | this.referType.title = "è¯·éæ©" + this.referType.value; |
| | | }, |
| | | applyRangeOpen() { |
| | | if (!this.selectRow && this.selectRow != 0) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message: "请å
鿩屿§" |
| | | }); |
| | | } |
| | | var oid = this.data[this.selectRow].oid; |
| | | getApplyRange(oid).then(res => { |
| | | this.applyRangeData = res.data.data; |
| | | this.$refs.applyRange.rangeData = this.applyRangeData; |
| | | this.$refs.applyRange.showDialog = true; |
| | | |
| | | }); |
| | | }, |
| | | /** é«çº§æ¥è¯¢å¯¹è¯æ¡ç»ä»¶,ç»ä»¶è¿åç弿¯condtionMap[field]å½¢å¼çæ¥è¯¢æ¡ä»¶ï¼ä¿çäºåä¹å䏿 ·çæ¹å¼ */ |
| | | echoSeniorContionMap(conditionMaps){ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | <el-dialog title="ç³»ç»éæåºç¡ä¿¡æ¯" v-dialogDrag :visible.sync="showSubmitDialog" class="avue-dialog avue-dialog--top" append-to-body @close="closeSubmitDialog" width="1000px" |
| | | style="height: 110vh;" top="-5%"> |
| | | <el-form ref="form" :model="formData" show-message="true" inline size="medium" label-suffix=":" |
| | | class="dockingForm" :rules="rules" status-icon="true"> |
| | | <el-form-item label="dataFlowType" prop="dataFlowType"> |
| | | <el-select v-model="formData.dataFlowType" placeholder="è¯·éæ©" @change="dataFlowTypeChange"> |
| | | <el-option v-for="item in dataFlowTypeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="formData.dataFlowType=='push'?'æ¨éç±»å':'æ¥åç±»å'" prop="pushType"> |
| | | <el-select v-model="formData.pushType" placeholder="è¯·éæ©" @change="pushTypeChange"> |
| | | <el-option v-for="item in pushTypeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åæ°ç±»å" prop="paramType"> |
| | | <el-select v-model="formData.paramType" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in paramTypeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è¿åå¼ç±»å" prop="returnType"> |
| | | <el-select v-model="formData.returnType" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in returnTypeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åç±»éæ©" prop="classifyName"> |
| | | <vciWebRefer |
| | | :referConfig="{ |
| | | title: 'åç±»éæ©', |
| | | showField: 'classifyName', |
| | | field: 'classifyOid', |
| | | fieldMap:{'classifyId':'id'}, |
| | | placeholder: 'è¯·éæ©åç±»éæ©', |
| | | options: {isMuti: false, type: 'tree', url: 'api/ubcs-code/codeClassify/treeCodeClassify'}, |
| | | }" |
| | | :value="formData.classifyOid" |
| | | :text="formData.classifyName" |
| | | :disabled="false" |
| | | :display="true" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.dataFlowType=='push'" label="éæç³»ç»" prop="targetSystemName"> |
| | | <vciWebRefer |
| | | :referConfig="{ |
| | | title: 'éæç³»ç»', |
| | | showField: 'targetSystemName', |
| | | field: 'targetSystemOid', |
| | | fieldMap:{'targetSystemId':'id'}, |
| | | placeholder: 'è¯·éæ©', |
| | | options: {isMuti: false, type: 'default', url: 'api/ubcs-code/codeBasicSecController/gridCodeBasicSec'}, |
| | | }" |
| | | :value="formData.targetSystemOid" |
| | | :text="formData.targetSystemName" |
| | | :disabled="false" |
| | | :display="true" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.dataFlowType=='push'" label="ç¼ç ç³»ç»" prop="sourceSystemName"> |
| | | <vciWebRefer |
| | | :referConfig="{ |
| | | title: 'ç¼ç ç³»ç»', |
| | | showField: 'sourceSystemName', |
| | | field: 'sourceSystemOid', |
| | | fieldMap:{'sourceSystemId':'id'}, |
| | | placeholder: 'è¯·éæ©', |
| | | options: {isMuti: false, type: 'default', url: 'api/ubcs-code/codeBasicSecController/gridCodeBasicSec'}, |
| | | }" |
| | | :value="formData.sourceSystemOid" |
| | | :text="formData.sourceSystemName" |
| | | :disabled="false" |
| | | :display="true" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.dataFlowType=='accept'" label="ç¼ç ç³»ç»" prop="targetSystemName"> |
| | | <vciWebRefer |
| | | :referConfig="{ |
| | | title: 'ç¼ç ç³»ç»', |
| | | showField: 'targetSystemName', |
| | | field: 'targetSystemOid', |
| | | fieldMap:{'targetSystemId':'id'}, |
| | | placeholder: 'è¯·éæ©', |
| | | options: {isMuti: false, type: 'default', url: 'api/ubcs-code/codeBasicSecController/gridCodeBasicSec'}, |
| | | }" |
| | | :value="formData.targetSystemOid" |
| | | :text="formData.targetSystemName" |
| | | :disabled="false" |
| | | :display="true" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.dataFlowType=='accept'" label="éæç³»ç»" prop="sourceSystemName"> |
| | | <vciWebRefer |
| | | :referConfig="{ |
| | | title: 'éæç³»ç»', |
| | | showField: 'sourceSystemName', |
| | | field: 'sourceSystemOid', |
| | | fieldMap:{'sourceSystemId':'id'}, |
| | | placeholder: 'è¯·éæ©', |
| | | options: {isMuti: false, type: 'default', url: 'api/ubcs-code/codeBasicSecController/gridCodeBasicSec'}, |
| | | }" |
| | | :value="formData.sourceSystemOid" |
| | | :text="formData.sourceSystemName" |
| | | :disabled="false" |
| | | :display="true" |
| | | @setReferValue="setReferValue" |
| | | ></vciWebRefer> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.pushType=='1'" label="æ¯å¦æ¨ééå¢ç " prop="isGroupCodeFlag"> |
| | | <el-switch v-model="formData.isGroupCodeFlag" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.pushType=='3'" label="æ¯å¦ç³è¯·éå¢ç " prop="isGroupCodeFlag"> |
| | | <el-switch v-model="formData.isGroupCodeFlag" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.pushType=='4'" label="æ¯å¦ç»´æ¤éå¢ç " prop="isGroupCodeFlag"> |
| | | <el-switch v-model="formData.isGroupCodeFlag" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.pushType=='7'" label="æ¯å¦æ¥è¯¢éå¢ç " prop="isGroupCodeFlag"> |
| | | <el-switch v-model="formData.isGroupCodeFlag" ></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="ç³»ç»æè¿°" style="width: 850px;"> |
| | | <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 5}" v-model="formData.description" style="width: 740px;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥å£ç±»å" prop="interfaceType"> |
| | | <el-select v-model="formData.interfaceType" clearable placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in interfaceTypeList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='http'" label="è¯·æ±æ¹å¼" prop="requestMethod"> |
| | | <el-select v-model="formData.requestMethod" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in requestMethodList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='webService' || formData.interfaceType=='http'" label="请æ±å°å" prop="requestUrl"> |
| | | <el-input v-model="formData.requestUrl" type="text"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='webService'" label="æ¥å£å½æ°" prop="interfaceFunction"> |
| | | <el-input v-model="formData.interfaceFunction"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='webService'" label="å½å空é´" prop="nameSpace"> |
| | | <el-input v-model="formData.nameSpace"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='webService'" label="soapAction" prop="soapAction"> |
| | | <el-input v-model="formData.soapAction" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='webService'" label="åæ°åç§°" prop="targName"> |
| | | <el-input v-model="formData.targName" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='webService'" label="cxfaxis" prop="cxfaxis"> |
| | | <el-input v-model="formData.cxfaxis" ></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="formData.interfaceType=='classPath'" label="类路å¾" prop="classPath"> |
| | | <el-input v-model="formData.classPath" ></el-input> |
| | | </el-form-item> |
| | | <el-tabs v-model="activeName" @tab-click="tabClick"> |
| | | <el-tab-pane label="åæ°å¯¹è±¡" name="paramTab"> |
| | | <avue-crud :option="param.option" |
| | | :data="formData.sysIntParamVOs" |
| | | v-model="formData.sysIntParamVOs" |
| | | ref="paramcrud"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-plus" |
| | | @click="handleParamAdd">æ·»å è¡ |
| | | </el-button> |
| | | </template> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="handleParamEditClick(row,index)">ç¼è¾ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" @click="handleParamDel(row,index)">ç§»é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="handleParamEditSave(row,index)"> |
| | | ä¿å |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="header对象" name="headerTab"> |
| | | <avue-crud :option="header.option" |
| | | :data="formData.sysIntHeaderVOs" |
| | | v-model="formData.sysIntHeaderVOs" |
| | | ref="headercrud"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-plus" |
| | | @click="handleHeaderAdd">æ·»å è¡ |
| | | </el-button> |
| | | </template> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" v-if="!row.$cellEdit" @click="handleHeaderEditClick(row,index)">ç¼è¾ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" v-if="!row.$cellEdit" @click="handleHeaderDel(row,index)">ç§»é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-check" size="small" type="text" v-if="row.$cellEdit" @click="handleHeaderEditSave(row,index)"> |
| | | ä¿å |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitAttribute">ç¡®å®</el-button> |
| | | <el-button @click="cancelSubmit">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { validatenull } from "@/util/validate"; |
| | | import { getDictionary, getParentList } from '@/api/omd/enum' |
| | | import {add,edit} from "@/api/docking/info" |
| | | import vciWebRefer from "@/components/refer/vciWebRefer.vue"; |
| | | |
| | | export default { |
| | | name: 'infoForm', |
| | | props: { |
| | | formData: { |
| | | type: Object, |
| | | default:{ |
| | | sysIntParamVOs:[], |
| | | sysIntHeaderVOs:[] |
| | | } |
| | | }, |
| | | }, |
| | | components: { vciWebRefer }, |
| | | data() { |
| | | return { |
| | | showSubmitDialog: false, |
| | | //æ¥å£ç±»å䏿 |
| | | interfaceTypeList: [{ |
| | | label: 'webService', value: 'webService' |
| | | }, { |
| | | label: '类路å¾', value: 'classPath' |
| | | }, { |
| | | label: 'Http', value: 'http' |
| | | }], |
| | | //åæ°ç±»å䏿 |
| | | paramTypeList: [{ |
| | | label: 'xml', value: 'xml' |
| | | }, { |
| | | label: 'Json', value: 'json' |
| | | }], |
| | | //è¿åå¼ç±»å䏿 |
| | | returnTypeList: [{ |
| | | label: 'xml', value: 'xml' |
| | | }, { |
| | | label: 'Json', value: 'json' |
| | | }], |
| | | dataFlowTypeList: [{ |
| | | label: 'push', value: 'push' |
| | | }, { |
| | | label: 'accept', value: 'accept' |
| | | }], |
| | | //æ¨éç±»å |
| | | pushTypeList: [{value: '1', label: 'æ°æ®æ¨é'}, |
| | | {value: '2', label: 'åç±»æ¨é'}], |
| | | //è¯·æ±æ¹å¼ |
| | | requestMethodList: [{key: 'post', value: 'post'}, |
| | | {key: 'get', value: 'get'}, |
| | | {key: 'delete', value: 'delete'}, |
| | | {key: 'put', value: 'put'}], |
| | | // é»è®¤çé¡µç¾ |
| | | activeName: 'paramTab', |
| | | // è¡¨åæ ¡éªè§å |
| | | rules: { |
| | | paramType: [ |
| | | {required: true, message: 'è¯·éæ©åæ°ç±»å', trigger: 'blur'} |
| | | ], |
| | | returnType: [ |
| | | {required: true, message: 'è¯·éæ©è¿åå¼ç±»å', trigger: 'blur'} |
| | | ], |
| | | dataFlowType: [ |
| | | {required: true, message: 'è¯·éæ©', trigger: 'change'} |
| | | ], |
| | | pushType: [ |
| | | {required: true, message: 'è¯·éæ©æ¨éç±»å', trigger: 'blur'} |
| | | ], |
| | | classifyName: [ |
| | | {required: true, message: 'è¯·éæ©', trigger: 'sbumit'} |
| | | ], |
| | | sourceSystemName: [ |
| | | {required: true, message: 'è¯·éæ©', trigger: 'sbumit'} |
| | | ], |
| | | targetSystemName: [ |
| | | {required: true, message: 'è¯·éæ©', trigger: 'sbumit'} |
| | | ], |
| | | classPath: [ |
| | | {required: true, message: '请è¾å
¥ç±»è·¯å¾', trigger: 'blur'} |
| | | ], |
| | | requestMethod: [ |
| | | {required: true, message: 'è¯·éæ©è¯·æ±æ¹å¼', trigger: 'blur'} |
| | | ], |
| | | requestUrl: [ |
| | | {required: true, message: '请è¾å
¥è¯·æ±å°å', trigger: 'blur'} |
| | | ], |
| | | interfaceFunction: [ |
| | | {required: true, message: '请è¾å
¥æ¥å£å½æ°', trigger: 'blur'} |
| | | ], |
| | | nameSpace: [ |
| | | {required: true, message: '请è¾å
¥å½å空é´', trigger: 'blur'} |
| | | ], |
| | | soapAction: [ |
| | | {required: true, message: '请è¾å
¥soapAction', trigger: 'blur'} |
| | | ], |
| | | targName: [ |
| | | {required: true, message: '请è¾å
¥åæ°åç§°', trigger: 'blur'} |
| | | ], |
| | | cxfaxis: [ |
| | | {required: true, message: '请è¾å
¥cxfaxis', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | // è¡¨æ ¼é
ç½® |
| | | param: { |
| | | option: { |
| | | height: 200, |
| | | index: true, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | border: true, |
| | | menuWidth: 150, |
| | | searchShowBtn: false, |
| | | align: 'center', |
| | | column: [{ |
| | | label: 'åæ°å', |
| | | prop: 'paramKey', |
| | | cell: true |
| | | }, { |
| | | label: 'åæ°å¼', |
| | | prop: 'paramValue', |
| | | cell: true |
| | | }, { |
| | | label: 'æ¯å¦ä½¿ç¨', |
| | | prop: 'usedFlag', |
| | | formatter: function (row, column) { |
| | | return row.usedFlag == 'true' || row.usedFlag == '1' ? 'æ¯' : 'å¦' |
| | | }, |
| | | width: 150, |
| | | type: 'switch', |
| | | cell: true |
| | | }] |
| | | }, |
| | | selectRow: {} |
| | | }, |
| | | // æä¸¾åç
§è¡¨æ ¼é
ç½® |
| | | header: { |
| | | option: { |
| | | height: 200, |
| | | index: true, |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | border: true, |
| | | menuWidth: 150, |
| | | searchShowBtn: false, |
| | | align: 'center', |
| | | column: [{ |
| | | label: '头忰åç§°', |
| | | prop: 'headerKey', |
| | | cell: true |
| | | }, { |
| | | label: '头忰å¼', |
| | | prop: 'headerValue', |
| | | cell: true |
| | | }, { |
| | | label: 'æ¯å¦ä½¿ç¨', |
| | | prop: 'usedFlag', |
| | | formatter: function (row, column) { |
| | | return row.usedFlag == 'true' || row.usedFlag == '1' ? 'æ¯' : 'å¦' |
| | | }, |
| | | width: 150, |
| | | type: 'switch', |
| | | cell: true |
| | | }], |
| | | // éå®è¡ |
| | | selectRow: '' |
| | | }, |
| | | dictEnums: [] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | //this.geDictData('interfaceType', this.interfaceTypeList) |
| | | }, |
| | | mounted(){ |
| | | if (!this.formData.sysIntParamVOs) { |
| | | this.formData.sysIntParamVOs = []; |
| | | } |
| | | if (!this.formData.sysIntHeaderVOs) { |
| | | this.formData.sysIntHeaderVOs = []; |
| | | } |
| | | if(this.formData.dataFlowType=='accept'){ |
| | | this.pushTypeList=[ |
| | | {value: '3', label: 'ç¼ç ç³è¯·'}, |
| | | {value: '4', label: 'ç¼ç æ´æ¹ï¼ç¶æãåæ¶ï¼'}, |
| | | {value: '5', label: 'åç±»æ¥è¯¢'}, |
| | | {value: '6', label: 'å«è§åä¿¡æ¯çåç±»æ¥è¯¢'}, |
| | | {value: '7', label: 'æ°æ®æ¥è¯¢'}] |
| | | this.formData.pushType='' |
| | | }else { |
| | | this.pushTypeList=[{value: '1', label: 'æ°æ®æ¨é'}, |
| | | {value: '2', label: 'åç±»æ¨é'}] |
| | | this.formData.pushType='1' |
| | | } |
| | | }, |
| | | methods: { |
| | | closeSubmitDialog() { |
| | | this.resetForm(); |
| | | this.showSubmitDialog = false; |
| | | }, |
| | | resetForm() { |
| | | this.formData = { |
| | | sysIntParamVOs: [], |
| | | sysIntHeaderVOs: [] |
| | | }; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | setReferValue(data) { |
| | | if (data.field) { |
| | | this.formData[data.field] = data.value || ""; |
| | | this.formData[data.showField] = data.text || ""; |
| | | } |
| | | if (data.fieldMap) { |
| | | //说æéè¦æ å° |
| | | for (let key in data.fieldMap) { |
| | | let mapFields = data.fieldMap[key].split(","); |
| | | let value = []; |
| | | data.rawData.forEach(_item => { |
| | | var temp; |
| | | if (!_item.attributes) { |
| | | _item.attributes = _item; |
| | | } |
| | | if (mapFields.length == 1) { |
| | | var mapField = mapFields[0]; |
| | | if (mapField.indexOf("attribute.") > -1) { |
| | | temp = _item['attributes'][mapField.subString("attribute.".length)]; |
| | | } else { |
| | | temp = _item['attributes'][mapField] || _item[mapField]; |
| | | } |
| | | } else { |
| | | //æå¤ä¸ª |
| | | var mutiTemp = []; |
| | | layui.each(mapFields, function (_indexField, _itemField) { |
| | | if (_itemField.indexOf("attribute.") > -1) { |
| | | mutiTemp.push(_item['attributes'][_itemField.subString("attribute.".length)]); |
| | | } else { |
| | | mutiTemp.push(_item['attributes'][_itemField] || _item[_itemField]); |
| | | } |
| | | }); |
| | | temp = mutiTemp.join(' '); |
| | | } |
| | | if (temp != null && temp != '') { |
| | | value.push(temp); |
| | | } |
| | | }) |
| | | this.formData[key] = value.join(','); |
| | | } |
| | | } |
| | | }, |
| | | submitAttribute() { |
| | | const that = this; |
| | | let pass=true |
| | | if(validatenull(this.formData.classifyName)||validatenull(this.formData.sourceSystemName)||validatenull(this.formData.targetSystemName)){ |
| | | that.$message.error('å¿
填项ä¸è½ä¸ºç©º'); |
| | | pass=false |
| | | return; |
| | | } |
| | | this.$refs.form.validateField(['paramType','returnType','dataFlowType','pushType','classPath','requestMethod','requestUrl', |
| | | 'interfaceFunction','nameSpace','soapAction','targName','cxfaxis'],function (errormsg, field) { |
| | | if (errormsg) { |
| | | pass=false |
| | | } |
| | | }) |
| | | this.$nextTick(function (){ |
| | | if(pass){ |
| | | that.formData.sysIntParamDTOs=this.formData.sysIntParamVOs.map(item=>{ |
| | | return { |
| | | ...item, |
| | | ordernNo:item.$index |
| | | } |
| | | }) |
| | | that.formData.sysIntHeaderDTOS=this.formData.sysIntHeaderVOs.map(item=>{ |
| | | return { |
| | | ...item, |
| | | ordernNo:item.$index |
| | | } |
| | | }) |
| | | add(that.formData).then(res => { |
| | | that.$message.success("ä¿åæå"); |
| | | that.showSubmitDialog = false; |
| | | this.formData = { |
| | | sysIntParamVOs: [], |
| | | sysIntHeaderVOs: [] |
| | | }; |
| | | that.$emit('refreshTable'); |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | cancelSubmit() { |
| | | this.closeSubmitDialog(); |
| | | }, |
| | | // 弿¥è·ååå
¸æ°æ® |
| | | geDictData(dictKey, list) { |
| | | getDictionary({code: dictKey}).then((res) => { |
| | | if (res.data && res.data.code === 200) { |
| | | let dictData = (res.data.data || []).map((itm) => { |
| | | itm.value = itm.dictValue; |
| | | itm.key = itm.dictKey; |
| | | return itm; |
| | | }); |
| | | list = dictData; |
| | | } |
| | | }); |
| | | }, |
| | | dataFlowTypeChange(value){ |
| | | if(value=='push'){ |
| | | this.pushTypeList=[{value: '1', label: 'æ°æ®æ¨é'}, |
| | | {value: '2', label: 'åç±»æ¨é'}] |
| | | this.formData.pushType='æ°æ®æ¨é' |
| | | }else if(value=='accept'){ |
| | | this.pushTypeList=[ |
| | | {value: '3', label: 'ç¼ç ç³è¯·'}, |
| | | {value: '4', label: 'ç¼ç æ´æ¹ï¼ç¶æãåæ¶ï¼'}, |
| | | {value: '5', label: 'åç±»æ¥è¯¢'}, |
| | | {value: '6', label: 'å«è§åä¿¡æ¯çåç±»æ¥è¯¢'}, |
| | | {value: '7', label: 'æ°æ®æ¥è¯¢'}] |
| | | this.formData.pushType='' |
| | | }else{ |
| | | this.pushTypeList=[]; |
| | | } |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | pushTypeChange(value){ |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | tabClick(tab) { |
| | | if (tab.name === 'paramTab') { |
| | | this.$nextTick(function (){ |
| | | this.$refs.paramcrud.doLayout() |
| | | }) |
| | | } else { |
| | | this.$nextTick(function (){ |
| | | this.$refs.headercrud.doLayout() |
| | | }) |
| | | } |
| | | }, |
| | | handleParamAdd() { |
| | | this.formData.sysIntParamVOs.push({ |
| | | usedFlag: true, |
| | | $cellEdit:true |
| | | }) |
| | | this.$nextTick(function (){ |
| | | this.$refs.paramcrud.doLayout() |
| | | }) |
| | | }, |
| | | handleParamEditClick(row){ |
| | | row.$cellEdit = true; |
| | | }, |
| | | handleParamDel(row,index){ |
| | | this.formData.sysIntParamVOs.splice(index, 1); |
| | | }, |
| | | // å表ç¼è¾ä¿å |
| | | handleParamEditSave(row,index) { |
| | | row.$cellEdit = false; |
| | | }, |
| | | handleHeaderAdd() { |
| | | this.formData.sysIntHeaderVOs.push({ |
| | | usedFlag: true, |
| | | $cellEdit:true |
| | | }) |
| | | this.$nextTick(function (){ |
| | | this.$refs.headercrud.doLayout() |
| | | }) |
| | | }, |
| | | handleHeaderEditClick(row){ |
| | | row.$cellEdit = true; |
| | | }, |
| | | handleHeaderDel(row,index){ |
| | | this.formData.sysIntHeaderVOs.splice(index, 1); |
| | | }, |
| | | // å表ç¼è¾ä¿å |
| | | handleHeaderEditSave(row,index) { |
| | | row.$cellEdit = false; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .btmTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .enumTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .dockingForm .el-form-item__label{width: 130px;} |
| | | .dockingForm .el-form-item__content,.dockingForm .el-form-item__content .el-input>.el-input__inner,.dockingForm .el-input-number--medium { |
| | | width: 300px !important; |
| | | } |
| | | .dockingForm .cell .el-form-item__content,.dockingForm .cell .el-form-item__content .el-input>.el-input__inner{ |
| | | width :100% !important; |
| | | } |
| | | </style> |
| | |
| | | update(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | message: "æä½æå1!" |
| | | }); |
| | | // æ°æ®åè°è¿è¡å·æ° |
| | | this.onLoad() |
| | | done(row); |
| | | }, error => { |
| | | window.console.log(error); |
| | |
| | | // target: 'http://127.0.0.1', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | target: 'http://192.168.1.16:37000', |
| | | // target: 'http://192.168.1.16:37000', |
| | | // target: 'http://192.168.0.105:37000', |
| | | target: 'http://192.168.43.251:37000', |
| | | // target: 'http://192.168.0.103:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | | // target: 'http://192.168.3.7:37000', |
| | |
| | | */ |
| | | private List<CodeOrderSecDTO> secDTOList; |
| | | |
| | | |
| | | /** |
| | | * æå¤§æµæ°´å· |
| | | */ |
| | | private int maxSecNum; |
| | | |
| | | public String getCodeClassifyOid() { |
| | | return codeClassifyOid; |
| | | } |
| | |
| | | this.editInProcess = editInProcess; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CodeOrderDTO{" + |
| | | "codeClassifyOid='" + codeClassifyOid + '\'' + |
| | | ", templateOid='" + templateOid + '\'' + |
| | | ", codeRuleOid='" + codeRuleOid + '\'' + |
| | | ", editInProcess=" + editInProcess + |
| | | ", secDTOList=" + secDTOList + |
| | | "} " + super.toString(); |
| | | } |
| | | public int getMaxSecNum() { |
| | | return maxSecNum; |
| | | } |
| | | |
| | | public void setMaxSecNum(int maxSecNum) { |
| | | this.maxSecNum = maxSecNum; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CodeOrderDTO{" + |
| | | "codeClassifyOid='" + codeClassifyOid + '\'' + |
| | | ", templateOid='" + templateOid + '\'' + |
| | | ", codeRuleOid='" + codeRuleOid + '\'' + |
| | | ", editInProcess=" + editInProcess + |
| | | ", secDTOList=" + secDTOList + |
| | | ", maxSecNum=" + maxSecNum + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.dto.CodeBasicSecDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeRuleDTO; |
| | | import com.vci.ubcs.code.entity.CodeBasicSec; |
| | | import com.vci.ubcs.code.service.ICodeBasicSecService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeBasicSecVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.code.wrapper.CodeBasicSecWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | |
| | | return R.status(codeBasicSecService.downOrderNum(oid)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¼ç è§åçæææµæ°´ä¾èµçç æ®µ |
| | | * @param ruleOid ç¼ç è§åä¸»é® |
| | | * @return |
| | | */ |
| | | @GetMapping("/getCodeRuleAndBasicSecByRuleOid") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "æ¥è¯¢ç¼ç è§åçæææµæ°´ä¾èµçç æ®µ", notes = "ä¼ å
¥oid") |
| | | public R<CodeRuleVO> getCodeRuleAndBasicSecByRuleOid(String ruleOid){ |
| | | return R.data(codeBasicSecService.getSerialNumberDepend(ruleOid)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置æå¤§æµæ°´å· |
| | | * @param codeOrderDTO ç¼ç ç³è¯·ä¼ è¾å¯¹è±¡ |
| | | * @return |
| | | */ |
| | | @PostMapping("/setMaxSerialNumberForCodeRule") |
| | | @ApiOperationSupport(order = 14) |
| | | @ApiOperation(value = "设置æå¤§æµæ°´å·", notes = "codeOrderDTO") |
| | | public R setMaxSerialNumberForCodeRule(@RequestBody CodeOrderDTO codeOrderDTO){ |
| | | return R.success(codeBasicSecService.setMaxSerialNumberForCodeRule(codeOrderDTO)); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.code.dto.CodeBasicSecDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeRuleDTO; |
| | | import com.vci.ubcs.code.entity.CodeBasicSec; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeBasicSecVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | * @throws VciBaseException æ·è´å±æ§åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | CodeBasicSecVO codeBasicSecDO2VO(CodeBasicSec codeBasicSecDO) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¹æ®ç¼ç è§å主é®è·åç¼ç ä¸çæµæ°´ä¾èµç 段 |
| | | * @param oid ç¼ç è§åä¸»é® |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | CodeRuleVO getSerialNumberDepend(String oid) throws VciBaseException; |
| | | |
| | | /** |
| | | * 设置æå¤§æµæ°´å· |
| | | * @param codeOrderDTO ç¼ç ç³è¯·ä¼ è¾å¯¹è±¡ |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | String setMaxSerialNumberForCodeRule(CodeOrderDTO codeOrderDTO) throws VciBaseException; |
| | | } |
| | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | |
| | | import com.vci.ubcs.code.dto.CodeBasicSecDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderSecDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.enumpack.*; |
| | | import com.vci.ubcs.code.lifecycle.CodeRuleLC; |
| | | import com.vci.ubcs.code.mapper.CodeBasicSecMapper; |
| | | import com.vci.ubcs.code.mapper.CodeClassifyValueMapper; |
| | | import com.vci.ubcs.code.mapper.CodeFixedValueMapper; |
| | | import com.vci.ubcs.code.mapper.CodeSerialValueMapper; |
| | | import com.vci.ubcs.code.service.*; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | import com.vci.ubcs.starter.enumpack.CodeTableNameEnum; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.MdmBtmTypeConstant; |
| | |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import com.vci.ubcs.system.entity.DictBiz; |
| | | import com.vci.ubcs.system.feign.IDictBizClient; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.*; |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.EMPTY_SERIAL_UNIT; |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.SERIAL_UNIT_SPACE; |
| | | |
| | | /** |
| | | * ç æ®µåºç¡ä¿¡æ¯æå¡æ¥å£ |
| | |
| | | */ |
| | | @Resource |
| | | private ICodeFixedValueService fixedValueService; |
| | | |
| | | /** |
| | | * æµæ°´å·çç¸å
³çä¿¡æ¯ |
| | | */ |
| | | @Resource |
| | | private CodeSerialValueMapper serialValueMapper; |
| | | |
| | | /** |
| | | * ä¸å±åç±»ç æ®µç屿§åç§° |
| | |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(codeBasicSecDO); |
| | | boolean status = codeRuleService.checkEditDelStatus(codeRuleService.getObjectByOid(codeBasicSecDO.getPkCodeRule()).getLcStatus()); |
| | | boolean resBoolean; |
| | | CodeReferConfigVO codeReferConfigVO = null; |
| | | if (!status){ |
| | | //è¿åéè¯¯ä¿¡æ¯ |
| | | throw new VciBaseException("ç¼ç è§åä¸å
许ç¼è¾æå é¤ï¼"); |
| | |
| | | && StringUtils.isBlank(codeBasicSecDO.getCodeFillSeparator())){ |
| | | throw new VciBaseException("å½è¡¥ä½æ¹å¼ä¸ºå·¦è¡¥ä½æè
å³è¡¥ä½çæ¶åï¼è¡¥ä½å符ä¸è½ä¸ºç©º"); |
| | | } |
| | | CodeReferConfigVO codeReferConfigVO = null; |
| | | //å¼ç¨ç æ®µçæ¶åï¼éè¦å¤æåç
§çä¿¡æ¯æ¯å¦æ£ç¡® |
| | | if(CodeSecTypeEnum.CODE_REFER_SEC.getValue().equalsIgnoreCase(codeBasicSecDO.getSecType())){ |
| | | if(StringUtils.isBlank(codeBasicSecDO.getReferConfig())){ |
| | |
| | | codeReferConfigService.insert(codeReferConfigVO); |
| | | } |
| | | } |
| | | revisionModelUtil.copyFromDTOIgnore(codeBasicSecDTO, codeBasicSecDO); |
| | | |
| | | // revisionModelUtil.copyFromDTOIgnore(codeBasicSecDTO, codeBasicSecDO);//æ¤å¤çæ·è´ä¼æreferValueInfoçå¼ç»è¦çæï¼éè¦éæ°èµå¼ |
| | | BaseModel tempModel = new BaseModel(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeBasicSecDO, tempModel); |
| | | BeanUtil.copyProperties(codeBasicSecDTO, codeBasicSecDO,"referValueInfo"); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(tempModel, codeBasicSecDO); |
| | | codeBasicSecDO.setId(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField("id", codeBasicSecDTO))); |
| | | codeBasicSecDO.setName(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField("name", codeBasicSecDTO))); |
| | | codeBasicSecDO.setDescription(VciBaseUtil.getStringValueFromObject(VciBaseUtil.getValueFromField("description", codeBasicSecDTO))); |
| | | |
| | | resBoolean = codeBasicSecMapper.updateById(codeBasicSecDO)>0; |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | if(StringUtils.isNotBlank(codeBasicSecDO.getCodeFillSeparator())){ |
| | |
| | | return codeBasicSecVO; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¼ç è§å主é®è·åç¼ç ä¸çæµæ°´ä¾èµç 段 |
| | | * |
| | | * @param oid ç¼ç è§åä¸»é® |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public CodeRuleVO getSerialNumberDepend(String oid) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(oid,"ç¼ç è§å主é®"); |
| | | CodeRuleVO codeRuleVO = codeRuleService.getObjectByOid(oid); |
| | | if (codeRuleVO != null) { |
| | | //妿ælcstatusçç±»çè¯ |
| | | codeRuleVO.setLcStatusText(CodeRuleLC.getTextByValue(codeRuleVO.getLcStatus())); |
| | | |
| | | LambdaQueryWrapper<CodeBasicSec> wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule, codeRuleVO.getOid()) |
| | | .eq(CodeBasicSec::getSecType,CodeSecTypeEnum.CODE_SERIAL_SEC.getValue()); |
| | | CodeBasicSec codeBasicSec = this.getOne(wrapper); |
| | | if(codeBasicSec != null && VciBaseUtil.isNotNull(codeBasicSec.getOid())){ |
| | | wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleVO.getOid()) |
| | | .eq(CodeBasicSec::getSerialDependFlag,"true") |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | List<CodeBasicSec> codeBasicSecList = this.list(wrapper); |
| | | if(!CollectionUtils.isEmpty(codeBasicSecList)){ |
| | | List<CodeBasicSecVO> codeBasicSecVOS = codeBasicSecDO2VOs(codeBasicSecList); |
| | | //æ¥è¯¢åºå®ç çç å¼ |
| | | Map<String, List<CodeFixedValueVO>> secValueMap = fixedValueService.listCodeFixedValueBySecOids(codeBasicSecList.stream().map(CodeBasicSec::getOid).collect(Collectors.toList())); |
| | | codeBasicSecVOS.stream().forEach(vo->{ |
| | | vo.setFixedValueVOList(secValueMap.getOrDefault(vo.getOid(),null)); |
| | | }); |
| | | codeRuleVO.setSecVOList(codeBasicSecVOS); |
| | | } |
| | | }else{ |
| | | throw new VciBaseException(codeRuleVO.getName()+"ç¼ç è§å䏿 æµæ°´ç æ®µï¼æ æ³è®¾ç½®æå¤§æµæ°´å·ï¼"); |
| | | } |
| | | } |
| | | return codeRuleVO; |
| | | } |
| | | |
| | | /** |
| | | * 设置æå¤§æµæ°´å· |
| | | * |
| | | * @param codeOrderDTO ç¼ç ç³è¯·ä¼ è¾å¯¹è±¡ |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public String setMaxSerialNumberForCodeRule(CodeOrderDTO codeOrderDTO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(codeOrderDTO.getCodeRuleOid(),"ç¼ç è§å主é®",codeOrderDTO.getMaxSecNum(),"æå¤§æµæ°´å·"); |
| | | List<CodeOrderSecDTO> codeOrderSecDTOList = codeOrderDTO.getSecDTOList(); |
| | | if(CollectionUtils.isEmpty(codeOrderSecDTOList)){ |
| | | throw new VciBaseException("æå¤§æµæ°´å·çæµæ°´ä¾èµä¸è½ä¸ºç©ºï¼"); |
| | | } |
| | | |
| | | String codeRuleOid = codeOrderDTO.getCodeRuleOid(); |
| | | int maxSecNum = codeOrderDTO.getMaxSecNum(); |
| | | |
| | | Map<String/**ç æ®µä¸»é®*/,CodeOrderSecDTO/**ç æ®µç¸å
³ä¿¡æ¯*/> codeOrderSecDTOMap = codeOrderSecDTOList.stream().collect(Collectors.toMap(s -> s.getSecOid(), t -> t)); |
| | | List<String> codeBasicSecOidList = codeOrderSecDTOList.stream().map(s->s.getSecOid()).collect(Collectors.toList());//æµæ°´ä¾èµç 段ç主é®éå |
| | | |
| | | //è·åæµæ°´ä¾èµç 段 |
| | | LambdaQueryWrapper<CodeBasicSec> wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleOid) |
| | | .in(CodeBasicSec::getOid,codeBasicSecOidList) |
| | | .eq(CodeBasicSec::getSerialDependFlag,"true") |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | List<CodeBasicSec> codeBasicSecList = this.list(wrapper); |
| | | |
| | | //ææµæ°´ä¾èµé¡ºåºï¼å¤çæµæ°´ä¾èµç 段çå¼ |
| | | List<String> serialDependValueList = new ArrayList<>(); |
| | | codeBasicSecList.stream().forEach(s->{ |
| | | CodeOrderSecDTO codeOrderSecDTO = codeOrderSecDTOMap.get(s.getOid()); |
| | | String serialDependValue = codeOrderSecDTO.getSecValue(); |
| | | if(s.getSecType().equals(CodeSecTypeEnum.CODE_DATE_SEC.getValue())){ |
| | | try { |
| | | Date date = VciDateUtil.str2Date(codeOrderSecDTO.getSecValue(),s.getCodeDateFormatStr()); |
| | | serialDependValue = VciDateUtil.date2Str(date,s.getCodeDateFormatStr()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | serialDependValueList.add(serialDependValue); |
| | | }); |
| | | |
| | | //è·åæµæ°´ç 段 |
| | | wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleOid) |
| | | .eq(CodeBasicSec::getSecType,CodeSecTypeEnum.CODE_SERIAL_SEC.getValue()) |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | CodeBasicSec codeBasicSec = this.getOne(wrapper); |
| | | |
| | | //æ ¹æ®ç¼ç è§ååæµæ°´ä¾èµï¼è·åæå¤§æµæ°´å· |
| | | String serialUnitString = serialDependValueList.size() == 0 ? EMPTY_SERIAL_UNIT : serialDependValueList.stream().collect(Collectors.joining(SERIAL_UNIT_SPACE)); |
| | | LambdaQueryWrapper<CodeSerialValue> codeSerialWrapper = new LambdaQueryWrapper<>(); |
| | | codeSerialWrapper.eq(CodeSerialValue::getCodeRuleOid, codeRuleOid); |
| | | codeSerialWrapper.eq(CodeSerialValue::getSerialUnit, serialUnitString); |
| | | codeSerialWrapper.eq(CodeSerialValue::getCodeSecOid,codeBasicSec.getOid()); |
| | | codeSerialWrapper.orderByDesc(CodeSerialValue::getCreateTime); |
| | | List<CodeSerialValue> codeSerialValueList = serialValueMapper.selectList(codeSerialWrapper); |
| | | |
| | | //妿æå¤§æµæ°´å·ä¸ä¸ºç©ºï¼è¯´æå·²ææå¥½æµæ°´å·ï¼æ´æ°æå¤§æµæ°´å· |
| | | if(!CollectionUtils.isEmpty(codeSerialValueList)){ |
| | | CodeSerialValue codeSerialValue = codeSerialValueList.get(0); |
| | | int maxSerial = Double.valueOf(codeSerialValue.getMaxSerial()).intValue(); |
| | | //å·²æçæå¤§æµæ°´å·ï¼å°äºè®¾ç½®çæå¤§æµæ°´å·ï¼æ´æ°æå¤§æµæ°´å· |
| | | if(maxSerial < maxSecNum){ |
| | | codeSerialValue.setMaxSerial(String.valueOf(maxSecNum)); |
| | | serialValueMapper.updateById(codeSerialValue); |
| | | }else{ |
| | | maxSecNum = maxSerial; |
| | | } |
| | | }else{ |
| | | //妿æå¤§æµæ°´å·ä¸ä¸ºç©ºï¼è¯´ææ æå¥½æµæ°´å·ï¼æ°å¢æå¤§æµæ°´å· |
| | | CodeSerialValue codeSerialValue = new CodeSerialValue(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(codeSerialValue, MdmBtmTypeConstant.CODE_SERIAL_VALUE); |
| | | codeSerialValue.setCodeRuleOid(codeRuleOid); |
| | | codeSerialValue.setSerialUnit(serialUnitString); |
| | | codeSerialValue.setCodeSecOid(codeBasicSec.getOid()); |
| | | codeSerialValue.setMaxSerial(String.valueOf(maxSecNum)); |
| | | serialValueMapper.insert(codeSerialValue); |
| | | } |
| | | return String.valueOf(maxSecNum); |
| | | } |
| | | } |
| | |
| | | CodeSerialValue serialValueDO = serialValueDOS.get(0); |
| | | if(VciBaseUtil.getDouble(serialValueDO.getMaxSerial())<maxSerial){ |
| | | serialValueDO.setMaxSerial(String.valueOf(maxSerial)); |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(serialValueDO); |
| | | editSerialValueList.add(serialValueDO); |
| | | } |
| | | }else{ |
| | | //没æ |
| | | CodeSerialValue serialValueDO = new CodeSerialValue(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(serialValueDO, MdmBtmTypeConstant.CODE_SERIAL_VALUE); |
| | | serialValueDO.setCodeRuleOid(ruleVO.getOid()); |
| | | serialValueDO.setSerialUnit(serialUnit); |
| | | serialValueDO.setCodeSecOid(secOid); |
| | |
| | | BaseModel cbo, CodeClassifyTemplateVO templateVO, |
| | | List<CodeAllCode> allCodeDOList, String serialUnitString, String serialValueString){ |
| | | CodeAllCode allCodeDO = new CodeAllCode(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCodeDO, MdmBtmTypeConstant.CODE_ALL_CODE); |
| | | allCodeDO.setCodeClassifyOid(classifyFullInfoBO.getCurrentClassifyVO().getOid()); |
| | | allCodeDO.setCodeRuleOid(ruleVO.getOid()); |
| | | allCodeDO.setId(cbo.getId()); |
| | |
| | | //è¯´ææ |
| | | serialValueDO = maxSerialValueMap.get(secOid).get(unit); |
| | | serialValueDO.setMaxSerial(maxSerial.toString()); |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(serialValueDO); |
| | | editSerialValueDOList.add(serialValueDO); |
| | | }else{ |
| | | serialValueDO = new CodeSerialValue(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(serialValueDO, MdmBtmTypeConstant.CODE_SERIAL_VALUE); |
| | | serialValueDO.setCodeRuleOid(ruleVO.getOid()); |
| | | serialValueDO.setSerialUnit(unit); |
| | | serialValueDO.setCodeSecOid(secOid); |