| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const gridCodeRule = (current, size, params) => { |
| | | export const gridCodeRule = (page, limit, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/mdmRule/gridCodeRule', |
| | | method: 'get', |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params, |
| | | current, |
| | | size, |
| | | } |
| | | }) |
| | | } |
| | |
| | | destroy-on-close> |
| | | <div class="search-total"> |
| | | <!-- 头鍿é®åºå --> |
| | | <div class="dialog-search-button"> |
| | | <div slot="title" class="dialog-search-button"> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | |
| | | <el-option |
| | | v-for="condition in item.fieldType=='text' ? searchConditions:switchSearchConditions" |
| | | :key="condition.value" |
| | | |
| | | :label="condition.label" |
| | | :value="condition.value"> |
| | | </el-option> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="grid-content"> |
| | | <el-input v-show="item.fieldType==='text' || item.fieldType===''" v-model="searchFormArrays[index].fieldValue" type="text" placeholder="请è¾å
¥"></el-input> |
| | | <el-select v-show="item.fieldType==='combox'" v-model="searchFormArrays[index].fieldValue" placeholder="è¯·éæ©"> |
| | | <el-input v-if="item.fieldType==='text' || item.fieldType===''" v-model="searchFormArrays[index].fieldValue" type="text" placeholder="请è¾å
¥"></el-input> |
| | | <el-select v-else-if="item.fieldType==='combox'" v-model="searchFormArrays[index].fieldValue" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="option in item.data" |
| | | :key="option.value" |
| | |
| | | :value="option.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-switch v-show="item.fieldType==='truefalse'" v-model="searchFormArrays[index].fieldValue"></el-switch> |
| | | <el-switch v-else-if="item.fieldType==='truefalse'" v-model="searchFormArrays[index].fieldValue"></el-switch> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDictionary } from "@/api/omd/enum"; |
| | | export default { |
| | | name: "advancedQuery", |
| | | props: { |
| | |
| | | type: "Object", |
| | | default: {}, |
| | | }, |
| | | conditionMapParams: { |
| | | type: "Object", |
| | | default: {}, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // åæ®µæ¯è¾å
¥æ¡ç±»åçæ¡ä»¶æ°ç» |
| | | searchConditions: [ |
| | | { |
| | | value: "=", |
| | | value: "_equal", |
| | | label: "çäº", |
| | | },{ |
| | | value: "like", |
| | | label: "å
å«", |
| | | },{ |
| | | value: "!=", |
| | | value: "_notequal", |
| | | label: "ä¸çäº", |
| | | },{ |
| | | value: ">", |
| | | label: "大äº", |
| | | value: "_like", |
| | | label: "å
å«", |
| | | },{ |
| | | value: "<", |
| | | value: "_notlike", |
| | | label: "ä¸å
å«", |
| | | },{ |
| | | value: "_ge", //大äºï¼é»è®¤ä¸ºå¤§äºçäº |
| | | label: "大äº", |
| | | },{ |
| | | value: "_le", //å°äºï¼é»è®¤ä¸ºå°äºçäº |
| | | label: "å°äº", |
| | | }, |
| | | ], |
| | | // åæ®µæ¯åéæä¸ææ¡ç±»åçæ¡ä»¶æ°ç» |
| | | switchSearchConditions: [ |
| | | { |
| | | value: "=", |
| | | value: "_equal", |
| | | label: "çäº", |
| | | },{ |
| | | value: "!=", |
| | | value: "_notequal", |
| | | label: "ä¸çäº", |
| | | }, |
| | | } |
| | | ], |
| | | searchFormArrays: [], |
| | | fieldValue: '', |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | // å°optionsé
ç½®èµå¼å°dataä¸çoptionä¸ï¼é¿å
æ·±æµ
æ·è´çé®é¢æä»¥éè¦è½¬jsonä¹ååèµå¼ |
| | | const data = JSON.stringify(this.options); |
| | | this.initOptions = JSON.parse(data); |
| | | // console.log(this.initOptions); |
| | | //console.log(this.initOptions); |
| | | this.initOptions.forEach((item,index) => { |
| | | if(item.fieldType==='combox') { |
| | | |
| | | this.getEnum(item.comboxKey).then(res=>{ |
| | | console.log(res.data); |
| | | }) |
| | | //item.data = |
| | | } |
| | | let add = { |
| | | queryField: String(item.queryField), |
| | | condition: item.fieldType=='text' ? String("like"):String("="), |
| | | fieldValue: item.fieldType=='truefalse' ? Boolean(false):String(''), |
| | | condition: item.fieldType==='text' ? String("_like"):String("_equal"), |
| | | fieldValue: item.fieldType==='truefalse' ? Boolean(false):String(""), |
| | | } |
| | | this.searchFormArrays.push(add) |
| | | }); |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | async getEnum(enumText){ |
| | | let enumParam = ''; |
| | | await getDictionary({code: enumText}).then(res=>{ |
| | | enumParam = res.data.data; |
| | | // console.log(res.data); |
| | | }) |
| | | //console.log(enumParam); |
| | | return enumParam; |
| | | }, |
| | | |
| | | // ç§»é¤æç´¢æ¡ |
| | | removeInput(index){ |
| | | //console.log(this.initOptions); |
| | |
| | | this.initOptions.forEach((item,index) => { |
| | | let add = { |
| | | queryField: String(item.queryField), |
| | | condition:item.fieldType=='text' ? String("like"):String("="), |
| | | condition:item.fieldType=='text' ? String("_like"):String("_equal"), |
| | | fieldValue: item.fieldType=='truefalse' ? Boolean(false):String(''), |
| | | } |
| | | array.push(add) |
| | |
| | | const searchConditions = this.searchFormArrays; |
| | | for(let index = 0; index < searchConditions.length; index++) { |
| | | //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' == 'undefined'); |
| | | if(searchConditions[index].fieldValue != '' || searchConditions[index].fieldValue+''==='false') { |
| | | if(searchConditions[index].fieldValue.trim() != '' || searchConditions[index].fieldValue+''==='false') { |
| | | // åå¨ç¸åçæ¥è¯¢æ¡ä»¶ |
| | | if(condtionParam['conditionMap['+searchConditions[index].queryField+']']+''.trim() != 'undefined' ) { |
| | | this.$message.warning("åå¨é夿¥è¯¢æ¡ä»¶ï¼è¯·ä»ç»æ ¸å¯¹!"); |
| | | return false; |
| | | } |
| | | condtionParam['conditionMap['+searchConditions[index].queryField+']'] = searchConditions[index].fieldValue; |
| | | //æ¼æ¥æmap对象ï¼å°æ¥è¯¢å¯¹è±¡åconditionæ¼æ¥å¨ä¸èµ·ï¼ç»æé«çº§æ¥è¯¢mapçkey |
| | | condtionParam['conditionMap['+searchConditions[index].queryField+searchConditions[index].condition+']'] = searchConditions[index].fieldValue; |
| | | } |
| | | } |
| | | //æ¥è¯¢æ¡ä»¶æ²¡æåºç°éå¤å±æ§ï¼å¹¶ä¸è¿æ»¤æäºç©ºå¼ï¼ä¼ éç»ç¶ç»ä»¶ |
| | | //console.log(condtionParam); |
| | | // if(){ |
| | | |
| | | // } |
| | | this.$emit('echoContion',condtionParam) |
| | | }, |
| | | // æ¥è¯¢æ¡ä»¶æ²¡æåºç°éå¤å±æ§ï¼å¹¶ä¸è¿æ»¤æäºç©ºå¼ï¼ä¼ éç»ç¶ç»ä»¶ |
| | | // console.log(condtionParam); |
| | | this.$emit('echoContion',condtionParam) |
| | | this.isShowDialog = false; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | position: fixed; |
| | | display: block; |
| | | background-color: #fff; |
| | | top: 90px; |
| | | // top: 10%; |
| | | margin-top: -30px; |
| | | width: 50%; |
| | | z-index: 1000; |
| | | } |
| | |
| | | type: "select", |
| | | cell: true, |
| | | clearable: false, |
| | | dicData: [{ |
| | | value: 'like', label: 'å
å«' |
| | | }, { |
| | | value: '=', label: 'çäº' |
| | | }, { |
| | | value: '>', label: '大äº' |
| | | }, { |
| | | value: '<', label: 'å°äº' |
| | | }, { |
| | | value: '!=', label: 'ä¸çäº' |
| | | }, { |
| | | value: '>=', label: '大äºçäº' |
| | | }, { |
| | | value: '<=', label: 'å°äºçäº' |
| | | }] |
| | | dicData: [ |
| | | { |
| | | value: '_like', label: 'å
å«' |
| | | },{ |
| | | value: "_notlike", label: "ä¸å
å«", |
| | | }, { |
| | | value: 'equal', label: 'çäº' |
| | | }, { |
| | | value: '_notequal', label: 'ä¸çäº' |
| | | }, { |
| | | value: '_ge', label: '大äº' |
| | | }, { |
| | | value: '_le', label: 'å°äº' |
| | | } |
| | | ] |
| | | },{ |
| | | label: "çéå¼", |
| | | prop: "filterValue", |
| | |
| | | this.form.codeSrchCondConfigVOS.push( |
| | | { |
| | | filterField: item.id, |
| | | filterType: '=', |
| | | filterType: 'equal', |
| | | filterTypeText: item.name, |
| | | filterValue: '', |
| | | $cellEdit: false |
| | |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | prop: "lcStatusText", |
| | | prop: "lcStatus", |
| | | value: "0", |
| | | search: true, |
| | | searchLabelWidth: 45, |
| | | searchSpan: 5, |
| | | type: 'select', |
| | | //ç±äºè¿ä¸ªæ¥å£è¿å¨è°è¯æä»¥è¦çè°å¥½äºæè½è°ç¨ |
| | | dicUrl: "/api/ubcs-omd/enum/dictionary?code=codeSearchLCStatus", |
| | | props: { |
| | | label: "itemName", |
| | |
| | | @click="handleDelete"> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery('codeRule')"> |
| | | é«çº§æ¥è¯¢ |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | icon="icon-kelong" |
| | | plain |
| | | @click="openCodeRuleDialog"> |
| | | å
é |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="icon-lianjiekelong" |
| | | style="font-size: 12px;" |
| | | plain |
| | | @click="openOtherCodeRuleDialog"> |
| | | ä»å
¶ä»è§åä¸å
éç æ®µ |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="el-icon-s-help" |
| | | plain |
| | | @click="handleRange"> |
| | | 使ç¨èå´ |
| | | </el-button> |
| | | <el-button size="small" |
| | | <el-button |
| | | size="small" |
| | | icon="icon-qingkong" |
| | | plain |
| | | @click="clearAllCodeSec"> |
| | | æ¸
空ç å¼ |
| | | </el-button> |
| | | <el-button size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery"> |
| | | é«çº§æ¥è¯¢ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | |
| | | <!-- é«çº§æ¥è¯¢å¯¹è¯æ¡ --> |
| | | <advanced-query |
| | | :ref="advancedQueryParam.ref" |
| | |
| | | :visible.sync="advancedQueryParam.advancedQuerySettingBox" |
| | | @echoContion="echoSeniorContionMap"> |
| | | </advanced-query> |
| | | |
| | | <!-- ç¼ç è§åç¸å
³å¯¹è¯æ¡ --> |
| | | <el-dialog title="ç¼ç è§å使ç¨èå´" |
| | | append-to-body |
| | |
| | | @refresh-change="refreshUseRangeChange"> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | |
| | | <!-- ç¼ç è§å,å
éå¯¹è¯æ¡ --> |
| | | <el-dialog title="å
éç¼ç è§å" |
| | | append-to-body |
| | |
| | | <el-button @click="cloneSettingBox = false">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- ç¼ç è§å,ä»å
¶ä»è§åå
éå¯¹è¯æ¡ --> |
| | | <el-dialog title="å
éç¼ç è§åçåºç¡ä¿¡æ¯" |
| | | append-to-body |
| | |
| | | plain |
| | | @click="deleteBasicCode(scope.row)"> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain |
| | | @click="openAdvancedQuery('codeBasicSec')"> |
| | | é«çº§æ¥è¯¢ |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | advancedQueryParam: { |
| | | ref: 'advancedQuery', |
| | | advancedQuerySettingBox: false, |
| | | options: {}, |
| | | options: [], |
| | | //conditionMapParams: {}, |
| | | }, |
| | | |
| | |
| | | }; |
| | | }, |
| | | }, |
| | | created() { |
| | | MasterTable({ |
| | | codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | functionId: 5, |
| | | }).then(res=>{ |
| | | console.log(res.data.tableDefineVO.seniorQueryColumns); |
| | | this.advancedQueryParam.options = res.data.tableDefineVO.seniorQueryColumns; |
| | | }) |
| | | // this.advancedQueryParam.options = [ |
| | | // { |
| | | // data: [], |
| | | // title: 'ç¼å·', |
| | | // fieldType: 'text', |
| | | // queryField: 'id', |
| | | // },{ |
| | | // data: [], |
| | | // title: 'åç§°', |
| | | // fieldType: 'text', |
| | | // queryField: 'name', |
| | | // },{ |
| | | // data: [], |
| | | // title: 'æè¿°', |
| | | // fieldType: 'text', |
| | | // queryField: 'description', |
| | | // }, { |
| | | // data: [], |
| | | // title: 'ç¶æ', |
| | | // fieldType: 'text', |
| | | // queryField: 'description', |
| | | // } |
| | | // ] |
| | | }, |
| | | watch:{ |
| | | |
| | | }, |
| | | methods: { |
| | | |
| | | /** é«çº§æ¥è¯¢å¯¹è¯æ¡ç»ä»¶,ç»ä»¶è¿åç弿¯condtionMap[field]å½¢å¼çæ¥è¯¢æ¡ä»¶ï¼ä¿çåä¹å䏿 · */ |
| | | /** é«çº§æ¥è¯¢å¯¹è¯æ¡ç»ä»¶,ç»ä»¶è¿åç弿¯condtionMap[field]å½¢å¼çæ¥è¯¢æ¡ä»¶ï¼ä¿çäºåä¹å䏿 ·çæ¹å¼ */ |
| | | echoSeniorContionMap(conditionMaps){ |
| | | console.log(conditionMaps); |
| | | |
| | | // console.log(conditionMaps); |
| | | this.query = conditionMaps; |
| | | this.onLoad(this.page); |
| | | }, |
| | | |
| | | /* å
¬å¼ç¼è¾æ¡å
容æ¹å,åç»ä»¶ç¼è¾å®å
¬å¼ä¹åå
容忾æ¶è°ç¨ */ |
| | |
| | | |
| | | /** ç¼ç è§åç¸å
³æ¹æ³ */ |
| | | // æå¼é«çº§æ¥è¯¢çªå£ |
| | | openAdvancedQuery(){ |
| | | this.advancedQueryParam.advancedQuerySettingBox = !this.advancedQueryParam.advancedQuerySettingBox; |
| | | openAdvancedQuery(condition){ |
| | | // MasterTable({ |
| | | // codeClassifyOid: "D9CF223F-317D-71EB-BD11-433A94CAD9F3", |
| | | // functionId: 5, |
| | | // }).then(res=>{ |
| | | // console.log(res.data.tableDefineVO.seniorQueryColumns); |
| | | // }) |
| | | if(condition=='codeRule'){ |
| | | this.advancedQueryParam.options = [ |
| | | { |
| | | data: [], |
| | | title: 'ç¼å·', |
| | | fieldType: 'text', |
| | | queryField: 'id', |
| | | },{ |
| | | data: [], |
| | | title: 'åç§°', |
| | | fieldType: 'text', |
| | | queryField: 'name', |
| | | },{ |
| | | data: [], |
| | | title: 'æè¿°', |
| | | fieldType: 'text', |
| | | queryField: 'description', |
| | | },{ |
| | | data: [ |
| | | // { |
| | | // key: 'ç¼è¾ä¸', |
| | | // value: 'Editing', |
| | | // }, |
| | | // { |
| | | // key: 'å·²åå¸', |
| | | // value: 'Released', |
| | | // }, |
| | | // { |
| | | // key: 'åç¨', |
| | | // value: 'Disabled', |
| | | // }, |
| | | ], |
| | | title: 'ç¶æ', |
| | | fieldType: 'combox', |
| | | queryField: 'lcStatus', |
| | | comboxKey: 'Eummaterialtype', |
| | | } |
| | | ] |
| | | }else { |
| | | this.advancedQueryParam.options = [ |
| | | { |
| | | data: [], |
| | | title: 'ç æ®µç¼å·', |
| | | fieldType: 'text', |
| | | queryField: 'id', |
| | | },{ |
| | | data: [], |
| | | title: 'ç æ®µåç§°', |
| | | fieldType: 'text', |
| | | queryField: 'name', |
| | | },{ |
| | | data: [], |
| | | title: 'æè¿°', |
| | | fieldType: 'text', |
| | | queryField: 'description', |
| | | },{ |
| | | data: [], |
| | | title: 'ç æ®µç±»å', |
| | | fieldType: 'combox', |
| | | queryField: 'secType', |
| | | comboxKey: 'codeSecType', |
| | | } |
| | | ] |
| | | } |
| | | this.advancedQueryParam.advancedQuerySettingBox = true; |
| | | }, |
| | | // æ¥è¯¢ä½¿ç¨èå´ |
| | | handleRange(){ |
| | |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ åï¼å¿«éæ¥è¯¢é»è®¤éç¨æ¨¡ç³æ¥è¯¢ |
| | | if(params){ |
| | | Object.keys(params).forEach(key=>{ |
| | | this.query['conditionMap['+key+'_like]'] = params[key]; |
| | | }); |
| | | } |
| | | console.log(this.query); |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | // ç¼ç è§åå½åéä¸è¡ååçæ¶å触å |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]); |
| | | //å½åéä¸è¡ä¸ºç©ºçæ¶åå°±å°ç 段管çè¡¨æ ¼æ°æ®ç½®ç©º |
| | | //å½åéä¸è¡ä¸ºç©ºçæ¶åå°±å°ç 段管çè¡¨æ ¼æ°æ®ç½®ç©º,å¹¶ç¦ç¨ç¸å
³åè½ |
| | | if(list == ''){ |
| | | this.basicData = []; |
| | | this.hideBasicTable(false); |
| | |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | onLoad(page,params={}) { |
| | | this.loading = true; |
| | | gridCodeRule(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
| | | gridCodeRule( |
| | | page.currentPage, |
| | | page.pageSize, |
| | | this.query |
| | | ).then(res => { |
| | | //console.log(res.data); |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | // æ¥è¯¢çå¼ä¸ºç©ºæ¶ï¼è¦å°ç 段管çç¸å
³çå
容ç¦ç¨ |
| | | if(data.records.length <= 0) { |
| | | this.hideBasicTable(false); |
| | | this.selectionList = []; |
| | | this.basicData = []; |
| | | return; |
| | | } |
| | | this.loadBasic(this.data[0]) |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.toggleRowSelection(this.data[0]); |
| | |
| | | <artifactId>staxon</artifactId> |
| | | <version>1.3</version> |
| | | </dependency>--> |
| | | <!-- poi --> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>4.1.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>4.1.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml-schemas</artifactId> |
| | | <version>4.1.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-util-api</artifactId> |
| | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import org.apache.commons.math3.util.Precision; |
| | | import org.aspectj.weaver.ast.Not; |
| | | import org.ietf.jgss.Oid; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | private String referTypeName; |
| | | |
| | | /** |
| | | <<<<<<< Updated upstream |
| | | * æ¯å¦å¼å¯å
¨å± |
| | | */ |
| | | private String isOpenGlobal; |
| | | ======= |
| | | * æå±é¢å |
| | | */ |
| | | private String doMain; |
| | | >>>>>>> Stashed changes |
| | | |
| | | /** |
| | | * æåº |
| | |
| | | */ |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | <<<<<<< Updated upstream |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | ======= |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | >>>>>>> Stashed changes |
| | | |
| | | /** |
| | | * Description: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.util; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * map转å表æ¥è¯¢å¯¹è±¡ |
| | | * 为é¿å
BladeXæ¡æ¶èªå¸¦çMap转Wrapperèªå¨æ å°é©¼å³°ï¼ |
| | | * è¿è¾¹åç¬åä¸ä¸ªä»¥å
æ··æ· |
| | | * @author ludc |
| | | * @date 2023/6/6 15:26 |
| | | */ |
| | | public class UBCSCondition { |
| | | |
| | | public UBCSCondition() { |
| | | } |
| | | |
| | | public static <T> IPage<T> getPage(Query query) { |
| | | Page<T> page = new Page((long) Func.toInt(query.getCurrent(), 1), (long)Func.toInt(query.getSize(), 10)); |
| | | String[] ascArr = Func.toStrArray(query.getAscs()); |
| | | String[] descArr = ascArr; |
| | | int var4 = ascArr.length; |
| | | |
| | | int var5; |
| | | for(var5 = 0; var5 < var4; ++var5) { |
| | | String asc = descArr[var5]; |
| | | page.addOrder(new OrderItem[]{OrderItem.asc(StringUtil.cleanIdentifier(asc))}); |
| | | } |
| | | |
| | | descArr = Func.toStrArray(query.getDescs()); |
| | | String[] var8 = descArr; |
| | | var5 = descArr.length; |
| | | |
| | | for(int var9 = 0; var9 < var5; ++var9) { |
| | | String desc = var8[var9]; |
| | | page.addOrder(new OrderItem[]{OrderItem.desc(StringUtil.cleanIdentifier(desc))}); |
| | | } |
| | | |
| | | return page; |
| | | } |
| | | |
| | | public static <T> QueryWrapper<T> getQueryWrapper(T entity) { |
| | | return new QueryWrapper<T>(entity); |
| | | } |
| | | |
| | | public static <T> QueryWrapper<T> getQueryWrapper(Map<String, Object> query, Class<T> clazz) { |
| | | Kv exclude = Kv.create().set("Blade-Auth", "Blade-Auth").set("current", "current").set("size", "size").set("ascs", "ascs").set("descs", "descs"); |
| | | return getQueryWrapper(query, exclude, clazz); |
| | | } |
| | | |
| | | public static <T> QueryWrapper<T> getQueryWrapperByMapString(Map<String, String> query, Class<T> clazz) { |
| | | Kv exclude = Kv.create().set("Blade-Auth", "Blade-Auth").set("current", "current").set("size", "size").set("ascs", "ascs").set("descs", "descs"); |
| | | return getQueryWrapperByMapString(query, exclude, clazz); |
| | | } |
| | | |
| | | /** |
| | | * map转æ¢ä¸ºQueryWrapper |
| | | * @param query |
| | | * @param exclude |
| | | * @param clazz |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> QueryWrapper<T> getQueryWrapper(Map<String, Object> query, Map<String, Object> exclude, Class<T> clazz) { |
| | | exclude.forEach((k, v) -> { |
| | | query.remove(k); |
| | | }); |
| | | QueryWrapper<T> qw = new QueryWrapper(); |
| | | qw.setEntity(BeanUtil.newInstance(clazz)); |
| | | UBCSSqlKeyword.buildCondition(query, qw); |
| | | return qw; |
| | | } |
| | | |
| | | public static <T> QueryWrapper<T> getQueryWrapperByMapString(Map<String, String> query, Map<String, Object> exclude, Class<T> clazz) { |
| | | exclude.forEach((k, v) -> { |
| | | query.remove(k); |
| | | }); |
| | | QueryWrapper<T> qw = new QueryWrapper<>(); |
| | | qw.setEntity(BeanUtil.newInstance(clazz)); |
| | | UBCSSqlKeyword.buildConditionByMapString(query, qw); |
| | | return qw; |
| | | } |
| | | |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapper(T entity) { |
| | | return new MPJLambdaWrapper(entity); |
| | | } |
| | | |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapper(Map<String, Object> query, Class<T> clazz) { |
| | | Kv exclude = Kv.create().set("Blade-Auth", "Blade-Auth").set("current", "current").set("size", "size").set("ascs", "ascs").set("descs", "descs"); |
| | | return getMPJLambdaWrapper(query, exclude, clazz); |
| | | } |
| | | |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapperByMapString(Map<String, String> query, Class<T> clazz) { |
| | | Kv exclude = Kv.create().set("Blade-Auth", "Blade-Auth").set("current", "current").set("size", "size").set("ascs", "ascs").set("descs", "descs"); |
| | | return getMPJLambdaWrapperByMapString(query, exclude, clazz); |
| | | } |
| | | |
| | | /** |
| | | * map转æ¢ä¸ºMPJLambdaWrapper |
| | | * @param query |
| | | * @param exclude |
| | | * @param clazz |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapper(Map<String, Object> query, Map<String, Object> exclude, Class<T> clazz) { |
| | | exclude.forEach((k, v) -> { |
| | | query.remove(k); |
| | | }); |
| | | MPJLambdaWrapper<T> qw = new MPJLambdaWrapper(); |
| | | qw.setEntity(BeanUtil.newInstance(clazz)); |
| | | UBCSSqlKeyword.buildCondition(query, qw); |
| | | return qw; |
| | | } |
| | | |
| | | public static <T> MPJLambdaWrapper<T> getMPJLambdaWrapperByMapString(Map<String, String> query, Map<String, Object> exclude, Class<T> clazz) { |
| | | exclude.forEach((k, v) -> { |
| | | query.remove(k); |
| | | }); |
| | | MPJLambdaWrapper<T> qw = new MPJLambdaWrapper(); |
| | | qw.setEntity(BeanUtil.newInstance(clazz)); |
| | | UBCSSqlKeyword.buildConditionByMapString(query, qw); |
| | | return qw; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.util; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * UBCSSqlKeyword |
| | | * map转wrapperæ¶ç¨å°çæ¯å¯¹è½¬æ¢ |
| | | * @author ludc |
| | | * @date 2023/06/06 10:01 |
| | | */ |
| | | public class UBCSSqlKeyword { |
| | | |
| | | private static final String SQL_REGEX = "'|%|--|insert|delete|select|count|group|union|drop|truncate|alter|grant|execute|exec|xp_cmdshell|call|declare|sql"; |
| | | private static final String EQUAL = "_equal"; |
| | | private static final String NOT_EQUAL = "_notequal"; |
| | | private static final String LIKE = "_like"; |
| | | private static final String LIKE_LEFT = "_likeleft"; |
| | | private static final String LIKE_RIGHT = "_likeright"; |
| | | private static final String NOT_LIKE = "_notlike"; |
| | | private static final String GE = "_ge"; |
| | | private static final String LE = "_le"; |
| | | private static final String GT = "_gt"; |
| | | private static final String LT = "_lt"; |
| | | private static final String DATE_GE = "_datege"; |
| | | private static final String DATE_GT = "_dategt"; |
| | | private static final String DATE_EQUAL = "_dateequal"; |
| | | private static final String DATE_LT = "_datelt"; |
| | | private static final String DATE_LE = "_datele"; |
| | | private static final String IS_NULL = "_null"; |
| | | private static final String NOT_NULL = "_notnull"; |
| | | private static final String IGNORE = "_ignore"; |
| | | |
| | | public UBCSSqlKeyword() { |
| | | } |
| | | |
| | | public static void buildCondition(Map<String, Object> query, QueryWrapper<?> qw) { |
| | | if (!Func.isEmpty(query)) { |
| | | query.forEach((k, v) -> { |
| | | if (!Func.hasEmpty(new Object[]{k, v}) && !k.endsWith("_ignore")) { |
| | | if (k.endsWith("_equal")) { |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | | qw.likeLeft(getColumn(k, "_likeleft"), v); |
| | | } else if (k.endsWith("_likeright")) { |
| | | qw.likeRight(getColumn(k, "_likeright"), v); |
| | | } else if (k.endsWith("_notlike")) { |
| | | qw.notLike(getColumn(k, "_notlike"), v); |
| | | } else if (k.endsWith("_ge")) { |
| | | qw.ge(getColumn(k, "_ge"), v); |
| | | } else if (k.endsWith("_le")) { |
| | | qw.le(getColumn(k, "_le"), v); |
| | | } else if (k.endsWith("_gt")) { |
| | | qw.gt(getColumn(k, "_gt"), v); |
| | | } else if (k.endsWith("_lt")) { |
| | | qw.lt(getColumn(k, "_lt"), v); |
| | | } else if (k.endsWith("_datege")) { |
| | | qw.ge(getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dategt")) { |
| | | qw.gt(getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dateequal")) { |
| | | qw.eq(getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datele")) { |
| | | qw.le(getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datelt")) { |
| | | qw.lt(getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_null")) { |
| | | qw.isNull(getColumn(k, "_null")); |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | public static void buildCondition(Map<String, Object> query, MPJLambdaWrapper<?> qw) { |
| | | if (!Func.isEmpty(query)) { |
| | | query.forEach((k, v) -> { |
| | | if (!Func.hasEmpty(new Object[]{k, v}) && !k.endsWith("_ignore")) { |
| | | if (k.endsWith("_equal")) { |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | | qw.likeLeft(getColumn(k, "_likeleft"), v); |
| | | } else if (k.endsWith("_likeright")) { |
| | | qw.likeRight(getColumn(k, "_likeright"), v); |
| | | } else if (k.endsWith("_notlike")) { |
| | | qw.notLike(getColumn(k, "_notlike"), v); |
| | | } else if (k.endsWith("_ge")) { |
| | | qw.ge(getColumn(k, "_ge"), v); |
| | | } else if (k.endsWith("_le")) { |
| | | qw.le(getColumn(k, "_le"), v); |
| | | } else if (k.endsWith("_gt")) { |
| | | qw.gt(getColumn(k, "_gt"), v); |
| | | } else if (k.endsWith("_lt")) { |
| | | qw.lt(getColumn(k, "_lt"), v); |
| | | } else if (k.endsWith("_datege")) { |
| | | qw.ge(getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dategt")) { |
| | | qw.gt(getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dateequal")) { |
| | | qw.eq(getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datele")) { |
| | | qw.le(getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datelt")) { |
| | | qw.lt(getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_null")) { |
| | | qw.isNull(getColumn(k, "_null")); |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | public static void buildConditionByMapString(Map<String, String> query, MPJLambdaWrapper<?> qw) { |
| | | if (!Func.isEmpty(query)) { |
| | | query.forEach((k, v) -> { |
| | | if (!Func.hasEmpty(new Object[]{k, v}) && !k.endsWith("_ignore")) { |
| | | if (k.endsWith("_equal")) { |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | | qw.likeLeft(getColumn(k, "_likeleft"), v); |
| | | } else if (k.endsWith("_likeright")) { |
| | | qw.likeRight(getColumn(k, "_likeright"), v); |
| | | } else if (k.endsWith("_notlike")) { |
| | | qw.notLike(getColumn(k, "_notlike"), v); |
| | | } else if (k.endsWith("_ge")) { |
| | | qw.ge(getColumn(k, "_ge"), v); |
| | | } else if (k.endsWith("_le")) { |
| | | qw.le(getColumn(k, "_le"), v); |
| | | } else if (k.endsWith("_gt")) { |
| | | qw.gt(getColumn(k, "_gt"), v); |
| | | } else if (k.endsWith("_lt")) { |
| | | qw.lt(getColumn(k, "_lt"), v); |
| | | } else if (k.endsWith("_datege")) { |
| | | qw.ge(getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dategt")) { |
| | | qw.gt(getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dateequal")) { |
| | | qw.eq(getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datele")) { |
| | | qw.le(getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datelt")) { |
| | | qw.lt(getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_null")) { |
| | | qw.isNull(getColumn(k, "_null")); |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | public static void buildConditionByMapString(Map<String, String> query, QueryWrapper<?> qw) { |
| | | if (!Func.isEmpty(query)) { |
| | | query.forEach((k, v) -> { |
| | | if (!Func.hasEmpty(new Object[]{k, v}) && !k.endsWith("_ignore")) { |
| | | if (k.endsWith("_equal")) { |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | | qw.likeLeft(getColumn(k, "_likeleft"), v); |
| | | } else if (k.endsWith("_likeright")) { |
| | | qw.likeRight(getColumn(k, "_likeright"), v); |
| | | } else if (k.endsWith("_notlike")) { |
| | | qw.notLike(getColumn(k, "_notlike"), v); |
| | | } else if (k.endsWith("_ge")) { |
| | | qw.ge(getColumn(k, "_ge"), v); |
| | | } else if (k.endsWith("_le")) { |
| | | qw.le(getColumn(k, "_le"), v); |
| | | } else if (k.endsWith("_gt")) { |
| | | qw.gt(getColumn(k, "_gt"), v); |
| | | } else if (k.endsWith("_lt")) { |
| | | qw.lt(getColumn(k, "_lt"), v); |
| | | } else if (k.endsWith("_datege")) { |
| | | qw.ge(getColumn(k, "_datege"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dategt")) { |
| | | qw.gt(getColumn(k, "_dategt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_dateequal")) { |
| | | qw.eq(getColumn(k, "_dateequal"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datele")) { |
| | | qw.le(getColumn(k, "_datele"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_datelt")) { |
| | | qw.lt(getColumn(k, "_datelt"), DateUtil.parse(String.valueOf(v), "yyyy-MM-dd HH:mm:ss")); |
| | | } else if (k.endsWith("_null")) { |
| | | qw.isNull(getColumn(k, "_null")); |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | private static String getColumn(String column, String keyword) { |
| | | //没æè½¬ä¸å线æ å° |
| | | return StringUtil.removeSuffix(column, keyword).toLowerCase(Locale.ROOT); |
| | | } |
| | | |
| | | public static String filter(String param) { |
| | | return param == null ? null : param.replaceAll("(?i)'|%|--|insert|delete|select|count|group|union|drop|truncate|alter|grant|execute|exec|xp_cmdshell|call|declare|sql", ""); |
| | | } |
| | | |
| | | } |
| | |
| | | <scope>compile</scope> |
| | | </dependency>--> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.code.dto.CodeReferConfigDTO; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.code.service.ICodeReferConfigService; |
| | | ======= |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.service.CodeReferConfigService; |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | import java.util.Map; |
| | | >>>>>>> Stashed changes |
| | | |
| | | /** |
| | | * åç
§é
置表(CodeReferConfig)表æ§å¶å± |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | import com.vci.ubcs.code.wrapper.CodeRuleWrapper; |
| | | |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | } |
| | | |
| | | /** |
| | | * ç¼ç è§å å页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "å页", notes = "ä¼ å
¥codeRuleVO") |
| | | public R<IPage<CodeRuleVO>> list(CodeRule codeRule, Query query) { |
| | | IPage<CodeRule> pages = codeRuleService.page(Condition.getPage(query), Condition.getQueryWrapper(codeRule)); |
| | | return R.data(CodeRuleWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * ç¼ç è§å èªå®ä¹å页 |
| | | * @return baseQueryObject |
| | | */ |
| | | @GetMapping("/gridCodeRule") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "å页", notes = "ä¼ å
¥CodeRule") |
| | | public R<IPage<CodeRuleVO>> gridCodeRule(CodeRuleVO CodeRule, Query query) { |
| | | IPage<CodeRuleVO> pages = codeRuleService.gridCodeRule(Condition.getPage(query.setDescs("CREATETIME")), CodeRule); |
| | | public R<IPage<CodeRuleVO>> gridCodeRule(BladeQueryObject bladeQueryObject) { |
| | | IPage<CodeRuleVO> pages = codeRuleService.gridCodeRule(bladeQueryObject.getQuery().setDescs("CREATETIME"), bladeQueryObject.getConditionMap()); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * åç
§ä¸»æ°æ®ç¼ç è§åå表 |
| | | * @param CodeRule |
| | | * @param query |
| | | * @param bladeQueryObject |
| | | * @return ä¸»æ°æ®ç¼ç è§åæ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | */ |
| | | @GetMapping("/refDataGrid") |
| | | @ApiOperationSupport(order = 10) |
| | | @ApiOperation(value = "åç
§ä¸»æ°æ®ç¼ç è§åå表", notes = "ä¼ å
¥oids") |
| | | public R<IPage<CodeRuleVO>> refDataGridCodeRule(CodeRuleVO CodeRule, Query query){ |
| | | return R.data(codeRuleService.refDataGridCodeRule(Condition.getPage(query),CodeRule)); |
| | | public R<IPage<CodeRuleVO>> refDataGridCodeRule(BladeQueryObject bladeQueryObject){ |
| | | return R.data(codeRuleService.refDataGridCodeRule(bladeQueryObject)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param codeRule |
| | | * @return |
| | | */ |
| | | List<CodeRule> selectCodeRulePage(IPage page,@Param("codeRule") CodeRuleVO codeRule); |
| | | // List<CodeRule> selectCodeRulePage(IPage page,@Param("codeRule") CodeRuleVO codeRule); |
| | | |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import org.apache.commons.codec.net.QCodec; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ç¼ç è§å æå¡ç±» |
| | |
| | | /** |
| | | * èªå®ä¹å页 |
| | | * |
| | | * @param page |
| | | * @param codeRule |
| | | * @param query |
| | | * @param condtionMap |
| | | * @return |
| | | */ |
| | | IPage<CodeRuleVO> gridCodeRule(IPage<CodeRuleVO> page, CodeRuleVO codeRule); |
| | | IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> condtionMap); |
| | | |
| | | /** |
| | | * æ ¡éªç¼ç è§åçç¶ææ¯å¦å¯ä»¥ç¼è¾æå é¤ |
| | |
| | | |
| | | /** |
| | | * åç
§ä¸»æ°æ®ç¼ç è§åå表 |
| | | * @param codeRule æ¥è¯¢æ¡ä»¶ |
| | | * @param page å页åæåº |
| | | * @param bladeQueryObject æ¥è¯¢æ¡ä»¶ |
| | | * @return ä¸»æ°æ®ç¼ç è§åæ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | IPage<CodeRuleVO> refDataGridCodeRule(IPage<CodeRuleVO> page, CodeRuleVO codeRule) throws VciBaseException; |
| | | IPage<CodeRuleVO> refDataGridCodeRule(BladeQueryObject bladeQueryObject) throws VciBaseException; |
| | | |
| | | /** |
| | | * åç¨ä¸å¯ç¨ç¼ç è§å |
| | |
| | | import com.vci.ubcs.code.service.ICodeAllCodeService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeAllCodeVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeKeyAttrRepeatRuleVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeRuleVO; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | ======= |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.bo.WriteExcelData; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.revision.model.TreeWrapperOptions; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.BladeTreeQueryObject; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.pagemodel.Tree; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | private ICodeRuleService codeRuleService; |
| | | |
| | | @Resource |
| | | <<<<<<< Updated upstream |
| | | private IBtmTypeClient btmTypeClient; |
| | | ======= |
| | | private CodeOsbtmtypeMapper codeOsbtmtypeMapper; |
| | | |
| | | @Resource |
| | | private CodeOsbtmtypeattributeMapper codeOsbtmtypeattributeMapper; |
| | | |
| | | @Resource |
| | | private IBtmTypeClient btmTypeClient; |
| | | |
| | | |
| | | >>>>>>> Stashed changes |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | |
| | | if(Func.isEmpty(btmTypeVOS) || Func.isEmpty(trees)){ |
| | | return null; |
| | | } |
| | | <<<<<<< Updated upstream |
| | | List<Tree> treeList = trees.stream().filter(tree -> !CollectionUtils.isEmpty(btmTypeVOS.stream().filter(btmType -> { |
| | | if(Objects.equals(tree.getAttributes().get("id"), btmType.getId())){ |
| | | tree.getAttributes().put("btmTypeOid",btmType.getOid()); |
| | |
| | | return false; |
| | | }).collect(Collectors.toList()))) |
| | | .collect(Collectors.toList()); |
| | | ======= |
| | | List<Tree> treeList = trees.stream().filter(tree -> btmTypeVOS.stream(). |
| | | anyMatch(btmType -> Objects.equals(tree.getAttributes().get("id"), btmType.getId()))).collect(Collectors.toList()); |
| | | >>>>>>> Stashed changes |
| | | return treeList; |
| | | } |
| | | |
| | |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.PatternUtil; |
| | | import com.vci.ubcs.starter.util.UBCSCondition; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | |
| | | if(conditionMap == null){ |
| | | conditionMap = new HashMap<String, String>(); |
| | | } |
| | | return gridCodeClassifyTemplateAttr(Map2MPJLambdaUtil.getMPJLambdaWrapperByMapString(conditionMap, CodeClassifyTemplateAttr.class),pageHelper); |
| | | return gridCodeClassifyTemplateAttr(UBCSCondition.getMPJLambdaWrapperByMapString(conditionMap, CodeClassifyTemplateAttr.class),pageHelper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.util.UBCSCondition; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | |
| | | CodeClassifyTemplateButton codeClassifyTemplateButton = new CodeClassifyTemplateButton(); |
| | | BeanMap beanMap = BeanMap.create(codeClassifyTemplateButton); |
| | | beanMap.putAll(conditionMap); |
| | | MPJLambdaWrapper<CodeClassifyTemplateButton> mpjLambdaWrapper = Map2MPJLambdaUtil.getMPJLambdaWrapper(codeClassifyTemplateButton) |
| | | MPJLambdaWrapper<CodeClassifyTemplateButton> mpjLambdaWrapper = UBCSCondition.getMPJLambdaWrapper(codeClassifyTemplateButton) |
| | | .selectAll(CodeClassifyTemplateButton.class) |
| | | .selectAs(CodeButton::getName, CodeClassifyTemplateButton::getClassifyButtonOidName) |
| | | .selectAs(CodeButton::getId, CodeClassifyTemplateButton::getClassifyButtonId) |
| | |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | <<<<<<< Updated upstream |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | |
| | | import com.vci.ubcs.code.service.ICodeReferConfigService; |
| | | import com.vci.ubcs.code.service.ICodeShowFieldConfigService; |
| | | import com.vci.ubcs.code.service.ICodeSrchCondConfigService; |
| | | ======= |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.vci.ubcs.code.constant.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.code.dto.CodeClassifyProcessTempDTO; |
| | | import com.vci.ubcs.code.dto.CodeReferConfigDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.mapper.CodeReferConfigMapper; |
| | | import com.vci.ubcs.code.mapper.CodeShowFieldConfigMapper; |
| | | import com.vci.ubcs.code.service.CodeReferConfigService; |
| | | import com.vci.ubcs.code.service.CodeShowFieldConfigService; |
| | | import com.vci.ubcs.code.service.CodeSrchCondConfigService; |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyProcessTempWrapper; |
| | | import com.vci.ubcs.code.wrapper.CodeReferConfigWraper; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | ======= |
| | | import com.vci.ubcs.code.wrapper.CodeShowFieldConfigWraper; |
| | | import com.vci.ubcs.code.wrapper.CodeSrchCondConfigWraper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | <<<<<<< Updated upstream |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.cglib.beans.BeanMap; |
| | | import org.springframework.stereotype.Service; |
| | | ======= |
| | | import org.springframework.cglib.beans.BeanMap; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | >>>>>>> Stashed changes |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | import java.util.Objects; |
| | | >>>>>>> Stashed changes |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.TS_NOT_PROCESS; |
| | | |
| | |
| | | * @since 2023-05-19 17:48:02 |
| | | */ |
| | | @Service("CodeReferconfigService") |
| | | <<<<<<< Updated upstream |
| | | public class CodeReferConfigServiceImpl extends MPJBaseServiceImpl<CodeReferConfigMapper,CodeReferConfig> implements ICodeReferConfigService { |
| | | ======= |
| | | public class CodeReferConfigServiceImpl extends MPJBaseServiceImpl<CodeReferConfigMapper,CodeReferConfig> implements CodeReferConfigService { |
| | | >>>>>>> Stashed changes |
| | | |
| | | @Resource |
| | | private CodeReferConfigMapper codeReferconfigMapper; |
| | | |
| | | @Resource |
| | | <<<<<<< Updated upstream |
| | | private ICodeShowFieldConfigService ICodeShowFieldConfigService; |
| | | |
| | | @Resource |
| | | private ICodeSrchCondConfigService ICodeSrchCondConfigService; |
| | | ======= |
| | | private CodeShowFieldConfigService codeShowFieldConfigService; |
| | | |
| | | @Resource |
| | | private CodeSrchCondConfigService codeSrchCondConfigService; |
| | | >>>>>>> Stashed changes |
| | | |
| | | /** |
| | | * éè¿IDæ¥è¯¢åæ¡æ°æ® |
| | |
| | | return CodeReferConfigWraper.build().entityVO(codeReferConfig); |
| | | } |
| | | |
| | | <<<<<<< Updated upstream |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param bladeQueryObject ç鿡件 |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | @Override |
| | | public IPage<CodeReferConfigVO> queryByJoinPage(BladeQueryObject bladeQueryObject) { |
| | | CodeReferConfig codeReferConfig = new CodeReferConfig(); |
| | | // æ ¹æ®ç§æ·è¿è¡åºå对åºçåç
§é
ç½® |
| | | Map<String, Object> conditionMap = bladeQueryObject.getConditionMap(); |
| | | <<<<<<< Updated upstream |
| | | // æ¥è¯¢æå±ç§æ·ä¸çåå¼å¯å
¨å±çåç
§é
ç½®ä¿¡æ¯ |
| | | conditionMap.put("tenantId",AuthUtil.getTenantId()); |
| | | conditionMap.put("isOpenGlobal","true"); |
| | | ======= |
| | | conditionMap.put("tenantId",AuthUtil.getTenantId()); |
| | | >>>>>>> Stashed changes |
| | | BeanMap beanMap = BeanMap.create(codeReferConfig); |
| | | beanMap.putAll(conditionMap); |
| | | // æ·»å é»è®¤æåºå段,æ ¹æ®æ¶é´è¿è¡æåº |
| | |
| | | return CodeReferConfigWraper.build().pageVO(codeReferConfigs); |
| | | } |
| | | |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param codeReferConfigVO ç鿡件 |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | >>>>>>> Stashed changes |
| | | @Override |
| | | public List<CodeReferConfigVO> queryByList(CodeReferConfigVO codeReferConfigVO) { |
| | | codeReferConfigVO.setTenantId(AuthUtil.getTenantId()); |
| | | //MPJLambdaWrapper<CodeReferConfig> mpjLambdaWrapper = Map2MPJLambdaUtil.getMPJLambdaWrapper(bladeQueryObject.getConditionMap(), CodeReferConfig.class) |
| | | //MPJLambdaWrapper<CodeReferConfig> mpjLambdaWrapper = UBCSCondition.getMPJLambdaWrapper(bladeQueryObject.getConditionMap(), CodeReferConfig.class) |
| | | MPJLambdaWrapper<CodeReferConfig> mpjLambdaWrapper = getMPJLambdaWrapper() |
| | | .setEntity(codeReferConfigVO) |
| | | .orderBy(true, true, CodeReferConfig::getCreateTime); |
| | |
| | | if (StringUtils.isBlank(codeReferConfigVO.getReferType())){ |
| | | throw new VciBaseException("åç
§é
ç½®ä¸è½ä¸ºç©º"); |
| | | } |
| | | <<<<<<< Updated upstream |
| | | // Long count = countCodeReferConfig(codeReferConfigVO); |
| | | // if(count > 0){ |
| | | // throw new VciBaseException("å·²åå¨ç¸åçåç
§é
ç½®"); |
| | |
| | | if(Func.isNotEmpty(codeReferConfig.getCodeSrchCondConfigs())){ |
| | | ICodeSrchCondConfigService.insertBatch(codeReferConfigVO.getCodeSrchCondConfigVOS(),codeReferConfig.getOid()); |
| | | } |
| | | ======= |
| | | Long count = countCodeReferConfig(codeReferConfigVO); |
| | | if(count > 0){ |
| | | throw new VciBaseException("å·²åå¨ç¸åçåç
§é
ç½®"); |
| | | } |
| | | |
| | | CodeReferConfig CodeReferConfig = Objects.requireNonNull(BeanUtil.copy(codeReferConfigVO, CodeReferConfig.class)); |
| | | boolean resInsertReferConfig = this.codeReferconfigMapper.insert(CodeReferConfig) > 0; |
| | | if (!resInsertReferConfig) { |
| | | return R.fail("æ°å¢åç
§é
置失败ï¼"); |
| | | } |
| | | codeShowFieldConfigService.insertBatch(codeReferConfigVO.getCodeShowFieldConfigVOS()); |
| | | codeSrchCondConfigService.insertBatch(codeReferConfigVO.getCodeSrchCondConfigVOS()); |
| | | >>>>>>> Stashed changes |
| | | return R.data(codeReferConfigVO); |
| | | } |
| | | |
| | |
| | | */ |
| | | private Long countCodeReferConfig(CodeReferConfigVO codeReferConfigVO) { |
| | | String templateName = codeReferConfigVO.getName(); |
| | | <<<<<<< Updated upstream |
| | | String templateId = codeReferConfigVO.getId(); |
| | | if (StringUtils.isBlank(templateName) && StringUtils.isBlank(templateId)){ |
| | | throw new VciBaseException("åç
§é
ç½®ç¼å·ååç§°ä¸è½ä¸ºç©º"); |
| | |
| | | .eq(CodeReferConfig::getIsOpenGlobal,"true") // æ¥è¯¢å¼å¯å
¨å±çåç
§é
ç½® |
| | | .eq(CodeReferConfig::getId,templateId) |
| | | .eq(CodeReferConfig::getName,templateName); |
| | | ======= |
| | | if (StringUtils.isBlank(templateName)){ |
| | | throw new VciBaseException("åç
§é
ç½®åç§°ä¸è½ä¸ºç©º"); |
| | | } |
| | | LambdaQueryWrapper<CodeReferConfig> wrapper = Wrappers.<CodeReferConfig>query() |
| | | .lambda().eq(CodeReferConfig::getId, codeReferConfigVO.getId()) |
| | | .eq(CodeReferConfig::getTenantId, codeReferConfigVO.getTenantId()); |
| | | >>>>>>> Stashed changes |
| | | Long count = codeReferconfigMapper.selectCount(wrapper); |
| | | return count; |
| | | } |
| | |
| | | private MPJLambdaWrapper<CodeReferConfig> getMPJLambdaWrapper(){ |
| | | MPJLambdaWrapper<CodeReferConfig> mpjLambdaWrapper = new MPJLambdaWrapper<>(CodeReferConfig.class) |
| | | .selectAll(CodeReferConfig.class) |
| | | <<<<<<< Updated upstream |
| | | // .select(CodeShowFieldConfig::getField |
| | | // ,CodeShowFieldConfig::getTitle |
| | | // ,CodeShowFieldConfig::getFieldType |
| | |
| | | // CodeSrchCondConfig::getFilterType, |
| | | // CodeSrchCondConfig::getFilterField, |
| | | // CodeSrchCondConfig::getFilterValue) |
| | | ======= |
| | | // .select(CodeShowFieldConfig::getField |
| | | // ,CodeShowFieldConfig::getTitle |
| | | // ,CodeShowFieldConfig::getFieldType |
| | | // ,CodeShowFieldConfig::getSort |
| | | // ,CodeShowFieldConfig::getAttrSortField |
| | | // ,CodeShowFieldConfig::getWidth |
| | | // ,CodeShowFieldConfig::getFixedPosition |
| | | // ,CodeShowFieldConfig::getTemplet) |
| | | // .select( |
| | | // CodeSrchCondConfig::getFilterType, |
| | | // CodeSrchCondConfig::getFilterField, |
| | | // CodeSrchCondConfig::getFilterValue) |
| | | >>>>>>> Stashed changes |
| | | .selectCollection(CodeShowFieldConfig.class, CodeReferConfig::getCodeShowFieldConfigs) |
| | | .selectCollection(CodeSrchCondConfig.class, CodeReferConfig::getCodeSrchCondConfigs) |
| | | .leftJoin(CodeShowFieldConfig.class, CodeShowFieldConfig::getReferConfigOid,CodeReferConfig::getOid) |
| | |
| | | if (!resUpdateReferConfig) { |
| | | return R.fail("åç
§é
置修æ¹å¤±è´¥ï¼"); |
| | | } |
| | | <<<<<<< Updated upstream |
| | | this.ICodeShowFieldConfigService.updateBatch(codeReferConfigVO.getCodeShowFieldConfigVOS()); |
| | | this.ICodeSrchCondConfigService.updateBatch(codeReferConfigVO.getCodeSrchCondConfigVOS()); |
| | | ======= |
| | | this.codeShowFieldConfigService.updateBatch(codeReferConfigVO.getCodeShowFieldConfigVOS()); |
| | | this.codeSrchCondConfigService.updateBatch(codeReferConfigVO.getCodeSrchCondConfigVOS()); |
| | | >>>>>>> Stashed changes |
| | | return R.data(codeReferConfigVO); |
| | | } |
| | | |
| | |
| | | if (!resDeleteReferConfig) { |
| | | return R.fail("åç
§é
ç½®å é¤å¤±è´¥ï¼"); |
| | | } |
| | | <<<<<<< Updated upstream |
| | | this.ICodeShowFieldConfigService.deleteByReferConfigOid(codeReferConfigDTO.getOid()); |
| | | this.ICodeSrchCondConfigService.deleteByReferConfigOid(codeReferConfigDTO.getOid()); |
| | | ======= |
| | | this.codeShowFieldConfigService.deleteByReferConfigOid(codeReferConfigDTO.getOid()); |
| | | this.codeSrchCondConfigService.deleteByReferConfigOid(codeReferConfigDTO.getOid()); |
| | | >>>>>>> Stashed changes |
| | | return R.status(resDeleteReferConfig); |
| | | } |
| | | |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.vci.ubcs.code.constant.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.code.dto.CodeBasicSecDTO; |
| | | import com.vci.ubcs.code.dto.CodeRuleDTO; |
| | |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.UBCSCondition; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | |
| | | @Resource |
| | | private RevisionModelUtil revisionModelUtil; |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param query |
| | | * @param conditionMap |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<CodeRuleVO> gridCodeRule(IPage<CodeRuleVO> page, CodeRuleVO codeRule) { |
| | | //对çå½å¨æçæä¸¾è¿è¡è½¬æ¢ |
| | | if(!StringUtils.isEmpty(codeRule.getLcStatusText())){ |
| | | codeRule.setLcStatus(CodeRuleLC.getValueByText(codeRule.getLcStatusText())); |
| | | } |
| | | List<CodeRule> codeRulePage = codeRuleMapper.selectCodeRulePage(page, codeRule); |
| | | public IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> conditionMap) { |
| | | IPage<CodeRule> codeRuleIPage = this.codeRuleMapper.selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapper(conditionMap, CodeRule.class)); |
| | | //do转voåæ¶setLcStatusTextçå½å¨æå¼ï¼å¹¶å
è£
æå页对象è¿å |
| | | return page.setRecords(CodeRuleWrapper.build().listVO(codeRulePage)); |
| | | return CodeRuleWrapper.build().pageVO(codeRuleIPage); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public Collection<CodeClassifyVO> listUseRangeInCodeClassify(String oid) { |
| | | List<CodeClassify> codeClassifies = codeClassifyServcie.selectByWrapper(Wrappers.<CodeClassify>query().eq("codeRuleOid", oid)); |
| | | List<CodeClassify> codeClassifies = codeClassifyServcie.selectByWrapper(Wrappers.<CodeClassify>query().lambda().eq(CodeClassify::getCodeRuleOid, oid)); |
| | | return CodeClassifyWrapper.build().listVO(codeClassifies); |
| | | } |
| | | |
| | |
| | | /** |
| | | * åç
§ä¸»æ°æ®ç¼ç è§åå表 |
| | | * |
| | | * @param codeRule æ¥è¯¢æ¡ä»¶ |
| | | * @param page å页åæåº |
| | | * @param bladeQueryObject æ¥è¯¢æ¡ä»¶ |
| | | * @return ä¸»æ°æ®ç¼ç è§åæ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public IPage<CodeRuleVO> refDataGridCodeRule(IPage<CodeRuleVO> page, CodeRuleVO codeRule) throws VciBaseException { |
| | | return gridCodeRule(page, codeRule); |
| | | public IPage<CodeRuleVO> refDataGridCodeRule(BladeQueryObject bladeQueryObject) throws VciBaseException { |
| | | return gridCodeRule(bladeQueryObject.getQuery(), bladeQueryObject.getConditionMap()); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | >>>>>>> Stashed changes |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.CodeShowFieldConfig; |
| | | import com.vci.ubcs.code.mapper.CodeShowFieldConfigMapper; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.code.service.ICodeShowFieldConfigService; |
| | | import com.vci.ubcs.code.vo.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.wrapper.CodeShowFieldConfigWraper; |
| | | import org.springframework.stereotype.Service; |
| | | ======= |
| | | import com.vci.ubcs.code.service.CodeShowFieldConfigService; |
| | | import com.vci.ubcs.code.vo.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.wrapper.CodeShowFieldConfigWraper; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | >>>>>>> Stashed changes |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | * @since 2023-05-19 17:58:56 |
| | | */ |
| | | @Service("CodeShowFieldConfigService") |
| | | <<<<<<< Updated upstream |
| | | public class CodeShowFieldConfigServiceImpl extends ServiceImpl<CodeShowFieldConfigMapper,CodeShowFieldConfig> implements ICodeShowFieldConfigService { |
| | | ======= |
| | | public class CodeShowFieldConfigServiceImpl extends ServiceImpl<CodeShowFieldConfigMapper,CodeShowFieldConfig> implements CodeShowFieldConfigService { |
| | | >>>>>>> Stashed changes |
| | | |
| | | @Resource |
| | | private CodeShowFieldConfigMapper codeShowFieldConfigMapper; |
| | | |
| | | /** |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | * éè¿IDæ¥è¯¢åæ¡æ°æ® |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return å®ä¾å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public CodeShowFieldConfig queryById(String oid) { |
| | | return this.codeShowFieldConfigMapper.queryById(oid); |
| | | } |
| | | |
| | | /** |
| | | >>>>>>> Stashed changes |
| | | * æ°å¢æ°æ® |
| | | * |
| | | * @param codeShowFieldConfig å®ä¾å¯¹è±¡ |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | <<<<<<< Updated upstream |
| | | public boolean insertBatch(List<CodeShowFieldConfigVO> codeShowFieldConfigVOS, String oid) { |
| | | List<CodeShowFieldConfig> codeShowFieldConfigs = CodeShowFieldConfigWraper.build().listDO(codeShowFieldConfigVOS,oid); |
| | | boolean b = this.saveOrUpdateBatch(codeShowFieldConfigs); |
| | | return b; |
| | | } |
| | | ======= |
| | | public boolean insertBatch(List<CodeShowFieldConfigVO> codeShowFieldConfigVOS) { |
| | | List<CodeShowFieldConfig> codeShowFieldConfigs = CodeShowFieldConfigWraper.build().listDO(codeShowFieldConfigVOS); |
| | | boolean b = this.saveOrUpdateBatch(codeShowFieldConfigs); |
| | | return b; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param codeShowFieldConfig å®ä¾å¯¹è±¡ |
| | | * @return å®ä¾å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean update(CodeShowFieldConfig codeShowFieldConfig) { |
| | | return this.codeShowFieldConfigMapper.update(codeShowFieldConfig)>0; |
| | | } |
| | | >>>>>>> Stashed changes |
| | | |
| | | @Override |
| | | public boolean updateBatch(List<CodeShowFieldConfigVO> codeShowFieldConfigVOS) { |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | <<<<<<< Updated upstream |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | ======= |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.code.entity.CodeShowFieldConfig; |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.code.entity.CodeSrchCondConfig; |
| | | import com.vci.ubcs.code.mapper.CodeShowFieldConfigMapper; |
| | | import com.vci.ubcs.code.mapper.CodeSrchCondConfigMapper; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.code.service.ICodeSrchCondConfigService; |
| | | import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; |
| | | import com.vci.ubcs.code.wrapper.CodeSrchCondConfigWraper; |
| | | ======= |
| | | import com.vci.ubcs.code.service.CodeSrchCondConfigService; |
| | | import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; |
| | | import com.vci.ubcs.code.wrapper.CodeSrchCondConfigWraper; |
| | | import org.apache.cxf.endpoint.ServerImpl; |
| | | >>>>>>> Stashed changes |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | <<<<<<< Updated upstream |
| | | import java.util.List; |
| | | ======= |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.function.Function; |
| | | >>>>>>> Stashed changes |
| | | |
| | | /** |
| | | * å¼ç¨ç 段ï¼åç
§é
ç½®çé¢ï¼æ¥è¯¢æ¡ä»¶é
置表(CodeSrchCondConfigService)表æå¡å®ç°ç±» |
| | |
| | | * @since 2023-05-19 17:58:56 |
| | | */ |
| | | @Service("CodeSrchCondConfigService") |
| | | <<<<<<< Updated upstream |
| | | public class CodeSrchCondConfigServiceImpl extends ServiceImpl<CodeSrchCondConfigMapper, CodeSrchCondConfig> implements ICodeSrchCondConfigService { |
| | | ======= |
| | | public class CodeSrchCondConfigServiceImpl extends ServiceImpl<CodeSrchCondConfigMapper, CodeSrchCondConfig> implements CodeSrchCondConfigService { |
| | | >>>>>>> Stashed changes |
| | | |
| | | @Resource |
| | | private CodeSrchCondConfigMapper codeSrchcondconfigMapper; |
| | |
| | | } |
| | | |
| | | @Override |
| | | <<<<<<< Updated upstream |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean insertBatch(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS, String oid) { |
| | | List<CodeSrchCondConfig> codeSrchCondConfigs = CodeSrchCondConfigWraper.build().listDO(codeSrchCondConfigVOS,oid); |
| | | return this.saveOrUpdateBatch(codeSrchCondConfigs); |
| | | } |
| | | ======= |
| | | public boolean insertBatch(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS) { |
| | | List<CodeSrchCondConfig> codeSrchCondConfigs = CodeSrchCondConfigWraper.build().listDO(codeSrchCondConfigVOS); |
| | | return this.saveOrUpdateBatch(codeSrchCondConfigs); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ® |
| | | * |
| | | * @param codeSrchcondconfig å®ä¾å¯¹è±¡ |
| | | * @return å®ä¾å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public boolean update(CodeSrchCondConfig codeSrchcondconfig) { |
| | | return this.codeSrchcondconfigMapper.update(codeSrchcondconfig)>0; |
| | | } |
| | | >>>>>>> Stashed changes |
| | | |
| | | @Override |
| | | public boolean updateBatch(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS) { |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | <<<<<<< Updated upstream |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.enumpack.CodeReferConfigTypeEnum; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | ======= |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.enumpack.CodeReferConfigTypeEnum; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | >>>>>>> Stashed changes |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | |
| | | @Override |
| | | public CodeReferConfigVO entityVO(CodeReferConfig codeReferConfig) { |
| | | CodeReferConfigVO codeReferConfigVO = Objects.requireNonNull(BeanUtil.copy(codeReferConfig, CodeReferConfigVO.class)); |
| | | <<<<<<< Updated upstream |
| | | if(StringUtils.isNotBlank(codeReferConfig.getType())){ |
| | | codeReferConfigVO.setTypeText(EnumCache.getValue(EnumEnum.CODE_REFER_CONFIG_TYPE,codeReferConfig.getType())); |
| | | } |
| | | ======= |
| | | codeReferConfigVO.setTypeText(CodeReferConfigTypeEnum.getTextByValue(codeReferConfig.getType())); |
| | | >>>>>>> Stashed changes |
| | | if(Func.isNotEmpty(codeReferConfig.getCodeSrchCondConfigs())){ |
| | | codeReferConfigVO.setCodeSrchCondConfigVOS(CodeSrchCondConfigWraper.build().listVO(codeReferConfig.getCodeSrchCondConfigs())); |
| | | } |
| | |
| | | return codeReferConfigVO; |
| | | } |
| | | |
| | | <<<<<<< Updated upstream |
| | | public CodeReferConfig entityDO(CodeReferConfigVO codeReferConfigVO) { |
| | | CodeReferConfig codeReferConfig = Objects.requireNonNull(BeanUtil.copy(codeReferConfigVO, CodeReferConfig.class)); |
| | | //codeReferConfig.setType(CodeReferConfigTypeEnum.getValueByText(codeReferConfigVO.getTypeText())); |
| | |
| | | return codeReferConfig; |
| | | } |
| | | |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | } |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | <<<<<<< Updated upstream |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.code.entity.CodeShowFieldConfig; |
| | | import com.vci.ubcs.code.entity.CodeSrchCondConfig; |
| | | import com.vci.ubcs.code.enumpack.CodeReferConfigFieldTypeEnum; |
| | |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.vo.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | |
| | | @Override |
| | | public CodeShowFieldConfigVO entityVO(CodeShowFieldConfig codeShowFieldConfig) { |
| | | CodeShowFieldConfigVO codeShowFieldConfigVO = Objects.requireNonNull(BeanUtil.copy(codeShowFieldConfig, CodeShowFieldConfigVO.class)); |
| | | <<<<<<< Updated upstream |
| | | if(StringUtils.isNotBlank(codeShowFieldConfig.getFixedPosition())){ |
| | | codeShowFieldConfigVO.setFixedPositionText(EnumCache.getValue(EnumEnum.CODE_REFER_CONFIG_FIXED,codeShowFieldConfig.getFixedPosition())); |
| | | } |
| | |
| | | CodeShowFieldConfig codeShowFieldConfig = entityDO(codeShowFieldConfigVO); |
| | | codeShowFieldConfig.setReferConfigOid(oid); |
| | | return codeShowFieldConfig; |
| | | ======= |
| | | codeShowFieldConfigVO.setFieldTypeText(CodeReferConfigFieldTypeEnum.getTextByValue(codeShowFieldConfig.getField())); |
| | | codeShowFieldConfigVO.setFixedPositionText(CodeReferConfigFixedEnum.getTextByValue(codeShowFieldConfig.getFixedPosition())); |
| | | |
| | | return codeShowFieldConfigVO; |
| | | >>>>>>> Stashed changes |
| | | } |
| | | |
| | | public CodeShowFieldConfig entityDO(CodeShowFieldConfigVO codeShowFieldConfigVO) { |
| | | CodeShowFieldConfig codeShowFieldConfig = Objects.requireNonNull(BeanUtil.copy(codeShowFieldConfigVO, CodeShowFieldConfig.class)); |
| | | <<<<<<< Updated upstream |
| | | if(StringUtils.isNotBlank(codeShowFieldConfigVO.getFieldTypeText())){ |
| | | codeShowFieldConfig.setFieldType(CodeReferConfigFieldTypeEnum.getTextByValue(codeShowFieldConfigVO.getFieldTypeText())); |
| | | } |
| | |
| | | return (List)codeShowFieldConfigVOS.stream().map(item->entityDOsetReferConfigOid(item,oid)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | ======= |
| | | codeShowFieldConfig.setFieldType(CodeReferConfigFieldTypeEnum.getTextByValue(codeShowFieldConfigVO.getFieldTypeText())); |
| | | codeShowFieldConfig.setFixedPosition(CodeReferConfigFieldTypeEnum.getTextByValue(codeShowFieldConfigVO.getFixedPositionText())); |
| | | return codeShowFieldConfig; |
| | | } |
| | | |
| | | >>>>>>> Stashed changes |
| | | public List<CodeShowFieldConfig> listDO(List<CodeShowFieldConfigVO> codeShowFieldConfigVOS) { |
| | | return (List)codeShowFieldConfigVOS.stream().map(this::entityDO).collect(Collectors.toList()); |
| | | } |
| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | <<<<<<< Updated upstream |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.entity.CodeShowFieldConfig; |
| | | import com.vci.ubcs.code.entity.CodeSrchCondConfig; |
| | |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | | import com.vci.ubcs.code.vo.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; |
| | | <<<<<<< Updated upstream |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | |
| | | @Override |
| | | public CodeSrchCondConfigVO entityVO(CodeSrchCondConfig codeSrchCondConfig) { |
| | | CodeSrchCondConfigVO codeSrchCondConfigVO = Objects.requireNonNull(BeanUtil.copy(codeSrchCondConfig, CodeSrchCondConfigVO.class)); |
| | | <<<<<<< Updated upstream |
| | | if(StringUtils.isNotBlank(codeSrchCondConfigVO.getFilterType())){ |
| | | codeSrchCondConfigVO.setFilterTypeText(EnumCache.getValue(EnumEnum.CODE_REFER_CONFIG_FILTER_TYPE,codeSrchCondConfig.getFilterType())); |
| | | } |
| | |
| | | codeSrchCondConfig.setFilterType(CodeReferConfigFieldTypeEnum.getTextByValue(codeSrchCondConfigVO.getFilterTypeText())); |
| | | } |
| | | codeSrchCondConfig.setReferConfigOid(codeSrchCondConfigVO.getOid()); |
| | | ======= |
| | | codeSrchCondConfigVO.setFilterTypeText(CodeReferConfigFilterTypeEnum.getTextByValue(codeSrchCondConfig.getFilterType())); |
| | | return codeSrchCondConfigVO; |
| | | } |
| | | |
| | | public CodeSrchCondConfig entityDO(CodeSrchCondConfigVO codeSrchCondConfigVO) { |
| | | CodeSrchCondConfig codeSrchCondConfig = Objects.requireNonNull(BeanUtil.copy(codeSrchCondConfigVO, CodeSrchCondConfig.class)); |
| | | codeSrchCondConfig.setFilterType(CodeReferConfigFieldTypeEnum.getTextByValue(codeSrchCondConfigVO.getFilterTypeText())); |
| | | >>>>>>> Stashed changes |
| | | return codeSrchCondConfig; |
| | | } |
| | | |
| | |
| | | return (List)codeSrchCondConfigVOS.stream().map(this::entityDO).collect(Collectors.toList()); |
| | | } |
| | | |
| | | <<<<<<< Updated upstream |
| | | public List<CodeSrchCondConfig> listDO(List<CodeSrchCondConfigVO> codeSrchCondConfigVOS,String oid) { |
| | | return (List)codeSrchCondConfigVOS.stream().map(item->entityDOsetReferConfigOid(item,oid)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | ======= |
| | | >>>>>>> Stashed changes |
| | | } |
| | |
| | | configuration: |
| | | map-underscore-to-camel-case: false |
| | | |
| | | |
| | | ######åºç¨åºæ¬é
ç½® |
| | | #app: |
| | | # name: web |
| | |
| | | # system_attrmap: {RLM: D:\RLM.xml,PDM: D:\pdm.xml,DMS: D:\DMS.xml} |
| | | # #MPMæä¸¾å¼å±æ§æ å° |
| | | # mpmEnumMap: {partType: [{enumValue: 1,enumText: 产å},{enumValue: 2,enumText: 产å},{'enumValue': 3,enumText: æ åä»¶},{'enumValue': 7,enumText: ææ}]} |
| | | |
| | | |
| | |
| | | <!--æ¥è¯¢æå®è¡æ°æ®--> |
| | | <select id="selectJoinPage" resultMap="CodeReferconfigMap"> |
| | | SELECT |
| | | PCR.* |
| | | PCR.* |
| | | FROM PL_CODE_REFERCONFIG PCR |
| | | <where> |
| | | <if test="codeReferConfig.tenantId != null and codeReferConfig.tenantId != ''"> |
| | | PCR.TENANTID = #{codeReferConfig.tenantId} |
| | | </if> |
| | | <<<<<<< Updated upstream |
| | | <if test="codeReferConfig.isOpenGlobal != null and codeReferConfig.isOpenGlobal != ''"> |
| | | OR PCR.ISOPENGLOBAL = #{codeReferConfig.isOpenGlobal} |
| | | </if> |
| | | <if test="codeReferConfig.name != null and codeReferConfig.name != ''"> |
| | | and NAME like CONCAT(CONCAT('%', #{codeReferConfig.name}), '%') |
| | | </if> |
| | | ======= |
| | | <if test="codeReferConfig.name != null and codeReferConfig.name != ''"> |
| | | and NAME like CONCAT(CONCAT('%', #{codeReferConfig.name}), '%') |
| | | </if> |
| | | >>>>>>> Stashed changes |
| | | <if test="codeReferConfig.id != null and codeReferConfig.id != ''"> |
| | | and ID like CONCAT(CONCAT('%', #{codeReferConfig.id}), '%') |
| | | </if> |
| | |
| | | |
| | | <select id="selectShowFieldByReferConfigOid" resultType="com.vci.ubcs.code.entity.CodeShowFieldConfig"> |
| | | SELECT temp.* FROM ( |
| | | SELECT |
| | | PCS.REFERCONFIGOID, |
| | | PCS.FIELD, |
| | | PCS.TITLE, |
| | | PCS.FIELDTYPE, |
| | | PCS.SORT, |
| | | PCS.ATTRSORTFIELD, |
| | | PCS.WIDTH, |
| | | PCS.FIXEDPOSITION, |
| | | <<<<<<< Updated upstream |
| | | PCS.TEMPLET, |
| | | PCS.ISQUERY |
| | | ======= |
| | | PCS.TEMPLET |
| | | >>>>>>> Stashed changes |
| | | FROM PL_CODE_REFERCONFIG PCR |
| | | LEFT JOIN PL_CODE_SHOWFIELDCONFIG PCS ON PCS.REFERCONFIGOID = PCR.OID) |
| | | temp WHERE temp.REFERCONFIGOID = #{oid} |
| | | SELECT |
| | | PCS.REFERCONFIGOID, |
| | | PCS.FIELD, |
| | | PCS.TITLE, |
| | | PCS.FIELDTYPE, |
| | | PCS.SORT, |
| | | PCS.ATTRSORTFIELD, |
| | | PCS.WIDTH, |
| | | PCS.FIXEDPOSITION, |
| | | PCS.TEMPLET, |
| | | PCS.ISQUERY |
| | | FROM PL_CODE_REFERCONFIG PCR |
| | | LEFT JOIN PL_CODE_SHOWFIELDCONFIG PCS ON PCS.REFERCONFIGOID = PCR.OID) |
| | | temp WHERE temp.REFERCONFIGOID = #{oid} |
| | | </select> |
| | | |
| | | <select id="selectSrchCondByReferConfigOid" resultType="com.vci.ubcs.code.entity.CodeSrchCondConfig"> |
| | | SELECT temp.* |
| | | FROM |
| | | FROM |
| | | (SELECT |
| | | PCSR.FILTERFIELD, |
| | | PCSR.FILTERTYPE, |
| | | PCSR.FILTERVALUE, |
| | | PCSR.REFERCONFIGOID |
| | | FROM PL_CODE_REFERCONFIG PCR |
| | | LEFT JOIN PL_CODE_SRCHCONDCONFIG PCSR ON PCSR.REFERCONFIGOID = PCR.OID) |
| | | temp WHERE temp.REFERCONFIGOID = #{oid} |
| | | PCSR.FILTERFIELD, |
| | | PCSR.FILTERTYPE, |
| | | PCSR.FILTERVALUE, |
| | | PCSR.REFERCONFIGOID |
| | | FROM PL_CODE_REFERCONFIG PCR |
| | | LEFT JOIN PL_CODE_SRCHCONDCONFIG PCSR ON PCSR.REFERCONFIGOID = PCR.OID) |
| | | temp WHERE temp.REFERCONFIGOID = #{oid} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | import com.vci.ubcs.omd.wrapper.AttributeWrapper; |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.web.constant.OmdRegExpConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | |
| | | import com.vci.ubcs.omd.wrapper.BtmTypeWrapper; |
| | | import com.vci.ubcs.omd.wrapper.RevisionRuleWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.util.Map2MPJLambdaUtil; |
| | | import com.vci.ubcs.starter.util.MybatisParameterUtil; |
| | | import com.vci.ubcs.starter.util.UBCSCondition; |
| | | import com.vci.ubcs.starter.web.constant.RegExpConstant; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | |
| | | //æ£æ¥ä¸å¡ç±»å |
| | | Collection<Collection<String>> oidCollections = VciBaseUtil.switchCollectionForOracleIn(oidCollection); |
| | | for(Collection<String> oids : oidCollections) { |
| | | MPJLambdaWrapper<BtmType> join = Map2MPJLambdaUtil.getMPJLambdaWrapper(new BtmType()) |
| | | MPJLambdaWrapper<BtmType> join = UBCSCondition.getMPJLambdaWrapper(new BtmType()) |
| | | .join("join", RevisionRule.class, RevisionRule::getId, BtmType::getRevisionRuleId) |
| | | .in(RevisionRule::getOid, oids); |
| | | Long count = btmTypeMapper.selectCount(join); |
| | |
| | | public List<BtmTypeVO> listRevisionRuleUsedInfo(String pkRevisionRule) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(pkRevisionRule,"çæ¬è§å对象ç主é®"); |
| | | List<BtmType> result = btmTypeMapper.selectList( |
| | | Map2MPJLambdaUtil.getMPJLambdaWrapper(new BtmType()) |
| | | UBCSCondition.getMPJLambdaWrapper(new BtmType()) |
| | | .join("join", RevisionRule.class, RevisionRule::getId, BtmType::getRevisionRuleId) |
| | | .eq(RevisionRule::getOid, pkRevisionRule)); |
| | | return BtmTypeWrapper.build().listEntityVO(result); |