Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
已修改210个文件
已删除2个文件
已添加68个文件
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹å¯ç ', |
| | | label: '', |
| | | prop: 'password', |
| | | column: [{ |
| | | label: 'åå¯ç ', |
| | |
| | | ...params, |
| | | page, |
| | | limit, |
| | | }, |
| | | paramsSerializer: function(params) { |
| | | return qs.stringify(params, { encode: false }); |
| | | } |
| | | }) |
| | | } |
| | |
| | | page, |
| | | limit, |
| | | ...params, |
| | | } |
| | | }, |
| | | }) |
| | | } |
| | | |
| | |
| | | data: params |
| | | }) |
| | | } |
| | | // éæç³»ç»ä¿¡æ¯ç®¡çæ°å¢ |
| | | // éæç³»ç»ä¿¡æ¯ç®¡çä¿®æ¹ |
| | | export const sysInfoEdit = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/editSave', |
| | |
| | | data: params |
| | | }) |
| | | } |
| | | // éæç³»ç»ä¿¡æ¯ç®¡çæ°å¢ |
| | | // éæç³»ç»ä¿¡æ¯ç®¡çå é¤ |
| | | export const sysInfoDel = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/deleteDataById', |
| | |
| | | }) |
| | | } |
| | | |
| | | export const remove = (ids) => { |
| | | export const remove = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-omd/attribute/remove', |
| | | method: 'post', |
| | | params: { |
| | | ids, |
| | | oid, |
| | | } |
| | | }) |
| | | } |
| | |
| | | pageSize |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export const getApplyRange = (id) => { |
| | | return request({ |
| | | url: '/api/ubcs-omd/status/get-apply-range', |
| | | method: 'get', |
| | | params: { |
| | | id |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/router/axios"; |
| | | |
| | | export const getList = (params,page, limit, url) => { |
| | | return request({ |
| | | url: url, |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | limit, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getLazyList = (params,url) => { |
| | | return request({ |
| | | url: url, |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | | export const getTableDefinedUrl = (params,url) => { |
| | | return request({ |
| | | url: url, |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // æ¨¡æ¿æµç¨å表 |
| | | export const getFlowpathList = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/processTS/tlist', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | // æ¨¡æ¿æµç¨è·åé项 |
| | | export const getStartList = () => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/work/start-list', |
| | | method: 'get', |
| | | params: { mode: '1', current: 1, size: 100 } |
| | | }) |
| | | } |
| | | // æ¨¡æ¿æµç¨æ°å¢ |
| | | export const flowpathSave = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/processTS/tsou', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | // æ¨¡æ¿æµç¨å é¤ |
| | | export const flowpathDelete = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/processTS/dt', |
| | | method: 'delete', |
| | | params: params |
| | | }) |
| | | } |
| | | // 模æ¿é¶æ®µå表 |
| | | export const stagelist = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/processTS/sslist', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | // 屿§å表 |
| | | export const attributeList = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/codeTempPhaseController/gridUnUsedAttribute', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | // 屿§å表左侧 |
| | | export const attributeListRight = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/processTS/ssslist', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | // 模æ¿é¶æ®µå表 |
| | | export const attributeSave = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/processTS/sasou', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // 人å设置åå§å |
| | | export const personnelInit = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/taskUser/list', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | // 人å设置æ¶è |
| | | export const personnelCollect = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/taskUser/su', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | // 人åè®¾ç½®åæ¶æ¶è |
| | | export const cancelCollect = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/taskUser/du', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | // 人å设置ä¿å |
| | | export const personnelSave = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-flow/vciflow/start', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | // 人å设置ä¿å |
| | | export const personnelDict = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-user/allPage', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | // ä¿åæ¥å£ |
| | | export const batchAddSave = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassifyTempAttrController/batchAddSave', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | //忥å°å
¶ä»æ¨¡æ¿ |
| | | export const copyto = (data) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/codeClassifyTempAttrController/copyto', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | | //ç¼ç ç³è¯·é¢è§ |
| | | export const getFormDefineByTemplate = (params) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/mdmEngineController/getFormDefineByTemplateOid', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | maxlength: formItem.maxlength, |
| | | filterable: true, |
| | | referConfig:formItem.type=='refer'?{ |
| | | title:formItem.text, |
| | | title:formItem.text , |
| | | showField:formItem.showField || formItem.field, |
| | | field: formItem.field, |
| | | placeholder: formItem.inputTip, |
| | |
| | | <basic-container> |
| | | <avue-tabs :option="Taboption" @change="handleChange"></avue-tabs> |
| | | <span v-if="type.prop==='tab1'"> |
| | | <attrCrud :ProData="ProData" :crudOid="crudOid" :crudArray="crudArray" :Formlist="Formlist"></attrCrud> |
| | | <attrCrud :ProData="ProData" :crudOid="crudOid" :crudArray="crudArray" :Formlist="Formlist" :codeClassifyOid="codeClassifyOid"></attrCrud> |
| | | </span> |
| | | <span v-else-if="type.prop==='tab2'">æ¨¡æ¿æµç¨</span> |
| | | <span v-else-if="type.prop==='tab3'">模æ¿é¶æ®µ</span> |
| | | <span v-else-if="type.prop==='tab2'"> |
| | | <FlowPath code="8b5e2017-990f-454a-9c39-4c4eeeb57553"></FlowPath> |
| | | |
| | | </span> |
| | | <span v-else-if="type.prop==='tab3'"> |
| | | <!-- <stage :visible.sync="visibleStage" code="8b5e2017-990f-454a-9c39-4c4eeeb57553"></stage>--> |
| | | </span> |
| | | </basic-container> |
| | | |
| | | </template> |
| | |
| | | <script> |
| | | export default { |
| | | name: "TemplatePro.vue", |
| | | props: ['ProData','crudOid','crudArray','Formlist'], |
| | | props: ['ProData','crudOid','crudArray','Formlist','codeClassifyOid'], |
| | | data: function () { |
| | | return { |
| | | type: {}, |
| | |
| | | <template> |
| | | <avue-crud :data="ProData" :option="option" @sort-change="sortChange" @row-update="addUpdate" |
| | | @cell-click="handleRowClick" @select="selectHandle"> |
| | | @cell-click="handleRowClick" @select="selectHandle" @row-del="CrudRowDel"> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="attrEditVisible == false" size="small" type="primary" @click="busineHandle">ï¼ æ·»å {{msg}}</el-button> |
| | | <el-dialog :visible.sync="addVisible" append-to-body title="ä»ä¸å¡ç±»åä¸éæ©å±æ§"> |
| | | <avue-crud :data="businessData" :option="businessOption"> |
| | | <el-button v-if="attrEditVisible == false && attrFlagChiledren==false" size="small" type="primary" @click="busineHandle">ï¼ æ·»å {{msg}}</el-button> |
| | | <el-dialog :visible.sync="addVisible" append-to-body title="ä»ä¸å¡ç±»åä¸éæ©å±æ§" > |
| | | <avue-crud :data="businessData" :option="businessOption" @select="businessSelect"> |
| | | <template slot="menuLeft"> |
| | | <div style="display: flex;"> |
| | | <el-select> |
| | |
| | | </template> |
| | | </avue-crud> |
| | | <div style="display: flex;justify-content: flex-end;margin-top: 15px"> |
| | | <el-button size="small" type="primary">ä¿å</el-button> |
| | | <el-button size="small" type="primary" @click="busineAddHandle">ä¿å</el-button> |
| | | <el-button size="small" type="primary">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <!-- å
¨å±ç¼è¾--> |
| | | <template slot="menuLeft"> |
| | | <el-button v-if="attrEditVisible == false" size="small" @click="attrEditVisible=true">å
¨å±ç¼è¾</el-button> |
| | | <!-- <el-button @click.native="attrEditVisible=false" size="small">éåºå
¨å±ç¼è¾</el-button>--> |
| | | <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false" size="small" @click="fullscreenHandle">å
¨å±ç¼è¾</el-button> |
| | | <!-- <el-button v-if="attrFlagChiledren !=false" size="small" plain type="success" @click="escEdit">éåºå
¨å±ç¼è¾</el-button>--> |
| | | <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true"> |
| | | <attrCrud></attrCrud> |
| | | <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag"></attrCrud> |
| | | </el-dialog> |
| | | </template> |
| | | <!-- ç»åè§å--> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" @click="isShowformulaEdit=true">ç»åè§å</el-button> |
| | | <formula-editor :visible="isShowformulaEdit" :systemVariableTableData="systemVariableTableData" :thisSceneTableData="thisSceneTableData"></formula-editor> |
| | | <formula-editor :visible.sync="isShowformulaEdit" :systemVariableTableData="systemVariableTableData" :thisSceneTableData="thisSceneTableData"></formula-editor> |
| | | |
| | | </template> |
| | | <!-- éªè¯è§å--> |
| | |
| | | </template> |
| | | <!-- 屿§åç»--> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-menu" size="small" @click="attrVisible=true">屿§åç»</el-button> |
| | | <el-button icon="el-icon-menu" size="small" @click="attrVisibleHandle">屿§åç»</el-button> |
| | | |
| | | <el-dialog :visible.sync="attrVisible" append-to-body style="width: 800px; left:30vw;top: 10vh ;" |
| | | title="è¾å
¥åç»çåç§°"> |
| | | <avue-form :option="attrOption"></avue-form> |
| | | <el-form ref="form" label-width="70px"> |
| | | <el-form-item label="屿§åç»"> |
| | | <el-input v-model="attrModel"></el-input> |
| | | </el-form-item> |
| | | <div style="display: flex;justify-content: flex-end"> |
| | | <el-button type="primary" @click="attrHandle" size="small">æäº¤</el-button> |
| | | <el-button size="small" @click="attrRemove">æ¸
空</el-button> |
| | | </div> |
| | | </el-form> |
| | | </el-dialog> |
| | | </template> |
| | | <!-- å类注å
¥--> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-magic-stick" size="small" @click="injectVisible=true">å类注å
¥</el-button> |
| | | <el-button icon="el-icon-magic-stick" size="small" @click="injectBtn">å类注å
¥</el-button> |
| | | <el-dialog :visible.sync="injectVisible" append-to-body class="mydialog" |
| | | style="width: 1400px; left:14vw ;top: 10vh;" title="å类注å
¥"> |
| | | <div class="injectBox"> |
| | |
| | | <br/>4ï¼å±çº§å¿
é¡»æ¯å¤§äº0çæ´æ°å¼ |
| | | </div> |
| | | <div style="padding-top: 15px;padding-left: 35px"> |
| | | <avue-form :option="injectOption" @reset-change="injectHandleReset"> |
| | | <template slot="menuForm"> |
| | | <el-button icon="el-icon-user" @click="injectRemove">åæ¶</el-button> |
| | | </template> |
| | | </avue-form> |
| | | <el-form ref="injectForm" label-width="80px"> |
| | | <el-form-item label="注å
¥ç±»å"> |
| | | <el-radio-group v-model="injectOption.type"> |
| | | <el-radio label="åç±»åç§°"></el-radio> |
| | | <el-radio label="å类代å·"></el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å±çº§è®¾ç½®"> |
| | | <el-radio-group v-model="injectOption.set"> |
| | | <el-radio label="æå°å±"></el-radio> |
| | | <el-radio label="æå®å±"></el-radio> |
| | | <el-input-number v-model="injectOption.injectNum" controls-position="right" :min="0" :max="10" v-if="this.injectOption.set == 'æå®å±'"></el-input-number> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="å¯ä¿®æ¹"> |
| | | <el-radio-group v-model="injectOption.change"> |
| | | <el-radio label="æ¯"></el-radio> |
| | | <el-radio label="å¦"></el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | <div style="display: flex;justify-content: flex-end"> |
| | | <el-button size="small" type="primary" @click="injectAddHandle">ç¡®å®</el-button> |
| | | <el-button size="small" @click="injectHandleReset">æ¸
é¤å
容</el-button> |
| | | <el-button size="small" @click="injectRemove">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <!-- æä¸¾æ³¨å
¥--> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" @click="enumVisible=true">æä¸¾æ³¨å
¥</el-button> |
| | | <el-button size="small" @click="enmuVisHandle">æä¸¾æ³¨å
¥</el-button> |
| | | <el-dialog :visible.sync="enumVisible" append-to-body title="æä¸¾æ³¨å
¥"> |
| | | <!-- 渲æè¡¨æ ¼åæé® --> |
| | | <!-- 渲æè¡¨æ ¼åæé® --> |
| | | <div> |
| | | <el-button icon="el-icon-plus" type="primary" @click="addRow">æ°å¢</el-button> |
| | | <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick" @cell-dblclick="dbclick"> |
| | | <el-table :data="tableData" style="width: 100%" @cell-click="handleCellClick" @selection-change="handleSelectionChange"> |
| | | <!-- 渲æè¡¨æ ¼ååä¼ å --> |
| | | <el-table-column label="åºå·" type="index"></el-table-column> |
| | | <el-table-column label="é项å¼" prop="name"> |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | </el-table-column> |
| | | <el-table-column label="é项å¼" prop="key"> |
| | | <template slot-scope="{ row }"> |
| | | <!-- ç¼è¾åå±ç¤ºé»è¾ --> |
| | | <el-input v-if="editingRow === row && editShow == 'name'" v-model="row.name" @blur="saveRow"></el-input> |
| | | <span v-else>{{ row.name }}</span> |
| | | <el-input v-if="editingRow === row && editShow == 'key'" v-model="row.key" @blur="saveRow"></el-input> |
| | | <span v-else>{{ row.key }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é项䏿æ ç¾" prop="age"> |
| | | <el-table-column label="é项䏿æ ç¾" prop="value"> |
| | | <template slot-scope="{ row }"> |
| | | <!-- ç¼è¾åå±ç¤ºé»è¾ --> |
| | | <el-input v-if="editingRow === row && editShow == 'age'" v-model="row.age" @blur="saveRow"></el-input> |
| | | <span v-else>{{ row.age }}</span> |
| | | <el-input v-if="editingRow === row && editShow == 'value'" v-model="row.value" @blur="saveRow"></el-input> |
| | | <span v-else>{{ row.value }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="120"> |
| | |
| | | </el-table> |
| | | <template> |
| | | <div style="display: flex;justify-content: right;margin-top: 15px"> |
| | | <el-button type="primary" size="small">ä¿å</el-button> |
| | | <el-button type="primary" size="small" @click="enumAddHandle">ä¿å</el-button> |
| | | <el-button size="small" @click="enumVisible=false">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | </avue-crud> |
| | | <div style="display: flex ;padding-top: 18px;justify-content: right"> |
| | | <el-button size="small" type="primary">ç¡®å®</el-button> |
| | | <el-button size="small" type="primary" @click="CascadeAddHandle">ç¡®å®</el-button> |
| | | <el-button size="small" style="margin-left: 10px" @click="casRemove">æ¸
é¤å
容</el-button> |
| | | <el-button size="small" style="margin-left: 10px" @click="CascadeVisible=false">åæ¶</el-button> |
| | | </div> |
| | |
| | | </template> |
| | | <!-- å é¤--> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small">å é¤</el-button> |
| | | <el-button size="small" @click="CrudRemove">å é¤</el-button> |
| | | </template> |
| | | <!-- éç½®--> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small">éç½®</el-button> |
| | | <el-button size="small" @click="reset">éç½®</el-button> |
| | | </template> |
| | | <!-- 忥å°å
¶ä»æ¨¡æ¿--> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" style="margin-top: 10px">忥å°å
¶ä»æ¨¡æ¿</el-button> |
| | | <el-button size="small" style="margin-top: 10px" @click="syncHandle">忥å°å
¶ä»æ¨¡æ¿</el-button> |
| | | </template> |
| | | <!-- ç¼ç ç³è¯·é¢è§--> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" style="margin-top: 10px" @click="applicationHandle">ç¼ç ç³è¯·é¢è§</el-button> |
| | | <FormTemplateDialog |
| | | :visible.sync="addvisible" |
| | | :type="add" |
| | | :templateOid="this.crudOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | > |
| | | </FormTemplateDialog> |
| | | </template> |
| | | </avue-crud> |
| | | </template> |
| | | |
| | | <script> |
| | | import {AttrByBtm,gridCodeClassifyTemplateAttr} from '@/api/template/templateAttr' |
| | | import {AttrByBtm,gridCodeClassifyTemplateAttr,batchAddSave,copyto} from '@/api/template/templateAttr' |
| | | export default { |
| | | name: "attrCrud .vue", |
| | | props: ['ProData','crudOid','crudArray','Formlist'], |
| | | // props: ['ProData','crudOid','crudArray','Formlist','codeClassifyOid'], |
| | | props:{ |
| | | ProData:{ |
| | | type:Array, |
| | | }, |
| | | crudOid:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | crudArray:{ |
| | | type:Array, |
| | | }, |
| | | Formlist:{ |
| | | type:Array, |
| | | }, |
| | | codeClassifyOid:{ |
| | | type:String, |
| | | default:'' |
| | | }, |
| | | attrFlagChiledren:{ |
| | | type:Boolean, |
| | | default:false |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | attrFlag:false, |
| | | //ç¼ç ç³è¯·é¢è§option |
| | | applicationoption:{ |
| | | column:[] |
| | | }, |
| | | // ç¼ç ç³è¯·é¢è§data |
| | | applicationData:[], |
| | | //ä¸å¡ç±»ååéæ°ç» |
| | | busineSelectList:[], |
| | | //ä¸å¡ç±»åæ·»å æ°æ® |
| | | busineAddList:{}, |
| | | //è¡¨æ ¼åéæ°ç» |
| | | CrudSelect:[], |
| | | //è¡¨æ ¼oid |
| | |
| | | editShow: "", |
| | | //æä¸¾æ³¨å
¥ |
| | | enumVisible: false, |
| | | //æä¸¾æ³¨å
¥å¤éä¿åæ°ç» |
| | | enumRow:[], |
| | | // å类注å
¥å¼¹åºæ¡ |
| | | injectVisible: false, |
| | | // æ·»å å¼¹åºæ¡ |
| | |
| | | rulesVisible: false, |
| | | //屿§åç»å¼¹åºæ¡ |
| | | attrVisible: false, |
| | | //屿§åç»option |
| | | attrOption: { |
| | | column: [ |
| | | { |
| | | label: "屿§åç»", |
| | | span: 24, |
| | | prop: "attrIN" |
| | | } |
| | | ] |
| | | }, |
| | | //屿§åç»è¾å
¥æ¡ |
| | | attrModel:"", |
| | | //å½åå鿍¡æ¿å±æ§ |
| | | attrRow:{}, |
| | | //ç¼ç ç³è¯·é¢è§å¼¹åºæ¡ |
| | | addvisible:false, |
| | | //å类注å
¥option |
| | | injectOption: { |
| | | column: [ |
| | | { |
| | | label: "注å
¥ç±»å", |
| | | type: 'radio', |
| | | prop: "injection", |
| | | span: 24, |
| | | value: 0, |
| | | dicData: [ |
| | | { |
| | | label: 'åç±»åç§°', |
| | | value: 0 |
| | | }, { |
| | | label: 'å类代å·', |
| | | value: 1 |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: "å±çº§è®¾ç½®", |
| | | type: 'radio', |
| | | prop: "Level", |
| | | span: 24, |
| | | value: 0, |
| | | dicData: [ |
| | | { |
| | | label: 'æå°å±', |
| | | value: 0 |
| | | }, { |
| | | label: 'æå®å±', |
| | | value: 1 |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: "å¯ä¿®æ¹", |
| | | type: 'radio', |
| | | prop: "revise", |
| | | value: 0, |
| | | dicData: [ |
| | | { |
| | | label: 'æ¯', |
| | | value: 0 |
| | | }, { |
| | | label: 'å¦', |
| | | value: 1 |
| | | }, |
| | | ] |
| | | } |
| | | ] |
| | | type:"åç±»åç§°", |
| | | set:"æå°å±", |
| | | change:"æ¯", |
| | | //å类注å
¥è®¡æ°å¨ |
| | | injectNum:0, |
| | | }, |
| | | // 屿§éªè¯è¾å
¥æ¡ |
| | | RulesForm: { |
| | |
| | | border: true, |
| | | addBtn: false, |
| | | menu:false, |
| | | selection:true, |
| | | height:500, |
| | | column: [ |
| | | { |
| | | label: "屿§è±æåç§°", |
| | |
| | | }, |
| | | //模æ¿å±æ§ |
| | | data: [ |
| | | { |
| | | id: "æµè¯ä¸", |
| | | name: "æµè¯name1", |
| | | attributegroup: "æµè¯ä¸", |
| | | attributeDataTypeText: "æµè¯ä¸", |
| | | |
| | | }, |
| | | { |
| | | id: "æµè¯äº", |
| | | name: "æµè¯name2", |
| | | attributegroup: "æµè¯äº", |
| | | attributeDataTypeText: "æµè¯äº" |
| | | }, |
| | | { |
| | | id: "æµè¯ä¸", |
| | | name: "æµè¯name3", |
| | | attributegroup: "æµè¯ä¸", |
| | | attributeDataTypeText: "æµè¯ä¸", |
| | | keyattrflag: false |
| | | } |
| | | ], |
| | | // å½åè¡ |
| | | rowList: [], |
| | |
| | | }, |
| | | { |
| | | label: "屿§åç»", |
| | | prop: "attributegroup", |
| | | prop: "attributeGroup", |
| | | cell: false, |
| | | sortable: true, |
| | | width: 125, |
| | |
| | | }, |
| | | { |
| | | label: "å
³é®å±æ§", |
| | | prop: "keyattrflag", |
| | | prop: "keyAttrFlag", |
| | | cell: false, |
| | | type: "switch", |
| | | }, |
| | | { |
| | | label: "æ¥è¯¢å±æ§", |
| | | prop: "queryattrflag", |
| | | prop: "queryAttrFlag", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "é«çº§æ¥è¯¢å±æ§", |
| | | prop: "seniorqueryattrflag", |
| | | prop: "seniorQueryAttrFlag", |
| | | width: 95, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "ç¸ä¼¼æ¥è¯¢å±æ§", |
| | | prop: "samerepeatattrflag", |
| | | prop: "sameRepeatAttrFlag", |
| | | width: 95, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "å¿
è¾", |
| | | prop: "requireflag", |
| | | prop: "requireFlag", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "è¡¨åæ¾ç¤º", |
| | | prop: "formdisplayflag", |
| | | prop: "formDisplayFlag", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "å表æ¾ç¤º", |
| | | prop: "tabledisplayflag", |
| | | prop: "tableDisplayFlag", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "åªè¯»", |
| | | prop: "readonlyflag", |
| | | prop: "readonlyFlag", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "å表æåº", |
| | | prop: "sortattrflag", |
| | | prop: "sortAttrFlag", |
| | | cell: false, |
| | | }, |
| | | |
| | | { |
| | | label: "å¤è¡ææ¬", |
| | | prop: "textareaflag", |
| | | prop: "textareaFlag", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "é»è®¤å¼", |
| | | prop: "defaultvalue", |
| | | prop: "defaultValue", |
| | | sortable: true, |
| | | cell: false, |
| | | width: 95, |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | | prop: "prefixvalue", |
| | | prop: "prefixValue", |
| | | sortable: true, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | | prop: "suffixvalue", |
| | | prop: "suffixValue", |
| | | sortable: true, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "ç»åè§å", |
| | | prop: "componentrule", |
| | | prop: "componentRule", |
| | | sortable: true, |
| | | cell: false, |
| | | width: 105, |
| | | }, |
| | | { |
| | | label: "éªè¯è§å", |
| | | prop: "verifyrule", |
| | | prop: "verifyRule", |
| | | sortable: true, |
| | | cell: false, |
| | | width: 105, |
| | | }, |
| | | { |
| | | label: "æ¶é´æ ¼å¼", |
| | | prop: "codedateformat", |
| | | prop: "codeDateFormat", |
| | | sortable: true, |
| | | width: 105, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "å类注å
¥", |
| | | prop: "classifyinvokelevel", |
| | | prop: "classifyInvokeLevel", |
| | | cell: false, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | label: "è¡¨åæ¾ç¤ºæ ·å¼", |
| | | prop: "formdisplaystyle", |
| | | prop: "formDisplayStyle", |
| | | width: 105, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "è¡¨æ ¼æ¾ç¤ºæ ·å¼", |
| | | prop: "tabledisplaystyle", |
| | | prop: "tableDisplayStyle", |
| | | width: 105, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "表åè¶
龿¥", |
| | | prop: "formhref", |
| | | prop: "formHref", |
| | | width: 95, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "è¡¨æ ¼è¶
龿¥", |
| | | prop: "tablehref", |
| | | prop: "tableHref", |
| | | width: 95, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "è¡¨æ ¼æ¾ç¤ºjs", |
| | | prop: "tabledisplayjs", |
| | | prop: "tableDisplayJs", |
| | | width: 95, |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "é¿åº¦", |
| | | prop: "controllength", |
| | | prop: "controlLength", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "å°æ°ç²¾åº¦", |
| | | prop: "precisionlength", |
| | | prop: "precisionLength", |
| | | cell: false, |
| | | }, |
| | | { |
| | | label: "åå¼èå´", |
| | | prop: "valuearea", |
| | | prop: "valueArea", |
| | | sortable: true, |
| | | cell: false, |
| | | width: 105, |
| | | }, |
| | | ], |
| | | List:[] |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log(this.attrEditVisible) |
| | | console.log(this.ProData) |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | //屿§åç»æé® |
| | | attrVisibleHandle(){ |
| | | if(this.CrudSelect.length>1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | }else if(this.CrudSelect<1){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | }else if(this.CrudSelect.length === 1){ |
| | | this.attrVisible=true; |
| | | } |
| | | }, |
| | | //屿§åç»æäº¤ |
| | | attrHandle(){ |
| | | this.$set(this.attrRow,'attributeGroup',this.attrModel) |
| | | this.attrModel="" |
| | | this.attrVisible=false |
| | | }, |
| | | //屿§åç»æ¸
空 |
| | | attrRemove(){ |
| | | this.attrModel="" |
| | | }, |
| | | //è¡¨æ ¼æ°æ® |
| | | CrudRend(){ |
| | | if(this.crudOid != ''){ |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.crudOid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | } |
| | | }, |
| | | //ä¸å¡ç±»åä¿å |
| | | busineAddHandle(){ |
| | | if(this.busineSelectList.length>1){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡ä¸å¡ç±»åæ°æ®') |
| | | }else { |
| | | this.$set(this.busineAddList,'classifytemplateoid',this.crudOid) |
| | | this.$set(this.busineAddList,'oid','') |
| | | this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList))) |
| | | console.log(this.busineAddList) |
| | | this.addVisible=false; |
| | | console.log('prodata',this.ProData) |
| | | } |
| | | }, |
| | | //ä¸å¡ç±»ååé |
| | | businessSelect(selection,row){ |
| | | this.busineSelectList=selection |
| | | this.busineAddList=row |
| | | }, |
| | | // ä»ä¸å¡ç±»åä¸éæ©æ°æ® |
| | | busineHandle(){ |
| | | if(this.crudArray.length<1){ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | // 级è屿§ |
| | | // 级è屿§æé® |
| | | CascadeHandle(){ |
| | | if(this.CrudSelect.length >0){ |
| | | if(this.CrudSelect.length >1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | }else if(this.CrudSelect.length<1){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | }else if(this.CrudSelect.length === 1){ |
| | | this.CascadeVisible=true; |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid, |
| | | 'conditionMap[oid_notequal]':this.CrudOid |
| | | }).then(res=>{ |
| | | this.CascadeData=res.data.data |
| | | this.CascadeData=res.data.data; |
| | | }) |
| | | }else { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | } |
| | | }, |
| | | //è¡¨æ ¼åé |
| | | selectHandle(selection,row){ |
| | | this.CrudOid=row.oid; |
| | | this.CrudSelect=selection |
| | | this.CrudSelect=selection; |
| | | this.attrRow=row; |
| | | console.log(selection.length) |
| | | }, |
| | | //ä¿å |
| | | addsHandler(){ |
| | | |
| | | batchAddSave(this.ProData).then(res=>{ |
| | | console.log(res) |
| | | this.$message.success('ä¿åæå') |
| | | }) |
| | | }, |
| | | // screenEdit(){ |
| | | // debugger |
| | | |
| | | // this.attrEditVisible=true; |
| | | // }, |
| | | // outEdit(){ |
| | | // debugger |
| | | // this.attrEditVisible=false; |
| | | // }, |
| | | //级èä¿å |
| | | CascadeAddHandle(){ |
| | | let CascadeString=""; |
| | | CascadeString=this.attrRow.id+(this.attrRow.name); |
| | | this.$set(this.attrRow,'parentCode',CascadeString) |
| | | this.CascadeVisible=false; |
| | | }, |
| | | //级è屿§æ¸
é¤ |
| | | casRemove() { |
| | | this.selectRow = "" |
| | |
| | | CascaderowClick(row) { |
| | | this.selectRow = row.$index |
| | | console.log(row) |
| | | this.$message.success('éæ©åºå·' + row.$index) |
| | | }, |
| | | // æä¸¾æ³¨å
¥æ·»å ä¸è¡ç©ºæ°æ® |
| | | addRow() { |
| | | this.tableData.push({ |
| | | name: "", |
| | | age: "" |
| | | }); |
| | | this.tableData.push(JSON.parse(JSON.stringify({ |
| | | key: "", |
| | | value: "" |
| | | }))); |
| | | }, |
| | | // æä¸¾æ³¨å
¥çå¬åå
æ ¼ç¹å»äºä»¶å¹¶å卿£å¨ç¼è¾çè¡ |
| | | handleCellClick(row, column) { |
| | |
| | | enumDeleteRow(row) { |
| | | console.log(row) |
| | | this.tableData.splice(row, 1) |
| | | }, |
| | | //æä¸¾æ³¨å
¥æé® |
| | | enmuVisHandle(){ |
| | | if(this.CrudSelect.length>1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | }else if(this.CrudSelect<1){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ¨¡æ¿å±æ§') |
| | | }else if(this.CrudSelect.length === 1){ |
| | | this.enumVisible=true; |
| | | } |
| | | }, |
| | | //æä¸¾æ³¨å
¥å¤éæ¡ |
| | | handleSelectionChange(row){ |
| | | console.log(row) |
| | | this.enumRow=JSON.parse(JSON.stringify(row)); |
| | | }, |
| | | //æä¸¾æ³¨å
¥ä¿å |
| | | enumAddHandle(){ |
| | | console.log(this.enumRow) |
| | | if(this.enumRow.length<1){ |
| | | this.$message.warning('请è³å°éæ©ä¸æ¡æ°æ®') |
| | | }else { |
| | | this.$set(this.attrRow,'enumString',this.enumRow); |
| | | this.enumVisible=false; |
| | | } |
| | | }, |
| | | // å°æ£å¨ç¼è¾çè¡çç¶æå为 null ï¼å³éåºç¼è¾ç¶æ |
| | | saveRow() { |
| | |
| | | rulesExamine() { |
| | | |
| | | }, |
| | | //ç¹å»å类注å
¥æé® |
| | | injectBtn(){ |
| | | if(this.CrudSelect.length>1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ¨¡æ¿æ°æ®') |
| | | }else if(this.CrudSelect.length<1){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ¨¡æ¿æ°æ®') |
| | | }else if(this.CrudSelect.length === 1){ |
| | | this.injectVisible=true |
| | | } |
| | | }, |
| | | //å类注å
¥ä¿å |
| | | injectAddHandle(){ |
| | | this.$set(this.attrRow,'classifyInvokeLevel',this.injectOption); |
| | | this.injectVisible=false |
| | | }, |
| | | //å类注å
¥æ¸
空 |
| | | injectHandleReset() { |
| | | console.log("æ¸
空") |
| | | this.injectOption.type=""; |
| | | this.injectOption.set=""; |
| | | this.injectOption.change=""; |
| | | this.injectOption.injectNum=""; |
| | | }, |
| | | // å类注å
¥åæ¶ |
| | | injectRemove() { |
| | |
| | | //å ä¸doneå
³éä¿ååä¸å¯ç¼è¾çç¶æ |
| | | done() |
| | | }, |
| | | //è¡¨æ ¼æä½æ å é¤ |
| | | CrudRowDel(row){ |
| | | this.ProData.splice(row.$index,1) |
| | | }, |
| | | //è¡¨æ ¼å é¤ |
| | | CrudRemove(){ |
| | | this.ProData.splice(this.attrRow.$index,1) |
| | | }, |
| | | //è¡¨æ ¼éç½® |
| | | reset(){ |
| | | this.CrudRend() |
| | | }, |
| | | //忥å°å
¶ä»æ¨¡æ¿ |
| | | syncHandle(){ |
| | | if(this.CrudSelect.length>1){ |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ¨¡æ¿å±æ§æ°æ®') |
| | | }else if(this.CrudSelect.length<1){ |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ¨¡æ¿å±æ§æ°æ®') |
| | | }else if(this.CrudSelect.length === 1){ |
| | | copyto({oid:this.attrRow.oid}).then(res=>{ |
| | | this.$message.success('忥æå') |
| | | }) |
| | | } |
| | | }, |
| | | //ç¼ç ç³è¯·é¢è§ |
| | | applicationHandle(){ |
| | | this.addvisible=true; |
| | | console.log('temp',this.crudOid) |
| | | console.log('code',this.codeClassifyOid) |
| | | // getFormDefineByTemplate({templateOid:this.crudOid,codeClassifyOid:this.codeClassifyOid}).then(res=>{ |
| | | // console.log(res) |
| | | // }) |
| | | }, |
| | | //å
¨å±ç¼è¾ |
| | | fullscreenHandle(){ |
| | | if(this.crudArray.length<1){ |
| | | this.$message.warning('è¯·éæ©ä¸ä¸ªæ¨¡æ¿') |
| | | }else { |
| | | this.attrEditVisible=true; |
| | | this.attrFlag=true; |
| | | console.log(this.attrEditVisible) |
| | | } |
| | | |
| | | }, |
| | | //éåºå
¨å±ç¼è¾ |
| | | escEdit(){ |
| | | this.attrFlagChiledren=false; |
| | | this.attrEditVisible=false; |
| | | console.log(this.attrEditVisible) |
| | | }, |
| | | // æåº |
| | | sortChange(val) { |
| | | console.log(val) |
| | |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | | <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudArray="this.crudArray" :Formlist="this.Formlist"></templatePro> |
| | | <templatePro :ProData="this.ProData" :crudOid="this.crudOid" :crudArray="this.crudArray" :Formlist="this.Formlist" :codeClassifyOid="this.codeClassifyOid"></templatePro> |
| | | </span> |
| | | </basic-container> |
| | | </el-main> |
| | |
| | | methods: { |
| | | //è¡åéäºä»¶ |
| | | selectHandle(selection,row){ |
| | | this.crudOid=row.oid |
| | | this.crudArray=selection |
| | | this.crudOid=row.oid; |
| | | this.crudArray=selection; |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | console.log(this.ProData) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | }, |
| | | //åç±»æ æ°æ®å¤ç |
| | | getAttr() { |
| | |
| | | //å®ä¹ä¸ä¸ªæ¨¡æ¿å±æ§idï¼æ°æ®æ¯æ¨¡æ¿ç®¡çè¡¨æ ¼éé¢çoid |
| | | this.nodeClickList = data |
| | | console.log(data.oid) |
| | | this.ProData=[] |
| | | try { |
| | | await TreeObjcet(data.oid).then(res => { |
| | | this.FlagObj = res.data.data |
| | |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | }) |
| | | if(this.Formlist.length >0){ |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.Formlist[0].oid}).then(res => { |
| | | this.ProData = res.data.data; |
| | | console.log(this.ProData) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | | }) |
| | | } |
| | | }).catch(res => { |
| | | console.log(res) |
| | | }) |
| | |
| | | <div class="grid-content"> |
| | | <el-select placeholder="è¯·éæ©" v-model="searchFormArrays[index].condition"> |
| | | <el-option |
| | | v-for="condition in item.fieldType=='text' ? searchConditions:switchSearchConditions" |
| | | v-for="condition in item.fieldType==='text' || item.fieldType==='combox' ? |
| | | item.fieldType==='text' ? searchConditions:switchSearchConditions:dateConditions" |
| | | :key="condition.value" |
| | | :label="condition.label" |
| | | :value="condition.value"> |
| | |
| | | :value="option.itemValue"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-switch v-else-if="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> |
| | | <el-date-picker v-else-if="item.fieldType==='date'" |
| | | v-model="searchFormArrays[index].fieldValue" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | |
| | | // å¯¹è¯æ¡æ¾ç¤ºæ§å¶ |
| | | isShowDialog: this.visible, |
| | | initOptions: [], |
| | | // åæ®µæ¯è¾å
¥æ¡ç±»åçæ¡ä»¶æ°ç» |
| | | // åæ®µç±»åæ¯è¾å
¥æ¡ç±»åçæ¡ä»¶æ°ç» |
| | | searchConditions: [ |
| | | { |
| | | value: "_equal", |
| | |
| | | },{ |
| | | value: "_notlike", |
| | | label: "ä¸å
å«", |
| | | },{ |
| | | value: "_ge", //大äºï¼é»è®¤ä¸ºå¤§äºçäº |
| | | label: "大äº", |
| | | },{ |
| | | value: "_le", //å°äºï¼é»è®¤ä¸ºå°äºçäº |
| | | label: "å°äº", |
| | | }, |
| | | } |
| | | ], |
| | | // åæ®µæ¯åéæä¸ææ¡ç±»åçæ¡ä»¶æ°ç» |
| | | // åæ®µç±»åæ¯åéæä¸ææ¡ç±»åçæ¡ä»¶æ°ç» |
| | | switchSearchConditions: [ |
| | | { |
| | | value: "_equal", |
| | |
| | | value: "_notequal", |
| | | label: "ä¸çäº", |
| | | } |
| | | ], |
| | | // åæ®µç±»åæ¯æ¥æ |
| | | dateConditions: [ |
| | | { |
| | | value: "_equal", |
| | | label: "çäº", |
| | | },{ |
| | | value: "_notequal", |
| | | label: "ä¸çäº", |
| | | },{ |
| | | value: "_ge", //大äºï¼é»è®¤ä¸ºå¤§äºçäº |
| | | label: "大äº", |
| | | },{ |
| | | value: "_le", //å°äºï¼é»è®¤ä¸ºå°äºçäº |
| | | label: "å°äº", |
| | | }, |
| | | ], |
| | | searchFormArrays: [], |
| | | fieldValue: '', |
| | |
| | | const searchConditions = this.searchFormArrays; |
| | | for(let index = 0; index < searchConditions.length; index++) { |
| | | //console.log(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' == 'undefined'); |
| | | if(searchConditions[index].fieldValue.trim() != '' || searchConditions[index].fieldValue+''==='false') { |
| | | if(searchConditions[index].fieldValue+'' != '' || searchConditions[index].fieldValue+''==='false') { |
| | | // åå¨ç¸åçæ¥è¯¢æ¡ä»¶ |
| | | if(condtionParam['conditionMap['+searchConditions[index].queryField+']']+'' != 'undefined' ) { |
| | | this.$message.warning("åå¨é夿¥è¯¢æ¡ä»¶ï¼è¯·ä»ç»æ ¸å¯¹!"); |
| | |
| | | condtionParam['conditionMap['+searchConditions[index].queryField+searchConditions[index].condition+']'] = searchConditions[index].fieldValue; |
| | | } |
| | | } |
| | | // æ¥è¯¢æ¡ä»¶æ²¡æåºç°éå¤å±æ§ï¼å¹¶ä¸è¿æ»¤æäºç©ºå¼ï¼ä¼ éç»ç¶ç»ä»¶ |
| | | // æ¥è¯¢æ¡ä»¶æ²¡æåºç°éå¤å±æ§ï¼å¹¶ä¸è¿æ»¤æäºç©ºå¼ï¼å°±ä¼ éç»ç¶ç»ä»¶ |
| | | // console.log(condtionParam); |
| | | this.$emit('echoContion',condtionParam) |
| | | this.isShowDialog = false; |
| | |
| | | line-height: 40px; |
| | | height: 40px; |
| | | } |
| | | .grid-content > .el-date-editor.el-input, .el-date-editor.el-input__inner{ |
| | | width: 100%; |
| | | } |
| | | |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <vciWebReferTree v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :referConfig="referConfig"></vciWebReferTree> |
| | | <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :referConfig="referConfig"></vciWebReferTable> |
| | | <vciWebReferDefalut v-else @setValue="setValue" :value="value" :text="text" :referConfig="referConfig"></vciWebReferDefalut> |
| | | <vciWebReferTree v-if="refertype=='tree'" @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferTree> |
| | | <vciWebReferTable v-else-if="refertype=='table'" @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferTable> |
| | | <vciWebReferDefalut v-else @setValue="setValue" :value="value" :text="text" :title="title" :referConfig="referConfig"></vciWebReferDefalut> |
| | | </template> |
| | | |
| | | <script> |
| | | import vciWebReferTree from "./vciWebReferTree.vue"; |
| | | import vciWebReferTable from "./vciWebReferTable.vue"; |
| | | import vciWebReferDefalut from "./vciWebReferTable.vue"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import vciWebReferDefalut from "./vciWebReferDefalut.vue"; |
| | | export default { |
| | | name: "vciWebRefer", |
| | | props: ["referConfig","value","text"], |
| | |
| | | data() { |
| | | return { |
| | | refertype: this.referConfig.options.type, |
| | | isMuti: ("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | emitData:{} |
| | | emitData:{}, |
| | | title:'' |
| | | }; |
| | | }, |
| | | created() { |
| | | created() {}, |
| | | mounted() { |
| | | var title = this.referConfig.title || ''; |
| | | title = title.replace(":", ""); |
| | | if (title) { |
| | | title = validatenull(this.referConfig.title) ? ('为ã' + title + 'ãéåå¼') : this.referConfig.title; |
| | | } else { |
| | | title = validatenull(this.referConfig.title) ? ('为ã' + this.referConfig.showField + 'ãéåå¼') : this.referConfig.title; |
| | | } |
| | | this.referConfig.title = title; |
| | | this.referConfig.isMuti = this.isMuti; |
| | | title = title ? ('为ã' + title + 'ãéåå¼') : ('为ã' + this.referConfig.showField + 'ãéåå¼'); |
| | | |
| | | this.title=title; |
| | | }, |
| | | methods: { |
| | | setValue(value) { |
| | |
| | | this.$emit("setReferValue", newV); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="title" |
| | | v-dialogDrag append-to-body="true" |
| | | :visible.sync="visible" |
| | | top="0" |
| | | class="avue-dialog avue-dialog--top" |
| | | :width="referConfig.options.width|| '80%'"> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | v-model="value" |
| | | ref="referDefalutCrud" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <el-button @click="visible=false">å æ¶</el-button> |
| | | <el-button @click="setValue" type="primary">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :placeholder="title" @click="visible=true"></avue-input> |
| | | <!--<avue-input-table ref="referTable" :props="props" :column="column" :on-load="onLoad" v-model="value" :placeholder="title" ></avue-input-table> |
| | | --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { validatenull } from "@/util/validate"; |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | export default { |
| | | name: "vciWebReferDefalut", |
| | | props:["referConfig","value","text","title"], |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | options: this.referConfig.options, |
| | | isMuti: ("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | props: { |
| | | value: this.referConfig.valueField || this.referConfig.options.valueField || 'oid', |
| | | label: this.referConfig.textField || this.referConfig.options.textField || "name" |
| | | }, |
| | | url: this.referConfig.options.url || '/api/ubcs-code/mdmEngineController/defaultReferDataGrid', |
| | | tableDefinedUrl:'',//å¹³å°è¡¨æ ¼å°å |
| | | copyParam: ['referBo', 'textField', 'valueField', 'displayTable', 'whereSql', 'queryScheme'], |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data?this.referConfig.options.data.length :0 |
| | | }, |
| | | data:this.referConfig.options.data || [], |
| | | selectionList: [], |
| | | option: { |
| | | addBtn: false, |
| | | height: this.referConfig.options.height ? this.referConfig.options.height : 475, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | menu:false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchLabelWidth: 90, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | column: [] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getParams(); |
| | | console.log('referConfig:') |
| | | console.log(this.referConfig) |
| | | }, |
| | | mounted() { |
| | | if(this.referConfig.options.page){ |
| | | this.page.pageSize=this.referConfig.options.page.limit || this.referConfig.options.page.pageSize; |
| | | this.page.currentPage=this.referConfig.options.page.page || this.referConfig.options.page.currentPage; |
| | | } |
| | | }, |
| | | computed:{ |
| | | valueInfo:function (){ |
| | | return this.text ? ("已设置çå¼ä¸º[" + this.text + "]"): 'æªè®¾ç½®å¼' |
| | | } |
| | | }, |
| | | methods: { |
| | | getParams:function () { |
| | | var queryParams = {}; |
| | | if (this.options.extraParams) { |
| | | queryParams = this.options.extraParams; |
| | | } |
| | | if (this.options.useFormKey && this.options.formValues) { |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams['conditionMap["' + (this.options.paramForFormKey ? this.options.paramForFormKey : this.options.useFormKey) + '"]'] = this.options.formValues[this.options.useFormKey]; |
| | | } |
| | | if (this.options.where) { |
| | | for (var key in this.options.where) { |
| | | queryParams['conditionMap["' + key + '"]'] = this.options.where[key];//æ° |
| | | } |
| | | } |
| | | for (var i = 0; i < this.copyParam.length; i++) { |
| | | queryParams[this.copyParam[i]] = this.options[this.copyParam[i]]; |
| | | } |
| | | queryParams["isMuti"] = this.isMuti; |
| | | queryParams.muti = this.isMuti; |
| | | if (!queryParams['referBo']) { |
| | | queryParams['referBo'] = this.options['referBo'] || this.options['referType']; |
| | | } |
| | | queryParams['referType'] = queryParams['referBo'] |
| | | if (this.options.remoteSort && this.options.initSort) { |
| | | queryParams['order'] = this.options.initSort.type;//æ¹æ³ |
| | | queryParams['sort'] = this.options.initSort.field;//åæ®µ |
| | | } |
| | | if (this.options.conditionParams) { |
| | | //è¯´ææ¯æ©å±å±æ§ |
| | | for (var key in this.options.conditionParams) { |
| | | queryParams['conditionMap["' + key + '"]'] = this.options.conditionParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | if (this.options.sourceDataParams) { |
| | | //è¯´ææ¯æ©å±å±æ§ |
| | | for (var key in this.options.sourceDataParams) { |
| | | if (key && key.constructor === Object) return; |
| | | queryParams['sourceData["' + key + '"]'] = this.options.sourceDataParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | if (this.options.replaceParams) { |
| | | //è¯´ææ¯æ©å±å±æ§ |
| | | for (var key in this.options.replaceParams) { |
| | | if (key && key.constructor === Object) return; |
| | | queryParams['replaceMap["' + key + '"]'] = this.options.replaceParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | var paramsData = {}; |
| | | //为äºå¤çåå¼å·ååå¼å·ç |
| | | if (queryParams) { |
| | | for (var key in queryParams) { |
| | | paramsData[key.replace(/"/g, "'")] = queryParams[key]; |
| | | } |
| | | } |
| | | |
| | | if (!this.options.tableConfig || !this.options.tableConfig.cols || this.options.tableConfig.cols.length == 0) { |
| | | this.option.column = [{ |
| | | prop: 'id', |
| | | label: 'è±æåç§°', |
| | | sort: true, |
| | | width: 150, |
| | | search: true |
| | | }, { |
| | | prop: 'name', |
| | | label: '䏿åç§°', |
| | | sort: true, |
| | | width: 150, |
| | | search: true |
| | | }, { |
| | | prop: 'description', |
| | | label: 'æè¿°', |
| | | width: 250 |
| | | }, { |
| | | prop: 'secretGradeText', |
| | | label: 'å¯çº§', |
| | | width: 60, |
| | | hidden: (!this.controllerSecret) |
| | | }]; |
| | | } else { |
| | | this.option.column = this.options.tableConfig.cols.map(item => { |
| | | if (item.field != 'LAY_TABLE_INDEX' && item.field != 'LAY_CHECKED') { |
| | | return { |
| | | ...item, |
| | | label: item.title, |
| | | prop: item.field, |
| | | search: true |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | if (!paramsData) { |
| | | paramsData = { |
| | | currentUserReferModelKey: this.options.currentUserReferModelKey, |
| | | currentUserReferMethodKey: this.options.currentUserReferMethodKey |
| | | }; |
| | | } else { |
| | | paramsData['currentUserReferModelKey'] = this.options.currentUserReferModelKey; |
| | | paramsData['currentUserReferMethodKey'] = this.options.currentUserReferMethodKey; |
| | | } |
| | | this.params = paramsData; |
| | | }, |
| | | setValue(){ |
| | | if(this.selectionList.length==0){ |
| | | this.$message.warning( '没æéæ©æ°æ®'); |
| | | return false; |
| | | }else if(this.selectionList.length>1 && !this.isMuti){ |
| | | this.$message.warning( 'æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®'); |
| | | return false; |
| | | } |
| | | |
| | | var value = []; |
| | | var text = []; |
| | | var isMutiValue = (this.props.value.indexOf(",")>-1); |
| | | var isMutiRaw = (this.props.label.indexOf(",")>-1); |
| | | var _that=this |
| | | this.selectionList.forEach((item,_index) =>{ |
| | | if(isMutiValue){ |
| | | var valueFieldArray = _that.props.value.split(","); |
| | | valueFieldArray.forEach((_indexField,_itemField)=>{ |
| | | value.push( item[_itemField] + (_that.referConfig.valueSep?_that.referConfig.valueSep:' ')); |
| | | }) |
| | | }else { |
| | | value.push(item[_that.props.value]); |
| | | } |
| | | if(isMutiRaw) { |
| | | var rawFieldArray = _that.props.label.split(","); |
| | | rawFieldArray.forEach((_indexField,_itemField)=>{ |
| | | text.push(item[_itemField] + (_that.referConfig.textSep?_that.referConfig.textSep:' ')) ; |
| | | }) |
| | | }else{ |
| | | text.push(item[_that.props.label]); |
| | | } |
| | | }) |
| | | |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList}); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | currentChange(currentPage){ |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize){ |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | selectionChange(list) { |
| | | if (!this.isMuti && list.length > 1) { |
| | | const nowVal = list.shift(); |
| | | this.$refs.referCrud.toggleRowSelection(nowVal, false); |
| | | } |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.referCrud.clearSelection(); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = this.params) { |
| | | if(this.url){ |
| | | this.loading = true; |
| | | getList(Object.assign(params, this.query),page.currentPage, page.pageSize, this.url).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .valueInfo{ |
| | | float: left; |
| | | border: 1px solid #E9E7E7; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | padding: 9px 15px; |
| | | line-height: 1; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <avue-input-table :props="props" :column="column" :on-load="onLoad" v-model="value" :placeholder="placeholder" ></avue-input-table> |
| | | <div> |
| | | <el-dialog :title="title" |
| | | v-dialogDrag append-to-body="true" |
| | | :visible.sync="visible" |
| | | top="0" |
| | | class="avue-dialog avue-dialog--top" |
| | | :width="referConfig.options.width|| '80%'"> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | v-model="value" |
| | | ref="referCrud" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="icon" slot-scope="scope"> |
| | | <i :class="scope.row.icon" style="font-size:24px"></i> |
| | | </template> |
| | | </avue-crud> |
| | | <div class="avue-dialog__footer"> |
| | | <div class="avue-dialog__footer--left valueInfo">{{ valueInfo }}</div> |
| | | <el-button @click="visible=false">å æ¶</el-button> |
| | | <el-button @click="setValue" type="primary">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <avue-input v-model="text" :placeholder="title" @click="visible=true"></avue-input> |
| | | <!--<avue-input-table ref="referTable" :props="props" :column="column" :on-load="onLoad" v-model="value" :placeholder="title" ></avue-input-table> |
| | | --> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { validatenull } from "@/util/validate"; |
| | | import {getList,getLazyList,getTableDefinedUrl} from "@/api/refer/table"; |
| | | export default { |
| | | name: "vciWebReferTable", |
| | | props:["referConfig","value"], |
| | | props:["referConfig","value","text","title"], |
| | | data() { |
| | | return { |
| | | placeholder:this.referConfig.placeholder || 'è¯·éæ©æ°æ®', |
| | | column:{ |
| | | children:{ |
| | | border: true, |
| | | column: [{ |
| | | label: 'å§å', |
| | | width: 120, |
| | | search:true, |
| | | prop: 'name' |
| | | }, { |
| | | label: 'æ§å«', |
| | | search:true, |
| | | prop: 'sex' |
| | | }], |
| | | }, |
| | | }, |
| | | visible: false, |
| | | options: this.referConfig.options, |
| | | isMuti: ("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | props: { |
| | | value: this.referConfig.valueField || this.referConfig.options.valueField || 'oid', |
| | | label: this.referConfig.textField || this.referConfig.options.textField || "name" |
| | | }, |
| | | url: this.referConfig.options.url || '/api/ubcs-code/mdmEngineController/defaultReferDataGrid', |
| | | tableDefinedUrl:'',//å¹³å°è¡¨æ ¼å°å |
| | | copyParam: ['referBo', 'textField', 'valueField', 'displayTable', 'whereSql', 'queryScheme'], |
| | | query: {}, |
| | | loading: false, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: this.referConfig.options.data?this.referConfig.options.data.length :0 |
| | | }, |
| | | data:this.referConfig.options.data || [], |
| | | selectionList: [], |
| | | option: { |
| | | addBtn: false, |
| | | height: this.referConfig.options.height ? this.referConfig.options.height : 475, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | menu:false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchLabelWidth: 90, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey:'oid', |
| | | rowParentKey:'parentSaleProduct', |
| | | column: [] |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getParams(); |
| | | console.log('referConfig:') |
| | | console.log(this.referConfig) |
| | | }, |
| | | mounted() { |
| | | if(this.referConfig.options.page){ |
| | | this.page.pageSize=this.referConfig.options.page.limit || this.referConfig.options.page.pageSize; |
| | | this.page.currentPage=this.referConfig.options.page.page || this.referConfig.options.page.currentPage; |
| | | } |
| | | }, |
| | | computed:{ |
| | | valueInfo:function (){ |
| | | return this.text ? ("已设置çå¼ä¸º[" + this.text + "]"): 'æªè®¾ç½®å¼' |
| | | } |
| | | }, |
| | | methods: { |
| | | onLoad({page, value, data}, callback) { |
| | | //馿¬¡å è½½å»æ¥è¯¢å¯¹åºçå¼ |
| | | if (value) { |
| | | this.$message.success('馿¬¡æ¥è¯¢' + value) |
| | | callback({ |
| | | id: '0', |
| | | name: 'å¼ ä¸', |
| | | sex: 'ç·' |
| | | }) |
| | | return |
| | | getParams:function (){ |
| | | var queryParams = {}; |
| | | if(this.options.extraParams){ |
| | | queryParams = this.options.extraParams; |
| | | } |
| | | if (data) { |
| | | this.$message.success('æç´¢æ¥è¯¢åæ°' + JSON.stringify(data)) |
| | | if(this.options.useFormKey && this.options.formValues){ |
| | | //使ç¨è¡¨åä¸çåæ®µæ¥è¿æ»¤ |
| | | queryParams['conditionMap["' + (this.options.paramForFormKey?this.options.paramForFormKey:this.options.useFormKey) + '"]'] = this.options.formValues[this.options.useFormKey]; |
| | | } |
| | | if (page) { |
| | | this.$message.success('å页忰' + JSON.stringify(page)) |
| | | if(this.options.where ) { |
| | | for (var key in this.options.where) { |
| | | queryParams['conditionMap["' + key + '"]'] = this.options.where[key];//æ° |
| | | } |
| | | } |
| | | //å页æ¥è¯¢ä¿¡æ¯ |
| | | callback({ |
| | | total: 2, |
| | | data: [{ |
| | | id: '0', |
| | | name: 'å¼ ä¸', |
| | | sex: 'ç·' |
| | | }, { |
| | | id: '1', |
| | | name: 'æå', |
| | | sex: '女' |
| | | }] |
| | | for(var i= 0 ; i < this.copyParam.length ; i ++){ |
| | | queryParams[this.copyParam[i]] = this.options[this.copyParam[i]]; |
| | | } |
| | | queryParams["isMuti"]=this.isMuti; |
| | | queryParams.muti =this.isMuti; |
| | | if(!queryParams['referBo']){ |
| | | queryParams['referBo'] = this.options['referBo'] || this.options['referType']; |
| | | } |
| | | queryParams['referType']= queryParams['referBo'] |
| | | if (this.options.remoteSort && this.options.initSort) { |
| | | queryParams['order'] = this.options.initSort.type;//æ¹æ³ |
| | | queryParams['sort'] = this.options.initSort.field;//åæ®µ |
| | | } |
| | | if (this.options.conditionParams) { |
| | | //è¯´ææ¯æ©å±å±æ§ |
| | | for (var key in this.options.conditionParams) { |
| | | queryParams['conditionMap["' + key + '"]'] = this.options.conditionParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | if (this.options.sourceDataParams) { |
| | | //è¯´ææ¯æ©å±å±æ§ |
| | | for (var key in this.options.sourceDataParams) { |
| | | if (key && key.constructor === Object) return; |
| | | queryParams['sourceData["' + key + '"]'] = this.options.sourceDataParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | if (this.options.replaceParams) { |
| | | //è¯´ææ¯æ©å±å±æ§ |
| | | for (var key in this.options.replaceParams) { |
| | | if (key && key.constructor === Object) return; |
| | | queryParams['replaceMap["' + key + '"]'] = this.options.replaceParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | var paramsData = {}; |
| | | //为äºå¤çåå¼å·ååå¼å·ç |
| | | if(queryParams){ |
| | | for (var key in queryParams){ |
| | | paramsData[key.replace(/"/g, "'")] = queryParams[key]; |
| | | } |
| | | } |
| | | |
| | | if(this.options.displayTable){ |
| | | //è¯´ææ¯ä½¿ç¨å¹³å°çè¡¨æ ¼ |
| | | getTableDefinedUrl({btmType:(this.options.referBo||this.options.referType),code:this.options.displayTable,isMuti:this.isMuti},this.tableDefinedUrl).then(result => { |
| | | if(result.success){ |
| | | var queryScheme = result.querySchema; |
| | | if(!validatenull(queryScheme) && validatenull(this.options.queryScheme)){ |
| | | this.options.queryScheme = queryScheme; |
| | | } |
| | | paramsData['queryScheme'] = this.options.queryScheme; |
| | | if(result.showIndex){ |
| | | this.option.index = true; |
| | | } |
| | | if(result.showCheckbox){ |
| | | this.option.selection = true |
| | | } |
| | | var referColumn = ""; |
| | | if(result.columns){ |
| | | this.option.column= result.columns.map(item => { |
| | | if(item.field.indexOf(".")>-1){ |
| | | referColumn += item.field + ","; |
| | | item.field = item.field.replace(".","_"); |
| | | } |
| | | if(!validatenull(item.enumCode)) { |
| | | //æ¯æä¸¾çå
容 |
| | | item.type = 'select'; |
| | | item.dicUrl = "/api/ubcs-omd/enum/dictionary?code=" + item.enumCode; |
| | | item.dicData = item.enumMap; |
| | | item.dataType = "String"; |
| | | item.search = true; |
| | | item.props = { |
| | | label: "itemName", |
| | | value: "itemValue" |
| | | }; |
| | | item.rules = [{ |
| | | required: true, |
| | | message: "请è¾å
¥" + item.field, |
| | | trigger: "blur" |
| | | }]; |
| | | /*item.formatter=function(d,thisItem){ |
| | | var vciWebComboxStore = layui.vciWebComboxStore; |
| | | return vciWebComboxStore.getComboxText(thisItem.enumCode,d[thisItem.field]); |
| | | };*/ |
| | | } |
| | | return { |
| | | ...item, |
| | | label: item.title, |
| | | prop: item.field, |
| | | search: true |
| | | } |
| | | }) |
| | | } |
| | | paramsData['referColumn'] = referColumn; |
| | | if(result.limit>0){ |
| | | this.page.pageSize = result.limit; |
| | | this.page.currentPage=1 |
| | | } |
| | | if(this.options.isTreeGrid){ |
| | | //è¡¨æ ¼æ å ä¸é
ç½® |
| | | } |
| | | this.params=paramsData; |
| | | }else{ |
| | | this.$message.error(result.msg); |
| | | } |
| | | |
| | | }); |
| | | }else{ |
| | | //è¯´ææ¯èªå®ä¹çè¡¨æ ¼ |
| | | var tableConfig = this.options.tableConfig; |
| | | if(!tableConfig){ |
| | | this.$message.error( '没æå®ä¹åç
§çè¡¨æ ¼é
ç½®'); |
| | | } |
| | | this.page.pageSize=tableConfig.page.limit || 10; |
| | | if(!paramsData){ |
| | | paramsData = { |
| | | currentUserReferModelKey:this.options.currentUserReferModelKey, |
| | | currentUserReferMethodKey:this.options.currentUserReferMethodKey |
| | | }; |
| | | }else{ |
| | | paramsData['currentUserReferModelKey'] = this.options.currentUserReferModelKey; |
| | | paramsData['currentUserReferMethodKey'] = this.options.currentUserReferMethodKey; |
| | | } |
| | | if(this.options.tableConfig && this.options.tableConfig.cols && this.options.tableConfig.cols.length>0) { |
| | | //说æä¼ éäºç |
| | | this.option.column= this.options.tableConfig.cols.map(item => { |
| | | if (item.field != 'LAY_TABLE_INDEX' && item.field != 'LAY_CHECKED') { |
| | | return { |
| | | ...item, |
| | | label: item.title, |
| | | prop: item.field, |
| | | formatter:item.template, |
| | | search: true |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | if(this.options.isTreeGrid){ |
| | | //è¡¨æ ¼æ å ä¸é
ç½® |
| | | } |
| | | } |
| | | this.params=paramsData; |
| | | }, |
| | | setValue(){ |
| | | if(this.selectionList.length==0){ |
| | | this.$message.warning( '没æéæ©æ°æ®'); |
| | | return false; |
| | | }else if(this.selectionList.length>1 && !this.isMuti){ |
| | | this.$message.warning( 'æ¯æ¬¡åªè½éæ©ä¸æ¡æ°æ®'); |
| | | return false; |
| | | } |
| | | |
| | | var value = []; |
| | | var text = []; |
| | | var isMutiValue = (this.props.value.indexOf(",")>-1); |
| | | var isMutiRaw = (this.props.label.indexOf(",")>-1); |
| | | var _that=this |
| | | this.selectionList.forEach((item,_index) =>{ |
| | | if(isMutiValue){ |
| | | var valueFieldArray = _that.props.value.split(","); |
| | | valueFieldArray.forEach((_indexField,_itemField)=>{ |
| | | value.push( item[_itemField] + (_that.referConfig.valueSep?_that.referConfig.valueSep:' ')); |
| | | }) |
| | | }else { |
| | | value.push(item[_that.props.value]); |
| | | } |
| | | if(isMutiRaw) { |
| | | var rawFieldArray = _that.props.label.split(","); |
| | | rawFieldArray.forEach((_indexField,_itemField)=>{ |
| | | text.push(item[_itemField] + (_that.referConfig.textSep?_that.referConfig.textSep:' ')) ; |
| | | }) |
| | | }else{ |
| | | text.push(item[_that.props.label]); |
| | | } |
| | | }) |
| | | |
| | | this.value=value.join(','); |
| | | this.text=text.join(',') |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.selectionList}); |
| | | this.visible=false; |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | currentChange(currentPage){ |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize){ |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | selectionChange(list) { |
| | | if (!this.isMuti && list.length > 1) { |
| | | const nowVal = list.shift(); |
| | | this.$refs.referCrud.toggleRowSelection(nowVal, false); |
| | | } |
| | | this.selectionList = list |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.referCrud.clearSelection(); |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = this.params) { |
| | | if(this.url){ |
| | | this.loading = true; |
| | | getList(Object.assign(params, this.query),page.currentPage, page.pageSize, this.url).then(res => { |
| | | debugger; |
| | | this.page.total = res.total; |
| | | this.data = res.data; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .valueInfo{ |
| | | float: left; |
| | | border: 1px solid #E9E7E7; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | padding: 9px 15px; |
| | | line-height: 1; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <avue-input-tree ref="referTree" :props="props" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :leaf-only="!referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="placeholder" :dic="treeData"></avue-input-tree> |
| | | <avue-input-tree ref="referTree" :props="props" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getTree,getLazyTree} from "@/api/refer/tree"; |
| | | import {validatenull} from "@/util/validate"; |
| | | |
| | | export default { |
| | | name: "vciWebReferTree", |
| | | props:["referConfig","value","text"], |
| | | props:["referConfig","value","text","title"], |
| | | data() { |
| | | return { |
| | | options: this.referConfig.options, |
| | | lazy: this.referConfig.options.loadType == 'node', |
| | | isMuti: this.referConfig.isMuti, |
| | | placeholder: this.referConfig.placeholder || 'è¯·éæ©å
容', |
| | | isMuti:("true" == this.referConfig.options.isMuti || this.referConfig.options.isMuti == true || this.referConfig.options.muti == true) ? true : false, |
| | | props: { |
| | | value: this.referConfig.valueField || this.referConfig.options.valueField || 'oid', |
| | | label: this.referConfig.textField || this.referConfig.options.textField || "name" |
| | | //value:"value", |
| | | //label:"title" |
| | | value: 'oid', |
| | | label: "name" |
| | | }, |
| | | treeUrl: this.referConfig.options.url || '/api/ubcs-code/codeClassify/treeCodeClassify', |
| | | config:{ |
| | | valueField: this.referConfig.valueField || this.referConfig.options.valueField || 'oid', |
| | | textField:this.referConfig.textField || this.referConfig.options.textField || "name", |
| | | textSep:this.referConfig.textSep || ' ' |
| | | }, |
| | | treeUrl: this.referConfig.options.url || '/api/ubcs-code/mdmEngineController/defaultReferTree', |
| | | treeData: [], |
| | | selectionList: [], |
| | | currentNode:{}, |
| | | params: {}, |
| | | loadType: {'all': 'all', 'node': 'node'}, |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed:{}, |
| | | methods: { |
| | | getParams:function (){ |
| | | var queryParams = {}; |
| | |
| | | } |
| | | } |
| | | queryParams['referBo'] = this.options['referBo'] || this.options['referType']; |
| | | queryParams['referType']= queryParams['referBo'] |
| | | queryParams['selectAllLevel'] = (this.options.loadType == this.loadType.all?true:false);//trueæ¶åå°ä¼æ¥é |
| | | if(queryParams.isMuti =="true"){ |
| | | queryParams.muti =true; |
| | | } |
| | | |
| | | queryParams.muti =this.isMuti; |
| | | if(queryParams.isQueryAllColumn =="true"){ |
| | | queryParams.isQueryAllColumn = true; |
| | | } |
| | |
| | | queryParams['replaceMap["' + key + '"]'] = this.options.replaceParams[key];//æ°çæ¹å¼ |
| | | } |
| | | } |
| | | queryParams['parentValue']='\\IN(SELECT oid from PL_CODE_CLASSIFY where id =\'hesuanfenlei\')' |
| | | this.params=queryParams; |
| | | |
| | | }, |
| | |
| | | })) |
| | | }); |
| | | }, |
| | | nodeClick(data){ |
| | | //ä¸è¦ç¨watchçå¬valueå¼ï¼ä¼æ¾ä¸å°text |
| | | this.value=data[this.props.value]; |
| | | this.text=data[this.props.label]; |
| | | this.currentNode=data; |
| | | this.$emit("setValue", {field:this.referConfig.field,showField:this.referConfig.showField,value:this.value,text:this.text,rawData:this.currentNode}); |
| | | nodeClick(data, node, nodeComp){ |
| | | if(!this.isMuti) { |
| | | this.setValue({checkedNodes:[data]}) |
| | | } |
| | | }, |
| | | checked(checkedNode, checkedData) { |
| | | this.setValue(checkedData) |
| | | }, |
| | | setValue:function (checkedData){ |
| | | var value = []; |
| | | var text = []; |
| | | const textSep =this.config.textSep; |
| | | for(var j =0;j<checkedData.checkedNodes.length;j++){ |
| | | const item=checkedData.checkedNodes[j]; |
| | | var v=this.config.valueField.indexOf("attribute.")>=0?item.attributes[this.config.valueField.replace("attribute.","")]:(item.attributes[this.config.valueField] || item[this.config.valueField]) |
| | | value.push(v); |
| | | var tempRaw = []; |
| | | var textFieldArray = this.config.textField.split(","); |
| | | for (var i = 0; i < textFieldArray.length; i++) {//æ¾ç¤ºçåæ®µå¯è½æå¤ä¸ª |
| | | if (!validatenull(textFieldArray[i])) { |
| | | var t=textFieldArray[i].indexOf("attribute.")>=0?item.attributes[textFieldArray[i].replace("attribute.","")]:(item.attributes[textFieldArray[i]] || item[textFieldArray[i]]) |
| | | tempRaw.push(t); |
| | | } |
| | | } |
| | | text.push(tempRaw.join(textSep)); |
| | | } |
| | | this.value = value.join(','); |
| | | this.text = text.join(',') |
| | | this.$emit("setValue", { |
| | | field: this.referConfig.field, |
| | | showField: this.referConfig.showField, |
| | | value: this.value, |
| | | text: this.text || '', |
| | | isTreeMuti:this.isMuti, |
| | | rawData: checkedData.checkedNodes |
| | | }); |
| | | } |
| | | }, |
| | | watch:{ |
| | | } |
| | | watch:{} |
| | | } |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="`æ§è¡${title}`" width="90%" append-to-body="true" :visible.sync="visible"> |
| | | <div class="dialogwarp"> |
| | | <div class="dialogwarp_tab"> |
| | | <el-card class="dialogwarp_tab_card"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="ä¸å¡æ°æ®ä¿¡æ¯" name="first"> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æµç¨è·è¸ª" name="second"> |
| | | <avue-crud :data="data" :option="option" ref="crud"> |
| | | </avue-crud> |
| | | <div style="padding: 10px 0; width: 100%; height: 100% "> |
| | | <el-image :src="url" flt="fill"></el-image> |
| | | </div> |
| | | |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | </div> |
| | | <div class="dialogwarp_card"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>å½åä»»å¡ï¼</span> |
| | | <span>{{ title }}</span> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>请å¨ä¸æ¹è¾å
¥æ¨çå®¡æ¹æè§ï¼</p> |
| | | <el-input type="textarea" :rows="4" placeholder="请è¾å
¥å
容" show-word-limit v-model="opinionVal"> |
| | | </el-input> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å®¡æ¹æè§éä»¶ï¼</p> |
| | | <el-upload drag action="https://jsonplaceholder.typicode.com/posts/" multiple style="width: 100%;"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å·²ä¸ä¼ å®¡æ¹æä»¶ï¼</p> |
| | | <el-card class="box-card"> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table-column prop="date" label="æä»¶å"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="ä¸ä¼ 人 "> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="æä½"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <el-button v-if="!isRefuse" type="primary" size="mini" @click="handelAgree">åæ</el-button> |
| | | <el-button v-if="!isAgree" type="primary" size="mini" @click="handelRefuse">ä¸åæ</el-button> |
| | | <el-button v-if="isAgree && !isRefuse" type="primary" size="mini" @click="handelRevert" |
| | | v-for="item in btnList" :key="item">{{ item }}</el-button> |
| | | <el-button v-if="isRefuse" type="primary" size="mini" @click="handelExecute">æ§è¡</el-button> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | name:'FlowBusiness', |
| | | props: { |
| | | // æ¯å¦æå¼ |
| | | visible: { |
| | | typeof: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | watch: { |
| | | visible(n) { |
| | | this.dialogVisible = n; |
| | | }, |
| | | dialogVisible(n) { |
| | | this.$emit('update:visible', n) |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: this.visible, |
| | | destroyClose: true, |
| | | activeName: 'first', |
| | | fits: ['fill', 'contain', 'cover', 'none', 'scale-down'], |
| | | url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', |
| | | title: 'ä¸å¡æµè¯-ç³è¯·-ç©å-å®¡æ ¸', |
| | | data: [ |
| | | { |
| | | name: 'å¼ ä¸', |
| | | sex: 'ç·' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | } |
| | | ], |
| | | btnList: ['è¿å1', 'è¿å1', 'è¿å1'], |
| | | isAgree: false, |
| | | isRefuse: false, |
| | | opinionVal: '', |
| | | option: { |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | index: true, |
| | | header: false, |
| | | stripe: true, |
| | | indexLabelClassName: 'åºå·', |
| | | column: [ |
| | | { label: 'ä»»å¡åç§°', prop: 'name', minWidth: 120 }, |
| | | { label: 'æ§è¡æä½', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å¼å§æ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å®¡æ¹æè§', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | { label: 'æ§è¡äºº', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å®ææ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å·²ä¸ä¼ å®¡æ¹æä»¶', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | closeDialog() { |
| | | this.destroyClose = true |
| | | this.outerVisible = false |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(event) |
| | | }, |
| | | handelAgree() { |
| | | this.isAgree = !this.isAgree |
| | | this.outerVisible = false |
| | | console.log(this.isAgree) |
| | | }, |
| | | handelRefuse() { |
| | | if (!this.opinionVal) { |
| | | this.$alert('å½å¤çæ¹å¼ä¸ºä¸åææ¶ï¼éè¦å¡«åå®¡æ¹æè§', 'æç¤ºä¿¡æ¯', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | }).then(() => { |
| | | |
| | | }); |
| | | } else { |
| | | this.isRefuse = true |
| | | this.isAgree = true |
| | | this.outerVisible = false |
| | | this.opinionVal = '' |
| | | } |
| | | }, |
| | | handelExecute() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | this.isRefuse = false |
| | | }, |
| | | handelRevert() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .dialogwarp { |
| | | display: -webkit-box; |
| | | display: -ms-flexbox; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 70vh; |
| | | |
| | | &_tab { |
| | | width: 79%; |
| | | |
| | | |
| | | &_card { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | &_card { |
| | | // margin-left: 20px; |
| | | width: 20%; |
| | | } |
| | | } |
| | | |
| | | ::v-deep(.el-upload) { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | ::v-deep(.el-upload-dragger) { |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | |
| | | ::v-deep(.el-upload-dragger .el-icon-upload) { |
| | | margin: 15px 0 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <avue-crud ref="crud" :table-loading="loading" :data="data" v-model="form" :option="option" :page.sync="page" |
| | | :search.sync="search" @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete" |
| | | @row-update="handleEdit" @refresh-change="handleRefresh" @size-change="handleSizePage" |
| | | @current-change="handleCurrentPage"> |
| | | </avue-crud> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFlowpathList, getStartList, flowpathSave, flowpathDelete } from '@/api/template/flowpath.js' |
| | | export default { |
| | | name: 'FlowPath', |
| | | props: { |
| | | code: { |
| | | typeof: String, |
| | | required: true, |
| | | default: "" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | }, |
| | | search: {}, |
| | | delIds: [], |
| | | data: [], |
| | | startData: [], |
| | | form: {}, |
| | | option: { |
| | | height: "auto", |
| | | border: true, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | index: true, |
| | | searchMenuSpan: 8, |
| | | searchBtn: false, |
| | | emptyBtn: false, |
| | | columnBtn: false, |
| | | defaultSort: { |
| | | prop: 'id,name,description,version', |
| | | order: 'descending' |
| | | }, |
| | | column: [ |
| | | { |
| | | label: '模æ¿key', |
| | | prop: 'modelKey', |
| | | width:120, |
| | | sortable: true, |
| | | type: 'tree', |
| | | dicData: [], |
| | | props: { |
| | | label: "key", |
| | | value: "key" |
| | | }, |
| | | rules: [{ |
| | | required: true, |
| | | message: '模æ¿keyä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }], |
| | | nodeClick: (data) => { |
| | | console.log(data) |
| | | // èç¹ç¹å»çæ¶åä¼è·åå°æ°æ® |
| | | this.form.modelName = data.name |
| | | } |
| | | }, { |
| | | label: '模æ¿åç§°', |
| | | prop: 'modelName', |
| | | sortable: true, |
| | | width:220, |
| | | addDisabled: true, |
| | | editDisabled: true, |
| | | }, |
| | | { |
| | | label: '模æ¿ç¨é', |
| | | prop: 'buttonTypeKey', |
| | | type: 'tree', |
| | | width:120, |
| | | dicUrl: '/api/ubcs-flow/processTS/tt', |
| | | dicMethod: 'post', |
| | | props: { |
| | | value: "codee", |
| | | label: "namee", |
| | | }, |
| | | }, |
| | | { |
| | | label: 'æ¨¡æ¿æè¿°', |
| | | prop: 'description', |
| | | type:'textarea' |
| | | }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getStart() |
| | | }, |
| | | methods: { |
| | | async getStart() { |
| | | const response = await getStartList() |
| | | if (response.status === 200) { |
| | | console.log(response.data.data.records) |
| | | const data = response.data.data.records |
| | | let newData = data.map(item => { |
| | | const { key, name, version } = item |
| | | return { key, name, version } |
| | | }) |
| | | this.option.column[0].dicData = newData |
| | | |
| | | } |
| | | }, |
| | | // è·åå表 |
| | | async getDataList() { |
| | | this.loading = false |
| | | console.log(this.search) |
| | | const { pageSize, currentPage } = this.page |
| | | let param = { size: pageSize, current: currentPage } |
| | | const response = await getFlowpathList({ ...param, ...{ templateId: this.code } }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.loading = false |
| | | const data = response.data.data |
| | | this.data = data.records |
| | | this.page.total = data.total |
| | | } else this.loading = false |
| | | }, |
| | | // æ°å¢ |
| | | async handleSave(row, done, loading) { |
| | | console.log(row) |
| | | const response = await flowpathSave({ ...row, ...{ templateId: this.code } }) |
| | | if (response.status === 200) { |
| | | loading() |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æ°æ®æåï¼' |
| | | }) |
| | | done() |
| | | this.getDataList() |
| | | } |
| | | |
| | | }, |
| | | // ç¼è¾ |
| | | async handleEdit(row, index, done, loading) { |
| | | console.log(row) |
| | | const { modelName, modelKey, buttonTypeKey, id ,description} = row |
| | | let param = { modelName, modelKey, buttonTypeKey, id,description } |
| | | const response = await flowpathSave({ ...param, ...{ templateId: this.code } }) |
| | | if (response.status === 200) { |
| | | loading() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ä¿®æ¹æ°æ®æåï¼' |
| | | }) |
| | | done() |
| | | this.getDataList() |
| | | } |
| | | |
| | | }, |
| | | // å é¤åæ¡ |
| | | handleDelete(row) { |
| | | console.log(row) |
| | | const { id } = row |
| | | this.deleteSysInfo({ id: id }) |
| | | }, |
| | | // å 餿¥å£ |
| | | deleteSysInfo(param) { |
| | | this.$confirm('æ¯å¦ç¡®å®å é¤éæ©çæ¨¡æ¿æµç¨?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | // æ¥å£ |
| | | const response = await flowpathDelete(param) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!' |
| | | }); |
| | | this.getDataList() |
| | | } |
| | | }) |
| | | }, |
| | | // enteræç´¢ |
| | | handleEnter() { |
| | | if (this.search[this.selectValue] === '') return |
| | | else this.getDataList() |
| | | }, |
| | | // è¾å
¥æ¡æ¸
空 |
| | | handleClear() { |
| | | |
| | | }, |
| | | // å·æ°æé® |
| | | handleRefresh() { |
| | | this.getDataList() |
| | | }, |
| | | handleSizePage(event) { |
| | | this.page.pageSize = event |
| | | }, |
| | | handleCurrentPage(event) { |
| | | this.page.currentPage = event |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body="true"> |
| | | <div> |
| | | <el-tag v-for="tag in tags" :key="tag" closable disable-transitions effect="dark" @click="handleClickTag(tag)" |
| | | @close="handleCloseTag(tag)"> |
| | | <span> {{ tag.name }}</span> |
| | | </el-tag> |
| | | </div> |
| | | |
| | | <el-divider v-if="tags.length !== 0"></el-divider> |
| | | <div class="btns-icon"> |
| | | <el-button type="primary" icon="el-icon-star-off" @click="handleCollect"></el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-refresh" ></el-button> --> |
| | | </div> |
| | | <el-form :model="saveParam" class="demo-form-inline" label-position="left"> |
| | | <el-form-item :label="item.taskName" v-for="(item, index) in initFrom" :key="index"> |
| | | <el-select style="width: 50%;" v-model="saveParam.flowTaskUsers[index]['userId']" |
| | | :placeholder="item.taskName" @change="handleSelect($event, index)"> |
| | | <el-option :label="key.userNames" :value="key.userId" v-for="(key, keyi) in typeName" |
| | | :key="keyi"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleConfirm">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { personnelInit, personnelCollect, cancelCollect, personnelSave, personnelDict } from '@/api/template/setPersonnel.js' |
| | | export default { |
| | | name: 'SetPersonnel', |
| | | props: { |
| | | // æ¯å¦æå¼ |
| | | visible: { |
| | | typeof: Boolean, |
| | | default: false |
| | | }, |
| | | // æ é¢ |
| | | title: { |
| | | typeof: String, |
| | | default: '人å设置' |
| | | }, |
| | | // 模æ¿id |
| | | code: { |
| | | typeof: String, |
| | | default: '' |
| | | }, |
| | | // 模æ¿ç¨é |
| | | type: { |
| | | typeof: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | watch: { |
| | | visible(n) { |
| | | this.dialogVisible = n; |
| | | }, |
| | | dialogVisible(n) { |
| | | this.$emit('update:visible', n) |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: this.visible, |
| | | initFrom: [], |
| | | tags: [], |
| | | typeName: [], |
| | | saveParam: {}, |
| | | users: [], |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.apiInit() |
| | | this.apiDict() |
| | | }, |
| | | methods: { |
| | | async apiInit() { |
| | | const response = await personnelInit({ type: this.type, templateId: this.code }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.initFrom = response.data.data.user |
| | | this.tags = response.data.data.collect |
| | | const { modelKey, templateId } = response.data.data.flow |
| | | let flowTaskUsers = response.data.data.user |
| | | this.saveParam = { modelKey, templateId, flowTaskUsers: flowTaskUsers } |
| | | this.handleClickTag(this.tags[0]) |
| | | } |
| | | }, |
| | | async apiDict() { |
| | | const response = await personnelDict() |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | const data = response.data.data |
| | | this.typeName = data.map(item => { |
| | | const { account, deptName, id, realName } = item |
| | | let userNames = `${deptName} - ${realName} - ${account}` |
| | | return { userId: id, userName: realName, userNames: userNames } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | handleCollect() { |
| | | this.$prompt('请è¾å
¥ä¸ä¸ªåå', 'æä½', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | }).then(async ({ value }) => { |
| | | console.log(this.users) |
| | | this.saveParam.flowTaskUsers = this.users |
| | | this.saveParam = { ...this.saveParam, name: value } |
| | | console.log(this.saveParam) |
| | | const response = await personnelCollect(this.saveParam) |
| | | if (response.status === 200) { |
| | | this.$nextTick(() => { |
| | | this.apiInit() |
| | | }) |
| | | console.log(response) |
| | | } |
| | | }).catch(() => { |
| | | |
| | | }); |
| | | }, |
| | | async canCollect(name) { |
| | | const response = await cancelCollect({ name: name }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.apiInit() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: response.data.msg |
| | | }); |
| | | } |
| | | }, |
| | | async apiSave() { |
| | | try { |
| | | const { modelKey, templateId } = this.saveParam |
| | | const response = await personnelSave({ modelKey, templateId }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: response.data.msg |
| | | }); |
| | | this.done() |
| | | } |
| | | } catch { |
| | | console.error('æ¥å£è°ç¨å¤±è´¥') |
| | | } |
| | | }, |
| | | handleClickTag(event) { |
| | | console.log(event) |
| | | const flowTaskUsers = event.flowTaskUsers |
| | | this.saveParam.flowTaskUsers = flowTaskUsers.map(item => { |
| | | const { taskId, taskName, userId, userName } = item |
| | | return { taskId, taskName, userId, userName } |
| | | }) |
| | | }, |
| | | handleCloseTag(event) { |
| | | console.log(event) |
| | | this.canCollect(event.name) |
| | | }, |
| | | handleSelect(event, index) { |
| | | const res = this.typeName.find(item => item.userId === event) |
| | | const { userName } = res |
| | | let users = { ... this.saveParam.flowTaskUsers[index], userName } |
| | | console.log(users) |
| | | this.users[index] = users |
| | | }, |
| | | done() { |
| | | this.dialogVisible = false |
| | | }, |
| | | handleCancel() { |
| | | this.done() |
| | | }, |
| | | handleConfirm() { |
| | | console.log(this.users) |
| | | console.log(this.saveParam) |
| | | this.apiSave() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | .el-tag+.el-tag { |
| | | margin-left: 10px; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .button-new-tag { |
| | | margin-left: 10px; |
| | | height: 32px; |
| | | line-height: 30px; |
| | | padding-top: 0; |
| | | padding-bottom: 0; |
| | | } |
| | | |
| | | .input-new-tag { |
| | | width: 90px; |
| | | margin-left: 10px; |
| | | vertical-align: bottom; |
| | | } |
| | | |
| | | .btns-icon { |
| | | display: flex; |
| | | justify-content: end; |
| | | padding-bottom: 10px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <avue-crud ref="crud" :table-loading="loading" :data="data" :option="option" :page.sync="page" |
| | | @on-load="getDataList" @size-change="handleSizePage" @current-change="handleCurrentPage" |
| | | @row-click="handleRowClick"> |
| | | <template slot-scope="{type,size,row,index}" slot="menu"> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" |
| | | @click="handleMaintenance(row, index)">ç»´æ¤</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="模æ¿é¶æ®µ" width="50%" append-to-body="true" :visible.sync="dialogNode"> |
| | | <avue-crud ref="crud" :table-loading="loading" :data="stageData" :option="stageOption" @on-load="getStagelist" |
| | | @row-click="handleRowStageClick"> |
| | | <template slot-scope="{type,size,row,index}" slot="menu"> |
| | | <el-button icon="el-icon-check" :size="size" :type="type" |
| | | @click="handleMaintenanceTransfer(row, index)">ç»´æ¤</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | <table-transfer v-if="flag" :visible.sync="dialogTransfer" v-model="attributeValue" :dataList="attributeData" |
| | | :columns="columns" keyName="oid" @save="handleSave" @close="handelClose"></table-transfer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFlowpathList, stagelist, attributeListRight, attributeList, attributeSave } from '@/api/template/flowpath.js' |
| | | import TableTransfer from '@/components/template/TableTransfer' |
| | | export default { |
| | | name: 'Stage', |
| | | components: { |
| | | TableTransfer |
| | | }, |
| | | props: { |
| | | code: { |
| | | typeof: String, |
| | | required: true, |
| | | default: "" |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | data() { |
| | | const options = { |
| | | height: "auto", |
| | | border: true, |
| | | addBtn: false, |
| | | align: 'center', |
| | | menuAlign: 'center', |
| | | index: true, |
| | | searchMenuSpan: 8, |
| | | searchBtn: false, |
| | | emptyBtn: false, |
| | | columnBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | header: false, |
| | | editBtn: false, |
| | | } |
| | | return { |
| | | attributeData: [], |
| | | attributeValue: [], |
| | | flag: false, |
| | | dialogTransfer: false, |
| | | dialogNode: false, |
| | | visibleTable: false, |
| | | loading: false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | }, |
| | | modelKey: '', |
| | | data: [], |
| | | stageData: [], |
| | | saveParam: {}, |
| | | columns: [ |
| | | { |
| | | key: "oid", |
| | | label: "oid", |
| | | visible: false, |
| | | }, |
| | | { |
| | | key: "id", |
| | | label: "屿§ç¼å·", |
| | | visible: true, |
| | | }, |
| | | { |
| | | key: "name", |
| | | label: "屿§åç§°", |
| | | visible: true, |
| | | }, |
| | | { |
| | | key: "attributeGroup", |
| | | label: "屿§åç»", |
| | | visible: true, |
| | | }, |
| | | ], |
| | | option: { |
| | | ...options, |
| | | column: [ |
| | | { label: '模æ¿ç¼å·', prop: 'modelKey' }, |
| | | { label: '模æ¿åç§°', prop: 'modelName' }, |
| | | { label: 'æè¿°', prop: 'buttonTypeValue' }, |
| | | ] |
| | | }, |
| | | stageOption: { |
| | | ...options, |
| | | column: [ |
| | | { label: 'é¶æ®µç¼å·', prop: 'taskId' }, |
| | | { label: 'é¶æ®µåç§°', prop: 'taskName' }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | setTable(data, list) { |
| | | return data.map(item => { |
| | | if (list.length !== 0) { |
| | | list.forEach(element => { |
| | | if (item.id === element.attrId) item.checked = true |
| | | }); |
| | | } |
| | | return item |
| | | }) |
| | | }, |
| | | // è·åå表 |
| | | async getDataList() { |
| | | this.loading = false |
| | | const { pageSize, currentPage } = this.page |
| | | let param = { size: pageSize, current: currentPage } |
| | | const response = await getFlowpathList({ ...param, ...{ templateId: this.code } }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | | this.loading = false |
| | | const data = response.data.data |
| | | this.data = data.records |
| | | this.page.total = data.total |
| | | } else this.loading = false |
| | | }, |
| | | // è·åé¶æ®µå表 |
| | | async getStagelist() { |
| | | this.loading = false |
| | | console.log(this.modelKey) |
| | | const response = await stagelist({ modelKey: this.modelKey }) |
| | | if (response.status === 200) { |
| | | this.loading = false |
| | | console.log(response.data) |
| | | this.stageData = response.data.data |
| | | } else this.loading = false |
| | | }, |
| | | // è·åå
¨é¨å±æ§ |
| | | async getAttributeList() { |
| | | const response = await attributeList({ 'conditionMap[classifyTemplateOid]': this.code }) |
| | | const responseRight = await attributeListRight({ templateId: this.code, modelKey: this.modelKey, taskId: this.saveParam.taskId }) |
| | | if (response.status === 200 && responseRight.status === 200) { |
| | | let datas = response.data.data.records |
| | | let dataRight = responseRight.data.data |
| | | datas = datas.map(item => { |
| | | const { oid, id, name, attributeGroup } = item |
| | | item = { oid, id, name, attributeGroup, ...{ checked: false } } |
| | | if (dataRight.length !== 0) { |
| | | dataRight.forEach(element => { if (item.id === element.attrId) item.checked = true }); |
| | | return item |
| | | } |
| | | }) |
| | | let dataValue = datas.map(item => item.checked ? item.oid : undefined) |
| | | this.attributeValue = dataValue.filter(item => item) |
| | | this.attributeData = datas |
| | | this.flag = true |
| | | } |
| | | }, |
| | | // è·åå·²ä¿å屿§ |
| | | async getAttributeListRight() { |
| | | const response = await attributeListRight({ templateId: this.code, modelKey: this.modelKey, taskId: this.saveParam.taskId }) |
| | | if (response.status === 200) { |
| | | let data = response.data.data |
| | | data = data.map(item => { |
| | | const { attrId, attrName, attrGroup } = item |
| | | return { attrId, attrName, attrGroup } |
| | | }) |
| | | this.listRight = data |
| | | } |
| | | }, |
| | | // ç»´æ¤ |
| | | handleMaintenance(row) { |
| | | console.log(row) |
| | | this.dialogNode = true |
| | | this.saveParam.modelKey = row.modelKey |
| | | }, |
| | | handleMaintenanceTransfer(row) { |
| | | this.saveParam.taskId = row.taskId |
| | | this.saveParam.taskName = row.taskName |
| | | this.getAttributeList() |
| | | this.$nextTick(() => { |
| | | this.dialogTransfer = true |
| | | }) |
| | | }, |
| | | handleRowClick(row) { |
| | | console.log(row) |
| | | this.modelKey = row.modelKey |
| | | this.saveParam.modelKey = row.modelKey |
| | | this.dialogNode = true |
| | | }, |
| | | handleRowStageClick(row) { |
| | | this.saveParam.taskId = row.taskId |
| | | this.saveParam.taskName = row.taskName |
| | | this.getAttributeList() |
| | | this.$nextTick(() => { |
| | | this.dialogTransfer = true |
| | | }) |
| | | }, |
| | | async handleSave(event) { |
| | | console.log(event) |
| | | const data = event.map(item => { |
| | | const { id, name, attributeGroup } = item |
| | | return { attrId: id, attrName: name, attrGroup: attributeGroup } |
| | | }) |
| | | let param = { |
| | | templateId: this.code, |
| | | processStageAttr: data, |
| | | ...this.saveParam |
| | | } |
| | | console.log(this.saveParam) |
| | | console.log(data) |
| | | const response = await attributeSave(param) |
| | | if (response.status === 200) { |
| | | // loading() |
| | | console.log(response) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æ°æ®æåï¼' |
| | | }) |
| | | this.flag = false |
| | | // done() |
| | | // this.getDataList() |
| | | } |
| | | }, |
| | | handelClose() { |
| | | this.flag = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :title="title" width="70%" append-to-body="true" :visible.sync="dialogVisible" @close="handelClose"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="11"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>åå§æ°æ®</span> |
| | | <el-input class="input" v-if="showSearch" v-model="searchLeft" placeholder="请è¾å
¥æç´¢å
容" |
| | | @keyup.enter.native="handleEnter"></el-input> |
| | | </div> |
| | | <el-table ref="transferTable" :data="leftData" height="500" highlight-current-row tooltip-effect="dark" |
| | | @selection-change="handleLeftSelectionChange" @row-click="handleLeftRowClick"> |
| | | <el-table-column type="selection" width="50" align="center" fixed="left" /> |
| | | <div v-for="(item, index) in columns" :key="index"> |
| | | <el-table-column v-if="item.visible" :label="item.label" align="center" :prop="item.key" /> |
| | | </div> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :span="2" class="btns" :style="{ height: '500px' }"> |
| | | <el-button class="btn" :disabled="leftMultiple" type="primary" icon="el-icon-arrow-right" |
| | | @click="moveToRight" circle></el-button> |
| | | <el-button class="btn" :disabled="rightMultiple" type="primary" @click="moveToLeft" |
| | | icon="el-icon-arrow-left" circle></el-button> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>æ¹åæ°æ®</span> |
| | | <el-input class="input" v-if="showSearch" v-model="searchRight" placeholder="请è¾å
¥æç´¢å
容"></el-input> |
| | | </div> |
| | | <el-table ref="transferRightTable" :data="rightData" height="500" highlight-current-row |
| | | tooltip-effect="dark" @selection-change="handleRightSelectionChange" |
| | | @row-click="handleRightRowClick"> |
| | | <el-table-column type="selection" width="50" align="center" fixed="left" /> |
| | | <div v-for="(item, index) in columns" :key="index"> |
| | | <el-table-column v-if="item.visible" :label="item.label" align="center" :prop="item.key" /> |
| | | </div> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="tableTransferSave">ä¿å</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'TableTransfer', |
| | | model: { |
| | | prop: "value", |
| | | event: "change", |
| | | }, |
| | | props: { |
| | | // æ¯å¦æå¼ |
| | | visible: { |
| | | typeof: Boolean, |
| | | default: false |
| | | }, |
| | | title: { |
| | | typeof: String, |
| | | default: '模æ¿é¶æ®µç»´æ¤' |
| | | }, |
| | | //ç»å®æ°æ® |
| | | value: { |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | }, |
| | | }, |
| | | //主é®keyå¼ |
| | | keyName: { |
| | | type: String, |
| | | default: "oid", |
| | | }, |
| | | columns: { |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | }, |
| | | }, |
| | | dataList: { |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | }, |
| | | }, |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºæç´¢æ¡ |
| | | */ |
| | | showSearch: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | }, |
| | | |
| | | watch: { |
| | | visible(n) { |
| | | this.dialogVisible = n; |
| | | }, |
| | | dialogVisible(n) { |
| | | this.$emit('update:visible', n) |
| | | }, |
| | | searchLeft: { |
| | | handler: function () { |
| | | this.handleQueryLeft(); |
| | | }, |
| | | deep: true, |
| | | }, |
| | | searchRight: { |
| | | handler: function () { |
| | | this.handleQueryRight(); |
| | | }, |
| | | deep: true, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: this.visible, |
| | | indeterminate: false, |
| | | isCheck: false, |
| | | searchLeft: "", |
| | | leftIds: [], |
| | | leftMultiple: true, |
| | | leftDataList: [], |
| | | leftData: [], |
| | | searchRight: "", |
| | | rightIds: [], |
| | | rightMultiple: true, |
| | | rightDataList: [], |
| | | rightData: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.init(); |
| | | console.log(this.$refs.transferTable) |
| | | }, |
| | | methods: { |
| | | init() { |
| | | let that = this |
| | | that.rightIds = that.value; |
| | | for (let i = 0; i < that.dataList.length; i++) { |
| | | if (that.value.some((item) => item == that.dataList[i][that.keyName])) { |
| | | that.rightDataList.push(that.dataList[i]); |
| | | } |
| | | // else{ |
| | | // that.leftDataList.push(that.dataList[i]) |
| | | // } |
| | | that.leftDataList.push(that.dataList[i]) |
| | | |
| | | } |
| | | that.leftData = [...that.leftDataList]; |
| | | that.rightData = [...that.rightDataList]; |
| | | }, |
| | | |
| | | // leftå¤éæ¡é䏿°æ® |
| | | handleLeftSelectionChange(selection) { |
| | | this.leftIds = selection.map((item) => item[this.keyName]); |
| | | this.leftMultiple = !selection.length; |
| | | }, |
| | | // rightå¤éæ¡é䏿°æ® |
| | | handleRightSelectionChange(selection) { |
| | | this.rightIds = selection.map((item) => item[this.keyName]); |
| | | this.rightMultiple = !selection.length; |
| | | }, |
| | | // æé®ç¹å» |
| | | moveToRight() { |
| | | for (let i = 0; i < this.leftDataList.length; i++) { |
| | | let a = this.leftIds.findIndex( |
| | | (item) => item == this.leftDataList[i][this.keyName] |
| | | ); |
| | | if (a !== -1) { |
| | | let moveLefti = this.leftDataList[i];//左边ç½è¿æ¥ç |
| | | let moveLeftiKey = moveLefti['id']; |
| | | let isMove = true; |
| | | for (let j = 0; j < this.rightDataList.length; j++) { |
| | | let rifhtDataListi = this.rightDataList[j];//å³è¾¹å¾ªç¯åºæ¥çæ¯ä¸ä¸ª |
| | | let rightDataListiKey = rifhtDataListi['id'];//æ¯ä¸ä¸ªkey |
| | | if (rightDataListiKey == moveLeftiKey) { |
| | | isMove = false; |
| | | break; |
| | | } |
| | | } |
| | | if (isMove) { |
| | | this.rightDataList.push(this.leftDataList[i]); |
| | | this.leftDataList[i].checked = true |
| | | // this.$delete(this.leftDataList, i); |
| | | // i--; |
| | | } |
| | | } |
| | | } |
| | | this.leftData = this.setData(this.leftDataList, this.searchLeft); |
| | | this.rightData = this.setData(this.rightDataList, this.searchRight); |
| | | this.$emit( |
| | | "change", |
| | | this.rightDataList.map((item) => item[this.keyName]) |
| | | ); |
| | | }, |
| | | // æé®ç¹å» |
| | | moveToLeft() { |
| | | for (let i = 0; i < this.rightDataList.length; i++) { |
| | | let a = this.rightIds.findIndex( |
| | | (item) => item == this.rightDataList[i][this.keyName] |
| | | ); |
| | | if (a !== -1) { |
| | | this.leftDataList[i].checked = false |
| | | // this.leftDataList.push(this.rightDataList[i]); |
| | | this.$delete(this.rightDataList, i); |
| | | i--; |
| | | } |
| | | } |
| | | console.log(this.rightDataList) |
| | | this.leftData = this.setData(this.leftDataList, this.searchLeft); |
| | | this.rightData = this.setData(this.rightDataList, this.searchRight); |
| | | this.$emit( |
| | | "change", |
| | | this.rightDataList.map((item) => item[this.keyName]) |
| | | ); |
| | | }, |
| | | |
| | | handleQueryLeft() { |
| | | this.leftData = this.setData(this.leftDataList, this.searchLeft); |
| | | }, |
| | | handleQueryRight() { |
| | | this.rightData = this.setData(this.rightDataList, this.searchRight); |
| | | }, |
| | | // åé |
| | | handleLeftRowClick(row) { |
| | | if (this.leftData) { |
| | | this.$refs.transferTable.toggleRowSelection(row) |
| | | } else { |
| | | this.$refs.transferTable.clearSelection() |
| | | } |
| | | }, |
| | | // åé |
| | | handleRightRowClick(row) { |
| | | if (this.rightData) { |
| | | this.$refs.transferRightTable.toggleRowSelection(row) |
| | | } else { |
| | | this.$refs.transferRightTable.clearSelection() |
| | | } |
| | | }, |
| | | setData(dataList, search) { |
| | | if (search != null || search != "") { |
| | | let list = []; |
| | | for (let i = 0; i < dataList.length; i++) { |
| | | if ( |
| | | this.columns.some((item) => |
| | | dataList[i][item.key].toLowerCase().includes(search.toLowerCase()) |
| | | ) |
| | | ) { |
| | | list.push(dataList[i]); |
| | | } |
| | | } |
| | | return list; |
| | | } else { |
| | | return dataList; |
| | | } |
| | | }, |
| | | change(val) { |
| | | console.log(val); |
| | | console.log(this.value) |
| | | }, |
| | | done() { |
| | | this.leftData = [] |
| | | this.leftDataList = [] |
| | | this.rightDataList = [] |
| | | this.rightData = [] |
| | | this.dialogVisible = false |
| | | }, |
| | | tableTransferSave() { |
| | | this.$emit('save', this.rightData) |
| | | this.done() |
| | | |
| | | |
| | | }, |
| | | // å
³éæ¸
é¤æææ°æ® |
| | | handelClose() { |
| | | this.$emit('close') |
| | | this.done() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep(.el-col>.el-card >.el-card__header) { |
| | | background: #fff |
| | | } |
| | | |
| | | .box-card { |
| | | background: #fff; |
| | | } |
| | | |
| | | .clearfix { |
| | | display: -webkit-box; |
| | | display: flex; |
| | | display: -ms-flexbox; |
| | | -webkit-box-pack: justify; |
| | | -ms-flex-pack: justify; |
| | | justify-content: space-between; |
| | | -webkit-box-align: center; |
| | | -ms-flex-align: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | .input { |
| | | float: right; |
| | | padding: 3px 0; |
| | | max-width: 400px; |
| | | } |
| | | |
| | | .btns { |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | |
| | | .btn { |
| | | margin: 20px 0; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ç æ®µç¼å·", |
| | |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ç¼å·", |
| | |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ç æ®µç¼å·", |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "", |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "", |
| | |
| | | columnBtn: true, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ç æ®µç¼å·", |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, //è¡é䏿¶é«äº® |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "", |
| | |
| | | columnBtn: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ç å¼", |
| | |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ç¼å·", |
| | |
| | | menu: false, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "è±æåç§°", |
| | |
| | | searchShowBtn: false, // è¡¨æ ¼æç´¢æ¾éæé® |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "ä¸å¡ç±»åç¼å·", |
| | |
| | | searchShowBtn: false, // è¡¨æ ¼æç´¢æ¾éæé® |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey: "oid", //è¡æ°æ®ç Keyï¼ç¨æ¥ä¼å Table çæ¸²æ |
| | | column: [ |
| | | { |
| | | label: "屿§è±æåç§°", |
| | |
| | | import FormTemplateDialog from "@/components/FormTemplate/index" |
| | | import linkTypeAdd from "@/views/modeling/LinkTypeAdd" |
| | | import MasterTree from "@/components/Master/MasterTree"; |
| | | import FlowPath from "@/components/template/FlowPath"; |
| | | import Stage from "@/components/template/Stage"; |
| | | |
| | | // å°å·¥å
·å½æ°æ·»å å°å
¨å± |
| | | import utilFunc from './util/func' |
| | | import flowPath from "@/views/flow/flowPath"; |
| | | Vue.prototype.$utilFunc = utilFunc |
| | | // 注åå
¨å±crudé©±å¨ |
| | | window.$crudCommon = crudCommon; |
| | |
| | | Vue.component('FormTemplateDialog',FormTemplateDialog) |
| | | Vue.component('LinkTypeAdd',linkTypeAdd) |
| | | Vue.component('MasterTree',MasterTree) |
| | | Vue.component('FlowPath',FlowPath) |
| | | Vue.component('Stage',Stage) |
| | | |
| | | // å è½½ç¸å
³urlå°å |
| | | Object.keys(urls).forEach(key => { |
| | |
| | | }] |
| | | }, |
| | | { |
| | | label: 'ä¿®æ¹å¯ç ', |
| | | label: '', |
| | | prop: 'password', |
| | | column: [{ |
| | | label: 'åå¯ç ', |
| | |
| | | import {Base64} from 'js-base64'; |
| | | import NProgress from 'nprogress'; |
| | | import 'nprogress/nprogress.css'; |
| | | import qs from 'qs'; |
| | | |
| | | //é»è®¤è¶
æ¶æ¶é´ |
| | | axios.defaults.timeout = 20000; |
| | |
| | | if (config.method === 'post' && meta.isSerialize === true) { |
| | | config.data = serialize(config.data); |
| | | } |
| | | // get请æ±ç¹æ®å符æ±ååºååï¼å¦åä¼å¯¼è´åç«¯æ æ³è½¬ç |
| | | if(config.method === 'get'){ |
| | | config.paramsSerializer = function(params) { |
| | | return qs.stringify(params, { encode: true }) |
| | | }; |
| | | } |
| | | return config |
| | | }, error => { |
| | | return Promise.reject(error) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * Param转conditionMapæ¡ä»¶çå·¥å
·ç±» |
| | | */ |
| | | |
| | | |
| | |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="è§è²æéé
ç½®" |
| | | append-to-body |
| | | :visible.sync="box" |
| | | width="345px"> |
| | | <el-tabs type="border-card"> |
| | | append-to-body |
| | | :visible.sync="box" |
| | | width="350px" |
| | | style="height: 115vh; margin-top: -13vh; overflow: hidden"> |
| | | <el-tabs type="border-card" style="overflow-y: auto; height: 72vh"> |
| | | <el-tab-pane label="èåæé"> |
| | | <el-tree :data="menuGrantList" |
| | | show-checkbox |
| | |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]); |
| | | }, |
| | | clickRowChange(row){ |
| | | this.selectionList = row; |
| | | this.$refs.crud.toggleSelection(); |
| | | this.$refs.crud.setCurrentRow(row); |
| | | this.$refs.crud.toggleRowSelection(row); //éä¸å½åè¡ |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | |
| | | refreshParentClassifyDataChange() { |
| | | this.parentClassifyOnLoad(this.parentClsfyParams.parentClassifyDataPage, this.parentClsfyParams.parentClassifyQuery); |
| | | }, |
| | | // TODO:å¾
ä¿®æ¹ |
| | | parentClassifyOnLoad(page, params = {}) { |
| | | let parentClsParam = this.parentClsfyParams; |
| | | parentClsParam.classifyDialogLoading = true; |
| | |
| | | loadlistClassifyLinkAttr() { |
| | | let attrParam = this.selectAttrParams; |
| | | //console.log(this.currentSelectTreeData); |
| | | attrParam.selectAttrOptionLoading = true; |
| | | this.selectAttrParams.selectAttrOptionLoading = true; |
| | | let conditionMaps = {}; |
| | | if(attrParam.selectAttrQeury){ |
| | | Object.keys(attrParam.selectAttrQeury).forEach(key=>{ |
| | | conditionMaps['conditionMap['+key+']'] = attrParam.selectAttrQeury[key]; |
| | | conditionMaps['conditionMap['+key+']'] = attrParam.selectAttrQeury[key].trim(); |
| | | }); |
| | | } |
| | | conditionMaps['conditionMap[codeClassifyOid]'] = this.currentSelectTreeData.oid; |
| | | conditionMaps['conditionMap[btmTypeOid]'] = this.currentSelectTreeData.btmTypeOid; |
| | | listClassifyLinkAttr(conditionMaps).then(res=>{ |
| | | //console.log(res.data.data); |
| | | attrParam.selectAttrData = res.data.data; |
| | | attrParam.selectAttrOptionLoading = false; |
| | | const data = res.data; |
| | | this.$nextTick(() => { |
| | | this.$refs[attrParam.ref].doLayout() |
| | | this.$refs[attrParam.ref].doLayout() |
| | | }); |
| | | //console.log(data.data); |
| | | this.selectAttrParams.selectAttrData = data.data; |
| | | this.selectAttrParams.selectAttrOptionLoading = false; |
| | | // å°æç´¢æ¡å
容置空 |
| | | this.selectAttrParams.selectAttrQeury = {}; |
| | | }) |
| | | }, |
| | | // ç¹å»æç´¢å触å该äºä»¶ |
| | |
| | | return false; |
| | | } |
| | | }else if(this.form.secType==='codeserialsec'){ |
| | | console.log(form.codeFillType); |
| | | //console.log(form.codeFillType); |
| | | //æµæ°´ç 段 |
| | | if(form.codeSecLength == ''){ |
| | | this.$message.warning('(ç æ®µçé¿åº¦)'+tipsMsg); |
| | |
| | | //åå¨å½åå
³èçç¼ç è§åç¸å
³ä¿¡æ¯ |
| | | this.currentCodeRuleOid = row.oid; |
| | | this.currentRuleLcStatus = row.lcStatus; |
| | | this.sendGridCodeBasicSec({"pkCodeRule_equal":row.oid},false); |
| | | this.sendGridCodeBasicSec({"pkCodeRule":row.oid},false); |
| | | }, |
| | | // åéå è½½åºç¡ç 段çè¯·æ± |
| | | sendGridCodeBasicSec(condition,isAdancedQuery/** æ¯å¦é«çº§æ¥è¯¢ */){ |
| | |
| | | let conditionMaps = {}; |
| | | if(condition && !isAdancedQuery){ |
| | | Object.keys(condition).forEach(key=>{ |
| | | conditionMaps['conditionMap[t.'+key+']'] = condition[key]; |
| | | conditionMaps['conditionMap[pl_code_basicsec.'+key+']'] = condition[key].trim(); |
| | | }); |
| | | } |
| | | if(isAdancedQuery){ |
| | | condition['conditionMap[t.pkCodeRule_equal]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' |
| | | condition['conditionMap[pl_code_basicsec.pkCodeRule]'] = this.currentCodeRuleOid == null || this.currentCodeRuleOid == '' |
| | | ? this.selectionList[0].oid:this.currentCodeRuleOid; |
| | | } |
| | | gridCodeBasicSec(1, -1,isAdancedQuery ? condition:conditionMaps).then(res => { |
| | |
| | | }, |
| | | basicSearchChange(params, done){ |
| | | //console.log(this.$refs.crudBasic); |
| | | this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule_equal":this.selectionList[this.selectionList.length-1].oid}),false); |
| | | this.sendGridCodeBasicSec(Object.assign(params,{"pkCodeRule":this.selectionList[this.selectionList.length-1].oid}),false); |
| | | done(); |
| | | }, |
| | | basicSearchReset(){ |
| | | this.sendGridCodeBasicSec({"pkCodeRule_equal":this.selectionList[this.selectionList.length-1].oid},false); |
| | | this.sendGridCodeBasicSec({"pkCodeRule":this.selectionList[this.selectionList.length-1].oid},false); |
| | | }, |
| | | // ä¸ç§»ä¸ç§»åºç¡ç 段 |
| | | upOrderNum(row){ |
| | |
| | | fieldType: 'combox', |
| | | queryField: 'lcStatus', |
| | | comboxKey: 'codeSearchLCStatus', |
| | | } |
| | | }, |
| | | ] |
| | | }else { |
| | | this.advancedQueryParam.options = [ |
| | |
| | | data: [], |
| | | title: 'ç æ®µç¼å·', |
| | | fieldType: 'text', |
| | | queryField: 't.id', |
| | | queryField: 'pl_code_basicsec.id', |
| | | },{ |
| | | data: [], |
| | | title: 'ç æ®µåç§°', |
| | | fieldType: 'text', |
| | | queryField: 't.name', |
| | | queryField: 'pl_code_basicsec.name', |
| | | },{ |
| | | data: [], |
| | | title: 'æè¿°', |
| | | fieldType: 'text', |
| | | queryField: 't.description', |
| | | queryField: 'pl_code_basicsec.description', |
| | | },{ |
| | | data: [], |
| | | title: 'ç æ®µç±»å', |
| | | fieldType: 'combox', |
| | | queryField: 't.secType', |
| | | queryField: 'pl_code_basicsec.secType', |
| | | comboxKey: 'codeSecType', |
| | | } |
| | | ] |
| | |
| | | searchChange(params, done) { |
| | | this.page.currentPage = 1; |
| | | // å¤ä¸ªconditionMapè¿æ ·ä¼ åï¼å¿«éæ¥è¯¢é»è®¤éç¨æ¨¡ç³æ¥è¯¢ |
| | | let requestData = {}; |
| | | if(params){ |
| | | Object.keys(params).forEach(key=>{ |
| | | this.query['conditionMap['+key+'_like]'] = params[key]; |
| | | requestData["conditionMap"+'['+key+']'] = params[key].trim(); |
| | | }); |
| | | } |
| | | this.query = requestData; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | |
| | | //å¯åç æ®µ |
| | | this.form = Object.assign({}, this.form,{ |
| | | codeSecLength: row!=null&&row.codeSecLength != '' ? row.codeSecLength:'', //ç æ®µçé¿åº¦ |
| | | codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_right', //ç¼ç é¨ä½æ¹å¼ï¼æä¸¾æ¥è¯¢ |
| | | codeFillType: row!=null&&row.codeFillType != '' ? row.codeFillType:'code_fill_left', //ç¼ç é¨ä½æ¹å¼ï¼æä¸¾æ¥è¯¢ |
| | | codeFillSeparatorSelect: row!=null&&row.codeFillSeparatorSelect != '' ? row.codeFillSeparatorSelect:0, //éä¸çè¡¥ä½æ¶çå符ç䏿 |
| | | codeFillSeparator: row!=null&&row.codeFillSeparator != '' ? row.codeFillSeparator:'', //è¡¥ä½æ¶çå符ï¼å¯è¾å¯éæ¥è¯¢ |
| | | }); |
| | |
| | | <template> |
| | | <div> |
| | | <el-button @click="outerVisible = true">æµç¨æµè¯</el-button> |
| | | <el-dialog :title="`æ§è¡${title}`" width="90%" append-to-body="true" :visible.sync="outerVisible"> |
| | | <div class="dialogwarp"> |
| | | <div class="dialogwarp_tab"> |
| | | <el-card class="dialogwarp_tab_card"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="ä¸å¡æ°æ®ä¿¡æ¯" name="first"> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æµç¨è·è¸ª" name="second"> |
| | | <avue-crud :data="data" :option="option" ref="crud"> |
| | | </avue-crud> |
| | | <div style="padding: 10px 0; width: 100%; height: 100% "> |
| | | <el-image :src="url" flt="fill"></el-image> |
| | | </div> |
| | | |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-card> |
| | | </div> |
| | | <div class="dialogwarp_card"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>å½åä»»å¡ï¼</span> |
| | | <span>{{ title }}</span> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>请å¨ä¸æ¹è¾å
¥æ¨çå®¡æ¹æè§ï¼</p> |
| | | <el-input type="textarea" :rows="4" placeholder="请è¾å
¥å
容" show-word-limit v-model="opinionVal"> |
| | | </el-input> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å®¡æ¹æè§éä»¶ï¼</p> |
| | | <el-upload drag action="https://jsonplaceholder.typicode.com/posts/" multiple |
| | | style="width: 100%;"> |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text">å°æä»¶æå°æ¤å¤ï¼æ<em>ç¹å»ä¸ä¼ </em></div> |
| | | </el-upload> |
| | | </div> |
| | | <div style="width: 100%;"> |
| | | <p>å·²ä¸ä¼ å®¡æ¹æä»¶ï¼</p> |
| | | <el-card class="box-card"> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table-column prop="date" label="æä»¶å"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="ä¸ä¼ 人 "> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="æä½"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | <div style="margin-top: 20px;"> |
| | | <el-button v-if="!isRefuse" type="primary" size="mini" @click="handelAgree">åæ</el-button> |
| | | <el-button v-if="!isAgree" type="primary" size="mini" @click="handelRefuse">ä¸åæ</el-button> |
| | | <el-button v-if="isAgree && !isRefuse" type="primary" size="mini" @click="handelRevert" |
| | | v-for="item in btnList" :key="item">{{ item }}</el-button> |
| | | <el-button v-if="isRefuse" type="primary" size="mini" @click="handelExecute">æ§è¡</el-button> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | <el-button @click="handleTable">人å设置</el-button> |
| | | <flow-business :visible.sync="outerVisible"></flow-business> |
| | | <set-personnel :visible.sync="visibleFlow" code="8b5e2017-990f-454a-9c39-4c4eeeb57553" type="PUBLIC"></set-personnel> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import FlowBusiness from '@/components/template/Business' |
| | | import SetPersonnel from '@/components/template/SetPersonnel' |
| | | export default { |
| | | components: { |
| | | FlowBusiness, |
| | | SetPersonnel |
| | | }, |
| | | data() { |
| | | return { |
| | | outerVisible: false, |
| | | destroyClose: true, |
| | | activeName: 'first', |
| | | fits: ['fill', 'contain', 'cover', 'none', 'scale-down'], |
| | | url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', |
| | | title: 'ä¸å¡æµè¯-ç³è¯·-ç©å-å®¡æ ¸', |
| | | data: [ |
| | | { |
| | | name: 'å¼ ä¸', |
| | | sex: 'ç·' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | }, { |
| | | name: 'æå', |
| | | sex: '女' |
| | | } |
| | | ], |
| | | btnList: ['è¿å1', 'è¿å1', 'è¿å1'], |
| | | isAgree: false, |
| | | isRefuse: false, |
| | | opinionVal: '', |
| | | option: { |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | index: true, |
| | | header: false, |
| | | stripe: true, |
| | | indexLabelClassName: 'åºå·', |
| | | column: [ |
| | | { label: 'ä»»å¡åç§°', prop: 'name', minWidth: 120 }, |
| | | { label: 'æ§è¡æä½', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å¼å§æ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å®¡æ¹æè§', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | { label: 'æ§è¡äºº', prop: 'sex', minWidth: 80 }, |
| | | { label: 'ä»»å¡å®ææ¶é´', prop: 'sex', minWidth: 140 }, |
| | | { label: 'å·²ä¸ä¼ å®¡æ¹æä»¶', prop: 'sex', minWidth: 220, overHidden: true }, |
| | | ] |
| | | }, |
| | | visibleFlow: false, |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | closeDialog() { |
| | | this.destroyClose = true |
| | | this.outerVisible = false |
| | | }, |
| | | handleClick(tab, event) { |
| | | handleSave(event) { |
| | | console.log(event) |
| | | }, |
| | | handelAgree() { |
| | | this.isAgree = !this.isAgree |
| | | this.outerVisible = false |
| | | console.log(this.isAgree) |
| | | }, |
| | | handelRefuse() { |
| | | if (!this.opinionVal) { |
| | | this.$alert('å½å¤çæ¹å¼ä¸ºä¸åææ¶ï¼éè¦å¡«åå®¡æ¹æè§', 'æç¤ºä¿¡æ¯', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | }).then(() => { |
| | | |
| | | }); |
| | | } else { |
| | | this.isRefuse = true |
| | | this.isAgree = true |
| | | this.outerVisible = false |
| | | this.opinionVal = '' |
| | | } |
| | | }, |
| | | handelExecute() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | this.isRefuse = false |
| | | }, |
| | | handelRevert() { |
| | | this.outerVisible = false |
| | | this.isAgree = false |
| | | handleTable(){ |
| | | this.visibleFlow = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .dialogwarp { |
| | | display: -webkit-box; |
| | | display: -ms-flexbox; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 70vh; |
| | | |
| | | &_tab { |
| | | width: 79%; |
| | | |
| | | |
| | | &_card { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | } |
| | | |
| | | &_card { |
| | | // margin-left: 20px; |
| | | width: 20%; |
| | | } |
| | | } |
| | | ::v-deep(.el-upload){ |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | ::v-deep(.el-upload-dragger){ |
| | | width: 100%; |
| | | height: 120px; |
| | | } |
| | | ::v-deep(.el-upload-dragger .el-icon-upload) { |
| | | margin: 15px 0 16px; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped></style> |
| | |
| | | }, |
| | | async getDataList() { |
| | | this.loading = true |
| | | console.log(this.searchParam) |
| | | const { pageSize, currentPage, total } = this.page |
| | | let param = { size: pageSize, current: currentPage } |
| | | console.log(this.searchParam) |
| | | this.searchParam = Object.keys(this.searchParam) |
| | | .filter((key) => this.searchParam[key] !== null && this.searchParam[key] !== undefined && this.searchParam[key] !== "") |
| | | .reduce((acc, key) => ({ ...acc, [key]: this.searchParam[key] }), {}); |
| | | console.log(this.searchParam) |
| | | const response = await getList({ ...param, ...this.searchParam }) |
| | | if (response.status === 200) { |
| | | this.loading = false |
| | |
| | | }, |
| | | handleReset() { |
| | | this.searchParam = {} |
| | | this.getDataList() |
| | | }, |
| | | handleSearch(form, done) { |
| | | console.log(form) |
| | | const { id, groupCode, operationType } = form |
| | | let dataTime = { id, groupCode, operationType } |
| | | if (form.hasOwnProperty('createTime')) { |
| | |
| | | if (form.hasOwnProperty('lastModifyTime')) { |
| | | dataTime = { lastModifyTime: dateFormat(form.lastModifyTime), ...dataTime } |
| | | } |
| | | console.log(dataTime) |
| | | this.searchParam = dataTime |
| | | this.page.currentPage = 1 |
| | | this.getDataList() |
| | |
| | | @refresh-change="handleRefresh" @size-change="handleSizePage" @current-change="handleCurrentPage" |
| | | @selection-change="selectionChange" @row-click="handleRowClick"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-search" size="small" type="primary" @click="handleStatus">æ¥ è¯¢ |
| | | </el-button> |
| | | <!-- <el-button icon="el-icon-search" size="small" type="primary" @click="handleStatus">æ¥ è¯¢ |
| | | </el-button> --> |
| | | <el-button icon="el-icon-delete" size="small" type="danger" @click="handleDeleteByIds">å é¤ |
| | | </el-button> |
| | | </template> |
| | |
| | | required: true, |
| | | message: 'ç³»ç»ç¼å·ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }] |
| | | }], |
| | | // maxlength: 30, //åæ°éå¶ |
| | | }, { |
| | | label: 'ç³»ç»åç§°', |
| | | prop: 'name', |
| | |
| | | required: true, |
| | | message: 'ç³»ç»åç§°ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }] |
| | | }], |
| | | // maxlength: 30, //åæ°éå¶ |
| | | }, |
| | | { |
| | | label: 'ç³»ç»æè¿°', |
| | |
| | | console.log(this.search) |
| | | const { pageSize, currentPage } = this.page |
| | | let param = { size: pageSize, current: currentPage } |
| | | this.search = Object.keys(this.search) |
| | | .filter((key) => this.search[key] !== null && this.search[key] !== undefined && this.search[key] !== "") |
| | | .reduce((acc, key) => ({ ...acc, [key]: this.search[key] }), {}); |
| | | const response = await getSysInfoList({ ...param, ...this.search }) |
| | | if (response.status === 200) { |
| | | console.log(response) |
| | |
| | | }, |
| | | // æ°å¢ |
| | | async handleSave(row, done, loading) { |
| | | const response = await sysInfoAdd(row) |
| | | if (response.status === 200) { |
| | | try { |
| | | const response = await sysInfoAdd(row) |
| | | if (response.status === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æ°æ®æåï¼' |
| | | }) |
| | | done(row) |
| | | // this.$refs.crud.refreshTable() |
| | | // this.getDataList() |
| | | } |
| | | } catch { |
| | | loading() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ°å¢æ°æ®æåï¼' |
| | | }) |
| | | done() |
| | | this.$refs.crud.refreshTable() |
| | | this.getDataList() |
| | | } |
| | | }, |
| | | // ç¼è¾ |
| | | async handleEdit(row, index, done, loading) { |
| | | console.log(row) |
| | | const { oid, id, name, description } = row |
| | | const response = await sysInfoEdit({ oid, id, name, description }) |
| | | if (response.status === 200) { |
| | | try { |
| | | const { oid, id, name, description } = row |
| | | const response = await sysInfoEdit({ oid, id, name, description }) |
| | | if (response.status === 200) { |
| | | loading() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ä¿®æ¹æ°æ®æåï¼' |
| | | }) |
| | | done(row) |
| | | } |
| | | } catch { |
| | | loading() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'ä¿®æ¹æ°æ®æåï¼' |
| | | }) |
| | | done() |
| | | this.getDataList() |
| | | } |
| | | }, |
| | | // å é¤åæ¡ |
| | |
| | | <el-button-group> |
| | | <el-button type="primary" @click="businessAdd" size="small"> <i class="el-icon-plus"></i> æ°å¢</el-button> |
| | | <el-button type="primary" @click="businessEdit" size="small"><i class="el-icon-edit"></i> ä¿®æ¹</el-button> |
| | | <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i> ä»å·²æä¸è·å</el-button> |
| | | <el-button type="primary" @click="selectFromTable" size="small"><i class="el-icon-thumb"></i> |
| | | ä»å·²æä¸è·å</el-button> |
| | | </el-button-group> |
| | | </el-header> |
| | | <el-container> |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">åºæ¬ä¿¡æ¯</p> |
| | | <el-descriptions class="margin-top" :column="3" :size="size" border> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.key"></i> |
| | | è±æåç§° |
| | | </template> |
| | | {{ obj.id }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | 䏿åç§° |
| | |
| | | {{ obj.name }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label" :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label" :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <i :class="icons.tableName"></i> |
| | | æ°æ®åºè¡¨å |
| | | </template> |
| | | {{ obj.tableName }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.domain"></i> |
| | | æå±é¢å |
| | | </template> |
| | | <el-tag size="small"> |
| | | {{ obj.domainText }} |
| | | </el-tag> |
| | | <el-tag size="small"> |
| | | {{ obj.domainText }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <!-- <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | </template> |
| | | {{ obj.sss }} |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.revisionRule"></i> |
| | | çæ¬è§å |
| | | </template> |
| | | {{ obj.versionRule }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.lifeCycle"></i> |
| | | çå½å¨æ |
| | | </template> |
| | | {{ obj.lifeCycleId }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.view"></i> |
| | | è§å¾ |
| | | </template> |
| | | <el-tag size="small"> |
| | | <el-tag size="small"> |
| | | {{ obj.viewText }} |
| | | </el-tag> |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <!-- <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | </template> |
| | | {{ obj.implClass }} |
| | | </el-descriptions-item> --> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" :contentStyle="descriptionOption.contentStyle"> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | |
| | | <basic-container> |
| | | <p style="margin-top: 10px;font-weight: 570;font-size: 19px">屿§å表</p> |
| | | <avue-crud class="attributeCrud" v-model="obj" :data="obj.attributes" :option="loadOption"> |
| | | <template slot="attrDataTypeText" slot-scope="{row}" > |
| | | <el-tag>{{row.attrDataTypeText}}</el-tag> |
| | | </template> |
| | | <template slot="attrDataTypeText" slot-scope="{row}"> |
| | | <el-tag>{{ row.attrDataTypeText }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | |
| | | <div class="sep" style="height:7px"> |
| | | |
| | | </div> |
| | | <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" @selection-change="selectionChange"> |
| | | <avue-crud class="businessCrud" v-model="ref.form" :option="ref.option" :data="ref.data" |
| | | @selection-change="selectionChange"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialoghandelfalse">å æ¶</el-button> |
| | |
| | | </el-dialog> |
| | | </el-container> |
| | | </el-container> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" @refreshTable="initTreeOnLoad"> |
| | | </business-add> |
| | | <business-add ref="btmAdd" :btmType="addOption.btmType" :domainOption="domainOptions" :icons="icons" |
| | | @refreshTable="initTreeOnLoad"> |
| | | </business-add> |
| | | </el-container> |
| | | </template> |
| | | <script> |
| | |
| | | children: 'childList', |
| | | } |
| | | }, |
| | | addOption:{ |
| | | btmType:{}, |
| | | addOption: { |
| | | btmType: {}, |
| | | }, |
| | | loadOption: { |
| | | border: true, |
| | |
| | | addBtn: false, |
| | | menu: false, |
| | | highlightCurrentRow: true, |
| | | refreshBtn:false, |
| | | columnBtn:false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | column: [ |
| | | { |
| | | label: 'è±æåç§°', |
| | |
| | | ] |
| | | }, |
| | | descriptionOption: { |
| | | labelStyle:'text-align:center;width:120px', |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | domain: null, |
| | | domainOptions: [], |
| | | icons:{ |
| | | icons: { |
| | | key: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | tableName: 'el-icon-date', |
| | |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | if (data.oid) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | | }) |
| | | }else{ |
| | | this.$message.warning('请ç¹å»åèç¹'); |
| | | } |
| | | }, |
| | | // åºæ¬ä¿¡æ¯æ·»å |
| | | basicSave(row, done, loading) { |
| | |
| | | this.initTreeOnLoad(); |
| | | }) |
| | | }, |
| | | businessAdd(){ |
| | | businessAdd() { |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | businessEdit(){ |
| | | businessEdit() { |
| | | var json = JSON.stringify(this.obj); |
| | | this.$refs.btmAdd.btmType = JSON.parse(json); |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | ifRefreshBtmAddRefresh(){ |
| | | ifRefreshBtmAddRefresh() { |
| | | // this.$refs.btmAdd.refreshAttrTable(); |
| | | } |
| | | }, |
| | |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | .businessCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | .businessCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .attributeCrud > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu{ |
| | | display: none !important; |
| | | |
| | | .attributeCrud>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .businessTreeContainer > .el-card > .el-card__body { |
| | | |
| | | .businessTreeContainer>.el-card>.el-card__body { |
| | | height: 775px; |
| | | } |
| | | </style> |
| | | }</style> |
| | |
| | | this.addOption.linkType = JSON.parse(json); |
| | | this.$refs.linkAdd.linkType = this.addOption.linkType; |
| | | this.$refs.linkAdd.showSubmitDialog = true; |
| | | console.log(this.obj); |
| | | }, |
| | | // ä»å·²æä¸è·åæé®ç¹å»äºä»¶ |
| | | selectFromTable() { |
| | |
| | | searchMenuSpan:5, |
| | | highlightCurrentRow: true, |
| | | stripe:true, |
| | | viewBtn:false, |
| | | columnBtn:false, |
| | | column:[ |
| | | { |
| | | label: '', |
| | | label: 'éæ©', |
| | | prop: 'radio', |
| | | width: 120 |
| | | width: 120, |
| | | display:false |
| | | }, |
| | | { |
| | | label:'è±æåç§°', |
| | | prop: 'id' |
| | | prop: 'id', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è±æåç§°ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label:"䏿åç§°", |
| | | prop:"name", |
| | | search:true, |
| | | required: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '䏿åç§°ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label:"è·³è·å符", |
| | |
| | | }, |
| | | { |
| | | label: "åå§å¼", |
| | | prop:"startCode" |
| | | prop:"startCode", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'åå§å¼ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "æ¥é¿", |
| | | prop: "serialStep" |
| | | prop: "serialStep", |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'æ¥é¿ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | |
| | | }) |
| | | }, |
| | | searchChange(params, done) { |
| | | if (done) done(); |
| | | this.params = params; |
| | | this.page.currentPage = 1; |
| | | this.getList(); |
| | | this.$message.success('æç´¢æå') |
| | | var p = {"name_like" : params.name} |
| | | getPage(this.page.currentPage,this.page.pageSize,p).then(res => { |
| | | const data = res.data.data |
| | | this.loading = false; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | }); |
| | | if (done) { |
| | | done(); |
| | | } |
| | | }, |
| | | refreshChange() { |
| | | this.getList(); |
| | |
| | | <el-radio v-model="selectRow" :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | <template slot="menu"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave">ç¼è¾</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave">å é¤</el-button> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)">ç¼è¾</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave(row,index)">å é¤</el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">æ° å¢ |
| | | </el-button> |
| | | <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | <el-input placeholder="æå±æ§è±æåç§°æ¥è¯¢" v-model="searchId" clearable prefix-icon="el-icon-search" class="attrSearch" |
| | | size="small" @change="doSearch" type="text"></el-input> |
| | | <el-button size="small" plain type="primary" icon="el-icon-search" @click="doSearch"> æç´¢</el-button> |
| | | </template> |
| | | <template slot="typeValue" slot-scope="{row}"> |
| | | <el-tag>{{ row.typeValue }}</el-tag> |
| | |
| | | </el-tabs> |
| | | </basic-container> |
| | | </el-aside> |
| | | <originalAdd ref="originalAdd" :attribute="attribute" @refreshTable="refreshChange"></originalAdd> |
| | | <originalAdd ref="originalAdd" @refreshTable="refreshChange"></originalAdd> |
| | | </el-container> |
| | | </template> |
| | | |
| | |
| | | attribute: { |
| | | nullable: true |
| | | }, |
| | | editAttibute: {}, |
| | | applyRangeData: [], |
| | | option: { |
| | | height: "550px", |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | columnBtn:false, |
| | | column: [{ |
| | | label: "éæ©", |
| | | prop: "radio", |
| | |
| | | itemData: {}, |
| | | activeName: "referTab", |
| | | form: {} |
| | | } |
| | | }, |
| | | searchId: '', |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.$refs.originalAdd.attribute = {}; |
| | | }, |
| | | updateSave() { |
| | | updateSave(row,index) { |
| | | this.selectRow = index; |
| | | var json = JSON.stringify(row); |
| | | this.editAttibute = JSON.parse(json); |
| | | this.editAttibute.nullable = row.nullable == 'true' ? true : false; |
| | | this.$refs.originalAdd.attribute = this.editAttibute; |
| | | this.$refs.originalAdd.showSubmitDialog = true; |
| | | this.$refs.originalAdd.attribute = this.attribute; |
| | | this.refreshChange() |
| | | }, |
| | | deleteSave() { |
| | | remove(this.itemForm.itemData).then(res => { |
| | | deleteSave(row,index) { |
| | | console.log(row); |
| | | remove(row.oid).then(res => { |
| | | this.$message.success("å 餿å"); |
| | | }); |
| | | this.refreshChange(); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | |
| | | |
| | | }); |
| | | }, |
| | | doSearch(){ |
| | | var params = {"id_like":this.searchId}; |
| | | this.onLoad(this.page,params); |
| | | } |
| | | }, |
| | | components: { Versionpackage } |
| | | } |
| | |
| | | .applyRangeTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | .attrSearch { |
| | | width:201px; |
| | | } |
| | | .attrSearch > .el-input__inner { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | |
| | | <el-switch v-model="attribute.nullable" active-text="å
许" inactive-text="ä¸å
许"></el-switch> |
| | | </el-form-item> |
| | | <el-form-item label="é¿åº¦" label-width="100px" prop="maxLength"> |
| | | <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" controls-position="right"></el-input-number> |
| | | <el-input-number v-model="attribute.maxLength" :min="1" :max="4000" :step="1" |
| | | controls-position="right"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="精度" label-width="100px" v-if="attribute.typeValue == 'VTDouble'"> |
| | | <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" @change="changeNumber"></el-input-number> |
| | | <el-form-item label="精度" label-width="100px" v-if="attribute.typeKey == 'VTDouble'"> |
| | | <el-input-number v-model="attribute.precision" :min="1" :max="20" :step="1" controls-position="right" |
| | | @change="changeNumber"></el-input-number> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" label-width="100px"> |
| | | <el-input v-model="attribute.description" type="text"></el-input> |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä¸¾é¡¹" label-width="100px"> |
| | | |
| | | |
| | | </el-form-item> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> |
| | | <span class="el-dialog__title"> {{ domain.treeOption.title }} </span> |
| | | <div style="height:20px;"></div> |
| | | <avue-tree id="domain" :data="domain.data" :option="domain.treeOption" @node-click="nodeClick" |
| | | class="businessTree" style="height: 418px"> |
| | |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" @row-click="btmReferClick"> |
| | | <avue-crud ref="btmTable" :option="btmRefer.option" :data="btmRefer.data" class="btmTable" |
| | | @row-click="btmReferClick"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="btmRefer.selectRow" :label="row.$index"> |
| | | </el-radio> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- éæ©æä¸¾æ¶çå¼¹çª --> |
| | | <el-dialog title="æä¸¾å表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" |
| | | <el-dialog title="æä¸¾å表" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" |
| | | style="height: 115vh;"> |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> |
| | | <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" |
| | | @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> |
| | | <template slot="radio" slot-scope="{row}"> |
| | | <el-radio v-model="enumRefer.selectRow" :label="row.$index"> |
| | | </el-radio> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDictionary,getParentList } from '@/api/omd/enum' |
| | | import { initTree,btmPage } from '@/api/omd/btmType' |
| | | import { add} from '@/api/omd/OmdAttribute' |
| | | import { getDictionary, getParentList } from '@/api/omd/enum' |
| | | import { initTree, btmPage } from '@/api/omd/btmType' |
| | | import { add } from '@/api/omd/OmdAttribute' |
| | | export default { |
| | | name: 'originalAdd', |
| | | props: { |
| | |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | }, |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | search: true, |
| | | }] |
| | | label: '', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | }, |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | align: 'center', |
| | | searchSpan: 8, |
| | | search: true, |
| | | }, { |
| | | label: '䏿åç§°', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan: 8, |
| | | search: true, |
| | | }] |
| | | }, |
| | | // åç
§é¡µé¢è¡¨æ ¼æ°æ® |
| | | data: [], |
| | |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | },{ |
| | | }, { |
| | | label: 'æä¸¾ä»£å·', |
| | | prop: 'name', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | searchSpan: 8, |
| | | search: true, |
| | | }, { |
| | | label: 'æä¸¾åç§°', |
| | | prop: 'label', |
| | | align: 'center', |
| | | searchSpan:8, |
| | | searchSpan: 8, |
| | | search: true, |
| | | }] |
| | | }, |
| | |
| | | this.referToFlag = true; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | submitAttribute() { |
| | | add(this.attribute).then(res => { |
| | | this.$message.success("ä¿åæå"); |
| | | this.showSubmitDialog = false; |
| | | this.attribute = {}; |
| | | this.$emit('refreshTable'); |
| | | }); |
| | | |
| | | submitAttribute() { |
| | | const that = this; |
| | | this.$refs.form.validate(function (pass, field) { |
| | | if (pass) { |
| | | add(that.attribute).then(res => { |
| | | that.$message.success("ä¿åæå"); |
| | | that.showSubmitDialog = false; |
| | | that.attribute = {}; |
| | | that.$emit('refreshTable'); |
| | | }); |
| | | } else { |
| | | that.$message.error('å¿
å¡«'); |
| | | } |
| | | }) |
| | | }, |
| | | cancleSubmit() { |
| | | this.closeSubmitDialog(); |
| | | }, |
| | | closeEnumDialog() { |
| | | this.cancleEnum(); |
| | | }, |
| | | closeReferDialog() { |
| | | }, |
| | | closeReferDialog() { |
| | | this.cancleBtm(); |
| | | }, |
| | | confirmBtm() { |
| | | confirmBtm() { |
| | | this.attribute.referToId = this.btmRefer.selectItem.oid; |
| | | this.attribute.referToName = this.btmRefer.selectItem.name; |
| | | this.btmRefer.show = false; |
| | | }, |
| | | cancleBtm() { |
| | | cancleBtm() { |
| | | this.btmRefer.selectItem = {}; |
| | | this.btmRefer.show = false; |
| | | this.btmRefer.selectRow = ''; |
| | |
| | | this.attribute.dictCode = this.enumRefer.selectItem.name; |
| | | this.attribute.dictValue = this.enumRefer.selectItem.label; |
| | | this.enumRefer.show = false; |
| | | }, |
| | | cancleEnum() { |
| | | }, |
| | | cancleEnum() { |
| | | this.enumRefer.selectItem = {}; |
| | | this.enumRefer.show = false; |
| | | this.enumRefer.selectRow = ''; |
| | |
| | | // åç
§ç±»åæ çç¹å»äºä»¶ |
| | | nodeClick(data) { |
| | | // åºåä¸å¡ç±»åçæ¥è¯¢å龿¥ç±»åçæ¥è¯¢ |
| | | if(this.attribute.referTypeKey == 'btmType'){ |
| | | btmPage(this.btmRefer.btmPage.currentPage,this.btmRefer.btmPage.pageSize,{domain:data.id}).then(res => { |
| | | if (this.attribute.referTypeKey == 'btmType') { |
| | | btmPage(this.btmRefer.btmPage.currentPage, this.btmRefer.btmPage.pageSize, { domain: data.id }).then(res => { |
| | | this.btmRefer.data = res.data.data.records; |
| | | this.btmRefer.btmPage.total = res.data.data.total; |
| | | }) |
| | | } |
| | | if(this.attribute.referTypeKey == 'linkType'){ |
| | | if (this.attribute.referTypeKey == 'linkType') { |
| | | |
| | | } |
| | | }, |
| | | // æä¸¾ç±»åè¾å
¥æ¡è·å¾ç¦ç¹æ¶çäºä»¶ |
| | | openEnumConfig() { |
| | | getParentList(this.enumRefer.enumPage.currentPage,this.enumRefer.enumPage.pageSize).then(res => { |
| | | getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => { |
| | | this.enumRefer.enumPage.total = res.data.data.total; |
| | | this.enumRefer.data = res.data.data.records; |
| | | }) |
| | |
| | | // 屿§ç±»å䏿æ¡éæ©äºä»¶ |
| | | typeSelectChange(value) { |
| | | if (value == 'VTString') { |
| | | this.$set(this.attribute,"maxLength",150) |
| | | this.$set(this.attribute, "maxLength", 150) |
| | | } else if (value == 'VTInteger') { |
| | | this.$set(this.attribute,"maxLength",50) |
| | | this.$set(this.attribute, "maxLength", 50) |
| | | } else if (value == 'VTBoolean') { |
| | | this.$set(this.attribute,"maxLength",5) |
| | | this.$set(this.attribute, "maxLength", 5) |
| | | } else if (value == 'VTDouble') { |
| | | this.$set(this.attribute,"maxLength",26) |
| | | this.$set(this.attribute,"precision",8) |
| | | this.$set(this.attribute, "maxLength", 26) |
| | | this.$set(this.attribute, "precision", 8) |
| | | } else if (value == 'VTLong') { |
| | | this.$set(this.attribute,"maxLength",150) |
| | | this.$set(this.attribute, "maxLength", 150) |
| | | } else if (value == 'VTDate' || value == 'VTTime' || value == 'VTDateTime') { |
| | | this.$set(this.attribute,"maxLength",6) |
| | | this.$set(this.attribute, "maxLength", 6) |
| | | } else { |
| | | this.$set(this.attribute,"maxLength",50) |
| | | this.$set(this.attribute, "maxLength", 50) |
| | | } |
| | | this.attribute.typeCode = 'attributeType'; |
| | | this.attribute.typeKey = value; |
| | |
| | | this.$message.error('屿§ç±»å没æ¾å°æè
æªå®ä¹') |
| | | }) |
| | | }, |
| | | initAttributeReferTypeList(){ |
| | | initAttributeReferTypeList() { |
| | | getDictionary({ code: 'attributeReferType' }).then(res => { |
| | | res.data.data.forEach(element => { |
| | | this.btmRefer.referTypeList.push( |
| | |
| | | this.$message.error('åç
§ç±»å没æ¾å°æè
æªå®ä¹') |
| | | }) |
| | | }, |
| | | btmReferClick(row){ |
| | | btmReferClick(row) { |
| | | this.btmRefer.selectItem = row; |
| | | this.btmRefer.selectRow = row.$index; |
| | | }, |
| | | enumReferClick(row){ |
| | | enumReferClick(row) { |
| | | this.enumRefer.selectItem = row; |
| | | this.enumRefer.selectRow = row.$index; |
| | | }, |
| | | // åç
§åç§°ç¹å»æ¸
餿°æ® |
| | | clearReferTo(){ |
| | | this.$delete(this.attribute,'referToId'); |
| | | this.$delete(this.attribute,'referToName'); |
| | | clearReferTo() { |
| | | this.$delete(this.attribute, 'referToId'); |
| | | this.$delete(this.attribute, 'referToName'); |
| | | this.btmRefer.selectItem = {}; |
| | | this.btmRefer.selectRow = ''; |
| | | }, |
| | | handleClick(tab){ |
| | | // å 为åªè½åç
§åæä¸¾äºéä¸ãæä»¥å¨åæ¢çæ¶åæå±æ§ç»æ¸
空ã |
| | | this.$delete(this.attribute,'referTypeCode'); |
| | | this.$delete(this.attribute,'referTypeKey'); |
| | | this.$delete(this.attribute,'referTypeValue'); |
| | | this.$delete(this.attribute,'referToId'); |
| | | this.$delete(this.attribute,'referToName'); |
| | | this.$delete(this.attribute,'dictCode'); |
| | | this.$delete(this.attribute,'dictKey'); |
| | | this.$delete(this.attribute,'dictValue'); |
| | | this.$delete(this.attribute,'usingDict'); |
| | | } |
| | | // handleClick(tab){ |
| | | // // å 为åªè½åç
§åæä¸¾äºéä¸ãæä»¥å¨åæ¢çæ¶åæå±æ§ç»æ¸
空ã |
| | | // this.$delete(this.attribute,'referTypeCode'); |
| | | // this.$delete(this.attribute,'referTypeKey'); |
| | | // this.$delete(this.attribute,'referTypeValue'); |
| | | // this.$delete(this.attribute,'referToId'); |
| | | // this.$delete(this.attribute,'referToName'); |
| | | // this.$delete(this.attribute,'dictCode'); |
| | | // this.$delete(this.attribute,'dictKey'); |
| | | // this.$delete(this.attribute,'dictValue'); |
| | | // this.$delete(this.attribute,'usingDict'); |
| | | // } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | width: 200px; |
| | | } |
| | | |
| | | .attributeForm>.el-form-item>.el-form-item__content> .el-select>.el-input>.el-input__inner { |
| | | .attributeForm>.el-form-item>.el-form-item__content>.el-select>.el-input>.el-input__inner { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | | }</style> |
| | |
| | | @row-del="rowDel" |
| | | @refresh-change="refreshChange" |
| | | @search-reset="searchChange" |
| | | @search-change="searchChange"> |
| | | @search-change="searchChange" |
| | | @row-click="rowClick"> |
| | | <template slot="menuLeft"> |
| | | <el-tooltip class="item" effect="dark" content="æ¥æ¾ç¶ææ± 使ç¨èå´" placement="top"> |
| | | <el-tooltip class="item" effect="dark" content="æ¥æ¾ç¶æä½¿ç¨èå´" placement="top"> |
| | | <el-button size="small" |
| | | plain |
| | | type="primary" |
| | | icon="el-icon-zoom-in" |
| | | @click="handleSearch">æ¥ç使ç¨èå´ |
| | | @click="applyRangeSearch">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template>> |
| | | </template> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="selectRow" |
| | | :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog title="æ¥ç使ç¨èå´" |
| | | append-to-body |
| | | :visible.sync="packageSearchBox" |
| | | width="1200px"> |
| | | <versionpackage></versionpackage> |
| | | </el-dialog> |
| | | <versionpackage :rangeData="applyRangeData" ref="applyRange"></versionpackage> |
| | | </basic-container> |
| | | |
| | | |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import { getPage,add,update,remove } from '../../api/omd/status'; |
| | | import { getPage,add,update,remove,getApplyRange } from '../../api/omd/status'; |
| | | export default { |
| | | name: "status", |
| | | data(){ |
| | | return { |
| | | //æ¥ç使ç¨èå´ |
| | | packageSearchBox:false, |
| | | // ç¹å»æ°æ® |
| | | selectRow: '', |
| | | selectRowData: {}, |
| | | //åé¡µæ°æ® |
| | | page: { |
| | | pageSize: 10, |
| | |
| | | border: true, |
| | | index: true, |
| | | searchMenuSpan:5, |
| | | highlightCurrentRow: true, |
| | | stripe:true, |
| | | column:[ |
| | | { |
| | | label: 'éæ©', |
| | | prop: 'radio', |
| | | width: 120, |
| | | display: false |
| | | }, |
| | | { |
| | | label:'è±æåç§°', |
| | | prop: 'id', |
| | | search: true |
| | | search: true, |
| | | rules: [{ |
| | | required: true, |
| | | message: 'è±æåç§°ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | { |
| | | label:'䏿åç§°', |
| | | prop:'name', |
| | | search:true, |
| | | rules: [{ |
| | | required: true, |
| | | message: '䏿åç§°ä¸è½ä¸ºç©º', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | |
| | | type:'textarea' |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | applyRangeData: [] |
| | | } |
| | | }, |
| | | methods:{ |
| | | handleSearch(){ |
| | | // this.packageSearchBox=true |
| | | rowClick(row){ |
| | | this.selectRow = row.$index; |
| | | this.selectRowData = row; |
| | | }, |
| | | applyRangeSearch(){ |
| | | if (!this.selectRow && this.selectRow != 0){ |
| | | console.log(this.selectRow); |
| | | this.$message({ |
| | | type:"warning", |
| | | message: "请å
鿩屿§" |
| | | }) |
| | | } |
| | | getApplyRange(this.selectRowData.id).then(res => { |
| | | this.applyRangeData = res.data.data; |
| | | this.$refs.applyRange.rangeData = this.applyRangeData; |
| | | this.$refs.applyRange.showDialog = true; |
| | | }) |
| | | }, |
| | | getList() { |
| | | this.loading = true; |
| | |
| | | }) |
| | | }, |
| | | searchChange(params, done) { |
| | | if (done) done(); |
| | | this.params = params; |
| | | this.loading = true; |
| | | this.page.currentPage = 1; |
| | | this.getList(); |
| | | const p = {}; |
| | | if(params.id){ |
| | | p["id_like"] = params.id; |
| | | } |
| | | if(params.name){ |
| | | p["name_like"] = params.name |
| | | } |
| | | getPage(this.page.currentPage,this.page.pageSize,p).then(res => { |
| | | const data = res.data.data |
| | | this.loading = false; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | done(); |
| | | }) |
| | | this.$message.success('æç´¢æå') |
| | | }, |
| | | refreshChange() { |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | </style> |
| | | |
| | |
| | | <el-tag>{{ row.expireTime ? row.expireTime : 'ä¸éå¶' }}</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | |
| | | <el-dialog title="ç§æ·æ°æ®æºé
ç½®" |
| | | append-to-body |
| | | :visible.sync="datasourceBox" |
| | |
| | | </avue-crud> |
| | | </div> |
| | | <el-dialog :visible.sync="roleBox" |
| | | append-to-body |
| | | title="ç¨æ·è§è²é
ç½®" |
| | | width="345px"> |
| | | |
| | | append-to-body |
| | | title="ç¨æ·è§è²é
ç½®" |
| | | width="345px"> |
| | | <el-tree ref="treeRole" |
| | | :data="roleGrantList" |
| | | :default-checked-keys="roleTreeObj" |
| | | :props="props" |
| | | check-strictly |
| | | default-expand-all |
| | | node-key="id" |
| | | show-checkbox> |
| | | :data="roleGrantList" |
| | | :default-checked-keys="roleTreeObj" |
| | | :props="props" |
| | | check-strictly |
| | | default-expand-all |
| | | node-key="id" |
| | | show-checkbox> |
| | | </el-tree> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | //è¦ä¼ éçidï¼ä¸ä¸ªæ¯æ°ç»å¦ä¸ä¸ªæ¯å符串 |
| | | this.UserPwdstrategyVO.userIds=this.selid; |
| | | this.UserPwdstrategyVO.pwdstrategyId=this.id |
| | | console.log("1",this.UserPwdstrategyVO) |
| | | console.log("2",this.UserPwdstrategyVO.userIds) |
| | | |
| | | //è¯·æ± |
| | | insert(this.UserPwdstrategyVO.userIds).then(()=>{ |
| | | this.passVisible=false |
| | |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://localhost:37000', |
| | | // target: 'http://192.168.1.51:37000', |
| | | // target: 'http://192.168.1.46:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | | // target: 'http://localhost:37000', |
| | | target: 'http://192.168.1.104:37000', |
| | | // target: 'http://192.168.1.63:37000', |
| | | //target: 'http://192.168.3.7:37000', |
| | | target: 'http://dev.vci-tech.com:37000', |
| | |
| | | * ç¨æ·è¯¦æ
|
| | | */ |
| | | private final Kv detail; |
| | | |
| | | /** |
| | | * ç¨æ·å¯çº§ |
| | | */ |
| | | private String secretGrade; |
| | | |
| | | /** |
| | | * å¯ç çç¥ä¿®æ¹ç¶æ |
| | | */ |
| | | private Long strategyUpdateStatus; |
| | | |
| | | |
| | | public BladeUserDetails(Long userId, String tenantId, String oauthId, String name, String realName, String deptId, String postId, String roleId, String roleName, String avatar, String username, String password, Kv detail, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities,Long strategyUpdateStatus) { |
| | | public BladeUserDetails(Long userId, String tenantId, String oauthId, String name, String realName, String deptId, String postId, String roleId, String roleName, String avatar, String username, String password, Kv detail,String secretGrade, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities,Long strategyUpdateStatus) { |
| | | super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); |
| | | this.userId = userId; |
| | | this.tenantId = tenantId; |
| | |
| | | this.roleName = roleName; |
| | | this.avatar = avatar; |
| | | this.detail = detail; |
| | | this.secretGrade = secretGrade; |
| | | this.strategyUpdateStatus = strategyUpdateStatus; |
| | | } |
| | | |
| | |
| | | //å¡«å
ç¨æ·ä¿¡æ¯å°ç¨æ·ä¿¡æ¯æ©å±ç±» |
| | | BladeUserDetails bladeUserDetails = new BladeUserDetails(user.getId(), |
| | | user.getTenantId(), StringPool.EMPTY, user.getName(), user.getRealName(), user.getDeptId(), user.getPostId(), user.getRoleId(), Func.join(userInfo.getRoles()), Func.toStr(user.getAvatar(), TokenUtil.DEFAULT_AVATAR), |
| | | username, AuthConstant.ENCRYPT + user.getPassword(), userInfo.getDetail(), true, true, true, true, |
| | | username, AuthConstant.ENCRYPT + user.getPassword(), userInfo.getDetail(),user.getSecretGrade(), true, true, true, true, |
| | | AuthorityUtils.commaSeparatedStringToAuthorityList(Func.join(result.getData().getRoles())),user.getStrategyUpdateStatus()); |
| | | return bladeUserDetails; |
| | | } else { |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.jwt.JwtUtil; |
| | | import org.springblade.core.jwt.props.JwtProperties; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; |
| | | import org.springframework.security.oauth2.common.OAuth2AccessToken; |
| | |
| | | @Override |
| | | public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { |
| | | BladeUserDetails principal = (BladeUserDetails) authentication.getUserAuthentication().getPrincipal(); |
| | | |
| | | //tokenåæ°å¢å¼º |
| | | Map<String, Object> info = new HashMap<>(16); |
| | | info.put(TokenUtil.CLIENT_ID, TokenUtil.getClientIdFromHeader()); |
| | |
| | | * nacos dev å°å |
| | | */ |
| | | //String NACOS_DEV_ADDR = "dev.vci-tech.com:38848"; |
| | | String NACOS_DEV_ADDR = "127.0.0.1:8848"; |
| | | String NACOS_DEV_ADDR = "localhost:8848"; |
| | | |
| | | /** |
| | | * nacos prod å°å |
| | |
| | | <version>${bladex.project.version}</version> |
| | | <packaging>jar</packaging> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-util-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-user-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | | </project> |
| | |
| | | <groupId>org.springblade</groupId> |
| | | <artifactId>blade-starter-tenant</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-util-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.bo; |
| | | |
| | | import com.vci.ubcs.resource.vo.FileObjectVO; |
| | | import lombok.Data; |
| | | |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * æä»¶çä¸å¡å¯¹è±¡ |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | @Data |
| | | public class FileObjectBO extends FileObjectVO { |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = -4887973911424096779L; |
| | | /** |
| | | * æä»¶çæµ |
| | | */ |
| | | private InputStream inputStream; |
| | | |
| | | /** |
| | | * æä»¶æ¬å°çä¿¡æ¯ |
| | | */ |
| | | private String fileLocalPath; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.constant; |
| | | |
| | | /** |
| | | * æä»¶æå¡é¨åçéæå¼ |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | public class FileBusConstant { |
| | | |
| | | /** |
| | | * æä»¶å¯¹è±¡ |
| | | */ |
| | | public static final String FILE_OBJECT = "fileObject"; |
| | | |
| | | /** |
| | | * æä»¶ä¸è½½è®°å½ |
| | | */ |
| | | public static final String FILE_DOWNLOAD_RECORD = "fileDownloadRecord"; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.constant; |
| | | |
| | | /** |
| | | * æä»¶ç¶æ |
| | | * @author weidy |
| | | * @date 2023/6/9 9:07 |
| | | */ |
| | | public class FileLifeConstant { |
| | | |
| | | /** |
| | | * æä»¶çç¶æ |
| | | */ |
| | | public static final String FILE = "fileStatus"; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.dto; |
| | | |
| | | import com.vci.ubcs.resource.entity.FileObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseModelVO; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æä»¶æ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | @Data |
| | | public class FileObjectDTO extends FileObject { |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = 497836915363113260L; |
| | | |
| | | |
| | | /** |
| | | * æ¯å¦ä¿®æ¹æä»¶ |
| | | */ |
| | | private Boolean updateFileFlag ; |
| | | |
| | | |
| | | /** |
| | | * æä»¶å¤¹è·¯å¾ |
| | | */ |
| | | private String dirPath; |
| | | |
| | | |
| | | /** |
| | | * æä»¶ä¸ä¼ 忝å¦ç«å³çæ |
| | | */ |
| | | private Boolean effect = true; |
| | | |
| | | /** |
| | | * ä¸ä¼ åæä»¶è·¯å¾ |
| | | */ |
| | | private String sourceFilePath; |
| | | |
| | | /** |
| | | * æ ¡éªç¸åçåç§°çæä»¶ï¼å¿
é¡»å¨ownbizæå¼çæ
åµä¸ |
| | | */ |
| | | private Boolean checkSameFile = false; |
| | | |
| | | /** |
| | | * æ¡¶çåç§° |
| | | */ |
| | | private String bucketName; |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä»¶åå¸çæ°æ®æä½å¯¹è±¡ |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | @Data |
| | | public class FileReleaseDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = -218379391237684940L; |
| | | /** |
| | | * æå±æ°æ®ä¸»é® |
| | | */ |
| | | private String ownbizOid; |
| | | |
| | | /** |
| | | * æå±æ°æ®çä¸å¡ç±»å |
| | | */ |
| | | private String ownBtmName; |
| | | |
| | | /** |
| | | * æä»¶çä¸»é® |
| | | */ |
| | | private List<String> oids; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä»¶åäº«çæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | @Data |
| | | public class FileShareDTO implements java.io.Serializable{ |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = -2947163604655993790L; |
| | | /** |
| | | * æ¥æºä¸å¡ |
| | | */ |
| | | private String sourceBus; |
| | | /** |
| | | * æ¥æºä¸å¡æ°æ®ä¸»é® |
| | | */ |
| | | private String sourceBusOid; |
| | | /** |
| | | * ç®æ çä¸å¡ |
| | | */ |
| | | private String targetBus; |
| | | /** |
| | | * ç®æ çä¸å¡æ°æ®ä¸»é® |
| | | */ |
| | | private String targetBusOid; |
| | | /** |
| | | * æºæä»¶çä¸»é® |
| | | */ |
| | | private List<String> oids; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * æä»¶å¯¹è±¡ |
| | | * @author weidy |
| | | * @date 2023/6/8 |
| | | */ |
| | | @Data |
| | | @TableName("PL_SYS_FILEOBJECT") |
| | | @ApiModel(value = "æä»¶å¯¹è±¡", description = "åå¨ä¸å¡æ°æ®å
³èçæä»¶ä¿¡æ¯") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class FileObject extends BaseModel { |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = -7116754635114431150L; |
| | | |
| | | /** |
| | | * æ¾ç¤ºçåç§° |
| | | */ |
| | | private String id; |
| | | /** |
| | | * æä»¶åç§° |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * å¨minioéçåç§° |
| | | */ |
| | | private String objectName; |
| | | |
| | | /** |
| | | * æä»¶åç¼å |
| | | */ |
| | | private String fileExtension; |
| | | |
| | | /** |
| | | * ææ¡£ç±»åç¼å· |
| | | */ |
| | | private String fileDocClassify; |
| | | |
| | | /** |
| | | * ææ¡£ç±»åææ¬ |
| | | */ |
| | | private String fileDocClassifyName; |
| | | |
| | | /** |
| | | * æä»¶å¤§å° |
| | | */ |
| | | private Long fileSize; |
| | | |
| | | /** |
| | | * å
³é®è¯ä¿¡æ¯ |
| | | */ |
| | | private String keyInfos; |
| | | |
| | | /** |
| | | * æå±æ°æ®ä¸»é® |
| | | */ |
| | | private String ownbizOid; |
| | | |
| | | /** |
| | | * æå±æ°æ®çä¸å¡ç±»å |
| | | */ |
| | | private String ownBtmName; |
| | | |
| | | /** |
| | | * å
³èçæ°æ®çä¿¡æ¯ |
| | | */ |
| | | private String linkInfos; |
| | | |
| | | /** |
| | | * æä»¶çåå¨è·¯å¾ |
| | | */ |
| | | private String fileLink; |
| | | |
| | | /** |
| | | * æ¡¶çåç§° |
| | | */ |
| | | private String bucketName; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.life; |
| | | import com.vci.ubcs.starter.web.enumpck.BaseEnum; |
| | | |
| | | /** |
| | | * æä»¶çç¶æéå |
| | | * @author weidy |
| | | * @date 2023/6/11 |
| | | */ |
| | | public enum FileLife implements BaseEnum { |
| | | /** |
| | | * åå§å |
| | | */ |
| | | INIT("fileInit","åå§å"), |
| | | |
| | | /** |
| | | * ä¸ä¼ ä¸ |
| | | */ |
| | | TRANSITING("fileTransiting","ä¸ä¼ ä¸"), |
| | | |
| | | /** |
| | | * ä¸ä¼ 宿 |
| | | */ |
| | | TRANS_FINISH("fileTransitFinish","ä¸ä¼ 宿"), |
| | | |
| | | /** |
| | | * å·²çæ |
| | | */ |
| | | FILE_RELEASE("fileRelease","å·²çæ"); |
| | | |
| | | /** |
| | | * æä¸¾å¼ |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºå¼ |
| | | */ |
| | | private String text; |
| | | /** |
| | | * è·åæä¸¾å¼ |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | @Override |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 设置æä¸¾å¼ |
| | | * @param value æä¸¾å¼ |
| | | */ |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¾ç¤ºææ¬ |
| | | * @return æ¾ç¤ºææ¬ |
| | | */ |
| | | @Override |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¾ç¤ºææ¬ |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æä¸¾å
é¨æé æ¹æ³ |
| | | * @param value æä¸¾å¼ |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | private FileLife(String value, String text){ |
| | | this.value = value; |
| | | this.text = text; |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.query; |
| | | |
| | | |
| | | import com.vci.ubcs.resource.entity.FileObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * æä»¶çæ¥è¯¢ |
| | | * @author weidy |
| | | * @date 2023/1/31 |
| | | */ |
| | | @Data |
| | | public class FileQuery extends FileObject { |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = 2442917107957942183L; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | private Date createTime_begin; |
| | | |
| | | /** |
| | | * å建æ¶é´ç»æ |
| | | */ |
| | | private Date createTime_end; |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.utils; |
| | | |
| | | import com.vci.ubcs.resource.bo.FileObjectBO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.MediaTypeFactory; |
| | | |
| | | import javax.servlet.http.Cookie; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.net.URLEncoder; |
| | | |
| | | /** |
| | | * ä¸è½½æä»¶çå·¥å
· |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | @Slf4j |
| | | public class FileDownloadUtil { |
| | | |
| | | /** |
| | | * ä¸è½½æä»¶ |
| | | * @param response ååºå¯¹è±¡ |
| | | * @param fileObjectBO æä»¶çä¿¡æ¯ï¼å
嫿件çè¾å
¥æµ |
| | | * @throws IOException ä¸è½½å¼å¸¸ä¼æåº |
| | | */ |
| | | public static void downloadFile(HttpServletResponse response, FileObjectBO fileObjectBO) throws IOException { |
| | | downloadFile(response,fileObjectBO,true); |
| | | } |
| | | |
| | | /** |
| | | * ä¸è½½æä»¶ |
| | | * @param response ååºå¯¹è±¡ |
| | | * @param fileObjectBO æä»¶çä¿¡æ¯ï¼å
嫿件çè¾å
¥æµ |
| | | * @param closeInputStream æ¯å¦å
³éæµ |
| | | * @throws IOException ä¸è½½åºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | public static void downloadFile(HttpServletResponse response, FileObjectBO fileObjectBO,boolean closeInputStream) throws IOException { |
| | | MediaType mediaType = MediaTypeFactory.getMediaType(fileObjectBO.getName() + "." + fileObjectBO.getFileExtension()).orElse(MediaType.APPLICATION_OCTET_STREAM); |
| | | // 设置强å¶ä¸è½½ä¸æå¼ |
| | | response.setContentType(mediaType.getType()); |
| | | try{ |
| | | String fileName = URLEncoder.encode(fileObjectBO.getName() + "." + fileObjectBO.getFileExtension(), "UTF8"); |
| | | response.addHeader("Content-Disposition", "attachment; filename="+ fileName+ ";filename*=utf-8''" + fileName); |
| | | }catch(Exception e){ |
| | | if(log.isErrorEnabled()){ |
| | | log.error("设置æä»¶çåç§°å°ååºæµçæ¶ååºé",e); |
| | | } |
| | | } |
| | | response.setCharacterEncoding("UTF-8"); |
| | | Cookie cookie = new Cookie("fileDownload", "true"); |
| | | cookie.setPath("/"); |
| | | response.addCookie(cookie); |
| | | if(closeInputStream) { |
| | | try (InputStream ins = (fileObjectBO.getInputStream() != null ? fileObjectBO.getInputStream() : new FileInputStream(fileObjectBO.getFileLocalPath()))) { |
| | | IOUtils.copy(ins, response.getOutputStream()); |
| | | } catch (IOException e) { |
| | | //æå¯è½å®¢æ·ç«¯ç龿¥ |
| | | if (log.isErrorEnabled()) { |
| | | log.error("åå
¥æä»¶å°ååºæµåºé", e); |
| | | } |
| | | throw e; |
| | | } |
| | | }else{ |
| | | try { |
| | | InputStream ins = (fileObjectBO.getInputStream() != null ? fileObjectBO.getInputStream() : new FileInputStream(fileObjectBO.getFileLocalPath())); |
| | | IOUtils.copy(ins, response.getOutputStream()); |
| | | } catch (IOException e) { |
| | | //æå¯è½å®¢æ·ç«¯ç龿¥ |
| | | if (log.isErrorEnabled()) { |
| | | log.error("åå
¥æä»¶å°ååºæµåºé", e); |
| | | } |
| | | throw e; |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.utils; |
| | | |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.boot.system.ApplicationHome; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.*; |
| | | import java.nio.channels.FileChannel; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¬å°æä»¶æä½ç±» |
| | | * @author weidy |
| | | * @date 2021-04-19 |
| | | */ |
| | | public class FileUtil { |
| | | |
| | | /** |
| | | * å 餿件夹 |
| | | * @param file è¦å é¤çæä»¶æè
æä»¶å¤¹ |
| | | */ |
| | | public static void deleteFile(File file) { |
| | | if(file == null || !file.exists()){ |
| | | return; |
| | | } |
| | | if (file.isDirectory()) { |
| | | File[] files = file.listFiles(); |
| | | for (int i = 0; i < files.length; i++) { |
| | | deleteFile(files[i]); |
| | | } |
| | | } |
| | | file.delete(); |
| | | } |
| | | |
| | | /** |
| | | * æ·è´æä»¶ |
| | | * @param source æºæä»¶ |
| | | * @param target ç®æ æä»¶ |
| | | * @throws VciBaseException æ·è´æä»¶åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | public static void copyFile(File source, File target) throws VciBaseException { |
| | | try(FileInputStream is = new FileInputStream(source); |
| | | FileOutputStream os = new FileOutputStream(target)){ |
| | | FileChannel sourceChannel = is.getChannel(); |
| | | FileChannel targetChannel = os.getChannel(); |
| | | int i=0; |
| | | int length=2097152; |
| | | while(true){ |
| | | if(sourceChannel.position()==sourceChannel.size()){ |
| | | sourceChannel.close(); |
| | | targetChannel.close(); |
| | | break; |
| | | } |
| | | if((sourceChannel.size()-sourceChannel.position())<20971520) { |
| | | length = (int) (sourceChannel.size() - sourceChannel.position()); |
| | | }else { |
| | | length = 20971520; |
| | | } |
| | | sourceChannel.transferTo(sourceChannel.position(),length,targetChannel); |
| | | sourceChannel.position(sourceChannel.position()+length); |
| | | i++; |
| | | } |
| | | }catch(Throwable e){ |
| | | throw new VciBaseException("æ·è´æä»¶åºé",new String[0],e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¸´æ¶æä»¶å¤¹çåç¼ |
| | | */ |
| | | public static String DEFAULT_TEMP_FOLDER_PREFIX = ""; |
| | | |
| | | /** |
| | | * è·åé»è®¤çä¸´æ¶æä»¶å¤¹ |
| | | * @return ä¸´æ¶æä»¶å¤¹ï¼é»è®¤ä¸ºå½å项ç®çè¿è¡è·¯å¾ä¸çtempFolderä¸çéæºå¼ |
| | | */ |
| | | public static String getDefaultTempFolder() throws VciBaseException{ |
| | | String path = (!StringUtils.hasLength(DEFAULT_TEMP_FOLDER_PREFIX)?getProjectFolder():DEFAULT_TEMP_FOLDER_PREFIX) + File.separator + "temp" + File.separator + VciBaseUtil.getPk(); |
| | | File folder = new File(path); |
| | | if(!folder.exists()){ |
| | | folder.mkdirs(); |
| | | } |
| | | return path; |
| | | } |
| | | |
| | | /** |
| | | * è·å项ç®çè·¯å¾ |
| | | * @return 项ç®çè·¯å¾ |
| | | * @throws VciBaseException è·åè·¯å¾åºç°äºéè¯¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | public static String getProjectFolder() throws VciBaseException{ |
| | | return getProjectFolder(FileUtil.class); |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸ªclassæå¨é¡¹ç®çè·¯å¾ |
| | | * @param classObj æä¸ªclass |
| | | * @return 项ç®çè·¯å¾ |
| | | * @throws VciBaseException è·åè·¯å¾åºç°äºéè¯¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | public static String getProjectFolder(Class classObj) throws VciBaseException{ |
| | | String path = ""; |
| | | try { |
| | | ApplicationHome h = new ApplicationHome(classObj == null? FileUtil.class:classObj); |
| | | File jarF = h.getSource(); |
| | | if(jarF == null){ |
| | | jarF = h.getDir(); |
| | | } |
| | | path = jarF.getParentFile().toString(); |
| | | if(path.contains("!")){ |
| | | path = new File(path).getParentFile().getParent(); |
| | | } |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("è·åå½åæå¡æå¨çæä»¶å¤¹åºç°äºé误",new String[0],e); |
| | | } |
| | | if(path.startsWith("file:\\")){ |
| | | path = path.substring(6); |
| | | } |
| | | if (System.getProperty("os.name").toLowerCase().startsWith("win") && path.startsWith("/")) { |
| | | path = path.substring(path.indexOf("/") + 1); |
| | | } |
| | | return path; |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¸´æ¶æä»¶ |
| | | * @param tempFile ä¸´æ¶æä»¶ |
| | | * @param deleteRandomFolder æ¯å¦å é¤éæºçé£ä¸ªæä»¶å¤¹ |
| | | * @throws VciBaseException å é¤åºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | public static void deleteTempFile(File tempFile,boolean deleteRandomFolder) throws VciBaseException{ |
| | | if(tempFile!=null){ |
| | | tempFile.delete(); |
| | | if(deleteRandomFolder){ |
| | | tempFile.getParentFile().delete(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 夿忰æ¯å¦ä¸ºç©º |
| | | * @param s åæ°ï¼ç¬¬ä¸ä¸ªä¸ºåæ°ï¼ç¬¬äºä¸ªä¸ºæç¤ºä¿¡æ¯ |
| | | * @throws VciBaseException ä¸ºç©ºæ¶æåºè¿ä¸ªå¼å¸¸ |
| | | */ |
| | | public static void alertNotNull(Object... s) throws VciBaseException{ |
| | | if(s!=null && s.length>0){ |
| | | for(int i = 0 ; i < s.length ; i ++){ |
| | | Object obj = s[i]; |
| | | if(obj==null ||!StringUtils.hasLength(obj.toString())){ |
| | | String param = ""; |
| | | try{ |
| | | i++; |
| | | param = s[i].toString(); |
| | | }catch(Exception e){ |
| | | |
| | | } |
| | | throw new VciBaseException("åæ°[" + param + "]ä¸è½ä¸ºç©º"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åæä»¶çåç¼å |
| | | * @param file æä»¶å¯¹è±¡ |
| | | * @return åç¼åï¼ä¸å
å«.ï¼å¦ææä»¶ä¸å卿è
没æåç¼åè¿å"" |
| | | */ |
| | | public static String getFileExtension(File file){ |
| | | if(file!=null){ |
| | | return getFileExtensionByName(file.getName()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä»¶ä¸å«åç¼åçåç§° |
| | | * @param file æä»¶ |
| | | * @return åç§° |
| | | */ |
| | | public static String getFileNameUnHasExtension(File file){ |
| | | if(file!=null){ |
| | | String name = file.getName(); |
| | | return name.contains(".")?name.substring(0,name.lastIndexOf(".")):name; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä»¶ä¸å«åç¼åçåç§° |
| | | * @param fileName æä»¶åç§° |
| | | * @return åç§° |
| | | */ |
| | | public static String getFileNameUnHasExtensionByName(String fileName){ |
| | | if(fileName!=null){ |
| | | return fileName.contains(".")?fileName.substring(0,fileName.lastIndexOf(".")):fileName; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åæä»¶çåç¼å |
| | | * @param name æä»¶åç§° |
| | | * @return åç¼åï¼ä¸å
å«.ï¼æ²¡æåç¼åè¿å"" |
| | | */ |
| | | public static String getFileExtensionByName(String name){ |
| | | if(StringUtils.hasLength(name)){ |
| | | if(name.contains(".")){ |
| | | return name.substring(name.lastIndexOf(".")+1); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸ä¼ æä»¶çåç§°ï¼å¨IEæµè§å¨ä¸ï¼ä¸ä¼ 伿å
¨è·¯å¾å¸¦è¿æ¥ |
| | | * @param name æä»¶çåç§° |
| | | * @return æ¿æ¢åçå¼ |
| | | */ |
| | | public static String getFileNameForIE(String name){ |
| | | if(!StringUtils.hasLength(name)){ |
| | | return name; |
| | | } |
| | | if(name.contains(File.separator)){ |
| | | return name.substring(name.lastIndexOf(File.separator)+1); |
| | | } |
| | | if(name.contains("\\")){ |
| | | return name.substring(name.lastIndexOf("\\") + 1); |
| | | } |
| | | return name; |
| | | } |
| | | |
| | | /** |
| | | * ä»å·¥ç¨ä¸è¯»åæä»¶çå
容 |
| | | * @param fileName æä»¶çåç§° |
| | | * @return æä»¶çå
容 |
| | | * @throws VciBaseException 读ååºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | public static String readContentForFileInJar(String fileName) throws VciBaseException{ |
| | | if(!StringUtils.hasLength(fileName)){ |
| | | throw new VciBaseException("æä»¶å为空"); |
| | | } |
| | | if(!fileName.startsWith("/")){ |
| | | fileName = "/" + fileName; |
| | | } |
| | | InputStream in = null; |
| | | ByteArrayOutputStream os = null; |
| | | try{ |
| | | in = FileUtil.class.getResourceAsStream( fileName); |
| | | if(in ==null){ |
| | | in=Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName); |
| | | } |
| | | os = new ByteArrayOutputStream(); |
| | | IOUtils.copy(in,os); |
| | | return new String(os.toByteArray(),"UTF-8"); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("读åæä»¶çå
容åºç°äºé误",new String[0],e); |
| | | }finally { |
| | | IOUtils.closeQuietly(in); |
| | | IOUtils.closeQuietly(os); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 读åæä»¶çå
å®¹ï¼æä»¶ä¸è½æ¯jaréç |
| | | * @param fileName æä»¶çåç§° |
| | | * @return æä»¶çå
å®¹ï¼æ¯UTF-8çå符é |
| | | * @throws VciBaseException æä»¶ä¸åå¨ï¼å读ååºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | public static String readContentForFile(String fileName) throws VciBaseException{ |
| | | return new String(readDataForFile(fileName),StandardCharsets.UTF_8); |
| | | } |
| | | |
| | | /** |
| | | * 读åæä»¶éçæ°æ® |
| | | * @param fileName æä»¶åç§° |
| | | * @return æä»¶çæ°æ® |
| | | * @throws VciBaseException æä»¶ä¸åå¨ï¼åè·ååºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | public static byte[] readDataForFile(String fileName) throws VciBaseException{ |
| | | File file = new File(fileName); |
| | | if(!file.exists()){ |
| | | throw new VciBaseException("æä»¶æªæ¾å°ï¼{0}",new String[]{fileName}); |
| | | } |
| | | try(InputStream in = new FileInputStream( file); |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | ){ |
| | | IOUtils.copy(in,os); |
| | | return os.toByteArray(); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("读åæä»¶çå
容åºç°äºé误",new String[0],e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * åå
¥åç¬¦ä¸²å°æä»¶ |
| | | * @param content å符串 |
| | | * @param fileName æä»¶çåç§° |
| | | * @throws VciBaseException åå
¥åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | public static void writeContentToFile(String content,String fileName) throws VciBaseException{ |
| | | File file = new File(fileName); |
| | | if(!file.exists()){ |
| | | File parentFile = file.getParentFile(); |
| | | if(!parentFile.exists()){ |
| | | parentFile.mkdirs(); |
| | | } |
| | | try { |
| | | file.createNewFile(); |
| | | } catch (IOException e) { |
| | | throw new VciBaseException("åå
¥æä»¶çå
容æ¶ååºç°äºå建æä»¶å¤±è´¥çé®é¢,{}",new String[]{fileName},e); |
| | | } |
| | | } |
| | | if(content == null){ |
| | | content = ""; |
| | | } |
| | | try(OutputStream os = new FileOutputStream(file);){ |
| | | os.write(content.getBytes(StandardCharsets.UTF_8)); |
| | | os.flush(); |
| | | }catch(Throwable e){ |
| | | throw new VciBaseException("åå
¥æä»¶çå
容æ¶ååºç°äºåé误,{}",new String[]{fileName},e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä»é¡¹ç®éæè
jarçæä»¶å°ç®æ æä»¶ |
| | | * @param fileInJar jaræè
项ç®éçæä»¶åç§° |
| | | * @param target ç®æ æä»¶ |
| | | * @throws VciBaseException æ·è´æä»¶åºç°éè¯¯çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | public static void copyFileInJar(String fileInJar,String target) throws VciBaseException{ |
| | | alertNotNull(fileInJar,"æºæä»¶",target,"ç®æ æä»¶"); |
| | | File targetFile = new File(target); |
| | | File folder = targetFile.getParentFile(); |
| | | if(!folder.exists()){ |
| | | folder.mkdirs(); |
| | | } |
| | | if(!targetFile.exists()){ |
| | | try { |
| | | targetFile.createNewFile(); |
| | | } catch (IOException e) { |
| | | throw new VciBaseException("åå»ºç®æ æä»¶çåºç°äºé误",new String[0],e); |
| | | } |
| | | } |
| | | if(!fileInJar.startsWith("/")){ |
| | | fileInJar = "/" + fileInJar; |
| | | } |
| | | InputStream in = null; |
| | | FileOutputStream os = null; |
| | | try{ |
| | | in = FileUtil.class.getResourceAsStream( fileInJar); |
| | | if(in ==null){ |
| | | in=Thread.currentThread().getContextClassLoader().getResourceAsStream(fileInJar); |
| | | } |
| | | os = new FileOutputStream(target); |
| | | IOUtils.copy(in,os); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("æ·è´æä»¶çå
容åºç°äºé误.{0},{1}",new String[]{fileInJar,target},e); |
| | | }finally { |
| | | IOUtils.closeQuietly(in); |
| | | IOUtils.closeQuietly(os); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æä»¶è½¬æ¢ä¸ºè·¯å¾ |
| | | * @param fileList æä»¶å表 |
| | | * @return è·¯å¾å表 |
| | | * @throws VciBaseException åæ°ä¸ºç©ºåæä»¶ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | public static List<String> fileToPatch(Collection<File> fileList) throws VciBaseException { |
| | | alertNotNull("æä»¶å表",fileList); |
| | | List<String> filePath = new ArrayList<>(); |
| | | for(File file : fileList){ |
| | | if(!file.exists()){ |
| | | throw new VciBaseException(file.getAbsolutePath() + "æä»¶æ²¡ææ¾å°",new String[0]); |
| | | } |
| | | filePath.add(file.getAbsolutePath()); |
| | | } |
| | | return filePath; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.utils; |
| | | |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.InputStream; |
| | | import java.nio.charset.Charset; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipOutputStream; |
| | | |
| | | /** |
| | | * zipç¸å
³çå·¥å
·ç±» |
| | | * @author wanghong |
| | | * @date 2021-02-02 |
| | | */ |
| | | @Component |
| | | public class ZipUtil { |
| | | |
| | | /** |
| | | * è·åzipçå符é |
| | | * @return é»è®¤ä¸ºGBKï¼å¦åéè¦é
ç½® |
| | | */ |
| | | private String getZipCharset(){ |
| | | return (File.separatorChar=='\\')?"GBK":"UTF-8"; |
| | | } |
| | | |
| | | /** |
| | | * 尿件夹å缩æå缩å
|
| | | * @param folder æä»¶å¤¹è·¯å¾ |
| | | * @param zipFileName zipæä»¶å |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ·»å åºéç伿åºå¼å¸¸ |
| | | */ |
| | | public void folderToZipFile(String folder, String zipFileName) throws VciBaseException { |
| | | folderToZipFile(folder,zipFileName,getZipCharset()); |
| | | } |
| | | |
| | | /** |
| | | * 尿件夹å缩æå缩å
|
| | | * @param folder æä»¶å¤¹è·¯å¾ |
| | | * @param zipFileName zipæä»¶å |
| | | * @param zipEncode zipçå符éï¼windowsåºè¯¥ä¸ºGBK |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ·»å åºéç伿åºå¼å¸¸ |
| | | */ |
| | | public void folderToZipFile(String folder, String zipFileName,String zipEncode) throws VciBaseException{ |
| | | File sourceFile = new File(folder); |
| | | if(!sourceFile.exists()){ |
| | | throw new VciBaseException("æä»¶{0}æ²¡ææ¾å°",new String[]{folder}); |
| | | } |
| | | try( ZipOutputStream zos =new ZipOutputStream(new FileOutputStream(zipFileName), StringUtils.hasLength(zipEncode)?Charset.forName(zipEncode): Charset.forName(getZipCharset()));) { |
| | | //é»è®¤æ¯UTF-8æ ¼å¼ç |
| | | addFileToZip(zos, new File(folder).listFiles(),folder + File.separator); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{}); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 尿件夹å缩æå缩å
|
| | | * @param zos zipè¾åºæµ |
| | | * @param files è¦å缩çæä»¶ |
| | | * @param rootPath å缩çæä»¶ä¸çé¡¶å±ç®å½ |
| | | * @throws VciBaseException æä»¶ä¸åå¨ï¼æè
å
容åºç°éè¯¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | private void addFileToZip(ZipOutputStream zos,File[] files,String rootPath) throws VciBaseException{ |
| | | if(files!=null && files.length>0) { |
| | | for (File file : files) { |
| | | if(!StringUtils.hasLength(rootPath)){ |
| | | try { |
| | | rootPath = file.getParent(); |
| | | if (rootPath == null) { |
| | | rootPath = file.getPath(); |
| | | } |
| | | }catch (Throwable e){ |
| | | rootPath = file.getPath(); |
| | | } |
| | | } |
| | | if (!file.exists()) { |
| | | throw new VciBaseException("æä»¶{0}æ²¡ææ¾å°",new String[]{file.getAbsolutePath()}); |
| | | } |
| | | if (file.isDirectory()) { |
| | | addFileToZip(zos, file.listFiles(),rootPath); |
| | | }else{ |
| | | try (InputStream is = new FileInputStream(file); ){ |
| | | String entryName = file.getAbsolutePath().replace(rootPath,""); |
| | | if(entryName.startsWith("\\")) { |
| | | entryName = entryName.substring(1); |
| | | } |
| | | ZipEntry zipEntry = new ZipEntry(entryName); |
| | | zos.putNextEntry(zipEntry); |
| | | byte[] b = new byte[100]; |
| | | int length = 0; |
| | | while ((length = is.read(b)) != -1) { |
| | | zos.write(b, 0, length); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("ZIPå缩åºé{0}",new String[]{file.getAbsolutePath()},e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å°å个æä»¶æ·»å å°zipä¸ |
| | | * @param file æä»¶ |
| | | * @param zipFile zipæä»¶ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ·»å åºéç伿åºå¼å¸¸ |
| | | */ |
| | | public void addFileToZip(File file, String zipFile) throws VciBaseException{ |
| | | if(file == null || !file.exists() ){ |
| | | throw new VciBaseException("æä»¶{0}æ²¡ææ¾å°" ,new String[]{file.getAbsolutePath()}); |
| | | } |
| | | if(!StringUtils.hasLength(zipFile)){ |
| | | throw new VciBaseException("zipæä»¶{0}为空",new String[0]); |
| | | } |
| | | addFileToZip(new File[]{file},zipFile); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å°å¤ä¸ªä¸ªæä»¶æ·»å å°zipä¸ |
| | | * @param files æä»¶ |
| | | * @param zipFile zipæä»¶ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ·»å åºéç伿åºå¼å¸¸ |
| | | */ |
| | | public void addFileToZip(File[] files, String zipFile) throws VciBaseException{ |
| | | addFileToZip(files, zipFile,getZipCharset()); |
| | | } |
| | | |
| | | /** |
| | | * å°å¤ä¸ªä¸ªæä»¶æ·»å å°zipä¸ |
| | | * @param files æä»¶ |
| | | * @param zipFile zipæä»¶ |
| | | * @param zipEncode zipçå符é |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ·»å åºéç伿åºå¼å¸¸ |
| | | */ |
| | | public void addFileToZip(File[] files, String zipFile,String zipEncode) throws VciBaseException{ |
| | | if(files == null || files.length == 0){ |
| | | throw new VciBaseException("æä»¶{0}å
容æ¯ç©º",new String[0]); |
| | | } |
| | | if(!StringUtils.hasLength(zipFile)){ |
| | | throw new VciBaseException("zipæä»¶{0}æ¯ç©º",new String[0]); |
| | | } |
| | | try (ZipOutputStream zos =new ZipOutputStream(new FileOutputStream(zipFile), StringUtils.hasLength(zipEncode)?Charset.forName(zipEncode): Charset.forName(getZipCharset()));){ |
| | | addFileToZip(zos, files,""); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e),new String[]{},e); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.vo; |
| | | |
| | | |
| | | import com.vci.ubcs.resource.entity.FileObject; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * æä»¶çæ¾ç¤ºå¯¹è±¡ |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | @Data |
| | | public class FileObjectVO extends FileObject { |
| | | |
| | | /** |
| | | * åºåå |
| | | */ |
| | | private static final long serialVersionUID = 2685482161288133481L; |
| | | |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.flowable.engine.RepositoryService; |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.engine.repository.Deployment; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.flowable.task.api.Task; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æµç¨äºå¡éç¨æ¥å£ |
| | | * |
| | |
| | | variables = Kv.create(); |
| | | } |
| | | variables.put(ProcessConstant.PASS_KEY, flow.isPass()); |
| | | variables.put("yn","y"); |
| | | // å®æä»»å¡ |
| | | taskService.complete(taskId, variables); |
| | | return true; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.flow.core.utils.TaskUtil; |
| | | import com.vci.ubcs.flow.engine.entity.FlowModel; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import com.vci.ubcs.flow.engine.service.FlowTaskUserService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.launch.constant.FlowConstant; |
| | | 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.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | |
| | | @RestController |
| | | @RequestMapping("model") |
| | | @AllArgsConstructor |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | //@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)t |
| | | public class FlowModelController { |
| | | |
| | | private final FlowEngineService flowEngineService; |
| | |
| | | IPage<FlowModel> pages = flowEngineService.page(Condition.getPage(query), Condition.getQueryWrapper(flow, FlowModel.class) |
| | | .select("id,model_key modelKey,name,description,version,created,last_updated lastUpdated") |
| | | .orderByDesc("last_updated")); |
| | | |
| | | flowEngineService.getNodeByFlowableKey("process_t"); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.bpmn.model.FlowElement; |
| | | import org.flowable.bpmn.model.SubProcess; |
| | | import org.flowable.bpmn.model.UserTask; |
| | | import org.flowable.engine.*; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æµç¨éç¨æ§å¶å¨ |
| | |
| | | |
| | | private static final String IMAGE_NAME = "image"; |
| | | private final FlowEngineService flowEngineService; |
| | | |
| | | private final RepositoryService repositoryService; |
| | | private final RuntimeService runtimeService; |
| | | private final HistoryService historyService; |
| | | private final TaskService taskService; |
| | | private final ProcessEngine processEngine; |
| | | |
| | | /** |
| | | * è·åæµè½¬åå²å表 |
| | |
| | | */ |
| | | @GetMapping(value = "model-view") |
| | | public R modelView(String processDefinitionId, String processInstanceId) { |
| | | |
| | | return R.data(flowEngineService.modelView(processDefinitionId, processInstanceId)); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.flow.engine.controller; |
| | | |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUserC; |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import com.vci.ubcs.flow.engine.service.FlowTaskUserService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | | * æµç¨taskå®¡æ¹æ§å¶ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @NonDS |
| | | @RestController |
| | | @RequestMapping("taskUser") |
| | | @AllArgsConstructor |
| | | public class FlowTaskUserController { |
| | | |
| | | private final FlowTaskUserService taskUserService; |
| | | |
| | | /** |
| | | * æµç¨task审æ¹äººåå表 |
| | | * @return |
| | | */ |
| | | @GetMapping("list") |
| | | public R<FlowTaskUserC> list() { |
| | | return R.data(taskUserService.getUser()); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ãä¿®æ¹ä»»å¡å¤ç人å |
| | | * @param flowTaskUserC |
| | | * @return |
| | | */ |
| | | @PostMapping("su") |
| | | public R<String> saveUser(@RequestBody FlowTaskUserC flowTaskUserC) { |
| | | taskUserService.saveOrUpdateUser(flowTaskUserC); |
| | | return R.success("ä¿åæå"); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä»»å¡å¤ç人å |
| | | * @param flowTaskUserC |
| | | * @return |
| | | */ |
| | | @PostMapping("du") |
| | | public R<String> deleteUser(@RequestBody FlowTaskUserC flowTaskUserC) { |
| | | taskUserService.deleteUser(flowTaskUserC.getName()); |
| | | return R.success("å 餿å"); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.flow.engine.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUserC; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessStageAttr; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessTemplate; |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import com.vci.ubcs.flow.engine.service.ProcessStageAttrService; |
| | | import com.vci.ubcs.flow.engine.service.ProcessTemplateService; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | *æµç¨æ¨¡æ¿ãæµç¨é¶æ®µæ§å¶ processTemplate processStage |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @NonDS |
| | | @RestController |
| | | @RequestMapping("processTS") |
| | | @AllArgsConstructor |
| | | public class ProcessTSController { |
| | | |
| | | private final FlowEngineService flowEngineService; |
| | | private final ProcessTemplateService processTemplateService; |
| | | private final ProcessStageAttrService processStageAttrService; |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿å页 |
| | | */ |
| | | @GetMapping("/tlist") |
| | | public R<IPage<ProcessTemplate>> tlist(@RequestParam Map<String, Object> flow, Query query) { |
| | | IPage<ProcessTemplate> pages = processTemplateService.page(Condition.getPage(query), Condition.getQueryWrapper(flow, ProcessTemplate.class) |
| | | .select("id,model_key modelKey,model_name modelName,button_Type_Key buttonTypeKey,button_Type_value buttonTypeValue") |
| | | .orderByDesc("last_updated")); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿ç¨é屿§ |
| | | * @return |
| | | */ |
| | | @PostMapping("tt") |
| | | public R<List<Map<String,String>>> processTemplateType() { |
| | | return R.data(processTemplateService.processTemplateType()); |
| | | } |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿æ°å¢ãä¿®æ¹ |
| | | * @param processTemplate |
| | | * @return |
| | | */ |
| | | @PostMapping("tsou") |
| | | public R<ProcessTemplate> processTemplateSaveOrUpdate(@RequestBody ProcessTemplate processTemplate) { |
| | | processTemplateService.saveOrUpdateUser(processTemplate); |
| | | return R.success("ä¿åæå"); |
| | | } |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿å é¤ |
| | | * @param processTemplate |
| | | * @return |
| | | */ |
| | | @DeleteMapping("dt") |
| | | public R<ProcessTemplate> deleteProcessTemplate(ProcessTemplate processTemplate) { |
| | | processTemplateService.deleteProcessTemplate(processTemplate.getId()); |
| | | return R.success("å 餿å"); |
| | | } |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µï¼è¿ä¸ªæµç¨çå个èç¹ |
| | | */ |
| | | @GetMapping("/sslist") |
| | | public R<List<Map<String,String>>> sslist(@RequestParam String modelKey) { |
| | | return R.data(flowEngineService.getNodeByFlowableKey(modelKey)); |
| | | } |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µï¼è¿ä¸ªæµç¨,è¿ä¸ªèç¹ï¼ç»å®ç屿§ |
| | | */ |
| | | @GetMapping("/ssslist") |
| | | public R<List<ProcessStageAttr>> ssslist(@RequestParam String templateId,@RequestParam String modelKey,@RequestParam String taskId) { |
| | | Map<String, Object> m = new HashMap<>(); |
| | | m.put("template_id", templateId); |
| | | m.put("task_id", taskId); |
| | | m.put("model_key", modelKey); |
| | | QueryWrapper q = Condition.getQueryWrapper(m, ProcessStageAttr.class) |
| | | .select("attr_id attrId,attr_name attrName,attr_group attrGroup"); |
| | | return R.data(processStageAttrService.list(q)); |
| | | } |
| | | |
| | | /** |
| | | * 模æ¿é¶æ®µå±æ§æ°å¢ãä¿®æ¹ |
| | | * @param flowTaskUserC |
| | | * @return |
| | | */ |
| | | @PostMapping("sasou") |
| | | public R<ProcessTemplate> stageAttributeSaveOrUpdate(@RequestBody FlowTaskUserC flowTaskUserC) { |
| | | processStageAttrService.saveOrUpdateUser(flowTaskUserC); |
| | | return R.success("ä¿åæå"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.flow.core.utils.TaskUtil; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * æµç¨æ¯ä¸ä¸ªèç¹å®¡æ ¸äºº |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Data |
| | | @TableName("ACT_DE_TASK_USER") |
| | | public class FlowTaskUser implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String id; |
| | | private String name;//ä¿åçè¿ä¸ªæ¶èåç§° |
| | | private String modelKey; |
| | | private String classifyId; |
| | | private String templateId; |
| | | private String taskId;//æµç¨taskid |
| | | private String taskName; |
| | | private String userId; |
| | | private String userName; |
| | | private String description; |
| | | private Date created; |
| | | private Date lastUpdated; |
| | | private String createdBy; |
| | | private String lastUpdatedBy; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æµç¨èç¹å®¡æ ¸äººæ¶è |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Data |
| | | public class FlowTaskUserC implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String createdBy; |
| | | private String name;//ä¿åçè¿ä¸ªæ¶èåç§° |
| | | private String modelKey; |
| | | private String classifyId; |
| | | private String templateId; |
| | | private String taskId;//é¶æ®µidï¼å°±æ¯æµç¨taskid |
| | | private String taskName;//é¶æ®µåç§° |
| | | private List<FlowTaskUser> flowTaskUsers;//æ¯ä¸ªèç¹æ¶è人 |
| | | private List<ProcessStageAttr> processStageAttr;//æµç¨é¶æ®µä¿åç屿§ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Data |
| | | @TableName("ACT_DE_PROCESS_STAGE_ATTR") |
| | | public class ProcessStageAttr implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String id; |
| | | private String modelKey; |
| | | private String classifyId; |
| | | private String templateId; |
| | | private String taskId;//é¶æ®µidï¼å°±æ¯æµç¨taskid |
| | | private String taskName;//é¶æ®µåç§° |
| | | private String attrOid;//屿§è¿æ¡æ°æ®çid |
| | | private String attrId;//屿§è¿æ¡æ°æ®çoid |
| | | private String attrName;//屿§ä¸æåç§° |
| | | private String attrGroup;//屿§åç» |
| | | private String description; |
| | | private Date created; |
| | | private Date lastUpdated; |
| | | private String createdBy; |
| | | private String lastUpdatedBy; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Data |
| | | @TableName("ACT_DE_PROCESS_TEMPLATE") |
| | | public class ProcessTemplate implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String id; |
| | | private String templateId;//å½å模æ¿id |
| | | private String modelKey;//æµç¨æ¨¡åkey,é¨ç½²key |
| | | private String modelName;//é¨ç½²æµç¨åç§° |
| | | private String buttonTypeKey;//åºç¨æé®,ProcessTemplateTypeEnumçkey |
| | | private String buttonTypeValue;//åºç¨æé®,ProcessTemplateTypeEnumçvalue |
| | | private String description; |
| | | private Date created; |
| | | private Date lastUpdated; |
| | | private String createdBy; |
| | | private String lastUpdatedBy; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.flow.engine.entity.FlowModel; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<FlowModel> findByParentModelId(String parentModelId); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.flow.engine.entity.FlowModel; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µå®¡æ ¸äººå |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | public interface FlowTaskUserMapper extends BaseMapper<FlowTaskUser> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessStageAttr; |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | public interface ProcessStageAttrMapper extends BaseMapper<ProcessStageAttr> { |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessTemplate; |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | public interface ProcessTemplateMapper extends BaseMapper<ProcessTemplate> { |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.flow.engine.entity.FlowModel; |
| | | import com.vci.ubcs.flow.engine.entity.FlowProcess; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.w3c.dom.Document; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | |
| | | * @return |
| | | */ |
| | | byte[] getModelEditorXML(FlowModel model); |
| | | |
| | | /** |
| | | * æ ¹æ®æµç¨æ¨¡åkeyè·åXMLä¸èç¹é
ç½®çå¤ç人,读åèç¹åç§°åé
ç½®çå¼ï¼æµç¨æ¨¡åkeyå·²ç»éå¶ä¸éå¤ |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | List<Map<String,String>> getNodeByFlowableKey(String key); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.flow.core.entity.BladeFlow; |
| | | import com.vci.ubcs.flow.engine.entity.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * FlowService |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | public interface FlowTaskUserService extends IService<FlowTaskUser> { |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åç»é人对è¿ä¸ªæµç¨çtaskUser |
| | | * @return |
| | | */ |
| | | FlowTaskUserC getUser(); |
| | | |
| | | /** |
| | | * æ°å¢/ä¿®æ¹æµç¨èç¹å®¡æ ¸äººé
ç½®ãå¹¶ä¸ä¿®æ¹æµç¨xmlé¨ç½²æä»¶ |
| | | * @param flowTaskUserC |
| | | * @return |
| | | */ |
| | | void saveOrUpdateUser(FlowTaskUserC flowTaskUserC); |
| | | |
| | | /** |
| | | * å 餿µç¨å®¡æ ¸äººå |
| | | * @param name |
| | | */ |
| | | void deleteUser(String name); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUserC; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessStageAttr; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µæå¡ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | public interface ProcessStageAttrService extends IService<ProcessStageAttr> { |
| | | |
| | | /** |
| | | * æ°å¢/ä¿®æ¹æµç¨é¶æ®µ |
| | | * @param flowTaskUserC |
| | | * @return |
| | | */ |
| | | void saveOrUpdateUser(FlowTaskUserC flowTaskUserC); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUserC; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessTemplate; |
| | | import com.vci.ubcs.starter.web.enumpck.ProcessTemplateTypeEnum; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿æå¡ |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | public interface ProcessTemplateService extends IService<ProcessTemplate> { |
| | | |
| | | /** |
| | | * æ°å¢/ä¿®æ¹æµç¨æ¨¡æ¿ |
| | | * @param processTemplate |
| | | * @return |
| | | */ |
| | | void saveOrUpdateUser(ProcessTemplate processTemplate); |
| | | |
| | | /** |
| | | * å 餿µç¨æ¨¡æ¿ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | void deleteProcessTemplate(String id); |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿ç¨é |
| | | * @return |
| | | */ |
| | | List<Map<String,String>> processTemplateType(); |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | |
| | | import com.vci.ubcs.system.user.entity.User; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.bpmn.converter.BpmnXMLConverter; |
| | | import org.flowable.bpmn.model.BpmnModel; |
| | | import org.flowable.bpmn.model.*; |
| | | import org.flowable.bpmn.model.Process; |
| | | import org.flowable.common.engine.impl.util.IoUtil; |
| | | import org.flowable.common.engine.impl.util.io.StringStreamSource; |
| | |
| | | import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; |
| | | import org.flowable.engine.impl.persistence.entity.ProcessDefinitionEntityImpl; |
| | | import org.flowable.engine.repository.Deployment; |
| | | import org.flowable.engine.repository.DeploymentQuery; |
| | | import org.flowable.engine.repository.ProcessDefinition; |
| | | import org.flowable.engine.repository.ProcessDefinitionQuery; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | |
| | | import org.flowable.engine.task.Comment; |
| | | import org.flowable.image.ProcessDiagramGenerator; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.FileUtil; |
| | |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.w3c.dom.*; |
| | | import org.xml.sax.InputSource; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.xml.parsers.DocumentBuilder; |
| | | import javax.xml.parsers.DocumentBuilderFactory; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.io.StringReader; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | private final HistoryService historyService; |
| | | private final TaskService taskService; |
| | | private final ProcessEngine processEngine; |
| | | |
| | | /** |
| | | * æ°æ®æä½å¯¹è±¡ |
| | | */ |
| | | @Resource |
| | | private FlowMapper flowMapper; |
| | | |
| | | @Override |
| | | public IPage<FlowModel> selectFlowPage(IPage<FlowModel> page, FlowModel flowModel) { |
| | |
| | | |
| | | @Override |
| | | public boolean deployModel(String modelId, String category, List<String> tenantIdList) { |
| | | |
| | | FlowModel model = this.getById(modelId); |
| | | if (model == null) { |
| | | throw new ServiceException("æªæ¾å°æ¨¡å id: " + modelId); |
| | |
| | | |
| | | @Override |
| | | public FlowModel submitModel(FlowModel model) { |
| | | |
| | | //éªè¯éå¤key |
| | | if(StringUtils.isEmpty(model.getId())&&getFlowModelByKey(model.getModelKey())!=null){ |
| | | throw new ServiceException("you cannot definition repetition æµç¨key!"); |
| | | } |
| | | |
| | | FlowModel flowModel = new FlowModel(); |
| | | flowModel.setId(model.getId()); |
| | | flowModel.setVersion(Func.toInt(model.getVersion(), 0) + 1); |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æµç¨æ¨¡åkeyè·åXMLä¸èç¹é
ç½®çå¤ç人 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Map<String,String>> getNodeByFlowableKey(String key){ |
| | | String processDefinitionId = repositoryService.createProcessDefinitionQuery().latestVersion().processDefinitionKey(key).singleResult().getId(); |
| | | BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId); |
| | | Process process = bpmnModel.getProcesses().get(0);//åªæä¸ä¸ª |
| | | |
| | | List<Map<String,String>> ll = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(process.getFlowElements())) { |
| | | for (FlowElement flowElement : process.getFlowElements()) { |
| | | if (flowElement instanceof UserTask) { |
| | | Map<String,String> mi = new HashMap<>(); |
| | | mi.put("taskId",flowElement.getId()); |
| | | mi.put("taskName",flowElement.getName()); |
| | | ll.add(mi); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ll; |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦å·²å®ç» |
| | | * |
| | | * @param processInstanceId æµç¨å®ä¾id |
| | |
| | | return historyService.createHistoricProcessInstanceQuery().finished() |
| | | .processInstanceId(processInstanceId).count() > 0; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * xml转bpmn json |
| | |
| | | } |
| | | } |
| | | |
| | | public FlowModel getFlowModelByKey(String key){ |
| | | Map kv = new HashMap(); |
| | | kv.put("model_key",key); |
| | | return baseMapper.selectOne(Condition.getQueryWrapper(kv, FlowModel.class)); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.node.ObjectNode; |
| | | import com.vci.ubcs.flow.core.entity.BladeFlow; |
| | | import com.vci.ubcs.flow.core.enums.FlowModeEnum; |
| | | import com.vci.ubcs.flow.core.utils.TaskUtil; |
| | | import com.vci.ubcs.flow.engine.constant.FlowEngineConstant; |
| | | import com.vci.ubcs.flow.engine.entity.*; |
| | | import com.vci.ubcs.flow.engine.mapper.FlowMapper; |
| | | import com.vci.ubcs.flow.engine.mapper.FlowTaskUserMapper; |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import com.vci.ubcs.flow.engine.service.FlowTaskUserService; |
| | | import com.vci.ubcs.flow.engine.utils.FlowCache; |
| | | import com.vci.ubcs.system.user.cache.UserCache; |
| | | import com.vci.ubcs.system.user.entity.User; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.flowable.bpmn.converter.BpmnXMLConverter; |
| | | import org.flowable.bpmn.model.BpmnModel; |
| | | import org.flowable.bpmn.model.Process; |
| | | import org.flowable.common.engine.impl.util.IoUtil; |
| | | import org.flowable.common.engine.impl.util.io.StringStreamSource; |
| | | import org.flowable.editor.language.json.converter.BpmnJsonConverter; |
| | | import org.flowable.engine.*; |
| | | import org.flowable.engine.history.HistoricActivityInstance; |
| | | import org.flowable.engine.history.HistoricProcessInstance; |
| | | import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; |
| | | import org.flowable.engine.impl.persistence.entity.ProcessDefinitionEntityImpl; |
| | | import org.flowable.engine.repository.Deployment; |
| | | import org.flowable.engine.repository.ProcessDefinition; |
| | | import org.flowable.engine.repository.ProcessDefinitionQuery; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.flowable.engine.runtime.ProcessInstanceQuery; |
| | | import org.flowable.engine.task.Comment; |
| | | import org.flowable.image.ProcessDiagramGenerator; |
| | | import org.springblade.core.launch.constant.FlowConstant; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.FileUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.w3c.dom.Document; |
| | | import org.w3c.dom.Element; |
| | | import org.w3c.dom.NodeList; |
| | | import org.xml.sax.InputSource; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.xml.parsers.DocumentBuilder; |
| | | import javax.xml.parsers.DocumentBuilderFactory; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.io.StringReader; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 工使µæå¡å®ç°ç±» |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class FlowTaskUserServiceImpl extends ServiceImpl<FlowTaskUserMapper, FlowTaskUser> implements FlowTaskUserService { |
| | | |
| | | private FlowEngineService flowEngineService; |
| | | private FlowTaskUserMapper flowTaskUserMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢å½åç»é人对è¿ä¸ªæµç¨çtaskUser |
| | | * @return |
| | | */ |
| | | @Override |
| | | public FlowTaskUserC getUser(){ |
| | | QueryWrapper<FlowTaskUser> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("CREATED_BY", AuthUtil.getUserId()); |
| | | List<FlowTaskUser> flowTaskUsers = baseMapper.selectList(queryWrapper); |
| | | FlowTaskUserC flowTaskUserCR = new FlowTaskUserC(); |
| | | if(flowTaskUsers.size()==0){ |
| | | return flowTaskUserCR; |
| | | } |
| | | flowTaskUserCR.setName(flowTaskUsers.get(0).getName());//æ¶èåç§° |
| | | flowTaskUserCR.setFlowTaskUsers(flowTaskUsers); |
| | | return flowTaskUserCR; |
| | | } |
| | | |
| | | @Override |
| | | public void saveOrUpdateUser(FlowTaskUserC flowTaskUserC){ |
| | | List<FlowTaskUser> flowTaskUsers = flowTaskUserC.getFlowTaskUsers(); |
| | | String name = flowTaskUserC.getName();//æ¶èåç§° |
| | | |
| | | //æ°å¢æ
åµä¸éªè¯æ¶èåç§°ä¸éå¤ |
| | | if(flowTaskUsers.get(0).getId()!=null) { |
| | | Map<String, Object> m = new HashMap<>(); |
| | | m.put("name", name); |
| | | QueryWrapper q = Condition.getQueryWrapper(m, FlowTaskUser.class) |
| | | .select("id,model_key modelKey,name,description,version,created,last_updated lastUpdated"); |
| | | if(flowTaskUserMapper.selectCount(q)>0){ |
| | | throw new ServiceException("æ¶èåç§°å·²ç»åå¨!"); |
| | | } |
| | | } |
| | | for (FlowTaskUser flowTaskUseri:flowTaskUsers){ |
| | | flowTaskUseri.setName(name); |
| | | } |
| | | //æ°å¢ãä¿®æ¹ |
| | | this.saveOrUpdateBatch(flowTaskUsers); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void deleteUser(String name){ |
| | | Map<String, Object> m = new HashMap<>(); |
| | | m.put("name", name); |
| | | m.put("created_by", AuthUtil.getUserId()); |
| | | baseMapper.deleteByMap(m); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUserC; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessStageAttr; |
| | | import com.vci.ubcs.flow.engine.mapper.ProcessStageAttrMapper; |
| | | import com.vci.ubcs.flow.engine.service.ProcessStageAttrService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æµç¨é¶æ®µæå¡å®ç°ç±» |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProcessStageAttrServiceImpl extends ServiceImpl<ProcessStageAttrMapper, ProcessStageAttr> implements ProcessStageAttrService { |
| | | |
| | | /** |
| | | * æ°å¢/ä¿®æ¹æµç¨é¶æ®µ |
| | | * @param flowTaskUserC |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | public void saveOrUpdateUser(FlowTaskUserC flowTaskUserC){ |
| | | List<ProcessStageAttr> processStageAttrs = flowTaskUserC.getProcessStageAttr(); |
| | | String modelKey = flowTaskUserC.getModelKey(); |
| | | String templateId = flowTaskUserC.getTemplateId(); |
| | | String taskId = flowTaskUserC.getTaskId(); |
| | | String taskName = flowTaskUserC.getTaskName(); |
| | | |
| | | //ç´æ¥å é¤ä»¥åç |
| | | Map<String, Object> m = new HashMap<>(); |
| | | m.put("template_id", templateId); |
| | | m.put("model_key", modelKey); |
| | | m.put("task_id", taskId); |
| | | QueryWrapper q = Condition.getQueryWrapper(m, FlowTaskUser.class) |
| | | .select("id,model_key modelKey,name,description,version,created,last_updated lastUpdated"); |
| | | int i = baseMapper.deleteByMap(m); |
| | | System.out.println("å é¤ç屿§ä¸ªæ°: "+i); |
| | | |
| | | List<ProcessStageAttr> processStages = flowTaskUserC.getProcessStageAttr(); |
| | | for (ProcessStageAttr processStageAttr:processStages){ |
| | | processStageAttr.setModelKey(modelKey); |
| | | processStageAttr.setTemplateId(templateId); |
| | | processStageAttr.setTaskId(taskId); |
| | | processStageAttr.setTaskName(taskName); |
| | | } |
| | | if(processStages.size()!=0) { |
| | | this.saveOrUpdateBatch(processStages); |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.flow.engine.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.flow.core.utils.TaskUtil; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUser; |
| | | import com.vci.ubcs.flow.engine.entity.FlowTaskUserC; |
| | | import com.vci.ubcs.flow.engine.entity.ProcessTemplate; |
| | | import com.vci.ubcs.flow.engine.mapper.FlowTaskUserMapper; |
| | | import com.vci.ubcs.flow.engine.mapper.ProcessTemplateMapper; |
| | | import com.vci.ubcs.flow.engine.service.FlowEngineService; |
| | | import com.vci.ubcs.flow.engine.service.FlowTaskUserService; |
| | | import com.vci.ubcs.flow.engine.service.ProcessTemplateService; |
| | | import com.vci.ubcs.starter.web.enumpck.ProcessTemplateTypeEnum; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.launch.constant.FlowConstant; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿æå¡å®ç°ç±» |
| | | * |
| | | * @author wang1 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class ProcessTemplateServiceImpl extends ServiceImpl<ProcessTemplateMapper, ProcessTemplate> implements ProcessTemplateService { |
| | | |
| | | |
| | | /** |
| | | * æ°å¢/ä¿®æ¹æµç¨æ¨¡æ¿ |
| | | * @param processTemplate |
| | | * @return |
| | | */ |
| | | public void saveOrUpdateUser(ProcessTemplate processTemplate){ |
| | | //æ ¡éªè¿ä¸ªæ¨¡æ¿ä¸ï¼ä¸ç±»æé®åªè½æä¸ä¸ªæ¨¡æ¿ |
| | | QueryWrapper<ProcessTemplate> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("button_type_key", processTemplate.getButtonTypeKey()); |
| | | if(StringUtils.isNotEmpty(processTemplate.getId())) {//ä¿®æ¹çæ¶å,idä¸ºç©ºå°±æ¯æ°å¢ |
| | | queryWrapper.ne("id", processTemplate.getId()); |
| | | } |
| | | if(baseMapper.selectOne(queryWrapper)!=null){ |
| | | throw new ServiceException(processTemplate.getButtonTypeValue()+"åè½å·²ç»é
ç½®äºæµç¨!"); |
| | | } |
| | | if(StringUtils.isEmpty(processTemplate.getButtonTypeValue())){ |
| | | processTemplate.setButtonTypeValue(ProcessTemplateTypeEnum.getTextByValue(processTemplate.getButtonTypeKey())); |
| | | } |
| | | //æ°å¢æè
ä¿®æ¹ |
| | | if(StringUtils.isEmpty(processTemplate.getId())){ |
| | | processTemplate.setCreated(Calendar.getInstance().getTime()); |
| | | processTemplate.setCreatedBy(TaskUtil.getTaskUser()); |
| | | processTemplate.setLastUpdated(Calendar.getInstance().getTime()); |
| | | processTemplate.setLastUpdatedBy(TaskUtil.getTaskUser()); |
| | | } |
| | | this.saveOrUpdate(processTemplate); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å 餿µç¨æ¨¡æ¿ |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public void deleteProcessTemplate(String id){ |
| | | baseMapper.deleteById(id); |
| | | } |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿ç¨é |
| | | * @return |
| | | */ |
| | | public List<Map<String,String>> processTemplateType(){ |
| | | ProcessTemplateTypeEnum[] es = ProcessTemplateTypeEnum.values(); |
| | | List<Map<String,String>> ll = new ArrayList<>(); |
| | | for (ProcessTemplateTypeEnum p:es){ |
| | | Map<String,String> mi = new HashMap<>(); |
| | | String value = p.getValue(); |
| | | String text = p.getText(); |
| | | mi.put("codee",value); |
| | | mi.put("namee",text); |
| | | ll.add(mi); |
| | | } |
| | | return ll; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * é件表 æ§å¶å¨ |
| | | * |
| | | * |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @NonDS |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.resource.dto.FileObjectDTO; |
| | | import com.vci.ubcs.resource.dto.FileReleaseDTO; |
| | | import com.vci.ubcs.resource.dto.FileShareDTO; |
| | | import com.vci.ubcs.resource.query.FileQuery; |
| | | import com.vci.ubcs.resource.service.IFileService; |
| | | import com.vci.ubcs.resource.utils.FileDownloadUtil; |
| | | import com.vci.ubcs.resource.vo.FileObjectVO; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.oss.MinioTemplate; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä»¶æ§å¶å¨ |
| | | * @author weidy |
| | | * @date 2023-6/9 |
| | | */ |
| | | @RestController() |
| | | @RequestMapping("/fileController") |
| | | public class FileController { |
| | | |
| | | /** |
| | | * æä»¶æå¡ |
| | | */ |
| | | @Autowired |
| | | private IFileService fileService; |
| | | |
| | | /** |
| | | * minioçé
ç½® |
| | | */ |
| | | @Autowired |
| | | private MinioTemplate minioTemplate; |
| | | |
| | | /** |
| | | * æ ¹æ®æä»¶ä¸»é®ä¸è½½æä»¶ |
| | | * @param fileOids æä»¶çä¸»é® |
| | | * @param response ååºç对象 |
| | | * @return æ§è¡ç»æï¼åªæä¸è½½å¤±è´¥çæ¶åæä¼è¿æ · |
| | | */ |
| | | @RequestMapping(value = "/downloadFilesByOids",method = {RequestMethod.GET,RequestMethod.POST}) |
| | | public R downloadFilesByOids(@RequestParam String fileOids, HttpServletResponse response){ |
| | | try{ |
| | | FileDownloadUtil.downloadFile(response, fileService.downloadFileByOids(VciBaseUtil.str2List(fileOids))); |
| | | }catch (Throwable e){ |
| | | return R.fail(LangBaseUtil.getErrorMsg(e)); |
| | | } |
| | | return R.success("ä¸è½½å®æ"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æä»¶å é¤ |
| | | * @param oids æä»¶çä¸»é® |
| | | * @return æä»¶å
容 |
| | | */ |
| | | @DeleteMapping("/deleteFile") |
| | | public R deleteFile(@RequestBody Collection<String> oids){ |
| | | fileService.deleteFiles(oids); |
| | | return R.success("å 餿å"); |
| | | } |
| | | |
| | | /** |
| | | * å端页é¢åæä»¶ä¸ä¼ ã(å
æ°æ®ï¼åæä»¶æ¨¡å¼ä¸ä¼ ) |
| | | * @param file ä¸ä¼ çæä»¶ |
| | | * @param fileObjectDTO æä»¶ä¿¡æ¯ä¼ è¾å¯¹è±¡ |
| | | * @return æä»¶ä¿¡æ¯æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PostMapping("/uploadFile") |
| | | public R<FileObjectVO> uploadFile(MultipartFile file, FileObjectDTO fileObjectDTO){ |
| | | if (file != null ) { |
| | | return fileService.uploadFile(file, fileObjectDTO); |
| | | } else { |
| | | return R.fail("æ ä¸ä¼ çæä»¶"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¨ä¸ä¼ æä»¶åï¼ä¿åæä»¶çä¿¡æ¯ |
| | | * @param fileObjectDTO æä»¶ä¿¡æ¯ä¼ è¾å¯¹è±¡ |
| | | * @return æä»¶ä¿¡æ¯æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @PostMapping("/saveFileAfterUpload") |
| | | public R<FileObjectVO> saveFileAfterUpload( @RequestBody FileObjectDTO fileObjectDTO){ |
| | | return fileService.saveFileAfterUpload(fileObjectDTO); |
| | | } |
| | | |
| | | /** |
| | | * å°åæ°æ®ä¸çæææä»¶å
±äº«å°å
¶ä»çä¸å¡æ°æ®ä¸ |
| | | * @param shareDTO æä»¶å享 |
| | | * @return æä»¶ä¿¡æ¯æ¾ç¤ºå¯¹è±¡,æ¯å¤ä¸ª |
| | | */ |
| | | @PostMapping("/shareFiles") |
| | | public R<List<FileObjectVO>> shareFiles(@RequestBody FileShareDTO shareDTO){ |
| | | return fileService.shareFiles(shareDTO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹æä»¶ä¿¡æ¯(ä¸å«æä»¶),注æobjectNameåfilePathä¸ä¼åå |
| | | * @param fileDTOs æä»¶çæ°æ®å¯¹è±¡ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @PostMapping("/updateFileInfos") |
| | | public R updateFileInfos(@RequestBody Collection<FileObjectDTO> fileDTOs){ |
| | | return fileService.updateFileInfos(fileDTOs); |
| | | } |
| | | |
| | | /** |
| | | * æä»¶çæ |
| | | * @param ids æä»¶çä¸»é® |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @PutMapping("/releasedFiles") |
| | | public R releasedFiles(@RequestBody Collection<String> ids){ |
| | | return fileService.releasedFiles(ids); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæå®æä»¶ä¸å¡æ°æ®åçæ |
| | | * @param releaseDTOS çæçç¸å
³ä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @PutMapping("/releasedFilesForOwn") |
| | | public R releasedFilesForOwn(@RequestBody Collection<FileReleaseDTO> releaseDTOS){ |
| | | return fileService.releasedFilesForOwn(releaseDTOS); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使ç¨ä¸å¡ç±»åæ¥è¯¢æä»¶çä¿¡æ¯ï¼æä¾ç»é¡µé¢è°ç¨ |
| | | * @param fileQuery æ¥è¯¢å¯¹è±¡ |
| | | * @return æä»¶çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @RequestMapping(value = "/listFiles",method = {RequestMethod.GET,RequestMethod.POST}) |
| | | public R<IPage<FileObjectVO>> listFiles(FileQuery fileQuery, Query query){ |
| | | return R.data(fileService.listFiles(fileQuery,query)); |
| | | } |
| | | |
| | | /** |
| | | * ä½¿ç¨æä»¶ä¸»é®è·å对象 |
| | | * @param oid ä¸»é® |
| | | * @return æä»¶æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @GetMapping("/get") |
| | | public FileObjectVO get(String oid){ |
| | | return fileService.get(oid); |
| | | } |
| | | |
| | | /** |
| | | * ä½¿ç¨æä»¶ç䏻鮿¹éè·å对象 |
| | | * @param oids æä»¶ç主é®éå |
| | | * @return æä»¶çæ¾ç¤ºä¿¡æ¯ |
| | | */ |
| | | @GetMapping("/listFilesByOids") |
| | | public List<FileObjectVO> listFilesByOids( Collection<String> oids){ |
| | | return fileService.listFilesByOids(oids); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.resource.endpoint; |
| | | |
| | | import com.vci.ubcs.resource.entity.Attach; |
| | | import com.vci.ubcs.resource.service.IFileService; |
| | | import com.vci.ubcs.resource.utils.FileDownloadUtil; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.SneakyThrows; |
| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import com.vci.ubcs.resource.builder.oss.OssBuilder; |
| | | import com.vci.ubcs.resource.service.IAttachService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * 对象åå¨ç«¯ç¹ |
| | | * |
| | | * è¿ä¸ªç±»ä¸ä½¿ç¨ï¼ç»ä¸ç¨fileController |
| | | * |
| | | * @author Chill |
| | | */ |
| | |
| | | @AllArgsConstructor |
| | | @RequestMapping("/oss/endpoint") |
| | | @Api(value = "对象åå¨ç«¯ç¹", tags = "对象åå¨ç«¯ç¹") |
| | | @Deprecated |
| | | public class OssEndpoint { |
| | | |
| | | /** |
| | |
| | | * é件表æå¡ |
| | | */ |
| | | private final IAttachService attachService; |
| | | |
| | | |
| | | /** |
| | | * å建å卿¡¶ |
| | |
| | | } |
| | | |
| | | /** |
| | | * å建å卿¡¶ |
| | | * å é¤å卿¡¶ |
| | | * |
| | | * @param bucketName å卿¡¶åç§° |
| | | * @return R |
| | |
| | | public R<OssFile> statFile(@RequestParam String fileName) { |
| | | return R.data(ossBuilder.template().statFile(fileName)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åæä»¶ç¸å¯¹è·¯å¾ |
| | |
| | | return R.data(bladeFile); |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶å¹¶ä¿åè³é件表 |
| | | * |
| | | * @param file æä»¶ |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | | @PostMapping("/put-file-attach") |
| | | public R<BladeFile> putFileAttach(@RequestParam MultipartFile file) { |
| | | String fileName = file.getOriginalFilename(); |
| | | BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream()); |
| | | Long attachId = buildAttach(fileName, file.getSize(), bladeFile); |
| | | bladeFile.setAttachId(attachId); |
| | | return R.data(bladeFile); |
| | | } |
| | | // /** |
| | | // * ä¸ä¼ æä»¶å¹¶ä¿åè³é件表 |
| | | // * |
| | | // * @param file æä»¶ |
| | | // * @return ObjectStat |
| | | // */ |
| | | // @SneakyThrows |
| | | // @PostMapping("/put-file-attach") |
| | | // public R<BladeFile> putFileAttach(@RequestParam MultipartFile file) { |
| | | // String fileName = file.getOriginalFilename(); |
| | | // BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream()); |
| | | // Long attachId = buildAttach(fileName, file.getSize(), bladeFile); |
| | | // bladeFile.setAttachId(attachId); |
| | | // return R.data(bladeFile); |
| | | // } |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶å¹¶ä¿åè³é件表 |
| | | * |
| | | * @param fileName å卿¡¶å¯¹è±¡åç§° |
| | | * @param file æä»¶ |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | | @PostMapping("/put-file-attach-by-name") |
| | | public R<BladeFile> putFileAttach(@RequestParam String fileName, @RequestParam MultipartFile file) { |
| | | BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream()); |
| | | Long attachId = buildAttach(fileName, file.getSize(), bladeFile); |
| | | bladeFile.setAttachId(attachId); |
| | | return R.data(bladeFile); |
| | | } |
| | | // /** |
| | | // * ä¸ä¼ æä»¶å¹¶ä¿åè³é件表 |
| | | // * |
| | | // * @param fileName å卿¡¶å¯¹è±¡åç§° |
| | | // * @param file æä»¶ |
| | | // * @return ObjectStat |
| | | // */ |
| | | // @SneakyThrows |
| | | // @PostMapping("/put-file-attach-by-name") |
| | | // public R<BladeFile> putFileAttach(@RequestParam String fileName, @RequestParam MultipartFile file) { |
| | | // BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream()); |
| | | // Long attachId = buildAttach(fileName, file.getSize(), bladeFile); |
| | | // bladeFile.setAttachId(attachId); |
| | | // return R.data(bladeFile); |
| | | // } |
| | | |
| | | /** |
| | | * æå»ºé件表 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.resource.entity.FileObject; |
| | | |
| | | /** |
| | | * æä»¶çæ°æ®æä½ç±» |
| | | * @author weidy |
| | | * @date 2023/6/9 |
| | | */ |
| | | public interface FileObjectMapper extends BaseMapper<FileObject> { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.vci.ubcs.resource.bo.FileObjectBO; |
| | | import com.vci.ubcs.resource.dto.FileObjectDTO; |
| | | import com.vci.ubcs.resource.dto.FileReleaseDTO; |
| | | import com.vci.ubcs.resource.dto.FileShareDTO; |
| | | import com.vci.ubcs.resource.entity.FileObject; |
| | | import com.vci.ubcs.resource.query.FileQuery; |
| | | import com.vci.ubcs.resource.vo.FileObjectVO; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä»¶çæå¡ |
| | | * @author weidy |
| | | * @date 2023/1/31 |
| | | */ |
| | | public interface IFileService extends IService<FileObject> { |
| | | |
| | | /** |
| | | * ä¸è½½ï¼æ³¨æå¤ä¸ªæä»¶çæ¶åï¼ä¼èªå¨ä¸è½½ä¸ºä¸ä¸ªå缩å
|
| | | * @param oids 主é®éå |
| | | * @return æä»¶çä¿¡æ¯ |
| | | */ |
| | | FileObjectBO downloadFileByOids(Collection<String> oids); |
| | | |
| | | /** |
| | | * å 餿件 |
| | | * @param oids 主é®éå |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | void deleteFiles(Collection<String> oids); |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶ |
| | | * @param file æä»¶çä¿¡æ¯ |
| | | * @param fileObjectDTO æä»¶çç¸å
³ä¿¡æ¯ |
| | | * @return æä»¶ä¸ä¼ åçä¿¡æ¯ |
| | | */ |
| | | R<FileObjectVO> uploadFile(MultipartFile file, FileObjectDTO fileObjectDTO); |
| | | |
| | | /** |
| | | * ä¿®æ¹æä»¶çä¿¡æ¯ï¼ä¸ä¼æ¹objectNameåfilePath) |
| | | * @param fileDTOs æä»¶çä¿¡æ¯ |
| | | * @return ä¿®æ¹åçä¿¡æ¯ |
| | | */ |
| | | R<List<FileObjectVO>> updateFileInfos(Collection<FileObjectDTO> fileDTOs); |
| | | |
| | | FileObjectVO do2Vo(FileObject fileObject); |
| | | |
| | | List<FileObjectVO> do2Vos(Collection<FileObject> fileObjects); |
| | | |
| | | /** |
| | | * å享æä»¶å°å
¶ä»æ°æ®ä¸ |
| | | * |
| | | * @param shareDTO æ¥æºä¸å¡ |
| | | * @return å享åçæä»¶ä¿¡æ¯ |
| | | */ |
| | | R<List<FileObjectVO>> shareFiles(FileShareDTO shareDTO); |
| | | |
| | | /** |
| | | * æä»¶å表æ¥è¯¢ |
| | | * @param fileQuery æä»¶æ¥è¯¢ |
| | | * @param query å页æ¥è¯¢å¯¹è±¡ |
| | | * @return æä»¶çæ¾ç¤ºä¿¡æ¯ |
| | | */ |
| | | IPage<FileObjectVO> listFiles(FileQuery fileQuery, Query query); |
| | | |
| | | /** |
| | | * ä½¿ç¨æä»¶ç䏻鮿¹éè·å对象 |
| | | * @param oids æä»¶ç主é®éå |
| | | * @return æä»¶çæ¾ç¤ºä¿¡æ¯ |
| | | */ |
| | | List<FileObjectVO> listFilesByOids(Collection<String> oids); |
| | | |
| | | /** |
| | | * æä»¶çæ |
| | | * @param oids 主é®éå |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | R releasedFiles(Collection<String> oids); |
| | | |
| | | /** |
| | | * æ¹éæå®æä»¶ä¸å¡æ°æ®åçæ |
| | | * @param releaseDTOS çæçç¸å
³ä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | R releasedFilesForOwn(Collection<FileReleaseDTO> releaseDTOS); |
| | | |
| | | /** |
| | | * å¨ä¸ä¼ æä»¶åï¼ä¿åæä»¶çä¿¡æ¯ |
| | | * @param fileObjectDTO æä»¶ä¿¡æ¯ä¼ è¾å¯¹è±¡ |
| | | * @return æä»¶ä¿¡æ¯æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | R<FileObjectVO> saveFileAfterUpload(FileObjectDTO fileObjectDTO); |
| | | |
| | | |
| | | /** |
| | | * è·å对象 |
| | | * @param oid ä¸»é® |
| | | * @return æä»¶çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | FileObjectVO get(String oid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.resource.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.vci.ubcs.resource.bo.FileObjectBO; |
| | | import com.vci.ubcs.resource.dto.FileObjectDTO; |
| | | import com.vci.ubcs.resource.dto.FileReleaseDTO; |
| | | import com.vci.ubcs.resource.dto.FileShareDTO; |
| | | import com.vci.ubcs.resource.entity.Attach; |
| | | import com.vci.ubcs.resource.entity.FileObject; |
| | | import com.vci.ubcs.resource.life.FileLife; |
| | | import com.vci.ubcs.resource.mapper.FileObjectMapper; |
| | | import com.vci.ubcs.resource.query.FileQuery; |
| | | import com.vci.ubcs.resource.service.IFileService; |
| | | import com.vci.ubcs.resource.utils.FileUtil; |
| | | import com.vci.ubcs.resource.utils.ZipUtil; |
| | | import com.vci.ubcs.resource.vo.FileObjectVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.enumpck.BaseEnum; |
| | | import com.vci.ubcs.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.oss.MinioTemplate; |
| | | import org.springblade.core.oss.OssTemplate; |
| | | import org.springblade.core.oss.model.BladeFile; |
| | | import org.springblade.core.oss.model.OssFile; |
| | | import org.springblade.core.oss.props.OssProperties; |
| | | import org.springblade.core.oss.rule.OssRule; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æä»¶æå¡ |
| | | * @author weidy |
| | | * @date 2023/2/1 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class FileServiceImpl extends ServiceImpl<FileObjectMapper, FileObject> implements IFileService { |
| | | |
| | | /** |
| | | * æä»¶çæ°æ®æä½ç±» |
| | | */ |
| | | @Resource |
| | | private FileObjectMapper fileObjectMapper; |
| | | |
| | | /** |
| | | * å¯¹è±¡çæ¨¡ç |
| | | */ |
| | | @Autowired |
| | | private OssTemplate ossTemplate; |
| | | |
| | | /** |
| | | * æä»¶æå¡çé
ç½® |
| | | */ |
| | | @Autowired |
| | | private OssProperties ossProperties; |
| | | |
| | | /** |
| | | * å缩æä»¶çå·¥å
·ç±» |
| | | */ |
| | | @Autowired |
| | | private ZipUtil zipUtil; |
| | | |
| | | /*** |
| | | * æä»¶çè§å |
| | | */ |
| | | @Autowired |
| | | private OssRule ossRule; |
| | | |
| | | |
| | | /** |
| | | * ä¸è½½ï¼æ³¨æå¤ä¸ªæä»¶çæ¶åï¼ä¼èªå¨ä¸è½½ä¸ºä¸ä¸ªå缩å
|
| | | * |
| | | * @param oids 主é®éå |
| | | * @return æä»¶çä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public FileObjectBO downloadFileByOids(Collection<String> oids) { |
| | | VciBaseUtil.alertNotNull(oids,"æä»¶ç主é®éå"); |
| | | if(log.isDebugEnabled()){ |
| | | log.debug("ä¸è½½æä»¶,",oids.stream().collect(Collectors.joining(","))); |
| | | } |
| | | Collection<FileObjectVO> fileVOs = listFilesByOids(oids); |
| | | FileObjectBO fileObjectBO = new FileObjectBO(); |
| | | if(fileVOs.size()==1){ |
| | | //åªæä¸ä¸ª |
| | | FileObjectVO objectVO = fileVOs.stream().findFirst().get(); |
| | | BeanUtil.convert(objectVO,fileObjectBO); |
| | | OssFile ossFile = ossTemplate.statFile(objectVO.getBucketName(), objectVO.getObjectName()); |
| | | if(ossFile == null || !StringUtils.hasLength(ossFile.getLink())){ |
| | | throw new VciBaseException("æä»¶å¨åå¨éæ²¡ææ¾å°",oids.toArray(new String[0])); |
| | | } |
| | | URL url = null; |
| | | try { |
| | | url = new URL(ossFile.getLink()); |
| | | } catch (MalformedURLException e) { |
| | | throw new VciBaseException("æä»¶çè·åè·¯å¾æé®é¢",new String[]{ossFile.getLink()},e); |
| | | } |
| | | try { |
| | | fileObjectBO.setInputStream(url.openStream()); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("è·åæä»¶çæµæé®é¢",new String[]{ossFile.getLink()},e); |
| | | } |
| | | }else{ |
| | | //æå¤ä¸ªï¼éè¦ä½¿ç¨zipè¿è¡å缩 |
| | | String tempFolder = FileUtil.getDefaultTempFolder(); |
| | | fileVOs.stream().forEach(fileVO->{ |
| | | String fileName = tempFolder + File.separator + fileVO.getName() + "." + fileVO.getFileExtension(); |
| | | File file = new File(fileName); |
| | | try { |
| | | if(!file.exists()) { |
| | | file.createNewFile(); |
| | | } |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("å建æä»¶åºé,{0}",new String[]{fileName}); |
| | | } |
| | | OssFile ossFile = ossTemplate.statFile(fileVO.getBucketName(), fileVO.getObjectName()); |
| | | if(ossFile == null || !StringUtils.hasLength(ossFile.getLink())){ |
| | | throw new VciBaseException("æä»¶å¨åå¨éæ²¡ææ¾å°",oids.toArray(new String[0])); |
| | | } |
| | | URL url = null; |
| | | try { |
| | | url = new URL(ossFile.getLink()); |
| | | } catch (MalformedURLException e) { |
| | | throw new VciBaseException("æä»¶çè·åè·¯å¾æé®é¢",new String[]{ossFile.getLink()},e); |
| | | } |
| | | try(OutputStream os = new FileOutputStream(file); |
| | | InputStream ins = url.openStream(); |
| | | ){ |
| | | IOUtils.copy(ins,os); |
| | | }catch (Throwable e){ |
| | | throw new VciBaseException("ä¸è½½æä»¶å°ä¸´æ¶æä»¶å¤¹éåºé,{0}",new String[]{fileName}); |
| | | } |
| | | }); |
| | | String zipName = new File(tempFolder).getPath() + File.separator + fileVOs.stream().findFirst().get().getName() + "ç"+fileVOs.size() + "个æä»¶.zip"; |
| | | zipUtil.folderToZipFile(tempFolder,zipName); |
| | | fileObjectBO.setFileLocalPath(zipName); |
| | | if(log.isDebugEnabled()){ |
| | | log.debug("ä¸è½½æä»¶çä¿¡æ¯,",zipName); |
| | | } |
| | | } |
| | | return fileObjectBO; |
| | | } |
| | | |
| | | /** |
| | | * å 餿件 |
| | | * |
| | | * @param oids 主é®éå |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | @Transactional() |
| | | public void deleteFiles(Collection<String> oids) { |
| | | VciBaseUtil.alertNotNull(oids,"æä»¶ç主é®éå"); |
| | | if(log.isDebugEnabled()){ |
| | | log.debug("å 餿件,",oids.stream().collect(Collectors.joining(","))); |
| | | } |
| | | Collection<FileObject> fileObjects = listByIds(oids); |
| | | if(!CollectionUtils.isEmpty(fileObjects)){ |
| | | VciBaseUtil.switchCollectionForOracleIn(fileObjects).stream().forEach(fileDOs->{ |
| | | fileObjectMapper.deleteBatchIds(fileDOs.stream().map(FileObject::getId).collect(Collectors.toList())); |
| | | }); |
| | | //å é¤minioéçæä»¶ |
| | | fileObjects.parallelStream().forEach(fileObject -> { |
| | | ossTemplate.removeFile(fileObject.getBucketName(),fileObject.getObjectName()); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶ |
| | | * |
| | | * @param file æä»¶çä¿¡æ¯ |
| | | * @param fileObjectDTO æä»¶çç¸å
³ä¿¡æ¯ |
| | | * @return æä»¶ä¸ä¼ åçä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R<FileObjectVO> uploadFile(MultipartFile file, FileObjectDTO fileObjectDTO) { |
| | | VciBaseUtil.alertNotNull(fileObjectDTO,"æä»¶çä¿¡æ¯"); |
| | | |
| | | String sourceFileName = file.getOriginalFilename(); |
| | | String fileExtension = FileUtil.getFileExtensionByName(sourceFileName); |
| | | String fileNameNoExtension = FileUtil.getFileNameUnHasExtensionByName(sourceFileName); |
| | | |
| | | if(fileObjectDTO.getUpdateFileFlag()==null || !fileObjectDTO.getUpdateFileFlag()) { |
| | | return R.data(add(fileObjectDTO,file)); |
| | | }else{ |
| | | //ä¿®æ¹ï¼éè¦å
è·å |
| | | VciBaseUtil.alertNotNull(fileObjectDTO.getOid(),"æä»¶ç主é®"); |
| | | FileObject fileObject = getById(fileObjectDTO.getOid()); |
| | | if (StringUtils.hasLength(fileObjectDTO.getId())) { |
| | | fileObject.setId(fileNameNoExtension); |
| | | } |
| | | fileObject.setName(fileNameNoExtension); |
| | | fileObject.setFileExtension(fileExtension); |
| | | fileObject.setFileSize(file.getSize()); |
| | | //以åçä¿¡æ¯å
è·å |
| | | String oldObjectName = fileObject.getObjectName(); |
| | | String oldBucketName = fileObject.getBucketName(); |
| | | |
| | | String bucketName = StringUtils.hasLength(fileObjectDTO.getBucketName())?fileObjectDTO.getBucketName():ossProperties.getBucketName(); |
| | | BladeFile bladeFile = ossTemplate.putFile(bucketName,file.getOriginalFilename(),file); |
| | | |
| | | fileObject.setBucketName(bucketName); |
| | | fileObject.setObjectName(bladeFile.getName()); |
| | | fileObject.setFileLink(bladeFile.getLink()); |
| | | fileObjectMapper.updateById(fileObject); |
| | | //å é¤ä»¥åç |
| | | ossTemplate.removeFile(oldBucketName,oldObjectName); |
| | | if(log.isDebugEnabled()){ |
| | | log.debug("ä¿®æ¹æä»¶",fileObject.toString(),oldObjectName,oldBucketName); |
| | | } |
| | | FileObjectVO fileObjectVO = do2Vo(fileObject); |
| | | return R.data(fileObjectVO); |
| | | } |
| | | } |
| | | |
| | | private FileObjectVO add(FileObjectDTO fileObjectDTO,MultipartFile file){ |
| | | String sourceFileName = file.getOriginalFilename(); |
| | | String fileExtension = FileUtil.getFileExtensionByName(sourceFileName); |
| | | String fileNameNoExtension = FileUtil.getFileNameUnHasExtensionByName(sourceFileName); |
| | | |
| | | //åå¨ä¸å¡æ°æ®ä¸æä»¶ä¿¡æ¯ |
| | | FileObject fileObject = new FileObject(); |
| | | BeanUtil.convert(fileObjectDTO, fileObject); |
| | | if (!StringUtils.hasLength(fileObject.getId())) { |
| | | fileObject.setId(fileNameNoExtension); |
| | | } |
| | | if (!StringUtils.hasLength(fileObject.getName())) { |
| | | fileObject.setName(fileNameNoExtension); |
| | | } |
| | | fileObject.setFileExtension(fileExtension); |
| | | fileObject.setFileSize(file.getSize()); |
| | | if (!StringUtils.hasLength(fileObject.getOid())) { |
| | | fileObject.setOid(VciBaseUtil.getPk()); |
| | | } |
| | | if (fileObjectDTO.getEffect() != null && fileObjectDTO.getEffect()) { |
| | | fileObject.setLcStatus(FileLife.FILE_RELEASE.getValue()); |
| | | } else { |
| | | fileObject.setLcStatus(FileLife.TRANS_FINISH.getValue()); |
| | | } |
| | | if (fileObject.getSecretGrade() == null || fileObject.getSecretGrade() == 0) { |
| | | // VciBaseUtil.getCurrentUserSecret()è¿éè¦å¤çï¼å¨è¿å
¥æå¡çæ¶åï¼æ ¹æ®å½åç¨æ·çä¿¡æ¯è·åç¨æ·ç对象 |
| | | fileObject.setSecretGrade( VciBaseUtil.getCurrentUserSecret()); |
| | | } |
| | | String bucketName = StringUtils.hasLength(fileObjectDTO.getBucketName())?fileObjectDTO.getBucketName():ossProperties.getBucketName(); |
| | | //å
åå°Minioåå说 |
| | | BladeFile bladeFile = ossTemplate.putFile(bucketName,file.getOriginalFilename(),file); |
| | | |
| | | fileObject.setBucketName(bucketName); |
| | | fileObject.setObjectName(bladeFile.getName()); |
| | | fileObject.setFileLink(bladeFile.getLink()); |
| | | fileObjectMapper.insert(fileObject); |
| | | if(log.isDebugEnabled()){ |
| | | log.debug("æ°å¢æä»¶",fileObject.toString()); |
| | | } |
| | | FileObjectVO fileObjectVO = do2Vo(fileObject); |
| | | return fileObjectVO; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¾ç¤ºå¯¹è±¡ |
| | | * @param fileObject æä»¶çæ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public FileObjectVO do2Vo(FileObject fileObject) { |
| | | FileObjectVO fileObjectVO = new FileObjectVO(); |
| | | BeanUtil.convert(fileObject,fileObjectVO); |
| | | fileObjectVO.setLcStatusText(BaseEnum.getTextByValue(FileLife.class,fileObjectVO.getLcStatus())); |
| | | //fileObjectVO.setSecretGradeText(UserSecretEnum); |
| | | return fileObjectVO; |
| | | } |
| | | |
| | | @Override |
| | | public List<FileObjectVO> do2Vos(Collection<FileObject> fileObjects){ |
| | | List<FileObjectVO> fileObjectVOList = new ArrayList<>(); |
| | | Optional.ofNullable(fileObjects).orElseGet(ArrayList::new).stream().forEach(fo->{ |
| | | fileObjectVOList.add(do2Vo(fo)); |
| | | }); |
| | | return fileObjectVOList; |
| | | } |
| | | |
| | | /** |
| | | * å享æä»¶å°å
¶ä»æ°æ®ä¸ |
| | | * |
| | | * @param shareDTO æ¥æºä¸å¡ |
| | | * @return å享åçæä»¶ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R<List<FileObjectVO>> shareFiles(FileShareDTO shareDTO) { |
| | | VciBaseUtil.alertNotNull(shareDTO,"å享çä¿¡æ¯",shareDTO.getTargetBus(),"ç®æ çä¸å¡åç§°",shareDTO.getTargetBusOid(),"ç®æ çä¸å¡æ°æ®ä¸»é®"); |
| | | List<FileObject> fileObjectList = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(shareDTO.getOids())){ |
| | | fileObjectList.addAll(listByIds(shareDTO.getOids())); |
| | | } |
| | | LambdaQueryWrapper<FileObject> queryWrapper = new LambdaQueryWrapper<FileObject>(FileObject.class); |
| | | if(StringUtils.hasLength(shareDTO.getSourceBus())) { |
| | | queryWrapper.in(FileObject::getOwnBtmName, VciBaseUtil.str2List(shareDTO.getSourceBus())); |
| | | } |
| | | if(StringUtils.hasLength(shareDTO.getSourceBusOid())){ |
| | | queryWrapper.in(FileObject::getOwnbizOid,VciBaseUtil.str2List(shareDTO.getSourceBusOid())); |
| | | } |
| | | fileObjectList.addAll(fileObjectMapper.selectList(queryWrapper)); |
| | | |
| | | if(CollectionUtils.isEmpty(fileObjectList)){ |
| | | throw new VciBaseException("æ²¡ææ¾å°å¯ä»¥å享çæä»¶"); |
| | | } |
| | | BladeUser user = AuthUtil.getUser(); |
| | | Date now = new Date(); |
| | | List<FileObject> newFileObjects = new ArrayList<>(); |
| | | fileObjectList.stream().forEach(fileObject -> { |
| | | FileObject newFileObject = new FileObject(); |
| | | BeanUtil.convert(fileObject,newFileObject); |
| | | newFileObject.setId(VciBaseUtil.getPk()); |
| | | newFileObject.setNameOid(VciBaseUtil.getPk()); |
| | | newFileObject.setRevisionOid(VciBaseUtil.getPk()); |
| | | newFileObject.setCreator(user.getAccount()); |
| | | newFileObject.setCreateTime(now); |
| | | newFileObject.setLastModifier(user.getAccount()); |
| | | newFileObject.setLastModifyTime(now); |
| | | newFileObject.setTs(now); |
| | | newFileObject.setOwnBtmName(shareDTO.getTargetBus()); |
| | | newFileObject.setOwnbizOid(shareDTO.getTargetBusOid()); |
| | | newFileObject.setObjectName(ossRule.fileName( "." + fileObject.getFileExtension())); |
| | | |
| | | //ä¸è½½æä»¶åï¼ä¸ä¼ æä»¶ |
| | | ossTemplate.copyFile(fileObject.getBucketName(),fileObject.getObjectName(),fileObject.getBucketName(),newFileObject.getObjectName()); |
| | | newFileObject.setFileLink(ossTemplate.fileLink(newFileObject.getBucketName(),newFileObject.getObjectName())); |
| | | newFileObjects.add(newFileObject); |
| | | }); |
| | | newFileObjects.stream().forEach(fileObject -> { |
| | | fileObjectMapper.insert(fileObject); |
| | | |
| | | }); |
| | | return R.data(do2Vos(newFileObjects)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æä»¶çä¿¡æ¯ï¼ä¸ä¼æ¹objectNameåfilePath) |
| | | * |
| | | * @param fileDTOs æä»¶çä¿¡æ¯ |
| | | * @return ä¿®æ¹åçä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R<List<FileObjectVO>> updateFileInfos(Collection<FileObjectDTO> fileDTOs) { |
| | | VciBaseUtil.alertNotNull(fileDTOs,"è¦æ´æ°çæä»¶çä¿¡æ¯"); |
| | | if(fileDTOs.stream().anyMatch(s->!StringUtils.hasLength(s.getId()))){ |
| | | throw new VciBaseException("è¦æ´æ°çæä»¶ä¿¡æ¯ç主é®ä¸è½ä¸ºç©º"); |
| | | } |
| | | Map<String, FileObject> fileObjectMap = Optional.ofNullable(listByIds(fileDTOs.stream().map(FileObjectDTO::getId).collect(Collectors.toList()))).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(s -> s.getOid(), t -> t, (o1, o2) -> o1)); |
| | | BladeUser user = AuthUtil.getUser(); |
| | | Date now = new Date(); |
| | | fileDTOs.stream().forEach(fileDTO->{ |
| | | if(!fileObjectMap.containsKey(fileDTO.getOid())){ |
| | | throw new VciBaseException("å称为{0}çæä»¶å¨ç³»ç»éä¸åå¨",new String[]{StringUtils.hasLength(fileDTO.getId())?fileDTO.getId():fileDTO.getName()}); |
| | | } |
| | | FileObject fileObject = fileObjectMap.get(fileDTO.getId()); |
| | | String oldObjectName = fileObject.getObjectName(); |
| | | String oldBucketName = fileObject.getBucketName(); |
| | | String filePath = fileObject.getFileLink(); |
| | | BeanUtil.convert(fileDTO,fileObject); |
| | | fileObject.setObjectName(oldObjectName); |
| | | fileObject.setBucketName(oldBucketName); |
| | | fileObject.setFileLink(filePath); |
| | | fileObject.setLastModifier(user.getAccount()); |
| | | fileObject.setLastModifyTime(now); |
| | | fileObject.setTs(now); |
| | | }); |
| | | fileObjectMap.values().stream().forEach(fileObject -> { |
| | | fileObjectMapper.updateById(fileObject); |
| | | }); |
| | | return R.data(do2Vos(fileObjectMap.values())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æä»¶å表æ¥è¯¢ |
| | | * |
| | | * @param fileQuery æä»¶æ¥è¯¢ |
| | | * @return æä»¶çæ¾ç¤ºä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public IPage<FileObjectVO> listFiles(FileQuery fileQuery, Query query){ |
| | | IPage<FileObject> pages = page(Condition.getPage(query), Condition.getQueryWrapper(fileQuery)); |
| | | return pages.convert((fileObject -> do2Vo(fileObject))); |
| | | } |
| | | |
| | | /** |
| | | * ä½¿ç¨æä»¶ç䏻鮿¹éè·å对象 |
| | | * |
| | | * @param oids æä»¶ç主é®éå |
| | | * @return æä»¶çæ¾ç¤ºä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<FileObjectVO> listFilesByOids(Collection<String> oids) { |
| | | return do2Vos(listByIds(oids)); |
| | | } |
| | | |
| | | /** |
| | | * æä»¶çæ |
| | | * |
| | | * @param oids 主é®éå |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R releasedFiles(Collection<String> oids) { |
| | | Collection<FileObject> fileObjects = listByIds(oids); |
| | | if(!CollectionUtils.isEmpty(fileObjects)){ |
| | | fileObjects.stream().forEach(obj->{ |
| | | obj.setLcStatus(FileLife.FILE_RELEASE.getValue()); |
| | | fileObjectMapper.updateById(obj); |
| | | }); |
| | | } |
| | | return R.success("çææå"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæå®æä»¶ä¸å¡æ°æ®åçæ |
| | | * |
| | | * @param releaseDTOS çæçç¸å
³ä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R releasedFilesForOwn(Collection<FileReleaseDTO> releaseDTOS) { |
| | | VciBaseUtil.alertNotNull(releaseDTOS,"åå¸çä¿¡æ¯"); |
| | | List<FileObject> fileObjectList = new ArrayList<>(); |
| | | List<String> oids = new ArrayList<>(); |
| | | releaseDTOS.stream().filter(s->!CollectionUtils.isEmpty(s.getOids())).forEach(dtos->{ |
| | | oids.addAll(dtos.getOids()); |
| | | }); |
| | | if(!CollectionUtils.isEmpty(oids)){ |
| | | fileObjectList.addAll(listByIds(oids)); |
| | | } |
| | | releaseDTOS.stream().forEach(dto->{ |
| | | LambdaQueryWrapper<FileObject> queryWrapper = new LambdaQueryWrapper<>(FileObject.class); |
| | | if(StringUtils.hasLength(dto.getOwnBtmName())) { |
| | | queryWrapper.in(FileObject::getOwnBtmName, VciBaseUtil.str2List(dto.getOwnBtmName())); |
| | | } |
| | | if(StringUtils.hasLength(dto.getOwnbizOid())) { |
| | | queryWrapper.in(FileObject::getOwnbizOid, VciBaseUtil.str2List(dto.getOwnbizOid())); |
| | | } |
| | | fileObjectList.addAll(fileObjectMapper.selectList(queryWrapper)); |
| | | }); |
| | | if(!CollectionUtils.isEmpty(fileObjectList)){ |
| | | fileObjectList.stream().forEach(objs->{ |
| | | objs.setLcStatus(FileLife.FILE_RELEASE.getValue()); |
| | | fileObjectMapper.updateById(objs); |
| | | }); |
| | | } |
| | | return R.success("çææå"); |
| | | } |
| | | |
| | | /** |
| | | * å¨ä¸ä¼ æä»¶åï¼ä¿åæä»¶çä¿¡æ¯ |
| | | * |
| | | * @param fileObjectDTO æä»¶ä¿¡æ¯ä¼ è¾å¯¹è±¡ |
| | | * @return æä»¶ä¿¡æ¯æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public R<FileObjectVO> saveFileAfterUpload(FileObjectDTO fileObjectDTO) { |
| | | if(fileObjectDTO.getEffect() !=null && fileObjectDTO.getEffect() && !StringUtils.hasLength(fileObjectDTO.getLcStatus())){ |
| | | fileObjectDTO.setLcStatus(FileLife.FILE_RELEASE.getValue()); |
| | | } |
| | | return R.data(addOnlyInfo(fileObjectDTO)); |
| | | } |
| | | |
| | | /** |
| | | * è·å对象 |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return æä»¶çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public FileObjectVO get(String oid) { |
| | | return do2Vo(getById(oid)); |
| | | } |
| | | |
| | | /** |
| | | * ä»
æ·»å ä¿¡æ¯ |
| | | * @param fileObjectDTO æä»¶çæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public FileObjectVO addOnlyInfo(FileObjectDTO fileObjectDTO){ |
| | | //åå¨ä¸å¡æ°æ®ä¸æä»¶ä¿¡æ¯ |
| | | FileObject fileObject = new FileObject(); |
| | | BeanUtil.convert(fileObjectDTO, fileObject); |
| | | if (!StringUtils.hasLength(fileObject.getOid())) { |
| | | fileObject.setOid(VciBaseUtil.getPk()); |
| | | } |
| | | if (fileObject.getSecretGrade() == null || fileObject.getSecretGrade() == 0) { |
| | | // VciBaseUtil.getCurrentUserSecret()è¿éè¦å¤çï¼å¨è¿å
¥æå¡çæ¶åï¼æ ¹æ®å½åç¨æ·çä¿¡æ¯è·åç¨æ·ç对象 |
| | | fileObject.setSecretGrade( VciBaseUtil.getCurrentUserSecret()); |
| | | } |
| | | fileObjectMapper.insert(fileObject); |
| | | if(log.isDebugEnabled()){ |
| | | log.debug("æ°å¢æä»¶",fileObject.toString()); |
| | | } |
| | | return do2Vo(fileObject); |
| | | } |
| | | |
| | | } |
| | |
| | | <name>${project.artifactId}</name> |
| | | <version>${bladex.project.version}</version> |
| | | <dependencies> |
| | | |
| | | <!--<dependency> |
| | | <groupId>com.thoughtworks.xstream</groupId> |
| | | <artifactId>xstream</artifactId> |
| | |
| | | <version>1.0-SNAPSHOT</version> |
| | | <scope>compile</scope> |
| | | </dependency>--> |
| | | |
| | | <!--<dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>vci-platform-web</artifactId> |
| | |
| | | <groupId>com.thoughtworks.xstream</groupId> |
| | | <artifactId>xstream</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | <packaging>jar</packaging> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.bo; |
| | | |
| | | import org.omg.CORBA.portable.IDLEntity; |
| | | |
| | | public class AttributeValue implements IDLEntity { |
| | | public String attrName = ""; |
| | | public String attrVal = ""; |
| | | |
| | | public AttributeValue() { |
| | | } |
| | | |
| | | public AttributeValue(String attrName, String attrVal) { |
| | | this.attrName = attrName; |
| | | this.attrVal = attrVal; |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç æ®µåºç¡ä¿¡æ¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeBasicSecDTO extends BaseModelVO { |
| | | public class CodeBasicSecDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ä¸çæé®æ©å±æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeButtonDTO extends BaseModelVO { |
| | | public class CodeButtonDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * 主é¢åºåç±»æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-20 |
| | | */ |
| | | public class CodeClassifyDTO extends BaseModelVO { |
| | | public class CodeClassifyDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * @date 2022-01-24 |
| | | */ |
| | | @Data |
| | | public class CodeClassifyProcessTempDTO extends BaseModelVO { |
| | | public class CodeClassifyProcessTempDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * æ å°è§åçæç»æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-03-10 |
| | | */ |
| | | public class CodeClassifyTempMapItemDTO extends BaseModelVO { |
| | | public class CodeClassifyTempMapItemDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | */ |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeClassifyTemplateAttrDTO extends BaseModelVO { |
| | | public class CodeClassifyTemplateAttrDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * @date 2022-01-24 |
| | | */ |
| | | @Data |
| | | public class CodeClassifyTemplateButtonDTO extends BaseModelVO { |
| | | public class CodeClassifyTemplateButtonDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * å类模æ¿å¯¹è±¡æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeClassifyTemplateDTO extends BaseModelVO { |
| | | public class CodeClassifyTemplateDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * 主é¢åºæ¨¡æ¿æ å°è§åæ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeClassifyTemplateMapDTO extends BaseModelVO { |
| | | public class CodeClassifyTemplateMapDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * @date 2022-04-24 |
| | | */ |
| | | @Data |
| | | public class CodeClassifyValueDTO extends BaseModelVO { |
| | | public class CodeClassifyValueDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * åºå®ç 段çç 弿°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author ludc |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeFixedValueDTO extends BaseModelVO { |
| | | public class CodeFixedValueDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * å
³é®æ°æ®æ¥éè§åæ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeKeyAttrRepeatRuleDTO extends BaseModelVO { |
| | | public class CodeKeyAttrRepeatRuleDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * é¶æ®µç屿§æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodePhaseAttrDTO extends BaseModelVO { |
| | | public class CodePhaseAttrDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç¸ä¼¼æ¥è¯¢è§åæ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-10 |
| | | */ |
| | | public class CodeResembleRuleDTO extends BaseModelVO { |
| | | public class CodeResembleRuleDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * åä¹è¯é
ç½®æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-02-17 |
| | | */ |
| | | public class CodeSynonymDTO extends BaseModelVO { |
| | | public class CodeSynonymDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2022-01-24 |
| | | */ |
| | | @Data |
| | | public class CodeTemplatePhaseDTO extends BaseModelVO { |
| | | public class CodeTemplatePhaseDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * èµæºå¯¹æ¥éç¥ãæ¥è¯¢æ¥å£æ¥å¿æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-03-28 |
| | | */ |
| | | public class DockingLogeDTO extends BaseModelVO { |
| | | public class DockingLogeDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * è®°å½å·¥èºæ¨éè¿æ¥çæ°æ®ä¿¡æ¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-05 |
| | | */ |
| | | public class DockingPreApplyDataDTO extends BaseModelVO { |
| | | public class DockingPreApplyDataDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * è®°å½å·¥èºæ¨éè¿æ¥çæ°æ®ä¿¡æ¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-05 |
| | | */ |
| | | public class DockingPreApplyDataInfoDTO extends BaseModelVO { |
| | | public class DockingPreApplyDataInfoDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.SysIntHeaderVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.SysIntParamVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author lihang |
| | | * @date 2022-03-07 |
| | | */ |
| | | public class DockingSystemConfigDTO extends BaseModelVO { |
| | | public class DockingSystemConfigDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éæçç³»ç»ä¿¡æ¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author lihang |
| | | * @date 2022-03-07 |
| | | */ |
| | | public class DockingSystemDTO extends BaseModelVO { |
| | | public class DockingSystemDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * èµæºå¯¹æ¥éç¥ãæ¥è¯¢æ¥å£å¾
æ¨é任塿°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-03-28 |
| | | */ |
| | | public class DockingTaskDTO extends BaseModelVO { |
| | | public class DockingTaskDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éææ¥å£çè®¤è¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author lihang |
| | | * @date 2022-03-07 |
| | | */ |
| | | public class SysIntAuthorityDTO extends BaseModelVO { |
| | | public class SysIntAuthorityDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éææ¥å£çè®¤è¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-11 |
| | | */ |
| | | public class SysIntHeaderDTO extends BaseModelVO { |
| | | public class SysIntHeaderDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class SysIntInfoBseDTO extends BaseModelVO { |
| | | public class SysIntInfoBseDTO extends BaseModel { |
| | | private DockingSystemConfigDTO sysIntInfoDTO; |
| | | |
| | | private List<SysIntParamDTO> sysIntParamDTO; |
| | |
| | | package com.vci.ubcs.code.dto; |
| | | |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éææ¥å£çè®¤è¯æ°æ®ä¼ è¾å¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-11 |
| | | */ |
| | | public class SysIntParamDTO extends BaseModelVO { |
| | | public class SysIntParamDTO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @since 2023-04-03 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_ALLCODE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_ALLCODE) |
| | | @ApiModel(value = "CodeAllCode对象", description = "å
¨é¨ç å¼") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeAllCode extends BaseModel { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import com.vci.ubcs.starter.annotation.Transient; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.apache.ibatis.type.Alias; |
| | | |
| | | import java.sql.Clob; |
| | | |
| | |
| | | * @date 2022-1-18 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_BASICSEC") |
| | | @TableName(CodeTableNameConstant.PL_CODE_BASICSEC) |
| | | @ApiModel(value = "CodeBasicSec对象", description = "ç æ®µåºç¡ä¿¡æ¯") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeBasicSec extends BaseModel { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.web.annotation.VciUseEnum; |
| | | import com.vci.ubcs.starter.web.constant.MdmEnumIdConstant; |
| | |
| | | * @since 2023-03-29 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_BUTTON") |
| | | @TableName(CodeTableNameConstant.PL_CODE_BUTTON) |
| | | @ApiModel(value = "codebutton对象", description = "æ¨¡æ¿æ©å±æ± ") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeButton extends BaseModel { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.annotation.Transient; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | */ |
| | | //@VciBtmType(name = MdmBtmTypeConstant.CODE_CLASSIFY,text = "主é¢åºåç±»",lifeCycle = FrameWorkLcStatusConstant.FRAME_WORK_LIFE_CYCLE_NAME) |
| | | @Data |
| | | @TableName("PL_CODE_CLASSIFY") |
| | | @TableName(CodeTableNameConstant.PL_CODE_CLASSIFY) |
| | | @ApiModel(value = "CodeClassify对象", description = "主é¢åºçåç±»") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeClassify extends BaseModel { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.web.annotation.VciUseEnum; |
| | | import com.vci.ubcs.starter.web.constant.MdmEnumIdConstant; |
| | |
| | | * @date 2023/5/5 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_CLSFLOWTEMP") |
| | | @TableName(CodeTableNameConstant.PL_CODE_CLSFLOWTEMP) |
| | | @ApiModel(value = "CodeTempphase对象", description = "å类使ç¨çæµç¨æ¨¡æ¿") |
| | | public class CodeClassifyProcessTemp extends BaseModel { |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.annotation.Transient; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * @since 2023-04-10 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_CLSTEMPLATE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_CLSTEMPLATE) |
| | | @ApiModel(value = "PlCodeClstemplate对象", description = "ç¼ç åºå®ä¹-模æ¿ç®¡ç") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeClassifyTemplate extends BaseModel { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.web.annotation.VciFieldType; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | |
| | | */ |
| | | //@VciBtmType(name = MdmBtmTypeConstant.CODE_CLASSIFY_TEMPLATE_ATTR,text = "主é¢åºåç±»çæ¨¡æ¿å±æ§",lifeCycle = FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE) |
| | | @Data |
| | | @TableName("PL_CODE_CLSTEMPATTR") |
| | | @TableName(CodeTableNameConstant.PL_CODE_CLSTEMPATTR) |
| | | @ApiModel(value = "CodeTempphase对象", description = "ç¼ç åºå®ä¹-模æ¿é¶æ®µ") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeClassifyTemplateAttr extends BaseModel { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | * @since 2023-04-20 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_TEMPBUTTON") |
| | | @TableName(CodeTableNameConstant.PL_CODE_TEMPBUTTON) |
| | | @ApiModel(value = "CodeTempbutton对象", description = "ç¼ç åºå®ä¹-æ¨¡æ¿æé®æ©å±") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeClassifyTemplateButton extends BaseModel { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @date 2023/4/5 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_CLASSIFYVALUE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_CLASSIFYVALUE) |
| | | @ApiModel(value = "CodeClassify对象", description = "åç±»ç æ®µçç å¼") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeClassifyValue extends BaseModel { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @date 2022-1-18 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_FIXEDVALUE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_FIXEDVALUE) |
| | | @ApiModel(value = "CodeFixedValue对象", description = "åºå®ç 段çç å¼") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeFixedValue extends BaseModel { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * @since 2023-04-03 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_KEYATTRREPEAT") |
| | | @TableName(CodeTableNameConstant.PL_CODE_KEYATTRREPEAT) |
| | | @ApiModel(value = "PlCodeKeyattrrepeat对象", description = "å
³é®å±æ§æ¥éè§å") |
| | | //@EqualsAndHashCode(callSuper = true) |
| | | public class CodeKeyAttrRepeat implements Serializable { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | * @since 2023-04-20 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_PHASEATTR") |
| | | @TableName(CodeTableNameConstant.PL_CODE_PHASEATTR) |
| | | @ApiModel(value = "CodePhaseattr对象", description = "ç¼ç åºå®ä¹-模æ¿é¶æ®µ-屿§") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodePhaseAttr extends BaseModel { |
| | |
| | | import com.github.yulichang.annotation.EntityMapping; |
| | | import com.vci.ubcs.code.vo.CodeShowFieldConfigVO; |
| | | import com.vci.ubcs.code.vo.CodeSrchCondConfigVO; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç æ®µåºç¡ä¿¡æ¯æ°æ®æä½å± |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½® |
| | | * |
| | | * @author ludc |
| | | * @date 2023/5/19 17:24 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_REFERCONFIG") |
| | | @TableName(CodeTableNameConstant.PL_CODE_REFERCONFIG) |
| | | @ApiModel(value = "CodeReferConfig对象", description = "ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®") |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) //ä¸è¾åºæç©ºå段 |
| | | public class CodeReferConfig extends BaseModel { |
| | |
| | | */ |
| | | private static final long serialVersionUID = 957685333614390234L; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | */ |
| | | @JSONField() |
| | | private String tenantId; |
| | | // /** |
| | | // * ç§æ·ID |
| | | // */ |
| | | // private String tenantId; |
| | | |
| | | /** |
| | | * åç
§çä¸å¡ç±»å |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @since 2023-04-03 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_RULE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_RULE) |
| | | @ApiModel(value = "CodeRule对象", description = "ç¼ç è§å") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeRule extends BaseModel { |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @date 2022-3-1 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_SERIALVALUE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_SERIALVALUE) |
| | | @ApiModel(value = "CodeSerialValue对象", description = "ç¼ç è§åçæµæ°´å¼") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeSerialValue extends BaseModel { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.github.yulichang.annotation.EntityMapping; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @date 2023/5/19 17:35 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_SHOWFIELDCONFIG") |
| | | @TableName(CodeTableNameConstant.PL_CODE_SHOWFIELDCONFIG) |
| | | @ApiModel(value = "CodeShowFieldConfig对象", description = "ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®-æ¾ç¤ºå±æ§é
ç½®") |
| | | public class CodeShowFieldConfig implements Serializable { |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | */ |
| | | |
| | | @Data |
| | | @TableName("PL_CODE_SRCHCONDCONFIG") |
| | | @TableName(CodeTableNameConstant.PL_CODE_SRCHCONDCONFIG) |
| | | @ApiModel(value = "CodeSrchCondConfig对象", description = "ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®-æç´¢æ¡ä»¶é
ç½®") |
| | | public class CodeSrchCondConfig { |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * @since 2023-04-04 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_SYNONYM") |
| | | @TableName(CodeTableNameConstant.PL_CODE_SYNONYM) |
| | | @ApiModel(value = "PlCodeSynonym对象", description = "è¿ä¹è¯ç»´æ¤") |
| | | //@EqualsAndHashCode(callSuper = true) |
| | | public class CodeSynonymEntity implements Serializable { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | * @since 2023-04-20 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_TEMPPHASE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_TEMPPHASE) |
| | | @ApiModel(value = "CodeTempphase对象", description = "ç¼ç åºå®ä¹-模æ¿é¶æ®µ") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeTemplatePhase extends BaseModel { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | * @since 2023-04-20 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_TEMPPHASE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_TEMPPHASE) |
| | | @ApiModel(value = "CodeTempphase对象", description = "ç¼ç åºå®ä¹-模æ¿é¶æ®µ") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeTempphaseEntity extends BaseModel { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | * @since 2023-05-05 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_WUPIN") |
| | | @TableName(CodeTableNameConstant.PL_CODE_WUPIN) |
| | | @ApiModel(value = "CodeWupin对象", description = "ç¼ç ä¿¡æ¯") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeWupin extends BaseModel { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | @Data |
| | | @TableName("PL_DOCKING_LOG") |
| | | @TableName(CodeTableNameConstant.PL_DOCKING_LOG) |
| | | @ApiModel(value = "DockingLog对象", description = "éææ¥å¿å¯¹è±¡") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class DockingLog extends BaseModel { |
| | |
| | | package com.vci.ubcs.code.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | * @date 2023-06-01 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_SYSINTBASE") |
| | | @TableName(CodeTableNameConstant.PL_CODE_SYSINTBASE) |
| | | @ApiModel(value = "DockingSystem", description = "éæç®¡çæ¥å£-éæç³»ç»ç»´æ¤å¯¹è±¡") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class DockingSystem extends BaseModel { |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.code.vo.pagemodel.SysIntHeaderVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.SysIntParamVO; |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | * @date 2023-06-01 |
| | | */ |
| | | @Data |
| | | @TableName("PL_CODE_SYSINTINFO") |
| | | @TableName(CodeTableNameConstant.PL_CODE_SYSINTINFO) |
| | | @ApiModel(value = "DockingSystemConfig", description = "éææ¥å£-éææ¥å£ç®¡ç对象") |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class DockingSystemConfig extends BaseModel{ |
| | |
| | | package com.vci.ubcs.code.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | 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.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.code.entity.CodeShowFieldConfig; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.vci.ubcs.code.entity.CodeSrchCondConfig; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | |
| | | */ |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class CodeAllCodeVO extends BaseModelVO { |
| | | public class CodeAllCodeVO extends BaseModel { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2023-04-24 |
| | | */ |
| | | @Data |
| | | public class CodeBasicSecVO extends BaseModelVO { |
| | | public class CodeBasicSecVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ä¸»æ°æ®ä¸çæé®æ©å±æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeButtonVO extends BaseModelVO { |
| | | public class CodeButtonVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * 主é¢åºåç±»æé屿§éæ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeClassifyAttributeVO extends BaseModelVO { |
| | | public class CodeClassifyAttributeVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.entity.CodeClassifyProcessTemp; |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2023-05-6 |
| | | */ |
| | | @Data |
| | | public class CodeClassifyProcessTempVO extends BaseModelVO { |
| | | public class CodeClassifyProcessTempVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * æ å°è§åçæç»æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-03-10 |
| | | */ |
| | | public class CodeClassifyTempMapItemVO extends BaseModelVO { |
| | | public class CodeClassifyTempMapItemVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * @date 2022-01-24 |
| | | */ |
| | | @Data |
| | | public class CodeClassifyTemplateAttrVO extends BaseModelVO { |
| | | public class CodeClassifyTemplateAttrVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * 主é¢åºæ¨¡æ¿æ å°è§åæ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeClassifyTemplateMapVO extends BaseModelVO { |
| | | public class CodeClassifyTemplateMapVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeClassifyTemplateVO extends BaseModelVO { |
| | | public class CodeClassifyTemplateVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * 主é¢åºåç±»æ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @author weidy |
| | | * @date 2022-01-20 |
| | | */ |
| | | public class CodeClassifyVO extends BaseModelVO { |
| | | public class CodeClassifyVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * åç±»ç æ®µçç 弿¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeClassifyValueVO extends BaseModelVO { |
| | | public class CodeClassifyValueVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * åºå®ç 段çç 弿¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeFixedValueVO extends BaseModelVO { |
| | | public class CodeFixedValueVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /**** |
| | | * æ¹éç³è¯·redisç¼å对象 |
| | | * @author xiejun |
| | | * @date 2023-06-14 |
| | | */ |
| | | @Data |
| | | public class CodeImportTemplateVO { |
| | | private List<ColumnVO> cloNamesList=new ArrayList<>(); |
| | | |
| | | private CodeClassifyTemplateVO codeClstemplateVO; |
| | | private CodeClassifyTemplateVO codeClassifyTemplateVO; |
| | | |
| | | private CodeClassifyVO codeClassifyVO; |
| | | |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * å
³é®æ°æ®æ¥éè§åæ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeKeyAttrRepeatRuleVO extends BaseModelVO { |
| | | public class CodeKeyAttrRepeatRuleVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * é¶æ®µç屿§æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodePhaseAttrVO extends BaseModelVO { |
| | | public class CodePhaseAttrVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç¸ä¼¼æ¥è¯¢è§åæ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-10 |
| | | */ |
| | | public class CodeResembleRuleVO extends BaseModelVO { |
| | | public class CodeResembleRuleVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.entity.CodeRule; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author weidy |
| | | * @date 2022-01-24 |
| | | */ |
| | | public class CodeRuleVO extends BaseModelVO { |
| | | public class CodeRuleVO extends CodeRule { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * åä¹è¯é
ç½®æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-02-17 |
| | | */ |
| | | public class CodeSynonymVO extends BaseModelVO { |
| | | public class CodeSynonymVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * èµæºå¯¹æ¥éç¥ãæ¥è¯¢æ¥å£æ¥å¿æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-03-28 |
| | | */ |
| | | public class DockingLogeVO extends BaseModelVO { |
| | | public class DockingLogeVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.code.dto.DockingPreApplyDataInfoDTO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * è®°å½å·¥èºæ¨éè¿æ¥çæ°æ®ä¿¡æ¯æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-05 |
| | | */ |
| | | public class DockingPreApplyDataInfoVO extends BaseModelVO { |
| | | public class DockingPreApplyDataInfoVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author weidy |
| | | * @date 2022-04-05 |
| | | */ |
| | | public class DockingPreApplyDataVO extends BaseModelVO { |
| | | public class DockingPreApplyDataVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author lihang |
| | | * @date 2022-03-07 |
| | | */ |
| | | public class DockingSystemConfigVO extends BaseModelVO { |
| | | public class DockingSystemConfigVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éæçç³»ç»ä¿¡æ¯æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author lihang |
| | | * @date 2022-03-07 |
| | | */ |
| | | public class DockingSystemVO extends BaseModelVO { |
| | | public class DockingSystemVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * èµæºå¯¹æ¥éç¥ãæ¥è¯¢æ¥å£å¾
æ¨é任塿¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-03-28 |
| | | */ |
| | | public class DockingTaskVO extends BaseModelVO { |
| | | public class DockingTaskVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | * @author weidy |
| | | * @date 2020/1/29 |
| | | */ |
| | | public class SmUserVO extends BaseModelVO { |
| | | public class SmUserVO extends BaseModel { |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | */ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éææ¥å£çè®¤è¯æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author lihang |
| | | * @date 2022-03-07 |
| | | */ |
| | | public class SysIntAuthorityVO extends BaseModelVO { |
| | | public class SysIntAuthorityVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éææ¥å£çè®¤è¯æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-11 |
| | | */ |
| | | public class SysIntHeaderVO extends BaseModelVO { |
| | | public class SysIntHeaderVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | package com.vci.ubcs.code.vo.pagemodel; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.BaseModelVO; |
| | | |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | |
| | | /** |
| | | * ç³»ç»éææ¥å£çè®¤è¯æ¾ç¤ºå¯¹è±¡ |
| | |
| | | * @author weidy |
| | | * @date 2022-04-11 |
| | | */ |
| | | public class SysIntParamVO extends BaseModelVO { |
| | | public class SysIntParamVO extends BaseModel { |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | * @author Chill |
| | | */ |
| | | @FeignClient( |
| | | value = AppConstant.APPLICATION_NAME_OMD, |
| | | value = AppConstant.APPLICATION_SYSTEM_NAME, |
| | | fallback = IDictBizClientFallback.class |
| | | ) |
| | | public interface IDictBizClient { |
| | |
| | | <artifactId>ubcs-util-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-user-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | /** |
| | | * 屿§ç±»å |
| | | */ |
| | | VCO_FIELD_TYPE("vciFieldType"), |
| | | VCI_FIELD_TYPE("vciFieldType"), |
| | | /** |
| | | * çªå£ç±»å |
| | | */ |
| | |
| | | |
| | | |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | String GET_BY_ID = API_PREFIX + "/attribute/get-by-id"; |
| | | String GET_LIST = API_PREFIX + "/attribute/get-list"; |
| | | |
| | | String GET_ALL = API_PREFIX + "/attribute/get-all"; |
| | | |
| | | |
| | | /** |
| | | * è·åå
æ°æ®å¯¹è±¡ |
| | |
| | | */ |
| | | @GetMapping(GET_LIST) |
| | | R<List<Attribute>> getList(@RequestParam("key") String key); |
| | | |
| | | /** |
| | | * è·åå
¨é¨å±æ§ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping(GET_ALL) |
| | | R<List<AttributeVO>> getAll(); |
| | | } |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æé¢åè·åå
¨é¨å±æ§ |
| | | * |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<List<AttributeVO>> getAll() { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | } |
| | |
| | | */ |
| | | String GET_BY_OIDS = API_PREFIX + "/btm-type/get-by-oids"; |
| | | |
| | | String GET_DEFAULT_ATTR_BY_BTM_ID = API_PREFIX + "/btm-attribute/get-default-attr-by-btm-id"; |
| | | String GET_DEFAULT_ATTR_BY_BTM_ID = API_PREFIX + "/btm-type/get-default-attr-by-btm-id"; |
| | | |
| | | String GET_ALL_ATTR_BY_BTM_ID = API_PREFIX + "/btm-attribute/get-all-attr-by-btm-id"; |
| | | String GET_ALL_ATTR_BY_BTM_ID = API_PREFIX + "/btm-type/get-all-attr-by-btm-id"; |
| | | |
| | | String GET_ALL_ATTR_BY_BTM_OID = API_PREFIX + "/btm-attribute/get-all-attr-by-btm-oid"; |
| | | String GET_ALL_ATTR_BY_BTM_OID = API_PREFIX + "/btm-type/get-all-attr-by-btm-oid"; |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»å详æ
ä¿¡æ¯ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description: 龿¥ç±»åFeignæ¥å£ |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/6/13 |
| | | */ |
| | | @FeignClient( |
| | | value = AppConstant.APPLICATION_NAME_OMD, |
| | | fallback = ILinkTypeFallback.class |
| | | ) |
| | | public interface ILinkTypeClient { |
| | | /** |
| | | * åç¼ |
| | | */ |
| | | String API_PREFIX = "/client"; |
| | | |
| | | /** |
| | | * å页åç
§æ¥è¯¢ |
| | | */ |
| | | String GET_REF_PAGE =API_PREFIX + "/link-type/get-ref-page"; |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢æ å页 |
| | | */ |
| | | String GET_REF = API_PREFIX + "/link-type/get-ref"; |
| | | /** |
| | | * åç
§æç» |
| | | */ |
| | | String GET_DETAIL = API_PREFIX + "/link-type/get-detail"; |
| | | /** |
| | | * è±æåç§°æ¹éæ¥è¯¢ |
| | | */ |
| | | String GET_BY_IDS = API_PREFIX + "/link-type/get-by-ids"; |
| | | /** |
| | | * 䏻鮿¹éæ¥è¯¢ |
| | | */ |
| | | String GET_BY_OIDS = API_PREFIX + "/link-type/get-by-oids"; |
| | | /** |
| | | * æé¾æ¥ç±»åè±æåç§°è·åé»è®¤å段 |
| | | */ |
| | | String GET_DEFAULT_ATTR_BY_LINK_ID = API_PREFIX + "/link-type/get-default-attr-by-link-id"; |
| | | |
| | | /** |
| | | * æé¾æ¥ç±»åè±æåç§°è·åå
¨é¨å段 |
| | | */ |
| | | String GET_ALL_ATTR_BY_LINK_ID = API_PREFIX + "/link-type/get-all-attr-by-link-id"; |
| | | |
| | | /** |
| | | * æé¾æ¥ç±»å主é®è·åå
¨é¨å段 |
| | | */ |
| | | String GET_ALL_ATTR_BY_LINK_OID = API_PREFIX + "/link-type/get-all-attr-by-link-oid"; |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return ä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | @GetMapping(GET_DETAIL) |
| | | R<LinkTypeVO> getDetail(@RequestParam("oid") String oid); |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @PostMapping(GET_REF_PAGE) |
| | | R<Page<LinkTypeVO>> getRefPage(@RequestBody BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @PostMapping(GET_REF) |
| | | R<List<LinkTypeVO>> getRef(@RequestBody BaseQueryObject baseQueryObject); |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éæ¥è¯¢å¯¹è±¡ |
| | | * @param ids å¯¹è±¡è±æåç§° 使¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @PostMapping(GET_BY_IDS) |
| | | R<List<LinkTypeVO>> selectByIdCollection(@RequestBody List<String> ids); |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸»é®è·åä¸å¡ç±»å |
| | | * @param pkLinkTypeCollection ä¸å¡ç±»å主é®éå |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | @PostMapping(GET_BY_OIDS) |
| | | R<List<LinkTypeVO>> listLinkTypeByOidCollection(@RequestBody List<String> pkLinkTypeCollection); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åï¼åªæé»è®¤å段 |
| | | * |
| | | * @param linkTypeId ä¸å¡ç±»åid |
| | | * @return é»è®¤åæ®µå±æ§ |
| | | */ |
| | | @GetMapping(GET_DEFAULT_ATTR_BY_LINK_ID) |
| | | R<LinkTypeVO> getDefaultAttrByLinkId(@RequestParam("linkTypeId") String linkTypeId); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeId ä¸å¡ç±»åid |
| | | * @return ææå段 |
| | | */ |
| | | @GetMapping(GET_ALL_ATTR_BY_LINK_ID) |
| | | R<LinkTypeVO> getAllAttributeByLinkId(@RequestParam("linkTypeId") String linkTypeId); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeOid ä¸å¡ç±»åä¸»é® |
| | | * @return ææå段 |
| | | */ |
| | | @GetMapping(GET_ALL_ATTR_BY_LINK_OID) |
| | | R<LinkTypeVO> getAllAttributeByLinkOid(@RequestParam("linkTypeOid") String linkTypeOid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description: 龿¥ç±»åfeign失败çé
置类 |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/6/13 |
| | | */ |
| | | public class ILinkTypeFallback implements ILinkTypeClient{ |
| | | /** |
| | | * è·åä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return ä¸å¡ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getDetail(String oid) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<Page<LinkTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<List<LinkTypeVO>> getRef(BaseQueryObject baseQueryObject) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éæ¥è¯¢å¯¹è±¡ |
| | | * |
| | | * @param ids å¯¹è±¡è±æåç§° 使¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public R<List<LinkTypeVO>> selectByIdCollection(List<String> ids) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸»é®è·åä¸å¡ç±»å |
| | | * |
| | | * @param pkLinkTypeCollection ä¸å¡ç±»å主é®éå |
| | | * @return ä¸å¡ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | @Override |
| | | public R<List<LinkTypeVO>> listLinkTypeByOidCollection(List<String> pkLinkTypeCollection) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åï¼åªæé»è®¤å段 |
| | | * |
| | | * @param linkTypeId ä¸å¡ç±»åid |
| | | * @return é»è®¤åæ®µå±æ§ |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getDefaultAttrByLinkId(String linkTypeId) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeId ä¸å¡ç±»åid |
| | | * @return ææå段 |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getAllAttributeByLinkId(String linkTypeId) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeOid ä¸å¡ç±»åä¸»é® |
| | | * @return ææå段 |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getAllAttributeByLinkOid(String linkTypeOid) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.vci.ubcs.omd.entity.Enum; |
| | | import com.vci.ubcs.omd.entity.EnumItem; |
| | | import com.vci.ubcs.omd.vo.EnumVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.system.user.vo.UserVO; |
| | | import io.swagger.models.auth.In; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.mp.support.BladePage; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä¸¾å®ä¹ Feignæ¥å£ç±» |
| | | * |
| | | * @author yuxc |
| | | * @since 2023-05-08 |
| | | */ |
| | | @FeignClient( |
| | | value = AppConstant.APPLICATION_NAME_OMD, |
| | | fallback = IWebSecretFallback.class |
| | | ) |
| | | public interface IWebSecretClient { |
| | | |
| | | String API_PREFIX = "/client"; |
| | | String MINUSER = API_PREFIX + "/secret/min-user"; |
| | | String MINDATA = API_PREFIX + "/secret/min-data"; |
| | | String MINIP = API_PREFIX + "/secret/min-ip"; |
| | | String USER = API_PREFIX + "/secret/user"; |
| | | String USERVO = API_PREFIX + "/secret/uservo"; |
| | | String CHECKDATA = API_PREFIX + "/secret/check-data"; |
| | | String CHECKUSERDATA = API_PREFIX + "/secret/chec-user-data"; |
| | | String CHECKUSERIDDATA = API_PREFIX + "/secret/chec-userid-data"; |
| | | String CHECKVO = API_PREFIX + "/secret/checkvo"; |
| | | String IP = API_PREFIX + "/secret/ip"; |
| | | String IPUSER = API_PREFIX + "/secret/ip-user"; |
| | | String IPSECRET = API_PREFIX + "/secret/ip-secret"; |
| | | String IPUSERID = API_PREFIX + "/secret/ip-userid"; |
| | | String IPUSERVO = API_PREFIX + "/secret/ip-uservo"; |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§çæå°å¼ |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @GetMapping(MINUSER) |
| | | R<Integer> getMinUserSecret() throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åæ°æ®å¯çº§çé»è®¤å¼ |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @GetMapping(MINDATA) |
| | | R<Integer> getMinDataSecret() throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åIPå¯çº§çé»è®¤å¼ |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @GetMapping(MINIP) |
| | | R<Integer> getMinIpSecret() throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§ |
| | | * @param userId ç¨æ·ä¸»é® |
| | | * @return ç¨æ·çå¯çº§ |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | @GetMapping(USER) |
| | | R<Integer> getUserSecret(@RequestParam("userId") String userId) throws VciBaseException ; |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§ |
| | | * @param userVO ç¨æ·çæ¾ç¤ºå¯¹è±¡ |
| | | * @return ç¨æ·çå¯çº§ |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | @GetMapping(USERVO) |
| | | R<Integer> getUserSecret(@RequestBody UserVO userVO) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¡éªå½åç¨æ·æ¯å¦ææéè®¿é®æ°æ® |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | @GetMapping(CHECKDATA) |
| | | R<Boolean> checkDataSecret(@RequestParam("secret") int secret); |
| | | |
| | | /** |
| | | * æ ¡éªç¨æ·çå¯çº§æ¯å¦æ¯å¦ææéè®¿é®æ°æ® |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userSecret ç¨æ·å¯çº§ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | @GetMapping(CHECKUSERDATA) |
| | | R<Boolean> checkDataSecret(@RequestParam("secret") int secret, @RequestParam("userSecret") int userSecret) ; |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·åæ¥æ ¡éªæ°æ®å¯çº§ |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userId ç¨æ·å |
| | | * @return true表示å
è®¸è®¿é® |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | @GetMapping(CHECKUSERIDDATA) |
| | | R<Boolean> checkDataSecret(@RequestParam("secret") int secret, @RequestParam("userId") String userId) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·å¯¹è±¡æ¥æ ¡éªæ°æ®å¯çº§ |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userVO ç¨æ·çæ¾ç¤ºå¯¹è±¡ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | @GetMapping(CHECKVO) |
| | | R<Boolean> checkDataSecret(@RequestParam("secret") int secret,@RequestBody UserVO userVO) ; |
| | | |
| | | /** |
| | | * è·åIPå°åçå¯çº§ |
| | | * @param ip ipå°å |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @GetMapping(IP) |
| | | R<Integer> getIpSecret(@RequestParam("ip") String ip) throws VciBaseException; |
| | | /** |
| | | * æ£æ¥æºå¨å¯çº§ |
| | | * @param ipSecret æºå¨å¯çº§ |
| | | * @param userSecret ç¨æ·çå¯çº§ |
| | | * @return å¯çº§çå¼ |
| | | */ |
| | | @GetMapping(IPUSER) |
| | | R<Boolean> checkIpSecret(@RequestParam("ipSecret") int ipSecret, @RequestParam("userSecret") int userSecret); |
| | | |
| | | /** |
| | | * æ£æ¥å½åç¨æ·æ¯å¦ç¬¦åæºå¨å¯çº§ |
| | | * @param ipSecret æºå¨å¯çº§ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | @GetMapping(IPSECRET) |
| | | R<Boolean> checkIpSecret(@RequestParam("ipSecret") int ipSecret) ; |
| | | |
| | | /** |
| | | * æ ¡éªæå®ipåç¨æ·æ¯å¦ç¬¦åæºå¨å¯çº§ |
| | | * @param ip ipå°å |
| | | * @param userId ç¨æ·å |
| | | * @return true表示å
è®¸è®¿é® |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | @GetMapping(IPUSERID) |
| | | R<Boolean> checkIpSecret(@RequestParam("ip") String ip, @RequestParam("userId") String userId) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¡éªæå®IPåç¨æ·å¯¹è±¡ç¬¦åæºå¨å¯çº§ |
| | | * @param ip ipå°å |
| | | * @param userVO ç¨æ·å¯¹è±¡ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | @GetMapping(IPUSERVO) |
| | | R<Boolean> checkIpSecret(@RequestParam("ip") String ip,@RequestBody UserVO userVO) ; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.omd.feign; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.system.user.vo.UserVO; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Feign失败é
ç½® |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Component |
| | | public class IWebSecretFallback implements IWebSecretClient { |
| | | |
| | | |
| | | @Override |
| | | public R<Integer> getMinUserSecret() throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getMinDataSecret() throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getMinIpSecret() throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getUserSecret(String userId) throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getUserSecret(UserVO userVO) throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret, int userSecret) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret, String userId) throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret, UserVO userVO) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getIpSecret(String ip) throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(int ipSecret, int userSecret) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(int ipSecret) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(String ip, String userId) throws VciBaseException { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(String ip, UserVO userVO) { |
| | | return R.fail("è·åæ°æ®å¤±è´¥"); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.util; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | public class Tool { |
| | | |
| | | public static final String ALLOWNULL = "allowNull"; |
| | | public static final String BTM = "btm"; |
| | | public static final String ISFIXLEN = "isFixLen"; |
| | | public static final String LENGTH = "length"; |
| | | public static final String ENUMNAME = "enumName"; |
| | | public static final String ACCURACY = "accuracy"; |
| | | public static final String LINKTYPENAME = "linkTypeName"; |
| | | public static final String VERSION = "version"; |
| | | |
| | | |
| | | public static ArrayList<String> convertArrayToList(String[] array) { |
| | | ArrayList<String> list = new ArrayList(); |
| | | |
| | | for(int i = 0; i < array.length; ++i) { |
| | | list.add(array[i]); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | public static String getOtherValueByType(String other, String type) { |
| | | String[] otherArray = other.split(";"); |
| | | |
| | | for(int i = 0; i < otherArray.length; ++i) { |
| | | String otherValue = otherArray[i]; |
| | | if (otherValue.contains(type)) { |
| | | return otherValue.substring(otherValue.indexOf("=") + 2, otherValue.length()); |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.utils; |
| | | |
| | | import com.vci.ubcs.omd.vo.EnumVO; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class VciOmdUtil { |
| | | /** |
| | | * å°List<EnumVO> 转æ¢ä¸ºKeyValue ç±»å |
| | | * @param enums æä¸¾éå |
| | | * @return KeyValueéå |
| | | */ |
| | | public static List<KeyValue> enumsToListKeyVale(List<EnumVO> enums) { |
| | | List<KeyValue> keyValues = new ArrayList<>(); |
| | | for (EnumVO anEnum : enums) { |
| | | KeyValue keyValue = new KeyValue(); |
| | | keyValue.setKey(anEnum.getItemName()); |
| | | keyValue.setValue(anEnum.getItemValue()); |
| | | keyValues.add(keyValue); |
| | | } |
| | | return keyValues; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * ç¨æ·å¯çº§ |
| | | */ |
| | | private String secretgrade; |
| | | private String secretGrade; |
| | | /** |
| | | * å¯ç çç¥ä¿®æ¹ç¶æ |
| | | */ |
| | |
| | | <artifactId>mybatis-plus-join-boot-starter</artifactId> |
| | | <version>${mybatisplus.join.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.4.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springblade</groupId> |
| | | <artifactId>blade-starter-log</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.constant; |
| | | |
| | | /** |
| | | * codeæå¡ä¸ç¨å°ç表å常éç±» |
| | | * @author ludc |
| | | * @date 2023/6/8 11:04 |
| | | */ |
| | | public class CodeTableNameConstant { |
| | | |
| | | /** |
| | | * åºç¡ç 段çä¿¡æ¯ |
| | | */ |
| | | public static final String PL_CODE_BASICSEC = "PL_CODE_BASICSEC"; |
| | | |
| | | /** |
| | | * 主é¢åºçåç±» |
| | | */ |
| | | public static final String PL_CODE_CLASSIFY = "PL_CODE_CLASSIFY"; |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± |
| | | */ |
| | | public static final String PL_CODE_BUTTON = "PL_CODE_BUTTON"; |
| | | |
| | | /** |
| | | * å
¨é¨ç å¼ |
| | | */ |
| | | public static final String PL_CODE_ALLCODE = "PL_CODE_ALLCODE"; |
| | | |
| | | /** |
| | | * å类使ç¨çæµç¨æ¨¡æ¿ |
| | | */ |
| | | public static final String PL_CODE_CLSFLOWTEMP = "PL_CODE_CLSFLOWTEMP"; |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-模æ¿ç®¡ç |
| | | */ |
| | | public static final String PL_CODE_CLSTEMPLATE = "PL_CODE_CLSTEMPLATE"; |
| | | |
| | | /** |
| | | * 主é¢åºåç±»çæ¨¡æ¿å±æ§ |
| | | */ |
| | | public static final String PL_CODE_CLSTEMPATTR = "PL_CODE_CLSTEMPATTR"; |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-æ¨¡æ¿æé®æ©å± |
| | | */ |
| | | public static final String PL_CODE_TEMPBUTTON = "PL_CODE_TEMPBUTTON"; |
| | | |
| | | /** |
| | | * åç±»ç æ®µçç å¼ |
| | | */ |
| | | public static final String PL_CODE_CLASSIFYVALUE = "PL_CODE_CLASSIFYVALUE"; |
| | | |
| | | /** |
| | | * åºå®ç 段çç å¼ |
| | | */ |
| | | public static final String PL_CODE_FIXEDVALUE = "PL_CODE_FIXEDVALUE"; |
| | | |
| | | /** |
| | | * å
³é®å±æ§æ¥éè§å |
| | | */ |
| | | public static final String PL_CODE_KEYATTRREPEAT = "PL_CODE_KEYATTRREPEAT"; |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹ |
| | | */ |
| | | public static final String PL_CODE_PHASEATTR = "PL_CODE_PHASEATTR"; |
| | | |
| | | /** |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½® |
| | | */ |
| | | public static final String PL_CODE_REFERCONFIG = "PL_CODE_REFERCONFIG"; |
| | | |
| | | /** |
| | | * ç¼ç è§å |
| | | */ |
| | | public static final String PL_CODE_RULE = "PL_CODE_RULE"; |
| | | |
| | | /** |
| | | * ç¼ç è§åçæµæ°´å¼ |
| | | */ |
| | | public static final String PL_CODE_SERIALVALUE = "PL_CODE_SERIALVALUE"; |
| | | |
| | | /** |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®-æ¾ç¤ºå±æ§é
ç½® |
| | | */ |
| | | public static final String PL_CODE_SHOWFIELDCONFIG = "PL_CODE_SHOWFIELDCONFIG"; |
| | | |
| | | /** |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®-æç´¢æ¡ä»¶é
ç½® |
| | | */ |
| | | public static final String PL_CODE_SRCHCONDCONFIG = "PL_CODE_SRCHCONDCONFIG"; |
| | | |
| | | /** |
| | | * è¿ä¹è¯ç»´æ¤ å®ä½ç±» |
| | | */ |
| | | public static final String PL_CODE_SYNONYM = "PL_CODE_SYNONYM"; |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-模æ¿é¶æ®µ å®ä½ç±» |
| | | */ |
| | | public static final String PL_CODE_TEMPPHASE = "PL_CODE_TEMPPHASE"; |
| | | |
| | | /** |
| | | * ç¼ç ä¿¡æ¯ å®ä½ç±» |
| | | */ |
| | | public static final String PL_CODE_WUPIN = "PL_CODE_WUPIN"; |
| | | |
| | | /** |
| | | * éææ¥å¿å¯¹è±¡ |
| | | */ |
| | | public static final String PL_DOCKING_LOG = "PL_DOCKING_LOG"; |
| | | |
| | | /** |
| | | * éæç®¡çæ¥å£-éæç³»ç»ç»´æ¤å¯¹è±¡ |
| | | */ |
| | | public static final String PL_CODE_SYSINTBASE = "PL_CODE_SYSINTBASE"; |
| | | |
| | | /** |
| | | * éææ¥å£-éææ¥å£ç®¡ç对象 |
| | | */ |
| | | public static final String PL_CODE_SYSINTINFO = "PL_CODE_SYSINTINFO"; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.enumpack; |
| | | |
| | | import com.vci.ubcs.starter.constant.CodeTableNameConstant; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | |
| | | /** |
| | | * codeæå¡ä¸ç¨å°çè表æ¥è¯¢æ¶è¡¨å«å |
| | | * @author ludc |
| | | * @date 2023/6/8 11:22 |
| | | */ |
| | | public enum CodeTableNameEnum { |
| | | |
| | | /** |
| | | * åºç¡ç 段çä¿¡æ¯è¡¨å«å |
| | | */ |
| | | PL_CODE_BASICSEC(CodeTableNameConstant.PL_CODE_BASICSEC,"pl_code_basicsec"), |
| | | |
| | | /** |
| | | * 主é¢åºçå类表å«å |
| | | */ |
| | | PL_CODE_CLASSIFY(CodeTableNameConstant.PL_CODE_CLASSIFY,"pl_code_classify"), |
| | | |
| | | /** |
| | | * æ¨¡æ¿æ©å±æ± |
| | | */ |
| | | PL_CODE_BUTTON(CodeTableNameConstant.PL_CODE_BUTTON,"pl_code_button"), |
| | | |
| | | /** |
| | | * å
¨é¨ç å¼ |
| | | */ |
| | | PL_CODE_ALLCODE(CodeTableNameConstant.PL_CODE_ALLCODE,"pl_code_allcode"), |
| | | |
| | | /** |
| | | * å类使ç¨çæµç¨æ¨¡æ¿ |
| | | */ |
| | | PL_CODE_CLSFLOWTEMP(CodeTableNameConstant.PL_CODE_CLSFLOWTEMP,"pl_code_clsflowtemp"), |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-模æ¿ç®¡ç |
| | | */ |
| | | PL_CODE_CLSTEMPLATE(CodeTableNameConstant.PL_CODE_CLSTEMPLATE,"pl_code_clstemplate"), |
| | | |
| | | /** |
| | | * 主é¢åºåç±»çæ¨¡æ¿å±æ§ |
| | | */ |
| | | PL_CODE_CLSTEMPATTR(CodeTableNameConstant.PL_CODE_CLSTEMPATTR,"pl_code_clstempattr"), |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-æ¨¡æ¿æé®æ©å± |
| | | */ |
| | | PL_CODE_TEMPBUTTON(CodeTableNameConstant.PL_CODE_TEMPBUTTON,"pl_code_tempbutton"), |
| | | |
| | | /** |
| | | * åç±»ç æ®µçç å¼ |
| | | */ |
| | | PL_CODE_CLASSIFYVALUE(CodeTableNameConstant.PL_CODE_CLASSIFYVALUE,"pl_code_classifyvalue"), |
| | | |
| | | /** |
| | | * åºå®ç 段çç å¼ |
| | | */ |
| | | PL_CODE_FIXEDVALUE(CodeTableNameConstant.PL_CODE_FIXEDVALUE,"pl_code_fixedvalue"), |
| | | |
| | | /** |
| | | * å
³é®å±æ§æ¥éè§å |
| | | */ |
| | | PL_CODE_KEYATTRREPEAT(CodeTableNameConstant.PL_CODE_KEYATTRREPEAT,"pl_code_keyattrrepeat"), |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹ |
| | | */ |
| | | PL_CODE_PHASEATTR(CodeTableNameConstant.PL_CODE_PHASEATTR,"pl_code_phaseattr"), |
| | | |
| | | /** |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½® |
| | | */ |
| | | PL_CODE_REFERCONFIG(CodeTableNameConstant.PL_CODE_REFERCONFIG,"pl_code_referconfig"), |
| | | |
| | | /** |
| | | * ç¼ç è§å |
| | | */ |
| | | PL_CODE_RULE(CodeTableNameConstant.PL_CODE_RULE,"pl_code_rule"), |
| | | |
| | | /** |
| | | * ç¼ç è§åçæµæ°´å¼ |
| | | */ |
| | | PL_CODE_SERIALVALUE(CodeTableNameConstant.PL_CODE_SERIALVALUE,"pl_code_serialvalue"), |
| | | |
| | | /** |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®-æ¾ç¤ºå±æ§é
ç½® |
| | | */ |
| | | PL_CODE_SHOWFIELDCONFIG(CodeTableNameConstant.PL_CODE_SHOWFIELDCONFIG,"pl_code_showfieldconfig"), |
| | | |
| | | /** |
| | | * ç¼ç è§å管ç-å¼ç¨ç 段-åç
§é
ç½®-æç´¢æ¡ä»¶é
ç½® |
| | | */ |
| | | PL_CODE_SRCHCONDCONFIG(CodeTableNameConstant.PL_CODE_SRCHCONDCONFIG,"pl_code_srchcondconfig"), |
| | | |
| | | /** |
| | | * è¿ä¹è¯ç»´æ¤ å®ä½ç±» |
| | | */ |
| | | PL_CODE_SYNONYM(CodeTableNameConstant.PL_CODE_SYNONYM,"pl_code_synonym"), |
| | | |
| | | /** |
| | | * ç¼ç åºå®ä¹-模æ¿é¶æ®µ å®ä½ç±» |
| | | */ |
| | | PL_CODE_TEMPPHASE(CodeTableNameConstant.PL_CODE_TEMPPHASE,"pl_code_tempphase"), |
| | | |
| | | /** |
| | | * ç¼ç ä¿¡æ¯ å®ä½ç±» |
| | | */ |
| | | PL_CODE_WUPIN(CodeTableNameConstant.PL_CODE_WUPIN,"pl_code_wupin"), |
| | | |
| | | /** |
| | | * éææ¥å¿å¯¹è±¡ |
| | | */ |
| | | PL_DOCKING_LOG(CodeTableNameConstant.PL_DOCKING_LOG,"pl_code_log"), |
| | | |
| | | /** |
| | | * éæç®¡çæ¥å£-éæç³»ç»ç»´æ¤å¯¹è±¡ |
| | | */ |
| | | PL_CODE_SYSINTBASE(CodeTableNameConstant.PL_CODE_SYSINTBASE,"pl_code_sysintbase"), |
| | | |
| | | /** |
| | | * éææ¥å£-éææ¥å£ç®¡ç对象 |
| | | */ |
| | | PL_CODE_SYSINTINFO(CodeTableNameConstant.PL_CODE_SYSINTINFO,"pl_code_sysintinfo") |
| | | |
| | | ; |
| | | |
| | | /** |
| | | * æä¸¾çname |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | CodeTableNameEnum(String name, String text) { |
| | | this.name = name; |
| | | this.text = text; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.vci.ubcs.starter.web.util.MessageUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springframework.web.server.ServerErrorException; |
| | | |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.text.MessageFormat; |
| | | |
| | | public class VciBaseException extends RuntimeException { |
| | | public class VciBaseException extends ServiceException { |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | public static final String paramNull = "com.vci.base.paramNull"; |
| | | public static final String fieldValueRepeat = "com.vci.base.fieldValueRepeat"; |
| | |
| | | private Object[] objs = new Object[0]; |
| | | |
| | | public VciBaseException(String code) { |
| | | super(code); |
| | | this.code = code; |
| | | } |
| | | |
| | | public VciBaseException(String code, Object[] objs) { |
| | | super(code); |
| | | this.code = code; |
| | | this.objs = objs; |
| | | } |
| | | |
| | | public VciBaseException(String code, Object[] objs, Throwable e) { |
| | | super(e); |
| | | super(code); |
| | | this.code = code; |
| | | this.objs = objs; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åå¼å¸¸ä¿¡æ¯ |
| | | * @param e å¼å¸¸å¯¹è±¡ |
| | | * @return å¼å¸¸å¯¹è±¡ä¸çææå
容 |
| | | */ |
| | | public static String getErrorMsgByE(Throwable e){ |
| | | if(e == null){ |
| | | return "æªç¥é误"; |
| | | } |
| | | if( e.getClass()!= null && e.getClass().getSuperclass()!= null && |
| | | (e.getClass().getSuperclass().equals(RuntimeException.class) |
| | | || e.getClass().getSuperclass().getName().endsWith(".VciBaseException") |
| | | || e.getClass().getName().endsWith(".VciBaseException"))){ |
| | | //è¯´ææ¯æä»¬èªå®ä¹çå¼å¸¸ç±» |
| | | try { |
| | | Method errorMethod = e.getClass().getMethod("getErrorMsg"); |
| | | if(errorMethod != null ){ |
| | | return (String)errorMethod.invoke(e); |
| | | } |
| | | } catch (NoSuchMethodException e1) { |
| | | return e.getMessage(); |
| | | } catch (IllegalAccessException e1) { |
| | | return e.getMessage(); |
| | | } catch (InvocationTargetException e1) { |
| | | return e.getMessage(); |
| | | } |
| | | } |
| | | return e.getMessage(); |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return this.getCode() + "," + this.getErrorMsg(); |
| | |
| | | private static Logger logger = LoggerFactory.getLogger(ExcelUtil.class); |
| | | public static final String KEY_ATTR_CHAR = "â"; |
| | | public static final String REQUIRED_CHAR = "*"; |
| | | /** |
| | | * æ¿æ¢å符 |
| | | */ |
| | | public static final String SPECIAL_CHAR = "VCI"; |
| | | |
| | | public ExcelUtil() { |
| | | } |
| | |
| | | package com.vci.ubcs.starter.revision.model; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | private String id; |
| | | |
| | | private String name; |
| | | |
| | | /** |
| | | * ç§æ·ID |
| | | * @TableField(value = "tenant_id")è¿éå¿
é¡»è¦åï¼å¹¶ä¸å¿
é¡»æ¯è¦å°åç |
| | | */ |
| | | @TableField(value = "tenant_id",exist = false) |
| | | private String tenantId; |
| | | |
| | | private String description; |
| | | |
| | |
| | | |
| | | private String copyFromVersion; |
| | | |
| | | // @VciUseEnum( |
| | | // value = "Enumsecretgrade", |
| | | // showTextField = "secretGradeText" |
| | | // ) |
| | | /** |
| | | * éè¦ä½¿ç¨å¯çº§çæ¶åï¼éè¦ç»§æ¿è¿ä¸ªå±æ§ |
| | | */ |
| | | @TableField(exist = false) |
| | | private Integer secretGrade; |
| | | |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private String secretGradeText; |
| | | |
| | | @Transient |
| | | @TableField(exist = false) |
| | | private Map<String, String> data; |
| | | |
| | |
| | | this.lctid = lctid; |
| | | } |
| | | |
| | | /* public String getGroupcode() { |
| | | return this.groupcode; |
| | | public String getTenantId() { |
| | | return tenantId; |
| | | } |
| | | |
| | | public void setGroupcode(String groupcode) { |
| | | this.groupcode = groupcode; |
| | | }*/ |
| | | public void setTenantId(String tenantId) { |
| | | this.tenantId = tenantId; |
| | | } |
| | | |
| | | public Map<String, String> getData() { |
| | | return this.data; |
| | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "BaseModel{oid='" + this.oid + '\'' + ", id='" + this.id + '\'' + ", name='" + this.name + '\'' + ", description='" + this.description + '\'' + ", revisionOid='" + this.revisionOid + '\'' + ", nameOid='" + this.nameOid + '\'' + ", btmname='" + this.btmname + '\'' + ", lastR='" + this.lastR + '\'' + ", firstR='" + this.firstR + '\'' + ", lastV='" + this.lastV + '\'' + ", firstV='" + this.firstV + '\'' + ", creator='" + this.creator + '\'' + ", createTime=" + this.createTime + ", lastModifier='" + this.lastModifier + '\'' + ", lastModifyTime=" + this.lastModifyTime + ", revisionRule='" + this.revisionRule + '\'' + ", revisionSeq=" + this.revisionSeq + ", revisionValue='" + this.revisionValue + '\'' + ", versionRule='" + this.versionRule + '\'' + ", versionSeq=" + this.versionSeq + ", versionValue='" + this.versionValue + '\'' + ", lctid='" + this.lctid + '\'' + ", lcStatus='" + this.lcStatus + '\'' + ", lcStatusText='" + this.lcStatusText + '\'' + ", ts=" + this.ts + ", owner='" + this.owner + '\'' + ", copyFromVersion='" + this.copyFromVersion + '\'' + ", secretGrade=" + this.secretGrade + ", secretGradeText='" + this.secretGradeText + '\'' + ", data=" + this.data + '}'; |
| | | return "BaseModel{oid='" + this.oid + '\'' + ", id='" + this.id + '\'' + ", name='" + this.name + '\'' + ", description='" + this.description + '\'' + ", revisionOid='" + this.revisionOid + '\'' + ", nameOid='" + this.nameOid + '\'' + ", btmname='" + this.btmname + '\'' + ", lastR='" + this.lastR + '\'' + ", firstR='" + this.firstR + '\'' + ", lastV='" + this.lastV + '\'' + ", firstV='" + this.firstV + '\'' + ", creator='" + this.creator + '\'' + ", createTime=" + this.createTime + ", lastModifier='" + this.lastModifier + '\'' + ", lastModifyTime=" + this.lastModifyTime + ", revisionRule='" + this.revisionRule + '\'' + ", revisionSeq=" + this.revisionSeq + ", revisionValue='" + this.revisionValue + '\'' + ", versionRule='" + this.versionRule + '\'' + ", versionSeq=" + this.versionSeq + ", versionValue='" + this.versionValue + '\'' + ", lctid='" + this.lctid + '\'' + ", lcStatus='" + this.lcStatus + '\'' + ", lcStatusText='" + this.lcStatusText + '\'' + ", ts=" + this.ts + ", owner='" + this.owner + '\'' + ", copyFromVersion='" + this.copyFromVersion + '\'' + ", secretGrade=" + this.secretGrade + ", secretGradeText='" + this.secretGradeText + '\'' + ", data=" + this.data + '}' + '\'' + ", tenantId=" + this.tenantId + '}'; |
| | | } |
| | | |
| | | } |
| | |
| | | public TreeQueryObject() { |
| | | } |
| | | |
| | | public TreeQueryObject(Map<String, String> conditionMap) { |
| | | this.setConditionMap(conditionMap); |
| | | } |
| | | |
| | | public TreeQueryObject(Map<String, String> conditionMap, boolean multipleSelect, boolean showCheckBox, boolean queryAllLevel, String parentOid, String parentBtmName, String valueField, String textField, String parentFieldName, Map<String, String> extandParamsMap, boolean queryAllRev, String sort, String order) { |
| | | this.conditionMap = conditionMap; |
| | | this.multipleSelect = multipleSelect; |
| | | this.showCheckBox = showCheckBox; |
| | | this.queryAllLevel = queryAllLevel; |
| | | this.parentOid = parentOid; |
| | | this.parentBtmName = parentBtmName; |
| | | this.valueField = valueField; |
| | | this.textField = textField; |
| | | this.parentFieldName = parentFieldName; |
| | | this.extandParamsMap = extandParamsMap; |
| | | this.queryAllRev = queryAllRev; |
| | | this.sort = sort; |
| | | this.order = order; |
| | | } |
| | | |
| | | public String getValueField() { |
| | | return this.valueField; |
| | | } |
| | |
| | | package com.vci.ubcs.starter.util; |
| | | |
| | | import com.alibaba.druid.util.StringUtils; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ°å¢æ¶é»è®¤å¼å±æ§èµå¼ |
| | |
| | | baseModel.setVersionSeq(1); |
| | | baseModel.setVersionRule("0"); |
| | | baseModel.setVersionValue("1"); |
| | | baseModel.setNameOid(VciBaseUtil.getPk()); |
| | | baseModel.setRevisionOid(VciBaseUtil.getPk()); |
| | | baseModel.setLastModifier(userId); |
| | | }catch (VciBaseException e){ |
| | | e.printStackTrace(); |
| | |
| | | return (T)baseModel; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ°å¢æ¶å¡«å
é»è®¤å¼ |
| | | * @param object ç»§æ¿äºBaseModelçå®ä½å¯¹è±¡ |
| | | * @param <T> è¿åå¼çç±»å |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | public static <T extends BaseModel> T copplyDefaultAttrAssimt(Map<String,String> dataMap, T object) throws VciBaseException { |
| | | BaseModel baseModel = object; |
| | | try { |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | baseModel.setOid(dataMap.getOrDefault("OID","")); |
| | | String createTime=dataMap.getOrDefault("CREATETIME",""); |
| | | baseModel.setCreateTime(chageStringToDate(createTime)); |
| | | baseModel.setNameOid(dataMap.getOrDefault("NAMEOID","")); |
| | | |
| | | String lastModifyTime=dataMap.getOrDefault("LASTMODIFYTIME",""); |
| | | baseModel.setLastModifyTime(chageStringToDate(lastModifyTime)); |
| | | String ts=dataMap.getOrDefault("TS",""); |
| | | baseModel.setTs(chageStringToDate(ts)); |
| | | baseModel.setRevisionOid(dataMap.getOrDefault("REVISIONOID","")); |
| | | //ç¨æ·id |
| | | String userId = AuthUtil.getUserId().toString(); |
| | | baseModel.setBtmname(dataMap.getOrDefault("BTMNAME","")); |
| | | baseModel.setCreator(dataMap.getOrDefault("CREATOR","")); |
| | | baseModel.setFirstR(dataMap.getOrDefault("FIRSTR","")); |
| | | baseModel.setFirstV(dataMap.getOrDefault("FIRSTV","")); |
| | | baseModel.setLastR(dataMap.getOrDefault("LASTR","")); |
| | | baseModel.setLastV(dataMap.getOrDefault("LASTV","")); |
| | | baseModel.setRevisionSeq(chageStringToInt(dataMap.getOrDefault("REVISIONSEQ",""))); |
| | | baseModel.setOwner(dataMap.getOrDefault("OWNER","")); |
| | | baseModel.setVersionSeq(chageStringToInt(dataMap.getOrDefault("VERSIONSEQ",""))); |
| | | baseModel.setVersionRule(dataMap.getOrDefault("VERSIONRULE","")); |
| | | baseModel.setVersionValue(dataMap.getOrDefault("VERSIONVALUE","")); |
| | | baseModel.setRevisionOid(dataMap.getOrDefault("REVISIONOID","")); |
| | | baseModel.setLastModifier(userId); |
| | | }catch (VciBaseException e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return (T)baseModel; |
| | | } |
| | | |
| | | private static int chageStringToInt(String value){ |
| | | int newValue=0; |
| | | if(StringUtils.isNotBlank(value)){ |
| | | newValue = Integer.parseInt(value); |
| | | } |
| | | return newValue; |
| | | } |
| | | |
| | | private static Date chageStringToDate(String value){ |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date date=new Date(); |
| | | if(StringUtils.isNotBlank(value)){ |
| | | try { |
| | | date = format.parse(value); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return date; |
| | | } |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * UBCSSqlKeyword |
| | | * UBCSSqlKeyword,é«çº§æ¥è¯¢ä¸ä¼ çæ¶åé»è®¤æ¯_equal |
| | | * map转wrapperæ¶ç¨å°çæ¯å¯¹è½¬æ¢ |
| | | * @author ludc |
| | | * @date 2023/06/06 10:01 |
| | |
| | | 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); |
| | | if (k.endsWith("_like")) { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | | if (k.endsWith("_like")) { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | | if (k.endsWith("_like")) { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | | if (k.endsWith("_like")) { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | } else if (k.endsWith("_notequal")) { |
| | | qw.ne(getColumn(k, "_notequal"), v); |
| | | } else if (k.endsWith("_likeleft")) { |
| | |
| | | } else if (k.endsWith("_notnull")) { |
| | | qw.isNotNull(getColumn(k, "_notnull")); |
| | | } else { |
| | | qw.like(getColumn(k, "_like"), v); |
| | | qw.eq(getColumn(k, "_equal"), v); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * ç®åèèä¸ç§ç¹æ®æ
åµï¼å¨åè¿è¡¨æ¥è¯¢çæ¶åï¼å 为æ¥è¯¢æ¡ä»¶æ¯map转wrapperï¼ |
| | | * è¿æ ·å°±ä¼åºç°æªæç¡®å®ä¹åçéè¯¯ï¼æä»¥éè¦èèå¨ä½å¤æ¥åå¤çï¼ |
| | | * è·åååï¼æ²¡æè½¬ä¸å线æ å° |
| | | * @param column |
| | | * @param keyword |
| | | * @return |
| | | */ |
| | | private static String getColumn(String column, String keyword) { |
| | | |
| | | //没æè½¬ä¸å线æ å° |
| | | return StringUtil.removeSuffix(column, keyword).toLowerCase(Locale.ROOT); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.web.constant; |
| | | |
| | | /** |
| | | * åºç¡æ¡æ¶ä¸ä¸å¡é¨åçå¤è¯è¨ä»£ç |
| | | * @author weidy |
| | | * @date 2020/4/25 |
| | | */ |
| | | public class FrameWorkBusLangCodeConstant { |
| | | |
| | | //ç»éé¨åç |
| | | /** |
| | | * ç¨æ·å·²ç»ç»å½ |
| | | */ |
| | | public static final String USER_IS_LOGINED = "userIsLogined"; |
| | | |
| | | /** |
| | | * ç¨æ·æ²¡ææ¾å° |
| | | */ |
| | | public static final String USER_NOT_FOUND = "userNotFound"; |
| | | |
| | | /** |
| | | * ç¨æ·å·²ç»åç¨ |
| | | */ |
| | | public static final String USER_IS_DISABLED = "userIsDisabled"; |
| | | |
| | | /** |
| | | * ç¨æ·å·²ç»è¢«éå® |
| | | */ |
| | | public static final String USER_IS_LOCK = "userIsLocked"; |
| | | |
| | | /** |
| | | * ç¨æ·å·²ç»è¶
è¿å¤±ææ¶é´ |
| | | */ |
| | | public static final String USER_MORE_THAN_DISABLE_DATE = "moreDisableDate"; |
| | | |
| | | /** |
| | | * ç¨æ·å¯ç é误被éå® |
| | | */ |
| | | public static final String USER_PWD_LOCK = "userPwdErrorLock"; |
| | | |
| | | /** |
| | | * ç¨æ·å¯ç ä¸ç¸ç |
| | | */ |
| | | public static final String USER_PWD_NOT_EQUAL = "userPwdNotEqual"; |
| | | |
| | | |
| | | //å¯ç ç¸å
³ |
| | | |
| | | /** |
| | | * 确认å¯ç ä¸ç¸å |
| | | */ |
| | | public static final String CHANGE_PWD_NOT_EQUAL="changePwdNotEqual"; |
| | | |
| | | /** |
| | | * 没æå¯ç çç¥ |
| | | */ |
| | | public static final String HAS_NOT_PWD_STRATEGY="hasNotPasswordStrategy"; |
| | | |
| | | /** |
| | | * å¯ç å®å
¨çç¥æªæ¾å° |
| | | */ |
| | | public static final String PASSWORD_STRATEGY_NOT_FOUND = "passwordStrategyNotFound"; |
| | | |
| | | /** |
| | | * å¯ç æéå符类å为空 |
| | | */ |
| | | public static final String REQUIRE_CHAR_TYPE_NULL = "requireCharTypeNull"; |
| | | |
| | | /** |
| | | * å¯ç çå符类åä¸ç¬¦åè¦æ± |
| | | */ |
| | | public static final String REQUIRE_CHAR_TYPE_NOT_EXIST = "requireCharTypeNotExist"; |
| | | |
| | | /** |
| | | * å¯ç å¤æåº¦ä¸ç¬¦åè¦æ± |
| | | */ |
| | | public static final String LESS_CHAR_TYPE = "lessCharType"; |
| | | |
| | | /** |
| | | * å¯ç ä¸å
å«å°å忝 |
| | | */ |
| | | public static final String NOT_HAS_LOW_LETTER= "notHasLowLetter"; |
| | | |
| | | /** |
| | | * å¯ç ä¸å
嫿°å |
| | | */ |
| | | public static final String NOT_HAS_NUMBER = "notHasNumber"; |
| | | |
| | | /** |
| | | * å¯ç ä¸å
å«ç¹æ®åæ¯ |
| | | */ |
| | | public static final String NOT_HAS_SPECIAL ="notHasSpecial"; |
| | | |
| | | /** |
| | | * å¯ç ä¸ç¬¦åæå°é¿åº¦è¦æ± |
| | | */ |
| | | public static final String LESS_MIN_LENGTH = "lessMinLength"; |
| | | |
| | | /** |
| | | * å¯ç ä¸ç¬¦åæå¤§é¿åº¦è¦æ± |
| | | */ |
| | | public static final String MORE_MAX_lENGTH ="moreMaxLength"; |
| | | /** |
| | | * å¯ç å³å°è¿æ |
| | | */ |
| | | public static final String PASSWORD_REMAIN_DAY = "passwordRemainDay"; |
| | | |
| | | //ç»ç» |
| | | |
| | | |
| | | //é¨é¨ |
| | | |
| | | //èå¡ |
| | | |
| | | |
| | | //è级 |
| | | |
| | | //ç¨æ· |
| | | |
| | | //è§è² |
| | | |
| | | //æé |
| | | |
| | | //å°åºåç±» |
| | | |
| | | //å°ç¹ |
| | | |
| | | //è系人 |
| | | |
| | | //ç©æåºæ¬ä¿¡æ¯ |
| | | |
| | | //ç©æ |
| | | |
| | | /** |
| | | * ç©æçåºåå· |
| | | */ |
| | | public static final String BD_MATERIAL_SERIAL_NUMBER_REPEAT = "materialSerialNumberRepeat"; |
| | | |
| | | //åºæ¿ç±»å |
| | | |
| | | /** |
| | | * åºæ¿åç±»çå
鍿 è¯ä¸å
¨æ¯è±æ |
| | | */ |
| | | public static final String BD_WAREHOUSE_CLASSIFY_ID_NOT_LETTER = "warehouseClassifyIdNotLetter"; |
| | | |
| | | /** |
| | | * å ä¸ºå·²ç»æåå¨ä½¿ç¨å½ååç±»çåºæ¿ï¼æä»¥åªæ¯ä¿®æ¹åç§°ï¼æè¿°åä¸çº§åç±» |
| | | */ |
| | | public static final String BD_WAREHOUSE_CLASSIFY_LINK_BY_WAREHOUSE ="warehouseClassifyLinkByWarehouse" ; |
| | | |
| | | /** |
| | | * ä¸ä¸çº§åºæ¿åºæ¬åç±»çåºæ¿ç±»åä¸ç¸å |
| | | */ |
| | | public static final String BD_WAREHOUSE_CLASSIFY_TYPE_NOT_EQUAL_PARENT = "warehouseClassifyParentNotEqualType"; |
| | | |
| | | //åºæ¿ç®¡ç |
| | | |
| | | /** |
| | | * ä¸ä¸çº§åºæ¿çåºæ¿åç±»ä¸ç¸å |
| | | */ |
| | | public static final String BD_WAREHOUSE_PARENT_WAREHOUSE_NOT_EQUAL_CLASSIFY = "warehouseParentNotEqualClassify"; |
| | | |
| | | /** |
| | | * ææ°æ®ä¸è½ä¿®æ¹åºæ¿çæå±åºæ¬åç±» |
| | | */ |
| | | public static final String BD_WAREHOUSE_HAS_DATA_NOT_EDIT_CLASSIFY = "warehouseHasDataNotEditClassify"; |
| | | |
| | | /** |
| | | * 没æä¼ éç¨æ·ç主é®ï¼ä¸è½è®¾ç½®ç®¡çå |
| | | */ |
| | | public static final String BD_WAREHOUSE_ADMIN_USEROID_NOT_HAS = "warehouseAdminUserOidNotHas"; |
| | | |
| | | /** |
| | | * ä¸ºåºæ¿è®¾ç½®ç®¡çåæå |
| | | */ |
| | | public static final String BD_WAREHOUSE_ADMIN_LINK_SUCCESS = "warehouseAdminLinkSuccess"; |
| | | |
| | | /** |
| | | * åºæ¿åç±»ç主é®ä¸åå¨ |
| | | */ |
| | | public static final String BD_WAREHOUSE_CLASSIFY_OID_NOT_EXIST = "warehouseClassifyOidNotExsit"; |
| | | |
| | | /** |
| | | * å½åç¨æ·æ²¡æåºæ¿çæé |
| | | */ |
| | | public static final String BD_WAREHOUSE_NOT_RIGHT = "warehouseNotRight"; |
| | | |
| | | |
| | | //è´§ä½ |
| | | |
| | | /** |
| | | * ä¸çº§ä¸æ¯ä¸ä¸ªè´§æ¶ |
| | | */ |
| | | public static final String BD_GOODS_LOCATION_PARENT_NOT_SHELF = "goodsLocationParentNotShelf"; |
| | | |
| | | //Feign |
| | | |
| | | /** |
| | | * å½åç¨æ·æ²¡æå¯¹è¯¥åºæ¿çæä½æé |
| | | */ |
| | | public static final String BD_FEIGN_WAREHOUSEADMIN_NOT_PERMISSION = "feignCheckWareHouseAdminPermissions"; |
| | | |
| | | //计éåä½ |
| | | /** |
| | | * 计éåä½ä¸åå¨ |
| | | */ |
| | | public static final String UNIT_NOT_EXIST_BY_IDS = "unitNotExistByIds"; |
| | | |
| | | /** |
| | | * æ·»å æå |
| | | */ |
| | | public static final String ADD_SUCCESS ="addSuccess"; |
| | | |
| | | /** |
| | | * æ·»å 失败 |
| | | */ |
| | | public static final String ADD_FAIL = "addFailInDB"; |
| | | |
| | | /** |
| | | * ä¿®æ¹æå |
| | | */ |
| | | public static final String EDIT_SUCCESS = "editSuccess"; |
| | | |
| | | /** |
| | | * ä¿®æ¹å¤±è´¥ |
| | | */ |
| | | public static final String EDIT_FAIL = "editFail"; |
| | | |
| | | /** |
| | | * å 餿å |
| | | */ |
| | | public static final String DELETE_SUCCESS = "deleteSuccess"; |
| | | |
| | | /** |
| | | * 级èå 餿å |
| | | */ |
| | | public static final String DELETE_SUCCESS_CASCADE = "deleteSuccessCascade"; |
| | | |
| | | /** |
| | | * å é¤å¤±è´¥ |
| | | */ |
| | | public static final String DELETE_FAIL = "deleteFail"; |
| | | |
| | | /** |
| | | * å¯ç¨æå |
| | | */ |
| | | public static final String ENABLE_SUCCESS ="enableSuccess"; |
| | | |
| | | /** |
| | | * é宿å |
| | | */ |
| | | public static final String LOCK_SUCCESS = "lockSuccess"; |
| | | |
| | | /** |
| | | * éå®å¤±è´¥ |
| | | */ |
| | | public static final String LOCK_FAIL = "lockFail"; |
| | | |
| | | /** |
| | | * è§£éæå |
| | | */ |
| | | public static final String UNLOCK_SUCCESS = "unlockSuccess"; |
| | | |
| | | /** |
| | | * è§£é失败 |
| | | */ |
| | | public static final String UNLOCK_FAIL = "unlockFail"; |
| | | |
| | | /** |
| | | * 级èå¯ç¨æå |
| | | */ |
| | | public static final String ENABLE_SUCCESS_CASCADE = "enableSuccessCascade"; |
| | | |
| | | /** |
| | | * å¯ç¨å¤±è´¥ |
| | | */ |
| | | public static final String ENABLE_FAIL = "enableFail"; |
| | | |
| | | /** |
| | | * åç¨æå |
| | | */ |
| | | public static final String DISABLE_SUCCESS = "disableSuccess"; |
| | | |
| | | /** |
| | | * 级èåç¨æå |
| | | */ |
| | | public static final String DISABLE_SUCCESS_CASCADE = "disableSuccessCascade"; |
| | | |
| | | /** |
| | | * åç¨å¤±è´¥ |
| | | */ |
| | | public static final String DISABLE_FAIL = "disableFail"; |
| | | |
| | | /** |
| | | * åçæ¬å·æå |
| | | */ |
| | | public static final String UP_REVISION_SUCCESS = "dataUpRevisionSuccess"; |
| | | |
| | | /** |
| | | * åçæ¬å·å¤±è´¥ |
| | | */ |
| | | public static final String UP_REVISION_FAIL = "dataUpRevisionFail"; |
| | | |
| | | /** |
| | | * åçæ¬¡æå |
| | | */ |
| | | public static final String UP_VERSION_SUCCESS = "dataUpVersionSuccess"; |
| | | |
| | | /** |
| | | * åçæ¬¡å¤±è´¥ |
| | | */ |
| | | public static final String UP_VERSION_FAIL = "dataUpVersionFail"; |
| | | |
| | | /** |
| | | * æäº¤æå |
| | | */ |
| | | public static final String SUBMIT_SUCCESS= "submitSuccess"; |
| | | |
| | | /** |
| | | * æäº¤å¤±è´¥ |
| | | */ |
| | | public static final String SUBMIR_FAIL = "submitFail"; |
| | | |
| | | /** |
| | | * å叿å |
| | | */ |
| | | public static final String RELEASE_SUCCESS = "releaseSuccess"; |
| | | |
| | | /** |
| | | * åå¸å¤±è´¥ |
| | | */ |
| | | public static final String RELEASE_FAIL = "releaseFail"; |
| | | |
| | | /** |
| | | * çæ¬å·éå¤ |
| | | */ |
| | | public static final String REVISION_REPEAT = "revisionRepeat"; |
| | | |
| | | /** |
| | | * çæ¬¡å·éå¤ |
| | | */ |
| | | public static final String VERSION_REPEAT= "versionRepeat"; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¥è¯¢æ°æ®ä¸åå¨ |
| | | */ |
| | | public static final String DATA_OID_NOT_EXIST = "dataOidNotExist"; |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¥è¯¢çæ°æ®ä¸åå¨ |
| | | */ |
| | | public static final String DATA_ID_NOT_EXIST = "dataIdNotExist"; |
| | | |
| | | /** |
| | | * æ ¹æ®åç§°æ¥è¯¢çæ°æ®ä¸åå¨ |
| | | */ |
| | | public static final String DATA_NAME_NOT_EXIST = "dataNameNotExist"; |
| | | |
| | | /** |
| | | * 屿§å¼éå¤ |
| | | */ |
| | | public static final String DATA_ATTR_REPEAT = "dataRepeat"; |
| | | |
| | | /** |
| | | * èçæ¬çæ°æ®ä¸åå¨ |
| | | */ |
| | | public static final String OLD_REVISION_DATA_NOT_EXIST = "oldRevsionDataNotExist"; |
| | | |
| | | /** |
| | | * ä¸çº§ä¸»é®å®é
æ¯å½åèç¹çä¸çº§èç¹ï¼ä¼å¼èµ·æ»å¾ªç¯ |
| | | */ |
| | | public static final String PARENT_OID_IS_CHILD ="parentIsChild"; |
| | | |
| | | /** |
| | | * æ°æ®è¢«å¼ç¨ï¼ä¸å
许å é¤ |
| | | */ |
| | | public static final String DATA_LINKED_NOT_DELETE = "dataLinkedNotDelete"; |
| | | |
| | | /** |
| | | * æ°æ®çåèç¹ä¹è¢«å¼ç¨ï¼ä¸å
许å é¤ |
| | | */ |
| | | public static final String DATA_CASCADE_LINKED_NOT_DELETE = "dataCascadeLinkedNotDelete"; |
| | | |
| | | /** |
| | | * æ°æ®è¢«å¼ç¨ï¼ä¸å
è®¸ä¿®æ¹ |
| | | */ |
| | | public static final String DATA_LINKED_NOT_EDIT ="dataLinkedNotEdit"; |
| | | |
| | | /** |
| | | * æ°æ®ä¸å¼ç¨ï¼ä¸å
è®¸ä¿®æ¹æä¸ªå±æ§ |
| | | */ |
| | | public static final String DATA_LINKED_NOT_EDIT_ATTR="dataLinkedNotEditAttr"; |
| | | |
| | | /** |
| | | * ä¸çº§æ¡£æ¡ä¸åå¨ |
| | | */ |
| | | public static final String DATA_PARENT_NOT_EXIST = "parentNotExist"; |
| | | |
| | | /** |
| | | * åç±»æ°æ®ä¸åå¨ |
| | | */ |
| | | public static final String DATA_CLASSIFY_NOT_EXIST = "classifyNotExist"; |
| | | |
| | | /** |
| | | * å½åç¶æä¸ä¸å
è®¸ä¿®æ¹æ°æ® |
| | | */ |
| | | public static final String LCSTATUS_CAN_NOT_EDIT = "lcStatusCannotEditData"; |
| | | |
| | | /** |
| | | * å½åç¶æä¸ä¸å
许å 餿°æ® |
| | | */ |
| | | public static final String LCSTATUS_CAN_NOT_DELETE = "lcStatusCannotDeleteData"; |
| | | |
| | | /** |
| | | * 导å
¥æå |
| | | */ |
| | | public static final String IMPORT_SUCCESS = "importSuccess"; |
| | | |
| | | /** |
| | | * 导å
¥å¤±è´¥ |
| | | */ |
| | | public static final String IMPORT_FAIL = "importFail"; |
| | | |
| | | /** |
| | | * 导å
¥çæ¨¡æ¿æä»¶ä¸åå¨ |
| | | */ |
| | | public static final String IMPORT_TEMPLATE_FILE_NOT_FOUND = "importTemplateFileNotFound"; |
| | | |
| | | /** |
| | | * å¯¼åºæå |
| | | */ |
| | | public static final String EXPORT_SUCCESS = "exportSuccess"; |
| | | |
| | | /** |
| | | * 导åºå¤±è´¥ |
| | | */ |
| | | public static final String EXPORT_FAIL = "exportFail"; |
| | | |
| | | /** |
| | | * ä¸ä¼ æå |
| | | */ |
| | | public static final String UPLOAD_SUCCESS = "uploadSuccess"; |
| | | |
| | | /** |
| | | * ä¸ä¼ 失败 |
| | | */ |
| | | public static final String UPLOAD_FAIL = "uploadFail"; |
| | | |
| | | /** |
| | | * ä¸è½½æå |
| | | */ |
| | | public static final String DOWNLOAD_SUCCESS = "downloadSuccess"; |
| | | |
| | | /** |
| | | * ä¸è½½å¤±è´¥ |
| | | */ |
| | | public static final String DOWNLOAD_FAIL = "downloadFail"; |
| | | |
| | | /** |
| | | * æä»¶ä¸åå¨ |
| | | */ |
| | | public static final String FILE_NOT_EXIST = "fileNotExist"; |
| | | |
| | | /** |
| | | * å®¡æ¹æå |
| | | */ |
| | | public static final String AUDIT_SUCCESS = "auditSuccess"; |
| | | |
| | | /** |
| | | * 审æ¹å¤±è´¥ |
| | | */ |
| | | public static final String AUDIT_FAIL = "auditFail"; |
| | | |
| | | /** |
| | | * ä¸åæå |
| | | */ |
| | | public static final String ISSUED_SUCCESS = "issuedSuccess"; |
| | | |
| | | /** |
| | | * ä¸å失败 |
| | | */ |
| | | public static final String ISSUED_FAIL = "issuedFail"; |
| | | |
| | | /** |
| | | * æ¥æ¶æå |
| | | */ |
| | | public static final String RECEIVE_SUCCESS = "receiveSuccess"; |
| | | |
| | | /** |
| | | * æ¥æ¶å¤±è´¥ |
| | | */ |
| | | public static final String RECEIVE_FAIL = "receiveFail"; |
| | | |
| | | /** |
| | | * 计åçå¶é 便®ä¸åå¨ |
| | | */ |
| | | public static final String PLAN_SOURCE_NOT_EXIST = "planSourceNotExist"; |
| | | |
| | | /** |
| | | * 计åçå¶é ç®æ ä¸åå¨ |
| | | */ |
| | | public static final String PLAN_TARGET_NOT_EXIST = "planTargetNotExist"; |
| | | |
| | | /** |
| | | * æ´¾åæå |
| | | */ |
| | | public static final String DISPATCH_SUCCESS = "dispatchSuccess"; |
| | | |
| | | /** |
| | | * æ´¾å失败 |
| | | */ |
| | | public static final String DISPATCH_FAIL = "dispatchFail"; |
| | | |
| | | /** |
| | | * 该计åä¸ä¸å卿´¾åè¿çä»»å¡ |
| | | */ |
| | | public static final String DISPATCH_TASK_NOT_EXIST_BY_PLAN = "dispatchTaskNotExistByPlan"; |
| | | |
| | | } |
| | |
| | | package com.vci.ubcs.starter.web.enumpck; |
| | | |
| | | import com.alibaba.druid.util.StringUtils; |
| | | |
| | | public interface BaseEnum { |
| | | String getValue(); |
| | | |
| | | String getText(); |
| | | |
| | | |
| | | /** |
| | | * ä½¿ç¨æä¸¾çå¼è·åæä¸¾å¯¹è±¡çéç¨æ¹æ³ |
| | | * @param clazz æä¸¾æå±ç±» |
| | | * @param value æä¸¾çå¼ |
| | | * @param <T> ç±»å |
| | | * @return ç»æ |
| | | */ |
| | | public static <T extends BaseEnum> T getEnumByValue(Class<T> clazz,Object value){ |
| | | if(value == null){ |
| | | return null; |
| | | } |
| | | T[] enums = clazz.getEnumConstants(); |
| | | if (enums == null || enums.length == 0) { |
| | | return null; |
| | | } |
| | | |
| | | for (T e : enums) { |
| | | if (value instanceof String) { |
| | | if (StringUtils.equalsIgnoreCase((String) value, (String) ((BaseEnum) e).getValue())) { |
| | | return e; |
| | | } |
| | | } else { |
| | | if (value.equals(e.getValue())) { |
| | | return e; |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * ä½¿ç¨æä¸¾çå¼è·åæ¾ç¤ºææ¬çæ¹æ³ |
| | | * @param clazz æä¸¾æå±çç±» |
| | | * @param value æä¸¾çå¼ |
| | | * @param <T> ç±»å |
| | | * @return ç»æ |
| | | */ |
| | | public static <T extends BaseEnum> String getTextByValue(Class<T> clazz,String value){ |
| | | T e = getEnumByValue(clazz, value); |
| | | if (e == null) { |
| | | return ""; |
| | | } |
| | | return ((BaseEnum) e).getText(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.web.enumpck; |
| | | |
| | | |
| | | public enum DataSecretEnum implements BaseEnumInt { |
| | | NONE(10, "éå¯"), |
| | | INNER(15, "å
é¨"), |
| | | SECRET(20, "ç§å¯"), |
| | | PRIVACY(30, "æºå¯"); |
| | | |
| | | private int value; |
| | | private String text; |
| | | |
| | | public int getValue() { |
| | | return this.value; |
| | | } |
| | | |
| | | public void setValue(int value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | public String getText() { |
| | | return this.text; |
| | | } |
| | | |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | private DataSecretEnum(int secret, String secretText) { |
| | | this.value = secret; |
| | | this.text = secretText; |
| | | } |
| | | |
| | | public static String getSecretText(int secret) { |
| | | DataSecretEnum[] var1 = values(); |
| | | int var2 = var1.length; |
| | | |
| | | for(int var3 = 0; var3 < var2; ++var3) { |
| | | DataSecretEnum eu = var1[var3]; |
| | | if (eu.value == secret) { |
| | | return eu.text; |
| | | } |
| | | } |
| | | |
| | | return NONE.text; |
| | | } |
| | | |
| | | public static int getSecretValueByText(String text) { |
| | | DataSecretEnum[] var1 = values(); |
| | | int var2 = var1.length; |
| | | |
| | | for(int var3 = 0; var3 < var2; ++var3) { |
| | | DataSecretEnum eu = var1[var3]; |
| | | if (eu.text.equalsIgnoreCase(text)) { |
| | | return eu.value; |
| | | } |
| | | } |
| | | |
| | | return NONE.value; |
| | | } |
| | | |
| | | public static boolean isValid(int secret) { |
| | | DataSecretEnum[] var1 = values(); |
| | | int var2 = var1.length; |
| | | |
| | | for(int var3 = 0; var3 < var2; ++var3) { |
| | | DataSecretEnum eu = var1[var3]; |
| | | if (eu.value == secret) { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | * ç¼ç è§åï¼æå¡å¯å¨å |
| | | */ |
| | | APPLICATION_NAME_CODE(AppConstant.APPLICATION_NAME_CODE,"ä¸»æ°æ®"), |
| | | APPLICATION_FLOW_NAME(AppConstant.APPLICATION_FLOW_NAME,"ubcs-flow"), |
| | | ; |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.starter.web.enumpck; |
| | | |
| | | |
| | | /** |
| | | * æµç¨æ¨¡æ¿åºç¨æé®ç±»å |
| | | * @author wang1 |
| | | */ |
| | | public enum ProcessTemplateTypeEnum implements BaseEnum { |
| | | |
| | | /** |
| | | * åå¸ |
| | | */ |
| | | PUBLIC("PUBLIC","åå¸"), |
| | | |
| | | /** |
| | | * åæ´ |
| | | */ |
| | | EDIT("EDIT","åæ´"), |
| | | |
| | | /** |
| | | * åç¨ |
| | | */ |
| | | ENABLE("ENABLE","åç¨"), |
| | | |
| | | /** |
| | | * å¯ç¨ |
| | | */ |
| | | DISABLE("DISABLE","å¯ç¨"); |
| | | |
| | | /** |
| | | * æä¸¾çå¼ |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | /** |
| | | * è·åæä¸¾å¼ |
| | | * |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | @Override |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 设置æä¸¾å¼ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | */ |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾æ¾ç¤ºææ¬ |
| | | * |
| | | * @return æ¾ç¤ºææ¬ |
| | | */ |
| | | @Override |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¾ç¤ºææ¬ |
| | | * |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æé 彿° |
| | | * |
| | | * @param value å¼ |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | private ProcessTemplateTypeEnum(String value, String text) { |
| | | this.value = value; |
| | | this.text = text; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®åç§°è·å对åºçæä¸¾å¼ |
| | | * |
| | | * @param text åç§° |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | public static String getValueByText(String text) { |
| | | for (ProcessTemplateTypeEnum wenum : ProcessTemplateTypeEnum.values()) { |
| | | if (wenum.getText().equalsIgnoreCase(text)) { |
| | | return wenum.getValue(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return åç§° |
| | | */ |
| | | public static String getTextByValue(String value) { |
| | | for (ProcessTemplateTypeEnum wenum : ProcessTemplateTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum.getText(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·åæä¸¾å¯¹è±¡ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return æä¸¾å¯¹è±¡ï¼ä¸å卿¶åè¿ånull |
| | | */ |
| | | public static ProcessTemplateTypeEnum forValue(String value) { |
| | | for (ProcessTemplateTypeEnum wenum : ProcessTemplateTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | |
| | | import java.io.Serializable; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * å 为å½åæ¡æ¶ä½¿ç¨çæ¯queryæ¥ååé¡µï¼ |
| | | * æä»¥æè¿è¾¹åç
§ä»¥åçBladeQueryObjectæ¥ä¿®æ¹ |
| | | * ä¸ä¸ªå½åæ¡æ¶ä½¿ç¨èµ·æ¥æ¹ä¾¿ä¸ç¹ç对象 |
| | | * æä»¥æè¿è¾¹åç
§ä»¥åçBaseQueryObjectæ¥ä¿®æ¹ç |
| | | * @author ludc |
| | | * @date 2023/5/23 13:00 |
| | | */ |
| | |
| | | @JSONField |
| | | private Map<String, Object> conditionMap = new HashMap(); |
| | | @JSONField |
| | | private int page = 1; |
| | | private Integer page = 1; |
| | | @JSONField |
| | | private String sort; |
| | | @JSONField |
| | |
| | | // (powered by FernFlower decompiler) |
| | | // |
| | | |
| | | import cn.hutool.core.lang.Snowflake; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | |
| | | } |
| | | |
| | | public static String getPk() { |
| | | return UUID.randomUUID().toString(); |
| | | return String.valueOf(getPKLong(1,1)); |
| | | } |
| | | |
| | | public static Long getPKLong(long workerId,long dataCenterId){ |
| | | Snowflake snowflake = IdUtil.getSnowflake(workerId,dataCenterId); |
| | | return snowflake.nextId(); |
| | | } |
| | | |
| | | public static int getIntForBoolean(boolean b) { |
| | |
| | | public static <T> Collection<Collection<T>> switchCollectionForOracleIn(Collection<T> list) { |
| | | return switchCollectionForOracleIn(list, 500); |
| | | } |
| | | |
| | | /** |
| | | * oracle in æ¥è¯¢ä¸è½è¶
è¿1000ï¼è½¬æ¢ä¸ä¸éå |
| | | * ç±äºSQLè¯å¥1000个å¯è½å¾é¿ï¼è¶
è¿oracle10gï¼æä»¥çºç²æ§è½åé
为500个æ°ç» |
| | | * @param list éè¦è½¬æ¢çå表å
容 |
| | | * @return åç»åçlist |
| | | */ |
| | | public static <T> List<List<T>> switchListForOracleIn(List<T> list) { |
| | | List<List<T>> listHasList = new ArrayList<List<T>>(); |
| | | if(list == null){ |
| | | return listHasList; |
| | | } |
| | | List<T> newList = new ArrayList<T>(); |
| | | for(Object obj : list){ |
| | | //为äºè®©listè¿å¯ä»¥æ·»å å
容ï¼å 为使ç¨subliståï¼listä¸è½åAddäº |
| | | newList.add((T)obj); |
| | | } |
| | | int muti = 1; |
| | | if(newList.size() >500){ |
| | | int balance = newList.size()%500; |
| | | muti = (newList.size() - balance)/500 + (balance == 0?0:1); |
| | | } |
| | | for(int i = 0 ; i < muti; i ++){ |
| | | int start = i*500; |
| | | int end = start + 500; |
| | | if(i == muti-1 || end >newList.size() ){ |
| | | end = newList.size(); |
| | | } |
| | | List subList = newList.subList(start,end); |
| | | listHasList.add(subList); |
| | | } |
| | | return listHasList; |
| | | } |
| | | public static <T> Collection<Collection<T>> switchCollectionForOracleIn(Collection<T> collection, int preSize) { |
| | | Collection<Collection<T>> listHasList = new ArrayList(); |
| | | if (collection == null) { |
| | |
| | | } |
| | | return listHasList; |
| | | } |
| | | /** |
| | | * æ¯å¦é»è®¤ç屿§ |
| | | * @param fieldNames 屿§çåå |
| | | * @return true为é»è®¤ |
| | | */ |
| | | public static boolean isDefaultField(String fieldNames){ |
| | | if(VciQueryWrapperForDO.BASIC_FIELD_MAP.containsKey(fieldNames) || VciQueryWrapperForDO.LIFECYCLE_MANAGE_FIELD_MAP.containsKey(fieldNames) |
| | | || VciQueryWrapperForDO.REVISION_MANAGE_FIELD_MAP.containsKey(fieldNames) ) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.workflow.constant; |
| | | |
| | | public class FlowConstant { |
| | | |
| | | public static final String MAPPER_SCAN = "com.dragon.*.dao.*"; |
| | | |
| | | /** |
| | | * æäº¤äººçåéåç§° |
| | | */ |
| | | public static final String FLOW_SUBMITTER_VAR = "initiator"; |
| | | /** |
| | | * æäº¤äººèç¹åç§° |
| | | */ |
| | | public static final String FLOW_SUBMITTER = "æäº¤äºº"; |
| | | /** |
| | | * èªå¨è·³è¿èç¹è®¾ç½®å±æ§ |
| | | */ |
| | | public static final String FLOWABLE_SKIP_EXPRESSION_ENABLED = "_FLOWABLE_SKIP_EXPRESSION_ENABLED"; |
| | | /** |
| | | * æèµ·ç¶æ |
| | | */ |
| | | public static final int SUSPENSION_STATE = 2; |
| | | /** |
| | | * æ¿æ´»ç¶æ |
| | | */ |
| | | public static final int ACTIVATE_STATE = 1; |
| | | //åå ç¾ |
| | | public static final String AFTER_ADDSIGN = "after"; |
| | | //åå ç¾ |
| | | public static final String BEFORE_ADDSIGN = "before"; |
| | | |
| | | } |
| | |
| | | <dependency> |
| | | <groupId>org.springblade</groupId> |
| | | <artifactId>blade-core-boot</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>org.springblade</groupId> |
| | | <artifactId>blade-starter-mybatis</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springblade</groupId> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.config; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2023/6/13 12:46 |
| | | */ |
| | | public class UBCSTenantSqlParser { |
| | | |
| | | } |
| | |
| | | @GetMapping("/gridCodeBasicSec") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "å页 ç æ®µåºç¡ä¿¡æ¯å表", notes = "ä¼ å
¥codeRuleVO") |
| | | public R<IPage<CodeBasicSecVO>> gridCodeBasicSec(BladeQueryObject bladeQueryObject){ |
| | | public R<IPage<CodeBasicSecVO>> gridCodeBasicSec(BladeQueryObject bladeQueryObject) throws Exception{ |
| | | IPage<CodeBasicSecVO> codeRuleVOIPage = codeBasicSecService.gridCodeBasicSec(bladeQueryObject.getQuery().setAscs("ordernum"),bladeQueryObject.getConditionMap()); |
| | | return R.data(codeRuleVOIPage); |
| | | } |
| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.code.dto.CodeRuleDTO; |
| | | import com.vci.ubcs.code.entity.CodeRule; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.apache.http.util.EncodingUtils; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | |
| | |
| | | * ç¼ç è§å èªå®ä¹å页 |
| | | * @return baseQueryObject |
| | | */ |
| | | @GetMapping("/gridCodeRule") |
| | | @GetMapping(value = "/gridCodeRule") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "å页", notes = "ä¼ å
¥CodeRule") |
| | | public R<IPage<CodeRuleVO>> gridCodeRule(BladeQueryObject bladeQueryObject) { |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.starter.annotation.VciBusinessLog; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | 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.Tree; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import com.vci.ubcs.starter.web.util.ControllerUtil; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | |
| | | // return engineService.updateBatchByBaseModel("wupin", models); |
| | | // return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | |
| | | /** |
| | | * é»è®¤çåç
§å表 |
| | | * @param referConfigVO åç
§çé
ç½®ä¿¡æ¯ |
| | | * @return æ§è¡çç»æ |
| | | */ |
| | | @GetMapping("/defaultReferDataGrid") |
| | | public DataGrid defaultReferDataGrid(UIFormReferVO referConfigVO, PageHelper pageHelper){ |
| | | return engineService.referDataGrid(referConfigVO,pageHelper); |
| | | } |
| | | |
| | | /** |
| | | * é»è®¤çæ å½¢åç
§å表 |
| | | * @param referConfigVO åç
§çé
ç½®ä¿¡æ¯ |
| | | * @return æ§è¡çç»æ |
| | | */ |
| | | @GetMapping("/defaultReferTree") |
| | | public List<Tree> defaultReferTree(UIFormReferVO referConfigVO, TreeQueryObject queryObject){ |
| | | return engineService.referTree(referConfigVO,queryObject); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | List<String> selectById(@Param("inSql") String inSql); |
| | | |
| | | |
| | | int queryCountBySql(@Param("inSql") String inSql); |
| | | |
| | | List<Map> selectBySql(@Param("inSql") String inSql); |
| | | |
| | | List<Map<String,String>> queryByOnlySqlForMap(@Param("inSql") String inSql); |
| | |
| | | * @param mapList éè¦æå
¥çææè®°å½ |
| | | * @return æå
¥æåçæ¡æ° |
| | | */ |
| | | Integer insertByBaseModel(String tableName,Map<String,String> columnMap,List<Map<String,String>> mapList);/** |
| | | Integer insertByBaseModel(String tableName,Map<String,String> columnMap,List<Map<String,String>> mapList); |
| | | /** |
| | | * ä¼ å
¥è¡¨åï¼mapï¼list<map>宿æ¹éæ´æ°æä½ |
| | | * @param tableName 表å |
| | | * @param mapList éè¦æ´æ°çææè®°å½ |
| | |
| | | @InterceptorIgnore(tenantLine = "true") |
| | | Integer updateBatchByBaseModel(String tableName,List<Map<String,String>> mapList); |
| | | |
| | | /** |
| | | * ä¼ å
¥è¡¨åï¼mapï¼oids宿æ¹éå é¤æä½ |
| | | * @param tableName 表å |
| | | * @param oids éè¦å é¤çææè®°å½ |
| | | * @return å 餿åçæ¡æ° |
| | | */ |
| | | Integer deleteByTaleAndOid(String tableName,String oids); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<CodeClassify> selectByWrapper(Wrapper wrapper); |
| | | |
| | | |
| | | |
| | | /** |
| | | * ä½¿ç¨æ¥è¯¢å°è£
卿¥æ¥è¯¢ |
| | | * @param wrapper æ¥è¯¢å°è£
å¨ |
| | | * @return æ°æ®å¯¹è±¡ |
| | | */ |
| | | List<String> select1(Wrapper wrapper); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * èªå®ä¹å页 |
| | | * |
| | |
| | | import com.vci.ubcs.code.entity.CodeRule; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | 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.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | |
| | | * @param condtionMap |
| | | * @return |
| | | */ |
| | | IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> condtionMap); |
| | | IPage<CodeRuleVO> gridCodeRule(Query query, Map<String,Object> condtionMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¡éªç¼ç è§åçç¶ææ¯å¦å¯ä»¥ç¼è¾æå é¤ |
| | | * @param lcStatus ç¼ç è§å |
| | | * @return true表示å¯ä»¥ç¼è¾æå é¤ï¼false表示ä¸å¯ä»¥ |
| | | */ |
| | | boolean checkEditDelStatus(String lcStatus); |
| | | boolean checkEditDelStatus(String lcStatus) throws VciBaseException; |
| | | |
| | | /** |
| | | * å¢å ä¸»æ°æ®ç¼ç è§å |
| | |
| | | * @param oid ç¼ç è§åä¸»é® |
| | | * @return true表示已ç»ä½¿ç¨ï¼false表示æªè¢«ä½¿ç¨ |
| | | */ |
| | | boolean isAlreadyInUse(String oid); |
| | | boolean isAlreadyInUse(String oid) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¥çä¸»æ°æ®ç¼ç è§åç使ç¨èå´ |
| | | * @param oid ç¼ç è§åä¸»é® |
| | | * @return 主é¢åºå类使ç¨å°è¯¥ç¼ç è§åçææéå |
| | | */ |
| | | Collection<CodeClassifyVO> listUseRangeInCodeClassify(String oid); |
| | | Collection<CodeClassifyVO> listUseRangeInCodeClassify(String oid) throws VciBaseException; |
| | | |
| | | /** |
| | | * 主é®è·åä¸»æ°æ®ç¼ç è§å |
| | |
| | | * @param update enable:å¯ç¨ disable:åç¨ release:åå¸ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | R updateStatus(String oid, String update); |
| | | R updateStatus(String oid, String update) throws VciBaseException; |
| | | |
| | | /** |
| | | * å
éç¼ç è§å |
| | | * @param codeRuleDTO ä¸»æ°æ®ç¼ç è§åæ°æ®ä¼ è¾å¯¹è±¡ï¼oidåtséè¦ä¼ è¾ |
| | | * @return ä¸»æ°æ®ç¼ç è§åæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | R cloneCodeRule(CodeRuleDTO codeRuleDTO); |
| | | R cloneCodeRule(CodeRuleDTO codeRuleDTO) throws VciBaseException; |
| | | |
| | | /** |
| | | * ç¼ç è§åæ¸
空ææå·²çæçç¼ç |
| | | * @param oid ç¼ç è§åä¸»é® |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | R clearAllCode(String oid); |
| | | |
| | | R clearAllCode(String oid) throws VciBaseException; |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®è·åç¼ç è§åçå
容 |
| | | * @param codeRuleOid ä¸»é® |
| | | * @return è§åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | CodeRuleVO getObjectHasSecByOid(String codeRuleOid); |
| | | CodeRuleVO getObjectHasSecByOid(String codeRuleOid) throws VciBaseException; |
| | | } |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | |
| | | * @param baseModels å¤çæ°æ® |
| | | * @return å¤çæåæ°æ®æ¡æ° |
| | | */ |
| | | Integer insertBatchByType(String btmType, List<BaseModel> baseModels) throws Exception; |
| | | Integer insertBatchByType(String btmType, List<BaseModel> baseModels); |
| | | /** |
| | | * ä¼ å
¥ä¸å¡ç±»å以åç¸oidéåæ¥è¯¢æ°æ®è¿è¡è¿å |
| | | * |
| | |
| | | * @param oids éè¦æ¥è¯¢çoidéå éå·åå¼ |
| | | * @return æ¥è¯¢åºçæ°æ® |
| | | */ |
| | | List<BaseModel> selectByTypeAndOid(String btmType, String oids) throws IllegalAccessException, NoSuchFieldException, InstantiationException, InvocationTargetException, IntrospectionException, SQLException; |
| | | List<BaseModel> selectByTypeAndOid(String btmType, String oids) ; |
| | | /** |
| | | * ä¼ å
¥ä¸å¡ç±»å以åç¸å
³æ°æ®è¿è¡æ¹éæ´æ°æä½ |
| | | * |
| | |
| | | * @param baseModels å¤çæ°æ® |
| | | * @return å¤çç¶æ |
| | | */ |
| | | R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) throws Exception; |
| | | R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels); |
| | | |
| | | /** |
| | | * é»è®¤å表 |
| | | * @param referConfigVO |
| | | * @param pageHelper |
| | | * @return |
| | | */ |
| | | DataGrid referDataGrid(UIFormReferVO referConfigVO, PageHelper pageHelper); |
| | | |
| | | |
| | | /** |
| | | * è·åæ å½¢çåç
§ |
| | | * @param referConfigVO åç
§çé
ç½® |
| | | * @return æ å½¢çæ°æ® |
| | | */ |
| | | List<Tree> referTree(UIFormReferVO referConfigVO, TreeQueryObject queryObject); |
| | | } |
| | |
| | | import com.vci.ubcs.code.mapper.CodeAllCodeMapper; |
| | | import com.vci.ubcs.code.service.ICodeAllCodeService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeAllCodeVO; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | * æ°æ®æä½å¯¹è±¡ |
| | | */ |
| | | @Resource |
| | | @Lazy |
| | | private CodeAllCodeMapper codeAllcodeMapper; |
| | | |
| | | @Override |
| | |
| | | import com.vci.ubcs.code.wrapper.CodeBasicSecWrapper; |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.enums.EnumEnum; |
| | | import com.vci.ubcs.starter.enumpack.CodeTableNameEnum; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.UBCSCondition; |
| | | import com.vci.ubcs.starter.util.UBCSSqlKeyword; |
| | | import com.vci.ubcs.starter.web.enumpck.NewAppConstantEnum; |
| | | import com.vci.ubcs.starter.web.enumpck.OsCodeFillTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.BladeQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import com.vci.ubcs.system.entity.DictBiz; |
| | | import com.vci.ubcs.system.feign.IDictBizClient; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public IPage<CodeBasicSecVO> gridCodeBasicSec(Query query, Map<String,Object> conditionMap) throws VciBaseException { |
| | | if(Func.isEmpty(conditionMap.get("pkCodeRule")) && Func.isEmpty(conditionMap.get("t.pkCodeRule_equal")) ){ |
| | | public IPage<CodeBasicSecVO> gridCodeBasicSec(Query query, Map<String,Object> conditionMap) throws ServiceException { |
| | | if(Func.isEmpty(Func.isEmpty(conditionMap.get(CodeTableNameEnum.PL_CODE_BASICSEC.getText()+".pkCodeRule")))){ |
| | | return null; |
| | | } |
| | | // è表æ¥è¯¢ |
| | | MPJLambdaWrapper<CodeBasicSec> mpjLambdaWrapper = UBCSCondition.getMPJLambdaWrapper(conditionMap, CodeBasicSec.class) |
| | | // è表æ¥è¯¢ ,设置表å«åï¼è¡¨å«åé»è®¤å°±éç¨è¡¨åå°åï¼é
ç½®é«çº§æ¥è¯¢çæ¶åå°±éè¦æ ¹æ®è¿ä¸ªæ¥å¯¹whereæ¡ä»¶è¿è¡é
ç½® |
| | | MPJLambdaWrapper<CodeBasicSec> mpjLambdaWrapper = new MPJLambdaWrapper<>(CodeBasicSec.class, CodeTableNameEnum.PL_CODE_BASICSEC.getText()) |
| | | .selectAll(CodeBasicSec.class) |
| | | .selectAs(CodeClassify::getName, CodeBasicSec::getReferCodeClassifyOidName) |
| | | .leftJoin(CodeClassify.class, CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid); |
| | | .leftJoin(CodeClassify.class,CodeTableNameEnum.PL_CODE_CLASSIFY.getText(), CodeClassify::getOid, CodeBasicSec::getReferCodeClassifyOid); |
| | | // æ·»å whereæ¡ä»¶ |
| | | UBCSSqlKeyword.buildCondition(conditionMap,mpjLambdaWrapper); |
| | | IPage<CodeBasicSec> codeBasicSecIPage = codeBasicSecMapper.selectPage(UBCSCondition.getPage(query), mpjLambdaWrapper); |
| | | return CodeBasicSecWrapper.build().pageVO(codeBasicSecIPage); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean batchDeleteSecByCodeRuleOid(String codeRuleOid) { |
| | | public boolean batchDeleteSecByCodeRuleOid(String codeRuleOid) throws ServiceException { |
| | | VciBaseUtil.alertNotNull(codeRuleOid,"ç¼ç è§å主é®"); |
| | | // 1ãéè¿pkcoderuleä½ä¸ºæ¡ä»¶ï¼å
æ¥è¯¢è¦å é¤åºç¡ç 段 |
| | | List<CodeBasicSec> deleteList = this.codeBasicSecMapper.selectList(Wrappers.<CodeBasicSec>query().eq("pkcoderule", codeRuleOid)); |
| | |
| | | * @return æç©ºçåä¼ key-屿§å value-åæ®µå«ä¹ï¼æ²¡æç©ºçåä¼ key-success value-true |
| | | */ |
| | | @Override |
| | | public KeyValue checkAttrNullableBySecType(CodeBasicSecDTO codeBasicSecDTO) { |
| | | public KeyValue checkAttrNullableBySecType(CodeBasicSecDTO codeBasicSecDTO) throws ServiceException { |
| | | VciBaseUtil.alertNotNull(codeBasicSecDTO.getSecType(), "ç æ®µåç±»"); |
| | | String secType = codeBasicSecDTO.getSecType(); |
| | | HashMap<String, String> attrMap = JSONObject.parseObject(JSONObject.toJSONString(codeBasicSecDTO), HashMap.class); |
| | |
| | | * @param secType ç æ®µç±»å |
| | | * @return ä¸å¯ä¸ºç©ºçåæ®µéå |
| | | */ |
| | | private Map<String, String> getNotNullableAttr(String secType) { |
| | | private Map<String, String> getNotNullableAttr(String secType) throws ServiceException { |
| | | Map<String, String> attrMap = new HashMap<>(); |
| | | if (CodeSecTypeEnum.CODE_ATTR_SEC.getValue().equalsIgnoreCase(secType)) { |
| | | attrMap.put("name", "屿§ç 段åç§°"); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R cloneCodeBasicSec(List<String> oidList, String pkCodeRule) { |
| | | public R cloneCodeBasicSec(List<String> oidList, String pkCodeRule) throws ServiceException { |
| | | boolean isLinked = checkIsLinked(pkCodeRule,null); |
| | | if (isLinked) { |
| | | return R.fail("ç¼ç è§å已被å¼ç¨ï¼ä¸å
许ç¼è¾æå é¤"); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean upOrderNum(String oid) { |
| | | public boolean upOrderNum(String oid) throws ServiceException{ |
| | | CodeBasicSec secDO = selectByOid(oid); |
| | | if(secDO.getOrderNum() > 1){ |
| | | //çäº1çæ¶åä¸è½ä¸ç§»äº |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean downOrderNum(String oid) { |
| | | public boolean downOrderNum(String oid) throws ServiceException { |
| | | CodeBasicSec secDO = selectByOid(oid); |
| | | Long total = codeBasicSecMapper.selectCount(Wrappers.<CodeBasicSec>query() |
| | | .lambda().eq(CodeBasicSec::getPkCodeRule,secDO.getPkCodeRule()) |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<String> getOidByCodeclassifysecOid(String codeClassifySecOid) { |
| | | public List<String> getOidByCodeclassifysecOid(String codeClassifySecOid)throws ServiceException { |
| | | return codeBasicSecMapper.getOidByCodeclassifysecOid(codeClassifySecOid.trim()); |
| | | } |
| | | |
| | |
| | | * @return ç æ®µçå
容 |
| | | */ |
| | | @Override |
| | | public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid) { |
| | | public List<CodeBasicSecVO> listCodeBasicSecByRuleOid(String ruleOid)throws ServiceException { |
| | | if(StringUtils.isBlank(ruleOid)){ |
| | | return new ArrayList<>(); |
| | | } |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.awt.event.ItemEvent; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant.*; |
| | | |
| | |
| | | public List<CodeClassify> selectByWrapper(Wrapper wrapper) { |
| | | return codeClassifyMapper.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ |
| | | * @param wrapper æ¥è¯¢å°è£
å¨ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<String> select1(Wrapper wrapper) { |
| | | |
| | | return codeClassifyMapper.selectObjs(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public IPage<CodeClassifyVO> selectPlCodeClassifyPage(IPage<CodeClassifyVO> page, CodeClassifyVO plCodeClassify) { |
| | |
| | | */ |
| | | @Override |
| | | public List<Tree> treeCodeClassify(TreeQueryObject treeQueryObject) { |
| | | List<CodeClassify> doList =codeClassifyMapper |
| | | .selectCodeClassifyDOByTree(treeQueryObject.getConditionMap().get("id"),treeQueryObject.getConditionMap().get("lcStatus"),treeQueryObject.getParentOid()); |
| | | // List<CodeClassify> doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid()); |
| | | |
| | | List<CodeClassify> doList = null; |
| | | String id = null; |
| | | String lcStatus = null; |
| | | if(!Objects.isNull(treeQueryObject.getConditionMap())){ |
| | | id = treeQueryObject.getConditionMap().getOrDefault("id",null); |
| | | lcStatus = treeQueryObject.getConditionMap().getOrDefault("lcStatus",null); |
| | | } |
| | | if(StringUtils.isNotBlank(id) || StringUtils.isNotBlank(lcStatus) ){ |
| | | doList = codeClassifyMapper |
| | | .selectCodeClassifyDOByTree(treeQueryObject.getConditionMap().get("id"),treeQueryObject.getConditionMap().get("lcStatus"),treeQueryObject.getParentOid()); |
| | | }else{ |
| | | doList =codeClassifyMapper.selectCodeClassifyVOByTree(treeQueryObject.getParentOid()); |
| | | } |
| | | List<CodeClassifyVO> voList = codeClassifyDO2VOs(doList); |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(PARENT_FIELD_NAME.toLowerCase(Locale.ROOT)); |
| | | treeWrapperOptions.copyFromTreeQuery(treeQueryObject); |
| | |
| | | attributeVO.setAttributeLength(attr.getAttributeLength()); |
| | | attributeVO.setBtmTypeId(btmTypeDetail.getData().getId()); |
| | | attributeVO.setBtmname(btmTypeDetail.getData().getName()); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCO_FIELD_TYPE,attr.getAttrDataType())); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCI_FIELD_TYPE,attr.getAttrDataType())); |
| | | boolean add = true; |
| | | if(StringUtils.isNotBlank(id) && !attributeVO.getId().contains(id.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(StringUtils.isNotBlank(name) && !attributeVO.getId().contains(name.replace("*",""))){ |
| | | if(StringUtils.isNotBlank(name) && !attributeVO.getName().contains(name.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(add){ |
| | |
| | | throw new ServiceException("ä¸å¡ç±»åfeignæ¥å£è°ç¨åºé"); |
| | | } |
| | | List<BtmTypeAttributeVO> defaultAttrVOS = btmTypeVOR.getData().getAttributes(); |
| | | if(!CollectionUtils.isEmpty(defaultAttrVOS)){ |
| | | defaultAttrVOS.stream().forEach(attr->{ |
| | | |
| | | // å两个éåå·®é |
| | | List<String> ids = unDefaultAttributes.stream().map(BtmTypeAttributeVO::getId).collect(Collectors.toList()); |
| | | defaultAttrVOS.forEach(item->{ |
| | | if(!ids.contains(item.getId())){ |
| | | BtmTypeAttributeVO attributeVO = new BtmTypeAttributeVO(); |
| | | BeanUtils.copyProperties(item,attributeVO); |
| | | attributeVO.setAttrDataType(item.getAttrDataType()); |
| | | attributeVO.setAttributeLength(item.getAttributeLength()); |
| | | attributeVO.setBtmTypeId(btmTypeDetail.getData().getId()); |
| | | attributeVO.setBtmname(btmTypeDetail.getData().getName()); |
| | | attributeVO.setAttrDataTypeText(EnumCache.getValue(EnumEnum.VCI_FIELD_TYPE,item.getAttrDataType())); |
| | | boolean add = true; |
| | | if(StringUtils.isNotBlank(id) && !attr.getId().contains(id.replace("*",""))){ |
| | | if(StringUtils.isNotBlank(id) && !item.getId().contains(id.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(StringUtils.isNotBlank(name) && !attr.getId().contains(name.replace("*",""))){ |
| | | if(StringUtils.isNotBlank(name) && !item.getName().contains(name.replace("*",""))){ |
| | | add = false; |
| | | } |
| | | if(add){ |
| | | attributeVOS.add(attr); |
| | | attributeVOS.add(attributeVO); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | DataGrid<BtmTypeAttributeVO> dataGrid = new DataGrid<>(); |
| | | dataGrid.setData(attributeVOS); |
| | | dataGrid.setTotal(attributeVOS.size()); |
| | |
| | | } |
| | | |
| | | /** |
| | | <<<<<<< Updated upstream |
| | | <<<<<<< Updated upstream |
| | | <<<<<<< Updated upstream |
| | | * 主é¢åºçæ ,å·²èè°ä¸å¡ç±»åæ¥è¯¢feign |
| | | ======= |
| | | * 主é¢åºçæ ,å·²ç»èè°ä¸å¡ç±»åæ¥è¯¢ |
| | | >>>>>>> Stashed changes |
| | | ======= |
| | | * 主é¢åºçæ ,å·²ç»èè°ä¸å¡ç±»åæ¥è¯¢ |
| | | >>>>>>> Stashed changes |
| | | ======= |
| | | * 主é¢åºçæ ,å·²ç»èè°ä¸å¡ç±»åæ¥è¯¢ |
| | | >>>>>>> Stashed changes |
| | | * |
| | | * @param treeQueryObject æ å½¢æ¥è¯¢å¯¹è±¡ |
| | | * @return 主é¢åºæ¾ç¤ºæ |
| | | */ |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.wrapper.CodeClassifyTemplateAttrWrapper; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | 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.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.*; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import com.vci.ubcs.system.entity.DictBiz; |
| | | import com.vci.ubcs.system.feign.IDictBizClient; |
| | | import org.springblade.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; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cglib.beans.BeanMap; |
| | | import org.springframework.context.annotation.Lazy; |
| | |
| | | * 屿§æå¡å¯¹è±¡ |
| | | */ |
| | | @Resource |
| | | private IAttributeClient attributeClient; |
| | | private IBtmTypeClient btmTypeClient; |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç主é¢åºåç±»çæ¨¡æ¿å±æ§ |
| | |
| | | pageHelper = new PageHelper(-1); |
| | | } |
| | | pageHelper.addDefaultAsc("ordernum"); |
| | | // IPage iPage = new IPage(); |
| | | Query query = new Query(); |
| | | query.setAscs("ordernum"); |
| | | // query.setSize(100); |
| | | if(pageHelper.getLimit() != -1){ |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | } |
| | | // Condition.getPage(query) |
| | | CodeClassifyTemplateAttr codeClstempattrVO = new CodeClassifyTemplateAttr(); |
| | | // BeanUtil.toBean(map,codeClstempattrVO); |
| | | // BeanUtil |
| | | BeanMap beanMap = BeanMap.create(codeClstempattrVO); |
| | | |
| | | beanMap.putAll(conditionMap); |
| | | // Condition.getQueryWrapper( |
| | | IPage<CodeClassifyTemplateAttr> doList = baseMapper. |
| | | selectPage(Condition.getPage(query), Condition.getQueryWrapper(codeClstempattrVO)); |
| | | |
| | | |
| | | selectPage(Condition.getPage(query), UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class)); |
| | | if (!CollectionUtils.isEmpty(doList.getRecords())) { |
| | | // CodeClstempattrEntity codeClstempattrEntity = new CodeClstempattrEntity(); |
| | | // BeanUtils.copyProperties(conditionMap, codeClstempattrEntity); |
| | | // List<CodeClstempattrEntity> codeClstempattrEntities = new ArrayList<>(); |
| | | // BeanUtils.copyProperties(doList,codeClstempattrEntities); |
| | | // codeClstempattrEntities.addAll(doList); |
| | | dataGrid.setData(codeClassifyTemplateAttrDO2VOs(doList.getRecords())); |
| | | dataGrid.setTotal(VciBaseUtil.getInt(String.valueOf(baseMapper.selectCount(Condition.getQueryWrapper(codeClstempattrVO))))); |
| | | dataGrid.setTotal(VciBaseUtil.getInt(String.valueOf(baseMapper.selectCount(UBCSCondition.getQueryWrapperByMapString(conditionMap,CodeClassifyTemplateAttr.class))))); |
| | | } |
| | | return dataGrid; |
| | | } |
| | |
| | | public CodeClassifyTemplateAttrVO getObjectByOid(String oid) throws VciBaseException{ |
| | | return codeClassifyTemplateAttrDO2VO(selectByOid(oid)); |
| | | } |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢æ°æ®å¯¹è±¡ |
| | | * @param oid ä¸»é® |
| | |
| | | } |
| | | |
| | | /** |
| | | * åç
§ä¸»é¢åºåç±»çæ¨¡æ¿å±æ§å表 |
| | | * @param conditionMap æ¥è¯¢æ¡ä»¶ |
| | | * @param pageHelper å页åæåº |
| | | * @return 主é¢åºåç±»çæ¨¡æ¿å±æ§æ¾ç¤ºå¯¹è±¡å表ï¼çæçå
容 |
| | | * @throws VciBaseException æ¥è¯¢æ¡ä»¶åå页åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | // @Override |
| | | // public DataGrid<CodeClassifyTemplateAttrVO> refDataGridCodeClassifyTemplateAttr(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException{ |
| | | // if(conditionMap == null){ |
| | | // conditionMap = new HashMap<String, String>(); |
| | | // } |
| | | // return gridCodeClassifyTemplateAttr(conditionMap,pageHelper); |
| | | // } |
| | | |
| | | /** |
| | | * æ¥è¯¢è¿ä¸ªæ¨¡æ¿ï¼ä¸å¡ç±»åä¸çæææªéæ©ç屿§ |
| | | * @param baseQueryObject |
| | | * @return |
| | |
| | | |
| | | //æ¥è¯¢æ¨¡æ¿å¯¹è±¡ |
| | | CodeClassifyTemplate codeClassifyTemplateDO = codeClassifyTemplateMapper.selectById(templateAttrOid); |
| | | |
| | | //è¿ä¸ªä¸å¡ç±»åä¸çææå±æ§ |
| | | // å¾
å®å |
| | | List<BtmTypeAttributeVO> boAttrs = null; //(List<BtmTypeAttributeVO>)attributeClient.selectById(codeClassifyTemplateDO.getBtmTypeId());// this.btmService.listAttributeByBtmId(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // BeanUtils.copyProperties(codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()),boAttrs); |
| | | //æé»è®¤ç屿§ä¹æ·»å å°boAttrs |
| | | if(boAttrs == null){ |
| | | boAttrs = new ArrayList<>(); |
| | | // æ²¡ææ¨¡æ¿å¯¹è±¡ä¸æ§è¡é»è¾ |
| | | if(Objects.isNull(codeClassifyTemplateDO)){ |
| | | dataGrid.setData(new ArrayList<>()); |
| | | dataGrid.setTotal(0); |
| | | return dataGrid; |
| | | } |
| | | if(!false){ |
| | | // List<CodeOsbtmtypeattributeVO> finalBoAttrs = boAttrs; |
| | | // attributeService.getDefaultAttributeVOs().stream().forEach(attr-> { |
| | | // CodeOsbtmtypeattributeVO attributeVO = new CodeOsbtmtypeattributeVO(); |
| | | // BeanUtil.convert(attr, attributeVO); |
| | | // if ("id".equalsIgnoreCase(attributeVO.getId())) { |
| | | // attributeVO.setName("ä¼ä¸ç¼ç "); |
| | | // } |
| | | // if ("name".equalsIgnoreCase(attributeVO.getId())) { |
| | | // attributeVO.setName("éå¢ç "); |
| | | // } |
| | | // attributeVO.setAttrDataType(attr.getAttributeDataType()); |
| | | // attributeVO.setAttributeLength(attr.getAttrLength()); |
| | | // attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); |
| | | // attributeVO.setReferBtmTypeName(attr.getBtmTypeName()); |
| | | // finalBoAttrs.add(attributeVO); |
| | | // }); |
| | | // boAttrs = finalBoAttrs; |
| | | Object o = null; |
| | | //è¿ä¸ªä¸å¡ç±»åä¸çææå±æ§ |
| | | R<BtmTypeVO> btmTypeVOR = btmTypeClient.getAllAttributeByBtmId(codeClassifyTemplateDO.getBtmTypeId()); |
| | | if(btmTypeVOR.getCode() != 200){ |
| | | throw new ServiceException("ä¸å¡ç±»åfeignè°ç¨å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | //è¿ä¸ªæ¨¡æ¿ä¸å·²ç»æç屿§ |
| | |
| | | //è¿æ»¤æå·²ç»åå¨ç屿§ |
| | | List<BtmTypeAttributeVO> boAttrss = new ArrayList<BtmTypeAttributeVO>(); |
| | | |
| | | for (BtmTypeAttributeVO osBtmTypeAttributeVO:boAttrs){ |
| | | for (BtmTypeAttributeVO osBtmTypeAttributeVO:btmTypeVOR.getData().getAttributes()){ |
| | | if(!btmOids.contains(osBtmTypeAttributeVO.getId())){ |
| | | //ççæ¯ä¸æ¯ææ¨¡ç³æ¥è¯¢ |
| | | boolean inSearch = true; |
| | |
| | | CodeClassifyTemplate codeClassifyTemplateDO = codeClassifyTemplateMapper.selectById(templateAttrOid); |
| | | |
| | | //è¿ä¸ªä¸å¡ç±»åä¸çææå±æ§ |
| | | // å¾
å®å |
| | | // TODO å¾
å®å |
| | | List<BtmTypeAttributeVO> boAttrs = null; // (List<BtmTypeAttributeVO>) attributeClient.selectById(codeClassifyTemplateDO.getBtmTypeId());//this.btmService.listAttributeByBtmIdHasDefault(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()); |
| | | // BeanUtils.copyProperties(codeOsbtmtypeattributeMapper.selectById(codeClassifyTemplateDO.getBtmTypeId()),boAttrs); |
| | |
| | | private CodeClassifyTemplateButtonServiceImpl codeTempbuttonServiceImpl; |
| | | @Autowired(required = false) |
| | | private ICodeClassifyProcessTempService codeClsflowtempServiceImpl; |
| | | // @Autowired(required = false) |
| | | // @Autowired(required = false) |
| | | // private CodeClsflowtempMapper codeClsflowtempMapper; |
| | | @Autowired(required = false) |
| | | private CodeTemplatePhaseMapper codeTempphaseMapper; |
| | |
| | | // ClientBusinessObject clientBusinessObject_template_insert = null; |
| | | // try { |
| | | // clientBusinessObject_template_insert = clientBusinessObjectOperation.reviseBusinessObject(clientBusinessObject_template, ""); |
| | | codeCls_template_insert.setOid(VciBaseUtil.getPk()); |
| | | codeCls_template_insert.setRevisionOid(VciBaseUtil.getPk()); |
| | | codeCls_template_insert.setNameOid(codeCls_template.getNameOid()); |
| | | codeCls_template_insert.setBtmname(codeCls_template.getBtmname()); |
| | | codeCls_template_insert.setLastR(String.valueOf(1)); |
| | | codeCls_template_insert.setFirstR(String.valueOf(0)); |
| | | codeCls_template_insert.setFirstV(String.valueOf(1)); |
| | | codeCls_template_insert.setLastV(String.valueOf(1)); |
| | | codeCls_template_insert.setCreator(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setCreateTime(new Date()); |
| | | codeCls_template_insert.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setLastModifyTime(new Date()); |
| | | codeCls_template_insert.setRevisionRule(codeCls_template.getRevisionRule()); |
| | | codeCls_template_insert.setVersionRule(codeCls_template.getVersionRule()); |
| | | Map rvObj = baseMapper.getNextRevision(codeCls_template.getNameOid()); |
| | | codeCls_template_insert.setRevisionSeq(Integer.parseInt(rvObj.get("REVISIONSEQ").toString())); |
| | | codeCls_template_insert.setRevisionValue(rvObj.get("REVISIONVAL").toString()); |
| | | codeCls_template_insert.setOid(VciBaseUtil.getPk()); |
| | | codeCls_template_insert.setRevisionOid(VciBaseUtil.getPk()); |
| | | codeCls_template_insert.setNameOid(codeCls_template.getNameOid()); |
| | | codeCls_template_insert.setBtmname(codeCls_template.getBtmname()); |
| | | codeCls_template_insert.setLastR(String.valueOf(1)); |
| | | codeCls_template_insert.setFirstR(String.valueOf(0)); |
| | | codeCls_template_insert.setFirstV(String.valueOf(1)); |
| | | codeCls_template_insert.setLastV(String.valueOf(1)); |
| | | codeCls_template_insert.setCreator(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setCreateTime(new Date()); |
| | | codeCls_template_insert.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setLastModifyTime(new Date()); |
| | | codeCls_template_insert.setRevisionRule(codeCls_template.getRevisionRule()); |
| | | codeCls_template_insert.setVersionRule(codeCls_template.getVersionRule()); |
| | | Map rvObj = baseMapper.getNextRevision(codeCls_template.getNameOid()); |
| | | codeCls_template_insert.setRevisionSeq(Integer.parseInt(rvObj.get("REVISIONSEQ").toString())); |
| | | codeCls_template_insert.setRevisionValue(rvObj.get("REVISIONVAL").toString()); |
| | | // VersionValueObject versionObj = this.getVersionValue(item.verRuleName); |
| | | codeCls_template_insert.setVersionSeq(Integer.parseInt(rvObj.get("VERSIONSEQ").toString())); |
| | | codeCls_template_insert.setVersionValue(rvObj.get("VERSIONVAL").toString()); |
| | | codeCls_template_insert.setLctid(codeCls_template.getLctid()); |
| | | codeCls_template_insert.setLcStatus("Editing"); |
| | | codeCls_template_insert.setId(codeCls_template.getId()); |
| | | codeCls_template_insert.setName(codeCls_template.getName()); |
| | | codeCls_template_insert.setDescription(codeCls_template.getDescription()); |
| | | codeCls_template_insert.setOwner(AuthUtil.getUser().getUserName()); |
| | | codeCls_template_insert.setVersionSeq(Integer.parseInt(rvObj.get("VERSIONSEQ").toString())); |
| | | codeCls_template_insert.setVersionValue(rvObj.get("VERSIONVAL").toString()); |
| | | codeCls_template_insert.setLctid(codeCls_template.getLctid()); |
| | | codeCls_template_insert.setLcStatus("Editing"); |
| | | codeCls_template_insert.setId(codeCls_template.getId()); |
| | | codeCls_template_insert.setName(codeCls_template.getName()); |
| | | codeCls_template_insert.setDescription(codeCls_template.getDescription()); |
| | | codeCls_template_insert.setOwner(AuthUtil.getUser().getUserName()); |
| | | // codeCls_template_insert.setCheckinBy(userName); |
| | | codeCls_template_insert.setCopyFromVersion(codeCls_template.getOid()); |
| | | codeCls_template_insert.setCopyFromVersion(codeCls_template.getOid()); |
| | | // }catch (VCIError e){ |
| | | // e.printStackTrace(); |
| | | // logger.error("===============>å类模æ¿-åçå¤å¶åºéoidï¼ "+templateOldOid+",mes"+e.error_message); |
| | |
| | | @Override |
| | | public R<CodeClassifyTemplateVO> addSave(CodeClassifyTemplateDTO codeClassifyTemplateDTO) throws VciBaseException{ |
| | | VciBaseUtil.alertNotNull(codeClassifyTemplateDTO,"éè¦æ·»å çæ°æ®å¯¹è±¡"); |
| | | |
| | | QueryWrapper<CodeClassifyTemplate> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("CODECLASSIFYOID",codeClassifyTemplateDTO.getCodeclassifyoid()); |
| | | Long aLong = baseMapper.selectCount(wrapper); |
| | | if(aLong > 0){ |
| | | return R.fail("该åç±»ä¸å·²æå模çï¼æ æ³æ°å¢ï¼ä»
è½è¿è¡åçæä½ï¼"); |
| | | } |
| | | //å°DTO转æ¢ä¸ºDO |
| | | CodeClassifyTemplate codeClassifyTemplateDO = new CodeClassifyTemplate(); |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(codeClassifyTemplateDTO,codeClassifyTemplateDO); |
| | |
| | | codeClassifyTemplateDO.setBtmTypeName(codeClassifyDO.getBtmTypeName()); |
| | | codeClassifyTemplateDO.setLcStatus(FRAMEWORK_RELEASE_EDITING); |
| | | codeClassifyTemplateDO.setTs(new Date()); |
| | | codeClassifyTemplateDO.setOwner(AuthUtil.getUser().getUserName()); |
| | | codeClassifyTemplateDO.setOwner(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeClassifyTemplateDO.setLctid("codeClsTempLc"); |
| | | codeClassifyTemplateDO.setVersionValue("1"); |
| | | codeClassifyTemplateDO.setVersionSeq(1); |
| | |
| | | codeClassifyTemplateDO.setVersionRule("0"); |
| | | codeClassifyTemplateDO.setRevisionRule("numberversionrule"); |
| | | codeClassifyTemplateDO.setLastModifyTime(new Date()); |
| | | codeClassifyTemplateDO.setLastModifier(AuthUtil.getUser().getUserName()); |
| | | codeClassifyTemplateDO.setCreator(AuthUtil.getUser().getUserName()); |
| | | codeClassifyTemplateDO.setLastModifier(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeClassifyTemplateDO.setCreator(String.valueOf(AuthUtil.getUser().getUserId())); |
| | | codeClassifyTemplateDO.setCreateTime(new Date()); |
| | | codeClassifyTemplateDO.setLastV("1"); |
| | | codeClassifyTemplateDO.setLastR("1"); |
| | |
| | | // condition.put("ts",codeClassifyTemplateDOCopyFromDTO.getTs()); |
| | | CodeClassifyTemplate detail = baseMapper |
| | | .selectById(codeClassifyTemplateDOCopyFromDTO.getOid()); |
| | | // boolean tsBoolean = boService.checkTs(codeClassifyTemplateAttrDOListemplateDOCopyFromDTO); |
| | | // boolean tsBoolean = boService.checkTs(codeClassifyTemplateAttrDOListemplateDOCopyFromDTO); |
| | | if(detail.getTs().compareTo(codeClassifyTemplateDOCopyFromDTO.getTs()) != 0){//䏿¯ææ°çä¸è®©æ¹ |
| | | return R.fail("å½åæ°æ®ä¸æ¯ææ°ï¼è¯·å·æ°ååä¿®æ¹ï¼"); |
| | | } |
| | |
| | | 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.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; |
| | |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; |
| | | import com.vci.ubcs.code.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.ubcs.code.constant.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.code.dto.CodeDeleteBatchDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.datapush.BaseModelDTO; |
| | |
| | | import com.vci.ubcs.code.vo.pagemodel.UITableFieldVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.UITablePageVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.feign.IBtmTypeClient; |
| | | import com.vci.ubcs.omd.feign.IEnumClient; |
| | | import com.vci.ubcs.omd.feign.IRevisionRuleClient; |
| | | import com.vci.ubcs.omd.constant.BtmTypeLcStatusConstant; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.feign.*; |
| | | import com.vci.ubcs.omd.utils.VciOmdUtil; |
| | | import com.vci.ubcs.omd.vo.BtmTypeAttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.omd.vo.EnumVO; |
| | | import com.vci.ubcs.omd.vo.RevisionRuleVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | 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.web.constant.QueryOptionConstant; |
| | |
| | | import com.vci.ubcs.system.user.feign.IUserClient; |
| | | import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; |
| | | import oracle.sql.TIMESTAMP; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.Cache; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.beans.BeanInfo; |
| | | import java.beans.IntrospectionException; |
| | | import java.beans.Introspector; |
| | | import java.beans.PropertyDescriptor; |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.InvocationTargetException; |
| | | import java.lang.reflect.Method; |
| | | import java.math.BigDecimal; |
| | | import java.sql.SQLException; |
| | | import java.sql.Timestamp; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.ZonedDateTime; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.function.Supplier; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.FrameWorkLangCodeConstant.DATA_OID_NOT_EXIST; |
| | |
| | | @Resource |
| | | private CodeClstemplateServiceImpl templateService; |
| | | |
| | | @Resource |
| | | private IAttributeClient attributeClient; |
| | | |
| | | /** |
| | | * çæç¼ç çæå¡ |
| | |
| | | */ |
| | | @Resource |
| | | ISysClient iSysClient; |
| | | /** |
| | | * ç³»ç»çæå¡ |
| | | */ |
| | | @Resource |
| | | private IWebSecretClient secretService; |
| | | /** |
| | | * ç¨æ·æå¡ |
| | | */ |
| | |
| | | /** |
| | | * æ¿æ¢å符 |
| | | */ |
| | | public static final String SPECIAL_CHAR = "VCI"; |
| | | public static final String SPECIAL_CHAR = "VCI"; |
| | | // @Autowired |
| | | // private CodeOsbtmtypeMapper codeOsbtmtypeMapper;---- |
| | | |
| | |
| | | // Dict dict = new Dict(); |
| | | // dict.setParentId(Long.valueOf(attrVO.getEnumid())); |
| | | R<List<EnumVO>> list = enumClient.getList(attrVO.getEnumId()); |
| | | if(list.isSuccess()){ |
| | | if (list.isSuccess()) { |
| | | for (EnumVO datum : list.getData()) { |
| | | KeyValue keyValue = new KeyValue(); |
| | | keyValue.setKey(datum.getItemValue()); |
| | |
| | | * |
| | | * @param baseModelDTO æ°æ®ä¼ è¾å¯¹è±¡ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public void changeStatus(BaseModelDTO baseModelDTO) { |
| | | VciBaseUtil.alertNotNull(baseModelDTO, "æ°æ®ä¿¡æ¯", baseModelDTO.getOid(), "主é®", baseModelDTO.getBtmname(), "ä¸å¡ç±»å", baseModelDTO.getLcStatus(), "ç®æ ç¶æ"); |
| | | List<String> oids = VciBaseUtil.str2List(baseModelDTO.getOid()); |
| | | // List<ClientBusinessObject> cboList = boService.selectCBOByOidCollection(oids, baseModelDTO.getBtmname()); |
| | | //æä¸ªç¹ ä¸å¡ç±»å宿åéè¦ä¿®æ¹ |
| | | // TODO æä¸ªç¹ ä¸å¡ç±»å宿åéè¦ä¿®æ¹ |
| | | QueryWrapper<BtmTypeVO> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("BTMNAME",baseModelDTO.getBtmname()); |
| | | wrapper.in("OID",oids); |
| | | // TODO å¾
å®å |
| | | //æä¸ªç¹ ä¸å¡ç±»å宿åéè¦ä¿®æ¹ |
| | | // QueryWrapper<BtmTypeVO> wrapper = new QueryWrapper<>(); |
| | | List<BaseModel> baseModels = new ArrayList<>(); |
| | | baseModels = selectByTypeAndOid(baseModelDTO.getBtmname(), baseModelDTO.getOid()); |
| | | if(baseModels.size() == 0){ |
| | | throw new VciBaseException("æªæ¥è¯¢å°ç¸å
³æ°æ®ã"); |
| | | } |
| | | // å¾
å®å |
| | | List<BtmTypeVO> cboList = null; // btmTypeClient.selectList(wrapper); |
| | | //è¿éè¦ä¿®æ¹allCodeççå½å¨æ |
| | |
| | | // List<ClientBusinessObject> codeCbos = boService.queryCBO(MdmBtmTypeConstant.CODE_ALL_CODE, conditionMap); |
| | | // åæ¶éè¦ä¸å¡æ°æ®å é¤ |
| | | if (CodeDefaultLC.TASK_BACK.getValue().equals(baseModelDTO.getLcStatus())) { |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(baseModelDTO.getBtmname())); |
| | | // String referTable = listR.getData().get(0).getTableName(); |
| | | commonsMapper.deleteByTaleAndOid(listR.getData().get(0).getTableName(),VciBaseUtil.toInSql(baseModelDTO.getOid())); |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | |
| | | // å¾
å®å |
| | | // TODO å¾
å®å |
| | | //btmTypeClient.deleteBatchIds(cboList); |
| | | |
| | | //boService.persistenceBatch(batchCBO); |
| | | } else { |
| | | for (BaseModel baseModel : baseModels) { |
| | | baseModel.setLcStatus(baseModelDTO.getLcStatus()); |
| | | } |
| | | updateBatchByBaseModel(baseModelDTO.getBtmname(),baseModels); |
| | | // lifeCycleService.transCboStatus(cboList, baseModelDTO.getLcStatus()); |
| | | } |
| | | for (CodeAllCode codeCbo : codeCbos) { |
| | | codeCbo.setLcStatus(baseModelDTO.getLcStatus()); |
| | | } |
| | | codeAllCodeService.updateBatchById(codeCbos); |
| | | // lifeCycleService.transCboStatus(codeCbos, baseModelDTO.getLcStatus()); |
| | | } |
| | | |
| | |
| | | //没æéå¶åç±»ï¼ä½æ¯ä¸ä¸ªæ¨¡æ¿åªå¯è½å¨ä¸ä¸ªä¸å¡ç±»åéé¢ï¼æä»¥ç´æ¥æ¥è¯¢è¿ä¸ªä¸å¡ç±»åå³å¯ |
| | | |
| | | if (!CollectionUtils.isEmpty(conditionMap)) { |
| | | //表éè¦æ¹ |
| | | // final String[] sql = {"select count(*) from " + VciBaseUtil.getTableName(classifyFullInfo.getTopClassifyVO().getBtmtypeid()) + " t where 1 = 1 "}; |
| | | final String[] sql = {"select count(*) from pl_code_wupin t where 1 = 1 "}; |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getTopClassifyVO().getBtmtypeid())); |
| | | // String referTable = VciBaseUtil.getTableName(referVO.getReferType()); |
| | | final String[] sql = {"select count(*) from "+ listR.getData().get(0).getTableName() +" t where 1 = 1 "}; |
| | | conditionMap.forEach((key, value) -> { |
| | | sql[0] += " and " + key + " = " + value; |
| | | }); |
| | |
| | | } |
| | | |
| | | int secret = VciBaseUtil.getInt(String.valueOf(cbo.getSecretGrade())); |
| | | //åç»çå¯çº§æå¡æ¯å¦å¯ç¨ |
| | | // if (secret == 0 || !secretService.checkDataSecret(secret)) { |
| | | if (secret == 0 ) { |
| | | if (secret == 0 || !secretService.checkDataSecret(secret).getData()) { |
| | | Integer userSecret = VciBaseUtil.getCurrentUserSecret(); |
| | | // cbo.setAttributeValue(SECRET_FIELD, String.valueOf((userSecret == null || userSecret == 0) ? UserSecretEnum.NONE.getValue() : userSecret)); |
| | | cbo.setSecretGrade(userSecret == null || userSecret == 0 ? UserSecretEnum.NONE.getValue() : userSecret); |
| | |
| | | //å¤çææçåï¼è¿ä¸ªæ¨¡æ¿æ²¡æåå¹¶ç表头çæ
åµ |
| | | List<UITableFieldVO> fieldVOList = new ArrayList<>(); |
| | | resembleAttrList.forEach(attrVO -> { |
| | | UITableFieldVO tableFieldVO = templateAttr2TableField(attrVO,false); |
| | | UITableFieldVO tableFieldVO = templateAttr2TableField(attrVO, false); |
| | | tableFieldVO.setHidden(false); |
| | | fieldVOList.add(tableFieldVO); |
| | | }); |
| | |
| | | /** |
| | | * 模æ¿å±æ§è½¬æ¢ä¸ºè¡¨æ ¼æ¾ç¤ºçé
ç½® |
| | | * |
| | | * @param attrVO 模æ¿å±æ§ |
| | | * @param attrVO 模æ¿å±æ§ |
| | | * @param forEdit æ¯å¦æ¯ç¼è¾æé |
| | | * @return è¡¨æ ¼çåæ®µ |
| | | */ |
| | | @Override |
| | | public UITableFieldVO templateAttr2TableField(CodeClassifyTemplateAttrVO attrVO,boolean forEdit) { |
| | | public UITableFieldVO templateAttr2TableField(CodeClassifyTemplateAttrVO attrVO, boolean forEdit) { |
| | | UITableFieldVO fieldVO = new UITableFieldVO(); |
| | | if (SECRET_FILED.equalsIgnoreCase(attrVO.getId())) { |
| | | attrVO.setEnumId(MY_DATA_SECRET); |
| | |
| | | fieldVO.setSort(true); |
| | | fieldVO.setSortField(fieldVO.getField()); |
| | | fieldVO.setQueryField(fieldVO.getField()); |
| | | if (forEdit){ |
| | | if (forEdit) { |
| | | fieldVO.setHidden(!VciBaseUtil.getBoolean(attrVO.getFormDisplayFlag())); |
| | | }else { |
| | | } else { |
| | | fieldVO.setHidden(!VciBaseUtil.getBoolean(attrVO.getTableDisplayFlag())); |
| | | } |
| | | if (attrVO.getAttrTableWidth() != null && attrVO.getAttrTableWidth() > 0) { |
| | |
| | | if (StringUtils.isBlank(attrVO.getEnumId())) { |
| | | fieldVO.setComboxKey(fieldVO.getField() + "_data"); |
| | | } |
| | | }else { |
| | | // List<KeyValue> osEnumItemVOList= enumService.getEnum(attrVO.getEnumId()); |
| | | // fieldVO.setData(osEnumItemVOList); |
| | | } else { |
| | | List<KeyValue> osEnumItemVOList= VciOmdUtil.enumsToListKeyVale(EnumCache.getList(attrVO.getEnumId())); |
| | | fieldVO.setData(osEnumItemVOList); |
| | | } |
| | | } |
| | | //çæ¯å¦æåç
§ |
| | |
| | | } |
| | | } |
| | | queryValue = String.format(temp, (trim ? value.trim() : value)); |
| | | temp = temp.replace("to_single_byte('%s')","to_single_byte(%s)"); |
| | | queryKey = String.format(temp, "t."+attrId); |
| | | temp = temp.replace("to_single_byte('%s')", "to_single_byte(%s)"); |
| | | queryKey = String.format(temp, "t." + attrId); |
| | | conditionMap.put(queryKey, QueryOptionConstant.OR + queryValue); |
| | | } |
| | | } |
| | |
| | | public DataGrid<Map<String, String>> queryGrid(String btmType, CodeClassifyTemplateVO templateVO, Map<String, String> conditionMap, PageHelper pageHelper) { |
| | | CodeTemplateAttrSqlBO sqlBO = getSqlByTemplateVO(btmType, templateVO, conditionMap, pageHelper); |
| | | // List<Map> maps = boService.queryByOnlySqlForMap(sqlBO.getSqlHasPage()); |
| | | List<Map<String,String>> maps = commonsMapper.queryByOnlySqlForMap(sqlBO.getSqlHasPage()); |
| | | List<Map<String, String>> maps = commonsMapper.queryByOnlySqlForMap(sqlBO.getSqlHasPage()); |
| | | |
| | | DataGrid<Map<String, String>> dataGrid = new DataGrid<>(); |
| | | List<Map<String, String>> dataList = new ArrayList<>(); |
| | | // if (!CollectionUtils.isEmpty(maps)) { |
| | | // maps.stream().forEach(map -> { |
| | | // Map<String, String> data = new HashMap<>(); |
| | | // map.forEach((key, value) -> { |
| | | // data.put(((String) key).toLowerCase(Locale.ROOT), String.valueOf(value)); |
| | | // }); |
| | | // dataList.add(data); |
| | | // }); |
| | | // } |
| | | // dataGrid.setData(dataList); |
| | | if (!CollectionUtils.isEmpty(maps)) { |
| | | wrapperData(maps, templateVO, sqlBO.getSelectFieldList(), false); |
| | | maps.stream().forEach(map -> { |
| | | Map<String, String> data = new HashMap<>(); |
| | | for (String s : map.keySet()) { |
| | | data.put(s.toLowerCase(Locale.ROOT), String.valueOf(map.get(s))); |
| | | } |
| | | // map.forEach((key, value) -> { |
| | | // data.put(((String) key).toLowerCase(Locale.ROOT), String.valueOf(value)); |
| | | // }); |
| | | for (String s : map.keySet()) { |
| | | data.put(((String) s).toLowerCase(Locale.ROOT), String.valueOf(map.get(s))); |
| | | } |
| | | dataList.add(data); |
| | | }); |
| | | dataGrid.setData(dataList); |
| | | dataGrid.setTotal(Long.parseLong(commonsMapper.selectBySql(sqlBO.getSqlCount()).get(0).values().toArray()[0].toString())); |
| | | wrapperData(dataList, templateVO, sqlBO.getSelectFieldList(), false); |
| | | // maps.stream().forEach(map -> { |
| | | // Map<String, String> data = new HashMap<>(); |
| | | //// map.forEach((key, value) -> { |
| | | //// data.put(((String) key).toLowerCase(Locale.ROOT), String.valueOf(value)); |
| | | //// }); |
| | | // for (String s : map.keySet()) { |
| | | // data.put(((String) s).toLowerCase(Locale.ROOT), String.valueOf(map.get(s))); |
| | | // } |
| | | // dataList.add(data); |
| | | // }); |
| | | } |
| | | // dataGrid.setData(dataList); |
| | | // if (!CollectionUtils.isEmpty(maps)) { |
| | | // wrapperData(maps, templateVO, sqlBO.getSelectFieldList(), false); |
| | | // maps.stream().forEach(map -> { |
| | | // Map<String, String> data = new HashMap<>(); |
| | | //// map.forEach((key, value) -> { |
| | | //// data.put(((String) key).toLowerCase(Locale.ROOT), String.valueOf(value)); |
| | | //// }); |
| | | // for (String s : map.keySet()) { |
| | | // data.put(((String) s).toLowerCase(Locale.ROOT), String.valueOf(map.get(s))); |
| | | // } |
| | | // dataList.add(data); |
| | | // }); |
| | | dataGrid.setData(dataList); |
| | | dataGrid.setTotal(Long.parseLong(commonsMapper.selectBySql(sqlBO.getSqlCount()).get(0).values().toArray()[0].toString())); |
| | | // } |
| | | return dataGrid; |
| | | } |
| | | |
| | |
| | | * @param dataMap æ°æ®çæ å° |
| | | * @param templateVO 模æ¿ç屿§ |
| | | * @param onlySelectAttrIdList ä»
ä»
æ¥è¯¢ç屿§å段 |
| | | * @param form 表åéä½¿ç¨ |
| | | * @param form 表åéä½¿ç¨ |
| | | */ |
| | | @Override |
| | | public void wrapperData(List<Map<String, String>> dataMap, CodeClassifyTemplateVO templateVO, |
| | |
| | | //å¤çæä¸¾ |
| | | wrapperEnum(enumAttrVOs, data); |
| | | String lcstatus = data.get(VciQueryWrapperForDO.LC_STATUS_FIELD); |
| | | String copyFromVersion = data.getOrDefault(COPY_FROM_VERSION,""); |
| | | String copyFromVersion = data.getOrDefault(COPY_FROM_VERSION, ""); |
| | | if ((CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(lcstatus) || CodeDefaultLC.AUDITING.getValue().equalsIgnoreCase(lcstatus)) |
| | | && StringUtils.isBlank(copyFromVersion) |
| | | ) { |
| | | data.put(VciQueryWrapperForDO.ID_FIELD, "******"); |
| | | } |
| | | data.put(VciQueryWrapperForDO.LC_STATUS_FIELD_TEXT.toLowerCase(Locale.ROOT), CodeDefaultLC.getTextByValue(lcstatus)); |
| | | if(CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(lcstatus) |
| | | && StringUtils.isNotBlank(copyFromVersion)){ |
| | | if (CodeDefaultLC.EDITING.getValue().equalsIgnoreCase(lcstatus) |
| | | && StringUtils.isNotBlank(copyFromVersion)) { |
| | | data.put(VciQueryWrapperForDO.LC_STATUS_FIELD_TEXT.toLowerCase(Locale.ROOT), "ä¿®æ¹ä¸"); |
| | | } |
| | | if (data.containsKey("creator")) { |
| | |
| | | if (!CollectionUtils.isEmpty(userIds)) { |
| | | Map<String, User> userVOMap = new HashMap<>(); |
| | | for (String userId : userIds) { |
| | | if(!StringUtils.isNumeric(userId)){ |
| | | if (!StringUtils.isNumeric(userId)) { |
| | | continue; |
| | | } |
| | | User data = iUserClient.userInfoById(Long.valueOf(userId)).getData(); |
| | | if(data != null){ |
| | | userVOMap.put(String.valueOf(data.getId()),data); |
| | | if (data != null) { |
| | | userVOMap.put(String.valueOf(data.getId()), data); |
| | | } |
| | | } |
| | | // Map<String, SmUserVO> userVOMap = Optional.ofNullable(userQueryService.listUserByUserIds(userIds)).orElseGet(() -> new ArrayList<>()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | |
| | | // selectFieldList.add(attrId.getOid()); |
| | | // } |
| | | // }); |
| | | if(allAttributeByBtmId.getData() != null ){ |
| | | if (allAttributeByBtmId.getData() != null) { |
| | | for (BtmTypeAttributeVO attribute : allAttributeByBtmId.getData().getAttributes()) { |
| | | if (!selectFieldList.contains(attribute.getId()) && !"secretgrade".equalsIgnoreCase(attribute.getId())) { |
| | | selectFieldList.add(attribute.getId()); |
| | |
| | | if (attrVOMap.keySet().contains("secretgrade")) { |
| | | Integer userSecret = VciBaseUtil.getCurrentUserSecret(); |
| | | if (userSecret == null || userSecret == 0) { |
| | | // userSecret = secretService.getMinUserSecret(); |
| | | userSecret = secretService.getMinUserSecret().getData(); |
| | | } |
| | | whereSql += " and ( t.secretGrade <= " + userSecret + ") "; |
| | | } |
| | | //è¦æ¹ï¼è¡¨æè·åæé®é¢ |
| | | // String tableName = VciBaseUtil.getTableName(btmType); |
| | | // String tableName = "pl_code_wupin"; |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); |
| | | // String referTable = VciBaseUtil.getTableName(referVO.getReferType()); |
| | | String tableName = listR.getData().get(0).getTableName(); |
| | |
| | | */ |
| | | private String getSqlByValue(String selectKey, String value, Map<String, CodeClassifyTemplateAttrVO> attrVOMap) { |
| | | StringBuilder sql = new StringBuilder(); |
| | | //å¾
å®å |
| | | // if (!selectKey.contains(".") && (attrVOMap.containsKey(selectKey.toLowerCase(Locale.ROOT)) || attributeService.isDefaultAttr(selectKey) || selectKey.matches(RegExpConstant.LETTER))) { |
| | | // sql.append("t."); |
| | | // } |
| | | // TODO å¾
å®å |
| | | // if (!selectKey.contains(".") && (attrVOMap.containsKey(selectKey.toLowerCase(Locale.ROOT)) || attributeService.isDefaultAttr(selectKey) || selectKey.matches(RegExpConstant.LETTER))) { |
| | | // sql.append("t."); |
| | | // } |
| | | if (value.startsWith(QueryOptionConstant.IN)) { |
| | | sql.append(selectKey) |
| | | .append(SPACE) |
| | |
| | | // return codeList.size() > 0 ? codeList.get(0) : ""; |
| | | |
| | | |
| | | |
| | | |
| | | //ä¿®æ¹çæ¶åï¼ç¼ç æ¯ä¸åç |
| | | // BatchCBO batchCBO = new BatchCBO(); |
| | | // batchCBO.getUpdateCbos().add(cbo); |
| | |
| | | |
| | | //åªè½å é¤èªå·±åå»ºçæ°æ® |
| | | String userId = AuthUtil.getUser().getUserName(); |
| | | for (CodeWupin clientBusinessObject:cboList){ |
| | | for (CodeWupin clientBusinessObject : cboList) { |
| | | String creator = clientBusinessObject.getCreator(); |
| | | if(!userId.equalsIgnoreCase(creator)){ |
| | | throw new VciBaseException("ç¼ç 为"+clientBusinessObject.getId()+"çæ°æ®ä¸æ¯å½åç¨æ·å建ï¼ä¸è½å é¤ï¼"); |
| | | if (!userId.equalsIgnoreCase(creator)) { |
| | | throw new VciBaseException("ç¼ç 为" + clientBusinessObject.getId() + "çæ°æ®ä¸æ¯å½åç¨æ·å建ï¼ä¸è½å é¤ï¼"); |
| | | } |
| | | |
| | | } |
| | |
| | | //pageHelper.addDefaultDesc("createTime"); |
| | | pageHelper.addDefaultDesc("id"); |
| | | if (!classifyService.checkHasChild(codeClassifyOid)) { |
| | | conditionMap.put(CODE_CLASSIFY_OID_FIELD, codeClassifyOid); |
| | | conditionMap.put("t."+CODE_CLASSIFY_OID_FIELD, codeClassifyOid); |
| | | } else { |
| | | //表éè¦æ¹ |
| | | // conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from " + VciBaseUtil.getTableName(MdmBtmTypeConstant.CODE_CLASSIFY) |
| | | conditionMap.put(CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from pl_code_classify where lcstatus='" + FrameWorkDefaultValueConstant.FRAMEWORK_DATA_ENABLED + |
| | | "' start with parentCodeClassifyOid = '" + codeClassifyOid + "' CONNECT BY PRIOR OID = parentCodeClassifyOid )"); |
| | | |
| | | conditionMap.put("t."+CODE_CLASSIFY_OID_FIELD, QueryOptionConstant.IN + "(select oid from "+ |
| | | btmTypeClient.selectByIdCollection(Collections.singletonList(MdmBtmTypeConstant.CODE_CLASSIFY)) |
| | | .getData().get(0).getTableName() +" where lcstatus='" + FrameWorkDefaultValueConstant |
| | | .FRAMEWORK_DATA_ENABLED + "' start with parentCodeClassifyOid = '" + codeClassifyOid + |
| | | "' CONNECT BY PRIOR OID = parentCodeClassifyOid )"); |
| | | } |
| | | conditionMap.put("lastr", "1"); |
| | | conditionMap.put("lastv", "1"); |
| | | conditionMap.put("t.lastr", "1"); |
| | | conditionMap.put("t.lastv", "1"); |
| | | return queryGrid(btmTypeId, templateVO, conditionMap, pageHelper); |
| | | // List<String> selectFieldList = templateVO.getAttributes().stream().map(CodeClassifyTemplateAttrVO::getId).collect(Collectors.toList()); |
| | | // //åç
§è®©å¹³å°ç´æ¥æ¥è¯¢å°±è¡ |
| | |
| | | String btmId = topClassifyVO.getBtmtypeid(); |
| | | //æ¥è¯¢æ°æ® |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("t.oid",oid); |
| | | conditionMap.put("t.oid", oid); |
| | | CodeTemplateAttrSqlBO sqlBO = getSqlByTemplateVO(btmId, templateVO, conditionMap, new PageHelper(-1)); |
| | | //æä»¬ä½¿ç¨åä¸å¡ç±»åçæ¥æ¥è¯¢ |
| | | List<Map> cbosB = commonsMapper.selectBySql(sqlBO.getSqlUnPage()); |
| | | List<Map<String,String>> cbos = new ArrayList<>(); |
| | | List<Map<String, String>> cbos = new ArrayList<>(); |
| | | cbosB.stream().forEach(map -> { |
| | | Map<String, String> data = new HashMap<>(); |
| | | for (Object o : map.keySet()) { |
| | |
| | | throw new VciBaseException("æ°æ®å¨ç³»ç»ä¸ä¸åå¨ï¼æ¯å¦å 为修æ¹è¿ä¸å¡ç±»åï¼"); |
| | | } |
| | | // Map<String, String> data = new HashMap<>(); |
| | | Map<String,String> cbo = cbos.get(0); |
| | | Map<String, String> cbo = cbos.get(0); |
| | | // WebUtil.copyValueToMapFromCbos(cbo, data); |
| | | List<Map<String, String>> dataList = new ArrayList<>(); |
| | | dataList.add(cbo); |
| | |
| | | QueryWrapper<CodeWupin> wrapper = new QueryWrapper(); |
| | | if (conditionMap.get("oid").contains(",")) { |
| | | // oidMap.put("oid", QueryOptionConstant.IN +"("+ VciBaseUtil.toInSql(oidList.toArray(new String[0])) + ")"); |
| | | wrapper.in("oid",oidList); |
| | | wrapper.in("oid", oidList); |
| | | } else { |
| | | // oidMap.put("oid", conditionMap.get("oid")); |
| | | wrapper.in("oid",conditionMap.get("oid")); |
| | | wrapper.in("oid", conditionMap.get("oid")); |
| | | } |
| | | if (CollectionUtils.isEmpty(oidMap)) { |
| | | throw new VciBaseException("ä¸å¡æ°æ®ä¸»é®ä¸è½ä¸ºç©º"); |
| | |
| | | CodeClassifyTemplateVO templateVO = templateService.codeClassifyTemplateDO2VO(templateDOList.get(0)); |
| | | templateVO.setAttributes(codeClassifyTemplateAttrService.codeClassifyTemplateAttrDO2VOs(attrDOList)); |
| | | try { |
| | | if (oidList.size() > 1){ |
| | | DataGrid<Map<String,String>> allDataGrid = new DataGrid<>(); |
| | | List<Map<String,String>> allData = new ArrayList<>(); |
| | | if (oidList.size() > 1) { |
| | | DataGrid<Map<String, String>> allDataGrid = new DataGrid<>(); |
| | | List<Map<String, String>> allData = new ArrayList<>(); |
| | | oidList.forEach(oid -> { |
| | | Map<String,String> condition = new HashMap<>(); |
| | | condition.put("oid",oid); |
| | | Map<String, String> condition = new HashMap<>(); |
| | | condition.put("oid", oid); |
| | | DataGrid<Map<String, String>> dataGrid = queryGrid(btmType, templateVO, condition, pageHelper); |
| | | allData.addAll(dataGrid.getData()); |
| | | }); |
| | | allDataGrid.setData(allData); |
| | | return allDataGrid; |
| | | }else { |
| | | } else { |
| | | return queryGrid(btmType, templateVO, conditionMap, pageHelper); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | MdmUIInfoVO uiInfoVO = new MdmUIInfoVO(); |
| | | CodeClassifyTemplateVO templateVO = getUsedTemplateByClassifyOid(codeClassifyOid); |
| | | uiInfoVO.setTemplateVO(templateVO); |
| | | UITableDefineVO uiTableDefineVO = wrapperTableDefineByTemplate(templateVO,true); |
| | | UITableDefineVO uiTableDefineVO = wrapperTableDefineByTemplate(templateVO, true); |
| | | List<String> phaseAttrIdList = listPhaseAttrByClassifyOid(codeClassifyOid, phase); |
| | | uiTableDefineVO.getCols().stream().forEach(list -> { |
| | | List<UITableFieldVO> visiableTableField=new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(phase)) { |
| | | List<UITableFieldVO> visiableTableField = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(phase)) { |
| | | visiableTableField = list.stream().filter(col -> |
| | | phaseAttrIdList.stream().anyMatch(s -> StringUtils.equalsIgnoreCase(col.getField(), s) || |
| | | (StringUtils.equalsIgnoreCase(col.getFieldType(), "combox") && StringUtils.equalsIgnoreCase(col.getSortField(), s)) |
| | | || (StringUtils.equalsIgnoreCase(col.getFieldType(), "refer") && StringUtils.equalsIgnoreCase(col.getQueryField(), s)) |
| | | )).collect(Collectors.toList()); |
| | | }else{ |
| | | visiableTableField= list.stream().filter(col -> |
| | | } else { |
| | | visiableTableField = list.stream().filter(col -> |
| | | templateVO.getAttributes().stream().anyMatch(s -> |
| | | (!s.getReadOnlyFlag().equalsIgnoreCase("true")&& StringUtils.equalsIgnoreCase(col.getField(), s.getId())) || |
| | | (!s.getReadOnlyFlag().equalsIgnoreCase("true") && StringUtils.equalsIgnoreCase(col.getField(), s.getId())) || |
| | | (StringUtils.equalsIgnoreCase(col.getFieldType(), "combox") && StringUtils.equalsIgnoreCase(col.getSortField(), s.getId())) |
| | | || (StringUtils.equalsIgnoreCase(col.getFieldType(), "refer") && StringUtils.equalsIgnoreCase(col.getQueryField(), s.getId())) |
| | | )).collect(Collectors.toList()); |
| | |
| | | setReferConfig2EditConfig(vo); |
| | | } else if ("combox".equalsIgnoreCase(vo.getFieldType())) { |
| | | setComboxConfig2EditConfig(vo); |
| | | } else if (StringUtils.isNotBlank(vo.getDateFormate())){ |
| | | } else if (StringUtils.isNotBlank(vo.getDateFormate())) { |
| | | vo.setEdit("date"); |
| | | }else { |
| | | } else { |
| | | vo.setEdit(vo.getFieldType()); |
| | | } |
| | | }); |
| | |
| | | * @param vo è¡¨æ ¼åæ®µæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | private void setReferConfig2EditConfig(UITableFieldVO vo) { |
| | | if (!CollectionUtils.isEmpty(vo.getReferConfig().getWhere())){ |
| | | if (!CollectionUtils.isEmpty(vo.getReferConfig().getWhere())) { |
| | | vo.getReferConfig().getWhere().keySet().forEach(key -> { |
| | | vo.getReferConfig().getWhere().put(key, "'" + vo.getReferConfig().getWhere().get(key) + "'"); |
| | | }); |
| | | } |
| | | if (StringUtils.isNotBlank(vo.getReferConfig().getParentValue())){ |
| | | if (StringUtils.isNotBlank(vo.getReferConfig().getParentValue())) { |
| | | String parentValue = vo.getReferConfig().getParentValue(); |
| | | parentValue ="\\" + parentValue.replaceAll("'","{vci-quote}").replaceAll("=","{vci-equals}"); |
| | | parentValue = "\\" + parentValue.replaceAll("'", "{vci-quote}").replaceAll("=", "{vci-equals}"); |
| | | vo.getReferConfig().setParentValue(parentValue); |
| | | } |
| | | String referConfig = vo.getReferConfig().toString() |
| | |
| | | */ |
| | | private void setComboxConfig2EditConfig(UITableFieldVO vo) { |
| | | vo.setEditConfig("{editable:true,comboxKey:'" + vo.getComboxKey() + "'"); |
| | | if (!CollectionUtils.isEmpty(vo.getData())){ |
| | | vo.setEditConfig(vo.getEditConfig()+", comboxConfig:"); |
| | | if (!CollectionUtils.isEmpty(vo.getData())) { |
| | | vo.setEditConfig(vo.getEditConfig() + ", comboxConfig:"); |
| | | for (int i = 0; i < vo.getData().size(); i++) { |
| | | KeyValue data = vo.getData().get(i); |
| | | if (i == vo.getData().size() -1){ |
| | | vo.setEditConfig(vo.getEditConfig() + "{attributes:"+data.getAttributes()+",key:'"+data.getKey()+"',value:'"+data.getValue()+"'}]}"); |
| | | }else if (i == 0){ |
| | | vo.setEditConfig(vo.getEditConfig() + "{data:[{attributes:"+data.getAttributes()+",key:'"+data.getKey()+"',value:'"+data.getValue()+"'},"); |
| | | }else{ |
| | | vo.setEditConfig(vo.getEditConfig() + "{attributes:"+data.getAttributes()+",key:'"+data.getKey()+"',value:'"+data.getValue()+"'},"); |
| | | if (i == vo.getData().size() - 1) { |
| | | vo.setEditConfig(vo.getEditConfig() + "{attributes:" + data.getAttributes() + ",key:'" + data.getKey() + "',value:'" + data.getValue() + "'}]}"); |
| | | } else if (i == 0) { |
| | | vo.setEditConfig(vo.getEditConfig() + "{data:[{attributes:" + data.getAttributes() + ",key:'" + data.getKey() + "',value:'" + data.getValue() + "'},"); |
| | | } else { |
| | | vo.setEditConfig(vo.getEditConfig() + "{attributes:" + data.getAttributes() + ",key:'" + data.getKey() + "',value:'" + data.getValue() + "'},"); |
| | | } |
| | | } |
| | | vo.setEditConfig(vo.getEditConfig() + ",valueField:'" + vo.getQueryField() + "'"); |
| | |
| | | @Override |
| | | public MdmUIInfoVO getFormDefineByClassifyIdPath(String idPath) { |
| | | CodeClassifyVO classifyVO = classifyService.getObjectByIdPath(idPath); |
| | | if(classifyVO !=null){ |
| | | if (classifyVO != null) { |
| | | return getFormDefineByClassifyOid(classifyVO.getOid()); |
| | | } |
| | | return null; |
| | |
| | | MdmUIInfoVO uiInfoVO = new MdmUIInfoVO(); |
| | | uiInfoVO.setTemplateVO(templateVO); |
| | | //æä»¬éè¦å°æ¨¡æ¿è½¬æ¢ä¸ºè¡¨æ ¼ç¸å
³çæ¾ç¤ºä¿¡æ¯ |
| | | uiInfoVO.setTableDefineVO(wrapperTableDefineByTemplate(uiInfoVO.getTemplateVO(),false)); |
| | | uiInfoVO.setTableDefineVO(wrapperTableDefineByTemplate(uiInfoVO.getTemplateVO(), false)); |
| | | //éè¦å»çæ©å±çæé®,åªæå表é颿¬èº«ææ·»å è¿å»ï¼å·¥å
·æ ä¸çåç¬è·å |
| | | List<CodeClassifyTemplateButtonVO> buttonVOS = templateButtonService.listButtonByTemplateOid(templateVO.getOid(), true); |
| | | if (!CollectionUtils.isEmpty(buttonVOS)) { |
| | |
| | | @Override |
| | | public MdmUIInfoVO getUIInfoByClassifyIdPath(String codeClassifyIdPath, String functionId) { |
| | | CodeClassifyVO classifyVO = classifyService.getObjectByIdPath(codeClassifyIdPath); |
| | | if(classifyVO !=null){ |
| | | return getUIInfoByClassifyOid(classifyVO.getOid(),functionId); |
| | | if (classifyVO != null) { |
| | | return getUIInfoByClassifyOid(classifyVO.getOid(), functionId); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | @Override |
| | | public MdmUIInfoVO getUIInfoByClassifyOid(String codeClassifyOid, String functionId) { |
| | | VciBaseUtil.alertNotNull(codeClassifyOid, "主é¢åºå类主é®"); |
| | | |
| | | MdmUIInfoVO uiInfoVO = getTableDefineByTemplateVO(getUsedTemplateByClassifyOid(codeClassifyOid)); |
| | | uiInfoVO.setLeaf(classifyService.countChildrenByClassifyOid(codeClassifyOid) == 0); |
| | | if (StringUtils.isNotBlank(functionId) && !"~".equalsIgnoreCase(functionId)) { |
| | | List<Menu> buttonVOS = iSysClient.getMenuButtonByType(uiInfoVO.getTemplateVO().getBtmTypeId()).getData(); |
| | | |
| | | //åè½æé®æå¡è¿æªå®ç°ï¼çå®ç°äºï¼å¨è¿è¡è°ç¨ |
| | | // List<SmOperationVO> operationVOS = operationService.listButtonByFunctionId(functionId); |
| | | // if (operationVOS == null) { |
| | | // operationVOS = new ArrayList<>(); |
| | |
| | | * @return å¤çæåæ°æ®æ¡æ° |
| | | */ |
| | | @Override |
| | | public Integer insertBatchByType(String btmType, List<BaseModel> baseModels) throws Exception { |
| | | public Integer insertBatchByType(String btmType, List<BaseModel> baseModels) { |
| | | //使ç¨ä¼ å
¥çä¸å¡ç±»åæ¥è¯¢è¡¨ |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); |
| | | if(listR.getData().size() == 0){ |
| | |
| | | * ä¼ å
¥ä¸å¡ç±»å以åç¸oidéåæ¥è¯¢æ°æ®è¿è¡è¿å |
| | | * |
| | | * @param btmType ä¸å¡ç±»å |
| | | * @param oids éè¦æ¥è¯¢çoidéå éå·åå¼ |
| | | * @param oids éè¦æ¥è¯¢çoidéå éå·åå¼ |
| | | * @return æ¥è¯¢åºçæ°æ® |
| | | */ |
| | | @Override |
| | | public List<BaseModel> selectByTypeAndOid(String btmType, String oids) throws IllegalAccessException, NoSuchFieldException, InstantiationException, InvocationTargetException, IntrospectionException, SQLException { |
| | | public List<BaseModel> selectByTypeAndOid(String btmType, String oids) { |
| | | |
| | | //使ç¨ä¼ å
¥çä¸å¡ç±»åæ¥è¯¢è¡¨ |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); |
| | | if(listR.getData().size() == 0){ |
| | | if (listR.getData().size() == 0) { |
| | | throw new VciBaseException("ä¼ å
¥ä¸å¡ç±»åæªæ¥è¯¢å°ç¸åºè¡¨åï¼è¯·æ£æ¥ï¼"); |
| | | } |
| | | //æ¥è¯¢æ°æ® |
| | |
| | | |
| | | List<BaseModel> baseModels = new ArrayList<>(); |
| | | //å°æ¥è¯¢å°çæ°æ®è½¬æ¢ä¸ºbasemodelï¼ä½¿ç¨çåå°æ¹å¼æ¥è¿è¡å建ç |
| | | for (Map map : maps) { |
| | | Object obj = BaseModel.class.newInstance(); |
| | | BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass()); |
| | | PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); |
| | | for (PropertyDescriptor property : propertyDescriptors) { |
| | | Method setter = property.getWriteMethod(); |
| | | if (setter != null) { |
| | | //oracleçæ¶é´ä¸ºTIMESTAMPçï¼éè¦è¿è¡è½¬æ¢ædataï¼å¦åå°æ¥é |
| | | if(map.get(property.getName().toUpperCase()) instanceof TIMESTAMP){ |
| | | LocalDateTime localDateTime = ((TIMESTAMP) map.get(property.getName().toUpperCase())).toLocalDateTime(); |
| | | ZoneId zoneId = ZoneId.systemDefault(); |
| | | ZonedDateTime zdt = localDateTime.atZone(zoneId); |
| | | Date date = Date.from(zdt.toInstant()); |
| | | setter.invoke(obj,date); |
| | | map.remove(property.getName().toUpperCase()); |
| | | } //oracleçæ°å为BigDecimalçï¼éè¦è¿è¡è½¬æ¢æIntegerï¼å¦åå°æ¥é |
| | | else if (map.get(property.getName().toUpperCase()) instanceof BigDecimal |
| | | && ("Integer").equals(setter.getParameterTypes()[0].getSimpleName())){ |
| | | setter.invoke(obj, ((BigDecimal)map.get(property.getName().toUpperCase())).intValue()); |
| | | map.remove(property.getName().toUpperCase()); |
| | | }else if(map.get(property.getName().toUpperCase()) != null){ |
| | | setter.invoke(obj, map.get(property.getName().toUpperCase())); |
| | | map.remove(property.getName().toUpperCase()); |
| | | try{ |
| | | for (Map map : maps) { |
| | | Object obj = BaseModel.class.newInstance(); |
| | | BeanInfo beanInfo = Introspector.getBeanInfo(obj.getClass()); |
| | | PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors(); |
| | | for (PropertyDescriptor property : propertyDescriptors) { |
| | | Method setter = property.getWriteMethod(); |
| | | if (setter != null) { |
| | | //oracleçæ¶é´ä¸ºTIMESTAMPçï¼éè¦è¿è¡è½¬æ¢ædataï¼å¦åå°æ¥é |
| | | if(map.get(property.getName().toUpperCase()) instanceof TIMESTAMP){ |
| | | LocalDateTime localDateTime = ((TIMESTAMP) map.get(property.getName().toUpperCase())).toLocalDateTime(); |
| | | ZoneId zoneId = ZoneId.systemDefault(); |
| | | ZonedDateTime zdt = localDateTime.atZone(zoneId); |
| | | Date date = Date.from(zdt.toInstant()); |
| | | setter.invoke(obj,date); |
| | | map.remove(property.getName().toUpperCase()); |
| | | } //oracleçæ°å为BigDecimalçï¼éè¦è¿è¡è½¬æ¢æIntegerï¼å¦åå°æ¥é |
| | | else if (map.get(property.getName().toUpperCase()) instanceof BigDecimal |
| | | && ("Integer").equals(setter.getParameterTypes()[0].getSimpleName())){ |
| | | setter.invoke(obj, ((BigDecimal)map.get(property.getName().toUpperCase())).intValue()); |
| | | map.remove(property.getName().toUpperCase()); |
| | | }else if(map.get(property.getName().toUpperCase()) != null){ |
| | | setter.invoke(obj, map.get(property.getName().toUpperCase())); |
| | | map.remove(property.getName().toUpperCase()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | for (Object key : map.keySet()) { |
| | | map.put(key,String.valueOf(map.get(key))); |
| | | } |
| | | for (Object key : map.keySet()) { |
| | | map.put(key,String.valueOf(map.get(key))); |
| | | } |
| | | |
| | | ((BaseModel) obj).setData(map); |
| | | baseModels.add((BaseModel) obj); |
| | | ((BaseModel) obj).setData(map); |
| | | baseModels.add((BaseModel) obj); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new VciBaseException("æ¥è¯¢å¤±è´¥ï¼" + e.getMessage()); |
| | | } |
| | | return baseModels; |
| | | } |
| | |
| | | * @return å¤çç¶æ |
| | | */ |
| | | @Override |
| | | public R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) throws Exception { |
| | | public R updateBatchByBaseModel(String btmType, List<BaseModel> baseModels) { |
| | | //使ç¨ä¼ å
¥çä¸å¡ç±»åæ¥è¯¢è¡¨ |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(btmType)); |
| | | if(listR.getData().size() == 0){ |
| | |
| | | |
| | | return R.success("æ´æ°æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * è·ååç
§çä¿¡æ¯ |
| | | * |
| | | * @param referConfigVO åç
§çé
ç½® |
| | | * @param pageHelper å页çå·¥å
· |
| | | * @return åè¡¨æ°æ® |
| | | */ |
| | | @Override |
| | | public DataGrid referDataGrid(UIFormReferVO referConfigVO, PageHelper pageHelper) { |
| | | // checkReferConfig(referConfigVO); |
| | | //使ç¨ä¸å¡ç±»åæ¥è¯¢ |
| | | R<BtmTypeVO> allAttributeByBtmId = btmTypeClient.getAllAttributeByBtmId(referConfigVO.getReferType()); |
| | | BtmTypeVO btmTypeVO = allAttributeByBtmId.getData(); |
| | | if (referConfigVO.getWhere() == null) { |
| | | referConfigVO.setWhere(new HashMap<>()); |
| | | } |
| | | /** |
| | | * å 䏿¥è¯¢ææ°ç次 |
| | | */ |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("lastr", "1"); |
| | | conditionMap.put("lastv", "1"); |
| | | referConfigVO.getWhere().putAll(conditionMap); |
| | | if (VciBaseUtil.containsKeyUnCaseForMap(referConfigVO.getWhere(), VciQueryWrapperForDO.LC_STATUS_FIELD) && |
| | | BtmTypeLcStatusConstant.FRAME_WORK_LIFE_CYCLE_NAME.equalsIgnoreCase(btmTypeVO.getLifeCycleId())) { |
| | | referConfigVO.getWhere().put(VciQueryWrapperForDO.LC_STATUS_FIELD, FrameworkDataLCStatus.ENABLED.getValue()); |
| | | } |
| | | if (VciBaseUtil.containsKeyUnCaseForMap(referConfigVO.getWhere(), VciQueryWrapperForDO.LC_STATUS_FIELD) && |
| | | BtmTypeLcStatusConstant.RELEASE_LIFE_CYCLE.equalsIgnoreCase(btmTypeVO.getLifeCycleId())) { |
| | | referConfigVO.getWhere().put(VciQueryWrapperForDO.LC_STATUS_FIELD, CodeDefaultLC.RELEASED.getValue()); |
| | | } |
| | | BaseQueryObject baseQueryObject = new BaseQueryObject(); |
| | | Map<String, String> where = referConfigVO.getWhere(); |
| | | where.put("domain", AppConstant.APPLICATION_NAME_CODE); |
| | | baseQueryObject.setConditionMap(where); |
| | | baseQueryObject.setPage(pageHelper.getPage()); |
| | | baseQueryObject.setSort(pageHelper.getSort()); |
| | | baseQueryObject.setLimit(pageHelper.getLimit()); |
| | | baseQueryObject.setOrder(pageHelper.getOrder()); |
| | | R<List<BtmTypeVO>> ref = btmTypeClient.getRef(baseQueryObject); |
| | | DataGrid<BtmTypeVO> btmTypeVODataGrid = new DataGrid<>(); |
| | | List<BtmTypeVO> data = ref.getData(); |
| | | btmTypeVODataGrid.setData(data); |
| | | btmTypeVODataGrid.setCode(ref.getCode()); |
| | | btmTypeVODataGrid.setLimit(pageHelper.getLimit()); |
| | | btmTypeVODataGrid.setMsg(ref.getMsg()); |
| | | btmTypeVODataGrid.setSort(pageHelper.getSort()); |
| | | btmTypeVODataGrid.setOrder(pageHelper.getOrder()); |
| | | btmTypeVODataGrid.setPage(pageHelper.getPage()); |
| | | return btmTypeVODataGrid; |
| | | } |
| | | |
| | | /** |
| | | * è·åæ å½¢çåç
§ |
| | | * |
| | | * @param referConfigVO åç
§çé
ç½® |
| | | * @return æ å½¢çæ°æ® |
| | | */ |
| | | @Override |
| | | public List<Tree> referTree(UIFormReferVO referConfigVO, TreeQueryObject queryObject) { |
| | | if (queryObject.getConditionMap() == null) { |
| | | queryObject.setConditionMap(new HashMap<>()); |
| | | } |
| | | |
| | | if (queryObject.getParentOid()==null){ |
| | | LambdaQueryWrapper<CodeClassify> lqw = new LambdaQueryWrapper<>(); |
| | | String parentValue = referConfigVO.getParentValue().substring(3); |
| | | lqw.inSql(CodeClassify::getOid,parentValue); |
| | | List<String> codeClassifies = classifyService.select1(lqw); |
| | | String oid = codeClassifies.get(0); |
| | | queryObject.setParentOid(oid); |
| | | } |
| | | String oidFieldName = StringUtils.isNotBlank(referConfigVO.getParentUsedField()) ? referConfigVO.getParentUsedField() : referConfigVO.getValueField(); |
| | | if (queryObject.isQueryAllLevel()) { |
| | | String parentOidSql = ""; |
| | | if (StringUtils.isNotBlank(referConfigVO.getParentValue())) { |
| | | String temp = referConfigVO.getParentValue(); |
| | | if (temp.startsWith(QueryOptionConstant.IN)) { |
| | | temp = temp.substring((QueryOptionConstant.IN).length()).trim(); |
| | | parentOidSql = " in " + ((temp.startsWith("(") && temp.endsWith(")")) ? temp : "(" + temp + ")"); |
| | | } else if (temp.startsWith(QueryOptionConstant.NOTIN)) { |
| | | parentOidSql = " not in " + ((temp.startsWith("(") && temp.endsWith(")")) ? temp : "(" + temp + ")"); |
| | | } else if (temp.startsWith(QueryOptionConstant.NOTEQUAL)) { |
| | | temp = temp.substring((QueryOptionConstant.NOTEQUAL).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.NOTEQUAL + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'"); |
| | | } else if (temp.startsWith(QueryOptionConstant.MORETHAN)) { |
| | | temp = temp.substring((QueryOptionConstant.MORETHAN).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.MORETHAN + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'"); |
| | | } else if (temp.startsWith(QueryOptionConstant.MORE)) { |
| | | temp = temp.substring((QueryOptionConstant.MORE).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.MORE + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'"); |
| | | } else if (temp.startsWith(QueryOptionConstant.LESSTHAN)) { |
| | | temp = temp.substring((QueryOptionConstant.LESSTHAN).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.LESSTHAN + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'"); |
| | | } else if (temp.startsWith(QueryOptionConstant.LESS)) { |
| | | temp = temp.substring((QueryOptionConstant.LESS).length()).trim(); |
| | | parentOidSql = QueryOptionConstant.LESS + " " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'"); |
| | | } else if (temp.startsWith(QueryOptionConstant.ISNOTNULL)) { |
| | | parentOidSql = " is not null"; |
| | | } else if (temp.startsWith(QueryOptionConstant.ISNULL)) { |
| | | parentOidSql = " is null"; |
| | | } else if (temp.contains("*")) { |
| | | parentOidSql = " like " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'").replace("*", "%"); |
| | | } else { |
| | | parentOidSql = " = " + ((temp.startsWith("'") && temp.endsWith("'")) ? temp : "'" + temp + "'"); |
| | | } |
| | | |
| | | } |
| | | //æ¥è¯¢å
¨é¨çä¿¡æ¯ |
| | | queryObject.getConditionMap().put("oid", QueryOptionConstant.IN + "(select oid from " + |
| | | getTableName(referConfigVO.getReferType())+ |
| | | " START WITH " + referConfigVO.getParentFieldName() + " " + |
| | | parentOidSql + |
| | | " CONNECT BY PRIOR " + oidFieldName + " = " + referConfigVO.getParentFieldName() + ")"); |
| | | } else { |
| | | if (StringUtils.isNotBlank(referConfigVO.getParentFieldName()) && StringUtils.isNotBlank(queryObject.getParentOid())) { |
| | | queryObject.getConditionMap().put(referConfigVO.getParentFieldName(), queryObject.getParentOid()); |
| | | } |
| | | } |
| | | LambdaQueryWrapper<CodeClassify> lqw = new LambdaQueryWrapper<>(); |
| | | String sql = queryObject.getConditionMap().get("oid").substring(3); |
| | | lqw.inSql(CodeClassify::getOid,sql); |
| | | List<CodeClassify> codeClassifies = classifyService.selectByWrapper(lqw); |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(referConfigVO.getParentFieldName()); |
| | | treeWrapperOptions.setOidFieldName(oidFieldName); |
| | | treeWrapperOptions.setTextFieldName(referConfigVO.getTextField()); |
| | | treeWrapperOptions.setMultipleSelect(referConfigVO.isMuti()); |
| | | treeWrapperOptions.setParentOid(queryObject.getParentOid()); |
| | | return revisionModelUtil.doList2Trees(codeClassifies, treeWrapperOptions, null); |
| | | } |
| | | |
| | | private String getTableName(String refertype){ |
| | | if ("codeclassify".equals(refertype)){ |
| | | return "pl_code_classify"; |
| | | } |
| | | if ("table".equals(refertype)){ |
| | | return "pl_code_test_table"; |
| | | } |
| | | if ("testBtmType".equals(refertype)){ |
| | | return "PLBT_code_testBtmType"; |
| | | } |
| | | |
| | | return "pl_code_"+refertype.trim().toLowerCase(); |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.nacos.common.utils.StringUtils; |
| | | import com.vci.ubcs.code.bo.AttributeValue; |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.bo.CodeTemplateAttrSqlBO; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.service.ICodeClassifyService; |
| | | import com.vci.ubcs.code.service.MdmEngineService; |
| | | import com.vci.ubcs.code.service.MdmIOService; |
| | | import com.vci.ubcs.code.enumpack.CodeDefaultLC; |
| | | import com.vci.ubcs.code.enumpack.CodeLevelTypeEnum; |
| | | import com.vci.ubcs.code.mapper.CommonsMapper; |
| | | import com.vci.ubcs.code.service.*; |
| | | import com.vci.ubcs.code.util.ClientBusinessObject; |
| | | import com.vci.ubcs.code.vo.CodeKeyAttrRepeatVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.code.vo.webserviceModel.attrmap.DataObjectVO; |
| | | import com.vci.ubcs.code.vo.webserviceModel.attrmap.RowDatas; |
| | |
| | | import com.vci.ubcs.starter.poi.bo.SheetRowData; |
| | | import com.vci.ubcs.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.ubcs.starter.poi.util.ExcelUtil; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.ubcs.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciDateUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.pagemodel.UIFormReferVO; |
| | | import com.vci.ubcs.starter.web.toolmodel.DateConverter; |
| | | import com.vci.ubcs.starter.web.util.*; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.hssf.usermodel.HSSFRichTextString; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.hssf.util.HSSFColor; |
| | |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.CopyOnWriteArraySet; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.alibaba.druid.util.FnvHash.Constants.LIMIT; |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.*; |
| | | import static com.vci.ubcs.starter.poi.util.ExcelUtil.KEY_ATTR_CHAR; |
| | | import static com.vci.ubcs.starter.poi.util.ExcelUtil.REQUIRED_CHAR; |
| | | import static com.vci.ubcs.starter.poi.util.ExcelUtil.*; |
| | | |
| | | @AllArgsConstructor |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | @Slf4j |
| | | public class MdmIOServiceImpl implements MdmIOService { |
| | | |
| | | |
| | | @Value("${batchadd.redis.time:6000000}") |
| | | public int BATCHADD_REDIS_TIME; |
| | | /** |
| | | * 主é¢åºåç±»çæå¡ |
| | | */ |
| | | @Resource |
| | | private ICodeClassifyService classifyService; |
| | | |
| | | /** |
| | | * éç¨æ¥è¯¢ |
| | | */ |
| | | @Resource |
| | | CommonsMapper commonsMapper; |
| | | |
| | | /** |
| | | * 模æ¿çæå¡ |
| | |
| | | */ |
| | | @Resource |
| | | private MdmEngineService engineService; |
| | | |
| | | /*** |
| | | * resdisç¼åæå¡ |
| | | */ |
| | | private final BladeRedis bladeRedis; |
| | | /** |
| | | * çæç¼ç çæå¡ |
| | | */ |
| | | @Resource |
| | | private MdmProductCodeService productCodeService; |
| | | /** |
| | | * å
³é®å±æ§çé
ç½® |
| | | */ |
| | | @Autowired |
| | | private ICodeKeyAttrRepeatService keyRuleService; |
| | | |
| | | /** |
| | | * å
¬å¼çæå¡ |
| | | */ |
| | | @Autowired |
| | | private FormulaServiceImpl formulaService; |
| | | /** |
| | | * çæå¯¼å
¥çæä»¶ |
| | | * |
| | |
| | | */ |
| | | private String batchImportCodes(CodeOrderDTO orderDTO,CodeClassifyTemplateVO templateVO,SheetDataSet dataSet,Map<String,String> errorMap,boolean isEnumType){ |
| | | List<String> codeList=new ArrayList<>(); |
| | | // CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(orderDTO.getCodeClassifyOid()); |
| | | //è§åç主é®éè¦å»è·å |
| | | // CodeRuleVO ruleVO = engineService.getCodeRuleByClassifyFullInfo(classifyFullInfo); |
| | | // //1.夿è§åä¸é¤äºæµæ°´ç æ®µï¼æ¯å¦æå
¶ä»ç 段 |
| | | // engineService.checkSecValueOnOrder(ruleVO,orderDTO); |
| | | // List<SheetRowData> rowDataList = dataSet.getRowData(); |
| | | // |
| | | // //é¤å»é»è®¤ç屿§.è¿æåªæè¡¨åæ¾ç¤ºçåæ®µæå¯¼å
¥ |
| | | // List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> |
| | | // !DEFAULT_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormdisplayflag()) |
| | | // ).collect(Collectors.toList()); |
| | | // Map<Integer/**åå·**/,String/**åæ®µçåç§°**/> fieldIndexMap = new HashMap<>(); |
| | | // List<String> titleRowData = dataSet.getColName(); |
| | | // Map<String/**䏿åç§°**/, String/**è±æåç§°**/> attrNameIdMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getName(), t -> t.getId().toLowerCase(Locale.ROOT),(o1, o2)->o2)); |
| | | // getFieldIndexMap(titleRowData,attrNameIdMap,fieldIndexMap); |
| | | // |
| | | // //éè¦å¤ææ¯å¦ææç屿§é½å¨æ¨¡æ¿ä¸äº |
| | | // List<CodeClassifyTemplateAttrVO> unExistAttrVOs = attrVOS.stream().filter(s -> !fieldIndexMap.containsValue(s.getId().toLowerCase(Locale.ROOT)) |
| | | // && StringUtils.isBlank(s.getComponentrule()) && StringUtils.isBlank(s.getClassifyinvokeattr())//ç»åè§ååå类注å
¥ç¡®å®æ²¡ç»ç¨æ·å¯¼åºå» |
| | | // ).collect(Collectors.toList()); |
| | | // if(!CollectionUtils.isEmpty(unExistAttrVOs)){ |
| | | // throw new VciBaseException("ã" + unExistAttrVOs.stream().map(CodeClassifyTemplateAttrVO::getName) + "ãè¿äºå±æ§å¨åè¡¨ä¸æ²¡ææ¾å°"); |
| | | // } |
| | | // List<ClientBusinessObject> cboList = new ArrayList<>(); |
| | | // String fullPath = getFullPath(classifyFullInfo); |
| | | // excelToCbo(classifyFullInfo,fieldIndexMap,rowDataList,templateVO,cboList,fullPath,true); |
| | | // |
| | | // //é½è½¬æ¢å®äºãéè¦æ¹éæ£æ¥ |
| | | // //妿åºéäºï¼æä»¬ä¾ç¶æ§è¡ææçæ°æ®ï¼æ æçæ°æ®ååå°excelä¸ |
| | | // //2.夿å¿
è¾é¡¹ããéè¦å
¨é¨ç屿§ï¼å¦ææ¯å¿
è¾ï¼ä½æ¯è¡¨åéé¢ä¸æ¾ç¤ºçï¼åªè½æ¯å类注å
¥æè
ç»åè§å |
| | | // batchCheckRequiredAttrOnOrder(templateVO,cboList,errorMap); |
| | | // //3.夿å
³é®å±æ§ |
| | | // CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList); |
| | | // Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList(); |
| | | // Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList(); |
| | | // if(!CollectionUtils.isEmpty(selfRepeatRowIndexList)){ |
| | | // selfRepeatRowIndexList.stream().forEach(rowIndex->{ |
| | | // errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";å¨å½åå¤ççæ°æ®æä»¶ä¸å
³é®å±æ§éå¤" ); |
| | | // }); |
| | | // } |
| | | // if(!CollectionUtils.isEmpty(keyAttrRepeatRowIndexList)){ |
| | | // keyAttrRepeatRowIndexList.stream().forEach(rowIndex->{ |
| | | // errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";å
³é®å±æ§ä¸ç³»ç»ä¸çéå¤" ); |
| | | // }); |
| | | // } |
| | | // //å类注å
¥ |
| | | // batchSwitchClassifyAttrOnOrder(attrVOS,cboList,classifyFullInfo,false); |
| | | // //boolean |
| | | // reSwitchBooleanAttrOnOrder(attrVOS,cboList); |
| | | // //4.æ ¡éªè§å |
| | | // batchCheckVerifyOnOrder(attrVOS, cboList,errorMap); |
| | | // if(isEnumType) {//æ¯å¦éè¦æ ¡éªæä¸¾/åç
§ |
| | | // //5.æ ¡éªæä¸¾æ¯å¦æ£ç¡® |
| | | // batchSwitchEnumAttrOnOrder(attrVOS, cboList, errorMap); |
| | | // //7.å¤çåç
§çæ
åµ |
| | | // batchSwitchReferAttrOnOrder(attrVOS,cboList,errorMap); |
| | | // } |
| | | // //6.æ¶é´æ ¼å¼çéªè¯ |
| | | // //6.æ¶é´çï¼å¿
é¡»ç»ä¸ä¸ºyyyy-MM-dd HH:mm:ss |
| | | // batchSwitchDateAttrOnOrder(attrVOS,cboList,errorMap); |
| | | // //æåå¼ç»åè§å |
| | | // batchSwitchComponentAttrOnOrder(attrVOS,cboList); |
| | | // String uuid=redisService.getUUIDEveryDay(); |
| | | // Map<String, ClientBusinessObject> rowIndexCboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t)); |
| | | // |
| | | // if(errorMap.size()>0) { |
| | | // createRedisDatas(uuid + "-error",templateVO, rowIndexCboMap, dataSet, fieldIndexMap, errorMap,false); |
| | | // } |
| | | // boolean isCreateUUid=false; |
| | | // List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> { |
| | | // String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | // return !errorMap.containsKey(rowIndex); |
| | | // }).collect(Collectors.toList()); |
| | | // //ç¸ä¼¼æ ¡éª |
| | | // Map<String,String>resembleMap=new HashMap<>(); |
| | | // List<DataResembleVO> dataResembleVOS=new ArrayList<>(); |
| | | // String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmtypeid(); |
| | | // bathcResembleQuery(orderDTO.getCodeClassifyOid(),templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS); |
| | | // if(resembleMap.size()>0) { |
| | | // isCreateUUid=true; |
| | | // if(!CollectionUtils.isEmpty(dataResembleVOS)) { |
| | | // redisService.setCacheList(uuid + "-resemble-data", dataResembleVOS); |
| | | // createRedisDatas(uuid + "-resemble",templateVO, rowIndexCboMap, dataSet, fieldIndexMap, resembleMap, false); |
| | | // } |
| | | // } |
| | | // //æé¤é误çï¼å©ä¸æ£ç¡®ç |
| | | // Map<String,String> newErrorMap=new HashMap<>(); |
| | | // newErrorMap.putAll(resembleMap); |
| | | // newErrorMap.putAll(errorMap); |
| | | // needSaveCboList = cboList.stream().filter(cbo -> { |
| | | // String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | // return !newErrorMap.containsKey(rowIndex); |
| | | // }).collect(Collectors.toList()); |
| | | // if((errorMap.size()>0&&needSaveCboList.size()>0)||resembleMap.size()>0){ |
| | | // isCreateUUid=true; |
| | | // } |
| | | // createRedisByCodeClassify(uuid + "-class",templateVO,dataSet,fieldIndexMap,false); |
| | | // if(newErrorMap.size()>0) { |
| | | // createRedisDatas(uuid + "-ok",templateVO, rowIndexCboMap, dataSet, fieldIndexMap, newErrorMap,true); |
| | | // }else { |
| | | // uuid=""; |
| | | // //è¦æä»¥ä¸çé误ç齿åºåï¼åç»§ç»å¤çæ¶é´åç»åè§å |
| | | // needSaveCboList = cboList.stream().filter(cbo -> { |
| | | // String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | // return !newErrorMap.containsKey(rowIndex); |
| | | // }).collect(Collectors.toList()); |
| | | // if (!CollectionUtils.isEmpty(needSaveCboList)) { |
| | | // //9.æä»¬å¤çä¸å¡æ°æ® |
| | | // //çæç¼ç çå
容 |
| | | // codeList = productCodeService.productCodeAndSaveData(classifyFullInfo, templateVO, ruleVO, orderDTO.getSecDTOList(), needSaveCboList); |
| | | // //妿æ¯ç¼ç çæå¤±è´¥ï¼åç´æ¥å°±å¤±è´¥äºï¼å
¶ä»çå¤æåºæ¥æé误çæä»¬é½ç»ä¸è¿åå°exceléé¢ |
| | | // engineService.batchSaveSelectChar(templateVO, needSaveCboList); |
| | | // } |
| | | // } |
| | | // if(!isCreateUUid){ |
| | | // return uuid=""; |
| | | // } |
| | | // return uuid; |
| | | return null; |
| | | CodeRuleVO ruleVO = engineService.getCodeRuleByClassifyFullInfo(classifyFullInfo); |
| | | //1.夿è§åä¸é¤äºæµæ°´ç æ®µï¼æ¯å¦æå
¶ä»ç 段 |
| | | engineService.checkSecValueOnOrder(ruleVO,orderDTO); |
| | | List<SheetRowData> rowDataList = dataSet.getRowData(); |
| | | |
| | | //é¤å»é»è®¤ç屿§.è¿æåªæè¡¨åæ¾ç¤ºçåæ®µæå¯¼å
¥ |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> |
| | | !DEFAULT_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag()) |
| | | ).collect(Collectors.toList()); |
| | | Map<Integer/**åå·**/,String/**åæ®µçåç§°**/> fieldIndexMap = new HashMap<>(); |
| | | List<String> titleRowData = dataSet.getColName(); |
| | | Map<String/**䏿åç§°**/, String/**è±æåç§°**/> attrNameIdMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getName(), t -> t.getId().toLowerCase(Locale.ROOT),(o1, o2)->o2)); |
| | | getFieldIndexMap(titleRowData,attrNameIdMap,fieldIndexMap); |
| | | |
| | | //éè¦å¤ææ¯å¦ææç屿§é½å¨æ¨¡æ¿ä¸äº |
| | | List<CodeClassifyTemplateAttrVO> unExistAttrVOs = attrVOS.stream().filter(s -> !fieldIndexMap.containsValue(s.getId().toLowerCase(Locale.ROOT)) |
| | | && StringUtils.isBlank(s.getComponentRule()) && StringUtils.isBlank(s.getClassifyInvokeAttr())//ç»åè§ååå类注å
¥ç¡®å®æ²¡ç»ç¨æ·å¯¼åºå» |
| | | ).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(unExistAttrVOs)){ |
| | | throw new VciBaseException("ã" + unExistAttrVOs.stream().map(CodeClassifyTemplateAttrVO::getName) + "ãè¿äºå±æ§å¨åè¡¨ä¸æ²¡ææ¾å°"); |
| | | } |
| | | List<ClientBusinessObject> cboList = new ArrayList<>(); |
| | | String fullPath = getFullPath(classifyFullInfo); |
| | | excelToCbo(classifyFullInfo,fieldIndexMap,rowDataList,templateVO,cboList,fullPath,true); |
| | | |
| | | //é½è½¬æ¢å®äºãéè¦æ¹éæ£æ¥ |
| | | //妿åºéäºï¼æä»¬ä¾ç¶æ§è¡ææçæ°æ®ï¼æ æçæ°æ®ååå°excelä¸ |
| | | //2.夿å¿
è¾é¡¹ããéè¦å
¨é¨ç屿§ï¼å¦ææ¯å¿
è¾ï¼ä½æ¯è¡¨åéé¢ä¸æ¾ç¤ºçï¼åªè½æ¯å类注å
¥æè
ç»åè§å |
| | | batchCheckRequiredAttrOnOrder(templateVO,cboList,errorMap); |
| | | //3.夿å
³é®å±æ§ |
| | | CodeImportResultVO keyResultVO = batchCheckKeyAttrOnOrder(classifyFullInfo, templateVO, cboList); |
| | | Set<String> selfRepeatRowIndexList = keyResultVO.getSelfRepeatRowIndexList(); |
| | | Set<String> keyAttrRepeatRowIndexList = keyResultVO.getKeyAttrRepeatRowIndexList(); |
| | | if(!CollectionUtils.isEmpty(selfRepeatRowIndexList)){ |
| | | selfRepeatRowIndexList.stream().forEach(rowIndex->{ |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";å¨å½åå¤ççæ°æ®æä»¶ä¸å
³é®å±æ§éå¤" ); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(keyAttrRepeatRowIndexList)){ |
| | | keyAttrRepeatRowIndexList.stream().forEach(rowIndex->{ |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";å
³é®å±æ§ä¸ç³»ç»ä¸çéå¤" ); |
| | | }); |
| | | } |
| | | //å类注å
¥ |
| | | batchSwitchClassifyAttrOnOrder(attrVOS,cboList,classifyFullInfo,false); |
| | | //boolean |
| | | reSwitchBooleanAttrOnOrder(attrVOS,cboList); |
| | | //4.æ ¡éªè§å |
| | | batchCheckVerifyOnOrder(attrVOS, cboList,errorMap); |
| | | if(isEnumType) {//æ¯å¦éè¦æ ¡éªæä¸¾/åç
§ |
| | | //5.æ ¡éªæä¸¾æ¯å¦æ£ç¡® |
| | | batchSwitchEnumAttrOnOrder(attrVOS, cboList, errorMap); |
| | | //7.å¤çåç
§çæ
åµ |
| | | batchSwitchReferAttrOnOrder(attrVOS,cboList,errorMap); |
| | | } |
| | | //6.æ¶é´æ ¼å¼çéªè¯ |
| | | //6.æ¶é´çï¼å¿
é¡»ç»ä¸ä¸ºyyyy-MM-dd HH:mm:ss |
| | | batchSwitchDateAttrOnOrder(attrVOS,cboList,errorMap); |
| | | //æåå¼ç»åè§å |
| | | batchSwitchComponentAttrOnOrder(attrVOS,cboList); |
| | | String uuid=VciBaseUtil.getPk(); |
| | | Map<String, ClientBusinessObject> rowIndexCboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t)); |
| | | |
| | | if(errorMap.size()>0) { |
| | | createRedisDatas(uuid + "-error",templateVO, rowIndexCboMap, dataSet, fieldIndexMap, errorMap,false); |
| | | } |
| | | boolean isCreateUUid=false; |
| | | List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> { |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | return !errorMap.containsKey(rowIndex); |
| | | }).collect(Collectors.toList()); |
| | | //ç¸ä¼¼æ ¡éª |
| | | Map<String,String>resembleMap=new HashMap<>(); |
| | | List<DataResembleVO> dataResembleVOS=new ArrayList<>(); |
| | | String btmtypeid= classifyFullInfo.getTopClassifyVO().getBtmtypeid(); |
| | | bathcResembleQuery(orderDTO.getCodeClassifyOid(),templateVO,needSaveCboList,resembleMap,btmtypeid,dataResembleVOS); |
| | | if(resembleMap.size()>0) { |
| | | isCreateUUid=true; |
| | | if(!CollectionUtils.isEmpty(dataResembleVOS)) { |
| | | bladeRedis.set(uuid + "-resemble-data", dataResembleVOS); |
| | | createRedisDatas(uuid + "-resemble",templateVO, rowIndexCboMap, dataSet, fieldIndexMap, resembleMap, false); |
| | | } |
| | | } |
| | | //æé¤é误çï¼å©ä¸æ£ç¡®ç |
| | | Map<String,String> newErrorMap=new HashMap<>(); |
| | | newErrorMap.putAll(resembleMap); |
| | | newErrorMap.putAll(errorMap); |
| | | needSaveCboList = cboList.stream().filter(cbo -> { |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | return !newErrorMap.containsKey(rowIndex); |
| | | }).collect(Collectors.toList()); |
| | | if((errorMap.size()>0&&needSaveCboList.size()>0)||resembleMap.size()>0){ |
| | | isCreateUUid=true; |
| | | } |
| | | createRedisByCodeClassify(uuid + "-class",templateVO,dataSet,fieldIndexMap,false); |
| | | if(newErrorMap.size()>0) { |
| | | createRedisDatas(uuid + "-ok",templateVO, rowIndexCboMap, dataSet, fieldIndexMap, newErrorMap,true); |
| | | }else { |
| | | uuid=""; |
| | | |
| | | //è¦æä»¥ä¸çé误ç齿åºåï¼åç»§ç»å¤çæ¶é´åç»åè§å |
| | | /*dataCBOList = cboList.stream().filter(cbo -> { |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | return !newErrorMap.containsKey(rowIndex); |
| | | }).collect(Collectors.toList()); |
| | | */ List<String> dataCBOIdList=new ArrayList<>(); |
| | | List<BaseModel> dataCBOList=new ArrayList<>(); |
| | | cboList.stream().forEach(clientBusinessObject -> { |
| | | BaseModel baseModel=new BaseModel(); |
| | | BeanUtil.convert(clientBusinessObject,baseModel); |
| | | baseModel.setData(VciBaseUtil.objectToMapString(clientBusinessObject)); |
| | | dataCBOList.add(baseModel); |
| | | dataCBOIdList.add(baseModel.getOid()); |
| | | }); |
| | | |
| | | if (!CollectionUtils.isEmpty(needSaveCboList)) { |
| | | //9.æä»¬å¤çä¸å¡æ°æ® |
| | | //çæç¼ç çå
容 |
| | | try { |
| | | codeList = productCodeService.productCodeAndSaveData(classifyFullInfo,templateVO,ruleVO, orderDTO.getSecDTOList(),dataCBOList); |
| | | //妿æ¯ç¼ç çæå¤±è´¥ï¼åç´æ¥å°±å¤±è´¥äºï¼å
¶ä»çå¤æåºæ¥æé误çæä»¬é½ç»ä¸è¿åå°exceléé¢ |
| | | engineService.batchSaveSelectChar(templateVO, dataCBOIdList); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("æ¹äºç³è¯·æ¶å¤±è´¥"); |
| | | } |
| | | } |
| | | } |
| | | if(!isCreateUUid){ |
| | | return uuid=""; |
| | | } |
| | | return uuid; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | /** |
| | | * excel转æ¢ä¸ºcboç对象 |
| | | * @param classifyFullInfo åç±»çå
¨é¨ä¿¡æ¯ |
| | | * @param fieldIndexMap åæ®µçä½ç½® |
| | | * @param rowDataList exceléçè¡æ°æ® |
| | | * @param templateVO 模æ¿çæ¾ç¤ºå¯¹è±¡ |
| | | * @param cboList æ°æ®çå表 |
| | | * @param fullPath å
¨è·¯å¾ |
| | | * @param newCode æ¯å¦ä¸ºæ¹éç³è¯· |
| | | */ |
| | | private void excelToCbo(CodeClassifyFullInfoBO classifyFullInfo,Map<Integer,String> fieldIndexMap,List<SheetRowData> rowDataList, |
| | | CodeClassifyTemplateVO templateVO,List<ClientBusinessObject> cboList, |
| | | String fullPath,boolean newCode){ |
| | | rowDataList.stream().forEach(rowData -> { |
| | | ClientBusinessObject cbo=new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.addDefaultAttrAssimt(cbo, classifyFullInfo.getTopClassifyVO().getBtmtypeid()); |
| | | rowData.getData().forEach((index,value)->{ |
| | | String field = fieldIndexMap.get(index); |
| | | if (StringUtils.isBlank(field)) { |
| | | throw new VciBaseException("第" + (index + 1) + "åçæ é¢å¨ç³»ç»ä¸ä¸åå¨"); |
| | | } |
| | | try { |
| | | cbo.setAttributeValueWithNoCheck(field, value); |
| | | if (WebUtil.isDefaultField(field)) { |
| | | WebUtil.setValueToField(field, cbo, value); |
| | | } |
| | | } catch (VciBaseException e) { |
| | | log.error("è®¾ç½®å±æ§çå¼é误", e); |
| | | } |
| | | }); |
| | | try { |
| | | cbo.setAttributeValue(CODE_TEMPLATE_OID_FIELD,templateVO.getOid()); |
| | | cbo.setAttributeValue(IMPORT_ROW_INDEX,rowData.getRowIndex()); |
| | | if(newCode){ |
| | | cbo.setAttributeValue(CODE_CLASSIFY_OID_FIELD,classifyFullInfo.getCurrentClassifyVO().getOid()); |
| | | cbo.setAttributeValue(CODE_FULL_PATH_FILED,fullPath); |
| | | //cbo.setLcStatus(CodeDefaultLC.EDITING.getValue()); |
| | | int secret = VciBaseUtil.getInt(cbo.getAttributeValue(SECRET_FIELD)); |
| | | /*if(secret == 0 || !secretService.checkDataSecret(secret) ){ |
| | | Integer userSecret = VciBaseUtil.getCurrentUserSecret(); |
| | | cbo.setAttributeValue(SECRET_FIELD,String.valueOf((userSecret==null || userSecret ==0)? UserSecretEnum.NONE.getValue():userSecret)); |
| | | }*/ |
| | | }else{ |
| | | //æ¤æ¶è¿æ²¡æè½¬æ¢è·¯å¾ |
| | | //cbo.setAttributeValue(CODE_FULL_PATH_FILED, childOidPathMap.getOrDefault(rowData.getData().getOrDefault(CODE_CLASSIFY_OID_FIELD,""),fullPath)); |
| | | cbo.setLcStatus(CodeDefaultLC.RELEASED.getValue()); |
| | | } |
| | | |
| | | }catch (Throwable e){ |
| | | log.error("设置é»è®¤ç屿§çå¼é误",e); |
| | | } |
| | | cboList.add(cbo); |
| | | }); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æ£æ¥æ ¡éªè§å没æéè¿çå
容 |
| | | * @param attrVOS éè¦æ ¡éªç屿§ |
| | | * @param dataList æ°æ®çå表 |
| | | * @param errorMap é误çä¿¡æ¯æ å° |
| | | * @return æ ¡éªä¸éè¿çè¡æ° |
| | | */ |
| | | private void batchCheckVerifyOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS, List<ClientBusinessObject> dataList,Map<String,String> errorMap) { |
| | | Map<String, CodeClassifyTemplateAttrVO> verifyAttrVOMap = attrVOS.stream().filter(s -> StringUtils.isNotBlank(s.getVerifyRule()) && StringUtils.isBlank(s.getComponentRule()) |
| | | &&StringUtils.isBlank(s.getClassifyInvokeAttr()) |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | if(!CollectionUtils.isEmpty(verifyAttrVOMap)){ |
| | | Map<String/**è¡å·**/,List<String>/**æ ¡éªä¸éè¿ç屿§**/> unPassCheckMap = new HashMap<>(); |
| | | verifyAttrVOMap.forEach((attrId,attrVO)->{ |
| | | dataList.stream().forEach(cbo -> { |
| | | String value = cbo.getAttributeValue(attrId); |
| | | if(StringUtils.isNotBlank(value) && !value.matches(attrVO.getVerifyRule())){ |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | List<String> unPassAttrs = unPassCheckMap.getOrDefault(rowIndex, new ArrayList<>()); |
| | | unPassAttrs.add(attrVO.getName()); |
| | | unPassCheckMap.put(rowIndex,unPassAttrs); |
| | | } |
| | | }); |
| | | }); |
| | | if(!CollectionUtils.isEmpty(unPassCheckMap)){ |
| | | unPassCheckMap.forEach((rowIndex,unPassAttrs)->{ |
| | | errorMap.put(rowIndex,";屿§[" + unPassAttrs.stream().collect(Collectors.joining(",")) + "]å
容ä¸ç¬¦åæ ¡éªè§åçè¦æ±"); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * æ¹éè½¬æ¢æ¶é´é½ä¸ºæå®çæ ¼å¼ |
| | | * @param attrVOS 模æ¿å±æ§ |
| | | * @param cboList æ°æ®çå表 |
| | | * @param errorMap é误çä¿¡æ¯ |
| | | */ |
| | | private void batchSwitchDateAttrOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> cboList,Map<String,String> errorMap){ |
| | | Map<String, CodeClassifyTemplateAttrVO> dateAttrVOMap =attrVOS.stream().filter(s -> |
| | | StringUtils.isNotBlank(s.getCodeDateFormat()) && VciBaseUtil.getBoolean(s.getCodeDateFormat()) && StringUtils.isBlank(s.getComponentRule()) |
| | | && StringUtils.isBlank(s.getClassifyInvokeAttr()) |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | if(!CollectionUtils.isEmpty(dateAttrVOMap)) { |
| | | dateAttrVOMap.forEach((attrId, attrVO) -> { |
| | | cboList.stream().forEach(cbo -> { |
| | | String value = cbo.getAttributeValue(attrId); |
| | | if (value == null) { |
| | | value = ""; |
| | | } |
| | | if (StringUtils.isNotBlank(value)) { |
| | | boolean formated = false; |
| | | if(StringUtils.isNotBlank(attrVO.getCodeDateFormat())){ |
| | | try { |
| | | Date date = VciDateUtil.str2Date(value, attrVO.getCodeDateFormat()); |
| | | if(date!=null){ |
| | | cbo.setAttributeValue(attrId,value); |
| | | formated = true; |
| | | } |
| | | } catch (Exception e) { |
| | | //说æä¸æ¯è¿ä¸ªæ ¼å¼ |
| | | } |
| | | } |
| | | if(!formated) { |
| | | try { |
| | | DateConverter dateConverter = new DateConverter(); |
| | | dateConverter.setAsText(value); |
| | | value = VciDateUtil.date2Str(dateConverter.getValue(), VciDateUtil.DateTimeMillFormat); |
| | | cbo.setAttributeValue(attrId,value); |
| | | }catch (Throwable e){ |
| | | //转æ¢ä¸äº |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";屿§[" + attrVO.getName() + "]æ¶é´æ ¼å¼ä¸æ£ç¡®" ); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | /** |
| | | * 转移booleanåç屿§ |
| | | * @param attrVOS 屿§ç对象 |
| | | * @param dataList æ°æ® |
| | | */ |
| | | private void reSwitchBooleanAttrOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> dataList){ |
| | | Map<String, CodeClassifyTemplateAttrVO> booleanAttrMap = attrVOS.stream().filter( |
| | | s -> VciFieldTypeEnum.VTBoolean.name().equalsIgnoreCase(s.getAttributeDataType()) |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | if (!CollectionUtils.isEmpty(booleanAttrMap)) { |
| | | booleanAttrMap.forEach((attrId, attrVO) -> { |
| | | dataList.stream().forEach(cbo -> { |
| | | String text = cbo.getAttributeValue(attrId); |
| | | try { |
| | | if (BooleanEnum.TRUE.getValue().equalsIgnoreCase(text) || "æ¯".equalsIgnoreCase(text)) { |
| | | cbo.setAttributeValue(attrId, BooleanEnum.TRUE.getValue()); |
| | | } else { |
| | | cbo.setAttributeValue(attrId, BooleanEnum.FASLE.getValue()); |
| | | } |
| | | }catch (Throwable e){ |
| | | |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤çç»åè§å |
| | | * @param attrVOS 模æ¿å±æ§ |
| | | * @param dataList excelçæ°æ®å
容 |
| | | */ |
| | | private void batchSwitchComponentAttrOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> dataList) { |
| | | Map<String, CodeClassifyTemplateAttrVO> dateAttrVOMap = attrVOS.stream().filter(s -> StringUtils.isNotBlank(s.getComponentRule())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | if(!CollectionUtils.isEmpty(dateAttrVOMap)) { |
| | | dateAttrVOMap.forEach((attrId, attrVO) -> { |
| | | dataList.stream().forEach(cbo -> { |
| | | //ä»excel䏿屿§è½¬æ¢ä¸ºmap |
| | | Map<String,String> thisRowDataMap = new HashMap<>(); |
| | | copyValueToMapFromCbos(cbo,thisRowDataMap); |
| | | //ç»åå
容 |
| | | String value = formulaService.getValueByFormula(thisRowDataMap,attrVO.getComponentRule()); |
| | | if(value == null){ |
| | | value = ""; |
| | | } |
| | | try { |
| | | cbo.setAttributeValue(attrId, value); |
| | | }catch (Throwable e){ |
| | | log.error("è®¾ç½®å±æ§çé误",e); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 转æ¢åç
§çå¼ |
| | | * @param attrVOS 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | * @param dataList æ°æ®å表 |
| | | * @param errorMap é误çä¿¡æ¯ |
| | | */ |
| | | private void batchSwitchReferAttrOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> dataList,Map<String,String> errorMap){ |
| | | Map<String, CodeClassifyTemplateAttrVO> referAttrVOMap = attrVOS.stream().filter( |
| | | s -> (StringUtils.isNotBlank(s.getReferBtmId()) || StringUtils.isNotBlank(s.getReferConfig())) |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | if(!CollectionUtils.isEmpty(referAttrVOMap)){ |
| | | Map<String/**è¡¨æ ¼åå¼ç屿§**/,Map<String/**æ¾ç¤ºå±æ§çå¼**/,List<String>/**è¡¨æ ¼éçå¼**/>> linkValueMap = new HashMap<>(); |
| | | referAttrVOMap.forEach((attrId,attrVO)->{ |
| | | dataList.stream().forEach(cbo -> { |
| | | String text = cbo.getAttributeValue(attrId); |
| | | if(StringUtils.isNotBlank(text)){ |
| | | UIFormReferVO referVO = getReferVO(attrVO); |
| | | String valueField = getValueField(referVO); |
| | | String showText = getTextField(referVO); |
| | | String tableAndAttr = VciBaseUtil.getTableName(referVO.getReferType()) + "#" + valueField; |
| | | Map<String, List<String>> showTextMap = linkValueMap.getOrDefault(tableAndAttr, new HashMap<>()); |
| | | List<String> textList = showTextMap.getOrDefault(showText, new ArrayList<>()); |
| | | if(!textList.contains(text)) { |
| | | textList.add(text); |
| | | } |
| | | showTextMap.put(showText,textList); |
| | | linkValueMap.put(tableAndAttr,showTextMap); |
| | | } |
| | | }); |
| | | }); |
| | | if(!CollectionUtils.isEmpty(linkValueMap)){ |
| | | //éè¦é个表çå¼å段ï¼é个æ¥è¯¢ |
| | | Map<String/**è¡¨æ ¼åå¼å±æ§**/,Map<String/**æ¾ç¤ºå±æ§**/, Map<String/**å¼**/,String/**æ¾ç¤ºçå¼**/>>> linkCboMap = new HashMap<>(); |
| | | linkValueMap.forEach((tableAndAttr,showValueMap)->{ |
| | | String[] split = tableAndAttr.split("#"); |
| | | String table = split[0]; |
| | | String valueField = split[1].toLowerCase(Locale.ROOT); |
| | | Map<String,Map<String,String>> dataMap = new HashMap<>(); |
| | | showValueMap.forEach((showText,valueList)->{ |
| | | Map<String,String> valueOidTextMap = new HashMap<>(); |
| | | List<List<String>> valueCollections = VciBaseUtil.switchListForOracleIn(valueList); |
| | | String sql = "select " + valueField + "," + showText.toLowerCase(Locale.ROOT) +" from " + table + " where " + showText + " in (%s)"; |
| | | valueCollections.stream().forEach(values->{ |
| | | List<Map<String,String>> dataMapList = commonsMapper.queryByOnlySqlForMap(String.format(sql, VciBaseUtil.toInSql(values.toArray(new String[0])))); |
| | | List<ClientBusinessObject> cbos= ChangeMapTOClientBusinessObjects(dataMapList); |
| | | if(!CollectionUtils.isEmpty(cbos)){ |
| | | valueOidTextMap.putAll(cbos.stream().collect(Collectors.toMap(s->s.getAttributeValue(valueField),t->t.getAttributeValue(showText)))); |
| | | } |
| | | }); |
| | | dataMap.put(showText,valueOidTextMap); |
| | | }); |
| | | linkCboMap.put(tableAndAttr,dataMap); |
| | | }); |
| | | referAttrVOMap.forEach((attrId,attrVO)->{ |
| | | dataList.stream().forEach(cbo -> { |
| | | String text = cbo.getAttributeValue(attrId); |
| | | if (StringUtils.isNotBlank(text)) { |
| | | UIFormReferVO referVO = getReferVO(attrVO); |
| | | String valueField = getValueField(referVO); |
| | | String showText = getTextField(referVO); |
| | | String tableAndAttr = VciBaseUtil.getTableName(referVO.getReferType()) + "#" + valueField; |
| | | if(!linkCboMap.containsKey(tableAndAttr)){ |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";忰屿§[" + attrVO.getName() + "]çå¼å¨ç³»ç»ä¸ä¸åå¨" ); |
| | | |
| | | }else{ |
| | | Map<String, Map<String, String>> dataMap = linkCboMap.get(tableAndAttr); |
| | | if(!dataMap.containsKey(showText)){ |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";忰屿§[" + attrVO.getName() + "]çå¼å¨ç³»ç»ä¸ä¸åå¨" ); |
| | | }else{ |
| | | Map<String, String> data = dataMap.get(showText); |
| | | final boolean[] fined = {false}; |
| | | data.forEach((key,value)->{ |
| | | if(value.equalsIgnoreCase(text)){ |
| | | fined[0] = true; |
| | | try { |
| | | cbo.setAttributeValue(attrId, key); |
| | | }catch (Throwable e){ |
| | | |
| | | } |
| | | } |
| | | }); |
| | | if(!fined[0]){ |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";忰屿§[" + attrVO.getName() + "]çå¼å¨ç³»ç»ä¸ä¸åå¨" ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * ä»å±æ§ä¸è·ååç
§çå
容 |
| | | * @param attrVO 屿§çä¿¡æ¯ |
| | | * @return åç
§çå
容 |
| | | */ |
| | | private UIFormReferVO getReferVO(CodeClassifyTemplateAttrVO attrVO){ |
| | | UIFormReferVO referVO = null; |
| | | if(StringUtils.isNotBlank(attrVO.getReferConfig())){ |
| | | referVO = JSONObject.parseObject(attrVO.getReferConfig(),UIFormReferVO.class); |
| | | }else{ |
| | | referVO = new UIFormReferVO(); |
| | | referVO.setReferType(attrVO.getReferBtmId()); |
| | | referVO.setValueField(VciQueryWrapperForDO.OID_FIELD); |
| | | referVO.setTextField("name"); |
| | | } |
| | | return referVO; |
| | | } |
| | | |
| | | /** |
| | | * è·ååç
§ä¸çå¼çåæ®µ |
| | | * @param referVO åç
§ç对象 |
| | | * @return é»è®¤ä¸ºOidï¼æå¤ä¸ªçæ¶åï¼è·å第ä¸ä¸ª |
| | | */ |
| | | private String getValueField(UIFormReferVO referVO){ |
| | | String showText = referVO.getValueField(); |
| | | if(StringUtils.isBlank(showText)){ |
| | | return "oid"; |
| | | } |
| | | if(showText.contains(",")){ |
| | | //鲿¢ä¸ä¸æå¤ä¸ªï¼ççææ²¡æoid |
| | | List<String> strings = VciBaseUtil.str2List(showText); |
| | | if(strings.contains("oid")){ |
| | | showText = "oid"; |
| | | }else{ |
| | | showText = strings.get(0); |
| | | } |
| | | } |
| | | return showText; |
| | | } |
| | | |
| | | /** |
| | | * è·ååç
§ä¸çæ¾ç¤ºå
容çåæ®µ |
| | | * @param referVO åç
§ç对象 |
| | | * @return é»è®¤ä¸ºnameï¼æå¤ä¸ªçæ¶åï¼è·å第ä¸ä¸ª |
| | | */ |
| | | private String getTextField(UIFormReferVO referVO){ |
| | | String showText = referVO.getTextField(); |
| | | if(StringUtils.isBlank(showText)){ |
| | | return "name"; |
| | | } |
| | | if(showText.contains(",")){ |
| | | //鲿¢ä¸ä¸æå¤ä¸ªï¼ççææ²¡æname |
| | | List<String> strings = VciBaseUtil.str2List(showText); |
| | | if(strings.contains("name")){ |
| | | showText = "name"; |
| | | }else{ |
| | | showText = strings.get(0); |
| | | } |
| | | } |
| | | return showText; |
| | | } |
| | | /** |
| | | * å¤çæä¸¾çæ¾ç¤ºå¯¹è±¡ |
| | | * @param attrVOS 模æ¿å±æ§ |
| | | * @param dataList excelçæ°æ®å
容 |
| | | * @param errorMap é误信æ¯çæ å° |
| | | */ |
| | | private void batchSwitchEnumAttrOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> dataList, |
| | | Map<String,String> errorMap ) { |
| | | Map<String, CodeClassifyTemplateAttrVO> dateAttrVOMap = attrVOS.stream().filter( |
| | | s -> (StringUtils.isNotBlank(s.getEnumString()) || StringUtils.isNotBlank(s.getEnumId())) |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | if (!CollectionUtils.isEmpty(dateAttrVOMap)) { |
| | | dateAttrVOMap.forEach((attrId, attrVO) -> { |
| | | dataList.stream().forEach(cbo -> { |
| | | String text = cbo.getAttributeValue(attrId); |
| | | if(StringUtils.isNotBlank(text)){ |
| | | List<KeyValue> valueList = engineService.listComboboxItems(attrVO); |
| | | boolean fined = false; |
| | | for (int i = 0; i < valueList.size(); i++) { |
| | | KeyValue keyValue = valueList.get(i); |
| | | //if(keyValue.getValue().equalsIgnoreCase(text)){ |
| | | if(keyValue.getValue().equalsIgnoreCase(text)||keyValue.getKey().equalsIgnoreCase(text)){ |
| | | try { |
| | | cbo.setAttributeValue(attrId, keyValue.getKey()); |
| | | }catch (Throwable e){ |
| | | log.error("è®¾ç½®å±æ§åºé"); |
| | | } |
| | | fined = true; |
| | | break; |
| | | } |
| | | } |
| | | if(!fined){ |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";屿§[" + attrVO.getName() + "]çå¼ä¸ç¬¦å䏿çè¦æ±"); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ ¡éªæ°æ®çä¿¡æ¯ |
| | | * @param templateVO 模æ¿çæ¾ç¤ºå¯¹è±¡ |
| | | * @param cboList æ°æ®çå
容 |
| | | */ |
| | | private void batchCheckRequiredAttrOnOrder(CodeClassifyTemplateVO templateVO,List<ClientBusinessObject> cboList,Map<String,String> errorMap){ |
| | | Map<String, CodeClassifyTemplateAttrVO> requiredAttrMap = templateVO.getAttributes().stream().filter(s -> |
| | | VciBaseUtil.getBoolean(s.getRequireFlag()) && StringUtils.isBlank(s.getComponentRule()) && StringUtils.isBlank(s.getClassifyInvokeLevel())//ä¸è½æ¯ç»åçåå类注å
¥ç |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | //ä¸MdmEngineServiceImpléé¢çcheckRequiredAttrOnOrder é»è¾åºè¯¥ç¸ä¼¼ |
| | | if(!CollectionUtils.isEmpty(requiredAttrMap)) { |
| | | Set<String> nullRowIndex = cboList.stream().filter(cbo -> requiredAttrMap.keySet().stream().anyMatch(attrId -> StringUtils.isBlank(cbo.getAttributeValue(attrId)))).map(cbo -> cbo.getAttributeValue(IMPORT_ROW_INDEX)).collect(Collectors.toSet()); |
| | | if(!CollectionUtils.isEmpty(nullRowIndex)){ |
| | | String checkAttr = requiredAttrMap.values().stream().map(CodeClassifyTemplateAttrVO::getName).collect(Collectors.joining(",")); |
| | | nullRowIndex.stream().forEach(rowIndex->{ |
| | | errorMap.put(rowIndex,errorMap.getOrDefault(rowIndex,"") + ";æ ¡éªè§åä¸éè¿ï¼ææ ¡éªç屿§ä¸º" + checkAttr); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * å¤çå类注å
¥ |
| | | * @param attrVOS 模æ¿å±æ§ |
| | | * @param dataList excelçæ°æ®å
容 |
| | | * @param classifyFullInfo åç±»çå
¨è·¯å¾ |
| | | */ |
| | | private void batchSwitchClassifyAttrOnOrder(Collection<CodeClassifyTemplateAttrVO> attrVOS,List<ClientBusinessObject> dataList, |
| | | CodeClassifyFullInfoBO classifyFullInfo,boolean isImPort) { |
| | | Map<String, CodeClassifyTemplateAttrVO> dateAttrVOMap = attrVOS.stream().filter( |
| | | s -> StringUtils.isNotBlank(s.getClassifyInvokeAttr()) && StringUtils.isNotBlank(s.getClassifyInvokeAttr()) |
| | | ).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | Map<String,CodeClassifyFullInfoBO> classifyFullInfoMap=new HashMap<>(); |
| | | classifyFullInfoMap.put(classifyFullInfo.getCurrentClassifyVO().getOid(),classifyFullInfo); |
| | | if (!CollectionUtils.isEmpty(dateAttrVOMap)) { |
| | | dataList.stream().forEach(cbo -> { |
| | | dateAttrVOMap.forEach((attrId, attrVO) -> { |
| | | //å类注å
¥çç¼å·æè
åç§°ï¼ |
| | | //å±çº§å
嫿å®å±åæå°å± |
| | | CodeClassifyVO classifyVO = null; |
| | | if(!CodeLevelTypeEnum.MIN.getValue().equalsIgnoreCase(attrVO.getClassifyInvokeLevel()) && !"min".equalsIgnoreCase(attrVO.getClassifyInvokeLevel())) { |
| | | //æå®äºå±çº§ç |
| | | //注æï¼å 为æ¥è¯¢ä¸çº§åç±»åºæ¥çå±çº§æ¯ååºçï¼å³é¡¶å±èç¹æ¯æå¤§çå¼ |
| | | if(isImPort){ |
| | | if(!classifyFullInfoMap.containsKey(cbo.getAttributeValue(CODE_CLASSIFY_OID_FIELD))) { |
| | | CodeClassifyFullInfoBO currentClassifyFullInfo = classifyService.getClassifyFullInfo(cbo.getAttributeValue(CODE_CLASSIFY_OID_FIELD)); |
| | | classifyFullInfoMap.put(currentClassifyFullInfo.getCurrentClassifyVO().getOid(), currentClassifyFullInfo); |
| | | } |
| | | } |
| | | CodeClassifyFullInfoBO newClassifyFullInfo= classifyFullInfoMap.get(cbo.getAttributeValue(CODE_CLASSIFY_OID_FIELD)); |
| | | List<CodeClassifyVO> classifyVOS = newClassifyFullInfo.getParentClassifyVOs().stream().sorted(((o1, o2) -> o2.getDataLevel().compareTo(o1.getDataLevel()))).collect(Collectors.toList()); |
| | | int level = VciBaseUtil.getInt(attrVO.getClassifyInvokeLevel()); |
| | | if (classifyVOS.size()>=level && level > 0 ) { |
| | | classifyVO = classifyVOS.get(level-1); |
| | | } |
| | | }else{ |
| | | //å½åçåç±» |
| | | classifyVO = classifyFullInfo.getCurrentClassifyVO(); |
| | | } |
| | | try { |
| | | if (classifyVO == null) { |
| | | //说æå±çº§æè¯¯ |
| | | cbo.setAttributeValue(attrId, "åç±»æ 䏿²¡æå±çº§[" + attrVO.getClassifyInvokeLevel() + "]"); |
| | | } else { |
| | | Map<String, String> classifyDataMap = VciBaseUtil.objectToMapString(classifyVO); |
| | | String value = classifyDataMap.getOrDefault(attrVO.getClassifyInvokeAttr(), ""); |
| | | cbo.setAttributeValue(attrId, value); |
| | | } |
| | | } catch (Throwable e) { |
| | | log.error("è®¾ç½®å±æ§é误", e); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | /** |
| | | * æ ¡éªå
³é®å±æ§ |
| | | * @param classifyFullInfo åç±»çå
¨é¨ä¿¡æ¯ |
| | | * @param templateVO 模æ¿çå
容ï¼å¿
é¡»å
嫿¨¡æ¿å±æ§ |
| | | * @param cboList æ¹éçæ°æ® |
| | | */ |
| | | private CodeImportResultVO batchCheckKeyAttrOnOrder(CodeClassifyFullInfoBO classifyFullInfo, CodeClassifyTemplateVO templateVO, |
| | | List<ClientBusinessObject> cboList) { |
| | | //ä¸MdmEngineServiceImpléçcheckKeyAttrOnOrderç¸ä¼¼ |
| | | //å
è·åå
³é®å±æ§çè§åï¼ä¹å©ç¨ç»§æ¿çæ¹å¼ |
| | | CodeKeyAttrRepeatVO keyRuleVO = keyRuleService.getRuleByClassifyFullInfo(classifyFullInfo); |
| | | //注æçæ¯keyRuleVOå¯è½ä¸ºç©ºï¼è¡¨ç¤ºä¸ä½¿ç¨è§åæ§å¶ |
| | | //è·åææçå
³é®å±æ§ |
| | | Map<String/**屿§çç¼å·**/, CodeClassifyTemplateAttrVO> ketAttrMap = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getKeyAttrFlag())).collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t)); |
| | | |
| | | boolean trimAll =keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag()); |
| | | //å
¨é¨å»ç©ºçä¼å
级大äºå»ç©º |
| | | boolean trim =keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnorespaceflag()); |
| | | boolean ignoreCase = keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnorecaseflag()); |
| | | boolean ignoreWidth = keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnorewidthflag()); |
| | | |
| | | //1. æä»¬éè¦å
夿excel导å
¥çå
容æ¯å¦æ£ç¡® |
| | | CodeImportResultVO resultVO = new CodeImportResultVO(); |
| | | resultVO.setKeyAttrRuleInfo(String.format(keyRuleVO ==null?"":"æ¥è¯¢è§åï¼å»é¤ç©ºæ ¼--{0},忽ç¥å¤§å°å--{1},忽ç¥å
¨åè§--{2},忽ç¥å
¨é¨ç©ºæ ¼--{3}", |
| | | new String[]{trim?"æ¯":"å¦",ignoreCase?"æ¯":"å¦",ignoreWidth?"æ¯":"å¦",trimAll?"æ¯":"å¦"})); |
| | | resultVO.setSelfRepeatRowIndexList(getSelfRepeatRowIndex(ketAttrMap,cboList,keyRuleVO)); |
| | | if(!CollectionUtils.isEmpty(resultVO.getSelfRepeatRowIndexList())){ |
| | | //æä»¬ç§»é¤æ¬èº«éå¤çæ°æ® |
| | | cboList = cboList.stream().filter(s->!resultVO.getSelfRepeatRowIndexList().contains(s.getAttributeValue(IMPORT_ROW_INDEX))).collect(Collectors.toList()); |
| | | } |
| | | //2.夿å
³é®å±æ§å¨ç³»ç»éæ¯å¦éå¤ |
| | | //å ä¸ºæ°æ®éå¾å¤§ï¼æä»¥å¾æ³åæ³å¹¶è¡ |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | Map<String,List<ClientBusinessObject>> indexTODataMap=new HashMap<>(); |
| | | List<ClientBusinessObject> repeatDataMap = cboList.parallelStream().filter(cbo -> { |
| | | //æ¯è¡é½å¾æ¥è¯¢.妿å
¶ä¸åºç°äºéè¯¯ï¼æä»¬å°±ç´æ¥æåºå¼å¸¸ï¼å
¶ä½çæ¾ç¤º |
| | | //VciBaseUtil.setCurrentUserSessionInfo(sessionInfo); |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | ketAttrMap.forEach((attrId, attrVO) -> { |
| | | String value =cbo.getAttributeValue(attrId.toLowerCase(Locale.ROOT)); |
| | | if (value == null) { |
| | | value = ""; |
| | | } |
| | | value= value.replace(REQUIRED_CHAR,SPECIAL_CHAR); |
| | | engineService.wrapperKeyAttrConditionMap(value, keyRuleVO, attrId, trim, ignoreCase, ignoreWidth, trimAll, conditionMap); |
| | | }); |
| | | if (!CollectionUtils.isEmpty(ketAttrMap)) { |
| | | CodeTemplateAttrSqlBO sqlBO = engineService.getSqlByTemplateVO(classifyFullInfo.getTopClassifyVO().getBtmtypeid(), templateVO, conditionMap, null); |
| | | boolean isKeyCheck= commonsMapper.queryCountBySql(sqlBO.getSqlCount()) > 0; |
| | | if(isKeyCheck){ |
| | | List<Map<String,String>> newDataList= commonsMapper.queryByOnlySqlForMap(sqlBO.getSqlUnPage()); |
| | | List<ClientBusinessObject> newCboList= ChangeMapTOClientBusinessObjects(newDataList); |
| | | indexTODataMap.put(cbo.getAttributeValue(IMPORT_ROW_INDEX),newCboList); |
| | | } |
| | | return isKeyCheck; |
| | | }else{ |
| | | return false; |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(repeatDataMap)){ |
| | | resultVO.setKeyAttrRepeatRowIndexList(repeatDataMap.stream().map(s->s.getAttributeValue(IMPORT_ROW_INDEX)).collect(Collectors.toSet())); |
| | | } |
| | | //resultVO.setIndexTODataMap(indexTODataMap); |
| | | //resultVO.setSuccess(true); |
| | | return resultVO; |
| | | } |
| | | /** |
| | | * è·å导å
¥çå
容ä¸å
³é®å±æ§éå¤çè¡å· |
| | | * @param ketAttrMap å
³é®å±æ§çæ å° |
| | | * @param dataList 导å
¥çæ°æ® |
| | | * @param keyRuleVO å
³é®å±æ§æ§å¶è§å |
| | | * @return éå¤çè¡å· |
| | | */ |
| | | private Set<String> getSelfRepeatRowIndex(Map<String/**屿§çç¼å·**/, CodeClassifyTemplateAttrVO> ketAttrMap, |
| | | List<ClientBusinessObject> dataList,CodeKeyAttrRepeatVO keyRuleVO){ |
| | | Set<String> selfRepeatRowIndexList = new CopyOnWriteArraySet<>(); |
| | | boolean trimAll =keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnoreallspaceflag()); |
| | | //å
¨é¨å»ç©ºçä¼å
级大äºå»ç©º |
| | | boolean trim =keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnorespaceflag()); |
| | | boolean ignoreCase = keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnorecaseflag()); |
| | | boolean ignoreWidth = keyRuleVO ==null?false: VciBaseUtil.getBoolean(keyRuleVO.getIgnorewidthflag()); |
| | | //å¿
é¡»å°å±æ§æç
§é¡ºåºæåºå¥½ |
| | | List<CodeClassifyTemplateAttrVO> attrVOList = ketAttrMap.values().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); |
| | | Map<String/**è¡å·**/,String/**å
³é®å±æ§çç»åå
容**/> rowIndexKeyStringMap = new HashMap<>(); |
| | | dataList.parallelStream().forEach(cbo-> { |
| | | String rowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int i = 0; i < attrVOList.size(); i++) { |
| | | CodeClassifyTemplateAttrVO attrVO = attrVOList.get(i); |
| | | String attrId = attrVO.getId().toLowerCase(Locale.ROOT); |
| | | String value = cbo.getAttributeValue( attrId); |
| | | if (value == null) { |
| | | value = ""; |
| | | } |
| | | if(trim){ |
| | | value = value.trim(); |
| | | } |
| | | if(trimAll){ |
| | | value = value.replace(" ",""); |
| | | } |
| | | if(ignoreCase){ |
| | | value = value.toLowerCase(Locale.ROOT); |
| | | } |
| | | if(ignoreWidth){ |
| | | value = VciBaseUtil.toDBC(value); |
| | | } |
| | | sb.append(value).append("${ks}"); |
| | | } |
| | | String keyString = sb.toString(); |
| | | if(rowIndexKeyStringMap.containsValue(keyString) && StringUtils.isNotBlank(keyString)){ |
| | | selfRepeatRowIndexList.add(rowIndex); |
| | | }else { |
| | | rowIndexKeyStringMap.put(rowIndex, sb.toString()); |
| | | } |
| | | }); |
| | | //å ä¸ºåªæ¯å
³é®å±æ§éå¤ï¼æä»¥æä»¬ä¸è½éå¤ç夿¡é䏿¡æ¥æ¥é |
| | | return selfRepeatRowIndexList; |
| | | } |
| | | /** |
| | | * excelçæ é¢ä¸è·ååæ®µæå¨çä½ç½® |
| | | * @param titleRowData æ é¢çå
容 |
| | | * @param attrNameIdMap 模æ¿ä¸å±æ§åç§°åè±æçæ å° |
| | |
| | | } |
| | | } |
| | | } |
| | | private List<ClientBusinessObject> ChangeMapTOClientBusinessObjects(List<Map<String,String>> oldDataMap){ |
| | | List<ClientBusinessObject> clientBusinessObjectList=new CopyOnWriteArrayList<>(); |
| | | oldDataMap.parallelStream().forEach(dataMap->{ |
| | | ClientBusinessObject clientBusinessObject=new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.copplyDefaultAttrAssimt(dataMap,clientBusinessObject); |
| | | dataMap.forEach((key,value)->{ |
| | | clientBusinessObject.setAttributeValue(key,value); |
| | | }); |
| | | }); |
| | | return clientBusinessObjectList; |
| | | } |
| | | |
| | | /*** |
| | | * æ£ç¡®éè¯¯æ°æ®redisç¼å |
| | | * @param uuid |
| | | * @param templateVO |
| | | * @param rowIndexCbo |
| | | * @param dataSet |
| | | * @param fieldIndexMap |
| | | * @param errorMap |
| | | * @param isok |
| | | */ |
| | | private void createRedisDatas(String uuid,CodeClassifyTemplateVO templateVO,Map<String,ClientBusinessObject> rowIndexCbo, SheetDataSet dataSet, Map<Integer/**åå·**/,String/**åæ®µçåç§°**/> fieldIndexMap,Map<String,String> errorMap,boolean isok){ |
| | | List<SheetRowData> needsheetRowDataList =new ArrayList<>(); |
| | | if(errorMap.size()>0) { |
| | | //è¦æä»¥ä¸çé误ç齿åºåï¼åç»§ç»å¤çæ¶é´åç»åè§å |
| | | needsheetRowDataList = dataSet.getRowData().stream().filter(cbo -> { |
| | | String rowIndex=cbo.getRowIndex(); |
| | | return isok? !errorMap.containsKey(rowIndex):errorMap.containsKey(rowIndex); |
| | | }).collect(Collectors.toList()); |
| | | |
| | | }else{ |
| | | needsheetRowDataList= dataSet.getRowData(); |
| | | } |
| | | Map<String/**䏿åç§°**/, SheetRowData/**è±æåç§°**/> rowIdexDataMap = needsheetRowDataList.stream().collect(Collectors.toMap(s -> s.getRowIndex(), t -> t,(o1, o2)->o2)); |
| | | Map<String,CodeImprotDataVO> clsfDataMap=new HashMap<>(); |
| | | rowIndexCbo .forEach((rowIndex, cbo) -> { |
| | | CodeImprotDataVO codeImprotDataVO = new CodeImprotDataVO(); |
| | | codeImprotDataVO.setTemplateOid(templateVO.getOid()); |
| | | List<Map<String, String>> dataList = new ArrayList<>(); |
| | | if(rowIdexDataMap.containsKey(rowIndex)){ |
| | | SheetRowData sheetRowData=rowIdexDataMap.get(rowIndex); |
| | | Map<String, String> dataMap = new HashMap<>(); |
| | | Map<Integer, String> data = sheetRowData.getData(); |
| | | fieldIndexMap.forEach((integer, s) -> { |
| | | String field = fieldIndexMap.get(integer); |
| | | if (data.containsKey(integer)) { |
| | | String vlues = data.get(integer); |
| | | dataMap.put(field, vlues); |
| | | } |
| | | }); |
| | | dataMap.put("oid",cbo.getOid()); |
| | | dataList.add(dataMap); |
| | | } |
| | | if(clsfDataMap.containsKey(templateVO.getOid())){ |
| | | codeImprotDataVO=clsfDataMap.get(templateVO.getOid()); |
| | | dataList.addAll(codeImprotDataVO.getDatas()); |
| | | } |
| | | codeImprotDataVO.setColNames(dataSet.getColName()); |
| | | codeImprotDataVO.setDatas(dataList); |
| | | clsfDataMap.put(templateVO.getOid(),codeImprotDataVO); |
| | | }); |
| | | if(!CollectionUtils.isEmpty(clsfDataMap)) { |
| | | Collection codeImprotDataVOS=clsfDataMap.values(); |
| | | List<CodeImprotDataVO> codeImprotDataVOList=new ArrayList<>(); |
| | | codeImprotDataVOList.addAll(codeImprotDataVOS); |
| | | bladeRedis.set(uuid+"-"+templateVO.getOid(), codeImprotDataVOList); |
| | | bladeRedis.expire(uuid+"-"+templateVO.getOid(),BATCHADD_REDIS_TIME);//redisè¿ææ¶é´ |
| | | } |
| | | } |
| | | |
| | | /**** |
| | | * æ°æ®ç¸ä¼¼é¡¹æ°æ®æ ¡éªredisç¼å |
| | | * @param codeClassifyOid |
| | | * @param templateVO |
| | | * @param cboList |
| | | * @param resembleMap |
| | | * @param btmtypeid |
| | | * @param dataResembleVOS |
| | | */ |
| | | private void bathcResembleQuery(String codeClassifyOid, CodeClassifyTemplateVO templateVO, List<ClientBusinessObject> cboList,Map<String,String>resembleMap,String btmtypeid,List<DataResembleVO> dataResembleVOS){ |
| | | CodeClassifyFullInfoBO fullInfoBO = classifyService.getClassifyFullInfo(codeClassifyOid); |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | CodeResembleRuleVO resembleRuleVO = Optional.ofNullable(engineService.getUseResembleRule(fullInfoBO, fullInfoBO.getCurrentClassifyVO())).orElseGet(() -> new CodeResembleRuleVO()); |
| | | //éè¦è·åæ¯å¦æç¸ä¼¼æ¥è¯¢å±æ§ |
| | | Map<String, CodeClassifyTemplateAttrVO> attrVOs = templateVO.getAttributes().stream().filter(s -> VciBaseUtil.getBoolean(s.getSameRepeatAttrFlag())).collect(Collectors.toMap(s -> s.getId(), t -> t)); |
| | | if (CollectionUtils.isEmpty(attrVOs)) { |
| | | return; |
| | | } |
| | | Map<String,CodeImprotResembleVO> codeImprotResembleVOMap=new HashMap<>(); |
| | | List<CodeImprotResembleVO> codeImprotResembleVOList=new ArrayList<>(); |
| | | Map<String,String> rowIndePathMap=new HashMap<>(); |
| | | cboList.stream().forEach(clientBusinessObject -> { |
| | | CodeImprotResembleVO codeImprotResembleVO=new CodeImprotResembleVO(); |
| | | final String[] path = {""}; |
| | | List<String> fieldList=new ArrayList<>(); |
| | | List<String> rowIndeList=new ArrayList<>(); |
| | | String rowIndex = clientBusinessObject.getAttributeValue(IMPORT_ROW_INDEX); |
| | | attrVOs.forEach((attrId, attrVO) -> { |
| | | String value=""; |
| | | /*if (VciQueryWrapperForDO.BASIC_FIELD_MAP.containsKey(attrId)) { |
| | | value = WebUtil.getStringValueFromObject(WebUtil.getValueFromField(WebUtil.getFieldForObject(attrId, orderDTO.getClass()).getName(), orderDTO)); |
| | | }else {*/ |
| | | value= clientBusinessObject.getAttributeValue(attrId); |
| | | // } |
| | | fieldList.add(attrId); |
| | | value=StringUtils.isBlank(value)?"":value; |
| | | path[0] +=value+"#"; |
| | | engineService.wrapperResembleConditionMap(value, resembleRuleVO, attrId, conditionMap); |
| | | }); |
| | | List<Map<String,String>> dataMap=new ArrayList<>(); |
| | | if(codeImprotResembleVOMap.containsKey(path[0])) { |
| | | codeImprotResembleVO=codeImprotResembleVOMap.get(path[0]); |
| | | rowIndeList=codeImprotResembleVO.getRownIndex(); |
| | | dataMap= codeImprotResembleVO.getDataList(); |
| | | resembleMap.put(rowIndex, "åå¨ç¸ä¼¼æ°æ®"); |
| | | }else{ |
| | | if (!CollectionUtils.isEmpty(conditionMap)) { |
| | | Map<String, String> andConditionMap = new HashMap<>(); |
| | | andConditionMap.put("islastr", "1"); |
| | | andConditionMap.put("islastv", "1"); |
| | | conditionMap.putAll(andConditionMap); |
| | | PageHelper pageHelper = new PageHelper(-1); |
| | | pageHelper.addDefaultDesc("id"); |
| | | CodeTemplateAttrSqlBO sqlBO = engineService.getSqlByTemplateVO(btmtypeid, templateVO, conditionMap, pageHelper); |
| | | List<Map<String,String>> dataMapList=commonsMapper.queryByOnlySqlForMap(sqlBO.getSqlUnPage()); |
| | | List<ClientBusinessObject> resembleCboList= ChangeMapTOClientBusinessObjects(dataMapList); |
| | | if(!CollectionUtils.isEmpty(resembleCboList)) { |
| | | List<Map<String, String>> finalDataMap = dataMap; |
| | | resembleCboList.stream().forEach(cbo->{ |
| | | Map<String,String> resembDataMap=new HashMap<>(); |
| | | fieldList.stream().forEach(field->{ |
| | | String value=cbo.getAttributeValue(field); |
| | | value=StringUtils.isBlank(value)?"":value; |
| | | resembDataMap.put(field,value); |
| | | }); |
| | | resembDataMap.put("codetemplateoid",templateVO.getOid()); |
| | | resembDataMap.put("id",StringUtils.isBlank(cbo.getAttributeValue("id"))?"":cbo.getAttributeValue("id")); |
| | | resembDataMap.put("rowIndex",""); |
| | | resembDataMap.put("oid",cbo.getOid()); |
| | | finalDataMap.add(resembDataMap); |
| | | }); |
| | | resembleMap.put(rowIndex, "åå¨ç¸ä¼¼æ°æ®"); |
| | | |
| | | } |
| | | } |
| | | } |
| | | rowIndePathMap.put(rowIndex,path[0]); |
| | | rowIndeList.add(rowIndex); |
| | | codeImprotResembleVO.setPath(path[0]); |
| | | codeImprotResembleVO.setRownIndex(rowIndeList); |
| | | codeImprotResembleVO.setConditionMap(conditionMap); |
| | | codeImprotResembleVO.setFields(fieldList); |
| | | codeImprotResembleVO.setDataList(dataMap); |
| | | codeImprotResembleVOMap.put(path[0],codeImprotResembleVO); |
| | | }); |
| | | Map<String, ClientBusinessObject> cboMap = cboList.stream().filter(cbo -> cbo != null).collect(Collectors.toList()).stream().collect(Collectors.toMap(s -> s.getAttributeValue((IMPORT_ROW_INDEX)), t -> t)); |
| | | if(!CollectionUtils.isEmpty(rowIndePathMap)){ |
| | | rowIndePathMap.forEach((rowIndex, path) -> { |
| | | if(codeImprotResembleVOMap.containsKey(path)){ |
| | | CodeImprotResembleVO codeImprotResembleVO= codeImprotResembleVOMap.get(path); |
| | | List<String> fieldList=codeImprotResembleVO.getFields(); |
| | | List<String> rownIndexList= codeImprotResembleVO.getRownIndex(); |
| | | List<String> newRownIndexList = rownIndexList.stream().filter(cbo -> { |
| | | return rowIndex!=cbo; |
| | | }).collect(Collectors.toList()); |
| | | newRownIndexList.stream().forEach(s -> { |
| | | resembleMap.put(s, "åå¨ç¸ä¼¼æ°æ®"); |
| | | }); |
| | | List<Map<String, String>>newDataList=new ArrayList<>(); |
| | | DataResembleVO dataResembleVO=new DataResembleVO(); |
| | | dataResembleVO.setOid(cboMap.get(rowIndex).getOid()); |
| | | List<ClientBusinessObject> needSaveCboList = cboList.stream().filter(cbo -> { |
| | | String newRowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | return rownIndexList.contains(newRowIndex)&&(!newRowIndex.equalsIgnoreCase(rowIndex)); |
| | | }).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(needSaveCboList)) { |
| | | needSaveCboList.stream().forEach(cbo -> { |
| | | String newRowIndex = cbo.getAttributeValue(IMPORT_ROW_INDEX); |
| | | Map<String, String> resembDataMap = new HashMap<>(); |
| | | fieldList.stream().forEach(field -> { |
| | | String value = cbo.getAttributeValue(field); |
| | | value = StringUtils.isBlank(value) ? "" : value; |
| | | resembDataMap.put(field, value); |
| | | }); |
| | | resembDataMap.put("codetemplateoid",templateVO.getOid()); |
| | | resembDataMap.put("id",StringUtils.isBlank(cbo.getAttributeValue("id"))?"":cbo.getAttributeValue("id")); |
| | | resembDataMap.put("rowIndex", newRowIndex); |
| | | resembDataMap.put("oid",cbo.getOid()); |
| | | newDataList.add(resembDataMap); |
| | | }); |
| | | } |
| | | List<Map<String, String>>dataList=codeImprotResembleVO.getDataList(); |
| | | newDataList.addAll(dataList); |
| | | dataResembleVO.setDataList(newDataList); |
| | | dataResembleVOS.add(dataResembleVO); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /*** |
| | | * åå¨å类对象åå
¶åå |
| | | * @param uuid |
| | | * @param templateVOList |
| | | * @param dataSet |
| | | * @param fieldIndexMap |
| | | * @param iscContain |
| | | */ |
| | | private void createRedisByCodeClassify(String uuid,CodeClassifyTemplateVO templateVOList,SheetDataSet dataSet, Map<Integer/**åå·**/,String/**åæ®µçåç§°**/> fieldIndexMap,boolean iscContain){ |
| | | List<ColumnVO> columnVOList = new ArrayList<>(); |
| | | List<String> outNameList = dataSet.getColName(); |
| | | fieldIndexMap.forEach((integer, s) -> { |
| | | ColumnVO columnVOS = new ColumnVO(); |
| | | String field = fieldIndexMap.get(integer); |
| | | String outName = outNameList.get(integer); |
| | | columnVOS.setField(field); |
| | | columnVOS.setTitle(outName); |
| | | columnVOList.add(columnVOS); |
| | | }); |
| | | CodeImportTemplateVO codeImportTemplateVO=new CodeImportTemplateVO(); |
| | | codeImportTemplateVO.setCodeClassifyTemplateVO(templateVOList); |
| | | codeImportTemplateVO.setCloNamesList(columnVOList); |
| | | List<CodeImportTemplateVO> codeImportTemplateVOs= new ArrayList<>(); |
| | | |
| | | codeImportTemplateVOs.add(codeImportTemplateVO); |
| | | if(codeImportTemplateVOs.size()>0) { |
| | | bladeRedis.set(uuid, codeImportTemplateVOs); |
| | | bladeRedis.expire(uuid, BATCHADD_REDIS_TIME);//redisè¿ææ¶é´ |
| | | } |
| | | } |
| | | /** |
| | | * æ·è´ä¸å¡ç±»åå°map |
| | | * @param cbo ä¸å¡æ°æ® |
| | | * @param map map |
| | | */ |
| | | public static void copyValueToMapFromCbos(ClientBusinessObject cbo,Map<String,String> map){ |
| | | if(cbo!=null){ |
| | | copyValueToMapFromBos(cbo,map); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ·è´ä¸å¡ç±»åå°map |
| | | * @param bo ä¸å¡æ°æ® |
| | | * @param map map |
| | | */ |
| | | public static void copyValueToMapFromBos(ClientBusinessObject bo,Map<String,String> map){ |
| | | if(bo!=null ){ |
| | | //å
æææçåæ®µæ å°æ¾å° |
| | | AttributeValue[] newAList = bo.newAttrValList; |
| | | AttributeValue[] hisAList = bo.hisAttrValList; |
| | | if(hisAList!=null&&hisAList.length>0){// |
| | | for(int i = 0 ; i < hisAList.length;i++){ |
| | | AttributeValue av = hisAList[i]; |
| | | String attrName = av.attrName.toLowerCase(); |
| | | map.put(attrName, av.attrVal); |
| | | } |
| | | } |
| | | if(newAList!=null&&newAList.length>0){//NEWçä¼å
级é«äº |
| | | for(int i = 0 ; i < newAList.length;i++){ |
| | | AttributeValue av = newAList[i]; |
| | | String attrName = av.attrName.toLowerCase(); |
| | | map.put(attrName, av.attrVal); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.util; |
| | | |
| | | import com.vci.ubcs.omd.feign.IAttributeClient; |
| | | import com.vci.ubcs.omd.util.Tool; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | public class AttributeChecker { |
| | | |
| | | @Autowired(required = false) |
| | | private IAttributeClient attributeClient; |
| | | |
| | | public static HashMap<String, AttributeVO> attrItemMap = new HashMap(); |
| | | public static List<AttributeVO> attrItems = new ArrayList<AttributeVO>(); |
| | | |
| | | public void getAllAttribute() { |
| | | if (attrItems == null) { |
| | | R<List<AttributeVO>> R = attributeClient.getAll(); |
| | | attrItems=R.getData(); |
| | | List<AttributeVO> var4; |
| | | int var3 = (var4 = attrItems).size(); |
| | | |
| | | for(int var2 = 0; var2 < var3; ++var2) { |
| | | AttributeVO attrItem = var4.get(var2); |
| | | attrItemMap.put(attrItem.getName(), attrItem); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public int isAttrValValid(String attrName, String attrVal) { |
| | | // if (!BusinessConstants.BO_CONSTANTS.containsKey(attrName.toUpperCase())) { |
| | | if (attrVal != null && !attrVal.trim().equals("")) { |
| | | this.getAllAttribute(); |
| | | AttributeVO attributeVO = (AttributeVO)attrItemMap.get(attrName); |
| | | if (attributeVO == null) { |
| | | return 0; |
| | | } else { |
| | | String attrType = attributeVO.getTypeKey(); |
| | | int rs; |
| | | if (attrType.equals("VTString")) { |
| | | // rs = this.checkVTStringValValid(attributeVO, attrName, attrVal); |
| | | rs = 0; |
| | | } else if (attrType.equals("VTInteger")) { |
| | | // rs = this.checkVTIntegerValValid(attributeVO, attrName, attrVal); |
| | | rs = 0; |
| | | } else if (attrType.equals("VTLong")) { |
| | | // rs = this.checkVTLongValValid(attributeVO, attrName, attrVal); |
| | | rs = 0; |
| | | } else if (attrType.equals("VTDouble")) { |
| | | // rs = this.checkVTDoubleValValid(attributeVO, attrName, attrVal); |
| | | rs = 0; |
| | | } else if (attrType.equals("VTBoolean")) { |
| | | rs = 0; |
| | | } else if (attrType.equals("VTImage")) { |
| | | rs = 0; |
| | | } else if (attrType.equals("VTDate")) { |
| | | rs = 0; |
| | | } else if (attrType.equals("VTTime")) { |
| | | rs = 0; |
| | | } else if (attrType.equals("VTDateTime")) { |
| | | rs = 0; |
| | | } else if (attrType.equals("VTNote")) { |
| | | rs = 0; |
| | | } else if (attrType.equals("VTFilePath")) { |
| | | rs = 0; |
| | | } else { |
| | | rs = 0; |
| | | } |
| | | |
| | | return rs; |
| | | } |
| | | } else { |
| | | return 0; |
| | | } |
| | | // } else { |
| | | // return 0; |
| | | // } |
| | | } |
| | | |
| | | /*private int checkVTStringValValid(AttributeVO attributeVO, String attrName, String attrVal) { |
| | | String other =""; |
| | | int maxLength = Integer.valueOf(Tool.getOtherValueByType(other, "length")); |
| | | int length = attrVal.length(); |
| | | return length > maxLength ? 1 : 0; |
| | | } |
| | | |
| | | private int checkVTIntegerValValid(AttributeVO attributeVO, String attrName, String attrVal) { |
| | | VTInteger obj = new VTInteger(Integer.valueOf(attrVal)); |
| | | return !obj.checkRageValueByRage(attributeVO.rage) ? 2 : 0; |
| | | } |
| | | |
| | | private int checkVTLongValValid(AttributeVO attributeVO, String attrName, String attrVal) { |
| | | VTLong obj = new VTLong(Long.valueOf(attrVal)); |
| | | return !obj.checkRageValueByRage(attributeVO.rage) ? 2 : 0; |
| | | } |
| | | |
| | | private int checkVTDoubleValValid(AttributeVO attributeVO, String attrName, String attrVal) { |
| | | VTDouble obj = new VTDouble(Double.valueOf(attrVal)); |
| | | String other = attributeVO.other; |
| | | int maxLength = Integer.valueOf(Tool.getOtherValueByType(other, "length")); |
| | | int length = String.valueOf(attrVal).length() - 1; |
| | | if (length >= maxLength && !obj.checkRageValueByRage(attributeVO.rage)) { |
| | | return 3; |
| | | } else if (!obj.checkRageValueByRage(attributeVO.rage)) { |
| | | return 2; |
| | | } else { |
| | | return length >= maxLength ? 1 : 0; |
| | | } |
| | | }*/ |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.util; |
| | | |
| | | import com.vci.ubcs.code.bo.AttributeValue; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | |
| | | @Data |
| | | public class ClientBusinessObject extends BaseModel { |
| | | |
| | | public AttributeValue[] newAttrValList; |
| | | public AttributeValue[] hisAttrValList; |
| | | |
| | | public void setAttributeValue(String attributeName, String attributeValue) throws VciBaseException { |
| | | this.setAttributeValue(attributeName, attributeValue, false); |
| | | } |
| | | |
| | | public void setAttributeValue(String attributeName, String attributeValue, boolean isCreate) throws VciBaseException { |
| | | int isValid = (new AttributeChecker()).isAttrValValid(attributeName, attributeValue); |
| | | if (isValid == 1) { |
| | | throw getLocalError("P0010SOF-00017", new String[]{attributeName, attributeValue}); |
| | | } else if (isValid == 2) { |
| | | throw this.getLocalError("P0010SOF-00018", new String[]{attributeName, attributeValue}); |
| | | } else if (isValid == 3) { |
| | | throw this.getLocalError("P0010SOF-00019", new String[]{attributeName, attributeValue}); |
| | | } else { |
| | | this.setAttributeValueWithNoCheck(attributeName, attributeValue, isCreate); |
| | | } |
| | | } |
| | | |
| | | public void setAttributeValueWithNoCheck(String attributeName, String attributeValue) throws VciBaseException { |
| | | this.setAttributeValueWithNoCheck(attributeName, attributeValue, false); |
| | | } |
| | | |
| | | public void setAttributeValueWithNoCheck(String attributeName, String attributeValue, boolean isCreate) throws VciBaseException { |
| | | /*if (isCreate) {//&& BusinessConstants.BO_CONSTANTS.containsKey(attributeName.toUpperCase()) |
| | | this.setConstantsAttrVal(attributeName, attributeValue); |
| | | } else {*/ |
| | | AttributeValue[] attrValues = this.newAttrValList; |
| | | ArrayList<AttributeValue> attrValList = new ArrayList(); |
| | | AttributeValue attrVal; |
| | | int i; |
| | | if (attrValues != null && attrValues.length > 0) { |
| | | AttributeValue[] var9 = attrValues; |
| | | i = attrValues.length; |
| | | |
| | | for(int var7 = 0; var7 < i; ++var7) { |
| | | attrVal = var9[var7]; |
| | | attrValList.add(attrVal); |
| | | } |
| | | } |
| | | |
| | | attrVal = null; |
| | | boolean isExist = false; |
| | | |
| | | for(i = 0; i < attrValList.size(); ++i) { |
| | | attrVal = (AttributeValue)attrValList.get(i); |
| | | if (attrVal.attrName.toUpperCase().equals(attributeName.toUpperCase())) { |
| | | attrVal.attrVal = attributeValue; |
| | | isExist = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!isExist) { |
| | | attrVal = new AttributeValue(); |
| | | attrVal.attrName = attributeName.toUpperCase(); |
| | | attrVal.attrVal = attributeValue; |
| | | attrValList.add(attrVal); |
| | | } |
| | | |
| | | this.newAttrValList = (AttributeValue[])attrValList.toArray(new AttributeValue[attrValList.size()]); |
| | | // } |
| | | } |
| | | |
| | | public String getAttributeValue(String attrName) { |
| | | String res = ""; |
| | | boolean existInNewAttr = false; |
| | | int i; |
| | | if (this.newAttrValList != null) { |
| | | for(i = 0; i < this.newAttrValList.length; ++i) { |
| | | if (this.newAttrValList[i].attrName.toUpperCase().equals(attrName.toUpperCase())) { |
| | | existInNewAttr = true; |
| | | res = this.newAttrValList[i].attrVal; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (existInNewAttr) { |
| | | return res; |
| | | } else if (this.hisAttrValList == null) { |
| | | return ""; |
| | | } else { |
| | | for(i = 0; i < this.hisAttrValList.length; ++i) { |
| | | if (this.hisAttrValList[i].attrName.toUpperCase().equals(attrName.toUpperCase())) { |
| | | res = this.hisAttrValList[i].attrVal; |
| | | } |
| | | } |
| | | |
| | | return res; |
| | | } |
| | | } |
| | | |
| | | public VciBaseException getLocalError(String error_code ,String[] error_messages) { |
| | | return new VciBaseException(error_code, error_messages); |
| | | } |
| | | |
| | | } |
| | |
| | | public CodeClassifyTemplateAttrVO entityVO(CodeClassifyTemplateAttr CodeClstempattr) { |
| | | CodeClassifyTemplateAttrVO codeClassifyTemplateAttrVO = Objects.requireNonNull(BeanUtil.copy(CodeClstempattr, CodeClassifyTemplateAttrVO.class)); |
| | | if(StringUtils.isNotBlank(CodeClstempattr.getAttributeDataType())){ |
| | | codeClassifyTemplateAttrVO.setAttributeDataTypeText( EnumCache.getValue(EnumEnum.VCO_FIELD_TYPE,CodeClstempattr.getAttributeDataType())); |
| | | codeClassifyTemplateAttrVO.setAttributeDataTypeText( EnumCache.getValue(EnumEnum.VCI_FIELD_TYPE,CodeClstempattr.getAttributeDataType())); |
| | | } |
| | | return codeClassifyTemplateAttrVO; |
| | | } |
| | |
| | | #æå¡å¨ç«¯å£ |
| | | server: |
| | | port: 36014 |
| | | |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | servlet: |
| | | encoding: |
| | | enabled: true |
| | | charset: UTF-8 |
| | | force: true |
| | | #æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | url: ${ubcs.datasource.mdm.dev.url} |
| | | username: ${ubcs.datasource.mdm.dev.username} |
| | | password: ${ubcs.datasource.mdm.dev.password} |
| | | messages: |
| | | encoding: utf-8 |
| | | basename: i18n/messages |
| | | #å
³é驼峰å½åæ å° |
| | | mybatis-plus: |
| | | configuration: |
| | | map-underscore-to-camel-case: false |
| | | |
| | | |
| | | #mybatis-plus-join: |
| | | # table-alias: |
| | | # table-alias: t |
| | | |
| | | ######åºç¨åºæ¬é
ç½® |
| | | #app: |
| | |
| | | <result property="description" column="DESCRIPTION"/> |
| | | <result property="owner" column="OWNER"/> |
| | | <result property="copyFromVersion" column="COPYFROMVERSION"/> |
| | | <result property="tenantId" column="TENANTID"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectCodeRulePage" resultMap="codeRuleResultMap"> |
| | |
| | | PCR.NAME, |
| | | PCR.DESCRIPTION, |
| | | PCR.OWNER, |
| | | PCR.COPYFROMVERSION |
| | | PCR.COPYFROMVERSION, |
| | | PCR.TENANTID |
| | | FROM PL_CODE_RULE PCR |
| | | <where> |
| | | <if test="codeRule.id != null and codeRule.id != ''"> |
| | |
| | | </foreach> |
| | | </insert> |
| | | |
| | | <insert id="deleteByTaleAndOid" > |
| | | delete from ${tableName} where oid in (${oids}) |
| | | </insert> |
| | | |
| | | <update id="updateBatchByBaseModel" parameterType="java.util.List" > |
| | | BEGIN |
| | | <foreach collection="mapList" item="columnMap" index="index" separator=";"> |
| | |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.ubcs</groupId> |
| | | <artifactId>ubcs-user-api</artifactId> |
| | | <version>3.0.1.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | |
| | | /** |
| | | * å é¤ |
| | | * @param ids 主é®éå |
| | | * @param oid 主é®éå |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "å é¤", notes = "主é®éå") |
| | | public R remove(@ApiParam(value = "主é®éå", required = true) @RequestParam String ids) { |
| | | public R remove(@ApiParam(value = "主é®éå", required = true) @RequestParam String oid) { |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | | return R.status(attributeService.removeAttrs(ids)); |
| | | return attributeService.remove(oid); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.controller; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.omd.dto.RevisionRuleDTO; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Description: çæ¬è§åæ§å¶å¨ |
| | |
| | | @GetMapping("page") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "å页æ¥è¯¢çæ¬è§å",notes = "å页æ¥è¯¢çæ¬è§å") |
| | | public R<IPage<RevisionRuleVO>> page(BaseQueryObject baseQueryObject){ |
| | | return R.data(revisionRuleService.pageQueryVO(baseQueryObject)); |
| | | public R<IPage<RevisionRuleVO>> page(@ApiIgnore @RequestParam Map<String, Object> condition, Query query){ |
| | | return R.data(revisionRuleService.pageQueryVO(condition,query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹",notes = "ä¼ å
¥çæ¬è§å页é¢å¯¹è±¡") |
| | | public R<RevisionRuleVO> submit(@RequestBody RevisionRuleDTO ruleDTO){ |
| | | return R.data(revisionRuleService.addSave(ruleDTO)); |
| | | if (StringUtils.isBlank(ruleDTO.getOid())) { |
| | | return R.data(revisionRuleService.addSave(ruleDTO)); |
| | | }else { |
| | | return R.data(revisionRuleService.editSave(ruleDTO)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.controller; |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.vci.ubcs.omd.entity.Status; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | @GetMapping("page") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "å页æ¥è¯¢ç¶ææ± ",notes = "å页æ¥è¯¢ç¶ææ± ") |
| | | public R<IPage<StatusVO>> page(BaseQueryObject baseQueryObject){ |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | if (conditionMap == null){ |
| | | conditionMap = new HashMap<>(); |
| | | } |
| | | return R.data(statusService.listStatus(conditionMap,baseQueryObject.getPageHelper())); |
| | | public R<IPage<StatusVO>> page(@ApiIgnore @RequestParam Map<String, Object> condition, Query query){ |
| | | return R.data(statusService.listStatus(condition,query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "æ°å¢æä¿®æ¹",notes = "ä¼ å
¥ç¶ææ± 页é¢å¯¹è±¡") |
| | | public R<StatusVO> submit(@RequestBody StatusVO statusVO){ |
| | | return R.data(statusService.addSave(statusVO)); |
| | | if (StringUtils.isBlank(statusVO.getOid())){ |
| | | return R.data(statusService.addSave(statusVO)); |
| | | }else { |
| | | return R.data(statusService.editSave(statusVO)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.wrapper.AttributeWrapper; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | |
| | | condition.put("key",key); |
| | | return R.data(service.list(Condition.getQueryWrapper(condition, Attribute.class).lambda().orderByAsc(Attribute::getId))); |
| | | } |
| | | |
| | | /** |
| | | * æé¢åè·åå
¨é¨å±æ§ |
| | | * |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | @GetMapping(GET_ALL) |
| | | public R<List<AttributeVO>> getAll() { |
| | | List<AttributeVO> voList = AttributeWrapper.build().listEntityVO(service.list()); |
| | | return R.data(voList); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | @GetMapping(GET_DETAIL) |
| | | public R<BtmTypeVO> getDetail(String oid) { |
| | | return R.data(btmTypeService.getAllAttributeByBtmOid(oid)); |
| | | return R.data(btmTypeService.getBtmTypeByOid(oid)); |
| | | } |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vci.ubcs.omd.entity.LinkType; |
| | | import com.vci.ubcs.omd.service.ILinkTypeService; |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.omd.wrapper.LinkTypeWrapper; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.cglib.beans.BeanMap; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Description: 龿¥ç±»åFeignå®ç°ç±» |
| | | * |
| | | * @author LiHang |
| | | * @date 2023/6/13 |
| | | */ |
| | | @ApiIgnore() |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class LinkTypeClient implements ILinkTypeClient{ |
| | | |
| | | private final ILinkTypeService linkTypeService; |
| | | |
| | | private final String DOMAIN = "domain"; |
| | | /** |
| | | * è·å龿¥ç±»å详æ
ä¿¡æ¯ |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return 龿¥ç±»å详æ
ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getDetail(String oid) { |
| | | LinkTypeVO vo = linkTypeService.getLinkTypeByOid(oid); |
| | | return R.data(vo); |
| | | } |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<Page<LinkTypeVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | if (conditionMap == null){ |
| | | conditionMap = new HashMap<>(16); |
| | | } |
| | | if (!conditionMap.containsKey(DOMAIN)){ |
| | | return R.fail("é¢åå¼ä¸è½ä¸ºç©º"); |
| | | } |
| | | PageHelper pageHelper = baseQueryObject.getPageHelper(); |
| | | if (pageHelper == null){ |
| | | pageHelper = new PageHelper(-1); |
| | | } |
| | | String domainValue = conditionMap.get(DOMAIN); |
| | | VciBaseUtil.alertNotNull(domainValue,"é¢åå¼"); |
| | | conditionMap.remove(DOMAIN); |
| | | LinkType queryObj = new LinkType(); |
| | | BeanMap.create(queryObj).putAll(conditionMap); |
| | | Query query = new Query(); |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | IPage<LinkType> page = linkTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(queryObj).lambda().eq(LinkType::getDomain, domainValue).orderByAsc(LinkType::getId)); |
| | | Page<LinkTypeVO> pageVO = new Page<>(); |
| | | BeanUtil.copy(page,pageVO); |
| | | pageVO.setRecords(LinkTypeWrapper.build().listEntityVO(page.getRecords(),null)); |
| | | R<Page<LinkTypeVO>> r = R.data(pageVO); |
| | | r.setSuccess(true); |
| | | return r; |
| | | } |
| | | |
| | | /** |
| | | * åç
§å表æ¥è¯¢ |
| | | * |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶å¯¹è±¡ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public R<List<LinkTypeVO>> getRef(BaseQueryObject baseQueryObject) { |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | if (conditionMap == null){ |
| | | conditionMap = new HashMap<>(16); |
| | | } |
| | | if (!conditionMap.containsKey(DOMAIN)){ |
| | | return R.fail("é¢åå¼ä¸è½ä¸ºç©º"); |
| | | } |
| | | PageHelper pageHelper = baseQueryObject.getPageHelper(); |
| | | if (pageHelper == null){ |
| | | pageHelper = new PageHelper(-1); |
| | | } |
| | | String domainValue = conditionMap.get(DOMAIN); |
| | | VciBaseUtil.alertNotNull(domainValue,"é¢åå¼"); |
| | | conditionMap.remove(DOMAIN); |
| | | LinkType queryObj = new LinkType(); |
| | | BeanMap.create(queryObj).putAll(conditionMap); |
| | | List<LinkType> doList = linkTypeService.list(Condition.getQueryWrapper(queryObj).lambda().eq(LinkType::getDomain, domainValue).orderByAsc(LinkType::getId)); |
| | | return R.data(LinkTypeWrapper.build().listEntityVO(doList,null)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®è±æåç§°æ¹éæ¥è¯¢å¯¹è±¡ |
| | | * |
| | | * @param ids å¯¹è±¡è±æåç§° 使¯ä¸è½è¶
è¿1000 |
| | | * @return ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public R<List<LinkTypeVO>> selectByIdCollection(List<String> ids) { |
| | | Func.requireNotNull(ids,"龿¥ç±»åè±æåç§°"); |
| | | List<LinkTypeVO> voList = LinkTypeWrapper.build().listEntityVO( |
| | | Optional.ofNullable(linkTypeService.list( |
| | | Wrappers.<LinkType>query().lambda().in(LinkType::getId, ids) |
| | | ) |
| | | ).orElseGet(ArrayList::new),null |
| | | ); |
| | | return R.data(voList); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ä¸»é®è·å龿¥ç±»å |
| | | * |
| | | * @param pkLinkTypeCollection 龿¥ç±»å主é®éå |
| | | * @return 龿¥ç±»åå表ï¼å¦ææä¸åå¨çä¸ä¼è¿åï¼å
¨é¨ä¸åå¨çåè¿å空å表 |
| | | */ |
| | | @Override |
| | | public R<List<LinkTypeVO>> listLinkTypeByOidCollection(List<String> pkLinkTypeCollection) { |
| | | Func.requireNotNull(pkLinkTypeCollection,"龿¥ç±»å主é®"); |
| | | List<LinkTypeVO> voList = LinkTypeWrapper.build().listEntityVO( |
| | | Optional.ofNullable(linkTypeService.list( |
| | | Wrappers.<LinkType>query().lambda().in(LinkType::getOid, pkLinkTypeCollection) |
| | | ) |
| | | ).orElseGet(ArrayList::new),null |
| | | ); |
| | | return R.data(voList); |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼åªæé»è®¤å段 |
| | | * |
| | | * @param linkTypeId 龿¥ç±»åID |
| | | * @return é»è®¤åæ®µå±æ§ |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getDefaultAttrByLinkId(String linkTypeId) { |
| | | return R.data(linkTypeService.getLinkTypeDefaultAttrById(linkTypeId)); |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeId 龿¥ç±»åid |
| | | * @return ææå段 |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getAllAttributeByLinkId(String linkTypeId) { |
| | | return R.data(linkTypeService.getLinkTypeAllAttrById(linkTypeId)); |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeOid 龿¥ç±»åä¸»é® |
| | | * @return ææå段 |
| | | */ |
| | | @Override |
| | | public R<LinkTypeVO> getAllAttributeByLinkOid(String linkTypeOid) { |
| | | return R.data(linkTypeService.getLinkTypeAllAttrByOid(linkTypeOid)); |
| | | } |
| | | } |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springframework.cglib.beans.BeanMap; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @GetMapping(GET_REF_PAGE) |
| | | @Override |
| | | public R<IPage<RevisionRuleVO>> getRefPage(BaseQueryObject baseQueryObject) { |
| | | return R.data(service.pageQueryVO(baseQueryObject)); |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | if (conditionMap == null){ |
| | | conditionMap = new HashMap<>(); |
| | | } |
| | | Query query = new Query(); |
| | | query.setSize(baseQueryObject.getLimit()); |
| | | query.setCurrent(baseQueryObject.getPage()); |
| | | Map<String,Object> condition = new HashMap<>(); |
| | | BeanUtil.copy(conditionMap,condition); |
| | | return R.data(service.pageQueryVO(condition,query)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | if (conditionMap == null) { |
| | | conditionMap = new HashMap<>(16); |
| | | } |
| | | return R.data(service.listStatus(conditionMap,baseQueryObject.getPageHelper())); |
| | | Map<String,Object> condition = new HashMap<>(); |
| | | BeanUtil.copy(conditionMap,condition); |
| | | Query query = new Query(); |
| | | query.setCurrent(baseQueryObject.getPage()); |
| | | query.setSize(baseQueryObject.getLimit()); |
| | | return R.data(service.listStatus(condition,query)); |
| | | } |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.ubcs.omd.feign; |
| | | |
| | | import com.vci.ubcs.omd.service.IWebSecretService; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.system.user.vo.UserVO; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | |
| | | /** |
| | | * æä¸¾å®ä¹ Feignå®ç°ç±» |
| | | * |
| | | * @author yuxc |
| | | * @since 2023-05-08 |
| | | */ |
| | | @ApiIgnore() |
| | | @RestController |
| | | @AllArgsConstructor |
| | | public class WebSecretClient implements IWebSecretClient { |
| | | |
| | | IWebSecretService webSecretService; |
| | | |
| | | |
| | | @Override |
| | | public R<Integer> getMinUserSecret() throws VciBaseException { |
| | | return R.data(webSecretService.getMinUserSecret()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getMinDataSecret() throws VciBaseException { |
| | | return R.data(webSecretService.getMinDataSecret()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getMinIpSecret() throws VciBaseException { |
| | | return R.data(webSecretService.getMinIpSecret()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getUserSecret(String userId) throws VciBaseException { |
| | | return R.data(webSecretService.getUserSecret(userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getUserSecret(UserVO userVO) throws VciBaseException { |
| | | return R.data(webSecretService.getUserSecret(userVO)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret) { |
| | | return R.data(webSecretService.checkDataSecret(secret)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret, int userSecret) { |
| | | return R.data(webSecretService.checkDataSecret(secret,userSecret)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret, String userId) throws VciBaseException { |
| | | return R.data(webSecretService.checkDataSecret(secret,userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkDataSecret(int secret, UserVO userVO) { |
| | | return R.data(webSecretService.checkDataSecret(secret,userVO)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Integer> getIpSecret(String ip) throws VciBaseException { |
| | | return R.data(webSecretService.getIpSecret(ip)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(int ipSecret, int userSecret) { |
| | | return R.data(webSecretService.checkIpSecret(ipSecret,userSecret)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(int ipSecret) { |
| | | return R.data(webSecretService.checkIpSecret(ipSecret)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(String ip, String userId) throws VciBaseException { |
| | | return R.data(webSecretService.checkIpSecret(ip,userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R<Boolean> checkIpSecret(String ip, UserVO userVO) { |
| | | return R.data(webSecretService.checkIpSecret(ip,userVO)); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.omd.entity.RevisionRule; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description: çæ¬è§åæ°æ®å± |
| | | * |
| | |
| | | */ |
| | | public interface RevisionRuleMapper extends BaseMapper<RevisionRule> { |
| | | |
| | | /** |
| | | * æç¼å·å¿½ç¥å¤§å°åæ¥è¯¢ |
| | | * @param records è®°å½ |
| | | * @return |
| | | */ |
| | | List<RevisionRule> selectByIdIgnoreCase(Collection<String> records); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.vci.ubcs.omd.entity.Status; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Description: ç¶ææ± æ°æ®å± |
| | | * |
| | |
| | | * @date 2023/5/23 |
| | | */ |
| | | public interface StatusMapper extends BaseMapper<Status> { |
| | | /** |
| | | * 忽ç¥å¤§å°åçæ¥è¯¢ |
| | | * @param records |
| | | * @return |
| | | */ |
| | | List<Status> selectByIdIgnoreCase(Collection<String> records); |
| | | } |
| | |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import org.springblade.core.tool.api.R; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | * @throws VciBaseException ä¸ç¬¦åæ¶æåºå¼å¸¸ |
| | | */ |
| | | boolean checkAttribute(BtmTypeLinkAttributesDTO attributesDTO) throws VciBaseException; |
| | | |
| | | /** |
| | | * å个å é¤ |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | R remove(String oid); |
| | | } |
| | |
| | | import com.vci.ubcs.omd.vo.LinkTypeVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | * @author LiHang |
| | | * @date 2023/5/24 |
| | | */ |
| | | public interface ILinkTypeService extends IService<LinkType> { |
| | | public interface ILinkTypeService extends BaseService<LinkType> { |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åå表 |
| | |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | List<BtmTreeVO> treeDomain(); |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼åªæé»è®¤å段 |
| | | * |
| | | * @param linkTypeId 龿¥ç±»åid |
| | | * @return é»è®¤åæ®µå±æ§ |
| | | */ |
| | | LinkTypeVO getLinkTypeDefaultAttrById(String linkTypeId); |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeId 龿¥ç±»åid |
| | | * @return ææå段 |
| | | */ |
| | | LinkTypeVO getLinkTypeAllAttrById(String linkTypeId); |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeOid 龿¥ç±»åä¸»é® |
| | | * @return ææå段 |
| | | */ |
| | | LinkTypeVO getLinkTypeAllAttrByOid(String linkTypeOid); |
| | | } |
| | |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ |
| | | * @param query å页 |
| | | * @param condition æ¥è¯¢æ¡ä»¶ |
| | | * @return æ¥è¯¢ç»æ |
| | | * @throws VciBaseException æ¥è¯¢åºéæ¶æåºå¼å¸¸ |
| | | */ |
| | | IPage<RevisionRuleVO> pageQueryVO(BaseQueryObject baseQueryObject) throws VciBaseException; |
| | | IPage<RevisionRuleVO> pageQueryVO(Map<String, Object> condition, Query query) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¥çåºç¨èå´ |
| | |
| | | import com.vci.ubcs.omd.entity.Status; |
| | | import com.vci.ubcs.omd.vo.StatusVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import org.springblade.core.mp.support.Query; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | * @return ç¶æå¯¹è±¡å表 |
| | | * @throws VciBaseException æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | IPage<StatusVO> listStatus(Map<String,String> conditionMap, PageHelper pageHelper) throws VciBaseException; |
| | | IPage<StatusVO> listStatus(Map<String, Object> conditionMap, Query pageHelper) throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åç¶æå表 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.service; |
| | | |
| | | import com.vci.ubcs.code.vo.pagemodel.SmUserVO; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.system.user.vo.UserVO; |
| | | |
| | | /** |
| | | * web端çå¯çº§æå¡ |
| | | */ |
| | | public interface IWebSecretService { |
| | | |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§çæå°å¼ |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | int getMinUserSecret() throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åæ°æ®å¯çº§çé»è®¤å¼ |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | int getMinDataSecret() throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åIPå¯çº§çé»è®¤å¼ |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | int getMinIpSecret() throws VciBaseException; |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§ |
| | | * @param userId ç¨æ·ä¸»é® |
| | | * @return ç¨æ·çå¯çº§ |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | int getUserSecret(String userId) throws VciBaseException ; |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§ |
| | | * @param userVO ç¨æ·çæ¾ç¤ºå¯¹è±¡ |
| | | * @return ç¨æ·çå¯çº§ |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | int getUserSecret(UserVO userVO) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¡éªå½åç¨æ·æ¯å¦ææéè®¿é®æ°æ® |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | boolean checkDataSecret(int secret); |
| | | |
| | | /** |
| | | * æ ¡éªç¨æ·çå¯çº§æ¯å¦æ¯å¦ææéè®¿é®æ°æ® |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userSecret ç¨æ·å¯çº§ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | boolean checkDataSecret(int secret, int userSecret) ; |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·åæ¥æ ¡éªæ°æ®å¯çº§ |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userId ç¨æ·å |
| | | * @return true表示å
è®¸è®¿é® |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | boolean checkDataSecret(int secret, String userId) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·å¯¹è±¡æ¥æ ¡éªæ°æ®å¯çº§ |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userVO ç¨æ·çæ¾ç¤ºå¯¹è±¡ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | boolean checkDataSecret(int secret, UserVO userVO) ; |
| | | |
| | | /** |
| | | * è·åIPå°åçå¯çº§ |
| | | * @param ip ipå°å |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | int getIpSecret(String ip) throws VciBaseException; |
| | | /** |
| | | * æ£æ¥æºå¨å¯çº§ |
| | | * @param ipSecret æºå¨å¯çº§ |
| | | * @param userSecret ç¨æ·çå¯çº§ |
| | | * @return å¯çº§çå¼ |
| | | */ |
| | | boolean checkIpSecret(int ipSecret, int userSecret); |
| | | |
| | | /** |
| | | * æ£æ¥å½åç¨æ·æ¯å¦ç¬¦åæºå¨å¯çº§ |
| | | * @param ipSecret æºå¨å¯çº§ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | boolean checkIpSecret(int ipSecret) ; |
| | | |
| | | /** |
| | | * æ ¡éªæå®ipåç¨æ·æ¯å¦ç¬¦åæºå¨å¯çº§ |
| | | * @param ip ipå°å |
| | | * @param userId ç¨æ·å |
| | | * @return true表示å
è®¸è®¿é® |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸åå¨ä¼æåºå¼å¸¸ |
| | | */ |
| | | boolean checkIpSecret(String ip, String userId) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¡éªæå®IPåç¨æ·å¯¹è±¡ç¬¦åæºå¨å¯çº§ |
| | | * @param ip ipå°å |
| | | * @param userVO ç¨æ·å¯¹è±¡ |
| | | * @return true表示å
è®¸è®¿é® |
| | | */ |
| | | boolean checkIpSecret(String ip, UserVO userVO) ; |
| | | } |
| | |
| | | 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.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.vci.ubcs.omd.constant.OmdCacheConstant; |
| | | import com.vci.ubcs.omd.dto.AttributeDTO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.mapper.AttributeMapper; |
| | | import com.vci.ubcs.omd.mapper.BtmTypeMapper; |
| | | import com.vci.ubcs.omd.service.IAttributeService; |
| | | import com.vci.ubcs.omd.vo.AttributeVO; |
| | | import com.vci.ubcs.omd.vo.BtmTypeVO; |
| | |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.tool.constant.BladeConstant; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | |
| | | */ |
| | | @Override |
| | | public boolean submit(AttributeDTO dto) { |
| | | VciBaseUtil.alertNotNull(dto.getId(),"屿§ç¼å·",dto.getName(),"屿§åç§°",dto.getTypeKey(),"屿§ç±»å",dto.getMaxLength(),"屿§é¿åº¦"); |
| | | if (!Pattern.compile(REGEXP).matcher(dto.getId()).matches()){ |
| | | throw new VciBaseException("屿§åç§°{0}åªè½æ¯è±æ",new Object[]{dto.getId()}); |
| | | throw new VciBaseException("屿§ç¼å·{0}åªè½æ¯è±æ",new Object[]{dto.getId()}); |
| | | } |
| | | LambdaQueryWrapper<Attribute> wrapper = Wrappers.<Attribute>query().lambda().eq(Attribute::getId, dto.getId()); |
| | | Long count = baseMapper.selectCount((Func.isEmpty(dto.getOid())) ? wrapper : wrapper.notIn(Attribute::getOid, dto.getOid())); |
| | | if (count > 0L) { |
| | | throw new ServiceException("屿§åå·²åå¨!"); |
| | | throw new ServiceException("屿§ç¼å·å·²åå¨!"); |
| | | } |
| | | Attribute attribute = AttributeWrapper.build().copyBeforeSave(dto); |
| | | CacheUtil.clear(OmdCacheConstant.ATTR_CACHE); |
| | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ids 主é®éå |
| | | * @param oids 主é®éå |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public boolean removeAttrs(String ids) { |
| | | List<Long> idList = Func.toLongList(ids); |
| | | return !deleteLogic(idList) && removeByIds(idList); |
| | | public boolean removeAttrs(String oids) { |
| | | List<String> oidList = Func.toStrList(",", oids); |
| | | List<Attribute> list = list(Wrappers.<Attribute>query().lambda().in(Attribute::getOid, oidList)); |
| | | if (!CollectionUtils.isEmpty(list)){ |
| | | baseMapper.delete(Wrappers.<Attribute>query().lambda().in(Attribute::getOid,list.stream().map(Attribute::getOid).collect(Collectors.toList()))); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return pass; |
| | | } |
| | | |
| | | /** |
| | | * å个å é¤ |
| | | * |
| | | * @param oid ä¸»é® |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public R remove(String oid) { |
| | | List<BtmTypeVO> vos = applyRange(oid); |
| | | if (CollectionUtils.isEmpty(vos)){ |
| | | return R.status(removeAttrs(oid)); |
| | | }else { |
| | | return R.fail("è¯¥å±æ§å·²è¢«ä½¿ç¨ï¼ä¸å
许å é¤"); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.springframework.transaction.support.DefaultTransactionDefinition; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public boolean deleteLogic(@NotEmpty List<Long> ids) { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean changeStatus(@NotEmpty List<Long> ids, Integer status) { |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼åªæé»è®¤å段 |
| | | * |
| | | * @param linkTypeId 龿¥ç±»åid |
| | | * @return é»è®¤åæ®µå±æ§ |
| | | */ |
| | | @Override |
| | | public LinkTypeVO getLinkTypeDefaultAttrById(String linkTypeId) { |
| | | LinkTypeVO vo = getLinkTypeById(linkTypeId); |
| | | List<LinkTypeAttributeVO> attributes = linkTypeAttributeService.getDefaultAttributes(vo); |
| | | vo.setAttributes(attributes); |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeId 龿¥ç±»åid |
| | | * @return ææå段 |
| | | */ |
| | | @Override |
| | | public LinkTypeVO getLinkTypeAllAttrById(String linkTypeId) { |
| | | LinkTypeVO vo = getLinkTypeById(linkTypeId); |
| | | List<LinkTypeAttributeVO> attributes = linkTypeAttributeService.getAllAttributes(vo); |
| | | vo.setAttributes(attributes); |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥ç±»åï¼æææçåæ®µ |
| | | * |
| | | * @param linkTypeOid 龿¥ç±»åä¸»é® |
| | | * @return ææå段 |
| | | */ |
| | | @Override |
| | | public LinkTypeVO getLinkTypeAllAttrByOid(String linkTypeOid) { |
| | | LinkTypeVO vo = getLinkTypeByOid(linkTypeOid); |
| | | List<LinkTypeAttributeVO> attributes = linkTypeAttributeService.getAllAttributes(vo); |
| | | vo.setAttributes(attributes); |
| | | return vo; |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public List<RevisionRuleVO> listRevisionRuleByIdCollection(Collection<String> revisionRuleIdCollection) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(revisionRuleIdCollection,"è±æåç§°éå"); |
| | | // return RevisionRuleWrapper.build().listVO(list(MybatisParameterUtil.cutInParameter(Wrappers.<RevisionRule>query().lambda(),RevisionRule::getId, Collections.singletonList(revisionRuleIdCollection)))); |
| | | List<RevisionRule> list = baseMapper.selectList(Wrappers.<RevisionRule>query().lambda().in(RevisionRule::getId, revisionRuleIdCollection)); |
| | | List<RevisionRule> list = baseMapper.selectByIdIgnoreCase(revisionRuleIdCollection); |
| | | return RevisionRuleWrapper.build().listVO(list); |
| | | } |
| | | |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéæ¶æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public IPage<RevisionRuleVO> pageQueryVO(BaseQueryObject baseQueryObject) throws VciBaseException { |
| | | Map<String, String> conditionMap = baseQueryObject.getConditionMap(); |
| | | if (conditionMap == null){ |
| | | conditionMap = new HashMap<>(); |
| | | } |
| | | PageHelper pageHelper = baseQueryObject.getPageHelper(); |
| | | Query query = new Query(); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setAscs(pageHelper.getSort()); |
| | | RevisionRule queryConditionObj = new RevisionRule(); |
| | | BeanMap beanMap = BeanMap.create(queryConditionObj); |
| | | beanMap.putAll(conditionMap); |
| | | return RevisionRuleWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(queryConditionObj).lambda().orderByAsc(RevisionRule::getId))); |
| | | public IPage<RevisionRuleVO> pageQueryVO(Map<String, Object> condition, Query query) throws VciBaseException { |
| | | return RevisionRuleWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(condition,RevisionRule.class).lambda().orderByAsc(RevisionRule::getId))); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.vci.ubcs.omd.vo.StatusVO; |
| | | import com.vci.ubcs.omd.wrapper.StatusWrapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéæ¶ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public IPage<StatusVO> listStatus(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException { |
| | | Query query = new Query(); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setAscs("id"); |
| | | Status queryVO = new Status(); |
| | | BeanMap.create(queryVO).putAll(conditionMap); |
| | | return StatusWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(query), Condition.getQueryWrapper(queryVO).lambda().orderByAsc(Status::getId))); |
| | | public IPage<StatusVO> listStatus(Map<String, Object> conditionMap, Query pageHelper) throws VciBaseException { |
| | | return StatusWrapper.build().pageVO(baseMapper.selectPage(Condition.getPage(pageHelper), Condition.getQueryWrapper(conditionMap,Status.class).lambda().orderByAsc(Status::getId))); |
| | | } |
| | | |
| | | /** |
| | |
| | | Collection<Collection<String>> idCollections = VciBaseUtil.switchCollectionForOracleIn(idCollection); |
| | | if(!CollectionUtils.isEmpty(idCollections)) { |
| | | idCollections.forEach(s -> { |
| | | List<Status> queryResult = baseMapper.selectList(Wrappers.<Status>query().lambda().in(Status::getId,s)); |
| | | List<Status> queryResult = baseMapper.selectByIdIgnoreCase(s); |
| | | if(!CollectionUtils.isEmpty(queryResult)){ |
| | | statusDOList.addAll(queryResult); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.omd.service.impl; |
| | | |
| | | import com.vci.ubcs.common.utils.CommonUtil; |
| | | import com.vci.ubcs.omd.cache.EnumCache; |
| | | import com.vci.ubcs.omd.service.IWebSecretService; |
| | | import com.vci.ubcs.omd.utils.VciOmdUtil; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.constant.EnumIdConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.DataSecretEnum; |
| | | import com.vci.ubcs.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.KeyValue; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import com.vci.ubcs.system.user.entity.User; |
| | | import com.vci.ubcs.system.user.feign.IUserClient; |
| | | import com.vci.ubcs.system.user.vo.UserVO; |
| | | import net.logstash.logback.encoder.org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.starter.web.constant.FrameWorkBusLangCodeConstant.DATA_ID_NOT_EXIST; |
| | | |
| | | /** |
| | | * å¯çº§çæå¡ |
| | | * @author weidy |
| | | * @date 2021-2-16 |
| | | */ |
| | | @Service |
| | | public class WebSecretServiceImpl implements IWebSecretService { |
| | | |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åæå¡ |
| | | */ |
| | | // @Autowired |
| | | // private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * 屿§ç对象 |
| | | */ |
| | | // @Autowired |
| | | // private WebProperties properties; |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§çæå°å¼ |
| | | * |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int getMinUserSecret() throws VciBaseException { |
| | | List<KeyValue> enumKeyValueList = VciOmdUtil.enumsToListKeyVale(EnumCache.getList(EnumIdConstant.USERSECRET_ENUMNAME)); |
| | | // enumService.getEnum(EnumIdConstant.USERSECRET_ENUMNAME); |
| | | //éæ°è®¾ç½®æä¸¾çå¼ |
| | | if(!CollectionUtils.isEmpty(enumKeyValueList)){ |
| | | List<KeyValue> keyValues = enumKeyValueList.stream().sorted((a, b) -> ((Integer) VciBaseUtil.getInt(a.getKey())).compareTo((Integer) VciBaseUtil.getInt(b.getKey()))).collect(Collectors.toList()); |
| | | for(int i = 0 ; i < keyValues.size() ; i++){ |
| | | KeyValue keyValue = keyValues.get(i); |
| | | if(i ==0){ |
| | | UserSecretEnum.NONE.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | UserSecretEnum.NONE.setText(keyValue.getValue()); |
| | | }else if(i ==1){ |
| | | UserSecretEnum.SECRET.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | UserSecretEnum.SECRET.setText(keyValue.getValue()); |
| | | }else{ |
| | | UserSecretEnum.PRIVACY.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | UserSecretEnum.PRIVACY.setText(keyValue.getValue()); |
| | | } |
| | | } |
| | | } |
| | | return getMinValueInKeyValueList(enumKeyValueList,UserSecretEnum.NONE.getValue()); |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾ä¸çæå°å¼ |
| | | * @param enumKeyValueList æä¸¾K-Vå表 |
| | | * @param minValue æå°å¼ |
| | | * @return æå°å¼ |
| | | */ |
| | | private int getMinValueInKeyValueList( List<KeyValue> enumKeyValueList,int minValue){ |
| | | for(KeyValue ec : enumKeyValueList){ |
| | | int value = VciBaseUtil.getInt(ec.getKey()); |
| | | if(minValue> value){ |
| | | minValue = value; |
| | | } |
| | | } |
| | | return minValue; |
| | | } |
| | | |
| | | /** |
| | | * è·åæ°æ®å¯çº§çé»è®¤å¼ |
| | | * |
| | | * @return æå°å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int getMinDataSecret() throws VciBaseException { |
| | | List<KeyValue> enumKeyValueList = VciOmdUtil.enumsToListKeyVale(EnumCache.getList(EnumIdConstant.DATASECRET_ENUMNAME)); |
| | | //éæ°è®¾ç½®æä¸¾çå¼ |
| | | if(!CollectionUtils.isEmpty(enumKeyValueList)){ |
| | | List<KeyValue> keyValues = enumKeyValueList.stream().sorted((a, b) -> ((Integer) VciBaseUtil.getInt(a.getKey())).compareTo((Integer) VciBaseUtil.getInt(b.getKey()))).collect(Collectors.toList()); |
| | | for(int i = 0 ; i < keyValues.size() ; i++){ |
| | | KeyValue keyValue = keyValues.get(i); |
| | | if(i ==0){ |
| | | DataSecretEnum.NONE.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | DataSecretEnum.NONE.setText(keyValue.getValue()); |
| | | }else if(i ==1){ |
| | | DataSecretEnum.INNER.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | DataSecretEnum.INNER.setText(keyValue.getValue()); |
| | | }else if(i ==2){ |
| | | DataSecretEnum.SECRET.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | DataSecretEnum.SECRET.setText(keyValue.getValue()); |
| | | }else{ |
| | | DataSecretEnum.PRIVACY.setValue(VciBaseUtil.getInt(keyValue.getKey())); |
| | | DataSecretEnum.PRIVACY.setText(keyValue.getValue()); |
| | | } |
| | | } |
| | | } |
| | | return getMinValueInKeyValueList(enumKeyValueList,DataSecretEnum.NONE.getValue()); |
| | | } |
| | | |
| | | /** |
| | | * è·åIPå¯çº§çé»è®¤å¼ |
| | | * |
| | | * @return æå°å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int getMinIpSecret() throws VciBaseException { |
| | | List<KeyValue> enumKeyValueList = VciOmdUtil.enumsToListKeyVale(EnumCache.getList(EnumIdConstant.IPSECRET_ENUMNAME)); |
| | | return getMinValueInKeyValueList(enumKeyValueList,10); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§ |
| | | * |
| | | * @param userId ç¨æ·å |
| | | * @return ç¨æ·å¯çº§çå¼ï¼å¦ææ²¡æå¯çº§ï¼é»è®¤ä¸ºæå°å¯çº§ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int getUserSecret(String userId) throws VciBaseException { |
| | | WebUtil.alertNotNull(userId,"ç¨æ·å"); |
| | | R<User> userR = userClient.userInfoById(Long.valueOf(userId)); |
| | | if(userR.getData() == null){ |
| | | throw new VciBaseException(DATA_ID_NOT_EXIST,new String[]{userId}); |
| | | } |
| | | return userR.getData().getSecretGrade()==null?getMinUserSecret():Integer.parseInt(userR.getData().getSecretGrade()); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·å¯çº§ |
| | | * |
| | | * @param userVO ç¨æ·ç对象 |
| | | * @return å¯çº§ï¼ä¸åå¨çæ¶å为æä½å¯çº§ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int getUserSecret(UserVO userVO) throws VciBaseException { |
| | | if(userVO == null){ |
| | | throw new VciBaseException(DATA_ID_NOT_EXIST,new String[0]); |
| | | } |
| | | return userVO.getSecretGrade()==null?getMinUserSecret(): Integer.valueOf(userVO.getSecretGrade()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¡éªå½åç¨æ·æ¯å¦ææéè®¿é®æ°æ® |
| | | * |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @return true表示å¯ä»¥è®¿é® |
| | | */ |
| | | @Override |
| | | public boolean checkDataSecret(int secret) { |
| | | return checkDataSecret(secret,WebUtil.getCurrentUserSecret()==null?getMinUserSecret():WebUtil.getCurrentUserSecret()); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ°æ®æé |
| | | * @param secret æ°æ®çå¯çº§çå¼ |
| | | * @return æ°æ®å¯çº§ |
| | | */ |
| | | private DataSecretEnum dataSecretForValue(int secret){ |
| | | for(DataSecretEnum de : DataSecretEnum.values()){ |
| | | if(de.getValue() == secret){ |
| | | return de; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * ç¨æ·çå¯çº§ |
| | | * @param userSecret ç¨æ·çå¯çº§ |
| | | * @return å¯çº§ç对象 |
| | | */ |
| | | private UserSecretEnum userSecretForValue(int userSecret){ |
| | | for(UserSecretEnum ue : UserSecretEnum.values()){ |
| | | if(ue.getValue() == userSecret){ |
| | | return ue; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * æ ¡éªç¨æ·çå¯çº§æ¯å¦æ¯å¦ææéè®¿é®æ°æ® |
| | | * |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userSecret ç¨æ·å¯çº§ |
| | | * @return true表示å¯ä»¥è®¿é® |
| | | */ |
| | | @Override |
| | | public boolean checkDataSecret(int secret, int userSecret){ |
| | | //å¯è½è¢«è½¬æ¢äºä¸ |
| | | DataSecretEnum de = dataSecretForValue(secret); |
| | | if(de == null){ |
| | | de = DataSecretEnum.NONE; |
| | | } |
| | | UserSecretEnum ue = userSecretForValue(userSecret); |
| | | if(ue == null){ |
| | | ue = UserSecretEnum.NONE; |
| | | } |
| | | int reaySecret = 0; |
| | | switch (de){ |
| | | case NONE: |
| | | reaySecret=1; |
| | | break; |
| | | case INNER: |
| | | reaySecret = 2; |
| | | break; |
| | | case SECRET: |
| | | reaySecret = 3; |
| | | break; |
| | | default: |
| | | reaySecret = 4; |
| | | break; |
| | | } |
| | | |
| | | int userReaySecret = 0; |
| | | switch (ue){ |
| | | case NONE: |
| | | userReaySecret = 1; |
| | | break; |
| | | case SECRET: |
| | | userReaySecret = 3; |
| | | break; |
| | | default: |
| | | userReaySecret = 4; |
| | | break; |
| | | } |
| | | if(reaySecret> userReaySecret){ |
| | | return false; |
| | | }else{ |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·åæ¥æ ¡éªæ°æ®å¯çº§ |
| | | * |
| | | * @param secret æ°æ®çå¯çº§ |
| | | * @param userId ç¨æ·å |
| | | * @return true表示å¯ä»¥è®¿é® |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public boolean checkDataSecret(int secret, String userId) throws VciBaseException { |
| | | return checkDataSecret(secret,getUserSecret(userId)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·å¯¹è±¡æ¥æ ¡éªæ°æ®å¯çº§ |
| | | * |
| | | * @param secret æ°æ®å¯çº§ |
| | | * @param userVO ç¨æ·ç对象 |
| | | * @return true表示å¯ä»¥è®¿é® |
| | | */ |
| | | @Override |
| | | public boolean checkDataSecret(int secret, UserVO userVO) { |
| | | return checkDataSecret(secret,getUserSecret(userVO)); |
| | | } |
| | | |
| | | /** |
| | | * è·åIPå°åçå¯çº§ ææ¶è¿æªä½¿ç¨ï¼æ°æ®åºè¡¨ä¹è¿æªç§»æ¤ã |
| | | * |
| | | * @param ip ipå°å |
| | | * @return å¯çº§çå¼ |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public int getIpSecret(String ip) throws VciBaseException { |
| | | if(StringUtils.isBlank(ip)){ |
| | | return getMinIpSecret(); |
| | | } |
| | | Map<String,String> conditionMap = new HashMap<String, String>(); |
| | | conditionMap.put("startip",ip.trim()); |
| | | |
| | | // List<ClientBusinessObject> ipCbos = boService.queryCBO(EnumIdConstant.IPSECRET_BTMNAME,conditionMap,null, Arrays.asList(new String[]{"ipsecret"})); |
| | | int ipSecret = 0; |
| | | // if(ipCbos!=null&& ipCbos.size()>0){ |
| | | // ipSecret = WebUtil.getInt(ipCbos.get(0).getAttributeValue("ipsecret")); |
| | | // } |
| | | if(ipSecret == 0){ |
| | | ipSecret = getMinIpSecret(); |
| | | } |
| | | return ipSecret; |
| | | } |
| | | |
| | | /** |
| | | * æ£æ¥æºå¨å¯çº§ |
| | | * |
| | | * @param ipSecret æºå¨å¯çº§ |
| | | * @param userSecret ç¨æ·çå¯çº§ |
| | | * @return trueè¡¨ç¤ºè®¸å¯ |
| | | */ |
| | | @Override |
| | | public boolean checkIpSecret(int ipSecret, int userSecret) { |
| | | if(ipSecret> userSecret){ |
| | | return false; |
| | | }else{ |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ£æ¥å½åç¨æ·æ¯å¦ç¬¦åæºå¨å¯çº§ |
| | | * |
| | | * @param ipSecret æºå¨å¯çº§ |
| | | * @return trueè¡¨ç¤ºè®¸å¯ |
| | | */ |
| | | @Override |
| | | public boolean checkIpSecret(int ipSecret) { |
| | | return checkIpSecret(ipSecret,WebUtil.getCurrentUserSecret()==null?getMinUserSecret():WebUtil.getCurrentUserSecret()); |
| | | } |
| | | |
| | | /** |
| | | * æ ¡éªæå®ipåç¨æ·æ¯å¦ç¬¦åæºå¨å¯çº§ |
| | | * |
| | | * @param ip ipå°å |
| | | * @param userId ç¨æ·å |
| | | * @return trueè¡¨ç¤ºè®¸å¯ |
| | | * @throws VciBaseException æ¥è¯¢åºé伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public boolean checkIpSecret(String ip, String userId) throws VciBaseException { |
| | | return checkIpSecret(getIpSecret(ip),getUserSecret(userId)); |
| | | } |
| | | |
| | | /** |
| | | * æ ¡éªæå®IPåç¨æ·å¯¹è±¡ç¬¦åæºå¨å¯çº§ |
| | | * |
| | | * @param ip ipå°å |
| | | * @param userVO ç¨æ·å¯¹è±¡ |
| | | * @return trueè¡¨ç¤ºè®¸å¯ |
| | | */ |
| | | @Override |
| | | public boolean checkIpSecret(String ip, UserVO userVO) { |
| | | return checkIpSecret(getIpSecret(ip),getUserSecret(userVO)); |
| | | } |
| | | } |
| | |
| | | pl_omd_revision_rule |
| | | </sql> |
| | | |
| | | <select id="selectByIdIgnoreCase" resultMap="BaseResultMap"> |
| | | select <include refid="base_query_column"/> from <include refid="tableName"/> |
| | | where lower(id) in |
| | | <foreach collection="records" item="item" index="arrayindex" open=" ( " close=")" > |
| | | #{item,jdbcType=VARCHAR} |
| | | <if test="(arrayindex != records.size() -1)"> |
| | | , |
| | | </if> |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="id" jdbcType="VARCHAR" property="id" /> |
| | | <result column="name" jdbcType="VARCHAR" property="name" /> |
| | | <result column="description" jdbcType="VARCHAR" property="description" /> |
| | | <result column="btm_name" property="btmname" jdbcType="VARCHAR" /> |
| | | <result column="btm_name" property="btmName" jdbcType="VARCHAR" /> |
| | | <result column="owner" property="owner" jdbcType="VARCHAR" /> |
| | | <result column="creator" jdbcType="VARCHAR" property="creator" /> |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
| | |
| | | pl_omd_status |
| | | </sql> |
| | | |
| | | <select id="selectByIdIgnoreCase" resultMap="BaseResultMap"> |
| | | select <include refid="base_query_column"/> from <include refid="tableName"/> |
| | | where lower(id) in |
| | | <foreach collection="records" item="item" index="arrayindex" open=" ( " close=")" > |
| | | #{item,jdbcType=VARCHAR} |
| | | <if test="(arrayindex != records.size() -1)"> |
| | | , |
| | | </if> |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨æ·å¯ç çç¥å
³è(UserPwdstrategy)表æ§å¶å± |
| | |
| | | import com.vci.ubcs.system.service.ITopMenuSettingService; |
| | | import com.vci.ubcs.system.wrapper.MenuWrapper; |
| | | import lombok.AllArgsConstructor; |
| | | import com.vci.ubcs.core.log.exception.ServiceException; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | </select> |
| | | |
| | | <select id="queryRegex" resultType="java.lang.String"> |
| | | SELECT listagg(psc.REGEX,'],') within group ( order by psc.REGEX) || ']' FROM PL_SYS_COMBINATION psc |
| | | SELECT REPLACE(listagg(psc.REGEX,'],') within group ( order by psc.REGEX) || ']','],[','') FROM PL_SYS_COMBINATION psc |
| | | WHERE psc.ID IN ( |
| | | <foreach collection="combinationIds" item="id" separator=","> |
| | | #{id} |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import com.vci.ubcs.common.cache.CacheNames; |
| | | import org.hibernate.validator.internal.util.logging.Log; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | @RestController |
| | | @RequestMapping |
| | | @AllArgsConstructor |
| | | @lombok.extern.java.Log |
| | | public class UserController { |
| | | |
| | | private final IUserService userService; |
| | |
| | | @ApiOperationSupport(order = 20) |
| | | @ApiOperation(value = "æ¥è¯¢ç¨æ·å¯ç çç¥æ¯å¦éè¦æé", notes = "ä¼ å
¥id") |
| | | public R<Long> checkRenAndExpr(BladeUser user) { |
| | | System.out.println("==============================="+user.getUserId()); |
| | | log.info("==============================="+user.getUserId()); |
| | | Long res = userService.checkRenAndExpr(user.getUserId()); |
| | | return R.data(res); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.vci.ubcs.system.cache.DictCache; |
| | |
| | | } |
| | | //è·åç¨æ·éç¨çå¯ç çç¥ |
| | | Strategy strategy = sysClient.getByUserId(userId).getData(); |
| | | if(ObjectUtil.isEmpty(strategy)) { |
| | | throw new ServiceException("å½åç¨æ·æªåºç¨å¯ç çç¥ï¼"); |
| | | } |
| | | //å¯ç é¿åº¦æ ¡éª |
| | | if(newPassword1.length() < strategy.getMinPwdLen() || newPassword1.length() > strategy.getMaxPwdLen()){ |
| | | throw new ServiceException("å¯ç ä¸å¿
须嫿ã"+strategy.getCombinationNames()+"ãä¸çã"+strategy.getRequiredType()+"ãç§å¯ç ç»åæ¹å¼ï¼ä¸å¯ç é¿åº¦å¿
é¡»å¨ã"+strategy.getMinPwdLen()+"-"+strategy.getMaxPwdLen()+"ãèå´å
"); |
| | |
| | | regex = "^"+regex+"{"+strategy.getRequiredType()+",}$"; |
| | | boolean result = RegexUtil.find(regex, newPassword1); |
| | | if(!result){ |
| | | throw new ServiceException(resException); |
| | | //throw new ServiceException(resException); |
| | | } |
| | | //ä¿®æ¹å¯ç åæ¶ï¼æ¹åç¨æ·ä¿¡æ¯ä¸çå¯ç ä¿®æ¹ç¶æå段,å¯ç ä¿®æ¹æ¶é´ |
| | | return this.update(Wrappers.<User>update().lambda() |
| | |
| | | if(adminUserId.equals(userId)){ |
| | | return 0L; |
| | | } |
| | | QueryWrapper<User> wrapper = Wrappers.<User>query().eq("ID", userId); |
| | | //è·åå°å¯ç ä¿®æ¹æ¶é´ |
| | | Date pwdUpdateTime = this.getOne(Wrappers.<User>query().eq("ID", userId)).getPwdUpdateTime(); |
| | | Date pwdUpdateTime = this.getOne(wrapper).getPwdUpdateTime(); |
| | | Long pwdupdateday = 0L; |
| | | if(!Func.isEmpty(pwdUpdateTime)){ |
| | | pwdupdateday = dateToDay(pwdUpdateTime); |
| | |
| | | List<String> roleName = SysCache.getRoleNames(user.getRoleId()); |
| | | List<String> deptName = SysCache.getDeptNames(user.getDeptId()); |
| | | List<String> postName = SysCache.getPostNames(user.getPostId()); |
| | | userVO.setTenantName(tenant.getTenantName()); |
| | | userVO.setTenantName(tenant==null?"":tenant.getTenantName()); |
| | | userVO.setRoleName(Func.join(roleName)); |
| | | userVO.setDeptName(Func.join(deptName)); |
| | | userVO.setPostName(Func.join(postName)); |
| | |
| | | <result column="post_id" property="postId"/> |
| | | <result column="strategy_name" property="pwdStrategy"/> |
| | | <result column="pwd_update_time" property="pwdUpdateTime"/> |
| | | <result column="secretgrade" property="secretgrade"/> |
| | | <result column="secretgrade" property="secretGrade"/> |
| | | <result column="strategy_update_status" property="strategyUpdateStatus"/> |
| | | </resultMap> |
| | | |
| | |
| | | @GetMapping( "/queryApplyState") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "æ¥çç³è¯·åç¶æ", notes = "æ¥çç³è¯·åç¶æ") |
| | | public R queryApplyState(String oids){ |
| | | public R queryApplyState(String oids){ |
| | | try { |
| | | return groupMdmInterService.queryApplyState(oids); |
| | | }catch (VciBaseException e){ |
| | |
| | | 2023-06-07 19:14:59,835 INFO [background-preinit] o.h.validator.internal.util.Version [Version.java : 21] HV000001: Hibernate Validator 6.2.3.Final |
| | | 2023-06-07 19:15:01,502 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success. |
| | | 2023-06-07 19:15:01,503 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success. |
| | | 2023-06-07 19:15:07,441 WARN [main] c.a.c.n.c.NacosPropertySourceBuilder [NacosPropertySourceBuilder.java : 87] Ignore the empty nacos configuration and get it based on dataId[ubcs-xxljob] & group[DEFAULT_GROUP] |
| | | 2023-06-07 19:15:07,449 WARN [main] c.a.c.n.c.NacosPropertySourceBuilder [NacosPropertySourceBuilder.java : 87] Ignore the empty nacos configuration and get it based on dataId[ubcs-xxljob.yaml] & group[DEFAULT_GROUP] |
| | | 2023-06-07 19:15:07,457 WARN [main] c.a.c.n.c.NacosPropertySourceBuilder [NacosPropertySourceBuilder.java : 87] Ignore the empty nacos configuration and get it based on dataId[ubcs-xxljob-dev.yaml] & group[DEFAULT_GROUP] |
| | | 2023-06-07 19:15:07,458 INFO [main] o.s.c.b.c.PropertySourceBootstrapConfiguration [PropertySourceBootstrapConfiguration.java : 109] Located property source: [BootstrapPropertySource {name='bootstrapProperties-ubcs-xxljob-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs-xxljob.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs-xxljob,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs.yaml,DEFAULT_GROUP'}] |
| | | 2023-06-07 19:15:07,493 INFO [main] c.v.ubcs.job.executor.JobApplication [SpringApplication.java : 640] The following 1 profile is active: "dev" |
| | | 2023-06-07 19:15:10,427 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate [RepositoryConfigurationDelegate.java : 262] Multiple Spring Data modules found, entering strict repository configuration mode |
| | | 2023-06-07 19:15:10,434 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate [RepositoryConfigurationDelegate.java : 132] Bootstrapping Spring Data Redis repositories in DEFAULT mode. |
| | | 2023-06-07 19:15:10,508 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate [RepositoryConfigurationDelegate.java : 201] Finished Spring Data repository scanning in 21 ms. Found 0 Redis repository interfaces. |
| | | 2023-06-07 19:15:11,281 INFO [main] o.s.cloud.context.scope.GenericScope [GenericScope.java : 283] BeanFactory id=8a87525c-4e09-336f-9e65-667cebc7cd92 |
| | | 2023-06-07 19:15:11,287 INFO [main] o.s.c.l.p.BladePropertySourcePostProcessor [BladePropertySourcePostProcessor.java : 150] BladePropertySourcePostProcessor init. |
| | | 2023-06-07 19:15:11,309 INFO [main] o.s.c.l.p.BladePropertySourcePostProcessor [BladePropertySourcePostProcessor.java : 62] BladePropertySourcePostProcessor process @BladePropertySource bean. |
| | | 2023-06-07 19:15:11,378 WARN [main] o.s.c.l.p.BladePropertySourcePostProcessor [BladePropertySourcePostProcessor.java : 67] Not found @BladePropertySource on spring bean class. |
| | | 2023-06-07 19:15:12,036 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'org.springframework.cloud.commons.config.CommonsConfigAutoConfiguration' of type [org.springframework.cloud.commons.config.CommonsConfigAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-07 19:15:12,045 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-07 19:15:12,047 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'loadBalancerClientsDefaultsMappingsProvider' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration$$Lambda$490/1746759758] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-07 19:15:12,055 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'defaultsBindHandlerAdvisor' of type [org.springframework.cloud.commons.config.DefaultsBindHandlerAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-07 19:15:12,169 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'spring.cloud.sentinel-com.alibaba.cloud.sentinel.SentinelProperties' of type [com.alibaba.cloud.sentinel.SentinelProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-07 19:15:12,180 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration' of type [com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-07 19:15:12,945 WARN [main] io.undertow.websockets.jsr [Bootstrap.java : 68] UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used |
| | | 2023-06-07 19:15:13,042 INFO [main] io.undertow.servlet [ServletContextImpl.java : 382] Initializing Spring embedded WebApplicationContext |
| | | 2023-06-07 19:15:13,043 INFO [main] o.s.b.w.s.c.ServletWebServerApplicationContext [ServletWebServerApplicationContext.java : 292] Root WebApplicationContext: initialization completed in 5507 ms |
| | | 2023-06-07 19:15:13,811 INFO [main] c.v.u.j.executor.config.XxlJobConfig [XxlJobConfig.java : 43] >>>>>>>>>>> xxl-job config init. |
| | | 2023-06-07 19:15:13,847 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:shardingJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@11dbcb3b[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#shardingJobHandler] |
| | | 2023-06-07 19:15:13,847 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:commandJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@4aa517c3[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#commandJobHandler] |
| | | 2023-06-07 19:15:13,848 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:httpJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@5f369fc6[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#httpJobHandler] |
| | | 2023-06-07 19:15:13,848 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:demoJobHandler2, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@3a13f663[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#demoJobHandler2] |
| | | 2023-06-07 19:15:13,849 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:demoJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@75de7009[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#demoJobHandler] |
| | | 2023-06-07 19:15:14,729 INFO [main] c.a.c.s.SentinelWebMvcConfigurer [SentinelWebMvcConfigurer.java : 52] [Sentinel Starter] register SentinelWebInterceptor with urlPatterns: [/**]. |
| | | 2023-06-07 19:15:14,882 INFO [main] o.s.c.c.v.BladeRequestMappingHandlerMapping [BladeRequestMappingHandlerMapping.java : 99] Mapped "{ [/error], produces [text/html]}" onto org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse) |
| | | 2023-06-07 19:15:14,883 INFO [main] o.s.c.c.v.BladeRequestMappingHandlerMapping [BladeRequestMappingHandlerMapping.java : 99] Mapped "{ [/error]}" onto org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest) |
| | | 2023-06-07 19:15:14,884 INFO [main] o.s.c.c.v.BladeRequestMappingHandlerMapping [BladeRequestMappingHandlerMapping.java : 99] Mapped "{GET [/test/testRequest]}" onto com.vci.ubcs.job.executor.controller.TestController#testRequest(String) |
| | | 2023-06-07 19:15:18,122 INFO [main] com.alibaba.nacos.client.naming [InitUtils.java : 62] initializer namespace from System Property : null |
| | | 2023-06-07 19:15:18,124 INFO [main] com.alibaba.nacos.client.naming [InitUtils.java : 66] initializer namespace from System Environment :null |
| | | 2023-06-07 19:15:18,125 INFO [main] com.alibaba.nacos.client.naming [InitUtils.java : 73] initializer namespace from System Property :null |
| | | 2023-06-07 19:15:18,155 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success. |
| | | 2023-06-07 19:15:18,156 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success. |
| | | 2023-06-07 19:15:18,181 INFO [main] c.alibaba.nacos.common.remote.client [RpcClientFactory.java : 95] [RpcClientFactory] create a new rpc client of c53356d2-b650-44ab-a874-71e9604bcd4a |
| | | 2023-06-07 19:15:18,182 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] RpcClient init label, labels = {module=naming, source=sdk} |
| | | 2023-06-07 19:15:18,188 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager |
| | | 2023-06-07 19:15:18,190 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService |
| | | 2023-06-07 19:15:18,192 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler |
| | | 2023-06-07 19:15:18,193 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Try to connect to server on start up, server: {serverIp = '127.0.0.1', server main port = 8848} |
| | | 2023-06-07 19:15:18,323 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Success to connect to server [127.0.0.1:8848] on start up, connectionId = 1686136518202_127.0.0.1_61382 |
| | | 2023-06-07 19:15:18,324 INFO [com.alibaba.nacos.client.remote.worker] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Notify connected event to listeners. |
| | | 2023-06-07 19:15:18,326 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler |
| | | 2023-06-07 19:15:18,328 INFO [com.alibaba.nacos.client.remote.worker] com.alibaba.nacos.client.naming [NamingGrpcRedoService.java : 76] Grpc connection connect |
| | | 2023-06-07 19:15:18,328 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$376/1561005241 |
| | | 2023-06-07 19:15:18,962 INFO [main] o.s.b.a.e.web.EndpointLinksResolver [EndpointLinksResolver.java : 58] Exposing 20 endpoint(s) beneath base path '/actuator' |
| | | 2023-06-07 19:15:21,153 INFO [main] o.s.b.f.a.AutowiredAnnotationBeanPostProcessor [AutowiredAnnotationBeanPostProcessor.java : 367] Inconsistent constructor declaration on bean with name 'org.springblade.core.launch.server.ServerInfo': single autowire-marked constructor flagged as optional - this constructor is effectively required since there is no default constructor to fall back to: public org.springblade.core.launch.server.ServerInfo(org.springframework.boot.autoconfigure.web.ServerProperties) |
| | | 2023-06-07 19:15:22,965 WARN [main] o.s.c.l.c.LoadBalancerCacheAutoConfiguration$LoadBalancerCaffeineWarnLogger [LoadBalancerCacheAutoConfiguration.java : 82] Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath. |
| | | 2023-06-07 19:15:23,067 INFO [main] c.x.r.r.p.XxlRpcProviderFactory [XxlRpcProviderFactory.java : 197] >>>>>>>>>>> xxl-rpc, provider factory add service success. serviceKey = com.xxl.job.core.biz.ExecutorBiz, serviceBean = class com.xxl.job.core.biz.impl.ExecutorBizImpl |
| | | 2023-06-07 19:15:23,990 INFO [main] com.alibaba.nacos.client.naming [NamingClientProxyDelegate.java : 141] [SUBSCRIBE-SERVICE] service:ubcs-xxljob, group:DEFAULT_GROUP, clusters:DEFAULT |
| | | 2023-06-07 19:15:24,019 INFO [main] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 181] init new ips(0) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [] |
| | | 2023-06-07 19:15:24,039 INFO [main] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 166] current ips:(0) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [] |
| | | 2023-06-07 19:15:24,085 INFO [main] io.undertow [Undertow.java : 120] starting server: Undertow - 2.2.18.Final |
| | | 2023-06-07 19:15:24,102 INFO [Thread-66] com.xxl.rpc.remoting.net.Server [NettyHttpServer.java : 66] >>>>>>>>>>> xxl-rpc remoting server start success, nettype = com.xxl.rpc.remoting.net.impl.netty_http.server.NettyHttpServer, port = 7018 |
| | | 2023-06-07 19:15:24,113 INFO [main] org.xnio [Xnio.java : 95] XNIO version 3.8.7.Final |
| | | 2023-06-07 19:15:24,147 INFO [main] org.xnio.nio [NioXnio.java : 58] XNIO NIO Implementation Version 3.8.7.Final |
| | | 2023-06-07 19:15:24,265 INFO [main] org.jboss.threads [Version.java : 52] JBoss Threads version 3.1.0.Final |
| | | 2023-06-07 19:15:24,407 INFO [main] o.s.b.w.e.undertow.UndertowWebServer [UndertowWebServer.java : 119] Undertow started on port(s) 36009 (http) |
| | | 2023-06-07 19:15:24,419 INFO [main] com.alibaba.nacos.client.naming [NamingGrpcClientProxy.java : 111] [REGISTER-SERVICE] public registering service ubcs-xxljob with instance Instance{instanceId='null', ip='192.168.237.1', port=36009, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={preserved.register.source=SPRING_CLOUD}} |
| | | 2023-06-07 19:15:24,434 INFO [main] c.a.c.n.r.NacosServiceRegistry [NacosServiceRegistry.java : 75] nacos registry, DEFAULT_GROUP ubcs-xxljob 192.168.237.1:36009 register finished |
| | | 2023-06-07 19:15:24,594 INFO [nacos-grpc-client-executor-127.0.0.1-8] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Receive server push request, request = NotifySubscriberRequest, requestId = 517 |
| | | 2023-06-07 19:15:24,600 INFO [nacos-grpc-client-executor-127.0.0.1-8] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 181] init new ips(1) service: DEFAULT_GROUP@@ubcs-xxljob -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000}] |
| | | 2023-06-07 19:15:24,601 INFO [nacos-grpc-client-executor-127.0.0.1-8] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 166] current ips:(1) service: DEFAULT_GROUP@@ubcs-xxljob -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000}] |
| | | 2023-06-07 19:15:24,611 INFO [nacos-grpc-client-executor-127.0.0.1-8] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [c53356d2-b650-44ab-a874-71e9604bcd4a] Ack server push request, request = NotifySubscriberRequest, requestId = 517 |
| | | 2023-06-07 19:15:25,009 INFO [com.alibaba.nacos.client.naming.updater.0] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 234] new ips(1) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000}] |
| | | 2023-06-07 19:15:25,010 INFO [com.alibaba.nacos.client.naming.updater.0] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 166] current ips:(1) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000}] |
| | | 2023-06-07 19:15:25,264 INFO [main] o.s.core.launch.StartEventListener [StartEventListener.java : 45] ---[UBCS-XXLJOB]---å¯å¨å®æï¼å½å使ç¨ç端å£:[36009]ï¼ç¯å¢åé:[dev]--- |
| | | 2023-06-07 19:15:25,292 INFO [main] c.v.ubcs.job.executor.JobApplication [StartupInfoLogger.java : 61] Started JobApplication in 27.567 seconds (JVM running for 30.289) |
| | | 2023-06-07 19:15:25,301 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 65] nacos.cache.data.init.snapshot = true |
| | | 2023-06-07 19:15:25,303 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-127.0.0.1_8848] [subscribe] ubcs-dev.yaml+DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,306 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-127.0.0.1_8848] [add-listener] ok, tenant=, dataId=ubcs-dev.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-07 19:15:25,307 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-dev.yaml, group=DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,308 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-127.0.0.1_8848] [subscribe] ubcs-xxljob+DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,309 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-127.0.0.1_8848] [add-listener] ok, tenant=, dataId=ubcs-xxljob, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-07 19:15:25,309 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-xxljob, group=DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,312 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-127.0.0.1_8848] [subscribe] ubcs.yaml+DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,312 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-127.0.0.1_8848] [add-listener] ok, tenant=, dataId=ubcs.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-07 19:15:25,313 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs.yaml, group=DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,313 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-127.0.0.1_8848] [subscribe] ubcs-xxljob.yaml+DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,314 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-127.0.0.1_8848] [add-listener] ok, tenant=, dataId=ubcs-xxljob.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-07 19:15:25,314 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-xxljob.yaml, group=DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,315 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-127.0.0.1_8848] [subscribe] ubcs-xxljob-dev.yaml+DEFAULT_GROUP |
| | | 2023-06-07 19:15:25,316 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-127.0.0.1_8848] [add-listener] ok, tenant=, dataId=ubcs-xxljob-dev.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-07 19:15:25,316 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-xxljob-dev.yaml, group=DEFAULT_GROUP |
| | | 2023-06-07 19:15:26,155 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:15:26,156 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:15:27,039 INFO [RMI TCP Connection(8)-192.168.1.46] io.undertow.servlet [ServletContextImpl.java : 382] Initializing Spring DispatcherServlet 'dispatcherServlet' |
| | | 2023-06-07 19:15:27,039 INFO [RMI TCP Connection(8)-192.168.1.46] o.s.web.servlet.DispatcherServlet [FrameworkServlet.java : 525] Initializing Servlet 'dispatcherServlet' |
| | | 2023-06-07 19:15:27,046 INFO [RMI TCP Connection(8)-192.168.1.46] o.s.web.servlet.DispatcherServlet [FrameworkServlet.java : 547] Completed initialization in 6 ms |
| | | 2023-06-07 19:15:38,450 WARN [RMI TCP Connection(9)-192.168.1.46] o.s.b.a.health.HealthEndpointSupport [HealthEndpointSupport.java : 181] Health contributor org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration$AdaptedReactiveHealthContributors$1 (redis) took 11281ms to respond |
| | | 2023-06-07 19:15:58,184 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:15:58,185 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:16:30,224 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:16:30,225 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:17:02,259 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:17:02,260 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:17:34,295 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:17:34,296 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:18:06,330 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:18:06,331 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:18:38,361 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:18:38,362 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:19:10,390 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:19:10,391 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:19:42,430 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:19:42,430 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:20:14,469 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:20:14,470 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:20:46,489 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:20:46,490 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:21:18,520 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:21:18,521 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:21:50,553 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:21:50,557 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:22:22,610 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:22:22,611 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:22:54,671 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:22:54,672 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:23:26,703 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:23:26,703 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:23:58,739 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:23:58,740 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:24:30,792 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:24:30,792 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:25:02,811 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:25:02,812 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:25:34,850 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:25:34,856 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:26:06,891 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:26:06,892 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:26:38,928 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:26:38,929 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:27:10,991 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:27:10,992 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:27:43,027 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:27:43,027 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:28:15,068 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:28:15,069 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:28:47,094 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:28:47,095 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:29:19,129 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:29:19,130 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:29:51,143 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:29:51,145 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:30:23,195 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:30:23,196 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:30:55,225 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:30:55,226 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:31:27,261 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:31:27,261 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:31:59,294 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:31:59,295 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:32:31,317 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:32:31,319 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:33:03,335 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:33:03,336 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:33:35,388 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:33:35,389 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:34:07,423 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:34:07,423 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:34:39,453 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:34:39,453 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:35:11,481 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:35:11,482 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:35:43,523 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:35:43,524 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |
| | | 2023-06-07 19:35:57,923 WARN [Thread-15] c.a.nacos.common.notify.NotifyCenter [NotifyCenter.java : 136] [NotifyCenter] Start destroying Publisher |
| | | 2023-06-07 19:35:57,923 WARN [Thread-6] c.a.n.c.http.HttpClientBeanHolder [HttpClientBeanHolder.java : 108] [HttpClientBeanHolder] Start destroying common HttpClient |
| | | 2023-06-07 19:35:57,925 WARN [Thread-15] c.a.nacos.common.notify.NotifyCenter [NotifyCenter.java : 153] [NotifyCenter] Destruction of the end |
| | | 2023-06-07 19:35:57,942 WARN [Thread-6] c.a.n.c.http.HttpClientBeanHolder [HttpClientBeanHolder.java : 114] [HttpClientBeanHolder] Destruction of the end |
| | | 2023-06-07 19:35:58,131 INFO [SpringApplicationShutdownHook] io.undertow [Undertow.java : 259] stopping server: Undertow - 2.2.18.Final |
| | | 2023-06-07 19:35:58,183 INFO [SpringApplicationShutdownHook] io.undertow.servlet [ServletContextImpl.java : 382] Destroying Spring FrameworkServlet 'dispatcherServlet' |
| | | 2023-06-07 19:35:58,197 ERROR [SpringApplicationShutdownHook] c.a.cloud.nacos.discovery.NacosWatch [NacosWatch.java : 180] namingService unsubscribe failed, properties:NacosDiscoveryProperties{serverAddr='127.0.0.1:8848', username='', password='', endpoint='', namespace='', watchDelay=30000, logName='', service='ubcs-xxljob', weight=1.0, clusterName='DEFAULT', group='DEFAULT_GROUP', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.237.1', networkInterface='', port=36009, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, instanceEnabled=true, ephemeral=true, failureToleranceEnabled=false}, ipDeleteTimeout=null, failFast=true} |
| | | 2023-06-13 19:27:23,203 INFO [background-preinit] o.h.validator.internal.util.Version [Version.java : 21] HV000001: Hibernate Validator 6.2.3.Final |
| | | 2023-06-13 19:27:24,897 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success. |
| | | 2023-06-13 19:27:24,898 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success. |
| | | 2023-06-13 19:27:29,866 WARN [main] c.a.c.n.c.NacosPropertySourceBuilder [NacosPropertySourceBuilder.java : 87] Ignore the empty nacos configuration and get it based on dataId[ubcs-xxljob] & group[DEFAULT_GROUP] |
| | | 2023-06-13 19:27:29,878 WARN [main] c.a.c.n.c.NacosPropertySourceBuilder [NacosPropertySourceBuilder.java : 87] Ignore the empty nacos configuration and get it based on dataId[ubcs-xxljob.yaml] & group[DEFAULT_GROUP] |
| | | 2023-06-13 19:27:29,887 WARN [main] c.a.c.n.c.NacosPropertySourceBuilder [NacosPropertySourceBuilder.java : 87] Ignore the empty nacos configuration and get it based on dataId[ubcs-xxljob-dev.yaml] & group[DEFAULT_GROUP] |
| | | 2023-06-13 19:27:29,889 INFO [main] o.s.c.b.c.PropertySourceBootstrapConfiguration [PropertySourceBootstrapConfiguration.java : 109] Located property source: [BootstrapPropertySource {name='bootstrapProperties-ubcs-xxljob-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs-xxljob.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs-xxljob,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-ubcs.yaml,DEFAULT_GROUP'}] |
| | | 2023-06-13 19:27:29,927 INFO [main] c.v.ubcs.job.executor.JobApplication [SpringApplication.java : 640] The following 1 profile is active: "dev" |
| | | 2023-06-13 19:27:32,955 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate [RepositoryConfigurationDelegate.java : 262] Multiple Spring Data modules found, entering strict repository configuration mode |
| | | 2023-06-13 19:27:32,960 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate [RepositoryConfigurationDelegate.java : 132] Bootstrapping Spring Data Redis repositories in DEFAULT mode. |
| | | 2023-06-13 19:27:33,005 INFO [main] o.s.d.r.c.RepositoryConfigurationDelegate [RepositoryConfigurationDelegate.java : 201] Finished Spring Data repository scanning in 14 ms. Found 0 Redis repository interfaces. |
| | | 2023-06-13 19:27:33,403 INFO [main] o.s.cloud.context.scope.GenericScope [GenericScope.java : 283] BeanFactory id=8a87525c-4e09-336f-9e65-667cebc7cd92 |
| | | 2023-06-13 19:27:33,410 INFO [main] o.s.c.l.p.BladePropertySourcePostProcessor [BladePropertySourcePostProcessor.java : 150] BladePropertySourcePostProcessor init. |
| | | 2023-06-13 19:27:33,444 INFO [main] o.s.c.l.p.BladePropertySourcePostProcessor [BladePropertySourcePostProcessor.java : 62] BladePropertySourcePostProcessor process @BladePropertySource bean. |
| | | 2023-06-13 19:27:33,517 WARN [main] o.s.c.l.p.BladePropertySourcePostProcessor [BladePropertySourcePostProcessor.java : 67] Not found @BladePropertySource on spring bean class. |
| | | 2023-06-13 19:27:34,238 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'org.springframework.cloud.commons.config.CommonsConfigAutoConfiguration' of type [org.springframework.cloud.commons.config.CommonsConfigAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-13 19:27:34,246 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-13 19:27:34,249 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'loadBalancerClientsDefaultsMappingsProvider' of type [org.springframework.cloud.client.loadbalancer.LoadBalancerDefaultMappingsProviderAutoConfiguration$$Lambda$490/381149258] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-13 19:27:34,254 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'defaultsBindHandlerAdvisor' of type [org.springframework.cloud.commons.config.DefaultsBindHandlerAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-13 19:27:34,325 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'spring.cloud.sentinel-com.alibaba.cloud.sentinel.SentinelProperties' of type [com.alibaba.cloud.sentinel.SentinelProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-13 19:27:34,332 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker [PostProcessorRegistrationDelegate.java : 376] Bean 'com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration' of type [com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) |
| | | 2023-06-13 19:27:34,718 WARN [main] io.undertow.websockets.jsr [Bootstrap.java : 68] UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used |
| | | 2023-06-13 19:27:34,765 INFO [main] io.undertow.servlet [ServletContextImpl.java : 382] Initializing Spring embedded WebApplicationContext |
| | | 2023-06-13 19:27:34,765 INFO [main] o.s.b.w.s.c.ServletWebServerApplicationContext [ServletWebServerApplicationContext.java : 292] Root WebApplicationContext: initialization completed in 4797 ms |
| | | 2023-06-13 19:27:35,392 INFO [main] c.v.u.j.executor.config.XxlJobConfig [XxlJobConfig.java : 43] >>>>>>>>>>> xxl-job config init. |
| | | 2023-06-13 19:27:35,469 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:shardingJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@1edac3b4[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#shardingJobHandler] |
| | | 2023-06-13 19:27:35,470 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:commandJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@7641ed02[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#commandJobHandler] |
| | | 2023-06-13 19:27:35,471 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:demoJobHandler2, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@4ebed2b3[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#demoJobHandler2] |
| | | 2023-06-13 19:27:35,478 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:demoJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@11069eac[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#demoJobHandler] |
| | | 2023-06-13 19:27:35,479 INFO [main] c.x.job.core.executor.XxlJobExecutor [XxlJobExecutor.java : 211] >>>>>>>>>>> xxl-job register jobhandler success, name:httpJobHandler, jobHandler:com.xxl.job.core.handler.impl.MethodJobHandler@5909285b[class com.vci.ubcs.job.executor.jobhandler.SampleXxlJob#httpJobHandler] |
| | | 2023-06-13 19:27:36,268 INFO [main] c.a.c.s.SentinelWebMvcConfigurer [SentinelWebMvcConfigurer.java : 52] [Sentinel Starter] register SentinelWebInterceptor with urlPatterns: [/**]. |
| | | 2023-06-13 19:27:36,364 INFO [main] o.s.c.c.v.BladeRequestMappingHandlerMapping [BladeRequestMappingHandlerMapping.java : 99] Mapped "{ [/error], produces [text/html]}" onto org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#errorHtml(HttpServletRequest, HttpServletResponse) |
| | | 2023-06-13 19:27:36,364 INFO [main] o.s.c.c.v.BladeRequestMappingHandlerMapping [BladeRequestMappingHandlerMapping.java : 99] Mapped "{ [/error]}" onto org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController#error(HttpServletRequest) |
| | | 2023-06-13 19:27:36,365 INFO [main] o.s.c.c.v.BladeRequestMappingHandlerMapping [BladeRequestMappingHandlerMapping.java : 99] Mapped "{GET [/test/testRequest]}" onto com.vci.ubcs.job.executor.controller.TestController#testRequest(String) |
| | | 2023-06-13 19:27:38,769 INFO [main] com.alibaba.nacos.client.naming [InitUtils.java : 62] initializer namespace from System Property : null |
| | | 2023-06-13 19:27:38,771 INFO [main] com.alibaba.nacos.client.naming [InitUtils.java : 66] initializer namespace from System Environment :null |
| | | 2023-06-13 19:27:38,772 INFO [main] com.alibaba.nacos.client.naming [InitUtils.java : 73] initializer namespace from System Property :null |
| | | 2023-06-13 19:27:38,800 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success. |
| | | 2023-06-13 19:27:38,801 INFO [main] c.a.n.p.a.s.c.ClientAuthPluginManager [ClientAuthPluginManager.java : 56] [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success. |
| | | 2023-06-13 19:27:38,818 INFO [main] c.alibaba.nacos.common.remote.client [RpcClientFactory.java : 95] [RpcClientFactory] create a new rpc client of 4c02bb09-11a1-4268-a964-ab30e2a46b2a |
| | | 2023-06-13 19:27:38,819 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] RpcClient init label, labels = {module=naming, source=sdk} |
| | | 2023-06-13 19:27:38,823 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager |
| | | 2023-06-13 19:27:38,824 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService |
| | | 2023-06-13 19:27:38,825 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler |
| | | 2023-06-13 19:27:38,826 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Try to connect to server on start up, server: {serverIp = 'localhost', server main port = 8848} |
| | | 2023-06-13 19:27:38,952 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Success to connect to server [localhost:8848] on start up, connectionId = 1686655658836_127.0.0.1_61920 |
| | | 2023-06-13 19:27:38,954 INFO [com.alibaba.nacos.client.remote.worker] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Notify connected event to listeners. |
| | | 2023-06-13 19:27:38,953 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler |
| | | 2023-06-13 19:27:38,956 INFO [com.alibaba.nacos.client.remote.worker] com.alibaba.nacos.client.naming [NamingGrpcRedoService.java : 76] Grpc connection connect |
| | | 2023-06-13 19:27:38,956 INFO [main] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$376/841721161 |
| | | 2023-06-13 19:27:39,271 INFO [main] o.s.b.a.e.web.EndpointLinksResolver [EndpointLinksResolver.java : 58] Exposing 20 endpoint(s) beneath base path '/actuator' |
| | | 2023-06-13 19:27:41,244 INFO [main] o.s.b.f.a.AutowiredAnnotationBeanPostProcessor [AutowiredAnnotationBeanPostProcessor.java : 367] Inconsistent constructor declaration on bean with name 'org.springblade.core.launch.server.ServerInfo': single autowire-marked constructor flagged as optional - this constructor is effectively required since there is no default constructor to fall back to: public org.springblade.core.launch.server.ServerInfo(org.springframework.boot.autoconfigure.web.ServerProperties) |
| | | 2023-06-13 19:27:42,689 WARN [main] o.s.c.l.c.LoadBalancerCacheAutoConfiguration$LoadBalancerCaffeineWarnLogger [LoadBalancerCacheAutoConfiguration.java : 82] Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath. |
| | | 2023-06-13 19:27:42,774 INFO [main] c.x.r.r.p.XxlRpcProviderFactory [XxlRpcProviderFactory.java : 197] >>>>>>>>>>> xxl-rpc, provider factory add service success. serviceKey = com.xxl.job.core.biz.ExecutorBiz, serviceBean = class com.xxl.job.core.biz.impl.ExecutorBizImpl |
| | | 2023-06-13 19:27:43,447 INFO [main] com.alibaba.nacos.client.naming [NamingClientProxyDelegate.java : 141] [SUBSCRIBE-SERVICE] service:ubcs-xxljob, group:DEFAULT_GROUP, clusters:DEFAULT |
| | | 2023-06-13 19:27:43,470 INFO [main] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 181] init new ips(0) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [] |
| | | 2023-06-13 19:27:43,492 INFO [main] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 166] current ips:(0) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [] |
| | | 2023-06-13 19:27:43,515 INFO [Thread-64] com.xxl.rpc.remoting.net.Server [NettyHttpServer.java : 66] >>>>>>>>>>> xxl-rpc remoting server start success, nettype = com.xxl.rpc.remoting.net.impl.netty_http.server.NettyHttpServer, port = 7018 |
| | | 2023-06-13 19:27:43,537 INFO [main] io.undertow [Undertow.java : 120] starting server: Undertow - 2.2.18.Final |
| | | 2023-06-13 19:27:43,554 INFO [main] org.xnio [Xnio.java : 95] XNIO version 3.8.7.Final |
| | | 2023-06-13 19:27:43,579 INFO [main] org.xnio.nio [NioXnio.java : 58] XNIO NIO Implementation Version 3.8.7.Final |
| | | 2023-06-13 19:27:43,652 INFO [main] org.jboss.threads [Version.java : 52] JBoss Threads version 3.1.0.Final |
| | | 2023-06-13 19:27:43,765 INFO [main] o.s.b.w.e.undertow.UndertowWebServer [UndertowWebServer.java : 119] Undertow started on port(s) 36009 (http) |
| | | 2023-06-13 19:27:43,772 INFO [main] com.alibaba.nacos.client.naming [NamingGrpcClientProxy.java : 111] [REGISTER-SERVICE] public registering service ubcs-xxljob with instance Instance{instanceId='null', ip='192.168.237.1', port=36009, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={preserved.register.source=SPRING_CLOUD}} |
| | | 2023-06-13 19:27:43,783 INFO [main] c.a.c.n.r.NacosServiceRegistry [NacosServiceRegistry.java : 75] nacos registry, DEFAULT_GROUP ubcs-xxljob 192.168.237.1:36009 register finished |
| | | 2023-06-13 19:27:44,012 INFO [nacos-grpc-client-executor-localhost-8] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Receive server push request, request = NotifySubscriberRequest, requestId = 1078 |
| | | 2023-06-13 19:27:44,018 INFO [nacos-grpc-client-executor-localhost-8] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 181] init new ips(1) service: DEFAULT_GROUP@@ubcs-xxljob -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000}] |
| | | 2023-06-13 19:27:44,019 INFO [nacos-grpc-client-executor-localhost-8] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 166] current ips:(1) service: DEFAULT_GROUP@@ubcs-xxljob -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000}] |
| | | 2023-06-13 19:27:44,028 INFO [nacos-grpc-client-executor-localhost-8] c.alibaba.nacos.common.remote.client [LoggerUtils.java : 60] [4c02bb09-11a1-4268-a964-ab30e2a46b2a] Ack server push request, request = NotifySubscriberRequest, requestId = 1078 |
| | | 2023-06-13 19:27:44,106 WARN [Thread-17] c.a.nacos.common.notify.NotifyCenter [NotifyCenter.java : 136] [NotifyCenter] Start destroying Publisher |
| | | 2023-06-13 19:27:44,106 WARN [Thread-8] c.a.n.c.http.HttpClientBeanHolder [HttpClientBeanHolder.java : 108] [HttpClientBeanHolder] Start destroying common HttpClient |
| | | 2023-06-13 19:27:44,106 WARN [Thread-17] c.a.nacos.common.notify.NotifyCenter [NotifyCenter.java : 153] [NotifyCenter] Destruction of the end |
| | | 2023-06-13 19:27:44,107 WARN [Thread-8] c.a.n.c.http.HttpClientBeanHolder [HttpClientBeanHolder.java : 114] [HttpClientBeanHolder] Destruction of the end |
| | | 2023-06-13 19:27:44,471 INFO [com.alibaba.nacos.client.naming.updater.0] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 234] new ips(1) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000}] |
| | | 2023-06-13 19:27:44,472 INFO [com.alibaba.nacos.client.naming.updater.0] com.alibaba.nacos.client.naming [ServiceInfoHolder.java : 166] current ips:(1) service: DEFAULT_GROUP@@ubcs-xxljob@@DEFAULT -> [{"ip":"192.168.237.1","port":36009,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@ubcs-xxljob","metadata":{"preserved.register.source":"SPRING_CLOUD"},"ipDeleteTimeout":30000,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000}] |
| | | 2023-06-13 19:27:44,583 INFO [main] o.s.core.launch.StartEventListener [StartEventListener.java : 45] ---[UBCS-XXLJOB]---å¯å¨å®æï¼å½å使ç¨ç端å£:[36009]ï¼ç¯å¢åé:[dev]--- |
| | | 2023-06-13 19:27:44,608 INFO [main] c.v.ubcs.job.executor.JobApplication [StartupInfoLogger.java : 61] Started JobApplication in 23.472 seconds (JVM running for 26.279) |
| | | 2023-06-13 19:27:44,611 INFO [SpringApplicationShutdownHook] io.undertow [Undertow.java : 259] stopping server: Undertow - 2.2.18.Final |
| | | 2023-06-13 19:27:44,615 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 65] nacos.cache.data.init.snapshot = true |
| | | 2023-06-13 19:27:44,617 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-localhost_8848] [subscribe] ubcs-dev.yaml+DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,620 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-localhost_8848] [add-listener] ok, tenant=, dataId=ubcs-dev.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-13 19:27:44,621 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-dev.yaml, group=DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,622 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-localhost_8848] [subscribe] ubcs-xxljob+DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,624 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-localhost_8848] [add-listener] ok, tenant=, dataId=ubcs-xxljob, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-13 19:27:44,624 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-xxljob, group=DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,626 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-localhost_8848] [subscribe] ubcs.yaml+DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,627 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-localhost_8848] [add-listener] ok, tenant=, dataId=ubcs.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-13 19:27:44,628 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs.yaml, group=DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,629 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-localhost_8848] [subscribe] ubcs-xxljob.yaml+DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,629 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-localhost_8848] [add-listener] ok, tenant=, dataId=ubcs-xxljob.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-13 19:27:44,630 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-xxljob.yaml, group=DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,630 INFO [main] c.a.n.c.config.impl.ClientWorker [ClientWorker.java : 373] [fixed-localhost_8848] [subscribe] ubcs-xxljob-dev.yaml+DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,631 INFO [main] c.a.n.client.config.impl.CacheData [CacheData.java : 180] [fixed-localhost_8848] [add-listener] ok, tenant=, dataId=ubcs-xxljob-dev.yaml, group=DEFAULT_GROUP, cnt=1 |
| | | 2023-06-13 19:27:44,631 INFO [main] c.a.c.n.r.NacosContextRefresher [NacosContextRefresher.java : 105] listening config: dataId=ubcs-xxljob-dev.yaml, group=DEFAULT_GROUP |
| | | 2023-06-13 19:27:44,636 ERROR [SpringApplicationShutdownHook] c.a.cloud.nacos.discovery.NacosWatch [NacosWatch.java : 180] namingService unsubscribe failed, properties:NacosDiscoveryProperties{serverAddr='localhost:8848', username='', password='', endpoint='', namespace='', watchDelay=30000, logName='', service='ubcs-xxljob', weight=1.0, clusterName='DEFAULT', group='DEFAULT_GROUP', namingLoadCacheAtStart='false', metadata={preserved.register.source=SPRING_CLOUD}, registerEnabled=true, ip='192.168.237.1', networkInterface='', port=36009, secure=false, accessKey='', secretKey='', heartBeatInterval=null, heartBeatTimeout=null, ipDeleteTimeout=null, instanceEnabled=true, ephemeral=true, failureToleranceEnabled=false}, ipDeleteTimeout=null, failFast=true} |
| | | java.lang.IllegalStateException: UT015023: This Context has been already destroyed |
| | | at io.undertow.servlet.spec.ServletContextImpl.getDeploymentInfo(ServletContextImpl.java:211) |
| | | at io.undertow.servlet.spec.ServletContextImpl.getInitParameterNames(ServletContextImpl.java:449) |
| | |
| | | at java.lang.Iterable.forEach(Iterable.java:75) |
| | | at org.springframework.boot.SpringApplicationShutdownHook.run(SpringApplicationShutdownHook.java:114) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-07 19:35:58,206 INFO [Thread-66] com.xxl.rpc.remoting.net.Server [NettyHttpServer.java : 74] >>>>>>>>>>> xxl-rpc remoting server stop. |
| | | 2023-06-13 19:27:44,638 INFO [Thread-64] com.xxl.rpc.remoting.net.Server [NettyHttpServer.java : 74] >>>>>>>>>>> xxl-rpc remoting server stop. |
| | | 2023-06-13 19:27:45,580 ERROR [xxl-job, executor ExecutorRegistryThread] c.x.job.core.util.XxlJobRemotingUtil [XxlJobRemotingUtil.java : 146] Connection refused: connect |
| | | java.net.ConnectException: Connection refused: connect |
| | | at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) |
| | | at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81) |
| | | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476) |
| | | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218) |
| | | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200) |
| | | at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162) |
| | | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394) |
| | | at java.net.Socket.connect(Socket.java:606) |
| | | at sun.net.NetworkClient.doConnect(NetworkClient.java:175) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) |
| | | at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) |
| | | at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:339) |
| | | at sun.net.www.http.HttpClient.New(HttpClient.java:357) |
| | | at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) |
| | | at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) |
| | | at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) |
| | | at com.xxl.job.core.util.XxlJobRemotingUtil.postBody(XxlJobRemotingUtil.java:94) |
| | | at com.xxl.job.core.biz.client.AdminBizClient.registry(AdminBizClient.java:41) |
| | | at com.xxl.job.core.thread.ExecutorRegistryThread$1.run(ExecutorRegistryThread.java:48) |
| | | at java.lang.Thread.run(Thread.java:748) |
| | | 2023-06-13 19:27:45,581 INFO [xxl-job, executor ExecutorRegistryThread] c.x.j.c.t.ExecutorRegistryThread [ExecutorRegistryThread.java : 54] >>>>>>>>>>> xxl-job registry fail, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='blade-xxljob', registryValue='127.0.0.1:7018'}, registryResult:ReturnT [code=500, msg=xxl-rpc remoting error(Connection refused: connect), for url : http://127.0.0.1:37012/xxl-job-admin/api/registry, content=null] |