Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hphy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向怀芳
hphy
Commits
ed8ac7bf
Commit
ed8ac7bf
authored
Nov 14, 2022
by
gaozhaochen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新 -> 香山中医院用户接口调用地址
parent
cb9461de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
14 deletions
+44
-14
WoaUtil.java
...n/java/cn/sh/stc/sict/cloud/common/core/util/WoaUtil.java
+32
-12
HphyPatientBaseController.java
...t/theme/hphy/controller/mp/HphyPatientBaseController.java
+10
-0
HpgpDepartmentRankMapper.xml
...c/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml
+2
-2
No files found.
cloud-common/cloud-common-core/src/main/java/cn/sh/stc/sict/cloud/common/core/util/WoaUtil.java
View file @
ed8ac7bf
...
@@ -2,7 +2,7 @@ package cn.sh.stc.sict.cloud.common.core.util;
...
@@ -2,7 +2,7 @@ package cn.sh.stc.sict.cloud.common.core.util;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
cn.
sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.
hutool.json.JSONUtil
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
lombok.experimental.UtilityClass
;
import
lombok.experimental.UtilityClass
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -22,22 +22,41 @@ import ngari.openapi.Response;
...
@@ -22,22 +22,41 @@ import ngari.openapi.Response;
@UtilityClass
@UtilityClass
public
class
WoaUtil
{
public
class
WoaUtil
{
// 香山中医医院公众号用户信息获取接口地址(纳里)
/**
private
final
static
String
XSZY_USER_URL
=
"https://openapi.ngarihealth.com/openapi/gateway"
;
* 香山中医医院公众号用户信息获取接口地址(纳里)
*/
private
final
static
String
WOA_XSZY_URL
=
"https://openapi.ngarihealth.com"
;
private
final
static
String
WOA_XSZY_GATEWAY_URL
=
"/openapi/gateway"
;
/**
* 内网代理请求地址
*/
private
final
static
String
WOA_XSZY_PROXY_PASS_URL
=
"http://30.30.5.74:9988/woa/xszy"
;
/**
* 获取用户信息请求地址
*/
private
final
static
String
WOA_XSZY_USER_INFO_API_URL
=
WOA_XSZY_PROXY_PASS_URL
+
WOA_XSZY_GATEWAY_URL
;
// 接口授权信息
/**
* 接口授权信息
*/
private
final
static
String
APP_KEY
=
"ngari635f7f4b0e980e63"
;
private
final
static
String
APP_KEY
=
"ngari635f7f4b0e980e63"
;
private
final
static
String
APP_SECRET
=
"0e980e634196fcde"
;
private
final
static
String
APP_SECRET
=
"0e980e634196fcde"
;
// 获取用户信息服务ID
/**
* 获取用户信息服务ID
*/
private
final
static
String
SERVICE_ID
=
"openapi.authenticationService"
;
private
final
static
String
SERVICE_ID
=
"openapi.authenticationService"
;
// 获取用户信息方法
/**
* 获取用户信息方法
*/
private
final
static
String
METHOD
=
"apiGetUserInfo"
;
private
final
static
String
METHOD
=
"apiGetUserInfo"
;
/**
// 响应头请求唯一ID
* 响应头请求唯一ID
private
final
static
String
RESPONSE_HEADER_REQUEST_ID
=
"X-Ca-Request-Id"
;
*/
private
final
static
String
RESPONSE_HEADER_REQUEST_ID
=
"X-Ca-RequestId"
;
// 香山中医医院编码
/**
* 香山中医医院编码
*/
private
final
static
String
XSZY_HOSPITAL_CODE
=
"42502905200"
;
private
final
static
String
XSZY_HOSPITAL_CODE
=
"42502905200"
;
/**
/**
...
@@ -50,7 +69,7 @@ public class WoaUtil {
...
@@ -50,7 +69,7 @@ public class WoaUtil {
//如果开启加密,则必填
//如果开启加密,则必填
String
encodingAesKey
=
""
;
String
encodingAesKey
=
""
;
Client
client
=
new
Client
(
XSZY_USER
_URL
,
APP_KEY
,
APP_SECRET
,
encodingAesKey
);
Client
client
=
new
Client
(
WOA_XSZY_USER_INFO_API
_URL
,
APP_KEY
,
APP_SECRET
,
encodingAesKey
);
try
{
try
{
// 入参说明[授权码,是否回调,拓展参数]
// 入参说明[授权码,是否回调,拓展参数]
...
@@ -64,6 +83,7 @@ public class WoaUtil {
...
@@ -64,6 +83,7 @@ public class WoaUtil {
return
xszyUserInfo
;
return
xszyUserInfo
;
}
else
{
}
else
{
log
.
error
(
"香山中医医院公众号token获取用户信息异常-1,requestId = [{}],caError = [{}],error = [{}]"
,
response
.
getHeader
(
RESPONSE_HEADER_REQUEST_ID
),
response
.
getCaErrorMsg
(),
response
.
getErrorMessage
());
log
.
error
(
"香山中医医院公众号token获取用户信息异常-1,requestId = [{}],caError = [{}],error = [{}]"
,
response
.
getHeader
(
RESPONSE_HEADER_REQUEST_ID
),
response
.
getCaErrorMsg
(),
response
.
getErrorMessage
());
log
.
error
(
JSONUtil
.
toJsonStr
(
response
));
return
null
;
return
null
;
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
...
...
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java
View file @
ed8ac7bf
...
@@ -187,4 +187,14 @@ public class HphyPatientBaseController {
...
@@ -187,4 +187,14 @@ public class HphyPatientBaseController {
List
<
HpPatientCard
>
cardList
=
hpPatientCardService
.
listByUserId
(
current
.
getId
());
List
<
HpPatientCard
>
cardList
=
hpPatientCardService
.
listByUserId
(
current
.
getId
());
return
new
R
(
cardList
);
return
new
R
(
cardList
);
}
}
@ApiOperation
(
"第三方公众号进入系统时,获取患者信息"
)
@GetMapping
(
"/third-party/woa"
)
public
R
getwoa
(
@RequestParam
(
"source"
)
String
source
,
@RequestParam
(
"token"
)
String
token
)
{
log
.
error
(
"source = {}, token = {}"
,
source
,
token
);
XSZYUserInfo
xszyUserInfo
=
WoaUtil
.
getXszyUserInfo
(
token
);
return
new
R
(
xszyUserInfo
);
}
}
}
smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml
View file @
ed8ac7bf
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
dr.rank_score rankScore,
dr.rank_score rankScore,
d.one_dept_code oneDeptCode,
d.one_dept_code oneDeptCode,
d.dept_code subDeptCode
d.dept_code subDeptCode
from hpgp_department_rank
_1028
dr
from hpgp_department_rank dr
join hp_dept_info
_copy1
d on (dr.hospital_code = d.hos_org_code and dr.one_dept_code = d.one_dept_code and dr.dept_code = d.dept_code)
join hp_dept_info d on (dr.hospital_code = d.hos_org_code and dr.one_dept_code = d.one_dept_code and dr.dept_code = d.dept_code)
<where>
<where>
<choose>
<choose>
<when
test=
"hospitalCode != null and hospitalCode != ''"
>
<when
test=
"hospitalCode != null and hospitalCode != ''"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment