Merge remote-tracking branch 'origin/master'
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, size, params) => { |
| | | export const getDataList = (page, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridDockingData', |
| | | method: 'get', |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, limit, params) => { |
| | | export const getLogoList = (page, limit, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridLoge', |
| | | method: 'get', |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export const getList = (page, size, params) => { |
| | | export const getTaskList = (page, size, params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/dockingManagement/gridDockingTask', |
| | | method: 'get', |
| | |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | eventList:{ |
| | | type:Array |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | eventFlag:{}, |
| | | TreeValueForm:'', |
| | | updateIndex: 0, |
| | | form: {}, |
| | |
| | | slotColumnList: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | mounted() { |
| | | this.handleResize(); |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | computed: { |
| | | localTrendsSpan() { |
| | | if (this.trendsSpan) { |
| | |
| | | methods: { |
| | | // 渲染表单模板 |
| | | templateRender(formItemList,TreeValue) { |
| | | if (this.eventList) { |
| | | this.eventFlag= this.eventList.some(item => { |
| | | if (item.classifyInvokeEditFlag === 'true') { |
| | | console.log('even', item); |
| | | this.eventObject = item; |
| | | return true; |
| | | } |
| | | }); |
| | | // console.log('add',add) |
| | | } |
| | | // 无需分组数据 |
| | | let column = []; |
| | | let group = []; |
| | |
| | | let value='' |
| | | formItemList.forEach((formItem) => { |
| | | formItem = this.resetFormConfig(formItem); |
| | | console.log(formItem) |
| | | // console.log('formItem.dicData.value',formItem.dicData) |
| | | if (formItem.type === "line") { |
| | | group.push({ |
| | |
| | | format: formItem.dateFormate, |
| | | keyAttr: formItem.keyAttr, |
| | | value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || |
| | | (formItem.secType == "codedatesec"?formItem.codeDateValue: null) || ( TreeValue&& formItem.secType == "codelevelsec" ? TreeValue : null), |
| | | (formItem.secType == "codedatesec"?formItem.codeDateValue: null) || ( TreeValue&& formItem.secType == "codelevelsec" ? TreeValue : null) , |
| | | placeholder: formItem.inputTip, |
| | | comboxKey: formItem.comboxKey, |
| | | tip: formItem.tooltips, |
| | |
| | | :type="type" |
| | | :TreeValue="TreeValue" |
| | | :rowOid="rowOid" |
| | | :eventList="eventList" |
| | | :templateOid="templateOid" |
| | | v-if="dialogVisible" |
| | | ref="FormTemplate" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | eventList:[], |
| | | //码值的第二种只读隐藏情况 |
| | | codeValueApplyStatus:'', |
| | | loading: false, |
| | |
| | | this.$refs.FormTemplate.templateRender( |
| | | res.data.formDefineVO.items |
| | | ); |
| | | this.eventList=res.data.templateVO.attributes |
| | | // this.$refs.FormTemplate.$emit('eventList', res.data.templateVO.attributes); |
| | | if (Object.keys(this.setForm).length > 0) { |
| | | this.$refs.FormTemplate.form = this.setForm; |
| | | } |
| | |
| | | }, |
| | | Treedata: { |
| | | type: Array |
| | | } |
| | | }, |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | <el-option label="数据查询" value="queryData"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 集成任务 是否推送成功 集成数据 是否分解任务--> |
| | | <!-- 集成任务 是否推送成功 |
| | | 集成数据 是否分解任务--> |
| | | <el-form-item v-if="((status.type == 'task' || status.type == 'data')&& status.stateTaskDataFlag)" size="small"> |
| | | <el-select v-model="formInline.stateTask" placeholder="请选择状态"> |
| | | <el-option label="是" value="true"></el-option> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList} from "@/api/docking/loge"; |
| | | import {getLogoList} from "@/api/docking/loge"; |
| | | import {getDataList} from "@/api/docking/data"; |
| | | import {getTaskList} from "@/api/docking/task"; |
| | | export default { |
| | | name: "VciDockingSearch", |
| | | props:['SearchObject','page','formInline','status'], |
| | |
| | | }, |
| | | SaveHandler(){ |
| | | let name = this.SearchObject.searchData[this.formInline.type].prop; |
| | | getList(this.page.currentPage, this.page.pageSize, { [`conditionMap[${name}_like]`]: this.formInline.text}).then(res => { |
| | | if(!res.data.data.records){ |
| | | this.$message.error('暂未查到数据!') |
| | | }else { |
| | | let Data=res.data.data; |
| | | this.$emit('getList',Data); |
| | | } |
| | | }); |
| | | const requestApi = (api) => { |
| | | api(this.page.currentPage, this.page.pageSize, { [`conditionMap[${name}_like]`]: this.formInline.text}).then(res => { |
| | | if(!res.data.data.records){ |
| | | this.$message.error('暂未查到数据!') |
| | | }else { |
| | | let Data=res.data.data; |
| | | this.$emit('getList',Data); |
| | | } |
| | | }); |
| | | } |
| | | //日志 |
| | | if(this.status.type=='loge'){ |
| | | requestApi(getLogoList); |
| | | } |
| | | //数据 |
| | | if(this.status.type=='data'){ |
| | | requestApi(getDataList); |
| | | } |
| | | //任务 |
| | | if(this.status.type=='task'){ |
| | | requestApi(getTaskList); |
| | | } |
| | | }, |
| | | handleSearch() { |
| | | const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga} = this.status; |
| | | const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga } = this.status; |
| | | const { currentPage, pageSize } = this.page; |
| | | const { cut, state, stateTask, Date, lastDate, taskCut } = this.formInline; |
| | | const requestParams = {}; |
| | | const requestApi = (api) => { |
| | | api(currentPage, pageSize, requestParams).then(res => { |
| | | if(!res.data.data.records){ |
| | | this.$message.error('暂未查到数据!'); |
| | | } else { |
| | | let Data=res.data.data; |
| | | this.$emit('getList',Data); |
| | | } |
| | | }); |
| | | } |
| | | // 集成日志类型 |
| | | if (type === 'loge' && typeFlag) { |
| | | requestParams['conditionMap[type_like]'] = cut; |
| | |
| | | if ((type === 'task' || type === 'data') && sendTypeFlga) { |
| | | requestParams['conditionMap[sendType_like]'] = taskCut; |
| | | } |
| | | // 请求 |
| | | getList(currentPage, pageSize, requestParams).then(res => { |
| | | if(!res.data.data.records){ |
| | | this.$message.error('暂未查到数据!') |
| | | }else { |
| | | let Data=res.data.data; |
| | | this.$emit('getList',Data); |
| | | } |
| | | }); |
| | | |
| | | if (type == 'loge') { |
| | | requestApi(getLogoList); |
| | | } |
| | | if (type == 'data') { |
| | | requestApi(getDataList); |
| | | } |
| | | if (type == 'task') { |
| | | requestApi(getTaskList); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | // 报表设计器地址(cloud端口为8108,boot端口为80) |
| | | reportUrl: 'http://localhost:8108/ureport', |
| | | // 单点登录系统认证(ubcs-auth服务的地) |
| | | ssoUrl:'http://localhost:37000/oauth/authorize?client_id=saber&response_type=code&redirect_uri=', |
| | | // 单点登录回调地址(Saber服务的地址) |
| | | redirectUri: 'http://localhost:1888', |
| | | redirectUri: 'http://localhost:37000', |
| | | } |
| | |
| | | <div style="font-size: 15px"> |
| | | <el-image src="/img/pageLogo.jpeg" style="width: 360px; height: 280px"></el-image> |
| | | </div> |
| | | <!-- <div style="font-size: 15px" class="image-container">--> |
| | | <!-- <el-image class="background-image" src="/img/pageLogo.jpeg" ></el-image>--> |
| | | <!-- </div>--> |
| | | <!--<img class="img" src="/img/logo.png" alt="">--> |
| | | </div> |
| | | <div class="login-border"> |
| | | <div class="login-main"> |
| | |
| | | </h4> |
| | | <userLogin v-if="activeName==='user'"></userLogin> |
| | | <thirdLogin v-else-if="activeName==='third'"></thirdLogin> |
| | | |
| | | <div class="login-menu"> |
| | | <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a> |
| | | <!--<a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>--> |
| | | <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a> |
| | | <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | crudOption:{...optionRule}, |
| | | ruleForm: {}, |
| | | query: {}, |
| | | loading: true, |
| | |
| | | this.query = {}; |
| | | this.onLoad(this.page); |
| | | }, |
| | | // 编码规则快速查询 |
| | | // 编码规则快速查询searchChange |
| | | searchChange(params, done) { |
| | | this.page.currentPage = 1; |
| | | // 多个conditionMap这样传参,快速查询默认采用模糊查询 |
| | |
| | | } |
| | | this.query = requestData; |
| | | this.onLoad(this.page, this.query); |
| | | // console.log( this.findObject(this.optionRule.column,'id')) |
| | | // console.log(this.crudOption.column[0]) |
| | | // this.crudOption.column && this.crudOption.column.length > 0 |
| | | // ? (this.crudOption.column[0].value = '') |
| | | // : null; |
| | | done(); |
| | | }, |
| | | /** 编码规则当前选中行变化的时候触发*/ |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList} from "@/api/docking/data"; |
| | | import {getDataList} from "@/api/docking/data"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {mapGetters} from "vuex"; |
| | | import website from "@/config/website"; |
| | |
| | | calcHeight: 0, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchShowBtn:false, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | |
| | | query['conditionMap["' + key + '"]'] = this.query[key]; |
| | | } |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => { |
| | | getDataList(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; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList} from "@/api/docking/loge"; |
| | | import {getLogoList} from "@/api/docking/loge"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | |
| | | query['conditionMap["' + key + '"]'] = this.query[key]; |
| | | } |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => { |
| | | getLogoList(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; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList,sendData} from "@/api/docking/task"; |
| | | import {getTaskList,sendData} from "@/api/docking/task"; |
| | | import {validatenull} from "@/util/validate"; |
| | | import {mapGetters} from "vuex"; |
| | | import {remove} from "@/api/code/codeSynonym"; |
| | |
| | | calcHeight: 0, |
| | | tip: false, |
| | | searchShow: false, |
| | | searchMenuSpan: 6, |
| | | searchShowBtn:false, |
| | | // searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: true, |
| | |
| | | query['conditionMap["' + key + '"]'] = this.query[key]; |
| | | } |
| | | } |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.params, query, this.query)).then(res => { |
| | | getTaskList(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; |
| | |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)">编辑</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave(row,index)">删除</el-button> |
| | | </template> |
| | | <template slot="menuLeft"> |
| | | <template slot="menuLeft"> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">新 增 |
| | | </el-button> |
| | | <el-button size="small" plain type="primary" icon="el-icon-zoom-in" @click="applyRangeOpen">查看使用范围 |
| | |
| | | }, |
| | | methods: { |
| | | onSubmit() { |
| | | const conditionMap = {}; |
| | | if (this.form.name) { |
| | | conditionMap[`conditionMap['name_like']`] = this.form.name; |
| | | if (this.form.name || this.form.label) { |
| | | const params = {}; |
| | | if (this.form.name) { |
| | | params.name = this.form.name; |
| | | } |
| | | if (this.form.label) { |
| | | params.label = this.form.label; |
| | | } |
| | | getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize, params) |
| | | .then((res) => { |
| | | this.enumRefer.enumPage.total = res.data.data.total; |
| | | this.enumRefer.data = res.data.data.records; |
| | | }); |
| | | } |
| | | if (this.form.label) { |
| | | conditionMap[`conditionMap['label_like']`] = this.form.label; |
| | | } |
| | | getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize, conditionMap) |
| | | .then((res) => { |
| | | this.enumRefer.enumPage.total = res.data.data.total; |
| | | this.enumRefer.data = res.data.data.records; |
| | | }); |
| | | }, |
| | | enumOnLoad(){ |
| | | getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => { |
| | |
| | | <template> |
| | | <div> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="4" v-for="item in listMyTask"> |
| | | <div class="box" :style="item.style" @click="goto(item)"> |
| | | {{item.name}} |
| | | <div><avue-count-up class="value" :end="item.count"></avue-count-up></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <avue-data-box :option="option" :animation="true"></avue-data-box> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | data(){ |
| | | return { |
| | | countByServer:true, |
| | | listMyTask:[] |
| | | // listMyTask:[] |
| | | option: { |
| | | span:6, |
| | | data: [ |
| | | { |
| | | click: this.handleItemAClick, |
| | | title: '物品主数据', |
| | | count: 1723, |
| | | icon: 'iconfont iconicon_doc', |
| | | color: 'rgb(49, 180, 141)', |
| | | uiUrl: "/MasterData/items?id=wupin@name=物品主数据", |
| | | countUrl:'priceIndexController/countNeedConfirmPlan' |
| | | }, |
| | | { |
| | | click: this.handleItemBClick, |
| | | title: '人员主数据', |
| | | count: 1225, |
| | | icon: 'iconfont iconicon_dispose', |
| | | color: 'rgb(56, 161, 242)', |
| | | uiUrl:'/MasterData/items?id=renyuan@@name=人员主数据', |
| | | countUrl:'priceIndexController/countPricingPlan' |
| | | }, |
| | | { |
| | | click: this.handleItemCClick, |
| | | title: '主题库定义', |
| | | count: 523, |
| | | icon: 'el-icon-setting', |
| | | color: 'rgb(117, 56, 199)', |
| | | uiUrl:'/modeling/classifyTree', |
| | | countUrl:'priceIndexController/countNeedFeedbackPlan' |
| | | }, |
| | | { |
| | | click: this.handleItemDClick, |
| | | title: '供应商主数据', |
| | | count: 0, |
| | | icon: 'iconfont iconicon_work', |
| | | color: 'rgb(255, 102, 51)', |
| | | uiUrl:'/MasterData/items?id=gongyingshang@@name=供应商主数据', |
| | | countUrl:'priceIndexController/countMyUnCreatePricePlan' |
| | | }, |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | handleItemAClick() { |
| | | this.$router.push({ path: "/MasterData/items?id=wupin@name=物品主数据"} ); |
| | | }, |
| | | handleItemBClick() { |
| | | this.$router.push({ path: '/MasterData/items?id=renyuan@@name=人员主数据'} ); |
| | | }, |
| | | handleItemCClick() { |
| | | this.$router.push({ path: '/modeling/classifyTree'} ); |
| | | }, |
| | | handleItemDClick() { |
| | | this.$router.push({ path: '/MasterData/items?id=gongyingshang@@name=供应商主数据'} ); |
| | | }, |
| | | getList() { |
| | | let data = [{ |
| | | "backgroundColor": "#FF5722", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countNeedConfirmPlan", |
| | | "name": "物品主数据", |
| | | "nameOid": "", |
| | | "oid": "34aebfde-eb11-4555-87eb-0a779be9aad0", |
| | | "uiUrl": "/MasterData/items?id=wupin@name=物品主数据", |
| | | }, { |
| | | "backgroundColor": "#5FB878", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countPricingPlan", |
| | | "name": "人员主数据", |
| | | "nameOid": "2C72EA23-8AA5-E5FC-9BC1-DE4AD182EF7B", |
| | | "oid": "6256ae79-7765-4c66-afc7-f12fad350065", |
| | | "uiUrl": "/MasterData/items?id=renyuan@@name=人员主数据", |
| | | },{ |
| | | "backgroundColor": "#1E9FFF", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countNeedFeedbackPlan", |
| | | "name": "主题库定义", |
| | | "nameOid": "2536978C-CD1B-5B56-6529-A8C3456B5260", |
| | | "oid": "3043cdf1-8479-4c2a-9eab-fc35e9f9d5a7", |
| | | "uiUrl": "/modeling/classifyTree", |
| | | }, |
| | | { |
| | | "backgroundColor": "#FF5722", |
| | | "btmname": "hometask", |
| | | "countUrl": "priceIndexController/countMyUnCreatePricePlan", |
| | | "name": "供应商主数据", |
| | | "nameOid": "", |
| | | "oid": "529634e7-1854-4f61-b911-a91e3c406757", |
| | | "uiUrl": "/MasterData/items?id=gongyingshang@@name=供应商主数据", |
| | | }] |
| | | this.listMyTask = data.map(record => { |
| | | record.style=record.style || '' |
| | | if(record.backgroundColor!=''){ |
| | | record.style = 'background-color:'+record.backgroundColor; |
| | | } |
| | | record.count=record.count || 0; |
| | | if(!this.countByServer){ |
| | | //是前端查询 |
| | | getList(record.countUrl,{}).then(res=>{ |
| | | if(res.data.data.success){ |
| | | record.count=res.data.data.obj; |
| | | }else{ |
| | | record.count=0 |
| | | // debugger |
| | | Object.values(this.option.data).map(record => { |
| | | record.count = record.count || 0; |
| | | if (!this.countByServer) { |
| | | // 是前端查询 |
| | | getList(record.countUrl, {}).then(res => { |
| | | // console.log('res',res) |
| | | if (res.data.data.success) { |
| | | record.count = res.data.data.obj; |
| | | } else { |
| | | record.count = 0; |
| | | } |
| | | }) |
| | | |
| | | }); |
| | | } |
| | | return { |
| | | ...record |
| | | } |
| | | }) |
| | | }; |
| | | }); |
| | | }, |
| | | goto(item){ |
| | | this.$router.push({ path: item.uiUrl }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-col{margin-bottom: 0} |
| | | .box{ |
| | | text-align: center; |
| | | background: rgb(235, 238, 245); |
| | | color: #303133; |
| | | height: 70px; |
| | | margin: 10px 0!important; |
| | | padding: 15px 10px; |
| | | position: relative; |
| | | border-radius: 4px; |
| | | box-sizing: border-box; |
| | | font-size: 14px; |
| | | } |
| | | .value{ |
| | | font-size: 12px; |
| | | opacity: .69; |
| | | line-height: 20px; |
| | | margin-top: 5px; |
| | | display: block; |
| | | } |
| | | |
| | | </style> |
| | |
| | | /** |
| | | * 窗口显示的高度 |
| | | */ |
| | | private Long height; |
| | | private Integer height; |
| | | |
| | | /** |
| | | * 过滤(级联)属性 |
| | | */ |
| | | private String useFormKey; |
| | | |
| | | /** |
| | | * 过滤属性请求参数 |
| | |
| | | */ |
| | | private String type; |
| | | |
| | | public UIFieldSortVO(String field, String type) { |
| | | this.field = field; |
| | | this.type = type; |
| | | } |
| | | |
| | | public UIFieldSortVO() { |
| | | } |
| | | |
| | | public String getField() { |
| | | return field; |
| | | } |
| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.vci.ubcs.code.service.UniversalInterfaceI; |
| | | import org.apache.tools.ant.taskdefs.condition.Http; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import javax.servlet.ServletRequest; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.ws.rs.core.Context; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | /** |
| | | * 主题库分类控制器 |
| | |
| | | * @throws Throwable |
| | | */ |
| | | @PostMapping("/applyCode") |
| | | public String applyCode(@RequestParam("dataString")String dataString, @RequestParam("dataType")String dataType, ServletRequest request) { |
| | | public String applyCode(@RequestParam("dataString")String dataString, @RequestParam("dataType")String dataType, HttpServletRequest request) { |
| | | String result=""; |
| | | HttpServletRequest httpServletRequest = (HttpServletRequest) request; |
| | | try { |
| | | ThreadLocal<HttpServletRequest> threadLocal = new ThreadLocal<>(); |
| | | threadLocal.set(request); |
| | | universalInterfaceI.setThreadLocal(threadLocal); |
| | | result = universalInterfaceI.applyCode(dataString, dataType); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | |
| | | */ |
| | | public String applyCode(String data, String dataType)throws Throwable; |
| | | |
| | | public void setThreadLocal(ThreadLocal<HttpServletRequest> threadLocal); |
| | | |
| | | /**** |
| | | * 人员数据同步 |
| | | * @param personData |
| | |
| | | uiTableConfigVO.setQueryColumns(queryColumns); |
| | | //set给表格配置属性 |
| | | uiFormReferVO.setTableConfig(uiTableConfigVO); |
| | | //字段名不一致,需要手动set |
| | | uiFormReferVO.setMuti(Func.toBoolean(codeReferConfig.getIsMuti())); |
| | | uiFormReferVO.setInitSort(new UIFieldSortVO(codeReferConfig.getSortField(),codeReferConfig.getSortType())); |
| | | // 筛选条件 |
| | | HashMap<String, String> whereMap = new HashMap<>(); |
| | | if(!codeReferConfig.getCodeSrchCondConfigVOS().isEmpty()){ |
| | |
| | | uiTableConfigVO.setQueryColumns(queryColumns); |
| | | //set给表格配置属性 |
| | | uiFormReferVO.setTableConfig(uiTableConfigVO); |
| | | //字段名不一致,需要手动set |
| | | uiFormReferVO.setMuti(Func.toBoolean(codeReferConfig.getIsMuti())); |
| | | uiFormReferVO.setInitSort(new UIFieldSortVO(codeReferConfig.getSortField(),codeReferConfig.getSortType())); |
| | | // 筛选条件 |
| | | HashMap<String, String> whereMap = new HashMap<>(); |
| | | if(!CollectionUtils.isEmpty(codeReferConfig.getCodeSrchCondConfigVOS())){ |
| | |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.ObjectUtil; |
| | |
| | | String ipAddr = request.getRemoteAddr(); |
| | | // 先尝试从缓存当中取,存在就直接从缓存中获取 |
| | | String authToken = bladeRedis.get(PWD_FREE_LOGIN_TOKEN+ipAddr+":"+userName); |
| | | BladeUser user = null; |
| | | // 解析token存放进attr中 |
| | | String token2 = JwtUtil.getToken(authToken); |
| | | BladeUser user = this.getUser(token2); |
| | | //不存在就请求 |
| | | if(Func.isEmpty(authToken)){ |
| | | if(Func.isEmpty(authToken) || Func.isEmpty(user)){ |
| | | // 免密登录接口地址 |
| | | String loginUrl = "http://localhost:"+this.getGatewayPort("ubcs-gateway")+"/ubcs-auth/oauth/token"; |
| | | // 请求ubcs-auth服务获取token,先设置请求头 |
| | |
| | | authToken = "bearer " + tokenUserObject.getAccess_token(); |
| | | // 将token存入缓存当中,过期时间为24小时 |
| | | bladeRedis.setEx(PWD_FREE_LOGIN_TOKEN+ipAddr+":"+userName,"bearer "+tokenUserObject.getAccess_token(),tokenRedisExpire); |
| | | token2 = JwtUtil.getToken(authToken); |
| | | user = this.getUser(token2); |
| | | } |
| | | // 解析token存放进attr中 |
| | | String token2 = JwtUtil.getToken(authToken); |
| | | user = this.getUser(token2); |
| | | |
| | | //request.setAttribute("Blade-Auth",token); |
| | | request.setAttribute("_BLADE_USER_REQUEST_ATTR_",user); |
| | | return true; |
| | |
| | | if (StringUtil.isNotBlank(authToken)) { |
| | | token = JwtUtil.getToken(authToken); |
| | | } |
| | | |
| | | if (StringUtil.isNotBlank(token)) { |
| | | claims = parseJWT(token); |
| | | } |
| | | |
| | | if (ObjectUtil.isNotEmpty(claims) && getJwtProperties().getState()) { |
| | | tenantId = Func.toStr(claims.get("tenant_id")); |
| | | String userId = Func.toStr(claims.get("user_id")); |
| | |
| | | import com.vci.ubcs.system.vo.DeptVO; |
| | | import com.vci.ubcs.system.vo.RoleVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.tools.ant.taskdefs.condition.Http; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.jws.WebMethod; |
| | | import javax.servlet.ServletRequest; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.ws.rs.core.Context; |
| | | import javax.xml.ws.WebServiceContext; |
| | | import javax.xml.ws.handler.MessageContext; |
| | | import java.util.*; |
| | |
| | | private String objerrorCode="0"; |
| | | private String objerrorMsg="成功"; |
| | | |
| | | private final ThreadLocal<HttpServletRequest> threadLocal = new ThreadLocal<>(); |
| | | |
| | | @Resource |
| | | private WebServiceContext webServiceContext; |
| | | |
| | | @Override |
| | | public void setThreadLocal(ThreadLocal<HttpServletRequest> requestThreadLocal){ |
| | | this.threadLocal.set(requestThreadLocal.get()); |
| | | requestThreadLocal.remove(); |
| | | } |
| | | |
| | | @WebMethod |
| | | public HttpServletRequest getRequest() { |
| | | // 获取HttpServletRequest对象 |
| | | HttpServletRequest request = (HttpServletRequest)webServiceContext.getMessageContext().get(MessageContext.SERVLET_REQUEST); |
| | | private HttpServletRequest getRequest() { |
| | | //rest请求方式获取request |
| | | HttpServletRequest request = this.threadLocal.get(); |
| | | if(Func.isEmpty(request)){ |
| | | try { |
| | | // webservice请求方式获取HttpServletRequest对象 |
| | | request = (HttpServletRequest)webServiceContext.getMessageContext().get(MessageContext.SERVLET_REQUEST); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("获取httpServletRequest失败,原因:"+e.getMessage()); |
| | | } |
| | | }else { |
| | | this.threadLocal.remove(); |
| | | } |
| | | return request; |
| | | } |
| | | |
| | |
| | | UserVO userVo = interParameterVO.getData().getUser(); |
| | | //免密登录申请token,request中添加用户信息 |
| | | passwordFreeLoginService.passwordFreeLogin(userVo.getUserName(),this.getRequest()); |
| | | AuthUtil.getUser(); |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //这是账号信息 |
| | |
| | | |
| | | @Override |
| | | public String queryClassifyRule(String data, String dataType) throws Throwable { |
| | | |
| | | boolean issucess=false; |
| | | String resultStr = ""; |
| | | String errorid="0"; |