Merge remote-tracking branch 'origin/master'
| | |
| | | "test:e2e": "vue-cli-service test:e2e" |
| | | }, |
| | | "dependencies": { |
| | | "avue-plugin-ueditor": "^0.1.4", |
| | | "axios": "^0.18.0", |
| | | "babel-polyfill": "^6.26.0", |
| | | "classlist-polyfill": "^1.2.0", |
| | | "crypto-js": "^4.1.1", |
| | | "avue-plugin-ueditor": "0.1.4", |
| | | "axios": "0.18.0", |
| | | "babel-polyfill": "6.26.0", |
| | | "classlist-polyfill": "1.2.0", |
| | | "crypto-js": "4.1.1", |
| | | "echarts": "4.9.0", |
| | | "element-ui": "^2.15.6", |
| | | "instead": "^1.0.3", |
| | | "js-base64": "^2.5.1", |
| | | "js-cookie": "^2.2.0", |
| | | "js-md5": "^0.7.3", |
| | | "js-pinyin": "^0.2.4", |
| | | "mockjs": "^1.0.1-beta3", |
| | | "moment": "^2.29.4", |
| | | "node-gyp": "^4.0.0", |
| | | "nprogress": "^0.2.0", |
| | | "portfinder": "^1.0.23", |
| | | "save": "^2.9.0", |
| | | "script-loader": "^0.7.2", |
| | | "vue": "^2.6.10", |
| | | "vue-axios": "^2.1.2", |
| | | "vue-clipboard2": "^0.3.3", |
| | | "element-ui": "2.15.6", |
| | | "instead": "1.0.3", |
| | | "js-base64": "2.5.1", |
| | | "js-cookie": "2.2.0", |
| | | "js-md5": "0.7.3", |
| | | "js-pinyin": "0.2.4", |
| | | "mockjs": "1.0.1-beta3", |
| | | "moment": "2.29.4", |
| | | "node-gyp": "4.0.0", |
| | | "nprogress": "0.2.0", |
| | | "portfinder": "1.0.23", |
| | | "save": "2.9.0", |
| | | "script-loader": "0.7.2", |
| | | "vue": "2.6.10", |
| | | "vue-axios": "2.1.2", |
| | | "vue-clipboard2": "0.3.3", |
| | | "vue-echarts": "5.0.0-beta.0", |
| | | "vue-flowchart-editor": "^1.0.2", |
| | | "vue-i18n": "^8.7.0", |
| | | "vue-router": "^3.0.1", |
| | | "vuex": "^3.1.1" |
| | | "vue-flowchart-editor": "1.0.2", |
| | | "vue-i18n": "8.7.0", |
| | | "vue-router": "3.0.1", |
| | | "vuex": "3.1.1" |
| | | }, |
| | | "devDependencies": { |
| | | "@vue/cli-plugin-babel": "^3.1.1", |
| | | "@vue/cli-plugin-eslint": "^3.1.5", |
| | | "@vue/cli-service": "^3.1.4", |
| | | "@vue/composition-api": "^1.7.2", |
| | | "chai": "^4.1.2", |
| | | "node-sass": "^6.0.1", |
| | | "sass-loader": "^10.0.5", |
| | | "vue-template-compiler": "^2.5.17", |
| | | "webpack-bundle-analyzer": "^3.0.3" |
| | | "@vue/cli-plugin-babel": "3.1.1", |
| | | "@vue/cli-plugin-eslint": "3.1.5", |
| | | "@vue/cli-service": "3.1.4", |
| | | "@vue/composition-api": "1.7.2", |
| | | "chai": "4.1.2", |
| | | "node-sass": "6.0.1", |
| | | "sass-loader": "10.0.5", |
| | | "vue-template-compiler": "2.5.17", |
| | | "webpack-bundle-analyzer": "3.0.3" |
| | | }, |
| | | "lint-staged": { |
| | | "*.js": [ |
| | |
| | | // 表åç±»åï¼add, edit, detailï¼ |
| | | type: { |
| | | type: String, |
| | | default: "", |
| | | default: "add", |
| | | }, |
| | | // èªå®ä¹è¡¨åç±»å |
| | | selfColumnType: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | //å¹´ä»£å· |
| | | dataYearValue:null, |
| | | filteredObject: {}, |
| | | filteredArray: [], |
| | | isSeriesType: {}, |
| | |
| | | // 表å屿§ |
| | | attributes: [], |
| | | slotColumnList: [], |
| | | isShow:null, |
| | | isShow: "", |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | immediate: true, |
| | | handler(newV) { |
| | | this.$emit("getFormData", newV); |
| | | // console.log("filteredObject",this.filteredObject) |
| | | if (this.filteredObject.label === "ç³»åå·") { |
| | | if (newV.isSeries === "false") { |
| | | this.filteredObject.disabled = true; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | attrList: { |
| | |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.$emit("attrList", newVal) |
| | | } |
| | | } |
| | | }, |
| | | isSeriesType: { |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.$emit("isSeriesType", newVal) |
| | | } |
| | | } |
| | | }, |
| | |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | isShow: { |
| | | handler(newV) { |
| | | this.$emit("isShow", newV) |
| | | } |
| | | }, |
| | | dataYearValue:{ |
| | | handler(newV){ |
| | | if(newV){ |
| | | this.$emit("dataYearValue",newV) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // 渲æè¡¨åæ¨¡æ¿ |
| | | templateRender(formItemList, TreeValue) { |
| | | // debugger |
| | | if (this.eventList) { |
| | | this.eventFlag = this.eventList.some(item => { |
| | | if (item.classifyInvokeEditFlag === 'true') { |
| | |
| | | let dictKeys = []; |
| | | let slotColumnList = []; |
| | | formItemList.forEach((formItem) => { |
| | | console.log('formItem',formItem); |
| | | formItem = this.resetFormConfig(formItem); |
| | | //屿§ç 段è§å |
| | | if (formItem.secType === "codeattrsec") { |
| | | this.attrList.push(formItem); |
| | | } |
| | | //ç³»åå·è§å |
| | | if (formItem.label === "ç³»åå·") { |
| | | this.isSeriesType = formItem; |
| | | // console.log("ç³»åå·",formItem) |
| | | } |
| | | //æ´æ¹æ¹å¼è§å |
| | | if (formItem.field === "codeStandardEditType") { |
| | | if (this.status === "amend") { |
| | | formItem.readOnly = true; |
| | |
| | | formItem.fieldMap[formItem.field + 'id'] = 'id' |
| | | } |
| | | |
| | | |
| | | let columnItem = { |
| | | change: (val) => { |
| | | // console.log(val) |
| | | if (val.column.field === "drawingno") { |
| | | this.codeattrsecValue = val.value; |
| | | return; |
| | | } |
| | | ; |
| | | //æ¯å¦ç³»å-ç³»åå· |
| | | if (val.column.field === "isSeries") { |
| | | if (val.value === "false") { |
| | | this.isShow = true; |
| | | }else { |
| | | } else { |
| | | this.isShow = false; |
| | | } |
| | | } |
| | | |
| | | if(val.column.field === "releaseDate"){ |
| | | if(val.value){ |
| | | this.dataYearValue = val.column.valueFormat; |
| | | }else { |
| | | this.dataYearValue = null; |
| | | } |
| | | } |
| | | }, |
| | | dataKey: formItem.dataKey || formItem.field, |
| | | label: formItem.text, |
| | |
| | | field: formItem.field, |
| | | type: this.columnType[formItem.type], |
| | | dicData: this.getDataList(formItem.type, formItem.data), |
| | | disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false) || |
| | | (this.isShow && formItem.label === "ç³»åå·" ? true : false), |
| | | disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false), |
| | | prepend: this.preOrSufFixShow("text", formItem.prefix), |
| | | append: this.preOrSufFixShow("text", formItem.suffix), |
| | | prefixIcon: this.preOrSufFixShow("icon", formItem.prefix), |
| | |
| | | keyAttr: formItem.keyAttr, |
| | | value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | (formItem.secType == "codedatesec" ? formItem.codeDateValue : null) || (TreeValue && formItem.secType == "codelevelsec" ? TreeValue : null) || |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null) || |
| | | (formItem.field === "isSeries" ? "true" : null), |
| | | (formItem.secType == "codeattrsec" ? this.add : null) || (this.status === "apply" && formItem.field === "codeStandardEditType" ? "1" : null), |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | | // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false, |
| | | // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false , |
| | | display: !formItem.hidden, |
| | | maxlength: formItem.maxlength, |
| | | filterable: true, |
| | |
| | | }, |
| | | }; |
| | | this.filteredObject = columnItem |
| | | // console.log("columnItem", columnItem) |
| | | slotColumnList.push(columnItem); |
| | | if (group.length === 0) { |
| | | column.push(columnItem); |
| | |
| | | } |
| | | }); |
| | | |
| | | // this.filteredArray = column.filter(obj => obj.label === "ç³»åå·"); |
| | | this.slotColumnList = slotColumnList; |
| | | // console.log(slotColumnList) |
| | | this.$set(this.option, "column", column); |
| | | this.$set(this.option, "group", group); |
| | | this.updateIndex++; |
| | |
| | | this.getFormDetail(); |
| | | }, |
| | | //ä¿®æ¹çº§è项 |
| | | changeChildItem(items, TreeValue) { |
| | | let column = this.option.column; |
| | | let group = this.option.group; |
| | | changeChildItem(items, TreeValue, type) { |
| | | type = type || "add" |
| | | // let column = this.option.column; |
| | | // let group = this.option.group; |
| | | let column = []; |
| | | let group = []; |
| | | let that = this; |
| | | items.forEach((item) => { |
| | | let formItem = this.resetFormConfig(item); |
| | |
| | | formItem.fieldMap[formItem.field + 'id'] = 'id' |
| | | } |
| | | let columnItem = { |
| | | change: (val) => { |
| | | // console.log('1', val) |
| | | }, |
| | | label: formItem.text, |
| | | labelslot: true, |
| | | prop: this.$utilFunc.isValuableObj(formItem.referConfig) |
| | |
| | | field: formItem.field, |
| | | type: this.columnType[formItem.type], |
| | | dicData: this.getDataList(formItem.type, formItem.data), |
| | | disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false), |
| | | disabled: type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ? true : false), |
| | | prepend: this.preOrSufFixShow("text", formItem.prefix), |
| | | append: this.preOrSufFixShow("text", formItem.suffix), |
| | | prefixIcon: this.preOrSufFixShow("icon", formItem.prefix), |
| | |
| | | value: "key", |
| | | }, |
| | | }; |
| | | |
| | | if (group.length === 0) { |
| | | that.slotColumnList.forEach((colItem, index) => { |
| | | if (colItem.field == columnItem.field) { |
| | |
| | | <template> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | v-if="dialogVisible" |
| | | v-dialogDrag |
| | | top="-5vh" |
| | | class="avue-dialog avue-dialog--top" |
| | | :title="title" |
| | | :visible.sync="dialogVisible" |
| | | :width="width" |
| | | append-to-body |
| | | class="avue-dialog avue-dialog--top" |
| | | top="-5vh" |
| | | @opened="openDialog" |
| | | > |
| | | <FormTemplate |
| | | key="masterForm" data-key="masterForm" |
| | | :status="status" |
| | | v-bind="$attrs" |
| | | :type="type" |
| | | :TreeValue="TreeValue" |
| | | :rowOid="rowOid" |
| | | :eventList="eventList" |
| | | :templateOid="templateOid" |
| | | v-if="dialogVisible" |
| | | v-if="dialogVisible" key="masterForm" |
| | | ref="FormTemplate" |
| | | v-bind="$attrs" |
| | | :TreeValue="TreeValue" |
| | | :eventList="eventList" |
| | | :rowOid="rowOid" |
| | | :status="status" |
| | | :templateOid="templateOid" |
| | | :type="type" |
| | | data-key="masterForm" |
| | | @getFormData="getFormData" |
| | | @isShow="isShowHandler" |
| | | @dataYearValue="dataYearHandler" |
| | | ></FormTemplate> |
| | | <div |
| | | class="tab_box" |
| | | v-if=" |
| | | type !== 'detail' && |
| | | dialogVisible && |
| | | (showCodeApply || showResembleQuery) && |
| | | type !== 'preview' |
| | | " |
| | | class="tab_box" |
| | | > |
| | | <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> |
| | | <el-tab-pane label="ç å¼ç³è¯·" name="codeApply" v-if="showCodeApply"> |
| | | <el-tab-pane v-if="showCodeApply" label="ç å¼ç³è¯·" name="codeApply"> |
| | | <FormTemplate |
| | | key="codeApplyForm" data-key="codeApplyForm" |
| | | secDTOListv-bind="$attrs" |
| | | :type="type" |
| | | :selfColumnType="selfColumnType" |
| | | key="codeApplyForm" ref="CodeApply" |
| | | :selfColumnConfig="selfColumnConfig" |
| | | ref="CodeApply" |
| | | @getFormData="getCodeApplyFormData" |
| | | :selfColumnType="selfColumnType" |
| | | :type="type" |
| | | data-key="codeApplyForm" |
| | | secDTOListv-bind="$attrs" |
| | | @attrList="attrListForm" |
| | | @isSeriesType="isSeriesTypeString" |
| | | @getFormData="getCodeApplyFormData" |
| | | @referConfigDataUpdate="referConfigDataUpdate" |
| | | ></FormTemplate> |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | v-if="showResembleQuery" |
| | | label="ç¸ä¼¼é¡¹æ¥è¯¢" |
| | | name="resembleQuery" |
| | | v-if="showResembleQuery" |
| | | > |
| | | <ResembleQuery |
| | | v-bind="$attrs" |
| | | ref="resembleQueryRef" |
| | | :hasResemble="this.hasResemble" |
| | | :column="this.resembleTableColumn" |
| | | v-bind="$attrs" |
| | | :codeClassifyOid="codeClassifyOid" |
| | | :column="this.resembleTableColumn" |
| | | :form="this.form" |
| | | :hasResemble="this.hasResemble" |
| | | :templateOid="templateOid" |
| | | ></ResembleQuery> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <template #footer> |
| | | <div class="" v-if="type !== 'detail'"> |
| | | <el-button @click="close()" size="small">å æ¶</el-button> |
| | | <div v-if="type !== 'detail'" class=""> |
| | | <el-button size="small" @click="close()">å æ¶</el-button> |
| | | <el-button |
| | | @click="submit()" |
| | | type="primary" |
| | | :loading="submitBtnLoading" |
| | | size="small" |
| | | >{{ submitText }}</el-button |
| | | type="primary" |
| | | @click="submit()" |
| | | >{{ submitText }} |
| | | </el-button |
| | | > |
| | | <el-button |
| | | @click="resembleQuerySubmit" |
| | | type="primary" |
| | | size="small" |
| | | v-if="showResembleQuery" |
| | | >ç¸ä¼¼åæ¥è¯¢</el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="resembleQuerySubmit" |
| | | >ç¸ä¼¼åæ¥è¯¢ |
| | | </el-button |
| | | > |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCodeRule, getFormTemplate } from "@/api/formTemplate.js"; |
| | | import {getCodeRule, getFormTemplate} from "@/api/formTemplate.js"; |
| | | import FormTemplate from "./FormTemplate"; |
| | | import ResembleQuery from "./ResembleQuery"; |
| | | |
| | | export default { |
| | | name: "FormTemplateDialog", |
| | | components: { ResembleQuery, FormTemplate }, |
| | | components: {ResembleQuery, FormTemplate}, |
| | | props: { |
| | | status:{ |
| | | status: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | TreeValue:{ |
| | | TreeValue: { |
| | | type: String, |
| | | default: "", |
| | | }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isSeriesType:{}, |
| | | attrList:[], |
| | | eventList:[], |
| | | isSeriesType: {}, |
| | | attrList: [], |
| | | eventList: [], |
| | | //ç å¼ç第äºç§åªè¯»éèæ
åµ |
| | | codeValueApplyStatus:'', |
| | | codeValueApplyStatus: '', |
| | | loading: false, |
| | | submitBtnLoading: false, |
| | | hasResemble: false, |
| | |
| | | "secretgrade", |
| | | ], |
| | | codeRuleOid: "", |
| | | isShowStatus: "" |
| | | }; |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | dialogVisible: { |
| | | get() { |
| | |
| | | }, |
| | | }, |
| | | }, |
| | | watch:{ |
| | | codeApplyForm:{ |
| | | handler(newval,oldval){ |
| | | watch: { |
| | | codeApplyForm: { |
| | | handler(newval, oldval) { |
| | | // console.log('newval',newval) |
| | | } |
| | | } |
| | |
| | | this.$refs.FormTemplate.templateRender( |
| | | res.data.formDefineVO.items |
| | | ); |
| | | this.eventList=res.data.templateVO.attributes |
| | | this.eventList = res.data.templateVO.attributes |
| | | // this.$refs.FormTemplate.$emit('eventList', res.data.templateVO.attributes); |
| | | if (Object.keys(this.setForm).length > 0) { |
| | | this.$refs.FormTemplate.form = this.setForm; |
| | |
| | | if (that.secVOList.length > 0 && that.type === "add") { |
| | | that.showCodeApply = true; |
| | | that.activeName = "codeApply"; |
| | | |
| | | this.$nextTick(() => { |
| | | that.$refs.CodeApply.templateRender(that.secVOList, this.TreeValue); |
| | | }); |
| | |
| | | }); |
| | | }, |
| | | getFormData(form) { |
| | | // if (this.status === "apply"){ |
| | | // form.codeStandardEditType = "å¶å®"; |
| | | // return; |
| | | // } |
| | | this.form = form; |
| | | // console.log("form",form) |
| | | //屿§ç 段èµå¼ |
| | | if (this.attrList) { |
| | | this.attrList.forEach(item => { |
| | |
| | | } |
| | | |
| | | }, |
| | | isSeriesTypeString(val){ |
| | | this.isSeriesType = val; |
| | | //ç³»åå·è§å |
| | | isShowHandler(val) { |
| | | let that = this; |
| | | this.isShowStatus = val; |
| | | |
| | | this.secVOList.forEach(item => { |
| | | if (item.name === "ç³»åå·") { |
| | | this.$set(item, "readOnly", val) |
| | | } |
| | | }) |
| | | if(this.$refs.CodeApply.changeChildItem ){ |
| | | this.$refs.CodeApply.changeChildItem(this.secVOList, this.TreeValue, this.type); |
| | | } |
| | | }, |
| | | //å¹´ä»£å· |
| | | dataYearHandler(val){ |
| | | console.log("val",val) |
| | | |
| | | }, |
| | | //屿§ç 段èµå¼ |
| | | attrListForm(attrListForm){ |
| | | this.attrList=attrListForm; |
| | | attrListForm(attrListForm) { |
| | | this.attrList = attrListForm; |
| | | }, |
| | | getCodeApplyFormData(codeApplyForm) { |
| | | // console.log("codeApplyForm",codeApplyForm) |
| | |
| | | }, |
| | | // åç
§ç»ä»¶æ°æ®åæ´ |
| | | referConfigDataUpdate(data) { |
| | | const { field } = data; |
| | | let childItems=[]; |
| | | const {field} = data; |
| | | let childItems = []; |
| | | this.secVOList = this.secVOList.map((item) => { |
| | | 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; |
| | | item.readOnly = false; |
| | | item.referConfig.extraParams.parentClassifyValueOid = data.value; |
| | | item.referConfig.reloadData = true; |
| | | childItems.push(item) |
| | | } |
| | | return item; |
| | | }); |
| | | //this.$refs.CodeApply.templateRender(this.secVOList,this.TreeValue); |
| | | this.$refs.CodeApply.changeChildItem(childItems); |
| | | this.$refs.CodeApply.changeChildItem(childItems,this.TreeValue,this.type); |
| | | }, |
| | | resembleQuerySubmit() { |
| | | this.activeName = "resembleQuery"; |
| | |
| | | "lastmodifier" |
| | | ]; |
| | | let resForm = {}; |
| | | const { defaultValue, formValue } = this.getDefaultValueAndFormValues( |
| | | const {defaultValue, formValue} = this.getDefaultValueAndFormValues( |
| | | this.form |
| | | ); |
| | | noData.forEach((item) => { |
| | |
| | | if (!this.codeApplyForm[item.parentClassifySecOid]) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | return item.readOnly || false; |
| | | } |
| | | } else { |
| | | return item.readOnly || false; |
| | | } |
| | | } else { |
| | | return item.readOnly || false; |
| | | } |
| | | }, |
| | | isRequired(item) { |
| | |
| | | top: 2px; |
| | | color: red; |
| | | } |
| | | |
| | | // è§£å³swichç»ä»¶ä¸åç´å±
ä¸çé®é¢ |
| | | /deep/ .el-switch { |
| | | vertical-align: baseline; |
| | |
| | | |
| | | export default { |
| | | data() { |
| | | const validatePass = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请è¾å
¥å¯ç ')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | const validatePass2 = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('è¯·åæ¬¡è¾å
¥å¯ç ')); |
| | | } else if (value !== this.form.password) { |
| | | callback(new Error('两次è¾å
¥å¯ç ä¸ä¸è´!')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | tenantId:'', |
| | | form: {}, |
| | |
| | | value: 'value', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | option: { |
| | | height:'auto', |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | columnBtn:false, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | /* ä¸é¢è¿ä¸ä¸ªå±æ§é»è®¤è®¾ç½®ä¸ºtrueï¼ |
| | | å®é
æ ¹æ®permissionListä¸å¯¹ç
§ç屿§è¿è¡æ§å¶ç */ |
| | | viewBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | addBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | column: [ |
| | | { |
| | | label: "ç»å½è´¦å·", |
| | | prop: "account", |
| | | search: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "æå±ç§æ·", |
| | | prop: "tenantName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "ç¨æ·å§å", |
| | | prop: "realName", |
| | | search: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "æå±è§è²", |
| | | prop: "roleName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "å¯ç çç¥", |
| | | prop: "pwdStrategy", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "æå±é¨é¨", |
| | | prop: "deptName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "ç¨æ·å¹³å°", |
| | | prop: "userTypeName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "ç¨æ·å¹³å°", |
| | | type: "select", |
| | | dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | hide: true, |
| | | display: false, |
| | | prop: "userType", |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ç¨æ·å¹³å°", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | display: false, |
| | | sortable:true, |
| | | html:true, |
| | | prop: "userStatus", |
| | | formatter : function (row, column) { |
| | | return row.userStatus == 0 ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>' |
| | | } |
| | | }, |
| | | ], |
| | | group: [ |
| | | { |
| | | label: 'åºç¡ä¿¡æ¯', |
| | | prop: 'baseInfo', |
| | | icon: 'el-icon-user-solid', |
| | | column: [ |
| | | { |
| | | label: "æå±ç§æ·", |
| | | prop: "tenantId", |
| | | type: "tree", |
| | | dicUrl: "/api/ubcs-system/tenant/select", |
| | | props: { |
| | | label: "tenantName", |
| | | value: "tenantId" |
| | | }, |
| | | hide: !website.tenantMode, |
| | | addDisplay: website.tenantMode, |
| | | editDisplay: website.tenantMode, |
| | | viewDisplay: website.tenantMode, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥æå±ç§æ·", |
| | | trigger: "click" |
| | | }], |
| | | span: 24, |
| | | value:"" |
| | | }, |
| | | { |
| | | label: "ç»å½è´¦å·", |
| | | prop: "account", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç»å½è´¦å·", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "ç¨æ·å¹³å°", |
| | | type: "select", |
| | | dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | value:'1', |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "userType", |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ç¨æ·å¹³å°", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: 'å¯ç ', |
| | | prop: 'password', |
| | | type: "password", |
| | | hide: true, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{required: true, validator: validatePass, trigger: 'blur'}] |
| | | }, |
| | | { |
| | | label: '确认å¯ç ', |
| | | prop: 'password2', |
| | | hide: true, |
| | | type: "password", |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{required: true, validator: validatePass2, trigger: 'blur'}] |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: '详ç»ä¿¡æ¯', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | column: [ |
| | | { |
| | | label: "ç¨æ·æµç§°", |
| | | prop: "name", |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç¨æ·æµç§°", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "ç¨æ·å§å", |
| | | prop: "realName", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç¨æ·å§å", |
| | | trigger: "blur" |
| | | }, { |
| | | min: 2, |
| | | max: 5, |
| | | message: 'å§åé¿åº¦å¨2å°5个å符' |
| | | }] |
| | | }, |
| | | { |
| | | label: "ææºå·ç ", |
| | | prop: "phone", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "çµåé®ç®±", |
| | | prop: "email", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "ç¨æ·æ§å«", |
| | | prop: "sex", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "ç·", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "æªç¥", |
| | | value: 3 |
| | | } |
| | | ], |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "ç¨æ·çæ¥", |
| | | type: "date", |
| | | prop: "birthday", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "è´¦å·ç¶æ", |
| | | prop: "statusName", |
| | | hide: true, |
| | | display: false |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'è责信æ¯', |
| | | prop: 'dutyInfo', |
| | | icon: 'el-icon-s-custom', |
| | | column: [ |
| | | { |
| | | label: "ç¨æ·ç¼å·", |
| | | prop: "code", |
| | | }, |
| | | { |
| | | label: "æå±è§è²", |
| | | prop: "roleId", |
| | | multiple: true, |
| | | type: "tree", |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æå±è§è²", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | { |
| | | label: "æå±é¨é¨", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æå±é¨é¨", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | /*{ |
| | | label: "æå±å²ä½", |
| | | prop: "postId", |
| | | type: "tree", |
| | | multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "postName", |
| | | value: "id" |
| | | }, |
| | | rules: [{ |
| | | required: false, |
| | | message: "è¯·éæ©æå±å²ä½", |
| | | trigger: "click" |
| | | }], |
| | | },*/ |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | data: [], |
| | | platformQuery: {}, |
| | |
| | | pwdstrategyId:'' |
| | | }, |
| | | userflag:true, |
| | | usernumber:0 |
| | | usernumber:0, |
| | | userStatus:false, |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | }; |
| | | }, |
| | | // platformPermissionList() { |
| | | // return { |
| | | // addBtn: this.vaildData(this.permission.user.user_add, false), |
| | | // viewBtn: this.vaildData(this.permission.user.user_view, false), |
| | | // delBtn: this.vaildData(this.permission.user.user_delete, false), |
| | | // editBtn: this.vaildData(this.permission.user.user_edit, false), |
| | | // deactEnBtn: this.vaildData(this.permission.user.user_deact_en,false), |
| | | // exportBtn: this.vaildData(this.permission.user.user_export,false), |
| | | // pwdStrategyBtn: this.vaildData(this.permission.user.user_pwd_strategy,false), |
| | | // importBtn: this.vaildData(this.permission.user.user_import,false), |
| | | // resetBtn: this.vaildData(this.permission.user.user_reset,false), |
| | | // roleBtn: this.vaildData(this.permission.user.user_role,false), |
| | | // unsealBtn: this.vaildData(this.permission.user.user_unseal,false), |
| | | // }; |
| | | // }, |
| | | option() { |
| | | return{ |
| | | height:'auto', |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | columnBtn:false, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | /* ä¸é¢è¿ä¸ä¸ªå±æ§é»è®¤è®¾ç½®ä¸ºtrueï¼ |
| | | å®é
æ ¹æ®permissionListä¸å¯¹ç
§ç屿§è¿è¡æ§å¶ç */ |
| | | viewBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | addBtn: true, |
| | | dialogType: 'drawer', |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | column: [ |
| | | { |
| | | label: "ç»å½è´¦å·", |
| | | prop: "account", |
| | | search: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "æå±ç§æ·", |
| | | prop: "tenantName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "ç¨æ·å§å", |
| | | prop: "realName", |
| | | search: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "æå±è§è²", |
| | | prop: "roleName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "å¯ç çç¥", |
| | | prop: "pwdStrategy", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "æå±é¨é¨", |
| | | prop: "deptName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "ç¨æ·å¹³å°", |
| | | prop: "userTypeName", |
| | | slot: true, |
| | | display: false |
| | | }, |
| | | { |
| | | label: "ç¨æ·å¹³å°", |
| | | type: "select", |
| | | dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | dataType: "number", |
| | | search: true, |
| | | hide: true, |
| | | display: false, |
| | | prop: "userType", |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ç¨æ·å¹³å°", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | display: false, |
| | | sortable:true, |
| | | html:true, |
| | | prop: "userStatus", |
| | | formatter : function (row, column) { |
| | | return row.userStatus == 0 ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>' |
| | | } |
| | | }, |
| | | ], |
| | | group: [ |
| | | { |
| | | label: 'åºç¡ä¿¡æ¯', |
| | | prop: 'baseInfo', |
| | | icon: 'el-icon-user-solid', |
| | | column: [ |
| | | { |
| | | label: "æå±ç§æ·", |
| | | prop: "tenantId", |
| | | type: "tree", |
| | | dicUrl: "/api/ubcs-system/tenant/select", |
| | | props: { |
| | | label: "tenantName", |
| | | value: "tenantId" |
| | | }, |
| | | hide: !website.tenantMode, |
| | | addDisplay: website.tenantMode, |
| | | editDisplay: website.tenantMode, |
| | | viewDisplay: website.tenantMode, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥æå±ç§æ·", |
| | | trigger: "click" |
| | | }], |
| | | span: 24, |
| | | value:"" |
| | | }, |
| | | { |
| | | label: "ç»å½è´¦å·", |
| | | prop: "account", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç»å½è´¦å·", |
| | | trigger: "blur" |
| | | }], |
| | | }, |
| | | { |
| | | label: "ç¨æ·å¹³å°", |
| | | type: "select", |
| | | dicUrl: "/api/ubcs-system/dict/dictionary?code=user_type", |
| | | props: { |
| | | label: "dictValue", |
| | | value: "dictKey" |
| | | }, |
| | | value:'1', |
| | | dataType: "number", |
| | | slot: true, |
| | | prop: "userType", |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ç¨æ·å¹³å°", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: 'å¯ç ', |
| | | prop: 'password', |
| | | type: "password", |
| | | hide: true, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | validator:(rule, value,callback) => { |
| | | if (value === '') { |
| | | callback(new Error('è¯·åæ¬¡è¾å
¥å¯ç ')); |
| | | } else if (value !== this.form.password) { |
| | | callback(new Error('两次è¾å
¥å¯ç ä¸ä¸è´!')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | { |
| | | label: '确认å¯ç ', |
| | | prop: 'password2', |
| | | hide: true, |
| | | type: "password", |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | rules: [{ |
| | | required: true, |
| | | validator:(rule, value,callback) => { |
| | | if (value === '') { |
| | | callback(new Error('è¯·åæ¬¡è¾å
¥å¯ç ')); |
| | | } else if (value !== this.form.password) { |
| | | callback(new Error('两次è¾å
¥å¯ç ä¸ä¸è´!')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: '详ç»ä¿¡æ¯', |
| | | prop: 'detailInfo', |
| | | icon: 'el-icon-s-order', |
| | | column: [ |
| | | { |
| | | label: "ç¨æ·æµç§°", |
| | | prop: "name", |
| | | hide: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç¨æ·æµç§°", |
| | | trigger: "blur" |
| | | }] |
| | | }, |
| | | { |
| | | label: "ç¨æ·å§å", |
| | | prop: "realName", |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥ç¨æ·å§å", |
| | | trigger: "blur" |
| | | }, { |
| | | min: 2, |
| | | max: 5, |
| | | message: 'å§åé¿åº¦å¨2å°5个å符' |
| | | }] |
| | | }, |
| | | { |
| | | label: "ææºå·ç ", |
| | | prop: "phone", |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "çµåé®ç®±", |
| | | prop: "email", |
| | | hide: true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: "ç¨æ·æ§å«", |
| | | prop: "sex", |
| | | type: "select", |
| | | dicData: [ |
| | | { |
| | | label: "ç·", |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: "女", |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: "æªç¥", |
| | | value: 3 |
| | | } |
| | | ], |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "ç¨æ·çæ¥", |
| | | type: "date", |
| | | prop: "birthday", |
| | | format: "yyyy-MM-dd hh:mm:ss", |
| | | valueFormat: "yyyy-MM-dd hh:mm:ss", |
| | | hide: true |
| | | }, |
| | | { |
| | | label: "è´¦å·ç¶æ", |
| | | prop: "statusName", |
| | | hide: true, |
| | | display: false |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'è责信æ¯', |
| | | prop: 'dutyInfo', |
| | | icon: 'el-icon-s-custom', |
| | | column: [ |
| | | { |
| | | label: "ç¨æ·ç¼å·", |
| | | prop: "code", |
| | | }, |
| | | { |
| | | label: "æå±è§è²", |
| | | prop: "roleId", |
| | | multiple: true, |
| | | type: "tree", |
| | | dicData: [], |
| | | disabled:this.userStatus, |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æå±è§è²", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | { |
| | | label: "æå±é¨é¨", |
| | | prop: "deptId", |
| | | type: "tree", |
| | | multiple: true, |
| | | dicData: [], |
| | | props: { |
| | | label: "title" |
| | | }, |
| | | checkStrictly: true, |
| | | slot: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©æå±é¨é¨", |
| | | trigger: "click" |
| | | }] |
| | | }, |
| | | ] |
| | | }, |
| | | ] |
| | | |
| | | } |
| | | }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | |
| | | }) |
| | | }, |
| | | beforeOpen(done, type) { |
| | | // console.log(type) |
| | | if(type === "edit"){ |
| | | this.userStatus = true; |
| | | }else { |
| | | this.userStatus = false; |
| | | } |
| | | //console.log(type) |
| | | // console.log('this.tenantId',this.tenantId) |
| | | // const column = this.findObject(this.option.group,'tenantId'); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | | import lombok.Data; |
| | | import java.util.List; |
| | | /** |
| | | * æ åç³è¯·åä¿®è®¢æ°æ®,å¨åæ¡çæ¶åä½¿ç¨ |
| | | * @author xiejun |
| | | * @date 2023-11-22 |
| | | */ |
| | | public class CodeBZApplyDTO extends BaseModelDTO { |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = 1980155181507713249L; |
| | | /*** |
| | | * æä½ç±»å |
| | | */ |
| | | private String operationType; |
| | | /*** |
| | | * æ¯å¦ç³»å |
| | | */ |
| | | private boolean series; |
| | | /*** |
| | | *å叿¶é´ |
| | | */ |
| | | |
| | | private String releaseTime; |
| | | /*** |
| | | * æºæ åå· |
| | | */ |
| | | private String oldCode; |
| | | |
| | | /*** |
| | | * ç³»åæµæ°´ |
| | | */ |
| | | private String seriesFlow; |
| | | /*** |
| | | * æ¯å¦åæ´ç³»å |
| | | */ |
| | | private boolean editSeries; |
| | | |
| | | |
| | | /** |
| | | * 主é¢åºåç±»ä¸»é® |
| | | */ |
| | | private String codeClassifyOid; |
| | | |
| | | /** |
| | | * 模æ¿çä¸»é® |
| | | */ |
| | | private String templateOid; |
| | | /** |
| | | * ç¼ç è§åçä¸»é® |
| | | */ |
| | | private String codeRuleOid; |
| | | |
| | | /** |
| | | * æ¯å¦å¨æµç¨ä¸ä¸ä¿®æ¹ |
| | | */ |
| | | private boolean editInProcess; |
| | | |
| | | /** |
| | | * ç æ®µéæ©çä¿¡æ¯ |
| | | */ |
| | | private List<CodeOrderSecDTO> secDTOList; |
| | | |
| | | |
| | | /** |
| | | * æå¤§æµæ°´å· |
| | | */ |
| | | private int maxSecNum; |
| | | |
| | | public String getOperationType() { |
| | | return operationType; |
| | | } |
| | | |
| | | public void setOperationType(String operationType) { |
| | | this.operationType = operationType; |
| | | } |
| | | |
| | | // public boolean isSeries() { |
| | | // return isSeries; |
| | | // } |
| | | // |
| | | // public void setSeries(boolean series) { |
| | | // isSeries = series; |
| | | // } |
| | | // |
| | | |
| | | |
| | | |
| | | |
| | | public String getReleaseTime() { |
| | | return releaseTime; |
| | | } |
| | | |
| | | public void setReleaseTime(String releaseTime) { |
| | | this.releaseTime = releaseTime; |
| | | } |
| | | |
| | | public String getOldCode() { |
| | | return oldCode; |
| | | } |
| | | |
| | | public void setOldCode(String oldCode) { |
| | | this.oldCode = oldCode; |
| | | } |
| | | |
| | | public String getSeriesFlow() { |
| | | return seriesFlow; |
| | | } |
| | | |
| | | public void setSeriesFlow(String seriesFlow) { |
| | | this.seriesFlow = seriesFlow; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getCodeClassifyOid() { |
| | | return codeClassifyOid; |
| | | } |
| | | |
| | | public void setCodeClassifyOid(String codeClassifyOid) { |
| | | this.codeClassifyOid = codeClassifyOid; |
| | | } |
| | | |
| | | public String getTemplateOid() { |
| | | return templateOid; |
| | | } |
| | | |
| | | public void setTemplateOid(String templateOid) { |
| | | this.templateOid = templateOid; |
| | | } |
| | | |
| | | public String getCodeRuleOid() { |
| | | return codeRuleOid; |
| | | } |
| | | |
| | | public void setCodeRuleOid(String codeRuleOid) { |
| | | this.codeRuleOid = codeRuleOid; |
| | | } |
| | | |
| | | public boolean isEditInProcess() { |
| | | return editInProcess; |
| | | } |
| | | |
| | | public void setEditInProcess(boolean editInProcess) { |
| | | this.editInProcess = editInProcess; |
| | | } |
| | | |
| | | public List<CodeOrderSecDTO> getSecDTOList() { |
| | | return secDTOList; |
| | | } |
| | | |
| | | public void setSecDTOList(List<CodeOrderSecDTO> secDTOList) { |
| | | this.secDTOList = secDTOList; |
| | | } |
| | | |
| | | public int getMaxSecNum() { |
| | | return maxSecNum; |
| | | } |
| | | |
| | | public void setMaxSecNum(int maxSecNum) { |
| | | this.maxSecNum = maxSecNum; |
| | | } |
| | | |
| | | public boolean isSeries() { |
| | | return series; |
| | | } |
| | | |
| | | public void setSeries(boolean series) { |
| | | this.series = series; |
| | | } |
| | | |
| | | public boolean isEditSeries() { |
| | | return editSeries; |
| | | } |
| | | |
| | | public void setEditSeries(boolean editSeries) { |
| | | this.editSeries = editSeries; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CodeBZApplyDTO{" + |
| | | "operationType='" + operationType + '\'' + |
| | | ", series=" + series + |
| | | ", releaseTime='" + releaseTime + '\'' + |
| | | ", oldCode='" + oldCode + '\'' + |
| | | ", seriesFlow='" + seriesFlow + '\'' + |
| | | ", editSeries=" + editSeries + |
| | | ", codeClassifyOid='" + codeClassifyOid + '\'' + |
| | | ", templateOid='" + templateOid + '\'' + |
| | | ", codeRuleOid='" + codeRuleOid + '\'' + |
| | | ", editInProcess=" + editInProcess + |
| | | ", secDTOList=" + secDTOList + |
| | | ", maxSecNum=" + maxSecNum + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CodeCustomSerialDTO extends BaseModelDTO { |
| | | //ç¼ç è§åç æ®µ |
| | | private List<CodeBasicSecVO> codeBasicSecVOList; |
| | | //åä¸ªç æ®µçç å¼ |
| | | private List<String> secValueList=new LinkedList(); |
| | | /*** |
| | | * ç¼ç è§åid |
| | | */ |
| | |
| | | */ |
| | | private String currentFlowValue; |
| | | /*** |
| | | * æµå¤±ä¾èµ |
| | | * æµæ°´ä¾èµ |
| | | */ |
| | | private String serialUnitString; |
| | | /*** |
| | |
| | | * 没æå¡«å
åçæµæ°´å· |
| | | */ |
| | | private String unFillSerial; |
| | | /*** |
| | | * ç æ®µå¼é¾æ¥ |
| | | */ |
| | | private String codeDelimit; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "2", |
| | | "series": false, |
| | | "releaseTime": "2024-09-23", |
| | | "oldCode": "Q/3B1-2023", |
| | | "seriesFlow": "", |
| | | "isEditSeries": false, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | |
| | | ], |
| | | "data":{"name":"æ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"2", |
| | | "oldcode":"Q/3B1-2023", |
| | | "isSeries":"false", |
| | | "reviseSeries":"false", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2024-09-23 19:22:33"} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "2", |
| | | "series": false, |
| | | "releaseTime": "2024-01-23", |
| | | "oldCode": "Q/3B1-2023", |
| | | "seriesFlow": "", |
| | | "isEditSeries": false, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | |
| | | ], |
| | | "data":{"name":"æ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"2", |
| | | "oldcode":"Q/3B1-2023", |
| | | "isSeries":"false", |
| | | "reviseSeries":"false", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2024-01-23 19:22:33"} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "2", |
| | | "series": false, |
| | | "releaseTime": "2024-11-23", |
| | | "oldCode": "Q/3B1-2023", |
| | | "seriesFlow": "", |
| | | "isEditSeries": true, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497079235973120", |
| | | "secValue":"4" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | ], |
| | | "data":{"name":"ç³»åæ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"2", |
| | | "oldcode":"Q/3B1-2023", |
| | | "isSeries":"false", |
| | | "reviseSeries":"true", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2024-11-23 19:22:33"} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "1", |
| | | "series": false, |
| | | "releaseTime": "2023-11-23", |
| | | "oldCode": "", |
| | | "seriesFlow": "", |
| | | "isEditSeries": false, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | |
| | | ], |
| | | "data":{"name":"æ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"1", |
| | | "oldcode":"", |
| | | "isSeries":"false", |
| | | "reviseSeries":"false", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2023-11-23 19:22:33"} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "2", |
| | | "series": true, |
| | | "releaseTime": "2023-11-23", |
| | | "oldCode": "Q/3B7.1-2023,Q/3B7.1-2023II", |
| | | "seriesFlow": "", |
| | | "isEditSeries": true, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497079235973120", |
| | | "secValue":"4" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | ], |
| | | "data":{"name":"ç³»åæ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"2", |
| | | "oldcode":"Q/3B7.1-2023,Q/3B7.1-2023II", |
| | | "isSeries":"true", |
| | | "reviseSeries":"true", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2023-11-23 19:22:33"} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "1", |
| | | "series": true, |
| | | "releaseTime": "2023-11-23", |
| | | "oldCode": "", |
| | | "seriesFlow": "", |
| | | "isEditSeries": false, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497079235973120", |
| | | "secValue":"1" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | |
| | | ], |
| | | "data":{"name":"ç³»åæ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"1", |
| | | "oldcode":"", |
| | | "isSeries":"true", |
| | | "reviseSeries":"false", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2023-11-23 19:22:33"} |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "operationType": "2", |
| | | "series": true, |
| | | "releaseTime": "2024-11-23", |
| | | "oldCode": "Q/3B7.1-2023", |
| | | "seriesFlow": "", |
| | | "isEditSeries": false, |
| | | "editInProcess": false, |
| | | "codeClassifyOid": "1722159168229609472", |
| | | "templateOid": "1722159635358650369", |
| | | "codeRuleOid": "1717377846655193088", |
| | | "editInProcess": "", |
| | | "secDTOList":[{ |
| | | "secOid":"1717378065371369472", |
| | | "secValue": "Q/3B" |
| | | },{ |
| | | "secOid":"1722497248551636992", |
| | | "secValue": "-" |
| | | }, |
| | | { |
| | | "secOid":"1722497079235973120", |
| | | "secValue":"1" |
| | | }, |
| | | { |
| | | "secOid":"1722497450259910656", |
| | | "secValue": "2023" |
| | | } |
| | | |
| | | ], |
| | | "data":{"name":"ç³»åæ ååç§°", |
| | | "standardFileType":"æä»¶ç±»å", |
| | | "codeStandardEditType":"1", |
| | | "oldcode":"Q/3B7.1-2023", |
| | | "isSeries":"true", |
| | | "reviseSeries":"false", |
| | | "ImplementationDate":"2023-11-23 19:22:33", |
| | | "approveDate":"2023-11-23 19:22:33", |
| | | "releaseDate": "2024-11-23 19:22:33"} |
| | | } |
| | |
| | | } |
| | | String value = tableField.value(); |
| | | if(net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils.isNotBlank(value)){ |
| | | fieldMap.put(declaredField.getName(), value); |
| | | fieldMap.put(declaredField.getName(), value.trim()); |
| | | } |
| | | } |
| | | } |
| | |
| | | ((!"".equals(existField) && !existField.contains(propertyName.toLowerCase()+","))||"data".equals(propertyName))) { |
| | | Method readMethod = descriptor.getReadMethod(); |
| | | Object result = readMethod.invoke(bean, new Object[0]); |
| | | if(result instanceof String){ |
| | | result=((String) result).trim(); |
| | | } |
| | | |
| | | if (result != null) { |
| | | if ("data".equals(propertyName)){ |
| | |
| | | && Func.isBlank(String.valueOf(mapData.get(o)))){ |
| | | continue; |
| | | } |
| | | returnMap.put(String.valueOf(o).toLowerCase(),mapData.get(o)); |
| | | Object result=mapData.get(o); |
| | | if(result instanceof String){ |
| | | result=((String) result).trim(); |
| | | } |
| | | returnMap.put(String.valueOf(o).toLowerCase(),result); |
| | | } |
| | | } |
| | | return returnMap; |
| | |
| | | package com.vci.ubcs.code.algorithm; |
| | | |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.alibaba.nacos.common.utils.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.vci.ubcs.code.annotation.MdmSerialAlgorithm; |
| | | import com.vci.ubcs.code.annotation.MdmSerialAlgorithmMethod; |
| | | import com.vci.ubcs.code.dto.CodeCustomSerialDTO; |
| | | import com.vci.ubcs.code.entity.CodeAllCode; |
| | | import com.vci.ubcs.code.enumpack.CodeBZOperationTypeEnum; |
| | | import com.vci.ubcs.code.service.ICodeAllCodeService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeBasicSecVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.reactivex.internal.util.LinkedArrayList; |
| | | import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.management.StringValueExp; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.*; |
| | | |
| | | /**** |
| | | * èªå®ä¹ç½é©¬æµæ°´ç®æ³èªå®ä¹ç±» |
| | | */ |
| | | @MdmSerialAlgorithm(text = "èªå®ä¹ç½é©¬æµæ°´",serialType="custom_serial_roman",description = "èªå®ä¹ç½é©¬æµæ°´ç®æ³") |
| | | @Component |
| | | public class CustomRomanSerialAlgorithmExample { |
| | | /** |
| | | * ç¼ç è§åçæå¡ |
| | | */ |
| | | @Autowired |
| | | private ICodeAllCodeService codeAllCodeService; |
| | | /*** |
| | | * æä½ç±»å |
| | | */ |
| | | @Value("${bzApply.operationType:operationType}") |
| | | private String operationType; |
| | | /*** |
| | | * æ¯å¦ç³»å |
| | | */ |
| | | @Value("${bzApply.isSeries:isSeries}") |
| | | private String isSeries; |
| | | |
| | | /*** |
| | | * æ¯å¦åæ´ç³»å |
| | | */ |
| | | @Value("${bzApply.isEditSeries:isEditSeries}") |
| | | private String isEditSeries; |
| | | /*** |
| | | * æºæ åå· |
| | | */ |
| | | @Value("${bzApply.oldCode:oldCode}") |
| | | private String oldCode; |
| | | /*** |
| | | *å叿¶é´ |
| | | */ |
| | | @Value("${bzApply.releaseTime:releaseTime}") |
| | | private String releaseTime; |
| | | /*** |
| | | * æ§å¶æ¯å¦åå
¥å¼çç æ®µåç§° |
| | | */ |
| | | @Value("${bzApply.yearSecName:年代å·}") |
| | | private String yearSecName; |
| | | /** |
| | | * çæç½é©¬æµæ°´å·çæ¹æ³ |
| | | * @return æµæ°´å·çä¿¡æ¯ |
| | | */ |
| | | @MdmSerialAlgorithmMethod |
| | | public String serialGenerate(CodeCustomSerialDTO codeCustomSerialDTO){ |
| | | // |
| | | codeCustomSerialDTO.getSerialUnitString(); |
| | | CodeBasicSecVO secVO= codeCustomSerialDTO.getSerialCodeCodeBasicSec(); |
| | | String currentFlowValue=codeCustomSerialDTO.getCurrentFlowValue(); |
| | | // boolean isSeriesValue=false; |
| | | boolean isCrete=false;//æ¯å¦æäº§ç½é©¬é¡ºåºå· |
| | | String romanValue=""; |
| | | List<CodeBasicSecVO> codeBasicSecVOList= codeCustomSerialDTO.getCodeBasicSecVOList(); |
| | | int yearSecValue=0;//å¹´ä»£å· |
| | | List<String> secValueList=codeCustomSerialDTO.getSecValueList(); |
| | | String serialUnitString=codeCustomSerialDTO.getSerialUnitString(); |
| | | //æºæ åç±»å |
| | | boolean isSeriesValue=codeCustomSerialDTO.getBaseModel().getData().containsKey(isSeries)&&StringUtils.isNotBlank(codeCustomSerialDTO.getBaseModel().getData().get(isSeries))&&codeCustomSerialDTO.getBaseModel().getData().get(isEditSeries).equals("true")?true:false; |
| | | //æ¯å¦åæ´ç³»å |
| | | boolean isEditSeriesValue=codeCustomSerialDTO.getBaseModel().getData().containsKey(isEditSeries)&&StringUtils.isNotBlank(codeCustomSerialDTO.getBaseModel().getData().get(isEditSeries))&&codeCustomSerialDTO.getBaseModel().getData().get(isEditSeries).equals("true")?true:false; |
| | | //妿æ 修订为æ åï¼åæè¡¨åç³»åå·ä¸åï¼åæ¯è¾å¹´ä»£å·ï¼å¦æå¹´ä»£å·è·¨å¹´ï¼æ¬¡å¹´1æååä¸ºè·¨å¹´ï¼ |
| | | String operationTypeValue=codeCustomSerialDTO.getBaseModel().getData().containsKey(operationType)&&StringUtils.isNotBlank(codeCustomSerialDTO.getBaseModel().getData().get(operationType))?codeCustomSerialDTO.getBaseModel().getData().get(operationType):""; |
| | | //å叿¶é´ |
| | | String releaseTimeValue=codeCustomSerialDTO.getBaseModel().getData().containsKey(releaseTime)&&StringUtils.isNotBlank(codeCustomSerialDTO.getBaseModel().getData().get(releaseTime))?codeCustomSerialDTO.getBaseModel().getData().get(releaseTime):""; |
| | | if(operationTypeValue.equals(CodeBZOperationTypeEnum.CODE_BZ_AMENDMENT.getValue())){//妿æ¯ä¿®è®¢ |
| | | //æºæ åå· |
| | | String oldCodeValue=codeCustomSerialDTO.getBaseModel().getData().containsKey(oldCode)&&StringUtils.isNotBlank(codeCustomSerialDTO.getBaseModel().getData().get(oldCode))?codeCustomSerialDTO.getBaseModel().getData().get(oldCode):""; |
| | | if(StringUtils.isNotBlank(oldCodeValue)){ |
| | | //è¿éè¦ä¿®æ¹allCodeççå½å¨æ |
| | | QueryWrapper<CodeAllCode> allCodeWrapper = new QueryWrapper<>(); |
| | | allCodeWrapper.in("id", VciBaseUtil.str2List(oldCodeValue)); |
| | | List<CodeAllCode>codeAllcodeList=codeAllCodeService.selectByWrapper(allCodeWrapper); |
| | | if(!CollectionUtils.isEmpty(codeAllcodeList)){ |
| | | String codeDelimit=codeAllcodeList.get(0).getCodeDelimit(); |
| | | String[] secValues= StringUtils.splitByWholeSeparatorPreserveAllTokens(codeDelimit,SERIAL_VALUE_SPACE); |
| | | int yearIndex=0; |
| | | if((!isSeriesValue&&!isEditSeriesValue)||(isSeriesValue&&isSeriesValue)){//å¦ææ¯æ å修订为æ åï¼æè
ç³»åä¿®è®¢ä¸ºç³»åæ¶åï¼åå¤æå¹´ä»£å· |
| | | for (int i=0;i<codeBasicSecVOList.size();i++){ |
| | | CodeBasicSecVO codeBasicSecVO=codeBasicSecVOList.get(i); |
| | | if(codeBasicSecVO.getName().equals(yearSecName)){ |
| | | yearSecValue=Integer.parseInt((secValues[i])); |
| | | yearIndex=i; |
| | | } |
| | | } |
| | | //åè·å年代巿¯è¾ï¼å¦æå¹´ä»£å·è·¨å¹´åéè¦ä¸éè¦å¢å ç½é©¬æµæ°´ï¼ç´æ¥æ¹å¹´ä»£å·ï¼å¦æä¸è·¨å¹´åå¢å æµæ°´ |
| | | if(StringUtils.isNotBlank(releaseTimeValue)){//å叿¶é´ |
| | | String[] yearMoths= StringUtils.splitByWholeSeparatorPreserveAllTokens(releaseTimeValue,"-"); |
| | | String[] serialUnitStrings=StringUtils.splitByWholeSeparatorPreserveAllTokens(serialUnitString,SERIAL_UNIT_SPACE); |
| | | List<String>serialUnitStringList=new ArrayList<>(); |
| | | serialUnitStringList= Arrays.asList(serialUnitStrings); |
| | | int newYear=0; |
| | | int month=0; |
| | | if(yearMoths.length>2){ |
| | | newYear=Integer.parseInt(yearMoths[0]); |
| | | month=Integer.parseInt(yearMoths[1]); |
| | | } |
| | | if(newYear>yearSecValue&&month>1){ |
| | | secValueList.set(yearIndex,String.valueOf(newYear)); |
| | | serialUnitStringList.set(yearIndex, String.valueOf(newYear)); |
| | | codeCustomSerialDTO.setSecValueList(secValueList); |
| | | String newSerialUnitString = serialUnitStringList.size() == 0 ? EMPTY_SERIAL_UNIT : serialUnitStringList.stream().collect(Collectors.joining(SERIAL_UNIT_SPACE)); |
| | | codeCustomSerialDTO.setSerialUnitString(newSerialUnitString); |
| | | }else{ |
| | | isCrete=true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | Double newThisSerialValue = 0d; |
| | | if(StringUtils.isBlank(currentFlowValue)){ |
| | | //第ä¸ä¸ªç¼ç |
| | | newThisSerialValue = VciBaseUtil.getDouble(secVO.getSerialStart()); |
| | | }else { |
| | | //æµæ°´å·è¯å®æ¯æ°å |
| | | //å°ç½é©¬æµæ°´è½¬ä¸ºæ°åæµæ°´ |
| | | int arabicValue=VciBaseUtil.convertRomanToArabic(currentFlowValue); |
| | | newThisSerialValue = (double)(arabicValue + secVO.getSerialStep()) ; |
| | | } |
| | | //è¦çæ¯å¦è¶
è¿æå¤§çæµæ°´å¼ |
| | | if (newThisSerialValue >= secVO.getCodeFillLimit()) { |
| | | throw new VciBaseException("æµæ°´å·å·²ç»è¶
è¿å
许çæå¤§æµæ°´å¼{0}", new String[]{secVO.getCodeFillLimit().toString()}); |
| | | |
| | | if(isCrete){ |
| | | CodeBasicSecVO secVO= codeCustomSerialDTO.getSerialCodeCodeBasicSec(); |
| | | String currentFlowValue=codeCustomSerialDTO.getCurrentFlowValue(); |
| | | Double newThisSerialValue = 0d; |
| | | if(StringUtils.isBlank(currentFlowValue)){ |
| | | //第ä¸ä¸ªç¼ç |
| | | newThisSerialValue = VciBaseUtil.getDouble(secVO.getSerialStart()); |
| | | }else { |
| | | //æµæ°´å·è¯å®æ¯æ°å |
| | | //å°ç½é©¬æµæ°´è½¬ä¸ºæ°åæµæ°´ |
| | | int arabicValue=VciBaseUtil.convertRomanToArabic(currentFlowValue); |
| | | newThisSerialValue = (double)(arabicValue + secVO.getSerialStep()) ; |
| | | } |
| | | //è¦çæ¯å¦è¶
è¿æå¤§çæµæ°´å¼ |
| | | if (newThisSerialValue >= secVO.getCodeFillLimit()) { |
| | | throw new VciBaseException("æµæ°´å·å·²ç»è¶
è¿å
许çæå¤§æµæ°´å¼{0}", new String[]{secVO.getCodeFillLimit().toString()}); |
| | | } |
| | | //å°æ°åæµæ°´è½¬ä¸ºç½é©¬æµæ°´ |
| | | romanValue=VciBaseUtil.convertArabicToRoman(newThisSerialValue.intValue()); |
| | | } |
| | | //å°æ°åæµæ°´è½¬ä¸ºç½é©¬æµæ°´ |
| | | String romanValue=VciBaseUtil.convertArabicToRoman(newThisSerialValue.intValue()); |
| | | |
| | | return romanValue; |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.algorithm; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | public class Test { |
| | | |
| | | public static void main(String[] args) { |
| | | String []res={"5","6","7","8","3"}; |
| | | List<String> newList=Arrays.asList(res); |
| | | System.out.println(res); |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.annotation; |
| | | |
| | | import org.springframework.core.annotation.AliasFor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.annotation.ElementType; |
| | |
| | | public @interface MdmSerialAlgorithm { |
| | | |
| | | /** |
| | | * beançåç§° |
| | | * å¼ï¼å®é
å°±æ¯è¿ä¸ªæ³¨è§£æå¨çç±»çå
¨è·¯å¾ |
| | | * @return å¼ |
| | | */ |
| | | @AliasFor( |
| | | annotation = Component.class |
| | | ) |
| | | String value() default ""; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.code.applyjtcodeservice.vo.BaseModelVO; |
| | | import com.vci.ubcs.code.dto.CodeDeleteBatchDTO; |
| | | import com.vci.ubcs.code.dto.CodeExportAttrDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderSecDTO; |
| | | import com.vci.ubcs.code.dto.*; |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.code.service.MdmIOService; |
| | |
| | | public R processChangeStatus(@RequestBody FlowStatusDTO flowDTO){ |
| | | return engineService.processChangeStatus(flowDTO); |
| | | } |
| | | |
| | | /** |
| | | * æ åç³è¯·åä¿®è®¢ç¨ |
| | | * @param codeBZApplyDTO ç¼ç ç³è¯·ç¸å
³çä¿¡æ¯ï¼éè¦æå±æ§åç æ®µç¸å
³çä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @PostMapping("/addSaveBZ") |
| | | @VciBusinessLog(operateName = "ç³è¯·å个ç¼ç ") |
| | | public R addSaveBZ (@RequestBody CodeBZApplyDTO codeBZApplyDTO) throws Exception { |
| | | return R.success(engineService.addSaveBZ(codeBZApplyDTO)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.enumpack; |
| | | |
| | | import com.vci.ubcs.starter.web.enumpck.BaseEnum; |
| | | |
| | | /*** |
| | | * æ åæä½ç±»å |
| | | */ |
| | | public enum CodeBZOperationTypeEnum implements BaseEnum { |
| | | /** |
| | | * å¶å® |
| | | */ |
| | | CODE_BZ_FORMULATE("1","å¶å®"), |
| | | /** |
| | | * 修订 |
| | | */ |
| | | CODE_BZ_AMENDMENT("2","修订"), |
| | | /*** |
| | | * æ´æ¹ |
| | | */ |
| | | CODE_BZ_EDIT("3","æ´æ¹"), |
| | | |
| | | /*** |
| | | * ä½åº |
| | | */ |
| | | CODE_BZ_DISABLE("4","ä½åº"), |
| | | /*** |
| | | * 夿¥ |
| | | */ |
| | | CODE_BZ_FOR_REFERENCE("5"," 夿¥"); |
| | | |
| | | |
| | | /** |
| | | * æä¸¾çå¼ |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | /** |
| | | * è·åæä¸¾å¼ |
| | | * |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | @Override |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 设置æä¸¾å¼ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | */ |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾æ¾ç¤ºææ¬ |
| | | * |
| | | * @return æ¾ç¤ºææ¬ |
| | | */ |
| | | @Override |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¾ç¤ºææ¬ |
| | | * |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æé 彿° |
| | | * |
| | | * @param value å¼ |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | private CodeBZOperationTypeEnum(String value, String text) { |
| | | this.value = value; |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åç§°è·å对åºçæä¸¾å¼ |
| | | * |
| | | * @param text åç§° |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | public static String getValueByText(String text) { |
| | | for (CodeBZOperationTypeEnum wenum : CodeBZOperationTypeEnum.values()) { |
| | | if (wenum.getText().equalsIgnoreCase(text)) { |
| | | return wenum.getValue(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return åç§° |
| | | */ |
| | | public static String getTextByValue(String value) { |
| | | for (CodeBZOperationTypeEnum wenum : CodeBZOperationTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum.getText(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·åæä¸¾å¯¹è±¡ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return æä¸¾å¯¹è±¡ï¼ä¸å卿¶åè¿ånull |
| | | */ |
| | | public static CodeBZOperationTypeEnum forValue(String value) { |
| | | for (CodeBZOperationTypeEnum wenum : CodeBZOperationTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.code.applyjtcodeservice.vo.BaseModelVO; |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; |
| | | import com.vci.ubcs.code.dto.CodeBZApplyDTO; |
| | | import com.vci.ubcs.code.dto.CodeDeleteBatchDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | |
| | | * @param parameter ä¼ å
¥æ°æ®,classifyGroupCode:é
ç½®çä¸çå类顶èç¹ï¼oidï¼éæ©èç¹çoid |
| | | */ |
| | | R checkGroupCode(Map<String, String> parameter); |
| | | |
| | | /** |
| | | * æ åç³è¯·åä¿®è®¢ç¨ |
| | | * @param codeBZApplyDTO ç¼ç ç³è¯·ç¸å
³çä¿¡æ¯ï¼éè¦æå±æ§åç æ®µç¸å
³çä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | String addSaveBZ(CodeBZApplyDTO codeBZApplyDTO) throws Exception; |
| | | } |
| | |
| | | */ |
| | | Boolean recycleCode(String btmId, Collection<String> businessOidCollection); |
| | | |
| | | /** |
| | | * çæç¼ç --å¹¶ä¸ä¿åæ°æ®-æ¹æ³å éï¼å æ¤ä¸è½è¿åbatchCBO |
| | | * @param classifyFullInfoBO åç±»çå
¨é¨ä¿¡æ¯ |
| | | * @param templateVO 模æ¿çæ¾ç¤ºå¯¹è±¡ |
| | | * @param ruleVO ç¼ç è§åçæ¾ç¤ºå¯¹è±¡ |
| | | * @param secDTOList åä¸ªç æ®µçå¼ |
| | | * @param dataCBOList ä¸å¡æ°æ® |
| | | */ |
| | | List<String> productCodeAndSaveDataBZ(CodeClassifyFullInfoBO classifyFullInfoBO, CodeClassifyTemplateVO templateVO, |
| | | CodeRuleVO ruleVO, List<CodeOrderSecDTO> secDTOList, List<BaseModel> dataCBOList) throws Exception; |
| | | } |
| | |
| | | //Advised advised = (Advised)bean; |
| | | Class<?> targetClass = AopUtils.getTargetClass(bean); |
| | | //Class<?> targetClass = advised.getTargetSource().getTargetClass(); |
| | | algorithmVO.setClassFullName(targetClass.getName()); |
| | | // algorithmVO.setClassFullName(targetClass.getName()); |
| | | algorithmVO.setClassFullName(beanName); |
| | | MdmSerialAlgorithm serialAlgorithm = targetClass.getDeclaredAnnotation(MdmSerialAlgorithm.class); |
| | | if(serialAlgorithm==null){ |
| | | serialAlgorithm = targetClass.getAnnotation(MdmSerialAlgorithm.class); |
| | |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; |
| | | import com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.ubcs.code.dto.CodeBZApplyDTO; |
| | | import com.vci.ubcs.code.dto.CodeDeleteBatchDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderSecDTO; |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.enumpack.*; |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.UITablePageVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.code.wrapper.BaseMdodelWrapper; |
| | | import com.vci.ubcs.code.wrapper.CodeAllcodeWrapper; |
| | | import com.vci.ubcs.flow.core.dto.FlowStatusDTO; |
| | | import com.vci.ubcs.flow.core.feign.IMDMIFlowAttrClient; |
| | | import com.vci.ubcs.flow.core.vo.ProcessStageAttrVO; |
| | |
| | | */ |
| | | @Value("${batchadd.is_thread_import:false}") |
| | | private boolean IS_THREAD_IMPORT; |
| | | |
| | | /*** |
| | | * æä½ç±»å |
| | | */ |
| | | @Value("${bzApply.operationType:operationType}") |
| | | private String operationType; |
| | | /*** |
| | | * æ¯å¦ç³»å |
| | | */ |
| | | @Value("${bzApply.isSeries:isSeries}") |
| | | private String isSeries; |
| | | /*** |
| | | *å叿¶é´ |
| | | */ |
| | | @Value("${bzApply.releaseTime:releaseTime}") |
| | | private String releaseTime; |
| | | /*** |
| | | * æºæ åå· |
| | | */ |
| | | @Value("${bzApply.oldCode:oldCode}") |
| | | private String oldCode; |
| | | |
| | | /*** |
| | | * ç³»åæµæ°´ |
| | | */ |
| | | @Value("${bzApply.seriesFlow:seriesFlow}") |
| | | private String seriesFlow; |
| | | /*** |
| | | * æ¯å¦åæ´ç³»å |
| | | */ |
| | | @Value("${bzApply.isEditSeries:isEditSeries}") |
| | | private String isEditSeries; |
| | | /*** |
| | | * æ§å¶æ¯å¦åå
¥å¼çç æ®µåç§° |
| | | */ |
| | | @Value("${bzApply.secName:ç³»åå·}") |
| | | private String secName; |
| | | |
| | | /*** |
| | | * æ§å¶æ¯å¦åå
¥å¼çç æ®µåç§° |
| | | */ |
| | | @Value("${bzApply.yearSecName:年代å·}") |
| | | private String yearSecName; |
| | | |
| | | /** |
| | | * 模æ¿çæå¡ |
| | |
| | | return R.data("false"); |
| | | } |
| | | |
| | | /*** |
| | | * |
| | | * @param codeBZApplyDTO ç¼ç ç³è¯·ç¸å
³çä¿¡æ¯ï¼éè¦æå±æ§åç æ®µç¸å
³çä¿¡æ¯ |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public String addSaveBZ(CodeBZApplyDTO codeBZApplyDTO) throws Exception { |
| | | return addSaveBZCode(codeBZApplyDTO,true); |
| | | } |
| | | |
| | | /** |
| | | * æ åç³è¯·åä¿®è®¢ç¨ |
| | | * |
| | | * @param codeBZApplyDTO ç¼ç ç³è¯·ç¸å
³çä¿¡æ¯ï¼éè¦æå±æ§åç æ®µç¸å
³çä¿¡æ¯ |
| | | * @param authUser |
| | | * @return |
| | | */ |
| | | private String addSaveBZCode(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | String code=""; |
| | | VciBaseUtil.alertNotNull(codeBZApplyDTO.getCodeClassifyOid(), "主é¢åºåç±»ç主é®", |
| | | codeBZApplyDTO.getTemplateOid(), "模æ¿ç主é®", codeBZApplyDTO.getCodeRuleOid(), "ç¼ç è§åç主é®"); |
| | | //æä½ç±»å |
| | | if(StringUtils.isBlank(codeBZApplyDTO.getOperationType())){ |
| | | String operationTypeValue=codeBZApplyDTO.getData().get(operationType); |
| | | codeBZApplyDTO.setOperationType(operationTypeValue); |
| | | } |
| | | //æ¯å¦ç³»å |
| | | if(!codeBZApplyDTO.isSeries()){ |
| | | boolean isSeriesValue=codeBZApplyDTO.getData().get(isSeries).equals("true")?true:false; |
| | | codeBZApplyDTO.setSeries(isSeriesValue); |
| | | } |
| | | //åæ åå· |
| | | if(StringUtils.isBlank(codeBZApplyDTO.getOldCode())){ |
| | | String oldCodeValue=codeBZApplyDTO.getData().get(oldCode); |
| | | codeBZApplyDTO.setOldCode(oldCodeValue); |
| | | } |
| | | //ç³»åæµæ°´ |
| | | if(StringUtils.isBlank(codeBZApplyDTO.getSeriesFlow())){ |
| | | String seriesFlowValue=codeBZApplyDTO.getData().get(seriesFlow); |
| | | codeBZApplyDTO.setSeriesFlow(seriesFlowValue); |
| | | } |
| | | //å叿¶é´ |
| | | if(StringUtils.isBlank(codeBZApplyDTO.getReleaseTime())){ |
| | | String releaseTimeValue=codeBZApplyDTO.getData().get(releaseTime); |
| | | codeBZApplyDTO.setReleaseTime(releaseTimeValue); |
| | | } |
| | | //æ¯å¦åæ´ç³»å |
| | | if(!codeBZApplyDTO.isEditSeries()){ |
| | | boolean isEditSeriesValue=codeBZApplyDTO.getData().get(isEditSeries).equals("true")?true:false; |
| | | codeBZApplyDTO.setEditSeries(isEditSeriesValue); |
| | | } |
| | | VciBaseUtil.alertNotNull(codeBZApplyDTO.getOperationType(), "æä½ç±»å", |
| | | codeBZApplyDTO.isSeries(), "æ¯å¦ç³»å", codeBZApplyDTO.getReleaseTime(), "å叿¶é´"); |
| | | |
| | | if(codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_FORMULATE.getValue())){//å¶å® |
| | | code= addsaveDataBZ(codeBZApplyDTO,authUser); |
| | | }else if(codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_AMENDMENT.getValue())){//修订 |
| | | VciBaseUtil.alertNotNull(codeBZApplyDTO.getOldCode(), "æºæ åå·"); |
| | | code= amendmentDataBZ(codeBZApplyDTO,authUser); |
| | | createChangeOder(code,codeBZApplyDTO,authUser); |
| | | }else if(codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_EDIT.getValue())){//æ´æ¹ |
| | | code= amendmentDataBZ(codeBZApplyDTO,authUser); |
| | | createChangeOder(code,codeBZApplyDTO,authUser); |
| | | }else if(codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_DISABLE.getValue())) {//ä½åº |
| | | code= amendmentDataBZ(codeBZApplyDTO,authUser); |
| | | createChangeOder(code,codeBZApplyDTO,authUser); |
| | | }else if(codeBZApplyDTO.getOperationType().equals(CodeBZOperationTypeEnum.CODE_BZ_AMENDMENT.getValue())) {//夿¥ |
| | | code= amendmentDataBZ(codeBZApplyDTO,authUser); |
| | | createChangeOder(code,codeBZApplyDTO,authUser); |
| | | } |
| | | return code; |
| | | } |
| | | |
| | | /*** |
| | | * 修订 |
| | | * @param codeBZApplyDTO |
| | | * @param authUser |
| | | * @return |
| | | */ |
| | | private String amendmentDataBZ(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | CodeOrderDTO orderDTO=new CodeOrderDTO(); |
| | | BeanUtil.convert(codeBZApplyDTO,orderDTO); |
| | | CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(codeBZApplyDTO.getCodeRuleOid()); |
| | | Map<String, CodeBasicSecVO> codeCodeBasicSecMap = ruleVO.getSecVOList().stream().filter(s -> StringUtils.isNotBlank(s.getOid())).collect(Collectors.toMap(s -> s.getOid().toLowerCase(Locale.ROOT), t -> t)); |
| | | VciBaseUtil.alertNotNull(orderDTO, "ç¼ç ç³è¯·ç¸å
³ç屿§åç æ®µçå
容é½ä¸ºç©º", orderDTO.getCodeClassifyOid(), "主é¢åºåç±»ç主é®", |
| | | orderDTO.getTemplateOid(), "模æ¿ç主é®", orderDTO.getCodeRuleOid(), "ç¼ç è§åç主é®"); |
| | | String oldCode=codeBZApplyDTO.getOldCode();//æºæ åç¼ç |
| | | String releaseTime=codeBZApplyDTO.getReleaseTime(); |
| | | List<CodeOrderSecDTO> secDTOS= orderDTO.getSecDTOList(); |
| | | LinkedList<CodeOrderSecDTO> newSecDTOList=new LinkedList<>(); |
| | | changeCodeOrderSecDTO(ruleVO,secDTOS,oldCode,newSecDTOList);//æ ¹æ®è¦æ±éæ°ç®ç 段ç å¼ |
| | | if(!codeBZApplyDTO.isEditSeries()){//åæ´ä¸ºæ å |
| | | if(!codeBZApplyDTO.isSeries()){//妿æ¯è¡¨åï¼åéè¦å°ç³»åå¥½æµæ°´ç½®ä¸ºnull |
| | | //å ä¸ºæ¯æ ååæ§å¶ç 段ä¸çç³»åæµæ°´ç æ®µå¼ä¸ºç©º |
| | | newSecDTOList.stream().forEach(codeOrderSecDTO -> { |
| | | if(codeCodeBasicSecMap.containsKey(codeOrderSecDTO.getSecOid())&&codeCodeBasicSecMap.get(codeOrderSecDTO.getSecOid()).getName().equals(secName)){ |
| | | codeOrderSecDTO.setSecValue(""); |
| | | } |
| | | }); |
| | | } |
| | | orderDTO.setSecDTOList(newSecDTOList); |
| | | return createDataBZ(orderDTO,ruleVO,authUser); |
| | | }else{//åæ´ä¸ºç³»å.åæç
§é»è¾å»å¤ç |
| | | orderDTO.setSecDTOList(newSecDTOList); |
| | | return createDataBZ(orderDTO,ruleVO,authUser); |
| | | } |
| | | } |
| | | private String createDataBZ(CodeOrderDTO orderDTO, CodeRuleVO ruleVO,boolean authUser) throws Exception { |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | CodeClassifyTemplateVO templateVO = templateService.getObjectHasAttrByOid(orderDTO.getTemplateOid()); |
| | | //1.夿è§åä¸é¤äºæµæ°´ç æ®µï¼æ¯å¦æå
¶ä»ç 段 |
| | | checkSecValueOnOrder(ruleVO, orderDTO); |
| | | //2.夿å¿
è¾é¡¹ |
| | | checkRequiredAttrOnOrder(templateVO, orderDTO); |
| | | //3.å
注å
¥ï¼åç»åï¼æåæ ¡éª |
| | | switchClassifyLevelOnOrder(templateVO, classifyFullInfo, orderDTO); |
| | | //4.å¤çç»åè§åãç»åè§åä¸è½ä½¿ç¨ç¼ç ç屿§ï¼å 为ç¼ç ççæå¯è½æ¯éè¦å±æ§ç |
| | | switchComponentAttrOnOrder(templateVO, orderDTO); |
| | | //5.æ ¡éªè§å |
| | | checkVerifyOnOrder(templateVO, orderDTO); |
| | | //6.å
³é®å±æ§ |
| | | checkKeyAttrOnOrder(classifyFullInfo, templateVO, orderDTO); |
| | | //7.æä¸¾è½¬æ¢ |
| | | checkEnumOnOrder(templateVO, orderDTO); |
| | | //8.å¤çæ¶é´æ ¼å¼ï¼å¨æ°æ®åºéé¢ä¸è®ºæ¯åç¬¦ä¸²è¿æ¯æ¥ææ ¼å¼ï¼é½ä½¿ç¨ç¸åçæ ¼å¼åå¨ |
| | | switchDateAttrOnOrder(templateVO, orderDTO); |
| | | //9.çæç¼ç çä¿¡æ¯ ï¼åå§åä¸å¡ç±»åï¼ç¼åå
åæ¶ï¼å ä¸ºçæ¬è§åä¼åºç°åå¨çæ
åµæä»¥æ æ³ä½¿ç¨ç¼å |
| | | // BaseModel cbo = createCBOByBtmName(classifyFullInfo.getTopClassifyVO().getBtmTypeId()); |
| | | BaseModel cbo = createBaseModel(classifyFullInfo.getTopClassifyVO().getBtmTypeId().trim().toLowerCase()); |
| | | //é»è®¤ç屿§é½ä¸ç¨ä»å端æ·è´ |
| | | //设置ç¼ç éè¦çé»è®¤å±æ§çå
容 |
| | | copyValueToCBO(classifyFullInfo, cbo, orderDTO, templateVO, false); |
| | | cbo.setOid(VciBaseUtil.getPk()); |
| | | cbo.setRevisionOid(VciBaseUtil.getPk()); |
| | | cbo.setNameOid(VciBaseUtil.getPk()); |
| | | cbo.setCreateTime(new Date()); |
| | | cbo.setLastModifyTime(new Date()); |
| | | //cbo.setCreator(String.valueOf(AuthUtil.getUser().getUserId()));ã |
| | | if(authUser) { |
| | | // è¦æ±æ¾ç¤ºè´¦å·ï¼æä»¥åäºæ´æ¹ |
| | | cbo.setCreator(String.valueOf(AuthUtil.getUser().getAccount())); |
| | | cbo.setLastModifier(String.valueOf(AuthUtil.getUser().getAccount())); |
| | | }else{ |
| | | cbo.setCreator(orderDTO.getCreator()); |
| | | cbo.setLastModifier(orderDTO.getLastModifier()); |
| | | } |
| | | cbo.setTenantId(AuthUtil.getTenantId()); |
| | | if(StringUtils.isNotBlank(orderDTO.getLcStatus())||StringUtils.isNotBlank(orderDTO.getData().get("lcStatus"))){ |
| | | cbo.setLcStatus(StringUtils.isNotBlank(orderDTO.getLcStatus())?orderDTO.getLcStatus():orderDTO.getData().get("lcStatus")); |
| | | } |
| | | //TODO:å 为é»è®¤ç屿§é½ä¸æ·è´ï¼ç®åéå¢ç å«nameï¼å¹¶æ²¡æä»DTOæ·è´å°cboéãå¢å ä¸ä¸ªåç¬å¤çï¼ä»¥ååçè¦ä¸è¦è°æ´ |
| | | cbo.setName(orderDTO.getName() == null ? "" : orderDTO.getName()); |
| | | //end -- modify by lihang @20220407 |
| | | List<BaseModel> cboList = new ArrayList<>(); |
| | | //夿³¨ |
| | | cbo.setDescription(orderDTO.getDescription()); |
| | | cboList.add(cbo); |
| | | List<String> codeList = productCodeService.productCodeAndSaveDataBZ(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), cboList); |
| | | batchSaveSelectChar(templateVO, cboList); |
| | | return codeList.size() > 0 ? codeList.get(0) : ""; |
| | | |
| | | } |
| | | /*** |
| | | * æ ¹æ®ç¼å·è·åç æ®µç å¼ |
| | | * @param secDTOList |
| | | */ |
| | | private void changeCodeOrderSecDTO(CodeRuleVO ruleVO,List<CodeOrderSecDTO> secDTOList,String oldCode,LinkedList<CodeOrderSecDTO> newSecDTOList) throws Exception { |
| | | |
| | | //è¿éè¦ä¿®æ¹allCodeççå½å¨æ |
| | | QueryWrapper<CodeAllCode> allCodeWrapper = new QueryWrapper<>(); |
| | | allCodeWrapper.in("id", VciBaseUtil.str2List(oldCode)); |
| | | Map<String,String> secDTOMap=secDTOList.stream().collect(Collectors.toMap(s -> s.getSecOid(), t -> t.getSecValue(),(o1, o2)->o2)); |
| | | List<CodeAllCode>codeAllcodeList=codeAllCodeService.selectByWrapper(allCodeWrapper); |
| | | if(!CollectionUtils.isEmpty(codeAllcodeList)){ |
| | | String codeDelimit=codeAllcodeList.get(0).getCodeDelimit(); |
| | | String[] secValues=StringUtils.splitByWholeSeparatorPreserveAllTokens(codeDelimit,SERIAL_VALUE_SPACE); |
| | | //VciBaseUtil.str2List() |
| | | for (int i=0; i<ruleVO.getSecVOList().size();i++){ |
| | | CodeBasicSecVO codeBasicSecVO=ruleVO.getSecVOList().get(i); |
| | | CodeOrderSecDTO codeOrderSecDTO=new CodeOrderSecDTO(); |
| | | String secValue=secValues[i]; |
| | | boolean isRoman=VciBaseUtil.isRoman(secValue); |
| | | if(isRoman){ |
| | | continue; |
| | | } |
| | | if(secDTOMap.containsKey(codeBasicSecVO.getOid())){ |
| | | secValue= secDTOMap.get(codeBasicSecVO.getOid()) ; |
| | | } |
| | | if(StringUtils.isNotBlank(secValue)) { |
| | | codeOrderSecDTO.setSecOid(codeBasicSecVO.getOid()); |
| | | codeOrderSecDTO.setSecValue(secValue); |
| | | newSecDTOList.add(codeOrderSecDTO); |
| | | } |
| | | } |
| | | }else{ |
| | | throw new Exception("æ ¹æ®åæ åç¼å·ï¼å¨ç³»ç»ä¸æªæ¥è¯¢å°ç¸åºçä¿¡æ¯"); |
| | | } |
| | | } |
| | | /*** |
| | | * å¶å®ï¼åä¸éè¦äº§çæ´æ¹åç´æ¥çæç¼ç |
| | | * @param codeBZApplyDTO |
| | | * @param authUser |
| | | * @return |
| | | */ |
| | | private String addsaveDataBZ(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | String code=""; |
| | | CodeOrderDTO orderDTO=new CodeOrderDTO(); |
| | | BeanUtil.convert(codeBZApplyDTO,orderDTO); |
| | | CodeRuleVO ruleVO = ruleService.getObjectHasSecByOid(codeBZApplyDTO.getCodeRuleOid()); |
| | | Map<String, CodeBasicSecVO> codeCodeBasicSecMap = ruleVO.getSecVOList().stream().filter(s -> StringUtils.isNotBlank(s.getOid())).collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | | //æ¯å¦æ¯æ å,䏿¯æ åçä¸ä¼å»ç®¡ |
| | | if(!codeBZApplyDTO.isSeries()){ |
| | | //å ä¸ºæ¯æ ååæ§å¶ç 段ä¸çç³»åæµæ°´ç æ®µå¼ä¸ºç©º |
| | | orderDTO.getSecDTOList().stream().forEach(codeOrderSecDTO -> { |
| | | if(codeCodeBasicSecMap.containsKey(codeOrderSecDTO.getSecOid())&&codeCodeBasicSecMap.get(codeOrderSecDTO.getSecOid()).getName().equals(secName)){ |
| | | codeOrderSecDTO.setSecValue(""); |
| | | } |
| | | }); |
| | | } |
| | | VciBaseUtil.alertNotNull(orderDTO, "ç¼ç ç³è¯·ç¸å
³ç屿§åç æ®µçå
容é½ä¸ºç©º", orderDTO.getCodeClassifyOid(), "主é¢åºåç±»ç主é®", |
| | | orderDTO.getTemplateOid(), "模æ¿ç主é®", orderDTO.getCodeRuleOid(), "ç¼ç è§åç主é®"); |
| | | return createDataBZ(orderDTO,ruleVO,authUser); |
| | | } |
| | | |
| | | /*** |
| | | * æ´æ¹åçå建 |
| | | * @param code |
| | | * @param codeBZApplyDTO |
| | | * @param authUser |
| | | * @return |
| | | */ |
| | | private String createChangeOder(String code,CodeBZApplyDTO codeBZApplyDTO, boolean authUser){ |
| | | |
| | | return ""; |
| | | |
| | | } |
| | | /*** |
| | | * éæå¯åç æ®µç³è¯·æ¥å£ |
| | | * @param codeBZApplyDTO ç³è¯·çä¿¡æ¯ï¼éè¦å
å«å±æ§çå
容åç æ®µç¸å
³çå
容 |
| | | * @param authUser æ¯å¦ç¨ç»å½ç¨æ·è®°å½ |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public String addSaveBZCodeNotauthUser(CodeBZApplyDTO codeBZApplyDTO, boolean authUser) throws Exception { |
| | | return addSaveBZCode(codeBZApplyDTO,authUser); |
| | | } |
| | | |
| | | /** |
| | | * å°è£
å
³é®å±æ§çæ¥è¯¢è¯å¥ |
| | | * |
| | |
| | | //ä¸å¿½ç¥å¤§å°åãä¸å»ç©ºãä¸å¿½ç¥å
¨åè§ |
| | | temp = "%s"; |
| | | } |
| | | queryKey = String.format(temp, "nvl("+ "t." + attrId +",'/')"); |
| | | queryKey = String.format(temp, "nvl("+ "t." + attrId +",'/')"); |
| | | queryValue = String.format(temp, "'" + (trim ? value.trim() : value) + "'"); |
| | | conditionMap.put(queryKey, queryValue); |
| | | } else { |
| | |
| | | toBo.setVersionSeq(Integer.valueOf(nextRevision.get("VERSIONSEQ").toString())); |
| | | toBo.setVersionValue(nextRevision.get("VERSIONVAL").toString()); |
| | | toBo.setLctid(fromBo.getLctid()); |
| | | toBo.setLcStatus("Editing"); |
| | | //toBo.setLcStatus("Editing"); |
| | | toBo.setLcStatus(CodeDefaultLC.RELEASED.getValue()); |
| | | toBo.setId(fromBo.getId()); |
| | | toBo.setName(fromBo.getName()); |
| | | toBo.setDescription(fromBo.getDescription()); |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.vci.ubcs.code.algorithm.CustomSerialEnum; |
| | | import com.vci.ubcs.code.annotation.MdmSerialAlgorithm; |
| | | import com.vci.ubcs.code.annotation.MdmSerialAlgorithmMethod; |
| | | import com.vci.ubcs.code.dto.CodeCustomSerialDTO; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.vci.ubcs.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.ubcs.starter.web.constant.RegExpConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum; |
| | | import com.vci.ubcs.starter.web.util.ApplicationContextProvider; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.concurrent.atomic.AtomicReference; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.*; |
| | | import static com.vci.ubcs.code.enumpack.CodeSecTypeEnum.CODE_SERIAL_SEC; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class MdmProductCodeServiceImpl implements MdmProductCodeService { |
| | |
| | | Map<String/**ç æ®µç主é®**/,String/**ç æ®µçå¼**/> serialValueMap = new HashMap<>(); |
| | | Map<String, CodeBasicSecVO> secVOMap = secVOList.stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | | Map<String,Integer> serialSecOidIndexMap=new HashMap<>(); |
| | | LinkedList<String> codeValueList=new LinkedList<>(); |
| | | for (int i = 0; i < secLengths.length; i++) { |
| | | CodeBasicSecVO secVO = secVOList.get(i); |
| | | String thisSecValue = ""; |
| | |
| | | serialUnitList.add(thisSecValue); |
| | | serialSecOidIndexMap.put(secVO.getOid(),i); |
| | | } |
| | | if(CodeSecTypeEnum.CODE_SERIAL_SEC.getValue().equalsIgnoreCase(secVO.getSecType())){ |
| | | if(CODE_SERIAL_SEC.getValue().equalsIgnoreCase(secVO.getSecType())){ |
| | | serialValueMap.put(secVO.getOid(),thisSecValue); |
| | | } |
| | | codeValueList.add(thisSecValue); |
| | | } |
| | | List<String> serialUnFileStringList = new ArrayList<>(); |
| | | AtomicReference<String> newSerialUnitString = new AtomicReference<>(""); |
| | |
| | | String unFillSerial =serialUnFileStringList.size()==1?serialUnFileStringList.get(0)+ SERIAL_VALUE_SPACE:serialUnFileStringList.stream().collect(Collectors.joining(SERIAL_VALUE_SPACE)); |
| | | allCodeDO.setUnFillSerial(unFillSerial); |
| | | allCodeDO.setLcStatus(cbo.getLcStatus()); |
| | | allCodeDO.setCodeDelimit(codeValueList.stream().collect(Collectors.joining(SERIAL_VALUE_SPACE)));//æ·»å 龿¥ç¬¦ |
| | | allCodeDOList.add(allCodeDO); |
| | | }); |
| | | //å¤çæå¤§çæµæ°´å· |
| | |
| | | sb.append(serialValue).append(SERIAL_VALUE_SPACE); |
| | | } |
| | | } |
| | | String codeDelimiter=thisSecValueList.stream().collect(Collectors.joining(SERIAL_VALUE_SPACE)); |
| | | //è¦å卿åçå
¨é¨allcode |
| | | wrapperAllCode(classifyFullInfoBO, finalRuleVO, cbo, templateVO, allCodeDOList, serialUnitString, sb.toString()); |
| | | wrapperAllCode(classifyFullInfoBO, finalRuleVO, cbo, templateVO, allCodeDOList, serialUnitString, sb.toString(),codeDelimiter); |
| | | } |
| | | //å¤çæå¤§æµæ°´ |
| | | saveSerialValue( finalRuleVO, lastMaxSerialValueMap, maxSerialValueMap); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è½¬æ¢æµæ°´ç 段çå¼ |
| | | * @param serialSecVOList æµæ°´ç 段 |
| | | * @param secDTOS;æµæ°´å¼ |
| | | * @param attrSevIsSerialDepend æ¯å¦æå±æ§ç 段å䏿µæ°´ |
| | | * @param ruleVO è§åçå
容 |
| | | * @param serialUnitMap æµæ°´ä¾æ® |
| | | * @param maxSerialValueMap æå¤§çæµæ°´å· |
| | | * @param thisSecValueList æ¬æ¬¡çç å¼ |
| | | * @param lastMaxSerialValueMap å°è£
å |
| | | * @param firstData æ¯å¦ä¸ºç¬¬ä¸æ¡æ°æ® |
| | | */ |
| | | private void switchSerialSecValueBZ(BaseModel cbo,List<CodeOrderSecDTO> secDTOS, List<CodeBasicSecVO> serialSecVOList,boolean attrSevIsSerialDepend, |
| | | CodeRuleVO ruleVO,Map<String,String> serialUnitMap, |
| | | Map<String/**ç æ®µç主é®**/,Map<String/**æµæ°´ä¾æ®**/,CodeSerialValue>> maxSerialValueMap,List<String> thisSecValueList, |
| | | Map<String/**ç æ®µç主é®**/,Map<String/**æµæ°´ä¾æ®**/, String>> lastMaxSerialValueMap,boolean firstData){ |
| | | if (!CollectionUtils.isEmpty(serialSecVOList)) { |
| | | Map<String/**ç æ®µoid**/, String/**ç æ®µç å¼**/> attrNameIdMap = secDTOS.stream().collect(Collectors.toMap(s -> s.getSecOid(), t -> t.getSecValue().toLowerCase(Locale.ROOT),(o1, o2)->o2)); |
| | | Map<String,String> secIdserialValueMap=new LinkedHashMap<>(); |
| | | for (int j = 0; j < serialSecVOList.size(); j++) { |
| | | AtomicReference<String> serialUnitString= new AtomicReference<>(""); |
| | | CodeBasicSecVO secVO = serialSecVOList.get(j); |
| | | String secVOValue=""; |
| | | if(attrNameIdMap.containsKey(secVO.getOid())){ |
| | | secVOValue=attrNameIdMap.get(secVO.getOid()); |
| | | if(StringUtils.isNotBlank(secVOValue)){ |
| | | continue; |
| | | } |
| | | } |
| | | if(serialUnitMap.containsKey(secVO.getOid())){ |
| | | serialUnitString.set(serialUnitMap.get(secVO.getOid())); |
| | | secIdserialValueMap.forEach((key,vaule)->{ |
| | | serialUnitString.set(serialUnitString.get().replace("${"+key+"}", vaule)); |
| | | }); |
| | | if (attrSevIsSerialDepend || firstData) { |
| | | QueryWrapper<CodeSerialValue> codeSerialWrapper = new QueryWrapper<>(); |
| | | codeSerialWrapper.eq("codeRuleOid", ruleVO.getOid()); |
| | | codeSerialWrapper.eq("serialUnit", serialUnitString.get()); |
| | | codeSerialWrapper.eq("codeSecOid", secVO.getOid()); |
| | | List<CodeSerialValue> serialValueDOS = serialValueMapper.selectList(codeSerialWrapper); |
| | | if (!CollectionUtils.isEmpty(serialValueDOS)) { |
| | | Map<String, CodeSerialValue> unitSerialMap = maxSerialValueMap.getOrDefault(secVO.getOid(), new HashMap<>()); |
| | | CodeSerialValue serialValueDO = serialValueDOS.get(0); |
| | | unitSerialMap.put(serialValueDO.getSerialUnit(),serialValueDO); |
| | | maxSerialValueMap.put(secVO.getOid(), unitSerialMap); |
| | | } |
| | | } |
| | | String serialString=""; |
| | | String thisSerialValue = ""; |
| | | String startValue = null; |
| | | if (maxSerialValueMap.containsKey(secVO.getOid()) && maxSerialValueMap.get(secVO.getOid()).containsKey(serialUnitString.get())) { |
| | | startValue = maxSerialValueMap.get(secVO.getOid()).get(serialUnitString.get()).getMaxSerial(); |
| | | } |
| | | if (lastMaxSerialValueMap.containsKey(secVO.getOid()) && lastMaxSerialValueMap.get(secVO.getOid()).containsKey(serialUnitString.get())) { |
| | | //说æå¤ä¸ªç³è¯·ï¼ä¹åå·²ç»å äºæµæ°´å·äº |
| | | startValue = lastMaxSerialValueMap.get(secVO.getOid()).get(serialUnitString.get()); |
| | | } |
| | | if(StringUtils.isNotBlank(secVO.getCustomCodeSerialClass())){//èªå®ä¹æµæ°´å¤ç |
| | | String currentFlowValue=startValue; |
| | | CodeCustomSerialDTO codeCustomSerialDTO=new CodeCustomSerialDTO(); |
| | | codeCustomSerialDTO.setSerialUnitString(serialUnitString.get()); |
| | | codeCustomSerialDTO.setSerialCodeCodeBasicSec(secVO); |
| | | codeCustomSerialDTO.setCurrentFlowValue(startValue); |
| | | codeCustomSerialDTO.setCodeBasicSecVOList(ruleVO.getSecVOList()); |
| | | codeCustomSerialDTO.setCodeRuleOid(ruleVO.getOid()); |
| | | codeCustomSerialDTO.setBaseModel(cbo); |
| | | codeCustomSerialDTO.setSerialUnitString(serialUnitString.get()); |
| | | codeCustomSerialDTO.setSecValueList(thisSecValueList); |
| | | thisSerialValue=customCodeSerial(secVO.getCustomCodeSerialClass(),codeCustomSerialDTO); |
| | | serialUnitString.set(codeCustomSerialDTO.getSerialUnitString()); |
| | | log.info(secVO.getCustomCodeSerialClassText()+"---->"+thisSerialValue); |
| | | }else { |
| | | Double newThisSerialValue = 0d; |
| | | if (startValue == null) { |
| | | //第ä¸ä¸ªç¼ç |
| | | newThisSerialValue = VciBaseUtil.getDouble(secVO.getSerialStart()); |
| | | } else { |
| | | //æµæ°´å·è¯å®æ¯æ°å |
| | | newThisSerialValue = Double.parseDouble(startValue) + (j + 1) * secVO.getSerialStep(); |
| | | } |
| | | //è¦çæ¯å¦è¶
è¿æå¤§çæµæ°´å¼ |
| | | if (newThisSerialValue >= secVO.getCodeFillLimit()) { |
| | | throw new VciBaseException("æµæ°´å·å·²ç»è¶
è¿å
许çæå¤§æµæ°´å¼{0}", new String[]{secVO.getCodeFillLimit().toString()}); |
| | | } |
| | | thisSerialValue=String.valueOf(newThisSerialValue.intValue()); |
| | | } |
| | | //è¦çè¡¥ä½çå
容 |
| | | Integer fillLength = VciBaseUtil.getInt(secVO.getCodeFillLength()); |
| | | if (fillLength == 0 || fillLength > VciBaseUtil.getInt(secVO.getCodeSecLength())) { |
| | | //鲿¢å¨æ·»å çå°æ¹æ²¡ææ§å¶æ£ç¡® |
| | | fillLength = VciBaseUtil.getInt(secVO.getCodeSecLength()); |
| | | } |
| | | serialString = thisSerialValue; |
| | | serialString = fillString(fillLength, OsCodeFillTypeEnum.forValue(secVO.getCodeFillType()), serialString, secVO.getCodeFillSeparator()); |
| | | for (int z = 0; z < thisSecValueList.size(); z++) { |
| | | String secValue = thisSecValueList.get(z); |
| | | if (secValue.equalsIgnoreCase("${" + secVO.getOid() + "}")) { |
| | | // TODO: æµæ°´çæç å¼åæ¼æ¥ååç¼ |
| | | thisSecValueList.set(z, joinPreffixAndSuffix(secVO, serialString)); |
| | | } |
| | | } |
| | | secIdserialValueMap.put(secVO.getOid(),thisSerialValue);//è®°å½æµæ°´ç 段å½åçå¼ |
| | | if(StringUtils.isNotBlank(thisSerialValue)) { |
| | | Map<String, String> unitSerialMap = lastMaxSerialValueMap.getOrDefault(secVO.getOid(), new HashMap<>()); |
| | | unitSerialMap.put(serialUnitString.get(), String.valueOf(thisSerialValue)); |
| | | lastMaxSerialValueMap.put(secVO.getOid(), unitSerialMap); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è½¬æ¢æµæ°´ç 段çå¼ |
| | | * @param serialSecVOList æµæ°´ç 段 |
| | |
| | | codeCustomSerialDTO.setCodeBasicSecVOList(ruleVO.getSecVOList()); |
| | | codeCustomSerialDTO.setCodeRuleOid(ruleVO.getOid()); |
| | | codeCustomSerialDTO.setBaseModel(cbo); |
| | | codeCustomSerialDTO.setSerialUnitString(newSerialUnitString.get()); |
| | | codeCustomSerialDTO.setSecValueList(thisSecValueList); |
| | | thisSerialValue=customCodeSerial(secVO.getCustomCodeSerialClass(),codeCustomSerialDTO); |
| | | newSerialUnitString.set(codeCustomSerialDTO.getSerialUnitString()); |
| | | log.info(secVO.getCustomCodeSerialClassText()+"---->"+thisSerialValue); |
| | | }else { |
| | | Double newThisSerialValue = 0d; |
| | |
| | | } |
| | | } |
| | | |
| | | private String customCodeSerial(String className, CodeCustomSerialDTO codeCustomSerialDTO){ |
| | | private String customCodeSerial(String beanName, CodeCustomSerialDTO codeCustomSerialDTO){ |
| | | AtomicReference<String> result = new AtomicReference<>(""); |
| | | //BusAnnotationUtil.callForAnnotation(FlowNotifyWeb.class, FlowNotifyBefore.class,noticeInfo); |
| | | //å¨ç»å½ä¹åï¼ççæ¯å¦ææä»¶ |
| | | Map<String, Object> beanMap = ApplicationContextProvider.getApplicationContext().getBeansWithAnnotation(MdmSerialAlgorithm.class); |
| | | if (!CollectionUtils.isEmpty(beanMap)) { |
| | | if(beanMap.containsKey(beanName)){ |
| | | Object v=beanMap.get(beanName); |
| | | Method[] methods = v.getClass().getDeclaredMethods(); |
| | | if (methods != null && methods.length > 0) { |
| | | for (Method method : methods) { |
| | | if (method.isAnnotationPresent(MdmSerialAlgorithmMethod.class)) { |
| | | try { |
| | | Object o= method.invoke(v, codeCustomSerialDTO); |
| | | result.set(Func.isEmpty(o) ?"":o.toString()); |
| | | } catch (Throwable e) { |
| | | if (log.isErrorEnabled()) { |
| | | log.error("è°ç¨æä»¶åºé", e); |
| | | } |
| | | throw new VciBaseException("è°ç¨æä»¶åºé,{0},{1}", new String[]{v.getClass().getName(), method.getName()}, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /* |
| | | String result = ""; |
| | | try { |
| | | Class classInstance=Class.forName(className); |
| | |
| | | throw new VciBaseException("æ§è¡èªå®ä¹æµæ°´ç®æ³å¤çæ¹æ³åºç°å¼å¸¸"); |
| | | } catch (InstantiationException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return result; |
| | | }*/ |
| | | return result.get(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param cbo ä¸å¡æ°æ® |
| | | * @param templateVO 模æ¿çä¿¡æ¯ |
| | | * @param allCodeDOList ææçç å¼ç对象å表 |
| | | * @param codeDelimiter ç å¼åå²ç¬¦ |
| | | */ |
| | | private void wrapperAllCode(CodeClassifyFullInfoBO classifyFullInfoBO, CodeRuleVO ruleVO, |
| | | BaseModel cbo, CodeClassifyTemplateVO templateVO, |
| | | List<CodeAllCode> allCodeDOList, String serialUnitString, String serialValueString){ |
| | | List<CodeAllCode> allCodeDOList, String serialUnitString, String serialValueString,String codeDelimiter){ |
| | | CodeAllCode allCodeDO = new CodeAllCode(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCodeDO, MdmBtmTypeConstant.CODE_ALL_CODE); |
| | | allCodeDO.setCodeClassifyOid(classifyFullInfoBO.getCurrentClassifyVO().getOid()); |
| | |
| | | allCodeDO.setSerialUnit(serialUnitString); |
| | | allCodeDO.setUnFillSerial(serialValueString); |
| | | allCodeDO.setLcStatus(cbo.getLcStatus()); |
| | | allCodeDO.setCodeDelimit(codeDelimiter); |
| | | allCodeDOList.add(allCodeDO); |
| | | } |
| | | |
| | |
| | | return updateFlag.get(); |
| | | } |
| | | |
| | | /*** |
| | | * |
| | | * @param classifyFullInfoBO åç±»çå
¨é¨ä¿¡æ¯ |
| | | * @param templateVO 模æ¿çæ¾ç¤ºå¯¹è±¡ |
| | | * @param ruleVO ç¼ç è§åçæ¾ç¤ºå¯¹è±¡ |
| | | * @param secDTOList åä¸ªç æ®µçå¼ |
| | | * @param dataCBOList ä¸å¡æ°æ® |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<String> productCodeAndSaveDataBZ(CodeClassifyFullInfoBO classifyFullInfoBO, CodeClassifyTemplateVO templateVO, CodeRuleVO ruleVO, List<CodeOrderSecDTO> secDTOList, List<BaseModel> dataCBOList) throws Exception { |
| | | dataCBOList = dataCBOList.stream().sorted(((o1, o2) -> o1.getCreateTime().compareTo(o2.getCreateTime()))).collect(Collectors.toList()); |
| | | List<String> codeList = new ArrayList<>(); |
| | | final CodeRuleVO finalRuleVO = ruleVO; |
| | | |
| | | List<CodeBasicSecVO> secVOList = finalRuleVO.getSecVOList().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); |
| | | List<String> serialUnitList = new LinkedList<>(); |
| | | List<String> secValueList = new ArrayList<>(); |
| | | Map<String, String> secValueMap = secDTOList.stream().collect(Collectors.toMap(s -> s.getSecOid(), s -> s.getSecValue()==null?"":s.getSecValue())); |
| | | List<CodeBasicSecVO> serialSecVOList = new ArrayList<>(); |
| | | List<CodeBasicSecVO> attrSecVOList = new ArrayList<>(); |
| | | Map<String,String> secOdserialUnitMap=new HashMap<>(); |
| | | LinkedHashMap<String,String> newSecValueMap=new LinkedHashMap<>(); |
| | | for (int i = 0; i < secVOList.size(); i++) { |
| | | CodeBasicSecVO secVO = secVOList.get(i); |
| | | String secValue=""; |
| | | String secOid=secVO.getOid(); |
| | | if(secValueMap.containsKey(secOid)){ |
| | | secValue=secValueMap.get(secOid); |
| | | } |
| | | newSecValueMap.put(secOid,secValue); |
| | | switchSecValueBZ(secVO, secValueMap, classifyFullInfoBO, serialSecVOList, attrSecVOList, serialUnitList, secValueList); |
| | | //åæ®µå卿µæ°´ä¾èµ |
| | | if(secVO.getSecType().equals(CodeSecTypeEnum.CODE_SERIAL_SEC.getValue())){ |
| | | List<String> newSerialUnitList= serialUnitList.stream().filter(secValueStr -> { |
| | | return !secValueStr.equals("${"+secVO.getOid()+"}"); |
| | | }).collect(Collectors.toList()); |
| | | String serialUnitString = serialUnitList.size() == 0 ? EMPTY_SERIAL_UNIT : newSerialUnitList.stream().collect(Collectors.joining(SERIAL_UNIT_SPACE)); |
| | | secOdserialUnitMap.put(secVO.getOid(),serialUnitString); |
| | | } |
| | | } |
| | | //å¤ç屿§ç æ®µåæµæ°´ç æ®µ |
| | | Map<String/**æµæ°´ç 段ç主é®**/, Map<String/**æµæ°´ä¾æ®**/, String>> lastMaxSerialValueMap = new HashMap<>(); |
| | | List<CodeAllCode> allCodeDOList = new ArrayList<>(); |
| | | //å·²ç»åå¨çæå¤§æµæ°´å·çå
容 |
| | | Map<String/**ç æ®µç主é®**/, Map<String, CodeSerialValue>> maxSerialValueMap = new HashMap<>(); |
| | | 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)); |
| | | } |
| | | List<String> thisSerialUnitList = new LinkedList<>(); |
| | | //å ä¸ºæµæ°´ä¾æ®æ¯æ¬¡å¯è½ä¸ä¸æ ·ï¼æä»¥æ¯æ¬¡é½æ·è´ä¸ä»½ |
| | | for (int j = 0; j < serialUnitList.size(); j++) { |
| | | thisSerialUnitList.add(serialUnitList.get(j)); |
| | | } |
| | | //å
ççææ²¡æå±æ§çç æ®µ |
| | | boolean attrSevIsSerialDepend = CollectionUtils.isEmpty(attrSecVOList) ? false : (attrSecVOList.stream().anyMatch(s -> VciBaseUtil.getBoolean(s.getSerialDependFlag()))); |
| | | switchAttrSecValue(attrSecVOList, cbo, thisSecValueList, attrSevIsSerialDepend, thisSerialUnitList); |
| | | |
| | | switchSerialSecValueBZ(cbo,secDTOList,serialSecVOList, attrSevIsSerialDepend, finalRuleVO, secOdserialUnitMap, maxSerialValueMap, thisSecValueList, lastMaxSerialValueMap, i == 0); |
| | | |
| | | //ç»è£
ç¼ç çå¼ |
| | | cbo.setId(thisSecValueList.stream().collect(Collectors.joining())); |
| | | codeList.add(cbo.getId()); |
| | | StringBuilder sb = new StringBuilder(); |
| | | //æç 段éé¢é½æ¾ä¸ä¸æµæ°´å· |
| | | AtomicReference<String> serialUnitString= new AtomicReference<>(""); |
| | | for (int j = 0; j < serialSecVOList.size(); j++) { |
| | | CodeBasicSecVO secVO = serialSecVOList.get(j); |
| | | if(lastMaxSerialValueMap.containsKey(secVO.getOid())){ |
| | | Map<String/**æµæ°´ä¾æ®**/, String> serialValueMap= lastMaxSerialValueMap.get(secVO.getOid()); |
| | | serialValueMap.forEach((maxSerialUnitString,serialValue)->{ |
| | | if(StringUtils.isNotBlank(serialValue)){ |
| | | serialUnitString.set(maxSerialUnitString); |
| | | sb.append(serialValue).append(SERIAL_VALUE_SPACE); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | String codeDelimiter=thisSecValueList.stream().collect(Collectors.joining(SERIAL_VALUE_SPACE)); |
| | | //è¦å卿åçå
¨é¨allcode |
| | | wrapperAllCode(classifyFullInfoBO, finalRuleVO, cbo, templateVO, allCodeDOList, serialUnitString.get(), sb.toString(),codeDelimiter); |
| | | } |
| | | //å¤çæå¤§æµæ°´ |
| | | saveSerialValue( finalRuleVO, 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())); |
| | | }); |
| | | //éè¿IDæ¥è¿è¡å»é |
| | | List<CodeAllCode> distinctCodeAllCOdes = allCodeDOList.stream().collect(Collectors |
| | | .collectingAndThen( |
| | | Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(CodeAllCode::getId))), |
| | | ArrayList::new)); |
| | | if( distinctCodeAllCOdes.size() != allCodeDOList.size() ){ |
| | | throw new ServiceException("ç¼ç æ°æ®éå¤ï¼æ æ³ä¿åï¼è¯·æ³¨æï¼"); |
| | | } |
| | | QueryWrapper<CodeAllCode> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("CREATECODEBTM",allCodeDOList.get(0).getCreateCodeBtm()); |
| | | wrapper.in("ID",allCodeDOList.stream().map(CodeAllCode::getId).collect(Collectors.toList())); |
| | | List<CodeAllCode> codeAllCodes = codeAllCodeService.selectByWrapper(wrapper); |
| | | List<CodeAllCode> takeBack = codeAllCodes.stream().filter(e -> e.getLcStatus().equals("TakeBack")).collect(Collectors.toList()); |
| | | if(codeAllCodes.size()>takeBack.size()){ |
| | | throw new ServiceException("çæç¼ç æ°æ®IDå·²æåå²è®°å½,请确认å¦ä¸çæçIDæ°æ®ï¼"+ allCodeDOList.stream().map(CodeAllCode::getId).collect(Collectors.toList())); |
| | | } |
| | | for (CodeAllCode codeAllCode : takeBack) { |
| | | codeAllCode.setTs(new Date()); |
| | | codeAllCode.setLastModifyTime(new Date()); |
| | | codeAllCode.setLastModifier(AuthUtil.getUserId().toString()); |
| | | Iterator<CodeAllCode> iterator = allCodeDOList.iterator(); |
| | | while (iterator.hasNext()){ |
| | | CodeAllCode next = iterator.next(); |
| | | if(codeAllCode.getId().equals(next.getId())){ |
| | | codeAllCode.setCreateCodeOid(next.getCreateCodeOid()); |
| | | codeAllCode.setLcStatus(next.getLcStatus()); |
| | | //iterator.remove(); |
| | | } |
| | | } |
| | | } |
| | | if(takeBack.size()>0){ |
| | | codeAllCodeService.updateBatchById(takeBack); |
| | | } |
| | | codeAllCodeService.saveBatch(allCodeDOList); |
| | | mdmEngineService.insertBatchByType(dataCBOList.get(0).getBtmname(),dataCBOList); |
| | | return codeList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 转æ¢ç å¼çå
容 |
| | | * @param secVO ç æ®µçå
容 |
| | | * @param secValueMap ç å¼çå
容ï¼keyæ¯ç 段ç主é®ï¼valueæ¯ç å¼ |
| | | * @param classifyFullInfoBO åç±»çå
¨é¨ä¿¡æ¯ |
| | | * @param serialSecVOList æµæ°´ç 段 |
| | | * @param attrSecVOList 屿§ç 段 |
| | | * @param serialUnitList æµæ°´ä¾æ® |
| | | * @param secValueList ç å¼å表 |
| | | */ |
| | | private void switchSecValueBZ(CodeBasicSecVO secVO,Map<String,String> secValueMap, |
| | | CodeClassifyFullInfoBO classifyFullInfoBO,List<CodeBasicSecVO> serialSecVOList, |
| | | List<CodeBasicSecVO> attrSecVOList, List<String> serialUnitList, |
| | | List<String> secValueList ){ |
| | | CodeSecTypeEnum secType = CodeSecTypeEnum.forValue(secVO.getSecType()); |
| | | String secValue = secValueMap.getOrDefault(secVO.getOid(), ""); |
| | | switch (secType) { |
| | | case CODE_FIXED_SEC: |
| | | secValue = joinPreffixAndSuffix(secVO, secValue); |
| | | //åºå®ç 段çï¼ç´æ¥ç¨ç å¼,ä¸è®ºç å¼çé¿åº¦æ¯å¤å°ï¼å 为å¯åé¿åº¦ååºå®é¿åº¦æ¯æ§å¶å¨ç 段管çéé¢çç å¼å®ä¹ç |
| | | break; |
| | | case CODE_DATE_SEC: |
| | | //æ¶é´ç 段ï¼éè¦å°å½åæ¶é´ä¾æ®æ¶é´æ ¼å¼è¿è¡è½¬æ¢. |
| | | //æ¶é´ç æ®µä¸æ¶åå°æ¯å¦è¡¥ä½ |
| | | secValue =joinPreffixAndSuffix(secVO, VciDateUtil.date2Str(new Date(), secVO.getCodeDateFormatStr())); |
| | | break; |
| | | case CODE_CLASSIFY_SEC: |
| | | //åç±»ç æ®µçï¼ä¹æ¯ä»åç«¯éæ©äºç å¼å³å¯ï¼ä¸è®ºç å¼çé¿åº¦æ¯å¤å° |
| | | CodeClassifyValue codeClassifyValueDO= codeClassifyValueMapper.selectById(secValue); |
| | | if(codeClassifyValueDO!=null) { |
| | | secValue = joinPreffixAndSuffix(secVO, codeClassifyValueDO.getId()); |
| | | } |
| | | break; |
| | | case CODE_LEVEL_SEC: |
| | | //å±çº§ç 段ï¼éè¦ä»åç±»ä¸è·åç¸åºçä¿¡æ¯ |
| | | if (CodeLevelTypeEnum.MIN.getValue().equalsIgnoreCase(secVO.getCodeLevelType())) { |
| | | //æå°å±ï¼å 为æä»¬åªè½å¨å¶åèç¹ä¸ç³è¯·ç¼ç ï¼æä»¥è¿ä¸ªå°±æ¯å½ååç±»ç |
| | | if (CodeGetValueTypeEnum.CURRENT.getValue().equalsIgnoreCase(secVO.getCodeGetValueType()) || CollectionUtils.isEmpty(classifyFullInfoBO.getParentClassifyVOs())) { |
| | | //å°±æ¯å½ååç±»ç |
| | | secValue = classifyFullInfoBO.getCurrentClassifyVO().getId(); |
| | | } else { |
| | | //æä»¬éè¦ä»é¡¶å±å¼å§æ¾å°å½ååç±»ä¸ºæ¢ |
| | | secValue = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> -o1.getDataLevel().compareTo(o2.getDataLevel()))).map(CodeClassifyVO::getId).collect(Collectors.joining()) + classifyFullInfoBO.getCurrentClassifyVO().getId(); |
| | | } |
| | | } else { |
| | | //æå®å±ï¼æä»¬éè¦éè¿ä¸çº§çæ¥è·å |
| | | if (CollectionUtils.isEmpty(classifyFullInfoBO.getParentClassifyVOs())) { |
| | | //说æå½åå·²ç»æ¯æé«çäº |
| | | secValue = classifyFullInfoBO.getCurrentClassifyVO().getId(); |
| | | } else { |
| | | //è¿ä¸ªæä»¬éè¦çç,å±çº§æ¯ä¸æ¯å¤§äºäºæå¤§å±çº§çæ° |
| | | List<CodeClassifyVO> parentClassifyVOList = classifyFullInfoBO.getParentClassifyVOs().stream().sorted(((o1, o2) -> -o1.getDataLevel().compareTo(o2.getDataLevel()))).collect(Collectors.toList()); |
| | | if (secVO.getCodeLevelValue() > (parentClassifyVOList.size() + 1)) { |
| | | //æå®çå±çº§æ¯å½åçå±çº§è¿å¤§äºï¼æä»¥åªè½è·åå½åå±çº§äº |
| | | if (CodeGetValueTypeEnum.CURRENT.getValue().equalsIgnoreCase(secVO.getCodeGetValueType())) { |
| | | secValue = classifyFullInfoBO.getCurrentClassifyVO().getId(); |
| | | } else { |
| | | secValue = parentClassifyVOList.stream().map(CodeClassifyVO::getId).collect(Collectors.joining()) + classifyFullInfoBO.getCurrentClassifyVO().getId(); |
| | | } |
| | | } else { |
| | | //æä»¬è·åå
¶ä¸æå®å±çå
容 |
| | | if (CodeGetValueTypeEnum.CURRENT.getValue().equalsIgnoreCase(secVO.getCodeGetValueType())) { |
| | | CodeClassifyVO classifyVO = parentClassifyVOList.stream().filter(s -> s.getDataLevel().intValue() == secVO.getCodeLevelValue().intValue()).findFirst().orElseGet(() -> null); |
| | | if (classifyVO != null) { |
| | | secValue = classifyVO.getId(); |
| | | } |
| | | } else { |
| | | //å°äºçäºçå
¨é¨æ¿åºæ¥ |
| | | secValue = parentClassifyVOList.stream().filter(s -> s.getDataLevel().intValue() <= secVO.getCodeLevelValue().intValue()).sorted(((o1, o2) -> -o1.getDataLevel().compareTo(o2.getDataLevel()))).map(CodeClassifyVO::getId).collect(Collectors.joining()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //ççé¿åº¦æ¯å¦éè¦æªæ |
| | | if (!CodeCutTypeEnum.NONE.getValue().equalsIgnoreCase(secVO.getValueCutType()) && |
| | | secVO.getValueCutLength() != null && secVO.getValueCutLength() > 0 && secValue.length() > secVO.getValueCutLength()) { |
| | | if (CodeCutTypeEnum.RIGHT.getValue().equalsIgnoreCase(secVO.getValueCutType())) { |
| | | //å·¦æªåæ¯ä»å·¦è¾¹åªæï¼å³æªåæ¯ä»å³è¾¹åªæ--ä¿ç左边 |
| | | secValue = secValue.substring(0, secVO.getValueCutLength()); |
| | | } else { |
| | | secValue = secValue.substring(secValue.length() - secVO.getValueCutLength()); |
| | | } |
| | | } |
| | | secValue = joinPreffixAndSuffix(secVO,secValue); |
| | | break; |
| | | case CODE_REFER_SEC: |
| | | //å¼ç¨çå¨é¡µé¢ä¸å·²ç»éæ©äºï¼æä»¥ç´æ¥ä½¿ç¨å端ä¸ä¼ éçå¼ |
| | | //å¼ç¨å°±æ¯åç
§ï¼å¯è½æ¯å
¶ä»çåç±»ï¼ä¸å¡ç±»åï¼ä¸çæ°æ®ï¼æä»¥åªå¨é¡µé¢ä¸éæ© |
| | | secValue = joinPreffixAndSuffix(secVO,secValue); |
| | | break; |
| | | case CODE_ATTR_SEC: |
| | | //屿§ä¸å¼ç¨çåºå«æ¯ï¼å±æ§æ¯å½åæ°æ®éç屿§ï¼èå¼ç¨å¯è½æ¯å¼ç¨å
¶ä»çåç±»çï¼ä¸å¡ç±»åï¼ |
| | | //å 为å¯è½æ¯æ¹éçæ°æ®çæä½ï¼æä»¥æä»¬è¿éä¸è½ç´æ¥å¤ç屿§ï¼éè¦åè¾¹ä¸è¾¹å¤ç |
| | | secValue = "${attr_" + secVO.getOid() + "}"; |
| | | attrSecVOList.add(secVO); |
| | | break; |
| | | case CODE_VARIABLE_SEC: |
| | | //å¯åç æ®µï¼æ¯å¨é¡µé¢ä¸è¾å
¥å
容 |
| | | if (secValue.length() > VciBaseUtil.getInt(secVO.getCodeSecLength())) { |
| | | throw new VciBaseException("ã{0}ãè¿ä¸ªç 段æ¯å¯åç æ®µï¼ä½æ¯ç°å¨è¾å
¥çç å¼çé¿åº¦({1})è¶
è¿äºè§å®çé¿åº¦{2}", new String[]{secVO.getName(), String.valueOf(secValue.length()), secVO.getCodeSecLength()}); |
| | | } |
| | | OsCodeFillTypeEnum fillTypeEnum = OsCodeFillTypeEnum.forValue(secVO.getCodeFillType()); |
| | | secValue = fillString(VciBaseUtil.getInt(secVO.getCodeSecLength()), fillTypeEnum, secValue, secVO.getCodeFillSeparator()); |
| | | secValue = joinPreffixAndSuffix(secVO,secValue); |
| | | break; |
| | | case CODE_SERIAL_SEC: |
| | | //æµæ°´ç 段 |
| | | serialSecVOList.add(secVO); |
| | | if(secValueMap.containsKey(secVO.getOid())){ |
| | | secValue=secValueMap.get(secVO.getOid()); |
| | | }else{ |
| | | secValue = "${" + secVO.getOid() + "}"; |
| | | } |
| | | default: |
| | | break; |
| | | } |
| | | if (VciBaseUtil.getBoolean(secVO.getSerialDependFlag())) { |
| | | serialUnitList.add(secValue); |
| | | } |
| | | secValueList.add(secValue); |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨CBOå¤çç»åè§åçå
容 |
| | | * @param cbo æ°æ®çå
容 |
| | |
| | | } |
| | | Map<String, String> map = new HashMap<String, String>(); |
| | | for (String i : dataMap.keySet()) { |
| | | map.put(i, String.valueOf(dataMap.get(i))); |
| | | map.put(i, String.valueOf(dataMap.get(i)).trim()); |
| | | } |
| | | // WebUtil.copyValueToMapFromCbos(cbo,dataMap); |
| | | return formulaService.getValueByFormula(map,rule); |