Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridDockingData', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | size |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridLoge', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | size |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridDockingTask', |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | page, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const sendData = (oid) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/sendData', |
| | | method: 'post', |
| | | data: oid |
| | | }) |
| | | } |
| | |
| | | data
|
| | | })
|
| | | }
|
| | | // ä¿®æ¹
|
| | | export const edit = (data) => {
|
| | | return request({
|
| | | url: '/api/ubcs-omd/lifeCycle/edit-save',
|
| | | method: 'put',
|
| | | data
|
| | | })
|
| | | }
|
| | | export const detail = (params) => {
|
| | | return request({
|
| | | url: '/api/ubcs-omd/lifeCycle/detail',
|
| | |
| | | params
|
| | | })
|
| | | }
|
| | | // å é¤
|
| | | export const del = (data, isBatch) => {
|
| | | let url = '/api/ubcs-omd/lifeCycle/remove'
|
| | | if (isBatch) {
|
| | | url = '/api/ubcs-omd/lifeCycle/batch-remove'
|
| | | }
|
| | | return request({
|
| | | url,
|
| | | method: 'post',
|
| | | data
|
| | | })
|
| | | }
|
| | | export default {
|
| | | getList,
|
| | | add,
|
| | | detail
|
| | | detail,
|
| | | del,
|
| | | edit
|
| | | }
|
| | |
| | | border
|
| | | :data="tab1Table"
|
| | | style="width: 100%"
|
| | | height="400px"
|
| | | height="40vh"
|
| | | highlight-current-row
|
| | | @current-change="resembleRowChange"
|
| | | @selection-change="tab1TableSelectChange"
|
| | | v-if="cloNamesList.length > 1"
|
| | | v-loading="tab1Loading"
|
| | | >
|
| | | <el-table-column
|
| | | v-if="type !== 'batchApplyCode'"
|
| | |
| | | border
|
| | | :data="currentSelectedResemble"
|
| | | style="width: 100%"
|
| | | height="200px"
|
| | | height="20vh"
|
| | | v-loading="tab1BottomTableLoading"
|
| | | >
|
| | | <el-table-column
|
| | | v-for="item in resembleColumList"
|
| | |
| | | <el-tab-pane :label="tab2Name" name="tab2">
|
| | | <el-table
|
| | | border
|
| | | v-loading="tab2Loading"
|
| | | :data="tab2Table"
|
| | | :height="
|
| | | type === 'batchApplyCode' && tab2Table.length > 0
|
| | | ? '400px'
|
| | | : '700px'
|
| | | "
|
| | | height="60vh"
|
| | | >
|
| | | <el-table-column
|
| | | v-for="item in successTableColumns"
|
| | |
| | | </div>
|
| | | <template #footer>
|
| | | <div>
|
| | | <el-button size="small" type="primary" @click="submit"
|
| | | <el-button size="small" type="primary" @click="submit" :loading="submitLoading"
|
| | | >ç¡®å®å¯¼å
¥</el-button
|
| | | >
|
| | | <el-button size="small" @click="dialogVisible = false">åæ¶</el-button>
|
| | |
| | | },
|
| | | batchApplyCodeTableData: {},
|
| | | savedList: [],
|
| | | tab1Loading: false,
|
| | | tab2Loading: false,
|
| | | tab1BottomTableLoading: false,
|
| | | submitLoading: false
|
| | | };
|
| | | },
|
| | |
|
| | |
| | | this.localCodeClassifyOid = data.codeClassifyOid;
|
| | | this.cloNamesList = data.cloNamesList;
|
| | | this.templateOid = data.oid;
|
| | | this.tab1Loading = true
|
| | | getResembleTable({
|
| | | codeClassifyOid:
|
| | | this.type === "batchApplyCode" ? data.codeRuleOid : this.templateOid,
|
| | | redisOid: this.redisOid + "-resemble",
|
| | | }).then((res) => {
|
| | | this.tab1Loading = false
|
| | | this.tab1Table = res.data.data.filter(
|
| | | (item) => !this.savedList.includes(item.oid)
|
| | | );
|
| | |
| | | this.tab1Table;
|
| | | }
|
| | | });
|
| | | this.tab2Loading = true
|
| | | // è·åæ£ç¡®æ°æ®
|
| | | getSuccessTable({
|
| | | codeClassifyOid:
|
| | | this.type === "batchApplyCode" ? data.codeRuleOid : this.templateOid,
|
| | | redisOid: this.redisOid + "-ok",
|
| | | }).then((res) => {
|
| | | this.tab2Loading = false
|
| | | this.tab2Table = res.data.data;
|
| | | if (this.tab2Table.length > 0 && this.type === "batchApplyCode") {
|
| | | this.batchApplyCodeTableData[data.codeRuleOid]["codeApply"] = {};
|
| | |
| | | if (!row || !row.oid) {
|
| | | return;
|
| | | }
|
| | | this.tab1BottomTableLoading = true
|
| | | getCurretnSelectedRowResemble({
|
| | | redisOid: this.redisOid + "-resemble-data",
|
| | | dataOid: row.oid,
|
| | | }).then((res) => {
|
| | | this.tab1BottomTableLoading = false
|
| | | this.currentSelectedResemble = res.data.data;
|
| | | });
|
| | | },
|
| | |
| | | },
|
| | | ];
|
| | | }
|
| | | this.submitLoading = true
|
| | | submitHistoryimport(params).then((res) => {
|
| | | console.log(res);
|
| | | this.submitLoading = false
|
| | | console.log(res);
|
| | | if (res.data.code === 200) {
|
| | | this.$message.success(res.data.msg);
|
| | | } else {
|
| | | this.$message.error(res.data.msg);
|
| | | }
|
| | | });
|
| | | },
|
| | |
| | | }
|
| | | }
|
| | | .right {
|
| | | transition: all 0.5s;
|
| | | margin-left: 20px;
|
| | | margin-top: 30px;
|
| | | }
|
| | |
| | | if (uniqueFlag === 'CODEEDIT') return this.editHandler() |
| | | if (uniqueFlag === 'CODEBATCHADD') return this.openBatchImport('batchImportApply') |
| | | if (uniqueFlag === 'CODEIMPORTHISTORY') return this.openBatchImport('historyImport') |
| | | if (uniqueFlag === 'batchApplyCode') return this.openBatchImport('batchApplyCode') |
| | | // æ¹éç³è¯·ç¼ç |
| | | // if(uniqueFlag === 'CODEEDIT') return this.openBatchImport('batchApplyCode') |
| | | if (uniqueFlag === 'CODESTARTPROCESS') return this.setHandler() |
| | |
| | | await TableData({ |
| | | templateOid: this.templateOid, |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | page: val.currentPage, |
| | | limit: val.pageSize, |
| | | page: this.page.currentPage, |
| | | limit: this.page.pageSize, |
| | | }).then((res) => { |
| | | this.data = res.data.data; |
| | | this.tableData = res.data.data; |
| | | }); |
| | | }, |
| | | //å¤é |
| | |
| | | console.log(val) |
| | | addSaveCode(val).then(res=>{ |
| | | console.log(res) |
| | | this.onLoad() |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |
| | | }) |
| | | }, |
| | | EditSumbit(val) { |
| | | this.editvisible = false; |
| | | console.log(val) |
| | | editSaveCode(val).then(res=>{ |
| | | console.log(res) |
| | | this.onLoad() |
| | | editSaveCode(val).then(res=>{ |
| | | console.log(res) |
| | | this.$nextTick(() => { |
| | | this.onLoad() |
| | | }) |
| | | }) |
| | | }, |
| | | openBatchImport(type) { |
| | |
| | | const { defaultValue, formValue } = this.getDefaultValueAndFormValues( |
| | | this.form |
| | | ); |
| | | const noData = [ |
| | | "jiliangdwname", |
| | | "materialtypeText", |
| | | "morengongysname", |
| | | "$caigouwl", |
| | | "$xiaoshouwl", |
| | | "$shifoupihaoguanli", |
| | | "lcstatus_text", |
| | | "hesuanfenleiname", |
| | | "$kucunwl", |
| | | ]; |
| | | noData.forEach((item) => { |
| | | this.$delete(formValue, item); |
| | | }); |
| | | resForm.data = formValue; |
| | | resForm = Object.assign({}, resForm, defaultValue); |
| | | resForm.secDTOList = []; |
| | |
| | | let resForm = {}; |
| | | const { defaultValue, formValue } = |
| | | this.getDefaultValueAndFormValues(this.form); |
| | | noData.forEach(item => { |
| | | if (formValue[item]) { |
| | | this.$delete(formValue, item) |
| | | } |
| | | }) |
| | | noData.forEach((item) => { |
| | | this.$delete(formValue, item); |
| | | }); |
| | | resForm.data = formValue; |
| | | resForm = Object.assign({}, resForm, defaultValue); |
| | | resForm.secDTOList = this.secVOList.map((item) => { |
| | |
| | | resForm.codeClassifyOid = this.codeClassifyOid; |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | console.log(resForm, 'ddd'); |
| | | this.$emit("submit", resForm); |
| | | }) |
| | | .catch(() => {}); |
| | |
| | | simOid:"", |
| | | btmName:"", |
| | | btmOid:"", |
| | | btmId:"", |
| | | masterInput:'', |
| | | MasterSearchSelects:"", |
| | | masterData:[], |
| | |
| | | }, |
| | | { |
| | | label:"ç¼ç è§å", |
| | | prop:"coderuleoidName", |
| | | prop:"codeRuleOidName", |
| | | labelWidth:128, |
| | | disabled: true, |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label:"ç¼ç è§å", |
| | | prop:"coderuleoidName", |
| | | prop:"codeRuleOidName", |
| | | labelWidth:128, |
| | | focus:this.CodeFoucus, |
| | | readonly: true, |
| | |
| | | } |
| | | }, |
| | | watch:{ |
| | | nodeClickList:{ |
| | | handler(newval,oldval){ |
| | | console.log('newVal',newval,oldval) |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | }, |
| | | TreeFlag:{ |
| | | handler(newval,oldval){ |
| | | console.log('æ ç¶æ',newval,oldval) |
| | | }, |
| | | deep:true, |
| | | immediate:true |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | submits(form,done){ |
| | | TreeEditSave(this.loneTreeNewForm).then(res=>{ |
| | | this.$message.success('ä¿®æ¹æå'); |
| | | this.Editclose() |
| | | this.$emit('referTreeForm'); |
| | | this.$emit('flushed'); |
| | | done() |
| | | }) |
| | | if(this.TreeFlag){ |
| | | TreeEditSave(this.loneTreeNewForm).then(res=>{ |
| | | this.$message.success('ä¿®æ¹æå'); |
| | | this.Editclose() |
| | | this.$emit('referTreeForm'); |
| | | this.$emit('flushed'); |
| | | done() |
| | | }) |
| | | }else { |
| | | this.loneTreeNewForm.btmTypeName=''; |
| | | this.loneTreeNewForm.btmTypeId=''; |
| | | TreeEditSave(this.loneTreeNewForm).then(res=>{ |
| | | this.$message.success('ä¿®æ¹æå'); |
| | | this.Editclose() |
| | | this.$emit('referTreeForm'); |
| | | this.$emit('flushed'); |
| | | done() |
| | | }) |
| | | } |
| | | }, |
| | | error(err) { |
| | | this.$message.success('请æ¥çæ§å¶å°'); |
| | | console.log(err) |
| | | this.$message.success(err); |
| | | }, |
| | | //ç¼ç è§åæ¥è¯¢ |
| | | SelectFindeHandler(){ |
| | |
| | | }else { |
| | | this.MasterdialogVisible=false; |
| | | this.masterSelectList=[] |
| | | this.$set(this.loneTreeNewForm,'coderuleoidName',this.masterName) |
| | | this.$set(this.loneTreeNewForm,'coderuleoid',this.masterOid) |
| | | this.$set(this.loneTreeNewForm,'codeRuleOidName',this.masterName) |
| | | this.$set(this.loneTreeNewForm,'codeRuleOid',this.masterOid) |
| | | this.$emit('MasterHandler',this.loneTreeNewForm) |
| | | // console.log(this.loneTreeNewForm) |
| | | } |
| | | }, |
| | | //ç¼ç å¤é |
| | |
| | | this.masterSelectList=row; |
| | | this.masterName=row[0].name; |
| | | this.masterOid=row[0].oid; |
| | | // console.log('oid',this.oid) |
| | | }, |
| | | //ç¼ç æ¥å£ |
| | | MasterdefaultRend(masterParameter){ |
| | |
| | | this.$set(this.loneTreeNewForm,'codekeyattrrepeatoidName',this.KeyName) |
| | | this.$set(this.loneTreeNewForm,'codekeyattrrepeatoid',this.KeyOid) |
| | | this.$emit('MasterHandler',this.loneTreeNewForm) |
| | | console.log(this.loneTreeNewForm) |
| | | } |
| | | }, |
| | | //å
³é®å±æ§æ¥è¯¢ |
| | |
| | | 'conditionMap[name]':this.SelectFInd |
| | | } |
| | | this.KeydefaultRend(masterParameter) |
| | | this.SelectValue="" |
| | | this.SelectFInd="" |
| | | this.SelectValue=""; |
| | | this.SelectFInd=""; |
| | | } |
| | | }, |
| | | //å
³é®å±æ§æ¥å£ |
| | |
| | | this.simSelectList=row; |
| | | this.simName=row[0].name; |
| | | this.simOid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | }, |
| | | //ç¸ä¼¼é¡¹é¡¹æ¥å£ |
| | | simdefaultRend(){ |
| | |
| | | this.BtmdialogVisible=false; |
| | | this.btmSelectList=[] |
| | | this.$set(this.loneTreeNewForm,'btmTypeName',this.btmName ||this.btmOid) |
| | | this.$set(this.loneTreeNewForm,'btmTypeid',this.btmOid) |
| | | this.$set(this.loneTreeNewForm,'btmTypeId',this.btmId) |
| | | this.$emit('MasterHandler',this.loneTreeNewForm) |
| | | } |
| | | }, |
| | |
| | | this.btmSelectList=row; |
| | | this.btmName=row[0].name; |
| | | this.btmOid=row[0].oid; |
| | | this.btmId=row[0].id; |
| | | }, |
| | | //ä¸å¡ç±»åæ¥å£ |
| | | btmdefaultRend(masterParameter){ |
| | | referDataGrid({valueField:'id',isMuti:'false',...masterParameter}).then(res=>{ |
| | | // console.log(res) |
| | | this.BtmData=res.data.data.records |
| | | }) |
| | | } |
| | |
| | | this.$set(this.TreeAddform,'codeRuleOidName',this.masterName) |
| | | this.$set(this.TreeAddform,'codeRuleOid',this.masterOid) |
| | | this.$emit('MasterHandler',this.loneTreeNewForm) |
| | | console.log(this.loneTreeNewForm) |
| | | } |
| | | }, |
| | | //ç¼ç æ¥å£ |
| | |
| | | this.KeySelectLIst=[] |
| | | this.$set(this.TreeAddform,'codeKeyAttrRepeatOidName',this.KeyName) |
| | | this.$set(this.TreeAddform,'codeKeyAttrRepeatOid',this.KeyOid) |
| | | console.log(this.TreeAddform) |
| | | } |
| | | }, |
| | | //å
³é®å±æ§æ¥è¯¢ |
| | |
| | | this.simSelectList=row; |
| | | this.simName=row[0].name; |
| | | this.simOid=row[0].oid; |
| | | console.log('oid',this.oid) |
| | | }, |
| | | //ç¸ä¼¼é¡¹é¡¹æ¥å£ |
| | | simdefaultRend(){ |
| | |
| | | const data = this.TreeAddform; |
| | | // data.btmtypename= this.TreeList.btmtypename |
| | | this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid); |
| | | console.log("data", data); |
| | | TreeSave(data) |
| | | .then(() => { |
| | | this.$message({ |
| | |
| | | }); |
| | | } else { |
| | | this.TreeEditFormVisible = true; |
| | | console.log(this.TreeList) |
| | | } |
| | | }, |
| | | //æ å·æ° |
| | |
| | | this.codeClassifyOid = item.codeclassifyoid |
| | | return item.codeclassifyoid == this.nodeClickList.oid |
| | | } |
| | | console.log('Formlist',this.Formlist) |
| | | }) |
| | | }).catch(res => { |
| | | this.$message.error(res) |
| | |
| | | }); |
| | | }) |
| | | } |
| | | console.log('123',this.codeClassifyOid) |
| | | }, |
| | | //模æ¿ç®¡çä¿®æ¹ |
| | | CrudRowUpdata(row,index,done) { |
| | |
| | | download(data) |
| | | }else{ |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®");x |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | data.append('fileOids',this.oids) |
| | |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-model.trim="newRowData.name" :maxLength="20" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="æ ç¾" prop="id"> |
| | | <el-form-item label="ç¼å·" prop="id"> |
| | | <el-input v-model.trim="newRowData.id" clearable /> |
| | | </el-form-item> |
| | | <el-form-item label="èµ·å§ç¶æ" prop="startStatus"> |
| | | <el-select |
| | | v-model="newRowData.startStatus" |
| | | placeholder="è¯·éæ©èµ·å§ç¶æ" |
| | | :disabled="type === 'edit'" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | |
| | | <group-panel :status="status"> |
| | | <detail-form type="group" /> |
| | | </group-panel> |
| | | <multi-panel :status="status" /> |
| | | <canvas-panel :status="status" /> |
| | | <node-panel :status="status"> |
| | | <div class="event"> |
| | | <hr /> |
| | | <div class="btn_box"> |
| | | <el-button type="primary" size="mini">æ°å¢</el-button> |
| | | <el-button type="danger" size="mini">å é¤</el-button> |
| | | <el-button type="primary" size="mini">ä¿å</el-button> |
| | | </div> |
| | | <div class="flex" v-for="(item, index) in eventList" :key="index" :class="{active: index === currentActive}"> |
| | | <el-select size="mini" style="width: 70%" v-if="item.isEdit"> |
| | | <el-option></el-option> |
| | | </el-select> |
| | | <span v-else style="width: 70%">{{item.evenName}}</span> |
| | | <el-button size="mini" type="text" class="red">å é¤</el-button> |
| | | <el-button size="mini" type="text" @click="editChange(item)">{{item.isEdit ? 'æå' : 'ç¼è¾'}}</el-button> |
| | | </div> |
| | | </div> |
| | | </node-panel> |
| | | |
| | | <!-- <multi-panel :status="status" /> --> |
| | | <!-- <canvas-panel :status="status" /> --> |
| | | </template> |
| | | </detail-panel> |
| | | </div> |
| | |
| | | DetailPanel, |
| | | DetailForm, |
| | | }, |
| | | props: ["rowData", "existNodes"], |
| | | props: ["rowData", "existNodes", "type"], |
| | | data() { |
| | | return { |
| | | newRowData: { |
| | | startStatus: undefined, |
| | | name: undefined, |
| | | id: undefined, |
| | | remark: undefined |
| | | remark: undefined, |
| | | }, |
| | | rules: { |
| | | name: [{ required: true, message: "åç§°ä¸è½ä¸ºç©º", trigger: "blur" }], |
| | | id: [ |
| | | { required: true, message: "æ ç¾ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | { pattern: /^[A-z]+$/g, message: "æ ç¾åªè½è¾å
¥è±æ", trigger: "blur" } |
| | | { |
| | | pattern: /^[A-z]+$/g, |
| | | message: "æ ç¾åªè½è¾å
¥è±æ", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | startStatus: [ |
| | | { required: true, message: "èµ·å§ç¶æä¸è½ä¸ºç©º", trigger: "change" }, |
| | | ], |
| | | }, |
| | | eventList: [{evenName: '123123'}], |
| | | currentActive: 0 |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | editChange(row) { |
| | | this.$set(row, 'isEdit', !row.isEdit) |
| | | } |
| | | }, |
| | | watch: { |
| | | rowData: { |
| | |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .event { |
| | | margin-top: 20px; |
| | | text-align: center; |
| | | } |
| | | .flex { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .red { |
| | | color: red; |
| | | } |
| | | .active { |
| | | box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4) |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="vfe-chart-panel" v-if="type !== 'detail'"> |
| | | <div class="vfe-chart-panel-detail"> |
| | | <editor-detail-panel :rowData="rowData" ref="EditorDetailPanel" :existNodes="existNodes"/> |
| | | <editor-detail-panel :rowData="rowData" ref="EditorDetailPanel" :existNodes="existNodes" :type="type"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | tooltipShow: true, |
| | | tooltipData: [], |
| | | existNodes: [] |
| | | existNodes: this.chartData.nodes || [] |
| | | }; |
| | | }, |
| | | |
| | |
| | | width: 300px; |
| | | background-color: #fafafa; |
| | | border-left: 1px solid #e6e9ed; |
| | | overflow-y: scroll; |
| | | |
| | | .vfe-chart-panel-detail { |
| | | box-sizing: border-box; |
| | |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | reserveSelection:true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | column: [] |
| | |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | | reserveSelection:true, |
| | | dialogClickModal: false, |
| | | highlightCurrentRow: true, |
| | | rowKey:'oid', |
| | |
| | | prop: "name", |
| | | search: true, |
| | | slot: true, |
| | | span: 24, |
| | | span: 16, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | label: "åç§°", |
| | | prop: "label", |
| | | search: true, |
| | | align: "center", |
| | | // align: "center", |
| | | span: 16, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | // }, |
| | | { |
| | | label: "æè¿°", |
| | | width: 150, |
| | | align: "center", |
| | | span: 16, |
| | | // width: 150, |
| | | // align: "center", |
| | | prop: "remark", |
| | | // hide: true |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--ç³»ç»éæçç³»ç»ä¿¡æ¯é¡µé¢--> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | ref="crud" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList} from "@/api/docking/data"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {mapGetters} from "vuex"; |
| | | import website from "@/config/website"; |
| | | |
| | | export default { |
| | | name: "data", |
| | | data(){ |
| | | return { |
| | | loading: false, |
| | | query: {}, |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 20, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | data:[], |
| | | option: { |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: false, |
| | | dialogClickModal: false, |
| | | menu:false, |
| | | column: [ |
| | | { |
| | | label: "æ°æ®ç¼ç ", |
| | | prop: "id", |
| | | search: true, |
| | | sortable:true, |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "å¾å·", |
| | | prop: "uniquecode", |
| | | search: true, |
| | | sortable:true |
| | | }, |
| | | { |
| | | label: 'åç±»id', |
| | | prop: 'classifyid', |
| | | search: true, |
| | | sortable:true, |
| | | width: 250 |
| | | }, |
| | | { |
| | | label: 'åç±»åç§°', |
| | | prop: 'classifyname', |
| | | search: true, |
| | | sortable:true |
| | | }, |
| | | { |
| | | label: 'ä¸å¡ç±»åoid', |
| | | prop: 'btmoid', |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'ä¸å¡ç±»åid', |
| | | prop: 'btmid', |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'æ¨éç±»å', |
| | | prop: 'sendtype', |
| | | search: true, |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'æ¯å¦å解任å¡', |
| | | prop: 'sendflag', |
| | | search: true, |
| | | sortable:true, |
| | | width: 150, |
| | | html:true, |
| | | align:'center', |
| | | type:'select', |
| | | dicData: [{key:'true',value:'æ¯'},{key:'false',value:'å¦'}], |
| | | props: { |
| | | label: "value", |
| | | value: "key" |
| | | }, |
| | | formatter : function (row, column) { |
| | | return row.sendflag == 'true' || row.sendflag == '1' ? '<i class="el-icon-check"></i>' : '<i class="el-icon-close"></i>' |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapGetters([ "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: false |
| | | }; |
| | | } |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page); |
| | | }, |
| | | onLoad(page, params={}) { |
| | | this.loading = true; |
| | | var query={} |
| | | if (this.query) { |
| | | for (var key in this.query) { |
| | | query['conditionMap["' + key + '"]'] = this.query[key]; |
| | | } |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error=>{ |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--ç³»ç»éæçç³»ç»æ¥å¿é¡µé¢--> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | ref="crud" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList} from "@/api/docking/loge"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "loge", |
| | | data(){ |
| | | return { |
| | | loading: false, |
| | | query: {}, |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 20, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | data:[], |
| | | option: { |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: false, |
| | | dialogClickModal: false, |
| | | menu:false, |
| | | column: [ |
| | | { |
| | | label: "æ°æ®ç¼ç ", |
| | | prop: "id", |
| | | search: true, |
| | | sortable:true, |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "å¾å·", |
| | | prop: "uniquecode", |
| | | search: true, |
| | | sortable:true, |
| | | width:150 |
| | | }, |
| | | { |
| | | label: 'åç±»id', |
| | | prop: 'classifyid', |
| | | search: true, |
| | | sortable:true, |
| | | width: 250 |
| | | }, |
| | | { |
| | | label: 'åç±»åç§°', |
| | | prop: 'classifyname', |
| | | search: true, |
| | | sortable:true, |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: 'ç³»ç»ç¼å·', |
| | | prop: 'systemcode', |
| | | search: true, |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'ç³»ç»åç§°', |
| | | prop: 'systemname', |
| | | search: true, |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'æ¯å¦æ¨éæå', |
| | | prop: 'interfacestatus', |
| | | search: true, |
| | | sortable:true, |
| | | width: 120, |
| | | html:true, |
| | | align:'center', |
| | | type:'select', |
| | | dicData: [{key:'true',value:'æ¯'},{key:'false',value:'å¦'}], |
| | | props: { |
| | | label: "value", |
| | | value: "key" |
| | | }, |
| | | formatter : function (row, column) { |
| | | return row.interfacestatus == 'true' || row.interfacestatus == '1' ? '<i class="el-icon-check"></i>' : '<i class="el-icon-close"></i>' |
| | | } |
| | | }, |
| | | { |
| | | label: 'è¿åmsg', |
| | | prop: 'msg', |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: 'è®°å½æ¶é´', |
| | | prop: 'createTime', |
| | | sortable:true, |
| | | width: 160 |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapGetters([ "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: false |
| | | }; |
| | | } |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page); |
| | | }, |
| | | onLoad(page, params={}) { |
| | | this.loading = true; |
| | | var query={} |
| | | if (this.query) { |
| | | for (var key in this.query) { |
| | | query['conditionMap["' + key + '"]'] = this.query[key]; |
| | | } |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error=>{ |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--ç³»ç»éæçç³»ç»ä»»å¡é¡µé¢--> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :page.sync="page" |
| | | :permission="permissionList" |
| | | ref="crud" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | plain |
| | | icon="el-icon-refresh-right" |
| | | @click="handleSend">æå¨æ¨é |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList,sendData} from "@/api/docking/task"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {mapGetters} from "vuex"; |
| | | import {remove} from "@/api/code/codeSynonym"; |
| | | |
| | | export default { |
| | | name: "task", |
| | | data(){ |
| | | return { |
| | | loading: false, |
| | | query: {}, |
| | | selectionList: [], |
| | | page: { |
| | | pageSize: 20, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | data:[], |
| | | option: { |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | menu:false, |
| | | column: [ |
| | | { |
| | | label: "æ°æ®ç¼ç ", |
| | | prop: "id", |
| | | search: true, |
| | | sortable:true, |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "å¾å·", |
| | | prop: "uniquecode", |
| | | search: true, |
| | | sortable:true, |
| | | width:150 |
| | | }, |
| | | { |
| | | label: 'åç±»id', |
| | | prop: 'classifyid', |
| | | search: true, |
| | | sortable:true, |
| | | width: 250 |
| | | }, |
| | | { |
| | | label: 'åç±»åç§°', |
| | | prop: 'classifyname', |
| | | search: true, |
| | | sortable:true |
| | | }, |
| | | { |
| | | label: 'ç³»ç»ç¼å·', |
| | | prop: 'systemcode', |
| | | search: true, |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'ç³»ç»åç§°', |
| | | prop: 'systemname', |
| | | search: true, |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'æ°æ®æ
åµ', |
| | | prop: 'sendtype', |
| | | sortable:true, |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: 'æ¯å¦æ¨éæå', |
| | | prop: 'sendflag', |
| | | search: true, |
| | | sortable:true, |
| | | width: 120, |
| | | html:true, |
| | | align:'center', |
| | | type:'select', |
| | | dicData: [{key:'true',value:'æ¯'},{key:'false',value:'å¦'}], |
| | | props: { |
| | | label: "value", |
| | | value: "key" |
| | | }, |
| | | formatter : function (row, column) { |
| | | return row.sendflag == 'true' || row.sendflag == '1' ? '<i class="el-icon-check"></i>' : '<i class="el-icon-close"></i>' |
| | | } |
| | | }, |
| | | { |
| | | label: 'ä»»å¡å建æ¶é´', |
| | | prop: 'createTime', |
| | | sortable:true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: 'æåæ¨éæ¶é´', |
| | | prop: 'lastModifyTime', |
| | | sortable:true, |
| | | width: 150 |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | computed:{ |
| | | ...mapGetters([ "permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: false, |
| | | viewBtn: false, |
| | | delBtn: false, |
| | | editBtn: false |
| | | }; |
| | | }, |
| | | oids() { |
| | | let oids = []; |
| | | this.selectionList.forEach(ele => { |
| | | oids.push(ele.oid); |
| | | }); |
| | | return oids.join(","); |
| | | } |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | searchChange(params, done) { |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page); |
| | | done(); |
| | | }, |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | selectionClear() { |
| | | this.selectionList = []; |
| | | this.$refs.crud.toggleSelection(); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | var query = {} |
| | | if (this.query) { |
| | | for (var key in this.query) { |
| | | query['conditionMap["' + key + '"]'] = this.query[key]; |
| | | } |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.params, query, this.query)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | handleSend() { |
| | | let data = new FormData(); |
| | | if (this.selectionList.length === 0) { |
| | | this.$message.warning("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | data.append('oid', this.oids) |
| | | this.$confirm("æ¯å¦æ¨éæ°æ®?", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return sendData(data) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "æä½æå!" |
| | | }); |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <avue-tree id="basic" :data="treeData" :option="treeOption" @node-click="nodeClick" class="businessTree"> |
| | | <span class="el-tree-node__label" slot-scope="{ node, data }"> |
| | | <span> |
| | | <i class="el-icon-star-on"></i> |
| | | <i :class="(node || {}).level === 2 ? 'el-icon-star-off' : 'el-icon-folder-opened'"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | |
| | | <i :class="icons.revisionRule"></i> |
| | | çæ¬è§å |
| | | </template> |
| | | {{ obj.revisionRuleName }} |
| | | {{ obj.revisionRuleName ? obj.revisionRuleName+ '(' + obj.revisionRuleId + ')' : ''}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | |
| | | <i :class="icons.lifeCycle"></i> |
| | | çå½å¨æ |
| | | </template> |
| | | {{ obj.lifeCycleId }} |
| | | {{ obj.lifeCycleName ? obj.lifeCycleName + '(' + obj.lifeCycleId + ')' : ''}} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :labelStyle="descriptionOption.labelStyle" |
| | | :contentStyle="descriptionOption.contentStyle"> |
| | |
| | | defaultExpandAll: true, |
| | | title: 'ä¸å¡ç±»åæ ', |
| | | addBtn: false, |
| | | menu:false, |
| | | props: { |
| | | labelText: '', |
| | | label: 'label', |
| | |
| | | revisionRule: 'el-icon-s-check', |
| | | lifeCycle: 'el-icon-refresh-right', |
| | | view: 'el-icon-view', |
| | | desc: 'el-icon-chat-line-square' |
| | | desc: 'el-icon-chat-line-square', |
| | | referType: 'el-icon-search' |
| | | }, |
| | | ref: { |
| | | // ä»è¡¨ä¸éæ©dialogç¶æ |
| | |
| | | this.initDomainOption(); |
| | | }, |
| | | methods: { |
| | | nodeClick(data) { |
| | | nodeClick(data,node,leaf) { |
| | | if (data.oid) { |
| | | getDetail(data.oid).then(res => { |
| | | this.obj = res.data.data; |
| | |
| | | }, |
| | | businessAdd() { |
| | | this.$refs.btmAdd.showSubmitDialog = true; |
| | | this.$refs.btmAdd.btmType = {}; |
| | | this.ifRefreshBtmAddRefresh(); |
| | | }, |
| | | businessEdit() { |
| | |
| | | <el-input v-model="btmType.tableName" :prefix-icon="icons.tableName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æå±é¢å" label-width="100px" prop="domain" class="domainSelect"> |
| | | <el-select v-model="btmType.bizDomain" :prefix-icon="icons.domain"> |
| | | <el-select placeholder="è¯·éæ©é¢å" v-model="btmType.bizDomain" :prefix-icon="icons.domain"> |
| | | <el-option v-for="item in domainOption" |
| | | :label="item.label" :value="item.value" :key="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬è§å" label-width="100px"> |
| | | <el-input v-model="btmType.revisionRuleName" :prefix-icon="icons.revisionRule" class="revisionRule" |
| | | @focus="openRevision" clearable @clear="clearRevision"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search"></i> |
| | | <el-input v-model="btmType.revisionRuleName" |
| | | :prefix-icon="icons.revisionRule" |
| | | class="revisionRule" |
| | | @focus="openRevision" |
| | | clearable |
| | | @clear="clearRevision" |
| | | :suffix-icon="icons.referType" |
| | | placeholder="è¯·éæ©ï¼ç空åä¸è¿è¡ç®¡ç"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="çå½å¨æ" label-width="100px"> |
| | | <el-input v-model="btmType.lifeCycleId" :prefix-icon="icons.lifeCycle"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search"></i> |
| | | <el-input v-model="btmType.lifeCycleName" |
| | | :prefix-icon="icons.lifeCycle" |
| | | class="lifeCycle" |
| | | @focus="openLifeCycle" |
| | | clearable |
| | | @clear="clearLifeCycle" |
| | | :suffix-icon="icons.referType" |
| | | placeholder="è¯·éæ©ï¼ç空åä¸è¿è¡ç®¡ç"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <div> |
| | |
| | | :data="revisionRef.data" |
| | | :page.sync="revisionRef.page" |
| | | ref="revisionRef" |
| | | @row-click="revisionClick"> |
| | | @row-click="revisionClick" |
| | | v-loading="revisionRef.loading" |
| | | @search-change="searchRevisionRule" |
| | | @search-reset="clearSearchRevisionRule"> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="revisionRef.selectRow" |
| | |
| | | <el-button @click="cancelRevision">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- çå½å¨æçåç
§ --> |
| | | <el-dialog title="è¯·éæ©çå½å¨æ" |
| | | :visible.sync="lifeCycleRef.visible" |
| | | append-to-body |
| | | width="80%"> |
| | | |
| | | <avue-crud class="lifeCycleRef" |
| | | :option="lifeCycleRef.option" |
| | | :data="lifeCycleRef.data" |
| | | :page.sync="lifeCycleRef.page" |
| | | ref="lifeCycleRef" |
| | | @row-click="lifeCycleClick" |
| | | v-loading="lifeCycleRef.loading" |
| | | @search-change="searchLifeCycle" |
| | | @search-reset="clearSearchLifeCycle"> |
| | | <template slot="radio" |
| | | slot-scope="{row}"> |
| | | <el-radio v-model="lifeCycleRef.selectRow" |
| | | :label="row.$index"> |
| | | </el-radio> |
| | | </template> |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="confirmLifeCycle">ç¡®å®</el-button> |
| | | <el-button @click="cancelLifeCycle">åæ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | |
| | | |
| | | </template> |
| | | |
| | | |
| | |
| | | import {add, update} from '@/api/omd/btmType'; |
| | | import {queryPage} from '@/api/omd/OmdAttribute'; |
| | | import {getPage} from '@/api/omd/revisionRule'; |
| | | import {getList} from '@/api/modeling/cycle'; |
| | | |
| | | export default { |
| | | name: 'BusinessAdd', |
| | |
| | | currentPage: 1, |
| | | pageSize: 10 |
| | | }, |
| | | loading: false, |
| | | selectRow: '', |
| | | searchKey: null, |
| | | option: { |
| | | height: 360, |
| | | addBtn: false, |
| | | refreshBtn: false, |
| | | columnBtn: false, |
| | | menu: false, |
| | | border: true, |
| | | reserveSelection: true, |
| | | searchMenuSpan: 8, |
| | | searchShowBtn: false, |
| | | highlightCurrentRow: true, |
| | | column: [{ |
| | | label: 'éæ©', |
| | | prop: 'radio', |
| | | width: 60, |
| | | hide: false |
| | | }, |
| | | { |
| | | label: 'è±æåç§°', |
| | | prop: 'id', |
| | | search: true |
| | | }, |
| | | { |
| | | label: "䏿åç§°", |
| | | prop: "name", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "è·³è·å符", |
| | | prop: "skipCode" |
| | | }, |
| | | { |
| | | label: "åå§å¼", |
| | | prop: "startCode" |
| | | }, |
| | | { |
| | | label: "æ¥é¿", |
| | | prop: "serialStep" |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | | prop: "prefixCode" |
| | | }, |
| | | { |
| | | label: "åç¼", |
| | | prop: "suffixCode" |
| | | }, |
| | | { |
| | | label: "æè¿°", |
| | | prop: "description", |
| | | type: "textarea" |
| | | } |
| | | ] |
| | | }, |
| | | }, |
| | | lifeCycleRef: { |
| | | visible: false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 10 |
| | | }, |
| | | loading: false, |
| | | selectRow: '', |
| | | searchKey: null, |
| | | option: { |
| | |
| | | row.$cellEdit = false; |
| | | }, |
| | | // æå¼çæ¬è§ååç
§ |
| | | async openRevision() { |
| | | await getPage().then(res => { |
| | | openRevision() { |
| | | this.revisionRef.visible = true; |
| | | this.revisionRuleOnLoad(); |
| | | }, |
| | | // çæ¬åç
§å表çé»è®¤æ¥è¯¢æ¹æ³ |
| | | revisionRuleOnLoad(){ |
| | | this.revisionRef.loading = true; |
| | | getPage().then(res => { |
| | | this.revisionRef.data = res.data.data.records; |
| | | }); |
| | | this.revisionRef.visible = true; |
| | | setTimeout(() => { |
| | | this.revisionRef.loading = false; |
| | | }, 600) |
| | | this.$nextTick(() => { |
| | | this.$refs.revisionRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // æå¼çæ¬è§ååç
§ |
| | | openLifeCycle() { |
| | | this.lifeCycleRef.visible = true; |
| | | this.lifeCycleOnLoad(); |
| | | }, |
| | | // çå½å¨æå表çé»è®¤æ¥è¯¢æ¹æ³ |
| | | lifeCycleOnLoad(){ |
| | | this.lifeCycleRef.loading = true; |
| | | getList().then(res => { |
| | | this.lifeCycleRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | this.lifeCycleRef.loading = false; |
| | | }, 600) |
| | | this.$nextTick(() => { |
| | | this.$refs.lifeCycleRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // å
³éçæ¬è§ååç
§å¼¹çª |
| | | closeRevisionDialog() { |
| | | this.revisionRef.visible = false; |
| | | }, |
| | | // çæ¬è§ååç
§å表æ£ç´¢ |
| | | revisionRefSearch() { |
| | | |
| | | }, |
| | | // çæ¬è§åéä¸äºä»¶ |
| | | revisionChange() { |
| | | // å
³éçå½å¨æåç
§å¼¹çª |
| | | closeLifeCycleDialog() { |
| | | this.lifeCycleRef.visible = false; |
| | | }, |
| | | // 确认éä¸çæ¬è§å |
| | | confirmRevision() { |
| | |
| | | this.btmType.inputRevisionFlag = false; |
| | | this.cancelRevision(); |
| | | }, |
| | | // 确认éä¸çå½å¨æ |
| | | confirmLifeCycle() { |
| | | this.btmType.lifeCycleFlag = true; |
| | | this.btmType.lifeCycleId = this.lifeCycleRef.selectData.id; |
| | | this.btmType.lifeCycleName = this.lifeCycleRef.selectData.name; |
| | | this.cancelLifeCycle(); |
| | | }, |
| | | // åæ¶éä¸çæ¬è§å |
| | | cancelRevision() { |
| | | this.revisionRef.selectRow = ''; |
| | | this.revisionRef.selectData = {}; |
| | | this.closeRevisionDialog(); |
| | | }, |
| | | // åæ¶éä¸çå½å¨æ |
| | | cancelLifeCycle() { |
| | | this.lifeCycleRef.selectRow = ''; |
| | | this.lifeCycleRef.selectData = {}; |
| | | this.closeLifeCycleDialog(); |
| | | }, |
| | | // çæ¬è§ååé |
| | | revisionClick(row) { |
| | |
| | | name: row.name, |
| | | }; |
| | | }, |
| | | // çå½å¨æåé |
| | | lifeCycleClick(row) { |
| | | this.lifeCycleRef.selectRow = row.$index; |
| | | this.lifeCycleRef.selectData = { |
| | | id: row.id, |
| | | name: row.name, |
| | | }; |
| | | }, |
| | | // åæ¶çæ¬è§å |
| | | clearRevision() { |
| | | this.$delete(this.btmType, 'revisionFlag'); |
| | | this.$delete(this.btmType, 'revisionRuleId'); |
| | | this.$delete(this.btmType, 'revisionRuleName'); |
| | | this.$delete(this.btmType, 'inputRevisionFlag'); |
| | | }, |
| | | // åæ¶çå½å¨æ |
| | | clearLifeCycle() { |
| | | this.$delete(this.btmType, 'lifeCycleFlag'); |
| | | this.$delete(this.btmType, 'lifeCycleId'); |
| | | this.$delete(this.btmType, 'lifeCycleName'); |
| | | }, |
| | | // 表åéç½® |
| | | resetForm() { |
| | | this.btmType = {}; |
| | | this.$refs.form.resetFields(); |
| | | }, |
| | | /** |
| | | * æç´¢çæ¬è§å |
| | | * @param params æç´¢æ¡è¾å
¥å¼ {id: '',name: ''} ç´æ¥è·åå°±è¡ |
| | | * @param done æ§è¡å®æåçåè° |
| | | */ |
| | | searchRevisionRule(params,done){ |
| | | let condition = {}; |
| | | if (params.id){ |
| | | condition['id_like'] = params.id; |
| | | } |
| | | if (params.name){ |
| | | condition['name_like'] = params.name; |
| | | } |
| | | this.revisionRef.loading = true; |
| | | getPage(this.revisionRef.page.currentPage,this.revisionRef.page.pageSize,condition).then(res => { |
| | | this.revisionRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | done(); |
| | | this.revisionRef.loading = false; |
| | | }, 600); |
| | | this.$nextTick(() => { |
| | | this.$refs.revisionRef.refreshTable(); |
| | | }); |
| | | }, |
| | | /** |
| | | * æç´¢çå½å¨æ |
| | | * @param params æç´¢æ¡è¾å
¥å¼ |
| | | * @param done æ§è¡å®æåçåè° |
| | | */ |
| | | searchLifeCycle(params,done){ |
| | | let condition = {}; |
| | | if (params.id){ |
| | | condition['id_like'] = params.id; |
| | | } |
| | | if (params.name){ |
| | | condition['name_like'] = params.name; |
| | | } |
| | | this.lifeCycleRef.loading = true; |
| | | getList(this.lifeCycleRef.page.currentPage,this.lifeCycleRef.page.pageSize,condition).then(res => { |
| | | this.lifeCycleRef.data = res.data.data.records; |
| | | }); |
| | | setTimeout(() => { |
| | | done(); |
| | | this.lifeCycleRef.loading = false; |
| | | }, 600); |
| | | this.$nextTick(() => { |
| | | this.$refs.lifeCycleRef.refreshTable(); |
| | | }); |
| | | }, |
| | | // åæ¶çæ¬è§åæç´¢ |
| | | clearSearchRevisionRule(item){ |
| | | this.revisionRuleOnLoad(); |
| | | }, |
| | | // åæ¶çå½å¨ææç´¢ |
| | | clearSearchLifeCycle(item){ |
| | | this.lifeCycleOnLoad(); |
| | | console.log(item); |
| | | } |
| | | } |
| | | } |
| | |
| | | display: none !important; |
| | | } |
| | | |
| | | .lifeCycleRef > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu { |
| | | display: none !important; |
| | | } |
| | | |
| | | .btmTypeForm > .el-form-item > .el-form-item__content > .el-input > .el-input__inner { |
| | | width: 200px; |
| | | width: 260px; |
| | | } |
| | | |
| | | .domainSelect > .el-form-item__content > .el-select > .el-input > .el-input__inner { |
| | | width: 200px; |
| | | width: 260px; |
| | | } |
| | | |
| | | .viewFlag { |
| | | width: 305px; |
| | | width: 360px; |
| | | } |
| | | |
| | | .viewInput > .el-form-item__content > .el-input > .el-input__inner { |
| | | width: 200px; |
| | | width: 630px; |
| | | } |
| | | |
| | | .descClass > .el-input__inner { |
| | | width: 57vw |
| | | } |
| | | |
| | | #descId { |
| | | width: 57vw; |
| | | width: 1000px; |
| | | } |
| | | </style> |
| | |
| | | :option="option" |
| | | :page="page" |
| | | :table-loading="loading" |
| | | selection |
| | | @size-change="search('size', ...arguments)" |
| | | @current-change="search('current', ...arguments)" |
| | | @refresh-change="search" |
| | | @search-change="search('search', ...arguments)" |
| | | @search-reset="search('reset', ...arguments)" |
| | | @selection-change="selectionChange" |
| | | > |
| | | <template slot-scope="scope" slot="menuLeft"> |
| | | <el-button |
| | |
| | | @click="openDialog('add', {})" |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | @click="batchDel()" |
| | | v-if="selectedData.length > 0" |
| | | :loading="delLoading" |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | <template slot-scope="{ row, index }" slot="menu"> |
| | | <el-button |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :loading="row.editLoading" |
| | | @click="openDialog('edit', row)" |
| | | >ç¼è¾</el-button |
| | | > |
| | |
| | | type="text" |
| | | icon="el-icon-view" |
| | | size="mini" |
| | | :loading="row.detailLoading" |
| | | @click="openDialog('detail', row)" |
| | | >é¢è§</el-button |
| | | > |
| | | <el-button |
| | | class="btn_link_del" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :loading="row.delLoading" |
| | | @click="rowDel(row)" |
| | | >å é¤</el-button |
| | | > |
| | | </template></avue-crud |
| | | > |
| | |
| | | @save-data="save" |
| | | /> |
| | | <template #footer v-if="type !== 'detail'"> |
| | | <el-button type="primary" size="mini" @click="submit">ä¿å</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | @click="submit" |
| | | :loading="submitLoading" |
| | | >ä¿å</el-button |
| | | > |
| | | <el-button type="" size="mini" @click="visible = false">åæ¶</el-button> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | components: { CycleFlow }, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | | form: { |
| | | // 'contionMap[id]': 'qwe' |
| | | // contionMap: [ |
| | | // {id: 'qwe'} |
| | | // ] |
| | | }, |
| | | page: { |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | layout: "total, sizes, prev, pager, next, jumper", |
| | | }, |
| | | option: { |
| | | searchMenuSpan: 12, |
| | | selection: true, |
| | | searchMenuSpan: 6, |
| | | searchMenuPosition: "right", |
| | | border: true, |
| | | align: "center", |
| | |
| | | { |
| | | label: "ç¼å·", |
| | | prop: "id", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "åç§°", |
| | |
| | | }, |
| | | { |
| | | label: "èµ·å§ç¶æ", |
| | | prop: "startStatusName", |
| | | prop: "startStatus", |
| | | search: true, |
| | | }, |
| | | { |
| | |
| | | dialogWidth: "50%", |
| | | type: "detail", |
| | | loading: false, |
| | | delLoading: false, |
| | | submitLoading: false, |
| | | selectedData: [], |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | total: 0, |
| | | currentPage: 1, |
| | | }; |
| | | } else if (type === "size") { |
| | | this.page.pageSize = params; |
| | | } else if (type === "current") { |
| | | this.page.currentPage = params; |
| | | } |
| | | this.loading = true; |
| | | const { limit, page } = this.page; |
| | | API.getList(Object.assign({}, params, { limit, page })).then((res) => { |
| | | API.getList( |
| | | Object.assign({}, params, { |
| | | size: this.page.pageSize, |
| | | current: this.page.currentPage, |
| | | }) |
| | | ).then((res) => { |
| | | this.loading = false; |
| | | this.data = res.data.data.records; |
| | | this.page.total = res.data.data.total; |
| | |
| | | this.$set(row, "detailLoading", false); |
| | | this.$set(row, "editLoading", false); |
| | | this.rowData = row; |
| | | this.nodesEdgesData = {nodes: res.nodes, edges: res.edges} |
| | | const nodes = res.data.data.nodes.map((item) => { |
| | | item.label = item.id; |
| | | item.index = item.indexNum; |
| | | return item; |
| | | }); |
| | | const edges = res.data.data.edges.map((item) => { |
| | | item.label = item.name; |
| | | item.width = 80; |
| | | item.height = 48; |
| | | item.index = 1; |
| | | item.index = item.indexNum; |
| | | return item; |
| | | }); |
| | | this.nodesEdgesData = { nodes, edges }; |
| | | this.visible = true; |
| | | }); |
| | | } else { |
| | | this.nodesEdgesData = {}; |
| | | this.rowData = {}; |
| | | this.title = "æ°å¢çå½å¨ææµç¨å¾"; |
| | | this.dialogWidth = "95%"; |
| | | this.visible = true; |
| | | } |
| | | }, |
| | | // é䏿°æ® |
| | | selectionChange(selectedData) { |
| | | this.selectedData = selectedData; |
| | | }, |
| | | // å é¤ |
| | | rowDel(row) { |
| | | this.$confirm("确认å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | this.$set(row, "delLoading", true); |
| | | API.del({ oid: row.oid, id: row.id }) |
| | | .then((res) => { |
| | | this.$set(row, "delLoading", false); |
| | | if (res.data.code === 200) { |
| | | this.$message.success("å 餿åï¼"); |
| | | this.search(); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$set(row, "delLoading", false); |
| | | }); |
| | | }); |
| | | }, |
| | | batchDel() { |
| | | this.$confirm("确认å 餿鿰æ®?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | const data = this.selectedData.map((item) => { |
| | | return { |
| | | id: item.id, |
| | | oid: item.oid, |
| | | }; |
| | | }); |
| | | this.delLoading = true; |
| | | API.del(data, true) |
| | | .then((res) => { |
| | | this.delLoading = false; |
| | | if (res.data.code === 200) { |
| | | this.$message.success("å 餿åï¼"); |
| | | this.search(); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.delLoading = false; |
| | | }); |
| | | }); |
| | | }, |
| | | async submit() { |
| | | const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData(); |
| | | console.log(newRowData, "newRowDatanewRowData"); |
| | | if (!newRowData) { |
| | | return; |
| | | } |
| | | const flowData = this.$refs.vueFlowchartEditor.getFlowData(); |
| | | const flowData = await this.$refs.vueFlowchartEditor.getFlowData(); |
| | | if (Array.isArray(flowData.nodes)) { |
| | | flowData.nodes = flowData.nodes.map((item) => { |
| | | item.name = item.id; |
| | | item.indexNum = item.index; |
| | | return item; |
| | | }); |
| | | } |
| | | if (Array.isArray(flowData.edges)) { |
| | | flowData.edges = flowData.edges.map((item) => { |
| | | item.name = item.label; |
| | | item.indexNum = item.index; |
| | | return item; |
| | | }); |
| | | } |
| | | |
| | | let params = { |
| | | ...flowData, |
| | | ...newRowData, |
| | | ...flowData, |
| | | }; |
| | | console.log(flowData, newRowData); |
| | | API.add(params).then((res) => { |
| | | console.log(res, "res"); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | page: { |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newV) { |
| | | this.page.page = newV.currentPage; |
| | | this.page.limit = newV.pageSize; |
| | | }, |
| | | |
| | | this.submitLoading = true; |
| | | let APIFun = API.add; |
| | | if (this.type === "edit") { |
| | | APIFun = API.edit; |
| | | this.$delete(params, "id"); |
| | | } |
| | | APIFun(params) |
| | | .then((res) => { |
| | | this.submitLoading = false; |
| | | if (res.data.code === 200) { |
| | | this.$message.success( |
| | | this.type === "edit" ? "ä¿®æ¹æåï¼" : "æ°å¢æåï¼" |
| | | ); |
| | | this.visible = false; |
| | | this.search(); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.submitLoading = false; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | .btn_link_del { |
| | | color: red; |
| | | } |
| | | </style> |
| | |
| | | proxy: { |
| | | '/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://192.168.1.46:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | // target: 'http://192.168.1.51:37000/', |
| | | // target: 'http://192.168.1.104:37000', |
| | |
| | | package com.vci.ubcs.code.dto.datapush.classify; |
| | | |
| | | //import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | //import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | |
| | | //@XStreamAlias("classify") |
| | | @XStreamAlias("classify") |
| | | public class NodeClassifyDTO { |
| | | /** |
| | | * åç±»id |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String id; |
| | | /*** |
| | | * åç±»åç§° |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String name; |
| | | /*** |
| | | * ç¶èç¹id |
| | | */ |
| | | // @XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String pid; |
| | | /*** |
| | | * åç±»ä»£å· |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String classCode; |
| | | /*** |
| | | * æè¿° |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String description; |
| | | /*** |
| | | * åç±»é¾æ¥è·¯å¾ |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String fullPathName; |
| | | /*** |
| | | * åç±»ç¶æ |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String lcStatus; |
| | | |
| | | public String getId() { |
| | |
| | | package com.vci.ubcs.code.dto.datapush.classify; |
| | | |
| | | //import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | |
| | | //@XStreamAlias("data") |
| | | @XStreamAlias("data") |
| | | public class NodeDataDTO { |
| | | |
| | | private NodeLibraryDTO library; |
| | |
| | | package com.vci.ubcs.code.dto.datapush.classify; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | |
| | | import java.util.List; |
| | | |
| | | //@XStreamAlias("library") |
| | | @XStreamAlias("library") |
| | | public class NodeLibraryDTO { |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String id; |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String name; |
| | | //@XStreamImplicit |
| | | @XStreamAsAttribute |
| | | private String classCode; |
| | | @XStreamImplicit |
| | | private List<NodeClassifyDTO> classify; |
| | | |
| | | public String getId() { |
| | |
| | | this.classify = classify; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "NodeLibraryDTO{" + |
| | | "id='" + id + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", classify=" + classify + |
| | | '}'; |
| | | } |
| | | public String getClassCode() { |
| | | return classCode; |
| | | } |
| | | |
| | | public void setClassCode(String classCode) { |
| | | this.classCode = classCode; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "NodeLibraryDTO{" + |
| | | "id='" + id + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", classCode='" + classCode + '\'' + |
| | | ", classify=" + classify + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.dto.datapush.data; |
| | | |
| | | public class NodeJosnDTO { |
| | | |
| | | private NodedataDTO data; |
| | | |
| | | public NodedataDTO getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(NodedataDTO data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "NodeJosnDTO{" + |
| | | "data=" + data + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.dto.datapush.data; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | |
| | | import java.util.List; |
| | | |
| | | @XStreamAlias("object") |
| | | public class NodeObjectDTO { |
| | | @XStreamAsAttribute |
| | | private String code="" ; |
| | | @XStreamAsAttribute |
| | | private String status="" ; |
| | | @XStreamAsAttribute |
| | | private String library=""; |
| | | @XStreamAsAttribute |
| | | private String classCode=""; |
| | | @XStreamImplicit |
| | | private List<NodeProDTO> pro; |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getLibrary() { |
| | | return library; |
| | | } |
| | | |
| | | public void setLibrary(String library) { |
| | | this.library = library; |
| | | } |
| | | |
| | | public String getClassCode() { |
| | | return classCode; |
| | | } |
| | | |
| | | public void setClassCode(String classCode) { |
| | | this.classCode = classCode; |
| | | } |
| | | |
| | | public List<NodeProDTO> getPro() { |
| | | return pro; |
| | | } |
| | | |
| | | public void setPro(List<NodeProDTO> pro) { |
| | | this.pro = pro; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "NodeObjectDTO{" + |
| | | "code='" + code + '\'' + |
| | | ", status='" + status + '\'' + |
| | | ", library='" + library + '\'' + |
| | | ", classCode='" + classCode + '\'' + |
| | | ", pro=" + pro + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.dto.datapush.data; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | |
| | | @XStreamAlias("pro") |
| | | public class NodeProDTO { |
| | | @XStreamAsAttribute |
| | | private String filedName; |
| | | @XStreamAsAttribute |
| | | private String outname; |
| | | @XStreamAsAttribute |
| | | private String filedValue; |
| | | |
| | | public String getFiledName() { |
| | | return filedName; |
| | | } |
| | | |
| | | public void setFiledName(String filedName) { |
| | | this.filedName = filedName; |
| | | } |
| | | |
| | | public String getOutname() { |
| | | return outname; |
| | | } |
| | | |
| | | public void setOutname(String outname) { |
| | | this.outname = outname; |
| | | } |
| | | |
| | | public String getFiledValue() { |
| | | return filedValue; |
| | | } |
| | | |
| | | public void setFiledValue(String filedValue) { |
| | | this.filedValue = filedValue; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "NodeProDTO{" + |
| | | "filedName='" + filedName + '\'' + |
| | | ", outname='" + outname + '\'' + |
| | | ", filedValue='" + filedValue + '\'' + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.ubcs.code.dto.datapush.data; |
| | | |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | |
| | | import java.util.List; |
| | | |
| | | @XStreamAlias("data") |
| | | public class NodedataDTO { |
| | | @XStreamImplicit |
| | | private List<NodeObjectDTO> object; |
| | | |
| | | public List<NodeObjectDTO> getObject() { |
| | | return object; |
| | | } |
| | | |
| | | public void setObject(List<NodeObjectDTO> object) { |
| | | this.object = object; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "NodedataDTO{" + |
| | | "object=" + object + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "data": { |
| | | "object": { |
| | | "code": "0201040133", |
| | | "status": "Released", |
| | | "library": "wupin", |
| | | "classCode": "020104", |
| | | "pro": [ |
| | | { |
| | | "filedName": "xbj", |
| | | "outname": "æ è®°" |
| | | }, |
| | | { |
| | | "filedName": "xinghaoguige", |
| | | "outname": "è§æ ¼", |
| | | "filedValue": "M4" |
| | | }, |
| | | { |
| | | "filedName": "lastmodifier", |
| | | "outname": "æåä¿®æ¹äºº", |
| | | "filedValue": "weidy(é大å)" |
| | | }, |
| | | { |
| | | "filedName": "cpxs", |
| | | "outname": "产ååå¼" |
| | | }, |
| | | { |
| | | "filedName": "secondfl", |
| | | "outname": "äºçº§ç®¡çåç±»", |
| | | "filedValue": "ç´§åºä»¶" |
| | | }, |
| | | { |
| | | "filedName": "clph", |
| | | "outname": "ææçå·", |
| | | "filedValue": "HB1-24321" |
| | | }, |
| | | { |
| | | "filedName": "thrifl", |
| | | "outname": "ä¸çº§ç®¡çåç±»", |
| | | "filedValue": "èºé" |
| | | }, |
| | | { |
| | | "filedName": "xbzjbmc", |
| | | "outname": "æ å级å«åç§°" |
| | | }, |
| | | { |
| | | "filedName": "firstfl", |
| | | "outname": "ä¸çº§ç®¡çåç±»", |
| | | "filedValue": "æ åä»¶" |
| | | }, |
| | | { |
| | | "filedName": "xgzccdgcd", |
| | | "outname": "å
³æ³¨å°ºå¯¸çå
¬å·®å¸¦" |
| | | }, |
| | | { |
| | | "filedName": "zjxh", |
| | | "outname": "åä»¶åºå·" |
| | | }, |
| | | { |
| | | "filedName": "bmcl", |
| | | "outname": "表é¢å¤ç", |
| | | "filedValue": "çµé" |
| | | }, |
| | | { |
| | | "filedName": "id", |
| | | "outname": "ç©æç¼ç ", |
| | | "filedValue": "0201040133" |
| | | }, |
| | | { |
| | | "filedName": "createtime", |
| | | "outname": "å建æ¶é´", |
| | | "filedValue": "2022-12-23 17:12:50.635" |
| | | }, |
| | | { |
| | | "filedName": "creator", |
| | | "outname": "å建人", |
| | | "filedValue": "weidy(é大å)" |
| | | }, |
| | | { |
| | | "filedName": "xwlwwmc", |
| | | "outname": "ç©å夿åç§°" |
| | | }, |
| | | { |
| | | "filedName": "xxndj", |
| | | "outname": "æ§è½ç级" |
| | | }, |
| | | { |
| | | "filedName": "xzjmc", |
| | | "outname": "åä»¶åç§°" |
| | | }, |
| | | { |
| | | "filedName": "beizhushuoming", |
| | | "outname": "夿³¨è¯´æ" |
| | | }, |
| | | { |
| | | "filedName": "revisionvalue", |
| | | "outname": "çæ¬", |
| | | "filedValue": "1" |
| | | }, |
| | | { |
| | | "filedName": "name", |
| | | "outname": "ç©å䏿åç§°", |
| | | "filedValue": "åå头èºé1" |
| | | }, |
| | | { |
| | | "filedName": "xfjjstj", |
| | | "outname": "éå ææ¯æ¡ä»¶" |
| | | }, |
| | | { |
| | | "filedName": "xbxkxs", |
| | | "outname": "ä¿é©ååå¼", |
| | | "filedValue": "æ " |
| | | }, |
| | | { |
| | | "filedName": "lastmodifytime", |
| | | "outname": "æåä¿®æ¹æ¶é´", |
| | | "filedValue": "2022-12-23 17:12:50.635" |
| | | }, |
| | | { |
| | | "filedName": "zhiliangbz", |
| | | "outname": "æ åå·", |
| | | "filedValue": "HB1-2431-M4*512" |
| | | }, |
| | | { |
| | | "filedName": "materialclassify", |
| | | "outname": "æå±å类代å·", |
| | | "filedValue": "020104" |
| | | }, |
| | | { |
| | | "filedName": "lcstatus", |
| | | "outname": "ç¶æ", |
| | | "filedValue": "Released" |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "data": { |
| | | "object": { |
| | | "code": "0201040133", |
| | | "oid": "0000001", |
| | | "erroid": "0", |
| | | "msg": "æµè¯æå" |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.vci.ubcs.code.dto.datapush.result; |
| | | |
| | | //import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | //import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamImplicit; |
| | | |
| | | import java.util.List; |
| | | |
| | | //@XStreamAlias("data") |
| | | @XStreamAlias("data") |
| | | public class ResultNodeDataDTO { |
| | | |
| | | //@XStreamImplicit |
| | | @XStreamImplicit |
| | | private List<ResultNodeObjectDTO> object; |
| | | |
| | | public List<ResultNodeObjectDTO> getObject() { |
| | |
| | | package com.vci.ubcs.code.dto.datapush.result; |
| | | |
| | | //import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | //import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | import com.thoughtworks.xstream.annotations.XStreamAlias; |
| | | import com.thoughtworks.xstream.annotations.XStreamAsAttribute; |
| | | |
| | | //@XStreamAlias("object") |
| | | @XStreamAlias("object") |
| | | public class ResultNodeObjectDTO { |
| | | /*** |
| | | * æ°æ®ç¼ç |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String code; |
| | | /*** |
| | | * æ°æ®oid |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String oid; |
| | | /*** |
| | | * é误æ è¯ |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String erroid; |
| | | /*** |
| | | * éè¯¯ä¿¡æ¯ |
| | | */ |
| | | //@XStreamAsAttribute |
| | | @XStreamAsAttribute |
| | | private String msg; |
| | | |
| | | public String getCode() { |
| | |
| | | /*** |
| | | * æ¨éç±»å 1:æ°æ®æ¨é,2åç±»æ¨éï¼é»è®¤æ°æ®æ¨é,3:ç¼ç ç³è¯·,4:ç¼ç æ´æ¹ï¼æ´æ¹ãç¶æï¼åæ¶ï¼,5:åç±»æ¥è¯¢,6:å«è§åä¿¡æ¯çåç±»æ¥è¯¢,7:æ°æ®æ¥è¯¢ |
| | | */ |
| | | @ApiModelProperty(value = "æ¨éç±»å 1:æ°æ®æ¨é,2åç±»æ¨éï¼é»è®¤æ°æ®æ¨é,3:ç¼ç ç³è¯·,4:ç¼ç æ´æ¹ï¼æ´æ¹ãç¶æï¼åæ¶ï¼,5:åç±»æ¥è¯¢,6:å«è§åä¿¡æ¯çåç±»æ¥è¯¢,7:æ°æ®æ¥è¯¢") |
| | | @ApiModelProperty(value = "æ¨éç±»å 1:æ°æ®æ¨é,2åç±»æ¨é,3:ç¼ç ç³è¯·,4:ç¼ç æ´æ¹(ç¶æï¼åæ¶),5:åç±»æ¥è¯¢,6:å«è§åä¿¡æ¯çåç±»æ¥è¯¢,7:æ°æ®æ¥è¯¢") |
| | | private String pushType; |
| | | /*** |
| | | * æ¨éç±»åæ¾ç¤ºå¼ |
| | |
| | | |
| | | private String type; |
| | | |
| | | private Integer level; |
| | | |
| | | private List<BtmTreeVO> childList; |
| | | } |
| | |
| | | @VciEnum(name = MdmEnumIdConstant.SYS_INTEGRATION_PUSH_TYPE,text = "ç³»ç»æ¥å£æ¨éæ¹å¼",description = "") |
| | | public enum sysIntegrationPushTypeEnum implements BaseEnum { |
| | | /** |
| | | * åç±»æ¨éæ¹å¼ |
| | | * æ°æ®æ¨é |
| | | */ |
| | | JSON("1","æ°æ®æ¨é"), |
| | | PUSHTYPE_DATA("1","æ°æ®æ¨é"), |
| | | /** |
| | | * Xmlæ ¼å¼ |
| | | * åç±»æ¨é |
| | | */ |
| | | XML("2","åç±»æ¨é"); |
| | | PUSHTYPE_CLASSIFY("2","åç±»æ¨é"), |
| | | /*** |
| | | * ç¼ç ç³è¯· |
| | | */ |
| | | ACCPET_APPCODE("3","ç¼ç ç³è¯·"), |
| | | |
| | | /*** |
| | | * ç¼ç ç»´æ¤ |
| | | */ |
| | | ACCPET_EDITCODE("4","ç¼ç ç»´æ¤"), |
| | | |
| | | |
| | | /*** |
| | | * åç±»æ¥è¯¢ |
| | | */ |
| | | ACCPET_QUERYCLAFILY("5","åç±»æ¥è¯¢"), |
| | | /*** |
| | | * å«ç¼ç è§åçåç±»æ¥è¯¢ |
| | | */ |
| | | ACCPET_QUERYCLAFILYRULE("6","å«ç¼ç è§åçåç±»æ¥è¯¢"), |
| | | |
| | | /*** |
| | | * æ°æ®æ¥è¯¢ |
| | | */ |
| | | ACCPET_QUERYDATA("7","æ°æ®æ¥è¯¢"); |
| | | |
| | | /** |
| | | * æä¸¾çå¼ |
| | |
| | | |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.thoughtworks.xstream.XStream; |
| | | import com.thoughtworks.xstream.io.xml.DomDriver; |
| | | import com.vci.ubcs.code.constant.MdmDuckingConstant; |
| | | import com.vci.ubcs.code.dto.datapush.classify.JsonRootDataDTO; |
| | | import com.vci.ubcs.code.dto.datapush.classify.NodeClassifyDTO; |
| | | import com.vci.ubcs.code.dto.datapush.classify.NodeDataDTO; |
| | | import com.vci.ubcs.code.dto.datapush.classify.NodeLibraryDTO; |
| | | import com.vci.ubcs.code.dto.datapush.data.NodeJosnDTO; |
| | | import com.vci.ubcs.code.dto.datapush.data.NodeObjectDTO; |
| | | import com.vci.ubcs.code.dto.datapush.data.NodeProDTO; |
| | | import com.vci.ubcs.code.dto.datapush.data.NodedataDTO; |
| | | import com.vci.ubcs.code.dto.datapush.result.ResultJsonDTO; |
| | | import com.vci.ubcs.code.dto.datapush.result.ResultNodeDataDTO; |
| | | import com.vci.ubcs.code.dto.datapush.result.ResultNodeObjectDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.service.*; |
| | | import com.vci.ubcs.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.ubcs.code.util.HttpUtils; |
| | | import com.vci.ubcs.code.util.WsErpClientUtil; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeClassifyVO; |
| | | import com.vci.ubcs.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.ubcs.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciQueryWrapperForDO; |
| | | import com.vci.ubcs.starter.web.util.WebUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.LinkedMultiValueMap; |
| | | import org.springframework.util.MultiValueMap; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | |
| | | @Service |
| | | @Slf4j |
| | | public class CodeDuckingSyncServiceImpl implements ICodeDuckingSyncService { |
| | | @Value("${dataSyncPush.dataParamName:xmlData}") |
| | | public String DATA_PARAM_NAME; |
| | | |
| | | |
| | | @Resource |
| | | private IDockingSystemService dockingSystemService; |
| | | private MdmEngineService mdmEngineServiceI; |
| | | |
| | | @Resource |
| | | private IDockingLogeService dockingLogeService; |
| | | @Resource |
| | | private IDockingDataService dockingDataService; |
| | | @Resource |
| | |
| | | private IDockingSystemConfigService dockingSystemConfigService; |
| | | @Resource |
| | | private ICodeClassifyService codeClassifyService; |
| | | /*** |
| | | * resdisç¼åæå¡ |
| | | */ |
| | | @Resource |
| | | private BladeRedis bladeRedis; |
| | | @Resource |
| | | private IDockingSysIntParamService dockingSysIntParamService; |
| | | @Resource |
| | | private IDockingSysIntHeaderService dockingSysIntHeaderService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void DockingDataSyncScheduing() { |
| | | |
| | | // insertCache2(); |
| | | // insertCache2(); |
| | | initPushDataTaks(1); |
| | | //sendpushDataForService(); |
| | | sendpushDataForService(); |
| | | |
| | | } |
| | | |
| | | /*** |
| | | * |
| | | */ |
| | | @Override |
| | | public void DockingClassSyncScheduing() { |
| | | |
| | | initPushDataTaks(2);//åç±»æ¨é |
| | | sendpushClsfForService(); |
| | | } |
| | | |
| | | /*** |
| | | * æå¨åæ¥ |
| | | * @param oids |
| | | * @return |
| | | */ |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Override |
| | | public R sendData(String oids) { |
| | | |
| | | |
| | | |
| | | return null; |
| | | VciBaseUtil.alertNotNull(oids,"ç³»ç»éæåºç¡ä¿¡æ¯æ°æ®å¯¹è±¡",oids,"ç³»ç»éæåºç¡ä¿¡æ¯ç主é®"); |
| | | List<String> dockingTaskOidList=new ArrayList<>(); |
| | | dockingTaskOidList= VciBaseUtil.str2List(oids); |
| | | List<DockingTask> newDockingTasks= this.dockingTaskService.listByIds(dockingTaskOidList); |
| | | Map<String,List<DockingTask>> typeDockingTaskMap=new HashMap<>(); |
| | | newDockingTasks.stream().forEach(newDockingTaskDO->{ |
| | | String btmId=newDockingTaskDO.getBtmId(); |
| | | if(btmId.equalsIgnoreCase(DOCKING_DEFAULT_CLASSIFY.toLowerCase(Locale.ROOT))){ |
| | | List<DockingTask> dockingTaskList= typeDockingTaskMap.get(DOCKING_DEFAULT_CLASSIFY.toLowerCase(Locale.ROOT)); |
| | | if(CollectionUtils.isEmpty(dockingTaskList)){ |
| | | dockingTaskList=new ArrayList<>(); |
| | | } |
| | | dockingTaskList.add(newDockingTaskDO); |
| | | typeDockingTaskMap.put(DOCKING_DEFAULT_CLASSIFY.toLowerCase(Locale.ROOT),dockingTaskList); |
| | | }else{ |
| | | List<DockingTask> dockingTaskDOList= typeDockingTaskMap.get("data"); |
| | | if(CollectionUtils.isEmpty(dockingTaskDOList)){ |
| | | dockingTaskDOList=new ArrayList<>(); |
| | | } |
| | | dockingTaskDOList.add(newDockingTaskDO); |
| | | typeDockingTaskMap.put("data",dockingTaskDOList); |
| | | } |
| | | }); |
| | | typeDockingTaskMap.keySet().forEach(type->{ |
| | | List<DockingTask> DockingTaskList=typeDockingTaskMap.get(type); |
| | | if(!CollectionUtils.isEmpty(DockingTaskList)){ |
| | | if(type.equalsIgnoreCase(DOCKING_DEFAULT_CLASSIFY.toLowerCase(Locale.ROOT))){ |
| | | this.sendpushClsfForService(DockingTaskList); |
| | | }else{ |
| | | this.sendpushDataForService(DockingTaskList); |
| | | } |
| | | } |
| | | }); |
| | | return R.success("æå¨æ¨é宿,è¯·æ ¸å¯¹æ¯å¦æ¨éæå"); |
| | | } |
| | | |
| | | |
| | |
| | | * @param type |
| | | */ |
| | | private void initPushDataTaks(int type){ |
| | | //initSysadmin(); |
| | | initSysadmin(); |
| | | |
| | | List<DockingSystemConfig> dockingSystemConfigList = dockingSystemConfigService.list( |
| | | Wrappers.<DockingSystemConfig>query().lambda().eq(DockingSystemConfig::getUsedFlag,"true") |
| | |
| | | } |
| | | } |
| | | |
| | | /*** |
| | | * åéåç±»æ°æ® |
| | | */ |
| | | private void sendpushClsfForService(List<DockingTask> dockingTaskList){ |
| | | //æ¯ä¸ªtask便¬¡æ§è¡æ¨é |
| | | for (DockingTask dockingTask:dockingTaskList){ |
| | | //æ¯ä¸ªtaskä¸ä¸ªäºå¡ï¼å¼å¯ |
| | | String paramString=""; |
| | | String sendString=""; |
| | | String backString=""; |
| | | //æ¥è¯¢ç³»ç»æ¥å£ä¿¡æ¯,ip method,dataType |
| | | String systeminfooid = dockingTask.getSysInfoOid();//sysininfo çoid |
| | | try { |
| | | //æ¥è¯¢è¦æ¨éçæ°æ® |
| | | String btmoid = dockingTask.getBtmOid();//æ°æ®btmid |
| | | JsonRootDataDTO jsonRootDataDTO=new JsonRootDataDTO(); |
| | | CodeClassify codeClassify=codeClassifyService.getById(btmoid); |
| | | List<NodeClassifyDTO>nodeClassifyDTOList=new ArrayList<>(); |
| | | NodeClassifyDTO nodeClassifyDTO=new NodeClassifyDTO(); |
| | | nodeClassifyDTO.setClassCode(codeClassify.getId());//åç±»ä»£å· |
| | | nodeClassifyDTO.setDescription(codeClassify.getDescription());//åç±»æè¿° |
| | | nodeClassifyDTO.setFullPathName(codeClassify.getPath());//å
¨è·¯å¾ |
| | | nodeClassifyDTO.setLcStatus(codeClassify.getLcStatus());//ç¶æ |
| | | // CodeClassifyDO parentClassDo=codeClassifyDaoI.selectByPrimaryKey(codeClassifyDO.getParentCodeClassifyOid()); |
| | | nodeClassifyDTO.setPid(codeClassify.getParentCodeClassifyOid());//ç¶idèç¹ |
| | | nodeClassifyDTO.setId(codeClassify.getOid());//åç±»oid |
| | | nodeClassifyDTO.setName(codeClassify.getName());//åç±»åç§° |
| | | nodeClassifyDTOList.add(nodeClassifyDTO); |
| | | NodeLibraryDTO nodeLibraryDTO=new NodeLibraryDTO(); |
| | | CodeClassifyVO rootClassify=codeClassifyService.getTopClassifyVO(btmoid); |
| | | nodeLibraryDTO.setClassify(nodeClassifyDTOList); |
| | | nodeLibraryDTO.setId(rootClassify.getOid()); |
| | | nodeLibraryDTO.setName(rootClassify.getName()); |
| | | nodeLibraryDTO.setClassCode(rootClassify.getId()); |
| | | NodeDataDTO nodeDataDTO=new NodeDataDTO(); |
| | | nodeDataDTO.setLibrary(nodeLibraryDTO); |
| | | jsonRootDataDTO.setData(nodeDataDTO); |
| | | |
| | | //æ¥è¯¢æ¨éæ¥å£åæ° |
| | | DockingSystemConfig dockingSystemConfig = dockingSystemConfigService.getById(systeminfooid); |
| | | String paramType = dockingSystemConfig.getParamType();//xml/json |
| | | if(paramType.equals(DATATYPE_JSON)){ |
| | | Object object = JSONObject.toJSON(jsonRootDataDTO); |
| | | sendString = object.toString(); |
| | | }else{ |
| | | //ç»ç»è¿åæ¥å£ä¿¡æ¯ |
| | | XStream xStream = new XStream(new DomDriver()); |
| | | xStream.processAnnotations(NodeDataDTO.class); |
| | | xStream.autodetectAnnotations(true); |
| | | sendString = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(nodeDataDTO); |
| | | } |
| | | //è°ç¨æ¥å£ |
| | | callInterface(sendString,dockingSystemConfig,dockingTask); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | //æ¯ä¸ä¸ªtaskä¸ä¸ªäºç© |
| | | } |
| | | } |
| | | } |
| | | /*** |
| | | * åéç¼ç ä¸»æ°æ® |
| | | */ |
| | | private void sendpushDataForService (List<DockingTask> dockingTaskS){ |
| | | |
| | | //æ¯ä¸ªtask便¬¡æ§è¡æ¨é |
| | | for (DockingTask dockingTask:dockingTaskS){ |
| | | //æ¯ä¸ªtaskä¸ä¸ªäºå¡ï¼å¼å¯ |
| | | String paramString=""; |
| | | String sendString=""; |
| | | String backString=""; |
| | | try { |
| | | //æ¥è¯¢ç³»ç»æ¥å£ä¿¡æ¯,ip method,dataType |
| | | String systeminfooid = dockingTask.getSysInfoOid();//sysininfo çoid |
| | | String classifyoid = dockingTask.getClassifyOid(); |
| | | //æ¥è¯¢è¦æ¨éçæ°æ® |
| | | String btmoid = dockingTask.getBtmOid();//æ°æ®btmid |
| | | //表示æ¯ä¸»æ°æ® |
| | | CodeClassifyTemplateVO codeClassifyTemplateVO = mdmEngineServiceI.getUsedTemplateByClassifyOid(classifyoid); |
| | | R<List<Map<String, String>>> r = mdmEngineServiceI.getDataByOid(btmoid, codeClassifyTemplateVO.getOid()); |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = codeClassifyTemplateVO.getAttributes(); |
| | | Map<String/**è±æåç§°**/, String/**䏿åç§°**/> attrIdNameMap = attrVOS.stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(Locale.ROOT), t -> t.getName(), (o1, o2) -> o2)); |
| | | Map<String, String> data = new HashMap<>(); |
| | | if (r == null) { |
| | | JSONObject josni = bladeRedis.get(DOCKING_CACHE2_DELETE + btmoid); |
| | | data = (Map) josni; |
| | | } else { |
| | | data = r.getData().get(0); |
| | | } |
| | | List<NodeProDTO> nodeProDTOS = new ArrayList<>(); |
| | | Map<String, String> finalData = data; |
| | | attrIdNameMap.keySet().forEach(field -> { |
| | | String outName = attrIdNameMap.get(field); |
| | | if (finalData.containsKey(field)) { |
| | | String Value = finalData.get(field); |
| | | NodeProDTO nodeProDTO = new NodeProDTO(); |
| | | nodeProDTO.setFiledName(field); |
| | | nodeProDTO.setOutname(outName); |
| | | nodeProDTO.setFiledValue(Value); |
| | | nodeProDTOS.add(nodeProDTO); |
| | | } |
| | | }); |
| | | |
| | | String[] classCodeLeves = dockingTask.getClassifyId().split(","); |
| | | NodeJosnDTO nodeJosnDTO = new NodeJosnDTO(); |
| | | NodedataDTO nodeDataDTO = new NodedataDTO(); |
| | | NodeObjectDTO nodeObjectDTO = new NodeObjectDTO(); |
| | | nodeObjectDTO.setCode(dockingTask.getId());//设置ç¼ç |
| | | nodeObjectDTO.setClassCode(classCodeLeves[0]); |
| | | nodeObjectDTO.setStatus(data.get("lcstatus")); |
| | | nodeObjectDTO.setLibrary(classCodeLeves[classCodeLeves.length - 1]); |
| | | nodeObjectDTO.setPro(nodeProDTOS); |
| | | List<NodeObjectDTO> nodeObjectDTOS = new ArrayList<>(); |
| | | nodeObjectDTOS.add(nodeObjectDTO); |
| | | nodeDataDTO.setObject(nodeObjectDTOS); |
| | | nodeJosnDTO.setData(nodeDataDTO); |
| | | //æ¥è¯¢æ¨éæ¥å£åæ° |
| | | DockingSystemConfig dockingSystemConfig = dockingSystemConfigService.getById(systeminfooid); |
| | | String paramType = dockingSystemConfig.getParamType();//xml/json |
| | | if (paramType.equals(DATATYPE_JSON)) { |
| | | Object object = JSONObject.toJSON(nodeJosnDTO); |
| | | sendString = object.toString(); |
| | | } else { |
| | | //ç»ç»è¿åæ¥å£ä¿¡æ¯ |
| | | XStream xStream = new XStream(new DomDriver()); |
| | | xStream.processAnnotations(NodedataDTO.class); |
| | | xStream.autodetectAnnotations(true); |
| | | sendString = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n" + xStream.toXML(nodeDataDTO); |
| | | } |
| | | //è°ç¨æ¥å£ |
| | | callInterface(sendString,dockingSystemConfig, dockingTask); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | } |
| | | } |
| | | } |
| | | /*** |
| | | * è°ç¨æ¥å£ |
| | | * @param sendString |
| | | * @param dockingSystemConfig |
| | | * @param dockingTask |
| | | * @throws Throwable |
| | | */ |
| | | private void callInterface(String sendString , DockingSystemConfig dockingSystemConfig,DockingTask dockingTask) throws Throwable{ |
| | | String paramString = ""; |
| | | |
| | | String backString = ""; |
| | | String msg=""; |
| | | String url = dockingSystemConfig.getRequestUrl();//url |
| | | List<ResultNodeObjectDTO> resultNodeObjectDTOS =new ArrayList<>(); |
| | | try { |
| | | boolean usedFlag= dockingSystemConfig.getUsedFlag().equals("true")?true:false; |
| | | if(!usedFlag){ |
| | | throw new Throwable("æ¥å£å·²ç»åç¨ï¼"); |
| | | } |
| | | String type = dockingSystemConfig.getInterfaceType().toLowerCase(Locale.ROOT);//get/post/webserver/corba |
| | | String paramType = dockingSystemConfig.getParamType();//xml/json |
| | | String returnType = dockingSystemConfig.getReturnType();//xml/json |
| | | String requestmethod= dockingSystemConfig.getRequestMethod(); |
| | | String interfaceFunction = dockingSystemConfig.getInterfaceFunction();//ä¸»è¦æ¯webserviceçæ¹æ³å |
| | | String namespace = dockingSystemConfig.getNamespace();//namespace |
| | | String soapaction = dockingSystemConfig.getSoapAction();//soapaction |
| | | String targName = dockingSystemConfig.getTargetName();//targName |
| | | String cxfaxis = dockingSystemConfig.getCxfAxis();//webserviceæ¯cxf/axis |
| | | //æ¥è¯¢param |
| | | List<DockingSysIntParam> dockingSysIntParamList = dockingSysIntParamService.list(Wrappers.<DockingSysIntParam>query().lambda().eq(DockingSysIntParam::getInfoOid,dockingSystemConfig.getOid())); |
| | | //æ¥è¯¢header |
| | | List<DockingSysIntHeader> dockingSysIntHeaderList = dockingSysIntHeaderService.list(Wrappers.<DockingSysIntHeader>query().lambda().eq(DockingSysIntHeader::getInfoOid,dockingSystemConfig.getOid())); |
| | | if(type.equals(URLTYPE_HTTP)) { |
| | | if (requestmethod.equals(URLTYPE_GET)) {//GETè¯·æ± |
| | | String sendurl = url + "?" + DATA_PARAM_NAME + "=" + sendString; |
| | | //æ¼æ¥param |
| | | for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) { |
| | | sendurl = sendurl + "&" + dockingSysIntParam.getParamKey() + "=" + dockingSysIntParam.getParamValue(); |
| | | } |
| | | paramString = sendurl; |
| | | backString = HttpUtils.get(sendurl); |
| | | } else if (requestmethod.equals(URLTYPE_POST)) {//POSTè¯·æ± |
| | | MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); |
| | | for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) { |
| | | params.add(dockingSysIntParam.getParamKey(), dockingSysIntParam.getParamValue()); |
| | | } |
| | | params.add(DATA_PARAM_NAME,sendString); |
| | | paramString = params.toString(); |
| | | MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); |
| | | for (DockingSysIntHeader dockingSysIntHeader : dockingSysIntHeaderList) { |
| | | headers.add(dockingSysIntHeader.getHeaderKey(), dockingSysIntHeader.getHeaderValue()); |
| | | } |
| | | backString = HttpUtils.post(url, params, headers); |
| | | } |
| | | if(backString.startsWith("\"")){ |
| | | backString=backString.substring(backString.indexOf("\"")+1); |
| | | } |
| | | if(backString.endsWith("\"")){ |
| | | backString=backString.substring(0,backString.lastIndexOf("\"")); |
| | | } |
| | | if(backString.contains("\n")){ |
| | | String res="\n"; |
| | | backString= backString.replaceAll(res,""); |
| | | } |
| | | if(backString.contains("\\")){ |
| | | String res="\\\\\""; |
| | | backString= backString.replaceAll(res,"\"").trim(); |
| | | } |
| | | }else if (type.equals(URLTYPE_WEBSERVICE)) {//webserverè¯·æ± |
| | | MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); |
| | | for (DockingSysIntParam dockingSysIntParam : dockingSysIntParamList) { |
| | | params.add(dockingSysIntParam.getParamKey(), dockingSysIntParam.getParamValue()); |
| | | } |
| | | |
| | | paramString = sendString; |
| | | MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); |
| | | for (DockingSysIntHeader dockingSysIntHeader : dockingSysIntHeaderList) { |
| | | headers.add(dockingSysIntHeader.getHeaderKey(), dockingSysIntHeader.getHeaderValue()); |
| | | } |
| | | backString = WsErpClientUtil.sendMsg(url, namespace, soapaction, interfaceFunction, targName, sendString, 10000); |
| | | |
| | | } else {//corbaæ¥å£ |
| | | //paramString=sendString; |
| | | // backString = jacorbClient.getBOFactoryService().sendCode(sendString); |
| | | } |
| | | |
| | | ResultJsonDTO resultJsonDTO = new ResultJsonDTO(); |
| | | if(returnType.equals(DATATYPE_JSON)){ |
| | | resultJsonDTO =JSONObject.toJavaObject(JSONObject.parseObject(backString), ResultJsonDTO.class); |
| | | }else { |
| | | //ç»ç»è¿åæ¥å£ä¿¡æ¯ |
| | | XStream xStream = new XStream(new DomDriver()); |
| | | xStream.processAnnotations(ResultNodeDataDTO.class); |
| | | xStream.autodetectAnnotations(true); |
| | | ResultNodeDataDTO resultNodeDataDTO = (ResultNodeDataDTO) xStream.fromXML(backString); |
| | | resultJsonDTO.setData(resultNodeDataDTO); |
| | | } |
| | | ResultNodeDataDTO resultNodeDataDTO=resultJsonDTO.getData(); |
| | | resultNodeObjectDTOS=resultNodeDataDTO.getObject(); |
| | | |
| | | }catch (Throwable e){ |
| | | msg="è°ç¨æ¥å£å¤±è´¥:"+e.getMessage(); |
| | | e.printStackTrace(); |
| | | log.error("è°ç¨æ¥å£å¤±è´¥:"+e); |
| | | // throw new Throwable("è°ç¨æ¥å£å¤±è´¥:"+e); |
| | | ResultNodeObjectDTO resultNodeObjectDTO=new ResultNodeObjectDTO(); |
| | | resultNodeObjectDTO.setErroid("1"); |
| | | resultNodeObjectDTO.setMsg(msg); |
| | | resultNodeObjectDTO.setCode(dockingSystemConfig.getPushType().equalsIgnoreCase("2")?dockingTask.getClassifyId():dockingTask.getId()); |
| | | resultNodeObjectDTO.setOid(dockingTask.getBtmOid()); |
| | | resultNodeObjectDTOS.add(resultNodeObjectDTO); |
| | | }finally { |
| | | boolean isSend = false; |
| | | for (ResultNodeObjectDTO resultNodeObjectDTO:resultNodeObjectDTOS){ |
| | | String erroid = resultNodeObjectDTO.getErroid(); |
| | | msg = resultNodeObjectDTO.getMsg(); |
| | | if("0".equals(erroid)){ |
| | | isSend = true; |
| | | }else if("1".equals(erroid)){ |
| | | isSend=false; |
| | | }else{ |
| | | isSend=false; |
| | | } |
| | | DockingLog dockingLogeDO = new DockingLog(); |
| | | String oid=VciBaseUtil.getPk(); |
| | | dockingLogeDO.setOid(oid); |
| | | dockingLogeDO.setSystemCode(dockingTask.getSystemCode()); |
| | | dockingLogeDO.setSystemName(dockingTask.getSystemName()); |
| | | dockingLogeDO.setSystemOid(dockingTask.getSystemOid()); |
| | | dockingLogeDO.setClassifyOid(dockingTask.getClassifyOid()); |
| | | dockingLogeDO.setClassifyId(dockingTask.getClassifyId()); |
| | | dockingLogeDO.setClassifyName(dockingTask.getClassifyName()); |
| | | dockingLogeDO.setId(dockingTask.getId()); |
| | | dockingLogeDO.setUniqueCode(dockingTask.getUniqueCode()); |
| | | dockingLogeDO.setParamString(paramString); |
| | | dockingLogeDO.setReturnString(backString); |
| | | dockingLogeDO.setInterfaceStatus(isSend?"true":"false"); |
| | | dockingLogeDO.setType(DATA_LOGE_OUT); |
| | | dockingLogeDO.setMsg(msg); |
| | | log.error("éææ¨éæ°æ®,systemcode:"+dockingTask.getSystemCode()+",systemname:"+dockingTask.getSystemName()+",url:"+url+",param:"+paramString+",e:"+msg); |
| | | dockingLogeService.save(dockingLogeDO); |
| | | } |
| | | //å
¨é½æ¥æ¶æåçæ
åµä¸,ä¿®æ¹dockingtask sendflag为已åé |
| | | if(isSend) { |
| | | dockingTask.setSendFlag(MdmDuckingConstant.SEND_FLAG_TRUE); |
| | | dockingTaskService.updateById(dockingTask); |
| | | } |
| | | } |
| | | } |
| | | /*** |
| | | * æ¥è¯¢éè¦éæçä¸å¡æ°æ®ä»»å¡ |
| | | */ |
| | | private void sendpushDataForService (){ |
| | | initSysadmin(); |
| | | //æ¥è¯¢åªäºä»»å¡è¿æ²¡ææ§è¡å®æ |
| | | //VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(DockingTaskDO.class); |
| | | //queryWrapper.addQueryMap("sendFlag",MdmDuckingConstant.SEND_FLAG_FALSE); |
| | | // queryWrapper.addQueryMap("btmId", QueryOptionConstant.NOTIN + "(" + VciBaseUtil.toInSql(DOCKING_DEFAULT_CLASSIFY.toUpperCase(Locale.ROOT)) + ")"); |
| | | |
| | | //æ ¹æ®ç±»å廿¥è¯¢éè¦éæçåç±»æè
æ°æ® |
| | | LambdaQueryWrapper<DockingTask> queryWrapper = Wrappers.<DockingTask>lambdaQuery(); |
| | | queryWrapper.eq(DockingTask::getSendFlag,MdmDuckingConstant.SEND_FLAG_FALSE); |
| | | queryWrapper.notIn(DockingTask::getBtmId,DOCKING_DEFAULT_CLASSIFY.toLowerCase(Locale.ROOT)); |
| | | List<DockingTask> dockingTaskDOS = dockingTaskService.list(queryWrapper); |
| | | sendpushDataForService(dockingTaskDOS); |
| | | } |
| | | |
| | | /*** |
| | | * æ¥è¯¢éè¦éæçç¶åç±»ä»»å¡ |
| | | */ |
| | | private void sendpushClsfForService(){ |
| | | initSysadmin(); |
| | | /* //æ¥è¯¢åªäºä»»å¡è¿æ²¡ææ§è¡å®æ |
| | | VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(DockingTaskDO.class); |
| | | queryWrapper.addQueryMap("sendFlag",MdmDuckingConstant.SEND_FLAG_FALSE); |
| | | queryWrapper.addQueryMap("btmId",DOCKING_DEFAULT_CLASSIFY.toUpperCase(Locale.ROOT)); |
| | | List<DockingTaskDO> dockingTaskDOS = dockingTaskDaoI.selectByWrapper(queryWrapper);*/ |
| | | |
| | | //æ ¹æ®ç±»å廿¥è¯¢éè¦éæçåç±»æè
æ°æ® |
| | | LambdaQueryWrapper<DockingTask> queryWrapper = Wrappers.<DockingTask>lambdaQuery(); |
| | | queryWrapper.eq(DockingTask::getSendFlag,MdmDuckingConstant.SEND_FLAG_FALSE); |
| | | queryWrapper.eq(DockingTask::getBtmId,DOCKING_DEFAULT_CLASSIFY.toLowerCase(Locale.ROOT)); |
| | | List<DockingTask> dockingTaskDOS = dockingTaskService.list(queryWrapper); |
| | | sendpushClsfForService(dockingTaskDOS); |
| | | } |
| | | public void initSysadmin(){ |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setUserId("sysAdmin"); |
| | | sessionInfo.setUserName("ç³»ç»ç®¡çå"); |
| | | sessionInfo.setIp(WebUtil.getLocalIp()); |
| | | sessionInfo.setUserOid("193C026F-7DB8-27B4-F383-4E8BE083FB07"); |
| | | sessionInfo.setUserSecret(UserSecretEnum.PRIVACY.getValue()+""); |
| | | WebUtil.setSessionInfo(sessionInfo); |
| | | } |
| | | /** |
| | | * dockingdataæ ¹æ®oidä¿®æ¹sendflag |
| | | * @param oid |
| | |
| | | |
| | | import com.alibaba.cloud.commons.lang.StringUtils; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.thoughtworks.xstream.XStream; |
| | | import com.thoughtworks.xstream.io.xml.DomDriver; |
| | | import com.vci.ubcs.code.bo.CodeClassifyFullInfoBO; |
| | | import com.vci.ubcs.code.constant.MdmDuckingConstant; |
| | | import com.vci.ubcs.code.dto.CodeOrderDTO; |
| | | import com.vci.ubcs.code.dto.CodeOrderSecDTO; |
| | | import com.vci.ubcs.code.entity.*; |
| | | import com.vci.ubcs.code.enumpack.CodeDefaultLC; |
| | | import com.vci.ubcs.code.enumpack.CodeSecTypeEnum; |
| | | import com.vci.ubcs.code.enumpack.SysIntegrationDataFlowTypeEnum; |
| | | import com.vci.ubcs.code.enumpack.sysIntegrationPushTypeEnum; |
| | | import com.vci.ubcs.code.mapper.CommonsMapper; |
| | | import com.vci.ubcs.code.service.*; |
| | | import com.vci.ubcs.code.util.ClientBusinessObject; |
| | |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.ubcs.code.constant.MdmDuckingConstant.DOCKING_DEFAULT_CLASSIFY; |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.DEFAULT_SYNC_ATTR_LIST; |
| | | import static com.vci.ubcs.code.constant.MdmEngineConstant.IMPORT_ROW_INDEX; |
| | | import static com.vci.ubcs.code.enumpack.CodeSecTypeEnum.CODE_CLASSIFY_SEC; |
| | |
| | | |
| | | @Resource |
| | | private MdmIOService mdmIOService; |
| | | |
| | | @Resource |
| | | private IDockingSystemConfigService dockingSystemConfigService; |
| | | |
| | | @Autowired |
| | | private ICodeClassifyValueService codeClassifyValueService; |
| | |
| | | } |
| | | ClassfysVO classfysVO = interParameterVO.getData().getClassifys(); |
| | | systemId = interParameterVO.getData().getSystemId(); |
| | | //æ ¡éªæ¯å¦é
ç½® |
| | | boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue()); |
| | | if(!checkPass){ |
| | | errorid="101"; |
| | | throw new Throwable("ç³»ç»æ è¯ä¸ºã"+systemId+"ã,"+sysIntegrationPushTypeEnum.ACCPET_APPCODE.getText()+"æ¥å£é
置已åç¨æè
æªé
ç½®ï¼è¯·èç³»ç¼ç 管çåï¼"); |
| | | } |
| | | UserVO userVo = interParameterVO.getData().getUser(); |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | |
| | | } |
| | | ClassfysVO classfysVO = interParameterVO.getData().getClassifys(); |
| | | systemId = interParameterVO.getData().getSystemId(); |
| | | |
| | | |
| | | //æ ¡éªæ¯å¦é
ç½® |
| | | boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getValue()); |
| | | if(!checkPass){ |
| | | errorid="101"; |
| | | throw new Throwable("ç³»ç»æ è¯ä¸ºã"+systemId+"ã,"+sysIntegrationPushTypeEnum.ACCPET_EDITCODE.getText()+"æ¥å£é
置已åç¨æè
æªé
ç½®ï¼è¯·èç³»ç¼ç 管çåï¼"); |
| | | } |
| | | |
| | | UserVO userVo = interParameterVO.getData().getUser(); |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | |
| | | String libId= libraryVO.getId(); |
| | | List<String> classifyIdList= libraryVO.getClassifyid(); |
| | | List<CodeClassifyVO> codeClassifyVOS =new ArrayList<>(); |
| | | |
| | | //æ ¡éªæ¯å¦é
ç½® |
| | | boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getValue()); |
| | | if(!checkPass){ |
| | | errorid="101"; |
| | | throw new Throwable("ç³»ç»æ è¯ä¸ºã"+systemId+"ã,"+sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILY.getText()+"æ¥å£é
置已åç¨æè
æªé
ç½®ï¼è¯·èç³»ç¼ç 管çåï¼"); |
| | | } |
| | | |
| | | //è¿æ¯è´¦å·ä¿¡æ¯ |
| | | //è¿æ¯è´¦å·ä¿¡æ¯ |
| | | if(userVo!=null) { |
| | |
| | | msg = "æ¥å£åæ°ï¼library 为null"; |
| | | throw new Throwable(msg); |
| | | } |
| | | |
| | | //æ ¡éªæ¯å¦é
ç½® |
| | | boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getValue()); |
| | | if(!checkPass){ |
| | | errorid="101"; |
| | | throw new Throwable("ç³»ç»æ è¯ä¸ºã"+systemId+"ã,"+sysIntegrationPushTypeEnum.ACCPET_QUERYDATA.getText()+"æ¥å£é
置已åç¨æè
æªé
ç½®ï¼è¯·èç³»ç¼ç 管çåï¼"); |
| | | } |
| | | //å
ç®ç§°æ¯å¦æå
³è模æ¿ï¼ææ¨¡æ¿è¦å
å é¤ |
| | | |
| | | List<CodeClassify> libIdDos =classifyService.selectByWrapper(Wrappers.<CodeClassify>query().lambda().eq(CodeClassify::getId,library)); |
| | |
| | | String libId= libraryVO.getId(); |
| | | List<String> classifyIdList= libraryVO.getClassifyid(); |
| | | List<CodeClassifyVO> codeClassifyVOS =new ArrayList<>(); |
| | | |
| | | //æ ¡éªæ¯å¦é
ç½® |
| | | boolean checkPass= checkIspass(systemId, SysIntegrationDataFlowTypeEnum.ACCEPT.getValue(), sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getValue()); |
| | | if(!checkPass){ |
| | | errorid="101"; |
| | | throw new Throwable("ç³»ç»æ è¯ä¸ºã"+systemId+"ã,"+sysIntegrationPushTypeEnum.ACCPET_QUERYCLAFILYRULE.getText()+"æ¥å£é
置已åç¨æè
æªé
ç½®ï¼è¯·èç³»ç¼ç 管çåï¼"); |
| | | } |
| | | //è¿æ¯è´¦å·ä¿¡æ¯ |
| | | //è¿æ¯è´¦å·ä¿¡æ¯ |
| | | if(userVo!=null) { |
| | |
| | | return resultStr; |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * æ ¡éªæ¯å¦åäºé
ç½® |
| | | * @param systemId,ç³»ç»æ è¯ |
| | | * @param type:æ¥å£ç±»å |
| | | * @param operationType:æ¥å£æä½ç±»å |
| | | * @return |
| | | */ |
| | | private boolean checkIspass(String systemId,String type,String operationType){ |
| | | //æ ¹æ®ç±»å廿¥è¯¢éè¦éæçåç±»æè
æ°æ® |
| | | LambdaQueryWrapper<DockingSystemConfig> queryWrapper = Wrappers.<DockingSystemConfig>lambdaQuery(); |
| | | queryWrapper.eq(DockingSystemConfig::getUsedFlag, MdmDuckingConstant.SEND_FLAG_TRUE); |
| | | queryWrapper.eq(DockingSystemConfig::getSysBaseId,systemId); |
| | | queryWrapper.eq(DockingSystemConfig::getDataFlowType,type); |
| | | queryWrapper.eq(DockingSystemConfig::getPushType,operationType); |
| | | return dockingSystemConfigService.count(queryWrapper)>0?true:false; |
| | | } |
| | | } |
| | |
| | | import com.vci.ubcs.omd.constant.BtmTypeConstant; |
| | | import com.vci.ubcs.omd.constant.BtmTypeFieldConstant; |
| | | import com.vci.ubcs.omd.dto.BtmAndLinkTypeDdlDTO; |
| | | import com.vci.ubcs.omd.entity.Attribute; |
| | | import com.vci.ubcs.omd.entity.*; |
| | | import com.vci.ubcs.omd.repeater.DomainRepeater; |
| | | import com.vci.ubcs.omd.service.*; |
| | | import com.vci.ubcs.omd.vo.*; |
| | |
| | | import com.vci.ubcs.starter.web.constant.OmdRegExpConstant; |
| | | import com.vci.ubcs.omd.dto.BtmTypeDTO; |
| | | import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import com.vci.ubcs.omd.entity.BtmTypeAttribute; |
| | | import com.vci.ubcs.omd.entity.ModifyAttributeInfo; |
| | | import com.vci.ubcs.omd.mapper.BtmTypeMapper; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | |
| | | */ |
| | | @Autowired |
| | | private IAttributeService attributeService; |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private ILifeCycleService lifeCycleService; |
| | | |
| | | /** |
| | | * 表ååç¼ |
| | |
| | | if (btmTypeDTO.isLifeCycleFlag()){ |
| | | // éè¦æ§å¶çå½å¨æ |
| | | //æ£æ¥ä½¿ç¨ççå½å¨ææ¯å¦åå¨ |
| | | // if (StringUtils.isNotBlank(btmTypeDTO.getLifeCycleId()) |
| | | // && !FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE.equalsIgnoreCase(btmTypeDTO.getLifeCycleId())) { |
| | | // if (lifeCycleServiceI.checkLifeCycleExist(btmTypeDTO.getLifeCycleId())) { |
| | | // throw new VciBaseException("çå½å¨æ{0}[{1}]å¨ç³»ç»ä¸ä¸åå¨ï¼è¯·å
æ¥è¯", |
| | | // new Object[]{btmTypeDTO.getLifeCycleId(), btmTypeDTO.getLifeCycleName()}); |
| | | // } |
| | | // } |
| | | if (StringUtils.isNotBlank(btmTypeDTO.getLifeCycleId()) |
| | | // && !FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE.equalsIgnoreCase(btmTypeDTO.getLifeCycleId()) |
| | | ) { |
| | | if (lifeCycleService.getOne(Wrappers.<LifeCycleRule>query().lambda().eq(LifeCycleRule::getId,btmTypeDTO.getLifeCycleId())) == null) { |
| | | throw new VciBaseException("çå½å¨æ{0}[{1}]å¨ç³»ç»ä¸ä¸åå¨ï¼è¯·å
æ¥è¯", |
| | | new Object[]{btmTypeDTO.getLifeCycleId(), btmTypeDTO.getLifeCycleName()}); |
| | | } |
| | | } |
| | | // if (StringUtils.isNotBlank(btmTypeDTO.getSubLifeCycleId())) { |
| | | // if (lifeCycleServiceI.checkLifeCycleExist(btmTypeDTO.getSubLifeCycleId())) { |
| | | // throw new VciBaseException("å¤ç¨çå½å¨æ{0}[{1}]ä¸å
¶ä¸ææäºå¨ç³»ç»ä¸ä¸åå¨ï¼è¯·å
æ¥è¯", |
| | |
| | | try { |
| | | Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel)); |
| | | List<BtmTypeVO> vos = BtmTypeWrapper.build().listEntityVO(baseMapper.selectAll()); |
| | | Map<String, List<BtmTypeVO>> domainMap = vos.stream().sorted(Comparator.comparing(BtmTypeVO::getId)).collect(Collectors.groupingBy(BtmTypeVO::getBizDomain)); |
| | | if (CollectionUtils.isEmpty(vos)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Map<String, List<BtmTypeVO>> domainMap = Optional.ofNullable(vos).orElseGet(ArrayList::new).stream().sorted(Comparator.comparing(BtmTypeVO::getId)).collect(Collectors.groupingBy(BtmTypeVO::getBizDomain)); |
| | | List<BtmTreeVO> treeList = new ArrayList<>(); |
| | | domainMap.forEach((k,v)-> { |
| | | if (domain.containsKey(k)){ |
| | |
| | | parent.setName(label); |
| | | parent.setLabel(label); |
| | | parent.setId(k); |
| | | parent.setLevel(1); |
| | | parent.setChildList(v.stream().map(s -> { |
| | | BtmTreeVO child = new BtmTreeVO(); |
| | | child.setOid(s.getOid()); |
| | | child.setName(s.getName()); |
| | | child.setId(s.getId()); |
| | | child.setLevel(2); |
| | | child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")")); |
| | | return child; |
| | | }).collect(Collectors.toList())); |
| | |
| | | try { |
| | | Map<String, String> domain = Optional.ofNullable(DomainRepeater.getDomain()).orElseGet(ArrayList::new).stream().collect(Collectors.toMap(DomainVO::getValue, DomainVO::getLabel)); |
| | | List<LinkTypeVO> vos = LinkTypeWrapper.build().listEntityVO(baseMapper.selectAll(), null); |
| | | Map<String, List<LinkTypeVO>> domainMap = vos.stream().collect(Collectors.groupingBy(LinkTypeVO::getBizDomain)); |
| | | if (CollectionUtils.isEmpty(vos)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Map<String, List<LinkTypeVO>> domainMap = Optional.ofNullable(vos).orElseGet(ArrayList::new).stream().collect(Collectors.groupingBy(LinkTypeVO::getBizDomain)); |
| | | List<BtmTreeVO> treeList = new ArrayList<>(); |
| | | domainMap.forEach((k,v)-> { |
| | | if (domain.containsKey(k)){ |
| | |
| | | BtmTreeVO parent = new BtmTreeVO(); |
| | | parent.setName(label); |
| | | parent.setId(k); |
| | | parent.setLevel(1); |
| | | parent.setLabel(label); |
| | | parent.setChildList(v.stream().map(s -> { |
| | | BtmTreeVO child = new BtmTreeVO(); |
| | |
| | | child.setLabel(s.getId() + (s.getName() == null ? "" : "(" + s.getName() + ")")); |
| | | child.setId(s.getId()); |
| | | child.setName(s.getName()); |
| | | child.setLevel(2); |
| | | return child; |
| | | }).collect(Collectors.toList())); |
| | | treeList.add(parent); |
| | |
| | | }); |
| | | vo.setFromBtmTypes(fromBtm); |
| | | vo.setToBtmTypes(toBtm); |
| | | vo.setTableName(vo.getTableName().toUpperCase(Locale.ROOT)); |
| | | vo.setTableName(Optional.ofNullable(vo.getTableName()).orElseGet(String::new).toUpperCase(Locale.ROOT)); |
| | | // æä¸¾å¤ç |
| | | vo.setDomainText(NewAppConstantEnum.getTextByName(vo.getBizDomain())); |
| | | return vo; |
| | |
| | | <result column="last_modifier" jdbcType="VARCHAR" property="lastModifier" /> |
| | | <result column="last_modify_time" jdbcType="TIMESTAMP" property="lastModifyTime" /> |
| | | <result column="ts" jdbcType="TIMESTAMP" property="ts" /> |
| | | <result column="biz-domain" jdbcType="VARCHAR" property="bizDomain" /> |
| | | <result column="biz_domain" jdbcType="VARCHAR" property="bizDomain" /> |
| | | </resultMap> |
| | | |
| | | <sql id="base_query_column"> |
| | | oid, id, name, description, shape, impl_class, from_btm_type, from_btm_type_name, |
| | | to_btm_type, to_btm_type_name, btm_name, owner, creator, create_time, last_modifier, last_modify_time, |
| | | ts, biz-domain |
| | | ts, biz_domain |
| | | </sql> |
| | | |
| | | <sql id="tableName"> |