Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
已添加11个文件
已修改38个文件
已重命名1个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function getServiceUrl (data) { |
| | | return request.post('/visitsAdmin/cloudService//business/hksync/getServiceUrl', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | |
| | | <div class="time">æäº¤æ¶é´ï¼{{model.createDate}}</div> |
| | | </div> |
| | | <span class="right" v-if="model.status === 0">ç³è¯·ä¸</span> |
| | | <span class="right" v-if="model.status === 1">å¾
审æ¹</span> |
| | | <span class="right" v-if="model.status === 1">审æ¹ä¸</span> |
| | | <span class="right" style="background:#53b76f " v-if="model.status === 2">审æ¹éè¿</span> |
| | | <span class="right" style="background:#dc362e " v-if="model.status === 3">审æ¹ä¸éè¿</span> |
| | | <span class="right" style="background:#dc362e " v-if="model.status === 4">已忶</span> |
| | |
| | | <div class="item" v-for="(item,index) in model.approveDateVO.approveList" :key="item.id"> |
| | | <div class="separate" v-if=" (index < model.approveDateVO.approveList.length-1)"></div> |
| | | <div class="info"> |
| | | <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="(item.status ==2)"/> |
| | | <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="(item.status==1)"/> |
| | | <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="(item.status==3)"></i> |
| | | <img src="@/assets/icons/ic_grep.png" class="iconnew" v-if="(item.status==null || item.status==0 )"></i> |
| | | <div style="display: inline" v-if="item.approveType ===0"> |
| | | <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="(item.type !=1 &&item.status ==2)"/> |
| | | <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="(item.type !=1 &&item.status==1)"/> |
| | | <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="(item.type !=1 &&item.status==3)"/> |
| | | <img src="@/assets/icons/ic_grey.png" class="iconnew" v-if="item.type ==1 || (item.status==null || item.status==0 )"/> |
| | | <div style="display: inline" v-if="item.approveType !=1"> |
| | | <img v-if="item.faceImg!=null && item.faceImg !=''" :src="item.faceImg" class="avatar" alt="" /> |
| | | <img v-if="item.faceImg ==null ||item.faceImg ==''" src="@/assets/avatar/man.png" class="avatar" alt="" /> |
| | | </div> |
| | | <div style="display: inline" v-if="item.approveType ===1"> |
| | | <img v-if="item.status === 1" src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" /> |
| | | <div style="display: inline" v-if="item.approveType ==1"> |
| | | <img v-if="item.status == 1" src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" /> |
| | | <img v-if="item.status != 1" src="@/assets/icons/ic_duoren.png" class="avatar" alt="" /> |
| | | </div> |
| | | <div class="content"> |
| | | <div class="line"> |
| | | <div class="name">{{ item.title}}</div> |
| | | <div class="time">{{ item.createDate }}</div> |
| | | <div class="time">{{ item.checkDate }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="company"> |
| | | {{ item.createUserName }} {{ item.companyName }} |
| | | {{ item.memberName }} |
| | | <div style="display: inline" v-if="item.statusInfo!=null && item.statusInfo!=''"> |
| | | <span class="status-green">{{item.statusInfo||''}}</span>ï¼ |
| | | ï¼<span class="status-green">{{item.statusInfo ||''}}</span>ï¼ |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div v-if="item.approveType != 1 " class="remark"> |
| | | {{ item.checkInfo ||'æ°´çµè´¹ååå¤å¤ååå¤å¤æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³æ¹æ³ååå' }} |
| | | <div v-if="item.approveType != 1 && item.checkInfo !=null && item.checkInfo !=''" class="remark"> |
| | | {{ item.checkInfo || '' }} |
| | | </div> |
| | | <div v-if="item.approveType == 1 " class="childList"> |
| | | <div style="display: inline" v-for="item1 in item.approveList" :key="item1.id"> |
| | | <div class="m_content company" v-for="item1 in item.approveList" :key="item1.id"> |
| | | <img v-if="item1.faceImg!=null && item1.faceImg !=''" :src="item1.faceImg" class="avatar" alt="" /> |
| | | <img v-if="item1.faceImg ==null ||item1.faceImg ==''" src="@/assets/avatar/man.png" class="avatar" alt="" /> |
| | | <span style="display: inline-block"> {{item1.memberName}}</span> |
| | | <span > {{item1.memberName}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <el-dialog |
| | | append-to-body |
| | | title="åæç³è¯·" |
| | | style="text-align: center" |
| | | class="dialogCl" |
| | | :visible.sync="isShowProblem" |
| | | width="480px" |
| | |
| | | <el-dialog |
| | | append-to-body |
| | | title="æç»ç³è¯·" |
| | | style="text-align: center" |
| | | class="dialogCl" |
| | | :visible.sync="isBackProblem" |
| | | width="600px" |
| | |
| | | position: absolute; |
| | | border-left: 2px dashed #cccccc; |
| | | left: 31px; |
| | | height: calc(100% - 24px); |
| | | top: 34px; |
| | | height: calc(100% - 36px); |
| | | top: 49px; |
| | | } |
| | | .avatar { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 50%; |
| | | margin: 0 12px 0 16px; |
| | | //border: 1px solid; |
| | | } |
| | | .childList{ |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-left: 100px; |
| | | } |
| | | .company { |
| | | font-size: 13px; |
| | | color: #888888; |
| | | .status { |
| | | color: #00ba67; |
| | | } |
| | | } |
| | | .m_content{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-bottom: 4px; |
| | | } |
| | | .info { |
| | | display: flex; |
| | |
| | | color:gray; |
| | | font-size: 24px; |
| | | } |
| | | .avatar { |
| | | width: 40px; |
| | | height: 40px; |
| | | border-radius: 50%; |
| | | margin: 0 12px 0 16px; |
| | | border: 1px solid; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | | .line { |
| | |
| | | .time { |
| | | color: #888888; |
| | | } |
| | | .company { |
| | | font-size: 13px; |
| | | color: #888888; |
| | | .status { |
| | | color: #00ba67; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | border-radius: 4px; |
| | | padding: 13px 15px; |
| | | color: #666666; |
| | | margin-left: 120px; |
| | | margin-left: 100px; |
| | | } |
| | | .childList { |
| | | margin-left: 120px; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | <div class="item" v-for="(item,index) in logList" :key="item.id"> |
| | | <div class="separate" v-if="index < logList.length-1"></div> |
| | | <div class="info"> |
| | | <i class="el-icon-success icon" v-if="(model.status ==1) || index < logList.length-1"></i> |
| | | <i class="el-icon-question icon1" v-if="(model.status==0) && index == logList.length-1"></i> |
| | | <i class="el-icon-error icon2" v-if="(model.status==2) && index == logList.length-1"></i> |
| | | <img src="@/assets/icons/ic_tongguo.png" class="iconnew" v-if="(model.status ==1) || index < logList.length-1"/> |
| | | <img src="@/assets/icons/ic_dangqian.png" class="iconnew" v-if="(model.status==0) && index == logList.length-1"/> |
| | | <img src="@/assets/icons/ic_jujue.png" class="iconnew" v-if="(model.status==2) && index == logList.length-1"/> |
| | | <img v-if="item.avatar!=null && item.avatar !=''" :src="item.avatar" class="avatar" alt="" /> |
| | | <img v-if="item.avatar ==null ||item.avatar ==''" src="@/assets/avatar/man.png" class="avatar" alt="" /> |
| | | <div class="content"> |
| | |
| | | color: #53b76f; |
| | | font-size: 24px; |
| | | } |
| | | |
| | | .iconnew{ |
| | | width: 24px; |
| | | height: 24px; |
| | | } |
| | | .icon1 { |
| | | position: relative; |
| | | z-index: 11; |
| | |
| | | height: 40px; |
| | | border-radius: 50%; |
| | | margin: 0 12px 0 16px; |
| | | border: 1px solid; |
| | | //border: 1px solid; |
| | | } |
| | | .content { |
| | | flex: 1; |
| | |
| | | if (path.endsWith('/')) { |
| | | path = path.substring(0, path.length - 1) |
| | | } |
| | | const menuConfig = this.__getMenuConfig(path, 'url', this.menuData.list) |
| | | const menuConfig = this.__getMenuConfig(path, 'index', this.menuData.list) |
| | | if (menuConfig == null) { |
| | | return null |
| | | } else { |
| | | this.$store.commit("pushtags", menuConfig) |
| | | this.$store.commit('pushtags', menuConfig) |
| | | } |
| | | // console.log(menuConfig.index); |
| | | return menuConfig.index |
| | |
| | | require('@/views' + menuConfig.url) |
| | | } catch (e) { |
| | | this.$tip.error('æªæ¾å°é¡µé¢æä»¶@/views' + menuConfig.url + '.vueï¼è¯·æ£æ¥èåè·¯å¾æ¯å¦æ£ç¡®') |
| | | return |
| | | } |
| | | // ç¹å»å½åèåä¸åå¤ç |
| | | if (menuConfig.url === this.$route.path) { |
| | | if (menuConfig.url === this.$route.path && menuConfig.params === this.$route.query.param) { |
| | | return |
| | | } |
| | | if (menuConfig.url == null || menuConfig.url.trim().length === 0) { |
| | | return |
| | | } |
| | | |
| | | if(menuConfig.params!=null && menuConfig.params!=''){ |
| | | this.$router.push({path:menuConfig.url,query:{index:menuConfig.index,param:menuConfig.params}}) |
| | | }else{ |
| | | this.$router.push(menuConfig.url) |
| | | this.$store.commit("pushtags", menuConfig) |
| | | } |
| | | this.$store.commit('pushtags', menuConfig) |
| | | }, |
| | | // è·åèåé
ç½® |
| | | __getMenuConfig (value, key, menus) { |
| | |
| | | :key="index" |
| | | :id="'tags-box-' + index" |
| | | @contextmenu.prevent="openMenu(item, $event)" |
| | | :class="isActive(item.url, index) ? 'active' : ''" |
| | | :class="isActive(item.url, item.params,index) ? 'active' : ''" |
| | | class="tagsview" |
| | | @click="tagsmenu(item, index)" |
| | | > |
| | |
| | | }, |
| | | $route(to, from) { |
| | | this.tags.forEach((item, index) => { |
| | | if (item.url === to.path) { |
| | | if (item.url === to.path && item.index === to.query.index) { |
| | | const tagsDiv = document.getElementById('tags-box') |
| | | if (index) { |
| | | tagsDiv.scrollTo(index * 110, 0) |
| | |
| | | } |
| | | } else { |
| | | // é£ä¹ï¼å¦æä¸é¢çæ¡ä»¶é½ä¸æç«ï¼æ²¡ælength=0.ä¹å°±æ¯è¯´ä½ è¿æå¥½å 个æ ç¾ï¼å¹¶ä¸ä½ å é¤çæ¯æåä¸ä½æ ç¾ï¼é£ä¹å°±å¾å·¦è¾¹æªä¸ä½è·³è½¬è·¯ç± |
| | | this.$router.push({ path: this.tags[index - 1].url }) |
| | | this.$router.push({ path: this.tags[index - 1].url,query:{param: this.tags[index - 1].params} }) |
| | | } |
| | | } else { |
| | | // å¦æä½ ç¹å»ä¸æ¯æåä¸ä½æ ç¾ï¼ç¹çåé¢çï¼é£å°±å¾å³è¾¹è·³è½¬ |
| | | this.$router.push({ path: this.tags[index].url }) |
| | | this.$router.push({ path: this.tags[index].url ,query:{param: this.tags[index].params}}) |
| | | } |
| | | }, |
| | | // ç¹å»è·³è½¬è·¯ç± |
| | |
| | | // 夿ï¼å½åè·¯ç±ä¸çäºå½åéä¸é¡¹çurlï¼ä¹å°±ä»£è¡¨ä½ ç¹å»ç䏿¯ç°å¨éä¸çæ ç¾ï¼æ¯å¦ä¸ä¸ªæ ç¾å°±è·³è½¬è¿å»ï¼å¦æä½ ç¹å»çæ¯ç°å¨å·²ç»éä¸çæ ç¾å°±ä¸ç¨è·³è½¬äºï¼å ä¸ºä½ å·²ç»å¨è¿ä¸ªè·¯ç±äºè¿è·³ä»ä¹å¢ã |
| | | if (this.$route.path !== item.url) { |
| | | // ç¨pathçè·³è½¬æ¹æ³æå½å项çurlå½ä½å°å跳转ã |
| | | this.$router.push({ path: item.url }) |
| | | this.$router.push({ path: item.url ,query:{param: this.tags[index].params}}) |
| | | const tagsDiv = document.getElementById('tags-box') |
| | | if (index) { |
| | | tagsDiv.scrollTo(index * 110, 0) |
| | |
| | | } |
| | | }, |
| | | // éè¿å¤æè·¯ç±ä¸è´è¿åå¸å°å¼æ·»å classï¼æ·»å é«äº®ææ |
| | | isActive(route, index) { |
| | | const res = route === this.$route.path |
| | | isActive(route,params, index) { |
| | | const res =(route === this.$route.path && params== this.$route.query.param) |
| | | return res |
| | | }, |
| | | scrollToStart() { |
| | |
| | | <el-form-item label="访é®è·¯å¾" prop="path"> |
| | | <el-input v-model="form.path" placeholder="请è¾å
¥è®¿é®è·¯å¾" v-trim maxlength="200"/> |
| | | </el-form-item> |
| | | <el-form-item label="æºå¸¦åæ°" prop="params"> |
| | | <el-input v-model="form.params" placeholder="请è¾å
¥æºå¸¦åæ°" v-trim maxlength="200"/> |
| | | </el-form-item> |
| | | <el-form-item label="徿 " prop="icon" class="form-item-icon"> |
| | | <el-radio-group v-model="form.icon"> |
| | | <el-radio :label="icon" v-for="icon in icons" :key="icon"> |
| | |
| | | id: null, |
| | | parentId: null, |
| | | name: '', |
| | | params:'', |
| | | path: '', |
| | | icon: '', |
| | | remark: '' |
| | |
| | | pushtags(state,val){ |
| | | //妿çäº-1说ætabsä¸åå¨é£ä¹æå
¥ï¼å¦åä»ä¹é½ä¸å |
| | | //findindexæ¾è§æ ï¼å¾ªç¯å¤æä¸ä¸ï¼å¦æçäºé£ä¹å°±ä»£è¡¨æç¸åçï¼å°±ä¸å¿
æ·»å ï¼å¦ææ¾ä¸å°é£å°±æ¯-1.就添å |
| | | let result = state.tags.findIndex(item => item.label === val.label) |
| | | let result = state.tags.findIndex(item => item.index === val.index) |
| | | if (result === -1) { |
| | | state.tags.push({...val, keepAlive: false}) |
| | | } else { |
| | |
| | | //å
³éæ ç¾ |
| | | closeTab(state, val) { |
| | | //åä¸ï¼æ¾è§æ ï¼ç¶åç¨è§æ çä½ç½®å¯¹åºå é¤ä¸ä½ãspliceï¼è¿æ¯æ°ç»çå 餿¹æ³ |
| | | let result = state.tags.findIndex(item => item.label === val.label) |
| | | let result = state.tags.findIndex(item => item.index === val.index) |
| | | state.tags.splice(result, 1) |
| | | }, |
| | | //å
³éæætagsviewæ ç¾ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="text-align: center;background: white;width: 100%;height: 100%;"> |
| | | <div v-if="url!=null" > |
| | | <iframe :src="url" width="100%" style="border:none" height="600"></iframe> |
| | | </div> |
| | | <div v-else > |
| | | <div style="padding-top: 200px;font-size: 28px;color: #3C77DA">{{message}}</div> |
| | | </div> |
| | | <template v-if="1===2"> |
| | | <div style="bottom: 20px;position: fixed;text-align: center;width: 90%;height: 60px"> |
| | | {{url}}<br> |
| | | <el-button type="primary" :loading="loading" @click="getUrl()">éæ°å 载页é¢</el-button> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | export default { |
| | | name: 'otherLoginService', |
| | | extends: BaseTable, |
| | | data () { |
| | | return { |
| | | url: null, |
| | | loading: false, |
| | | message: 'æ£å¨åªåç»å½ç»ä»¶æå¡...' |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '设å¤ç®¡otherLoginServiceçä¿¡æ¯è¡¨', |
| | | api: '/other/other', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.getUrl() |
| | | }, |
| | | methods: { |
| | | getUrl () { |
| | | this.loading = true |
| | | this.api.getServiceUrl({ label: 'HK_SERVICE_COPAS_URL' }) |
| | | .then(res => { |
| | | this.message = 'æ£å¨ååªåå è½½ç»ä»¶!' |
| | | this.url = res |
| | | }) |
| | | .catch(e => { |
| | | this.message = 'ç»å½ç»ä»¶æå¡å¤±è´¥,请è系系ç»ç®¡ç忣æ¥!' |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="text-align: center;background: white;width: 100%;height: 100%;"> |
| | | <div v-if="url!=null" > |
| | | <iframe :src="url" width="100%" style="border:none" height="600"></iframe> |
| | | </div> |
| | | <div v-else > |
| | | <div style="padding-top: 200px;font-size: 28px;color: #3C77DA">{{message}}</div> |
| | | </div> |
| | | <template v-if="1==2"> |
| | | <div style="bottom: 20px;position: fixed;text-align: center;width: 90%;height: 60px"> |
| | | {{url}}<br> |
| | | <el-button type="primary" :loading="loading" @click="getUrl()">éæ°å 载页é¢</el-button> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | export default { |
| | | name: 'otherLoginService', |
| | | extends: BaseTable, |
| | | data () { |
| | | return { |
| | | url: null, |
| | | loading: false, |
| | | message: 'æ£å¨åªåç»å½ç»ä»¶æå¡...' |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '设å¤ç®¡otherLoginServiceçä¿¡æ¯è¡¨', |
| | | api: '/other/other', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.getUrl() |
| | | }, |
| | | methods: { |
| | | getUrl () { |
| | | this.loading = true |
| | | this.api.getServiceUrl({ label: 'HK_SERVICE_DFEFORM_URL' }) |
| | | .then(res => { |
| | | this.message = 'æ£å¨ååªåå è½½ç»ä»¶!' |
| | | this.url = res |
| | | }) |
| | | .catch(e => { |
| | | this.message = 'ç»å½ç»ä»¶æå¡å¤±è´¥,请è系系ç»ç®¡ç忣æ¥!' |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="text-align: center;background: white;width: 100%;height: 100%;"> |
| | | <div v-if="url!=null" > |
| | | <iframe :src="url" width="100%" style="border:none" height="600"></iframe> |
| | | </div> |
| | | <div v-else > |
| | | <div style="padding-top: 200px;font-size: 28px;color: #3C77DA">{{message}}</div> |
| | | </div> |
| | | <template v-if="1==2"> |
| | | <div style="bottom: 20px;position: fixed;text-align: center;width: 90%;height: 60px"> |
| | | {{url}}<br> |
| | | <el-button type="primary" :loading="loading" @click="getUrl()">éæ°å 载页é¢</el-button> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | export default { |
| | | name: 'otherLoginService', |
| | | extends: BaseTable, |
| | | data () { |
| | | return { |
| | | url: null, |
| | | loading: false, |
| | | message: 'æ£å¨åªåç»å½ç»ä»¶æå¡...' |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '设å¤ç®¡otherLoginServiceçä¿¡æ¯è¡¨', |
| | | api: '/other/other', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.getUrl() |
| | | }, |
| | | methods: { |
| | | getUrl () { |
| | | this.loading = true |
| | | this.api.getServiceUrl({ label: 'HK_SERVICE_FRS_URL' }) |
| | | .then(res => { |
| | | this.message = 'æ£å¨ååªåå è½½ç»ä»¶!' |
| | | this.url = res |
| | | }) |
| | | .catch(e => { |
| | | this.message = 'ç»å½ç»ä»¶æå¡å¤±è´¥,请è系系ç»ç®¡ç忣æ¥!' |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="text-align: center;background: white;width: 100%;height: 100%;"> |
| | | <div v-if="url!=null" > |
| | | <iframe :src="url" width="100%" style="border:none" height="600"></iframe> |
| | | </div> |
| | | <div v-else > |
| | | <div style="padding-top: 200px;font-size: 28px;color: #3C77DA">{{message}}</div> |
| | | </div> |
| | | <template v-if="1===2"> |
| | | <div style="bottom: 20px;position: fixed;text-align: center;width: 90%;height: 60px"> |
| | | {{url}}<br> |
| | | <el-button type="primary" :loading="loading" @click="getUrl()">éæ°å 载页é¢</el-button> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | export default { |
| | | name: 'otherLoginService', |
| | | extends: BaseTable, |
| | | data () { |
| | | return { |
| | | url: null, |
| | | loading: false, |
| | | paramUrl:'', |
| | | message: 'æ£å¨åªåç»å½ç»ä»¶æå¡...' |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '设å¤ç®¡otherLoginServiceçä¿¡æ¯è¡¨', |
| | | api: '/other/other', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.paramUrl = this.$route.query.param |
| | | this.getUrl() |
| | | }, |
| | | methods: { |
| | | getUrl () { |
| | | this.loading = true |
| | | this.api.getServiceUrl({ label: this.paramUrl}) |
| | | .then(res => { |
| | | this.message = 'æ£å¨ååªåå è½½ç»ä»¶!' |
| | | this.url = res |
| | | }) |
| | | .catch(e => { |
| | | this.message = 'ç»å½ç»ä»¶æå¡å¤±è´¥,请è系系ç»ç®¡ç忣æ¥!' |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | <el-select v-model="searchForm.status" @change="search" clearable placeholder="ç¶æ"> |
| | | <el-option label="å¾
å¤ç" value="0"></el-option> |
| | | <el-option label="å·²å¤ç" value="1"></el-option> |
| | | <el-option label="å·²éåº" value="2"></el-option> |
| | | <el-option label="å·²éå" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ææ¥æ¶é´" prop="startTime"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="path" label="访é®è·¯å¾" min-width="140px"></el-table-column> |
| | | <el-table-column prop="params" label="åæ°" min-width="120px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createUser" label="å建人" min-width="100px"> |
| | | <template slot-scope="{row}">{{row.createUserInfo == null ? '' : row.createUserInfo.username}}</template> |
| | |
| | | return ApiResponse.success(bookingsService.getMeetingDetail(id)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®æ¥æåä¼è®®å®¤ä¸»é®æ¥è¯¢å ç¨ä¿¡æ¯") |
| | | @PostMapping("/getMeetingDetailByDate") |
| | | @CloudRequiredPermission("business:bookings:query") |
| | | public ApiResponse<MeetingDetailResponse> getMeetingDetailByDate(@RequestBody Bookings bookings,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(bookingsService.getMeetingDetailByDate(bookings)); |
| | | } |
| | | |
| | | @ApiOperation("åæ¶") |
| | | @PostMapping("/cancelById") |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.QrCodeUtils; |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import com.doumee.dao.web.request.BookingsRequest; |
| | | import com.doumee.dao.web.request.MeetingPageRequest; |
| | | import com.doumee.dao.web.request.UserPageRequest; |
| | | import com.doumee.dao.web.response.MeetingDetailResponse; |
| | | import com.doumee.dao.web.response.MeetingListResponse; |
| | | import com.doumee.dao.web.response.MonthDataResponse; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "彿ä¼è®®è¡¨", notes = "彿ä¼è®®è¡¨") |
| | |
| | | QrCodeUtils.encode(content,null, response.getOutputStream(), true); |
| | | }*/ |
| | | |
| | | /* |
| | | @LoginRequired |
| | | |
| | | @ApiOperation("åä¼äººåå页") |
| | | @PostMapping("/userPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<IPage<UserResponse>> userPage(@RequestBody PageWrap<UserPageRequest> pageWrap) { |
| | | IPage<UserResponse> page = systemUserService.getUserPage(pageWrap); |
| | | IPage<UserResponse> page = bookingsService.getUserPage(pageWrap); |
| | | return ApiResponse.success("æ¥è¯¢æå", page); |
| | | } |
| | | */ |
| | | |
| | | |
| | | @ApiOperation("ä¼è®®é¢çº¦") |
| | |
| | | @PostMapping("/myRoomsPage") |
| | | public ApiResponse<IPage<RoomsResponse>> myRoomsPage(@RequestBody PageWrap<RoomsRequest> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | pageWrap.getModel().setUserId(user.getId()); |
| | | pageWrap.getModel().setUserId(user.getMemberId()); |
| | | IPage<RoomsResponse> page = roomsService.getRoomsPage(pageWrap); |
| | | return ApiResponse.success("æ¥è¯¢æå",page); |
| | | } |
| | |
| | | .apiInfo(this.getApiInfo()).groupName("default") |
| | | .host(host) |
| | | .select() |
| | | .apis( basePackage("com.doumee.api.cloud")) |
| | | .apis( basePackage("com.doumee.cloud;com.doumee.api.common")) |
| | | // 设置éè¦è¢«æ«æçç±»ï¼è¿é设置为添å äº@Api注解çç±» |
| | | // .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.any()) |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.doumee.dao.business.model.Projects; |
| | | import com.doumee.dao.web.response.ProjectsResponse; |
| | | import com.doumee.dao.web.response.UserResponse; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | import com.doumee.dao.business.model.BookingTime; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private String meetingTime; |
| | | |
| | | @ApiModelProperty(value = "åä¼äººå") |
| | | // private List<UserResponse> userResponseList; |
| | | private List<SystemUser> userResponseList; |
| | | private List<UserResponse> userResponseList; |
| | | |
| | | @ApiModelProperty(value = "ä¼è®®å
容") |
| | | private String meetingContent; |
| | |
| | | import com.doumee.dao.business.model.Bookings; |
| | | import com.doumee.dao.business.vo.RoomStatisticsVo; |
| | | import com.doumee.dao.system.dto.UserStatisticsDTO; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import com.doumee.dao.system.vo.UserStatisticsVo; |
| | | import com.doumee.dao.web.request.BookingsRequest; |
| | | import com.doumee.dao.web.request.MeetingPageRequest; |
| | | import com.doumee.dao.web.request.UserPageRequest; |
| | | import com.doumee.dao.web.response.DateTimeResourceDate; |
| | | import com.doumee.dao.web.response.MeetingDetailResponse; |
| | | import com.doumee.dao.web.response.MeetingListResponse; |
| | |
| | | MeetingDetailResponse getMeetingDetail(Integer id); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¥æåä¼è®®å®¤ä¸»é®æ¥è¯¢å ç¨ä¿¡æ¯ |
| | | * @param bean |
| | | * @return |
| | | */ |
| | | MeetingDetailResponse getMeetingDetailByDate(Bookings bean); |
| | | /** |
| | | * è·åä¼è®®äºç»´ç |
| | | * @param id |
| | | * @param userId |
| | |
| | | PageData<UserStatisticsVo> getUserStatistics(PageWrap<UserStatisticsDTO> pageWrap); |
| | | |
| | | void sendBookingsNotice(); |
| | | |
| | | IPage<UserResponse> getUserPage(PageWrap<UserPageRequest> pageWrap); |
| | | } |
| | |
| | | import com.doumee.dao.system.dto.UserStatisticsDTO; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.*; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import com.doumee.dao.system.vo.UserStatisticsVo; |
| | | import com.doumee.dao.web.request.BookingsRequest; |
| | | import com.doumee.dao.web.request.MeetingPageRequest; |
| | | import com.doumee.dao.web.request.UserPageRequest; |
| | | import com.doumee.dao.web.response.*; |
| | | import com.doumee.service.business.BookingsService; |
| | | import com.doumee.service.business.DevicesService; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.awt.print.Book; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | |
| | | private SystemUserMapper systemUserMapper; |
| | | @Autowired |
| | | private RoomRecordMapper roomRecordMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private BookingsJoinMapper bookingsJoinMapper; |
| | |
| | | return page; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public MeetingDetailResponse getMeetingDetailByDate(Bookings bean){ |
| | | try { |
| | | if(Objects.isNull(bean) |
| | | || Objects.isNull(bean.getRoomId()) |
| | | || Objects.isNull(bean.getStartTime()) |
| | | || Objects.isNull(bean.getEndTime())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | Bookings bookings = bookingsMapper.selectOne(new QueryWrapper<Bookings>().lambda() |
| | | .eq(Bookings::getRoomId,bean.getRoomId()) |
| | | .ge(Bookings::getEndTime,DateUtil.getPlusTime(bean.getEndTime())) |
| | | .le(Bookings::getStartTime,DateUtil.getPlusTime(bean.getStartTime())) |
| | | ); |
| | | if(Objects.isNull(bookings)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | return getMeetingDetail(bookings.getId()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * ä¼è®®è¯¦æ
|
| | | * |
| | |
| | | )); |
| | | |
| | | //åä¼äººåå表 |
| | | SystemUser param = new SystemUser(); |
| | | List<SystemUser> userResponseList = systemUserService.findList(param); |
| | | String avatarPath = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.MEMBER_IMG).getCode(); |
| | | |
| | | List<UserResponse> userResponseList = systemUserService.getUserList(id); |
| | | String avatarPath = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | userResponseList.forEach(i -> { |
| | | if(StringUtils.isNotBlank(i.getAvatar())){ |
| | | i.setAvatar(avatarPath+i.getAvatar()); |
| | |
| | | }); |
| | | meetingDetailResponse.setUserResponseList(userResponseList); |
| | | //æå¡é¡¹ |
| | | String projectsPath = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); |
| | | String projectsPath = systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.FTP_RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(MeetConstants.FTP, MeetConstants.PROJECTS).getCode(); |
| | | List<ProjectsResponse> projectsResponseList = projectsService.getProjectsList(id, MeetConstants.ONE); |
| | | projectsResponseList.forEach(i -> { |
| | | i.setPrefixUrl(projectsPath); |
| | |
| | | return PageData.from(userStatistics); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åä¼äººåå页 |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | @Override |
| | | public IPage<UserResponse> getUserPage(PageWrap<UserPageRequest> pageWrap) { |
| | | IPage<UserResponse> page = systemUserMapper.getUserPage(pageWrap.toPage(),new QueryWrapper<UserResponse>() |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getKeyword()), i -> i.like("c.realName", pageWrap.getModel().getKeyword()) |
| | | .or().like("e.name", pageWrap.getModel().getKeyword()) |
| | | ) |
| | | .eq("c.DELETED",0) |
| | | .eq("c.status",0) |
| | | .orderByAsc("c.id") |
| | | ); |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | //æ¥è¯¢æ¯å¦å¤äºä¼è®®ä¸ |
| | | page.getRecords().forEach(j->{ |
| | | j.setPrefixUrl(path); |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() |
| | | .exists(" select 1 from meeting_user_rel u where u.OBJ_ID = bookings.id and u.USER_ID = '"+j.getId()+"' and u.OBJ_TYPE = 1 ") |
| | | .and(i -> i.between("START_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | .or().between("END_TIME", pageWrap.getModel().getStartTime()+":00",pageWrap.getModel().getEndTime()+":00") |
| | | ) |
| | | )>Constants.ZERO){ |
| | | j.setStatus(Constants.ONE); |
| | | }else{ |
| | | j.setStatus(Constants.ZERO); |
| | | } |
| | | }); |
| | | return page; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.MeetConstants; |
| | | import com.doumee.dao.business.ProjectsMapper; |
| | | import com.doumee.dao.business.model.Projects; |
| | | import com.doumee.dao.web.response.ProjectsResponse; |
| | | import com.doumee.dao.web.response.UserResponse; |
| | | import com.doumee.service.business.ProjectsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | public Boolean isTokenExpired(String token) { |
| | | try { |
| | | LoginUserInfo claims = getClaimsFromToken(token); |
| | | Date expiration = claims.getLoginDate(); |
| | | Date expiration = //claims.getLoginDate(); |
| | | new Date(claims.getLoginDate().getTime() + jwtProperties.getExpiration()); |
| | | return expiration.before(new Date()); |
| | | } catch (Exception e) { |
| | | //éªè¯JWTç¾å失败çåäºä»¤çè¿æ |
| | |
| | | @CloudRequiredPermission("system:dict:update") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDictData systemDictData,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | systemDictData.setLoginUserInfo(this.getLoginUser(token)); |
| | | systemDictData.setCreateUser(systemDictData.getLoginUserInfo().getId()); |
| | | return ApiResponse.success(systemDictDataBiz.create(systemDictData)); |
| | | } |
| | | |
| | |
| | | @CloudRequiredPermission("system:dict:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDictData systemDictData,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | systemDictData.setLoginUserInfo(this.getLoginUser(token)); |
| | | systemDictData.setUpdateUser(systemDictData.getLoginUserInfo().getId()); |
| | | systemDictDataBiz.updateById(systemDictData); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @CloudRequiredPermission("system:dict:update") |
| | | public ApiResponse<PageData<SystemDictDataListVO>> findPage (@RequestBody PageWrap<QuerySystemDictDataDTO> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemDictDataService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢åè±ä»»å¡è§å") |
| | | @PostMapping("/findAllList") |
| | | @CloudRequiredPermission("system:dict:update") |
| | | public ApiResponse findAllList (@RequestBody PageWrap<QuerySystemDictDataDTO> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | List<SystemDictData> list= systemDictDataBiz.queryListByCode(Constants.COFFEE_BEAN_TASK,null); |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | |
| | | nodeVO.setIndex("menu_" + menu.getId()); |
| | | nodeVO.setLabel(menu.getName()); |
| | | nodeVO.setUrl(menu.getPath()); |
| | | nodeVO.setParams(menu.getParams()); |
| | | nodeVO.setIcon(menu.getIcon()); |
| | | nodeVO.setChildren(new ArrayList<>()); |
| | | rootNodes.add(nodeVO); |
| | |
| | | child.setId(menu.getId()); |
| | | child.setLabel(menu.getName()); |
| | | child.setUrl(menu.getPath()); |
| | | child.setParams(menu.getParams()); |
| | | child.setIcon(menu.getIcon()); |
| | | child.setIndex("menu_" + menu.getId()); |
| | | child.setChildren(new ArrayList<>()); |
| | |
| | | public class Constants { |
| | | public static final String HEADER_USER_TOKEN = "dm_user_token"; |
| | | public static final String REDIS_TOKEN_KEY = "token_"; |
| | | public static final String REDIS_HK_TOKEN_KEY = "hk_token_"; |
| | | public static final String[] ALL_SPELL_LIST_FIRST = new String[]{"A", "B", "C", "D", "E", "F", "G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; |
| | | public static final int ZERO = 0 ; |
| | | public static final int ONE = 1 ; |
| | |
| | | public static final String HIDDEN_DANGER_FILE = "HIDDEN_DANGER_FILE"; |
| | | public static final String LOG_DEL_DAYS_LIMIT ="LOG_DEL_DAYS_LIMIT" ; |
| | | public static final String HK_LOG_DEL_DAYS_LIMIT ="HK_LOG_DEL_DAYS_LIMIT" ; |
| | | |
| | | public static final String HK_NGINX_URL = "HK_NGINX_URL"; |
| | | public static boolean DEALING_HK_SYNCPRIVILEGE= false; |
| | | public static boolean DEALING_HK_SYNCDEVICE = false; |
| | | public static boolean DEALING_HK_SYNCDEVICE_STATUS = false; |
| | |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | |
| | | |
| | | |
| | | void insertBatchSomeColumn(List<SystemUser> userList); |
| | | |
| | | |
| | | |
| | | @Select(" select c.id , c.type , c.REALNAME as realName , c.userName as userName , c.avatar ," + |
| | | " c.wechat_name as wechatName , c.mobile , c.sex , c.birthday , c.avatar , d.COMPANY_NAME_PATH as departmentName " + |
| | | " from system_user c " + |
| | | " INNER JOIN company d on c.COMPANY_ID = d.id " + |
| | | " ${ew.customSqlSegment} ") |
| | | IPage<UserResponse> getUserPage(IPage<UserResponse> page, @Param(Constants.WRAPPER) Wrapper wrapper); |
| | | |
| | | @Select(" select c.id , c.type , c.REALNAME as realName , c.userName as userName , c.avatar ," + |
| | | " c.wechat_name as wechatName , c.mobile , c.sex , c.birthday , c.avatar , d.COMPANY_NAME_PATH as departmentName " + |
| | | " from system_user c " + |
| | | " INNER JOIN company d on c.COMPANY_ID = d.id " + |
| | | " ${ew.customSqlSegment} ") |
| | | List<UserResponse> getUserList(@Param(Constants.WRAPPER) Wrapper wrapper); |
| | | |
| | | |
| | | @Select(" select c.id , c.type , c.REALNAME as realName , c.userName as userName , c.avatar ," + |
| | | " c.wechat_name as wechatName , c.mobile , c.sex , c.birthday , c.avatar , d.COMPANY_NAME_PATH as departmentName " + |
| | | " from system_user c " + |
| | | " INNER JOIN company d on c.COMPANY_ID = d.id " + |
| | | " where c.id = #{id} ") |
| | | UserResponse getUserInfo(@Param("id") Integer id); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²å é¤", hidden = true) |
| | | private Boolean deleted; |
| | | @ApiModelProperty(value = "åæ°" ) |
| | | private String params; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººä¿¡æ¯") |
| | | private SystemUser updateUserInfo; |
| | | @ApiModelProperty(value = "åæ°" ) |
| | | private String params; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "åèå") |
| | | private List<SystemMenuNodeVO> children; |
| | | @ApiModelProperty(value = "åæ°" ) |
| | | private String params; |
| | | } |
ÎļþÃû´Ó server/meeting/meeting_service/src/main/java/com/doumee/dao/web/response/UserResponse.java ÐÞ¸Ä |
| | |
| | | package com.doumee.dao.web.response; |
| | | package com.doumee.dao.system.vo; |
| | | |
| | | import com.doumee.core.utils.Date; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | import com.doumee.dao.system.dto.QuerySystemUserDTO; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | List<SystemUser> findList(SystemUser systemUser); |
| | | |
| | | List<UserResponse> getUserList(Integer bookingsId); |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * @author Eva.Caesar Liu |
| | |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemDepartmentListVO; |
| | | import com.doumee.dao.system.vo.SystemUserListVO; |
| | | import com.doumee.dao.system.vo.UserResponse; |
| | | import com.doumee.service.aware.DepartmentDataPermissionAware; |
| | | import com.doumee.service.system.SystemDepartmentService; |
| | | import com.doumee.service.system.SystemPositionService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<UserResponse> getUserList(Integer bookingsId) { |
| | | return systemUserMapper.getUserList(new QueryWrapper<UserResponse>() |
| | | .exists(" select 1 from meeting_user_rel u where u.USER_ID = c.id and u.ISDELETED = 0 and u.OBJ_ID = "+bookingsId+" and u.OBJ_TYPE = 1 ") |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<SystemUserListVO> findPage(PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | // æ ¹é¨é¨æ¡ä»¶å¤çï¼éæ¥è¯¢æ ¹é¨é¨ä¸ææé¨é¨çç¨æ·ï¼ |
| | | /* if (pageWrap.getModel().getRootDeptId() != null) { |
| | |
| | | .or().like(SystemUser::getRealname,pageWrap.getUsername()) |
| | | ); |
| | | queryWrapper.orderByDesc(SystemUser::getCreateTime); |
| | | |
| | | |
| | | |
| | | List<SystemUser> result = systemUserJoinMapper.selectJoinList( SystemUser.class, queryWrapper); |
| | | |
| | |
| | | </resultMap> |
| | | <select id="selectManageList" resultMap="SystemMenuListVO"> |
| | | SELECT |
| | | menu.`ID`, menu.`PARENT_ID`, menu.`NAME`, menu.`PATH`, menu.`FIXED`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED`, |
| | | menu.`ID`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`FIXED`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED`, |
| | | create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME, |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME |
| | | FROM SYSTEM_MENU menu |
| | |
| | | <!-- æ¥è¯¢èåæ --> |
| | | <select id="selectByUserId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | DISTINCT menu.`ID`, menu.`PARENT_ID`, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | DISTINCT menu.`ID`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | FROM `SYSTEM_MENU` menu |
| | | INNER JOIN SYSTEM_ROLE_MENU role_menu ON role_menu.MENU_ID = menu.ID AND role_menu.DELETED = 0 |
| | | INNER JOIN SYSTEM_USER_ROLE user_role ON user_role.ROLE_ID = role_menu.ROLE_ID AND user_role.DELETED = 0 |
| | |
| | | <!-- æ ¹æ®è§è²IDæ¥è¯¢èåå表 --> |
| | | <select id="selectByRoleId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | menu.`ID`, menu.`PARENT_ID`, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | menu.`ID`, menu.`PARENT_ID`, menu.`NAME`,menu.params, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | FROM `SYSTEM_MENU` menu |
| | | INNER JOIN `SYSTEM_ROLE_MENU` role_menu ON role_menu.MENU_ID = menu.ID AND role_menu.DELETED = 0 |
| | | <where> |
| | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.EventSubRequest; |
| | | import com.doumee.core.haikang.model.param.request.ParkListRequest; |
| | | import com.doumee.core.haikang.model.param.request.PrivilegeGroupRequest; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.request.event.acs.EventAcsRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.parks.EventParkRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncPrivilegeServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncPushServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService; |
| | | @Autowired |
| | | private HkSyncPushServiceImpl hkSyncPushService; |
| | | @Autowired |
| | | private HkSyncLoginAuthServiceImpl hkSyncLoginAuthService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("ãæµ·åº·ãå
¨é忥é¨ç¦è®¾å¤æ¥å£") |
| | |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("ãæµ·åº·ãè·åç»ä»¶ææç»å½å°åæ¥å£") |
| | | @PostMapping("/getServiceUrl") |
| | | public ApiResponse getServiceUrl(@RequestBody HKGetServiceLoginUrlRequest param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | param.setUsername(this.getLoginUser(token).getUsername()); |
| | | String result = hkSyncLoginAuthService.getServiceUrl(param); |
| | | return ApiResponse.success(result); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("ãæµ·åº·ãå
¨é忥åè½¦åºæ¥å£") |
| | | @PostMapping("/syncParks") |
| | | @CloudRequiredPermission("business:hksync:park") |
| | |
| | | String facePictureCheck= "/api/frs/v1/face/picture/check";//人è¸è¯å |
| | | String acsDeviceStatus= "/api/nms/v1/online/acs_device/get";//è·åé¨ç¦è®¾å¤å¨çº¿ç¶æ |
| | | String tempCarInRecords= "/api/pms/v1/tempCarInRecords/page";//æ¥è¯¢åºå
车åè½¦ä¿¡æ¯ |
| | | String applyCTGT= "/api/lsm/ssoService/v1/applyCTGT";//æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£ |
| | | String applyST= "/api/lsm/ssoService/v1/applyST";//æ ¹æ®ç»å½æ è¯TGCç³è¯·ç»å½åè¯STæ¥å£ |
| | | String tokenLoginUrl= "/lsm/ssoService/v1/tokenLogin?token=${st}&service=${service}";//ç»ä»¶ææç»å½æ¼æ¥å°å |
| | | } |
| | | |
| | | /** |
| | |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.tempCarInRecords,body); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String applyCTGT(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.applyCTGT,body); |
| | | } |
| | | /** |
| | | * æ ¹æ®ç»å½æ è¯TGCç³è¯·ç»å½åè¯STæ¥å£ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String applyST(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.applyST,body); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ApplyCTGTRequest { |
| | | |
| | | private String loginType;// string False ç»å½ç±»å |
| | | private String userCode;// string Falseç»å½ç¨æ·å |
| | | private String language;// string False è¯è¨æ è¯ |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ApplySTequest { |
| | | |
| | | private String ctgt;// string ctgtåè¯ |
| | | private String service;// string æå¡å°å |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class HKGetServiceLoginUrlRequest { |
| | | |
| | | private String label; //è·åå°ååå
¸label |
| | | private String username; //è·åå°ååå
¸label |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ApplyCTGTResponse { |
| | | |
| | | private String CTGT ;//string False |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ApplySTResponse { |
| | | |
| | | private String ST ;//string STåè¯ |
| | | } |
| | |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<ApplyCTGTResponse> applyCTGT(ApplyCTGTRequest param){ |
| | | log.info("ãæµ·åº·æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.applyCTGT(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<ApplyCTGTResponse>>(){}; |
| | | BaseResponse<ApplyCTGTResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"æµ·åº·æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£æ¯ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *æ ¹æ®ç»å½æ è¯TGCç³è¯·ç»å½åè¯STæ¥å£ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<ApplySTResponse> applyST(ApplySTequest param){ |
| | | log.info("ãæµ·åº·æ ¹æ®ç»å½æ è¯TGCç³è¯·ç»å½åè¯STæ¥å£ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.applyST(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<ApplySTResponse>>(){}; |
| | | BaseResponse<ApplySTResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"æµ·åº·æ ¹æ®ç»å½æ è¯TGCç³è¯·ç»å½åè¯STæ¥å£å£"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·æ ¹æ®ç»å½æ è¯TGCç³è¯·ç»å½åè¯STæ¥å£æ¯ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | private static void logResult(BaseResponse res,String name) { |
| | | if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | log.info("ã"+name+"ã================æå====\n"+res); |
| | |
| | | package com.doumee.service.business.ext; |
| | | |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.DoorsListRequest; |
| | | import com.doumee.core.haikang.model.param.request.ParkListRequest; |
| | | import com.doumee.core.haikang.model.param.request.PrivilegeGroupRequest; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.request.event.acs.EventAcsRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.parks.EventParkRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; |
| | |
| | | void syncMemberFailData(); |
| | | |
| | | void syncMemberDelData(); |
| | | String getServiceUrl(HKGetServiceLoginUrlRequest param); |
| | | } |
| | |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Approve::getIsdeleted,Constants.ZERO) |
| | | .ne(Approve::getStatus,Constants.approveStatus.cancel) |
| | | .eq(Approve::getObjId,businessId) |
| | | .eq(Approve::getObjType,businessType) |
| | | .orderByAsc(Approve::getLevel) |
| | |
| | | if (CollectionUtils.isNotEmpty(copyList)) { |
| | | Approve waitModel = new Approve(); |
| | | waitModel.setApproveType(Constants.ONE); |
| | | waitModel.setStatusInfo("æé"); |
| | | waitModel.setStatus(Constants.ONE); |
| | | waitModel.setTitle("æé人"); |
| | | waitModel.setStatus(copyList.get(Constants.ZERO).getStatus()); |
| | | waitModel.setType(Constants.ONE); |
| | | waitModel.setApproveList(copyList); |
| | | approveDateVO.getApproveList().add(waitModel); |
| | |
| | | private List<Approve> getLevelInfoFromList(Approve level,List<Approve> approveGroupList) { |
| | | List<Approve> list = new ArrayList<>(); |
| | | if(Constants.equalsInteger(level.getApproveType(),Constants.TWO)){ |
| | | level.setApproveType(Constants.ZERO); |
| | | //妿æ¯åäººå®¡æ¹ |
| | | list.add(level); |
| | | return list; |
| | |
| | | Approve refuseModel = new Approve();//å·²æç»çè®°å½ |
| | | List<Approve> waitList = new ArrayList<>(); //æ¥è¯¢å
¨é¨æªå¤ççéå |
| | | List<Approve> otherPassList = new ArrayList<>();//ä»äººå·²å¤ççè®°å½é |
| | | List<Approve> levelApprove = approveGroupList.stream().filter(i->Constants.equalsInteger(i.getLevel(),level.getLevel())).collect(Collectors.toList()); |
| | | dealGroupListBiz(level,levelApprove,approveGroupList,passList,refuseModel,waitList,otherPassList); |
| | | int appType = Constants.formatIntegerNum(level.getApproveType());//å½å审æ¹ç±»å |
| | | dealGroupListBiz(level,approveGroupList,passList,refuseModel,waitList,otherPassList); |
| | | if(Objects.nonNull(refuseModel) && Objects.nonNull(refuseModel.getId())){ |
| | | //å卿ç»çï¼åªéè¦è¿å䏿¡å¤çæ°æ®ï¼åç»ä¸éè¦åæ¾ |
| | | refuseModel.setApproveType(Constants.ZERO); |
| | | list.add(refuseModel); |
| | | return list; |
| | | } |
| | | list.addAll(sortByCreateTime(passList)); |
| | | if(Constants.equalsInteger(level.getApproveType(),Constants.ONE)){ |
| | | if(Constants.equalsInteger(appType,Constants.ONE)){ |
| | | //妿æ¯ä¼ç¾ |
| | | if(waitList.size()>0){ |
| | | if(waitList.size()>1){ |
| | | Approve waitModel = new Approve(); |
| | | waitModel.setApproveType(Constants.ONE); |
| | | waitModel.setStatusInfo(StringUtils.defaultString(level.getTitle(),"审æ¹äºº")+"å¤çä¸"); |
| | | waitModel.setType(Constants.ZERO); |
| | | waitModel.setTitle(StringUtils.defaultString(level.getTitle(),"审æ¹äºº")); |
| | | waitModel.setStatus(Constants.equalsInteger(waitList.get(Constants.ZERO).getStatus(),Constants.ONE)?Constants.ONE:Constants.ZERO); |
| | | waitModel.setStatusInfo("å¤çä¸"); |
| | | if(Constants.equalsInteger(level.getStatus(),Constants.approveStatus.auditIng) |
| | | ||Constants.equalsInteger(level.getStatus(),Constants.approveStatus.pass)){ |
| | | waitModel.setMemberName(waitList.size() +"人ä¼ç¾"); |
| | | } |
| | | waitModel.setApproveList(waitList); |
| | | list.add(waitModel); |
| | | }else if(waitList.size()>0){ |
| | | Approve approve = waitList.get(Constants.ZERO); |
| | | approve.setApproveType(Constants.ZERO); |
| | | approve.setType(Constants.ZERO); |
| | | list.add(approve); |
| | | } |
| | | }else { |
| | | if((waitList.size()> 0 || otherPassList.size()>0)){ |
| | | Approve waitModel = new Approve(); |
| | | waitModel.setApproveType(Constants.ONE); |
| | | if(Constants.equalsInteger(level.getStatus(),Constants.approveStatus.pass)){ |
| | | waitModel.setStatus(Constants.approveStatus.pass); |
| | | waitModel.setType(Constants.ONE); |
| | | waitModel.setTitle("审æ¹äººï¼æéæç¾å®¡æ¹äººï¼"); |
| | | }else{ |
| | | waitModel.setType(Constants.ZERO); |
| | | waitModel.setStatusInfo(passList.size()<=0?StringUtils.defaultString(level.getTitle(),"审æ¹äºº"):"æéæç¾å®¡æ¹äºº"); |
| | | waitModel.setStatus(passList.size()>0?Constants.ONE:Constants.ZERO); |
| | | } |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | approveList.addAll(waitList); |
| | | //å¦ææ¯æç¾ |
| | | if(passList.size()>0){ |
| | | approveList.addAll(otherPassList); |
| | | } |
| | | waitModel.setMemberName("å·²æé"+ approveList.size() +"人"); |
| | | waitModel.setApproveList(approveList); |
| | | list.add(waitModel); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | private void dealGroupListBiz(Approve level, List<Approve> levelApprove,List<Approve> approveGroupList, List<Approve> passList, Approve refuseModel, List<Approve> waitList, List<Approve> otherPassList) { |
| | | private void dealGroupListBiz(Approve level, List<Approve> approveGroupList, List<Approve> passList, Approve refuseModel, List<Approve> waitList, List<Approve> otherPassList) { |
| | | //æ¥è¯¢æ¯å¦åå¨æç»æ°æ® |
| | | List<Approve> levelApprove = approveGroupList.stream().filter(i->Constants.equalsInteger(i.getLevel(),level.getLevel())).collect(Collectors.toList()); |
| | | for (Approve approve:levelApprove) { |
| | | if(!Constants.equalsInteger(level.getLevel(),approve.getLevel())){ |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(Constants.approveStatus.pass,approve.getStatus())){ |
| | | approve.setApproveType(Constants.ZERO); |
| | | passList.add(approve); |
| | | }else if(Constants.equalsInteger(Constants.approveStatus.otherDeal,approve.getStatus())){ |
| | | otherPassList.add(approve); |
| | |
| | | } |
| | | queryWrapper.eq(Member::getIsdeleted,Constants.ZERO); |
| | | List<Member> list = memberJoinMapper.selectJoinList(Member.class,queryWrapper); |
| | | if(list!=null){ |
| | | for(Member m : list){ |
| | | m.setName(StringUtils.defaultString(m.getName(),"")+"-"+StringUtils.defaultString(m.getCompanyName(),"")); |
| | | } |
| | | } |
| | | // if(list!=null){ |
| | | // for(Member m : list){ |
| | | // m.setName(StringUtils.defaultString(m.getName(),"")+"-"+StringUtils.defaultString(m.getCompanyName(),"")); |
| | | // } |
| | | // } |
| | | return list; |
| | | } |
| | | @Override |
| | |
| | | } |
| | | @Override |
| | | // @Async |
| | | public String getServiceUrl(HKGetServiceLoginUrlRequest param){ |
| | | return null; |
| | | } |
| | | @Override |
| | | // @Async |
| | | public void syncParkRecords(Date date){ |
| | | } |
| | | @Override |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl.hksync; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.respose.*; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.DeviceMapper; |
| | | import com.doumee.dao.business.model.Device; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 设å¤ä¿¡æ¯è¡¨Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Service |
| | | public class HkSyncLoginAuthServiceImpl extends HkSyncBaseServiceImpl { |
| | | |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | /** |
| | | * åæ¥æµ·åº·é¨ç¦è®¾å¤æ°æ® |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String getServiceUrl(HKGetServiceLoginUrlRequest param){ |
| | | if(StringUtils.isBlank(param.getLabel())||StringUtils.isBlank(param.getUsername())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç»å½ç»ä»¶å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | //ä¼å
ä»ç¼ååæ°æ®ï¼å¦ææç¼åï¼ç´æ¥è¿åç¼åå°å |
| | | /*String cacheUrl = (String) redisTemplate.opsForValue().get(Constants.REDIS_HK_TOKEN_KEY+param.getUsername()+param.getLabel()); |
| | | if(StringUtils.isNotBlank(cacheUrl)){ |
| | | return cacheUrl; |
| | | }*/ |
| | | String url = systemDictDataBiz.queryByCode(Constants.HK_PARAM,param.getLabel()).getCode(); |
| | | if(StringUtils.isBlank(url)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ApplyCTGTRequest ctgtParam = new ApplyCTGTRequest(); |
| | | ctgtParam.setLanguage("zh_CN"); |
| | | ctgtParam.setUserCode(param.getUsername()); |
| | | ctgtParam.setLoginType("2"); |
| | | BaseResponse<ApplyCTGTResponse> response = HKService.applyCTGT(ctgtParam); |
| | | if(response !=null && StringUtils.equals(response.getCode(),HKConstants.RESPONSE_SUCCEE) &&response.getData()!=null &&StringUtils.isNotBlank(response.getData().getCTGT())){ |
| | | //å¤çæ°å¢æåçæ°æ®ï¼ä¿®æ¹æµ·åº·åæ¥ç¶æ |
| | | String ctgt = response.getData().getCTGT(); |
| | | ApplySTequest stParam = new ApplySTequest(); |
| | | stParam.setCtgt(ctgt); |
| | | stParam.setService(url); |
| | | BaseResponse<ApplySTResponse> result = HKService.applyST(stParam); |
| | | if(result !=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) |
| | | &&result.getData()!=null &&StringUtils.isNotBlank(result.getData().getST())){ |
| | | //å¤çæ°å¢æåçæ°æ®ï¼ä¿®æ¹æµ·åº·åæ¥ç¶æ |
| | | String st = result.getData().getST(); |
| | | try { |
| | | String serviceUrl = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_NGINX_URL).getCode() |
| | | +(HKConstants.InterfacePath.tokenLoginUrl.replace("${st}", st).replace("${service}", URLEncoder.encode(url, "UTF-8"))); |
| | | // redisTemplate.opsForValue().set(Constants.REDIS_HK_TOKEN_KEY+param.getUsername()+param.getLabel(),serviceUrl,1, TimeUnit.HOURS); |
| | | return serviceUrl; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç»å½ç»ä»¶å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç»å½ç»ä»¶å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç»å½ç»ä»¶å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | } |
| | | } |