From 7b3b1cb76452258c3b554b6364ef5d50ed34542c Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 31 五月 2024 11:40:14 +0800
Subject: [PATCH] 最新版本
---
server/system_service/src/main/java/com/doumee/core/utils/Constants.java | 3
admin/src/components/common/Menu.vue | 20 +
admin/src/api/other/other.js | 8
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplySTequest.java | 11 +
server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java | 2
admin/vue.config.js | 7
server/system_service/src/main/java/com/doumee/dao/system/model/SystemMenu.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java | 6
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/HKGetServiceLoginUrlRequest.java | 11 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java | 3
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplyCTGTRequest.java | 12 +
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java | 36 +++
admin/src/components/business/OperaCarUseBookWindow.vue | 28 +-
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncLoginAuthServiceImpl.java | 96 +++++++++
server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java | 11
admin/src/views/hk/frs.vue | 58 +++++
admin/src/assets/icons/ic_grey.png | 0
server/system_service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java | 2
admin/src/views/hk/hkservice.vue | 60 ++++++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplyCTGTResponse.java | 9
admin/src/components/business/OperaHiddenDangerWindow.vue | 13
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java | 20 +
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java | 5
admin/src/components/common/tagsview.vue | 14
server/system_service/src/main/resources/mappers/SystemMenuMapper.xml | 6
admin/src/views/hk/dfeform.vue | 58 +++++
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java | 17 +
admin/src/views/hk/copas.vue | 58 +++++
server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java | 2
server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplySTResponse.java | 9
30 files changed, 526 insertions(+), 61 deletions(-)
diff --git a/admin/src/api/other/other.js b/admin/src/api/other/other.js
new file mode 100644
index 0000000..ed641c6
--- /dev/null
+++ b/admin/src/api/other/other.js
@@ -0,0 +1,8 @@
+import request from '../../utils/request'
+
+// 鏌ヨ
+export function getServiceUrl (data) {
+ return request.post('/visitsAdmin/cloudService//business/hksync/getServiceUrl', data, {
+ trim: true
+ })
+}
diff --git a/admin/src/assets/icons/ic_grey.png b/admin/src/assets/icons/ic_grey.png
index 077b42d..0f17902 100644
--- a/admin/src/assets/icons/ic_grey.png
+++ b/admin/src/assets/icons/ic_grey.png
Binary files differ
diff --git a/admin/src/components/business/OperaCarUseBookWindow.vue b/admin/src/components/business/OperaCarUseBookWindow.vue
index d4290bb..146c5de 100644
--- a/admin/src/components/business/OperaCarUseBookWindow.vue
+++ b/admin/src/components/business/OperaCarUseBookWindow.vue
@@ -67,35 +67,35 @@
<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">
@@ -117,6 +117,7 @@
<el-dialog
append-to-body
title="鍚屾剰鐢宠"
+ style="text-align: center"
class="dialogCl"
:visible.sync="isShowProblem"
width="480px"
@@ -149,6 +150,7 @@
<el-dialog
append-to-body
title="鎷掔粷鐢宠"
+ style="text-align: center"
class="dialogCl"
:visible.sync="isBackProblem"
width="600px"
@@ -478,7 +480,7 @@
height: 40px;
border-radius: 50%;
margin: 0 12px 0 16px;
- border: 1px solid;
+ //border: 1px solid;
}
.content {
flex: 1;
diff --git a/admin/src/components/business/OperaHiddenDangerWindow.vue b/admin/src/components/business/OperaHiddenDangerWindow.vue
index 39d03c6..8281999 100644
--- a/admin/src/components/business/OperaHiddenDangerWindow.vue
+++ b/admin/src/components/business/OperaHiddenDangerWindow.vue
@@ -116,9 +116,9 @@
<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">
@@ -683,6 +683,11 @@
color: #53b76f;
font-size: 24px;
}
+
+ .iconnew{
+ width: 24px;
+ height: 24px;
+ }
.icon1 {
position: relative;
z-index: 11;
@@ -700,7 +705,7 @@
height: 40px;
border-radius: 50%;
margin: 0 12px 0 16px;
- border: 1px solid;
+ //border: 1px solid;
}
.content {
flex: 1;
diff --git a/admin/src/components/common/Menu.vue b/admin/src/components/common/Menu.vue
index b928666..0a5b41e 100644
--- a/admin/src/components/common/Menu.vue
+++ b/admin/src/components/common/Menu.vue
@@ -33,11 +33,11 @@
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
@@ -45,7 +45,7 @@
// 榛樿灞曞紑鐨勮彍鍗昳ndex
defaultOpeneds () {
// return this.menuData.list.map(menu => menu.index)
-
+
return [this.menuData.list[0].index]
}
},
@@ -55,20 +55,24 @@
const menuConfig = this.__getMenuConfig(menuIndex, 'index', this.menuData.list)
// 鎵句笉鍒伴〉闈�
try {
- require('@/views' + menuConfig.url)
+ 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
}
-
- this.$router.push(menuConfig.url)
- this.$store.commit("pushtags", menuConfig)
+ 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)
},
// 鑾峰彇鑿滃崟閰嶇疆
__getMenuConfig (value, key, menus) {
diff --git a/admin/src/components/common/tagsview.vue b/admin/src/components/common/tagsview.vue
index 8d654bc..6f66b69 100644
--- a/admin/src/components/common/tagsview.vue
+++ b/admin/src/components/common/tagsview.vue
@@ -12,7 +12,7 @@
: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)"
>
@@ -68,7 +68,7 @@
},
$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)
@@ -129,11 +129,11 @@
}
} else {
// 閭d箞锛屽鏋滀笂闈㈢殑鏉′欢閮戒笉鎴愮珛锛屾病鏈塴ength=0.涔熷氨鏄浣犺繕鏈夊ソ鍑犱釜鏍囩锛屽苟涓斾綘鍒犻櫎鐨勬槸鏈�鍚庝竴浣嶆爣绛撅紝閭d箞灏卞線宸﹁竟鎸竴浣嶈烦杞矾鐢�
- 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 {
// 濡傛灉浣犵偣鍑讳笉鏄渶鍚庝竴浣嶆爣绛撅紝鐐圭殑鍓嶉潰鐨勶紝閭e氨寰�鍙宠竟璺宠浆
- this.$router.push({ path: this.tags[index].url })
+ this.$router.push({ path: this.tags[index].url ,query:{param: this.tags[index].params}})
}
},
// 鐐瑰嚮璺宠浆璺敱
@@ -142,7 +142,7 @@
// 鍒ゆ柇锛氬綋鍓嶈矾鐢变笉绛変簬褰撳墠閫変腑椤圭殑url锛屼篃灏变唬琛ㄤ綘鐐瑰嚮鐨勪笉鏄幇鍦ㄩ�変腑鐨勬爣绛撅紝鏄彟涓�涓爣绛惧氨璺宠浆杩囧幓锛屽鏋滀綘鐐瑰嚮鐨勬槸鐜板湪宸茬粡閫変腑鐨勬爣绛惧氨涓嶇敤璺宠浆浜嗭紝鍥犱负浣犲凡缁忓湪杩欎釜璺敱浜嗚繕璺充粈涔堝憿銆�
if (this.$route.path !== item.url) {
// 鐢╬ath鐨勮烦杞柟娉曟妸褰撳墠椤圭殑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)
@@ -150,8 +150,8 @@
}
},
// 閫氳繃鍒ゆ柇璺敱涓�鑷磋繑鍥炲竷灏斿�兼坊鍔燾lass锛屾坊鍔犻珮浜晥鏋�
- 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() {
diff --git a/admin/src/views/hk/copas.vue b/admin/src/views/hk/copas.vue
new file mode 100644
index 0000000..d8ee255
--- /dev/null
+++ b/admin/src/views/hk/copas.vue
@@ -0,0 +1,58 @@
+<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: '姝e湪鍔姏鐧诲綍缁勪欢鏈嶅姟...'
+ }
+ },
+ created () {
+ this.config({
+ module: '璁惧绠therLoginService鐞嗕俊鎭〃',
+ 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 = '姝e湪鍋氬姫鍔涘姞杞界粍浠�!'
+ this.url = res
+ })
+ .catch(e => {
+ this.message = '鐧诲綍缁勪欢鏈嶅姟澶辫触,璇疯仈绯荤郴缁熺鐞嗗憳妫�鏌�!'
+ })
+ .finally(() => {
+ this.loading = false
+ })
+ }
+ }
+}
+</script>
+
+<style>
+</style>
diff --git a/admin/src/views/hk/dfeform.vue b/admin/src/views/hk/dfeform.vue
new file mode 100644
index 0000000..a488a3b
--- /dev/null
+++ b/admin/src/views/hk/dfeform.vue
@@ -0,0 +1,58 @@
+<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: '姝e湪鍔姏鐧诲綍缁勪欢鏈嶅姟...'
+ }
+ },
+ created () {
+ this.config({
+ module: '璁惧绠therLoginService鐞嗕俊鎭〃',
+ 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 = '姝e湪鍋氬姫鍔涘姞杞界粍浠�!'
+ this.url = res
+ })
+ .catch(e => {
+ this.message = '鐧诲綍缁勪欢鏈嶅姟澶辫触,璇疯仈绯荤郴缁熺鐞嗗憳妫�鏌�!'
+ })
+ .finally(() => {
+ this.loading = false
+ })
+ }
+ }
+}
+</script>
+
+<style>
+</style>
diff --git a/admin/src/views/hk/frs.vue b/admin/src/views/hk/frs.vue
new file mode 100644
index 0000000..4496588
--- /dev/null
+++ b/admin/src/views/hk/frs.vue
@@ -0,0 +1,58 @@
+<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: '姝e湪鍔姏鐧诲綍缁勪欢鏈嶅姟...'
+ }
+ },
+ created () {
+ this.config({
+ module: '璁惧绠therLoginService鐞嗕俊鎭〃',
+ 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 = '姝e湪鍋氬姫鍔涘姞杞界粍浠�!'
+ this.url = res
+ })
+ .catch(e => {
+ this.message = '鐧诲綍缁勪欢鏈嶅姟澶辫触,璇疯仈绯荤郴缁熺鐞嗗憳妫�鏌�!'
+ })
+ .finally(() => {
+ this.loading = false
+ })
+ }
+ }
+}
+</script>
+
+<style>
+</style>
diff --git a/admin/src/views/hk/hkservice.vue b/admin/src/views/hk/hkservice.vue
new file mode 100644
index 0000000..28924d0
--- /dev/null
+++ b/admin/src/views/hk/hkservice.vue
@@ -0,0 +1,60 @@
+<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: '姝e湪鍔姏鐧诲綍缁勪欢鏈嶅姟...'
+ }
+ },
+ created () {
+ this.config({
+ module: '璁惧绠therLoginService鐞嗕俊鎭〃',
+ 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 = '姝e湪鍋氬姫鍔涘姞杞界粍浠�!'
+ this.url = res
+ })
+ .catch(e => {
+ this.message = '鐧诲綍缁勪欢鏈嶅姟澶辫触,璇疯仈绯荤郴缁熺鐞嗗憳妫�鏌�!'
+ })
+ .finally(() => {
+ this.loading = false
+ })
+ }
+ }
+}
+</script>
+
+<style>
+</style>
diff --git a/admin/vue.config.js b/admin/vue.config.js
index c429385..b120104 100644
--- a/admin/vue.config.js
+++ b/admin/vue.config.js
@@ -12,16 +12,15 @@
lintOnSave: false,
devServer: {
host: '0.0.0.0',
- port: 10012,
- proxy: {
+ port: 10012
+ /* proxy: {
[process.env.VUE_APP_API_PREFIX]: {
target: process.env.VUE_APP_API_URL,
changeOrigin: true,
pathRewrite: {
[`^${[process.env.VUE_APP_API_PREFIX]}`]: ''
}
- }
- }
+ } */
},
configureWebpack: {
resolve: {
diff --git a/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java b/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
index 5d21cfe..ffdaee2 100644
--- a/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
+++ b/server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java
@@ -46,6 +46,7 @@
@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));
}
@@ -75,6 +76,7 @@
@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);
}
@@ -84,15 +86,6 @@
@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);
}
diff --git a/server/system_service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java b/server/system_service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java
index 2b5f6e2..958a24f 100644
--- a/server/system_service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java
+++ b/server/system_service/src/main/java/com/doumee/biz/system/impl/SystemMenuBizImpl.java
@@ -126,6 +126,7 @@
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);
@@ -210,6 +211,7 @@
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<>());
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
index d89fc2d..ba52072 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -25,6 +25,7 @@
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 ;
@@ -102,7 +103,7 @@
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;
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/model/SystemMenu.java b/server/system_service/src/main/java/com/doumee/dao/system/model/SystemMenu.java
index 44edb71..5f59869 100644
--- a/server/system_service/src/main/java/com/doumee/dao/system/model/SystemMenu.java
+++ b/server/system_service/src/main/java/com/doumee/dao/system/model/SystemMenu.java
@@ -70,5 +70,7 @@
@ApiModelProperty(value = "鏄惁宸插垹闄�", hidden = true)
private Boolean deleted;
+ @ApiModelProperty(value = "鍙傛暟" )
+ private String params;
}
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java b/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java
index 6f269d9..9e9b1d5 100644
--- a/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java
+++ b/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuListVO.java
@@ -27,4 +27,6 @@
@ApiModelProperty(value = "鏇存柊浜轰俊鎭�")
private SystemUser updateUserInfo;
+ @ApiModelProperty(value = "鍙傛暟" )
+ private String params;
}
diff --git a/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java b/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java
index 47b6262..c2f2483 100644
--- a/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java
+++ b/server/system_service/src/main/java/com/doumee/dao/system/vo/SystemMenuNodeVO.java
@@ -32,4 +32,6 @@
@ApiModelProperty(value = "瀛愯彍鍗�")
private List<SystemMenuNodeVO> children;
+ @ApiModelProperty(value = "鍙傛暟" )
+ private String params;
}
diff --git a/server/system_service/src/main/resources/mappers/SystemMenuMapper.xml b/server/system_service/src/main/resources/mappers/SystemMenuMapper.xml
index 0ec9ada..9aad846 100644
--- a/server/system_service/src/main/resources/mappers/SystemMenuMapper.xml
+++ b/server/system_service/src/main/resources/mappers/SystemMenuMapper.xml
@@ -16,7 +16,7 @@
</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
@@ -31,7 +31,7 @@
<!-- 鏌ヨ鑿滃崟鏍� -->
<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
@@ -46,7 +46,7 @@
<!-- 鏍规嵁瑙掕壊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>
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java
index 7bb21a8..fa30516 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/HkSyncCloudController.java
@@ -3,19 +3,13 @@
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;
@@ -40,6 +34,8 @@
private HkSyncPrivilegeServiceImpl hkSyncPrivilegeService;
@Autowired
private HkSyncPushServiceImpl hkSyncPushService;
+ @Autowired
+ private HkSyncLoginAuthServiceImpl hkSyncLoginAuthService;
@PreventRepeat
@ApiOperation("銆愭捣搴枫�戝叏閲忓悓姝ラ棬绂佽澶囨帴鍙�")
@@ -50,6 +46,14 @@
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")
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
index d84b7de..6b8f7d4 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -88,6 +88,9 @@
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";//鏍规嵁鐢ㄦ埛鏍囪瘑鑾峰彇瀹㈡埛绔疶GC鎺ュ彛
+ String applyST= "/api/lsm/ssoService/v1/applyST";//鏍规嵁鐧诲綍鏍囪瘑TGC鐢宠鐧诲綍鍑瘉ST鎺ュ彛
+ String tokenLoginUrl= "/lsm/ssoService/v1/tokenLogin?token=${st}&service=${service}";//缁勪欢鎺堟潈鐧诲綍鎷兼帴鍦板潃
}
/**
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
index 298e6b2..6992fdc 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -593,4 +593,21 @@
return startDoPostStringArtemis(HKConstants.InterfacePath.tempCarInRecords,body);
}
+ /**
+ * 鏍规嵁鐢ㄦ埛鏍囪瘑鑾峰彇瀹㈡埛绔疶GC鎺ュ彛
+ * @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);
+ }
+
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplyCTGTRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplyCTGTRequest.java
new file mode 100644
index 0000000..4ce94a4
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplyCTGTRequest.java
@@ -0,0 +1,12 @@
+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 璇█鏍囪瘑
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplySTequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplySTequest.java
new file mode 100644
index 0000000..5165121
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/ApplySTequest.java
@@ -0,0 +1,11 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+@Data
+public class ApplySTequest {
+
+ private String ctgt;// string ctgt鍑瘉
+ private String service;// string 鏈嶅姟鍦板潃
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/HKGetServiceLoginUrlRequest.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/HKGetServiceLoginUrlRequest.java
new file mode 100644
index 0000000..d60bc36
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/request/HKGetServiceLoginUrlRequest.java
@@ -0,0 +1,11 @@
+package com.doumee.core.haikang.model.param.request;
+
+import lombok.Data;
+
+@Data
+public class HKGetServiceLoginUrlRequest {
+
+ private String label; //鑾峰彇鍦板潃瀛楀吀label
+ private String username; //鑾峰彇鍦板潃瀛楀吀label
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplyCTGTResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplyCTGTResponse.java
new file mode 100644
index 0000000..301b90b
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplyCTGTResponse.java
@@ -0,0 +1,9 @@
+package com.doumee.core.haikang.model.param.respose;
+
+import lombok.Data;
+
+@Data
+public class ApplyCTGTResponse {
+
+private String CTGT ;//string False
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplySTResponse.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplySTResponse.java
new file mode 100644
index 0000000..3ec2964
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/param/respose/ApplySTResponse.java
@@ -0,0 +1,9 @@
+package com.doumee.core.haikang.model.param.respose;
+
+import lombok.Data;
+
+@Data
+public class ApplySTResponse {
+
+private String ST ;//string ST鍑瘉
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
index 438bab3..bdbe7c6 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/service/HKService.java
@@ -1035,6 +1035,42 @@
}
return null;
}
+ /**
+ *鏍规嵁鐢ㄦ埛鏍囪瘑鑾峰彇瀹㈡埛绔疶GC鎺ュ彛
+ * @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,"娴峰悍鏍规嵁鐢ㄦ埛鏍囪瘑鑾峰彇瀹㈡埛绔疶GC鎺ュ彛");
+ 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("銆愭捣搴锋牴鎹櫥褰曟爣璇員GC鐢宠鐧诲綍鍑瘉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("銆愭捣搴锋牴鎹櫥褰曟爣璇員GC鐢宠鐧诲綍鍑瘉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);
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
index 7af1926..6779db0 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
@@ -1,9 +1,6 @@
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;
@@ -83,4 +80,5 @@
void syncMemberFailData();
void syncMemberDelData();
+ String getServiceUrl(HKGetServiceLoginUrlRequest param);
}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
index 9ed642b..eee6192 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
@@ -42,6 +42,11 @@
}
@Override
// @Async
+ public String getServiceUrl(HKGetServiceLoginUrlRequest param){
+ return null;
+ }
+ @Override
+// @Async
public void syncParkRecords(Date date){
}
@Override
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncLoginAuthServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncLoginAuthServiceImpl.java
new file mode 100644
index 0000000..de74b82
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncLoginAuthServiceImpl.java
@@ -0,0 +1,96 @@
+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;
+
+/**
+ * 璁惧淇℃伅琛⊿ervice瀹炵幇
+ * @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(),"瀵逛笉璧凤紝鐧诲綍缁勪欢澶辫触锛岃绋嶅悗閲嶈瘯锛�");
+ }
+ }
+}
--
Gitblit v1.9.3