Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
| | |
| | | <div class="testbox"> |
| | | <div> |
| | | <el-button plain size="small" type="primary" @click="addvisible = true" |
| | | >å¢å |
| | | >å¢å |
| | | </el-button> |
| | | <el-button plain size="small" type="primary" @click="editHandler" |
| | | >ç¼è¾ |
| | | >ç¼è¾ |
| | | </el-button> |
| | | <el-button plain size="small" type="primary" @click="openBatchImport('batchImportApply')">æ¹é导å
¥ç³è¯·</el-button> |
| | | <el-button plain size="small" type="primary" @click="openBatchImport('historyImport')">å岿°æ®å¯¼å
¥</el-button> |
| | |
| | | <el-button plain size="small" type="primary">æ¥çæµç¨åå²</el-button> |
| | | <el-button plain size="small" type="primary">å é¤</el-button> |
| | | <el-button plain size="small" type="primary" @click="setHandler" |
| | | >åå¸</el-button |
| | | >åå¸</el-button |
| | | > |
| | | <el-button plain size="small" type="primary" @click="DataChange" |
| | | >æ°æ®æ´æ¹</el-button |
| | | >æ°æ®æ´æ¹</el-button |
| | | > |
| | | <el-button plain size="small" type="primary" @click="huishouHandler" |
| | | >åæ¶</el-button |
| | | >åæ¶</el-button |
| | | > |
| | | <el-button plain size="small" type="primary" @click="openD" |
| | | >å¯¼åº |
| | | >å¯¼åº |
| | | </el-button> |
| | | <el-button plain size="small" type="primary" @click="findHandler" |
| | | >æ¥è¯¢ |
| | | >æ¥è¯¢ |
| | | </el-button> |
| | | <el-button plain size="small" type="primary" @click="similarHandler" |
| | | >ç¸ä¼¼é¡¹æ¥è¯¢</el-button |
| | | >ç¸ä¼¼é¡¹æ¥è¯¢</el-button |
| | | > |
| | | <el-button plain size="small" type="primary">å·æ°</el-button> |
| | | <el-input |
| | |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | | > |
| | | <!-- ç¼è¾åå±ç¤ºé»è¾ --> |
| | | <!-- <template slot-scope="{ row }">--> |
| | | <!-- <el-input v-if="editingRow === row && editShow== item.prop" v-model="row[item.prop]" @blur="saveRow"></el-input>--> |
| | | <!-- <span v-else>{{row[item.prop]}}</span>--> |
| | | <!-- <el-switch--> |
| | | <!-- v-if="editShow === 'true'"--> |
| | | <!-- v-model="row[item.prop]"--> |
| | | <!-- active-color="#13ce66"--> |
| | | <!-- inactive-color="#ff4949">--> |
| | | <!-- </el-switch>--> |
| | | <!-- </template>--> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | |
| | | this.doLayout(); |
| | | }, |
| | | watch: { |
| | | tableHeadDataFateher:{ |
| | | tableHeadDataFateher:{ |
| | | handler(newval,oldval){ |
| | | this.options=newval.tableDefineVO.seniorQueryColumns |
| | | } |
| | |
| | | }, |
| | | // åå¸ |
| | | setHandler() { |
| | | console.log("1111"); |
| | | console.log("ç¶", this.parameter); |
| | | |
| | | if (this.selectRow.length <= 0) { |
| | | this.$message.warning("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } else { |
| | |
| | | row.forEach((item) => { |
| | | this.parameter.ids.push(item.oid); |
| | | }); |
| | | console.log( ' this.parameter.ids',this.parameter.ids) |
| | | }, |
| | | //ç¼è¾ |
| | | editHandler() { |
| | |
| | | <template> |
| | | |
| | | <!-- <avue-crud :data="ProData" :option="option" @sort-change="sortChange" @row-update="addUpdate"--> |
| | | <!-- @cell-click="handleRowClick" @select="selectHandle" @row-del="CrudRowDel">--> |
| | | <div> |
| | | <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArray.length>=1"> |
| | | <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag"> |
| | | <!--æ°å¢--> |
| | | <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" |
| | | @click="busineHandle">ï¼ æ·»å {{ msg }} |
| | |
| | | <!-- ç¼ç ç³è¯·é¢è§--> |
| | | <el-button size="small" @click="applicationHandle" style="">ç¼ç ç³è¯·é¢è§</el-button> |
| | | <!-- éªè¯è§å--> |
| | | |
| | | </div> |
| | | <!-- å¼¹çª--> |
| | | <div> |
| | |
| | | </el-dialog> |
| | | <!-- å
¨å±ç¼è¾--> |
| | | <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true"> |
| | | <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag"></attrCrud> |
| | | <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud> |
| | | </el-dialog> |
| | | <!-- ç»åè§å--> |
| | | <formula-editor :systemVariableTableData="systemVariableTableData" |
| | |
| | | style="width: 100%" |
| | | @cell-click="handleCellClicks" |
| | | @select="selectHandle" |
| | | v-if="this.crudArray.length>=1" |
| | | |
| | | v-if="this.crudArrayFlag" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | |
| | | export default { |
| | | name: "attrCrud .vue", |
| | | // props: ['ProData','crudOid','crudArray','Formlist','codeClassifyOid'], |
| | | props: { |
| | | ProData: { |
| | | type: Array, |
| | |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | |
| | | crudArrayFlag:{ |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | watch:{ |
| | | crudArray:{ |
| | | handler(newval,oldval){ |
| | | if(newval != undefined){ |
| | | if(newval.length>=1){ |
| | | this.crudArrayFlag=true |
| | | }else{ |
| | | this.crudArrayFlag=false |
| | | } |
| | | } |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | crudArrayFlag:false, |
| | | editingRows: null, |
| | | editShows:"", |
| | | attrFlag: false, |
| | |
| | | methods: { |
| | | formAttr(row, column) { |
| | | console.log(row,column) |
| | | // if (column.property === "keyAttrFlag" |
| | | // ||column.property === "queryAttrFlag" |
| | | // ||column.property === "seniorQueryAttrFlag" |
| | | // ||column.property === "sameRepeatAttrFlag" |
| | | // ||column.property === "requireFlag" |
| | | // ||column.property === "formDisplayFlag" |
| | | // ||column.property === "tableDisplayFlag" |
| | | // ||column.property === "sortAttrFlag") { |
| | | // return row[column.property] =='true'? "æ¯" : "å¦"; |
| | | // } |
| | | // return row[column.property]; |
| | | }, |
| | | //屿§åç»æé® |
| | | attrVisibleHandle() { |
| | | this.formatBoolean() |
| | | |
| | | if (this.CrudSelect.length > 1) { |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | } else if (this.CrudSelect < 1) { |
| | |
| | | }, |
| | | // ä»ä¸å¡ç±»åä¸éæ©æ°æ® |
| | | busineHandle() { |
| | | if (this.crudArray.length < 1) { |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ¨¡æ¿') |
| | | } else { |
| | | this.addVisible = true; |
| | | AttrByBtm({'conditionMap[oid]': this.crudOid}).then(res => { |
| | | this.businessData = res.data.data; |
| | | }) |
| | | } |
| | | }, |
| | | // 级è屿§æé® |
| | | CascadeHandle() { |
| | |
| | | }, |
| | | //ä¿å |
| | | addsHandler() { |
| | | batchAddSave(JSON.parse(JSON.stringify(this.ProData).replace(/classifyTemplateOid/g,"classifytemplateoid"))).then(res => { |
| | | batchAddSave(JSON.parse(JSON.stringify(this.ProData))).then(res => { |
| | | this.$message.success('ä¿åæå') |
| | | }) |
| | | }, |
| | |
| | | <avue-form v-model="loneTreeNewForm" :option="options" @submit="submits" v-else-if="flag == 'edit'"> |
| | | </avue-form> |
| | | <div> |
| | | <el-dialog :visible.sync="dialogVisible" title="为ãç¼ç è§åãéåå¼" append-to-body> |
| | | <!-- 为ãç¼ç è§åãéåå¼--> |
| | | <el-dialog :visible.sync="MasterdialogVisible" title="为ãç¼ç è§åãéåå¼" append-to-body> |
| | | <avue-crud :data="masterData" :option="masterOption" @select="masterSelect"></avue-crud> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end" > |
| | | <el-button type="primary" size="small" @click="MasterHandlerClick">ç¡®å®</el-button> |
| | | <el-button size="small" @click="dialogVisible=false">åæ¶</el-button> |
| | | <el-button size="small" @click="MasterdialogVisible=false">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- å
³é®å±æ§æ¥è¯¢è§å--> |
| | | <el-dialog :visible.sync="KeydialogVisible" title="为ãå
³é®å±æ§æ¥è¯¢è§åãéåå¼" append-to-body> |
| | | <avue-crud :data="KeyData" :option="masterOption" @select="masterSelect"></avue-crud> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end" > |
| | | <el-button type="primary" size="small" @click="KeyHandlerClick">ç¡®å®</el-button> |
| | | <el-button size="small" @click="KeydialogVisible=false">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- ç¸ä¼¼é¡¹æ¥è¯¢è§å--> |
| | | <el-dialog :visible.sync="SimidialogVisible" title="为ãç¸ä¼¼é¡¹æ¥è¯¢è§åãéåå¼" append-to-body> |
| | | <avue-crud :data="simData" :option="masterOption" @select="masterSelect"></avue-crud> |
| | | <div style="padding-top: 10px;display: flex; justify-content: flex-end" > |
| | | <el-button type="primary" size="small" @click="simHandlerClick">ç¡®å®</el-button> |
| | | <el-button size="small" @click="SimidialogVisible=false">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | props: ['loneTreeNewForm','flag'], |
| | | data() { |
| | | return { |
| | | KeyData:[], |
| | | simData:[], |
| | | name:"", |
| | | oid:"", |
| | | masterInput:'', |
| | |
| | | } |
| | | ] |
| | | }, |
| | | dialogVisible:false, |
| | | MasterdialogVisible:false, |
| | | KeydialogVisible:false, |
| | | SimidialogVisible:false, |
| | | form: { |
| | | name: "åå", |
| | | sex: "ç·" |
| | |
| | | label:"å
³é®å±æ§æ¥è¯¢è§å", |
| | | prop:"codekeyattrrepeatoidName", |
| | | labelWidth:128, |
| | | focus:this.Keyfouce |
| | | }, |
| | | { |
| | | label:"ç¸ä¼¼æ¥è¯¢è§å", |
| | | prop:"codeResembleRuleOidName", |
| | | labelWidth:128, |
| | | focus: this.simFouce |
| | | }, |
| | | |
| | | ] |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultRend() |
| | | this.MasterdefaultRend() |
| | | this.KeydefaultRend() |
| | | }, |
| | | methods: { |
| | | submits(form,done){ |
| | |
| | | this.$message.success('请æ¥çæ§å¶å°'); |
| | | console.log(err) |
| | | }, |
| | | //ç¼ç è§åå¤±ç¦ |
| | | CodeFoucus(){ |
| | | this.dialogVisible=true; |
| | | console.log(this.dialogVisible) |
| | | this.MasterdialogVisible=true; |
| | | }, |
| | | //ç¼ç è§åç¡®å® |
| | | MasterHandlerClick(){ |
| | | if(this.masterSelectList.length>1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ°æ®') |
| | | }else if(this.masterSelectList.length<=0){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®') |
| | | }else { |
| | | this.dialogVisible=false; |
| | | this.MasterdialogVisible=false; |
| | | this.masterSelectList=[] |
| | | this.loneTreeNewForm.codeRuleOidName=this.name; |
| | | this.loneTreeNewForm.codeRuleOid=this.oid; |
| | | console.log(this.masterSelectList) |
| | | } |
| | | }, |
| | | defaultRend(){ |
| | | //ç¼ç å¤é |
| | | masterSelect(row){ |
| | | console.log(row) |
| | | this.masterSelectList=row; |
| | | this.name=row[0].name; |
| | | this.oid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | }, |
| | | //ç¼ç æ¥å£ |
| | | MasterdefaultRend(){ |
| | | defaultReferDataGrid({ |
| | | referType:'coderule', |
| | | isMuti:'false', |
| | |
| | | |
| | | }) |
| | | }, |
| | | masterSelect(row){ |
| | | console.log(row) |
| | | this.masterSelectList=row; |
| | | this.name=row[0].name; |
| | | this.oid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | // å
³é®å±æ§å¤±ç¦ |
| | | Keyfouce(){ |
| | | this.KeydialogVisible=true; |
| | | }, |
| | | //å
³é®å±æ§ç¡®å® |
| | | KeyHandlerClick(){ |
| | | if(this.masterSelectList.length>1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ°æ®') |
| | | }else if(this.masterSelectList.length<=0){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®') |
| | | }else { |
| | | |
| | | } |
| | | }, |
| | | KeydefaultRend(){ |
| | | defaultReferDataGrid({ |
| | | referType:'codekeyattrrepeat', |
| | | isMuti:'false', |
| | | 'conditionMap["lcstatus"]':'Enabled' |
| | | }).then(res=>{ |
| | | this.keyData=res.data.records; |
| | | |
| | | }) |
| | | }, |
| | | // ç¸ä¼¼é¡¹å¤±ç¦ |
| | | simFouce(){ |
| | | this.SimidialogVisible=true; |
| | | }, |
| | | //ç¸ä¼¼é¡¹ç¡®å® |
| | | simHandlerClick(){ |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | <div> |
| | | <div style="display: flex;justify-content: space-around"> |
| | | <el-button plain size="small" type="primary" @click="TreeAdd">æ·»å </el-button> |
| | | <el-button plain size="small" type="primary" @click="ExportExcel">导åº</el-button> |
| | | <el-button plain size="small" type="primary" @click="ImportExcel">导å
¥</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeEdit">ä¿®æ¹</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">å é¤</el-button> |
| | | <!-- <el-button plain size="small" type="primary" @click="ExportExcel">导åº</el-button>--> |
| | | <!-- <el-button plain size="small" type="primary" @click="ImportExcel">导å
¥</el-button>--> |
| | | <el-button plain size="small" type="primary" @click="flushed">å·æ°</el-button> |
| | | </div> |
| | | <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> |
| | |
| | | <template slot="menuLeft"> |
| | | <el-button plain size="small" type="primary" @click="FindeHanler">æ¥è¯¢</el-button> |
| | | <el-button plain size="small" type="primary" @click="TemRefresh">å·æ°</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeEdit">ä¿®æ¹</el-button> |
| | | <el-button plain size="small" type="primary" @click="TreeDel">å é¤</el-button> |
| | | <el-button plain size="small" type="primary" @click="Enable">å¯ç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click="Deactivate">åç¨</el-button> |
| | | <el-button plain size="small" type="primary" @click="CloneBtn">ä»å
¶å®æ¨¡æ¿å
é</el-button> |
| | |
| | | message: '请å
仿 ä¸éæ©ä¸æ¡æ°æ®!' |
| | | }); |
| | | } else { |
| | | let codeClassifyOid = this.codeClassifyOid |
| | | this.$set(row, "codeclassifyoid", codeClassifyOid) |
| | | this.$set(row, "codeclassifyoid", this.nodeClickList.oid) |
| | | addSave(row).then(() => { |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | }); |
| | | }) |
| | | } |
| | | console.log('123',this.codeClassifyOid) |
| | | }, |
| | | //模æ¿ç®¡çä¿®æ¹ |
| | | CrudRowUpdata(row,index,done) { |
| | |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | } |
| | | }, |
| | | parameter:{ |
| | | handler(newval,oldval){ |
| | | console.log('å',newval) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | |
| | | mounted() { |
| | | // this.apiInit() |
| | | // this.apiDict() |
| | | console.log('---',this.parameter) |
| | | }, |
| | | created() { |
| | |
| | | handler(newval,oldval){ |
| | | this.BuinessOids=newval; |
| | | this.BuinseseRend() |
| | | console.log(newval) |
| | | console.log(this.BuinessOids) |
| | | }, |
| | | deep:true |
| | | } |
| | |
| | | mounted() { |
| | | }, |
| | | methods:{ |
| | | HandlerRend(){ |
| | | }, |
| | | BuinseseRend(){ |
| | | businese({ |
| | | btmType:'wupin', |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://localhost:37000', |
| | | target: 'http://192.168.1.51:37000', |
| | | // target: 'http://192.168.1.46:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | |
| | | /** |
| | | * æå±æ¨¡æ¿ |
| | | */ |
| | | private String classifytemplateoid; |
| | | private String classifyTemplateOid; |
| | | |
| | | /** |
| | | * æå±æ¨¡æ¿æ¾ç¤ºææ¬ |
| | | */ |
| | | private String classifytemplateoidName; |
| | | private String classifyTemplateOidName; |
| | | /** |
| | | * æå±åç±»ä¸ç屿§ä¸»é® |
| | | */ |
| | | private String classifyattributeoid; |
| | | private String classifyAttributeOid; |
| | | |
| | | /** |
| | | * æå±åç±»ä¸ç屿§ä¸»é®æ¾ç¤ºææ¬ |
| | | */ |
| | | private String classifyattributeoidName; |
| | | private String classifyAttributeOidName; |
| | | /** |
| | | * 屿§çç±»å |
| | | */ |
| | | private String attributedatatype; |
| | | private String attributeDataType; |
| | | |
| | | /** |
| | | * æ¯å¦å
³é®å±æ§ |
| | | */ |
| | | private String keyattrflag; |
| | | private String keyAttrFlag; |
| | | |
| | | /** |
| | | * æ¯å¦å¿«éæ¥è¯¢å±æ§ |
| | | */ |
| | | private String queryattrflag; |
| | | private String queryAttrFlag; |
| | | |
| | | /** |
| | | * æ¯å¦é«çº§æ¥è¯¢å±æ§ |
| | | */ |
| | | private String seniorqueryattrflag; |
| | | private String seniorQueryAttrFlag; |
| | | |
| | | /** |
| | | * ç¸ä¼¼æ¥é屿§ |
| | | */ |
| | | private String samerepeatattrflag; |
| | | private String sameRepeatAttrFlag; |
| | | |
| | | /** |
| | | * æ¯å¦æåº |
| | | */ |
| | | private String sortattrflag; |
| | | private String sortAttrFlag; |
| | | |
| | | /** |
| | | * æ¯å¦çæäºç»´ç |
| | | */ |
| | | private String qrcodeflag; |
| | | private String qrcodeFlag; |
| | | |
| | | /** |
| | | * æ¯å¦çæä¸ç»´ç |
| | | */ |
| | | private String barcodeflag; |
| | | private String barcodeFlag; |
| | | |
| | | /** |
| | | * ç»åè§å |
| | | */ |
| | | private String componentrule; |
| | | private String componentRule; |
| | | |
| | | /** |
| | | * éªè¯è§å |
| | | */ |
| | | private String verifyrule; |
| | | private String verifyRule; |
| | | |
| | | /** |
| | | * å类注å
¥å±çº§ |
| | | */ |
| | | private String classifyinvokelevel; |
| | | private String classifyInvokeLevel; |
| | | |
| | | /** |
| | | * å类注å
¥ç屿§è±æåç§° |
| | | */ |
| | | private String classifyinvokeattr; |
| | | private String classifyInvokeAttr; |
| | | |
| | | /** |
| | | * å类注å
¥ç屿§ä¸æåç§° |
| | | */ |
| | | private String classifyinvokeattrname; |
| | | private String classifyInvokeAttrName; |
| | | |
| | | /** |
| | | * å类注å
¥æ¯å¦å¯ä»¥ç¼è¾ |
| | | */ |
| | | private String classifyinvokeeditflag; |
| | | private String classifyInvokeEditFlag; |
| | | |
| | | /** |
| | | * ç å¼åºå· |
| | | */ |
| | | private Integer ordernum; |
| | | private Integer orderNum; |
| | | |
| | | /** |
| | | * 表å鿝妿¾ç¤º |
| | | */ |
| | | private String formdisplayflag; |
| | | private String formDisplayFlag; |
| | | |
| | | /** |
| | | * åè¡¨éæ¯å¦æ¾ç¤º |
| | | */ |
| | | private String tabledisplayflag; |
| | | private String tableDisplayFlag; |
| | | |
| | | /** |
| | | * æå±å±æ§åç» |
| | | */ |
| | | private String attributegroup; |
| | | private String attributeGroup; |
| | | |
| | | /** |
| | | * ä½¿ç¨æä¸¾æ³¨å
¥çåç¬¦ä¸²æ ¼å¼ |
| | |
| | | /** |
| | | * ä½¿ç¨æä¸¾è±æç¼å· |
| | | */ |
| | | private String enumid; |
| | | private String enumId; |
| | | |
| | | /** |
| | | * ä½¿ç¨æä¸¾ä¸æåç§° |
| | | */ |
| | | private String enumname; |
| | | private String enumName; |
| | | |
| | | /** |
| | | * æä¸¾æ¯å¦å¯ä»¥ç¼è¾ |
| | | */ |
| | | private String enumeditflag; |
| | | private String enumEditFlag; |
| | | |
| | | /** |
| | | * åç
§çä¸å¡ç±»åè±æåç§° |
| | | */ |
| | | private String referbtmid; |
| | | private String referBtmId; |
| | | |
| | | /** |
| | | * åç
§çä¸å¡ç±»å䏿åç§° |
| | | */ |
| | | private String referbtmname; |
| | | private String referBtmName; |
| | | |
| | | /** |
| | | * åç
§çªå£é
ç½® |
| | |
| | | /** |
| | | * æ¯å¦å¿
è¾ |
| | | */ |
| | | private String requireflag; |
| | | private String requireFlag; |
| | | |
| | | /** |
| | | * æ¯å¦åªè¯» |
| | | */ |
| | | private String readonlyflag; |
| | | private String readOnlyFlag; |
| | | |
| | | /** |
| | | * 屿§æ§å¶è¾å
¥çé¿åº¦ |
| | | */ |
| | | private Integer controllength; |
| | | private Integer controlLength; |
| | | |
| | | /** |
| | | * 表åéæ¾ç¤ºçæ ·å¼ |
| | | */ |
| | | private String formdisplaystyle; |
| | | private String formDisplayStyle; |
| | | |
| | | /** |
| | | * è¡¨æ ¼éæ¾ç¤ºçæ ·å¼ |
| | | */ |
| | | private String tabledisplaystyle; |
| | | private String tableDisplayStyle; |
| | | |
| | | /** |
| | | * 表åä¸è¶
龿¥å
容 |
| | | */ |
| | | private String formhref; |
| | | private String formHref; |
| | | |
| | | /** |
| | | * è¡¨æ ¼ä¸è¶
龿¥å
容 |
| | | */ |
| | | private String tablehref; |
| | | private String tableHref; |
| | | |
| | | /** |
| | | * å°æ°ç²¾åº¦ |
| | | */ |
| | | private Integer precisionlength; |
| | | private Integer precisionLength; |
| | | |
| | | /** |
| | | * å°æ°å»åº¦ |
| | | */ |
| | | private Integer scalelength; |
| | | private Integer scaleLength; |
| | | |
| | | /** |
| | | * åå¼èå´ |
| | | */ |
| | | private String valuearea; |
| | | private String valueArea; |
| | | |
| | | /** |
| | | * æ¶é´æ ¼å¼ |
| | | */ |
| | | private String codedateformat; |
| | | private String codeDateFormat; |
| | | |
| | | /** |
| | | * è¡¨æ ¼éæ¾ç¤ºè°ç¨çjs |
| | | */ |
| | | private String tabledisplayjs; |
| | | private String tableDisplayJs; |
| | | |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå¤è¡ææ¬ |
| | | */ |
| | | private String textareaflag; |
| | | private String textAreaFlag; |
| | | |
| | | /** |
| | | * é¢è§å¾ |
| | | */ |
| | | private String imageflag; |
| | | private String imageFlag; |
| | | |
| | | /** |
| | | * é»è®¤å¼ |
| | | */ |
| | | private String defaultvalue; |
| | | private String defaultValue; |
| | | |
| | | /** |
| | | * åç¼ |
| | | */ |
| | | private String prefixvalue; |
| | | private String prefixValue; |
| | | |
| | | /** |
| | | * åç¼ |
| | | */ |
| | | private String suffixvalue; |
| | | private String suffixValue; |
| | | |
| | | /** |
| | | * éæ©æ°æ®æ¶è¿æ»¤ç屿§ |
| | | */ |
| | | private String filtersourceattr; |
| | | private String filterSourceAttr; |
| | | |
| | | /** |
| | | * éæ©æ°æ®æ¶è¿æ»¤ç屿§åç§° |
| | | */ |
| | | private String filtersourceattrname; |
| | | private String filterSourceAttrName; |
| | | |
| | | /** |
| | | * 屿§å表ä¸ç宽度 |
| | |
| | | */ |
| | | //@Column(columnDefinition = "çº§èæ¥è¯¢å±æ§") |
| | | private String parentQueryAttr; |
| | | /** |
| | | * è¾å
¥æç¤º |
| | | */ |
| | | private String inputTip; |
| | | |
| | | } |
| | |
| | | public class CodeImprotParmaDatVO { |
| | | private List<CodeImprotSaveDatVO> codeImprotSaveDatVOList; |
| | | private String classifyAttr; |
| | | private Boolean isImprot; |
| | | private Boolean improt; |
| | | |
| | | public List<CodeImprotSaveDatVO> getCodeImprotSaveDatVOList() { |
| | | return codeImprotSaveDatVOList; |
| | |
| | | } |
| | | |
| | | public Boolean getImprot() { |
| | | return isImprot; |
| | | return this.improt; |
| | | } |
| | | |
| | | public void setImprot(Boolean improt) { |
| | | isImprot = improt; |
| | | this.improt = improt; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CodeImprotParmaDatVO{" + |
| | | "codeImprotSaveDatVOList=" + codeImprotSaveDatVOList + |
| | | ", isImprot=" + isImprot + |
| | | ", isImprot=" + improt + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import com.vci.ubcs.system.entity.DictBiz; |
| | | import com.vci.ubcs.system.feign.IDictBizClient; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | throw new VciBaseException("{0}{1}屿§çæ¶é´æ ¼å¼ä¸ç¬¦åè¦æ±",new String[]{codeClassifyTemplateAttrDO.getId(),codeClassifyTemplateAttrDO.getName()}); |
| | | } |
| | | //妿æ¯ç»åè§åï¼éé¢ä½¿ç¨ç屿§ä¸è½ç¼ºå¤±ï¼ä¹é½å¾æ¾ç¤º |
| | | String componentrule = codeClassifyTemplateAttrDTO.getComponentrule(); |
| | | String componentrule = codeClassifyTemplateAttrDTO.getComponentRule(); |
| | | boolean isContainsDynamicParameter = PatternUtil.isContainsDynamicParameter(componentrule); |
| | | if(isContainsDynamicParameter){ |
| | | List<String> userdAttrList = PatternUtil.getKeyListByContent(componentrule);//å
å«çææ${xxx}ä¸çxxx |
| | |
| | | } |
| | | //è¦ççè¡¨åæ¯å¦æ¾ç¤º |
| | | String unFormDisplayAttr = userdAttrList.stream().filter(s -> !VciBaseUtil.getBoolean(attrDTOMap.getOrDefault(s.toLowerCase(Locale.ROOT), |
| | | new CodeClassifyTemplateAttrDTO()).getFormdisplayflag())).collect(Collectors.joining(",")); |
| | | new CodeClassifyTemplateAttrDTO()).getFormDisplayFlag())).collect(Collectors.joining(",")); |
| | | if(StringUtils.isNotBlank(unFormDisplayAttr)){ |
| | | throw new VciBaseException("{0}屿§æ¯ç»åè§åï¼ä½æ¯è§åéå
å«ç屿§[{1}]å¨å½å模æ¿ä¸æ²¡æè®¾ç½® è¡¨åæ¾ç¤º ",new String[]{codeClassifyTemplateAttrDO.getName(),unFormDisplayAttr}); |
| | | } |
| | |
| | | } |
| | | |
| | | if(CLASSIFYTEMPLATEOID==null){ |
| | | CLASSIFYTEMPLATEOID = codeClassifyTemplateAttrDTO.getClassifytemplateoid(); |
| | | CLASSIFYTEMPLATEOID = codeClassifyTemplateAttrDTO.getClassifyTemplateOid(); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | // BatchCBO batchCBOTemplateDelete = new BatchCBO(); |
| | | if(!CollectionUtils.isEmpty(oids)){ |
| | | baseMapper.deleteBatchIds(oids); |
| | | this.removeBatchByIds(oids); |
| | | } |
| | | |
| | | //åæ°å¢ |
| | |
| | | } |
| | | |
| | | //å¤æä¼ è¿æ¥çåç
§é
ç½®æ¯å¦æ¯jsonæ ¼å¼ |
| | | if(StringUtils.isNotBlank(codeClassifyTemplateAttrDTO.getReferbtmid())&&!checkKVObj(codeClassifyTemplateAttrDTO.getReferbtmid())){ |
| | | if(StringUtils.isNotBlank(codeClassifyTemplateAttrDTO.getReferBtmId())&&!checkKVObj(codeClassifyTemplateAttrDTO.getReferBtmId())){ |
| | | throw new VciBaseException("æä¸¾æ³¨å
¥æ°æ®æ ¼å¼é误!"); |
| | | } |
| | | |
| | |
| | | import org.apache.poi.ss.usermodel.Font; |
| | | import org.apache.poi.ss.usermodel.RichTextString; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | public List<CodeImportTemplateVO> gridclassifys(String redisOid) { |
| | | List<CodeImportTemplateVO> codeImportTemplateVOs=new ArrayList<>(); |
| | | VciBaseUtil.alertNotNull(redisOid,"åç±»",redisOid,"åç±»ç¼å主é®"); |
| | | |
| | | List<CodeImportTemplateVO> redisServiceCacheObjects=bladeRedis.lRange(redisOid,0,-1); |
| | | List<CodeImportTemplateVO> redisServiceCacheObjects=bladeRedis.get(redisOid); |
| | | if(redisServiceCacheObjects!=null){ |
| | | codeImportTemplateVOs= redisServiceCacheObjects; |
| | | } |
| | |
| | | @Override |
| | | public DataGrid<Map<String, String>> gridDatas(String codeClssifyOid, String redisOid) { |
| | | VciBaseUtil.alertNotNull(redisOid,"导å
¥ç¸ä¼¼æ°æ®",redisOid,"æ°æ®ç¼å主é®"); |
| | | List<CodeImprotDataVO> codeImprotDataVOs = bladeRedis.lRange(redisOid+"-"+codeClssifyOid,0,-1); |
| | | List<CodeImprotDataVO> codeImprotDataVOs = bladeRedis.get(redisOid+"-"+codeClssifyOid); |
| | | // redisService.getCacheList(redisOid+"-"+codeClssifyOid); |
| | | CodeImprotDataVO codeImprotDataVO=new CodeImprotDataVO(); |
| | | if(!CollectionUtils.isEmpty(codeImprotDataVOs)){ |
| | |
| | | @Override |
| | | public DataGrid<Map<String,String>> gridRowResemble(String oid,String redisOid){ |
| | | VciBaseUtil.alertNotNull(redisOid,"导å
¥ç¸ä¼¼æ°æ®",redisOid,"æ°æ®ç¼å主é®"); |
| | | List<DataResembleVO> codeImprotDataVOs = bladeRedis.lRange(redisOid,0,-1);; |
| | | List<DataResembleVO> codeImprotDataVOs = bladeRedis.get(redisOid);; |
| | | DataGrid<Map<String, String>> dataGrid = new DataGrid<>(); |
| | | List<Map<String, String>> dataList = new ArrayList<>(); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.ddl.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.ResultType; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | /** |
| | | * è¾¾æ¢¦æ°æ®åºçæä½æ§è¡å¨ |
| | | */ |
| | | @Repository |
| | | public interface DdlDmMapper extends DdlMapper{ |
| | | |
| | | /** |
| | | * å é¤è¡¨æ ¼ä¸çå |
| | | * @param tableName 表åç§° |
| | | * @param columnName ååç§° |
| | | * @return åå½±åçè¡æ° |
| | | */ |
| | | @Update("alter table ${tableName} DROP COLUMN ${columnName}") |
| | | @Override |
| | | int dropTableColumn(@Param("tableName")String tableName, @Param("columnName")String columnName); |
| | | |
| | | /** |
| | | * å é¤è¡¨æ ¼ |
| | | * @param tableName è¡¨æ ¼åç§° |
| | | * @return å½±åçè¡æ° |
| | | */ |
| | | @Update("drop table if exists ${tableName}") |
| | | @ResultType(Integer.class) |
| | | @Override |
| | | int dropTable(@Param("tableName") String tableName); |
| | | |
| | | /** |
| | | * æ¹éä¿®æ¹æ°æ®åºè¡¨çåæ®µ |
| | | * @param tableName è¡¨æ ¼çåç§° |
| | | * @param attributeSql ä¿®æ¹ç屿§çsql |
| | | * @return å½±åçè¡æ° |
| | | */ |
| | | @Update("alter table ${tableName} modify ( ${attributeSql} ) ") |
| | | @ResultType(Integer.class) |
| | | @Override |
| | | int modifyTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | /** |
| | | * åæ°æ®åºè¡¨ä¸æ¹éæ·»å åæ®µ |
| | | * @param tableName è¡¨æ ¼çåç§° |
| | | * @param attributeSql è¦æ·»å çæ°çsql |
| | | * @return å½±åçè¡æ° |
| | | */ |
| | | @Update("alter table ${tableName} add ( ${attributeSql} )") |
| | | @ResultType(Integer.class) |
| | | @Override |
| | | int addColumn2TableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.ddl.mapper; |
| | | |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | /** |
| | | * è¾¾æ¢¦æ°æ®åºçæä½æ§è¡å¨ |
| | | */ |
| | | @Repository |
| | | public interface DllDmMapper extends DllMapper{ |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.ddl.mapper; |
| | | |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.ResultType; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | /** |
| | | * Description: |
| | | * |
| | |
| | | */ |
| | | public interface DllMapper { |
| | | |
| | | int createViewBySql(String viewCreateSql); |
| | | @Update({"${viewCreateSql}"}) |
| | | int createViewBySql(@Param("viewCreateSql") String viewCreateSql); |
| | | |
| | | int createTableBySql(String tableName,String attributeSql); |
| | | @Update({"create table ${tableName} ( ${attributeSql} )"}) |
| | | int createTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | int checkTableExist(String tableName); |
| | | @Update({"COMMENT ON TABLE ${tableName} IS '${comment}' "}) |
| | | int commentTable(@Param("tableName") String tableName, @Param("comment") String comment); |
| | | |
| | | int countAll(String tableName); |
| | | @Update({"COMMENT ON column ${tableName}.${columnName} IS '${comment}' "}) |
| | | int commentColumnTable(@Param("tableName") String tableName, @Param("columnName") String columnName, @Param("comment") String comment); |
| | | |
| | | int commentTable(String tableName, String comment); |
| | | @Update({"alter table ${tableName} modify ( ${attributeSql} ) "}) |
| | | int modifyTableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | int commentColumnTable(String tableName, String columnName, String comment); |
| | | @Update({"alter table ${tableName} add ( ${attributeSql} )"}) |
| | | int addColumn2TableBySql(@Param("tableName") String tableName, @Param("attributeSql") String attributeSql); |
| | | |
| | | int modifyTableBySql(String tableName, String attributeSql); |
| | | @Update({"drop table if exists ${tableName}"}) |
| | | int dropTable(@Param("tableName") String tableName); |
| | | |
| | | int addColumn2TableBySql(String tableName, String attributeSql); |
| | | @Select({"select count(table_name) from user_tables where upper(table_name) = upper(#{tableName,jdbcType=VARCHAR})"}) |
| | | int checkTableExist(@Param("tableName") String tableName); |
| | | |
| | | int dropTable(String tableName); |
| | | @Select({"select count(*) from ${tableName}"}) |
| | | @ResultType(Integer.class) |
| | | int countAll(@Param("tableName") String tableName); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.ddl.processor.ddl; |
| | | |
| | | import com.vci.ubcs.ddl.mapper.DdlDmMapper; |
| | | import com.vci.ubcs.ddl.mapper.DdlMapper; |
| | | import com.vci.ubcs.starter.util.VciSpringUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * è¾¾æ¢¦æ°æ®åºæ§è¡è¡¨æä½sqlçå¤çå¨ |
| | | */ |
| | | @Component |
| | | public class DdlDmMapperProcessor extends DdlMapperProcessor{ |
| | | |
| | | private static final DdlMapper MAPPER = VciSpringUtil.getBean(DdlDmMapper.class); |
| | | |
| | | public DdlDmMapperProcessor() { |
| | | super(MAPPER); |
| | | System.out.println("-----------------"); |
| | | if (MAPPER != null){ |
| | | System.out.println("[success]::å è½½è¾¾æ¢¦æ°æ®åºDDLæä½æå¡æå"); |
| | | }else { |
| | | System.out.println("[fail]::å è½½è¾¾æ¢¦æ°æ®åºDDLæä½æå¡å¤±è´¥"); |
| | | } |
| | | } |
| | | @Override |
| | | public void modifyTableBySqlBase(String tableName, String attributeSql) { |
| | | modifyTableBySql(tableName,attributeSql); |
| | | } |
| | | |
| | | @Override |
| | | boolean support(String url) { |
| | | return "dm.jdbc.driver.DmDriver".equals(url); |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.starter.util.VciSpringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/24 |
| | | */ |
| | | @Component |
| | | public class DdlMapperProcessStrategy { |
| | | |
| | | @Value("${spring.datasource.driver-class-name}") |
| | | private static final String DATABASE_DRIVER = ""; |
| | | private String DATABASE_DRIVER; |
| | | |
| | | private final static List<DdlMapperProcessor> PROCESSORS = Lists.newArrayList(); |
| | | |
| | |
| | | PROCESSORS.add(VciSpringUtil.getBean(DdlOracleMapperProcessor.class)); |
| | | PROCESSORS.add(VciSpringUtil.getBean(DdlMySqlMapperProcessor.class)); |
| | | PROCESSORS.add(VciSpringUtil.getBean(DdlMsMapperProcessor.class)); |
| | | PROCESSORS.add(VciSpringUtil.getBean(DdlDmMapperProcessor.class)); |
| | | } |
| | | |
| | | public static DdlMapperProcessor getProcessor(){ |
| | | @Bean("ddlMapper") |
| | | public DdlMapperProcessor getProcessor(){ |
| | | for (DdlMapperProcessor processor : PROCESSORS) { |
| | | if (processor.support(DATABASE_DRIVER)){ |
| | | System.out.println("==========================================="); |
| | | System.out.println("è·åDDLæä½ç±»æåï¼" + processor.getClass().getName()); |
| | | return processor; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.ddl.processor.dll; |
| | | |
| | | import com.vci.ubcs.ddl.bo.DdlFieldMappingAttrBO; |
| | | import com.vci.ubcs.ddl.mapper.DllDmMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllMapper; |
| | | import com.vci.ubcs.starter.util.VciSpringUtil; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import org.apache.commons.collections4.BidiMap; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description: åºç¨äºè¾¾æ¢¦æ°æ®ï¼çæå建表æä½sqlçå¤çå¨ |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/4/24 |
| | | */ |
| | | @Component |
| | | public class DllDmMapperProcessor extends DllMapperProcessor{ |
| | | |
| | | private static final DllMapper MAPPER = VciSpringUtil.getBean(DllDmMapper.class); |
| | | |
| | | private static final BidiMap<VciFieldTypeEnum, DdlFieldMappingAttrBO> FIELD_MAP = getMappingMapCopy(); |
| | | |
| | | static { |
| | | // éè¦éæ°æ å°çåæ®µç±»åå¨è¿éå |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTDouble,new DdlFieldMappingAttrBO("DOUBLE",26,8,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTInteger,new DdlFieldMappingAttrBO("NUMBER",22,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTLong,new DdlFieldMappingAttrBO("BIGINT",22,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTBoolean,new DdlFieldMappingAttrBO("VARCHAR",5,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTDate,new DdlFieldMappingAttrBO("DATE",null,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTDateTime,new DdlFieldMappingAttrBO("TIMESTAMP",null,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTTime,new DdlFieldMappingAttrBO("TIME",null,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTFilePath,new DdlFieldMappingAttrBO("TEXT",null,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTClob,new DdlFieldMappingAttrBO("CLOB",100,null,true,null)); |
| | | FIELD_MAP.put(VciFieldTypeEnum.VTString,new DdlFieldMappingAttrBO("VARCHAR",255,null,true,null)); |
| | | } |
| | | |
| | | public DllDmMapperProcessor() { |
| | | super(MAPPER); |
| | | System.out.println("-----------------"); |
| | | if (MAPPER != null){ |
| | | System.out.println("[success]::å è½½è¾¾æ¢¦æ°æ®åºDLLæä½æå¡æå"); |
| | | }else { |
| | | System.out.println("[fail]::å è½½è¾¾æ¢¦æ°æ®åºDLLæä½æå¡å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public boolean support(String url) { |
| | | return "dm.jdbc.driver.DmDriver".equals(url); |
| | | } |
| | | |
| | | @Override |
| | | protected DdlFieldMappingAttrBO getMappingBO(VciFieldTypeEnum fieldTypeEnum) { |
| | | return getMappingBOInMap(fieldTypeEnum,FIELD_MAP); |
| | | } |
| | | |
| | | /** |
| | | * ææ°æ®åºå段类åå举ææçVCIåæ®µç±»å |
| | | * |
| | | * @param columnStr æ°æ®åºå段类å |
| | | * @return VCIåæ®µç±»å |
| | | */ |
| | | @Override |
| | | public List<VciFieldTypeEnum> listFieldByColumnStr(String columnStr) { |
| | | return listFieldInMapByColumnStr(columnStr,FIELD_MAP); |
| | | } |
| | | |
| | | @Override |
| | | public VciFieldTypeEnum getFieldTypeByColumnStr(String columnStr, Integer length) { |
| | | return getFieldTypeBeColumnStrInMap(columnStr,length,FIELD_MAP); |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.ddl.mapper.DllOracleMapper; |
| | | import com.vci.ubcs.ddl.mapper.DllSqlLiteMapper; |
| | | import com.vci.ubcs.starter.util.VciSpringUtil; |
| | | import org.springframework.beans.factory.InitializingBean; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | |
| | | * @author LiHang |
| | | * @date 2023/4/24 |
| | | */ |
| | | @Component |
| | | public class DllMapperProcessorStrategy { |
| | | |
| | | @Value("${spring.datasource.driver-class-name}") |
| | | private static final String DATABASE_DRIVER = ""; |
| | | private String DATABASE_DRIVER; |
| | | |
| | | public static List<DllMapperProcessor> processors = Lists.newArrayList(); |
| | | |
| | |
| | | processors.add(VciSpringUtil.getBean(DllSqlLiteMapperProcessor.class)); |
| | | processors.add(VciSpringUtil.getBean(DllMySqlMapperProcessor.class)); |
| | | processors.add(VciSpringUtil.getBean(DllOracleMapperProcessor.class)); |
| | | processors.add(VciSpringUtil.getBean(DllDmMapperProcessor.class)); |
| | | } |
| | | |
| | | public static DllMapperProcessor getProcessor(){ |
| | | @Bean("dllMapper") |
| | | public DllMapperProcessor getProcessor(){ |
| | | for (DllMapperProcessor processor : processors) { |
| | | if (processor.support(DATABASE_DRIVER)){ |
| | | System.out.println("==========================================="); |
| | | System.out.println("è·åDLLæä½ç±»æåï¼" + processor.getClass().getName()); |
| | | return processor; |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | |
| | | /** |
| | | * ddlæ°æ®æä½æå¡ |
| | | */ |
| | | private final DdlMapperProcessor ddlMapper = DdlMapperProcessStrategy.getProcessor(); |
| | | @Autowired |
| | | private DdlMapperProcessor ddlMapper; |
| | | |
| | | |
| | | /** |
| | | * dllæ°æ®æä½æå¡ |
| | | */ |
| | | private final DllMapperProcessor dllMapper = DllMapperProcessorStrategy.getProcessor(); |
| | | @Autowired |
| | | private DllMapperProcessor dllMapper; |
| | | |
| | | private static final String YES = "Y"; |
| | | |