Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
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
f5cb6f8f
Commit
f5cb6f8f
authored
2 years ago
by
gaozhaochen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 公众号跳转新增用户卡号卡类型
parent
dc7296ff
hpgp-m
hpgp
No related merge requests found
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
129 additions
and
6 deletions
+129
-6
UserConstant.java
.../sh/stc/sict/cloud/common/core/constant/UserConstant.java
+11
-0
XSZYUserInfo.java
...va/cn/sh/stc/sict/cloud/common/core/dto/XSZYUserInfo.java
+37
-0
WoaUtil.java
...n/java/cn/sh/stc/sict/cloud/common/core/util/WoaUtil.java
+1
-1
SysUserBaseServiceImpl.java
.../sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java
+8
-2
AppointmentController.java
.../sict/theme/hphy/controller/mp/AppointmentController.java
+12
-3
HphyPatientBaseController.java
...t/theme/hphy/controller/mp/HphyPatientBaseController.java
+9
-0
HphyPatientBaseServiceImpl.java
...t/theme/hphy/service/impl/HphyPatientBaseServiceImpl.java
+4
-0
BusyIdlePredictionUtil.java
...n/sh/stc/sict/theme/hphy/util/BusyIdlePredictionUtil.java
+47
-0
HpHzjlMapper.xml
...me-schema/src/main/resources/mapper/hpgp/HpHzjlMapper.xml
+0
-0
No files found.
cloud-common/cloud-common-core/src/main/java/cn/sh/stc/sict/cloud/common/core/constant/UserConstant.java
View file @
f5cb6f8f
...
...
@@ -3,4 +3,15 @@ package cn.sh.stc.sict.cloud.common.core.constant;
public
class
UserConstant
{
public
final
static
String
USER_SOURCE_MOBILE
=
"mobile"
;
public
final
static
String
USER_SOURCE_SSB
=
"wd_ssb"
;
/**
* 0:社保卡
* 1:医保卡
* 2:统一自费就诊卡
* 9:其他卡
*/
public
final
static
String
SOCIAL_SECURITY_CARD
=
"0"
;
public
final
static
String
MEDICAL_INSURANCE_CARD
=
"1"
;
public
final
static
String
UNIFIED_MEDICAL_TREATMENT_EXPENSE_CARD
=
"2"
;
public
final
static
String
OTHER_CARD
=
"9"
;
}
This diff is collapsed.
Click to expand it.
cloud-common/cloud-common-core/src/main/java/cn/sh/stc/sict/cloud/common/core/dto/XSZYUserInfo.java
View file @
f5cb6f8f
package
cn
.
sh
.
stc
.
sict
.
cloud
.
common
.
core
.
dto
;
import
cn.hutool.core.util.StrUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.UserConstant
;
import
lombok.Data
;
/**
...
...
@@ -43,6 +45,41 @@ public class XSZYUserInfo {
* 医院编码
*/
private
String
hospitalCode
;
/**
* 卡类型0:社保卡;1:医保卡;2:统一自费就诊卡;9:其他卡
*/
private
String
mediCardType
;
/**
* 卡号
*/
private
String
mediCardId
;
/**
* 将纳里用户卡类型映射为挂号时的卡类型
* 1:就诊卡
* 2:医保卡
* 3:病历号
* 4:健康卡
* 5:社保卡
* 6:住院卡
* 7:院内健健康卡
* 8:体检卡
*/
public
static
String
fromNlType
(
String
mediCardType
)
{
if
(
StrUtil
.
isBlank
(
mediCardType
))
{
return
null
;
}
if
(
mediCardType
.
equals
(
"5"
))
{
return
UserConstant
.
SOCIAL_SECURITY_CARD
;
}
else
if
(
mediCardType
.
equals
(
"2"
))
{
return
UserConstant
.
MEDICAL_INSURANCE_CARD
;
}
else
if
(
mediCardType
.
equals
(
"1"
))
{
return
UserConstant
.
UNIFIED_MEDICAL_TREATMENT_EXPENSE_CARD
;
}
else
{
return
UserConstant
.
OTHER_CARD
;
}
}
}
This diff is collapsed.
Click to expand it.
cloud-common/cloud-common-core/src/main/java/cn/sh/stc/sict/cloud/common/core/util/WoaUtil.java
View file @
f5cb6f8f
...
...
@@ -38,7 +38,7 @@ public class WoaUtil {
/**
* 获取用户信息请求地址
*/
private
final
static
String
WOA_XSZY_USER_INFO_API_URL
=
WOA_XSZY_URL
+
WOA_XSZY_GATEWAY_URL
;
private
final
static
String
WOA_XSZY_USER_INFO_API_URL
=
WOA_XSZY_
PROXY_PASS_
URL
+
WOA_XSZY_GATEWAY_URL
;
/**
* 接口授权信息
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/cloud-upms/cloud-upms-biz/src/main/java/cn/sh/stc/sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java
View file @
f5cb6f8f
...
...
@@ -121,11 +121,17 @@ public class SysUserBaseServiceImpl extends ServiceImpl<SysUserBaseMapper, SysUs
String
hospitalCode
=
infoArray
[
3
];
XSZYUserInfo
xszyUserInfo
=
WoaUtil
.
getXszyUserInfo
(
token
);
String
xszyUserInfoStr
=
JSONUtil
.
toJsonStr
(
xszyUserInfo
);
log
.
error
(
"woa.login.xszyUser = {}"
,
xszyUserInfoStr
);
if
(
ObjectUtil
.
isNull
(
xszyUserInfo
)
||
StrUtil
.
isBlank
(
xszyUserInfo
.
getUserId
()))
{
return
null
;
}
// 传参包含卡号卡类型单独配置
if
(
infoArray
.
length
==
6
)
{
xszyUserInfo
.
setMediCardId
(
infoArray
[
4
]);
xszyUserInfo
.
setMediCardType
(
XSZYUserInfo
.
fromNlType
(
infoArray
[
5
]));
}
String
xszyUserInfoStr
=
JSONUtil
.
toJsonStr
(
xszyUserInfo
);
log
.
error
(
"woa.login.xszyUser = {}"
,
xszyUserInfoStr
);
// 根据用户ID和手机号查询当前用户是否已注册过
LambdaQueryWrapper
<
SysUserBase
>
wrapper
=
new
LambdaQueryWrapper
<>();
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/AppointmentController.java
View file @
f5cb6f8f
...
...
@@ -79,9 +79,10 @@ public class AppointmentController {
return
new
R
().
error
(
"未找到患者信息!"
);
}
boolean
isNullCard
=
(
StrUtil
.
isBlank
(
order
.
getMediCardId
())
||
StrUtil
.
isBlank
(
order
.
getMediCardType
()))
&&
StrUtil
.
isBlank
(
patient
.
getMediCardId
())
||
StrUtil
.
isBlank
(
patient
.
getMediCardType
(
));
&&
(
StrUtil
.
isBlank
(
patient
.
getMediCardId
())
||
StrUtil
.
isBlank
(
patient
.
getMediCardType
()
));
// 有卡预约时检查就诊卡信息
if
(
WanDaConstant
.
ORDER_MODEL_1
.
equals
(
hos
.
getOrderMode
())
&&
isNullCard
)
{
log
.
error
(
"患者信息:{},预约信息:{}"
,
JSONUtil
.
toJsonStr
(
patient
),
JSONUtil
.
toJsonStr
(
order
));
return
new
R
().
error
(
"请补充患者就诊卡信息!"
);
}
String
deptName
=
""
;
...
...
@@ -139,8 +140,16 @@ public class AppointmentController {
order
.
setNumSourceFrom
(
WanDaConstant
.
NUM_SOURCE_FROM
);
order
.
setPatient_type
(
WanDaConstant
.
PATIENT_TYPE_NORMAL
);
if
(
StrUtil
.
isBlank
(
order
.
getMediCardId
())
||
StrUtil
.
isBlank
(
order
.
getMediCardType
()))
{
order
.
setMediCardId
(
patient
.
getMediCardId
());
order
.
setMediCardType
(
patient
.
getMediCardType
());
log
.
error
(
"自动设置卡类型"
);
order
.
setMediCardId
(
""
);
order
.
setMediCardType
(
""
);
if
(
StrUtil
.
isAllNotBlank
(
patient
.
getMediCardId
(),
patient
.
getMediCardType
())
&&
WanDaConstant
.
ORDER_MODEL_1
.
equals
(
hos
.
getOrderMode
()))
{
log
.
error
(
"卡号= {},卡类型={}"
,
patient
.
getMediCardId
(),
patient
.
getMediCardType
());
order
.
setMediCardId
(
patient
.
getMediCardId
());
order
.
setMediCardType
(
patient
.
getMediCardType
());
}
}
order
.
setUserBD
(
DateUtil
.
format
(
IdcardUtil
.
getBirthDate
(
patient
.
getCertId
()),
DatePattern
.
NORM_DATE_PATTERN
));
AppResult
result
=
WanDaHttpUtil
.
submitOrderByUserInfo
(
order
);
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java
View file @
f5cb6f8f
...
...
@@ -188,6 +188,15 @@ public class HphyPatientBaseController {
SecurityUtils
.
updateCurrent
(
current
);
}
// 更新卡号卡类型
if
(
LoginTypeEnum
.
WOA_NL
.
getType
().
equals
(
source
))
{
XSZYUserInfo
xszyUserInfo
=
JSONUtil
.
toBean
(
current
.
getXszyUserInfo
(),
XSZYUserInfo
.
class
);
log
.
error
(
"woaXszyUser = {}"
,
xszyUserInfo
);
base
.
setMediCardType
(
xszyUserInfo
.
getMediCardType
());
base
.
setMediCardId
(
xszyUserInfo
.
getMediCardId
());
hphyPatientBaseService
.
updateById
(
base
);
}
return
new
R
(
base
);
}
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HphyPatientBaseServiceImpl.java
View file @
f5cb6f8f
...
...
@@ -95,6 +95,10 @@ public class HphyPatientBaseServiceImpl extends ServiceImpl<HphyPatientBaseMappe
base
.
setGender
(
Constant
.
INT_YES
.
equals
(
IdcardUtil
.
getGenderByIdCard
(
certId
))
?
"男"
:
"女"
);
base
.
setVerifyStatus
(
Constant
.
STRING_YES
);
}
// 卡号卡类型
base
.
setMediCardType
(
userInfo
.
getMediCardType
());
base
.
setMediCardId
(
userInfo
.
getMediCardType
());
this
.
save
(
base
);
return
base
;
}
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/util/BusyIdlePredictionUtil.java
0 → 100644
View file @
f5cb6f8f
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
util
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction
;
import
lombok.experimental.UtilityClass
;
import
lombok.extern.slf4j.Slf4j
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* @author gao
* @date 2023/03/21 17:27
*/
@Slf4j
@UtilityClass
public
class
BusyIdlePredictionUtil
{
/**
* 获取有号源的三个科室
* @param hpgpBusyIdlePredictionList
* @return
*/
public
static
List
<
HpgpBusyIdlePrediction
>
getHasRemainNum
(
List
<
HpgpBusyIdlePrediction
>
hpgpBusyIdlePredictionList
)
{
if
(
CollUtil
.
isEmpty
(
hpgpBusyIdlePredictionList
))
{
return
Collections
.
emptyList
();
}
// 当前医院近七天有号的三个科室
List
<
String
>
deptCodeList
=
hpgpBusyIdlePredictionList
.
stream
()
// 按科室分组,并统计每个科室可预约号源总量
.
collect
(
Collectors
.
groupingBy
(
HpgpBusyIdlePrediction:
:
getDeptCode
,
Collectors
.
summingInt
(
item
->
Optional
.
ofNullable
(
item
.
getRemainNum
()).
orElse
(
0
))))
.
entrySet
().
stream
()
// 按可预约号源进行排序,取排名前三的科室
.
sorted
(
Collections
.
reverseOrder
(
Map
.
Entry
.
comparingByValue
()))
.
map
(
Map
.
Entry
::
getKey
)
.
limit
(
3
)
.
collect
(
Collectors
.
toList
());
return
hpgpBusyIdlePredictionList
.
stream
().
filter
(
item
->
deptCodeList
.
contains
(
item
.
getDeptCode
())).
collect
(
Collectors
.
toList
());
}
}
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/resources/mapper/HpHzjlMapper.xml
→
smart-health-modules/theme-schema/src/main/resources/mapper/
hpgp/
HpHzjlMapper.xml
View file @
f5cb6f8f
File moved
This diff is collapsed.
Click to expand it.
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