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
2c7710f7
Commit
2c7710f7
authored
2 years ago
by
gaozhaochen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 1. 万达公众号对接;2. 号源信息查询逻辑更新和健康云保持一致
parent
8d82fb17
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
310 additions
and
115 deletions
+310
-115
LoginTypeEnum.java
.../sict/cloud/common/core/constant/enums/LoginTypeEnum.java
+4
-0
WoaUtil.java
...n/java/cn/sh/stc/sict/cloud/common/core/util/WoaUtil.java
+22
-1
SysUserBaseServiceImpl.java
.../sict/cloud/upms/service/impl/SysUserBaseServiceImpl.java
+53
-0
HpgpBusyIdlePredictionService.java
...ict/theme/hpgp/service/HpgpBusyIdlePredictionService.java
+3
-2
HpgpKsHotService.java
...a/cn/sh/stc/sict/theme/hpgp/service/HpgpKsHotService.java
+2
-1
HpHzjlServiceImpl.java
...h/stc/sict/theme/hpgp/service/impl/HpHzjlServiceImpl.java
+25
-16
HpgpBusyIdlePredictionServiceImpl.java
.../hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java
+83
-37
HpgpDepartmentRankServiceImpl.java
...heme/hpgp/service/impl/HpgpDepartmentRankServiceImpl.java
+2
-2
HpgpKsHotServiceImpl.java
...tc/sict/theme/hpgp/service/impl/HpgpKsHotServiceImpl.java
+2
-2
HpDeptInfoController.java
...c/sict/theme/hphy/controller/mp/HpDeptInfoController.java
+6
-6
HphyPatientBaseController.java
...t/theme/hphy/controller/mp/HphyPatientBaseController.java
+9
-5
WDController.java
...cn/sh/stc/sict/theme/hphy/controller/mp/WDController.java
+13
-10
RefreshJob.java
...n/java/cn/sh/stc/sict/theme/hphy/schedule/RefreshJob.java
+6
-8
HpDeptInfoService.java
.../cn/sh/stc/sict/theme/hphy/service/HpDeptInfoService.java
+2
-0
HphyPatientBaseService.java
...h/stc/sict/theme/hphy/service/HphyPatientBaseService.java
+11
-5
HpDeptInfoServiceImpl.java
...c/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java
+4
-4
HphyPatientBaseServiceImpl.java
...t/theme/hphy/service/impl/HphyPatientBaseServiceImpl.java
+32
-5
WanDaHttpUtil.java
...main/java/cn/sh/stc/sict/theme/hphy/wd/WanDaHttpUtil.java
+31
-11
No files found.
cloud-common/cloud-common-core/src/main/java/cn/sh/stc/sict/cloud/common/core/constant/enums/LoginTypeEnum.java
View file @
2c7710f7
...
@@ -41,6 +41,10 @@ public enum LoginTypeEnum {
...
@@ -41,6 +41,10 @@ public enum LoginTypeEnum {
* 打浦桥,外滩,小东门,老西门,豫园,五里桥,淮海,瑞二
* 打浦桥,外滩,小东门,老西门,豫园,五里桥,淮海,瑞二
*/
*/
WOA_ZZ
(
"woa_zz"
,
"中智用户系统公众号登录"
),
WOA_ZZ
(
"woa_zz"
,
"中智用户系统公众号登录"
),
/**
* 上海交通大学医学院附属第九人民医院黄浦分院
*/
WOA_WD
(
"woa_wd"
,
"万达公众号用户系统公众号登录"
),
/**
/**
* H5登录
* H5登录
...
...
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 @
2c7710f7
...
@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
...
@@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
import
cn.hutool.http.HttpRequest
;
import
cn.hutool.http.HttpRequest
;
import
cn.hutool.http.HttpResponse
;
import
cn.hutool.http.HttpResponse
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAWDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
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
;
...
@@ -37,7 +38,7 @@ public class WoaUtil {
...
@@ -37,7 +38,7 @@ public class WoaUtil {
/**
/**
* 获取用户信息请求地址
* 获取用户信息请求地址
*/
*/
private
final
static
String
WOA_XSZY_USER_INFO_API_URL
=
WOA_XSZY_
PROXY_PASS_
URL
+
WOA_XSZY_GATEWAY_URL
;
private
final
static
String
WOA_XSZY_USER_INFO_API_URL
=
WOA_XSZY_URL
+
WOA_XSZY_GATEWAY_URL
;
/**
/**
* 接口授权信息
* 接口授权信息
...
@@ -98,6 +99,9 @@ public class WoaUtil {
...
@@ -98,6 +99,9 @@ public class WoaUtil {
// private final static String WOA_ZZ_PROXY_PASS_URL = "https://booking.hpdapuqiao.com";
// private final static String WOA_ZZ_PROXY_PASS_URL = "https://booking.hpdapuqiao.com";
private
final
static
String
ZZ_USER_INFO_API_URL
=
WOA_ZZ_PROXY_PASS_URL
+
"/api/Other/GetPerson"
;
private
final
static
String
ZZ_USER_INFO_API_URL
=
WOA_ZZ_PROXY_PASS_URL
+
"/api/Other/GetPerson"
;
//private final static String WOA_WD_PROXY_PASS_URL = "https://wxgzh.shjyhpfy.com/api/hosservice/visit/GetUserInfoByToken";
private
final
static
String
WOA_WD_PROXY_PASS_URL
=
"http://30.30.5.74:9988/woa/wd"
;
private
final
static
String
WOA_WD_USER_INFO_URL
=
WOA_WD_PROXY_PASS_URL
+
"/api/hosservice/visit/GetUserInfoByToken"
;
public
WOAZzUserInfo
getZzUserInfo
(
String
accessToken
)
{
public
WOAZzUserInfo
getZzUserInfo
(
String
accessToken
)
{
try
{
try
{
...
@@ -114,6 +118,23 @@ public class WoaUtil {
...
@@ -114,6 +118,23 @@ public class WoaUtil {
log
.
error
(
ex
.
getMessage
(),
ex
);
log
.
error
(
ex
.
getMessage
(),
ex
);
return
null
;
return
null
;
}
}
}
public
WOAWDUserInfo
getWoaWDUserInfo
(
String
accessToken
)
{
try
{
HttpResponse
response
=
HttpRequest
.
get
(
WOA_WD_USER_INFO_URL
)
.
header
(
"access-token"
,
accessToken
)
.
execute
();
if
(
response
.
getStatus
()
!=
200
)
{
log
.
error
(
"万达公众号获取用户信息异常-1"
);
return
null
;
}
return
JSONUtil
.
toBean
(
response
.
body
(),
WOAWDUserInfo
.
class
);
}
catch
(
Exception
ex
)
{
log
.
error
(
"万达公众号token获取用户信息异-2!"
);
log
.
error
(
ex
.
getMessage
(),
ex
);
return
null
;
}
}
}
...
...
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 @
2c7710f7
...
@@ -10,6 +10,7 @@ import cn.sh.stc.sict.cloud.common.core.constant.RedisCacheConstant;
...
@@ -10,6 +10,7 @@ import cn.sh.stc.sict.cloud.common.core.constant.RedisCacheConstant;
import
cn.sh.stc.sict.cloud.common.core.constant.UserConstant
;
import
cn.sh.stc.sict.cloud.common.core.constant.UserConstant
;
import
cn.sh.stc.sict.cloud.common.core.constant.enums.LoginTypeEnum
;
import
cn.sh.stc.sict.cloud.common.core.constant.enums.LoginTypeEnum
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAWDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
...
@@ -96,6 +97,9 @@ public class SysUserBaseServiceImpl extends ServiceImpl<SysUserBaseMapper, SysUs
...
@@ -96,6 +97,9 @@ public class SysUserBaseServiceImpl extends ServiceImpl<SysUserBaseMapper, SysUs
// 中智公众号登录
// 中智公众号登录
case
WOA_ZZ:
case
WOA_ZZ:
return
this
.
getWoaZzUserInfoByToken
(
split
);
return
this
.
getWoaZzUserInfoByToken
(
split
);
// 万达公众号登录
case
WOA_WD:
return
this
.
getWoaWDUserInfoByToken
(
split
);
// 微信登录
// 微信登录
default
:
default
:
WxOAuth2AccessToken
token
=
wxMpService
.
getOAuth2Service
().
getAccessToken
(
split
[
2
]);
WxOAuth2AccessToken
token
=
wxMpService
.
getOAuth2Service
().
getAccessToken
(
split
[
2
]);
...
@@ -245,6 +249,55 @@ public class SysUserBaseServiceImpl extends ServiceImpl<SysUserBaseMapper, SysUs
...
@@ -245,6 +249,55 @@ public class SysUserBaseServiceImpl extends ServiceImpl<SysUserBaseMapper, SysUs
return
info
;
return
info
;
}
}
private
UserInfo
getWoaWDUserInfoByToken
(
String
[]
infoArray
)
{
String
source
=
infoArray
[
0
];
String
appId
=
infoArray
[
1
];
String
token
=
infoArray
[
2
];
String
hospitalCode
=
infoArray
[
3
];
WOAWDUserInfo
userInfo
=
WoaUtil
.
getWoaWDUserInfo
(
token
);
String
userInfoStr
=
JSONUtil
.
toJsonStr
(
userInfo
);
log
.
error
(
"woa.login.wdUser = {}"
,
userInfoStr
);
if
(
ObjectUtil
.
isNull
(
userInfo
)
||
StrUtil
.
isBlank
(
userInfo
.
getId
()))
{
return
null
;
}
// 根据用户ID和手机号查询当前用户是否已注册过
LambdaQueryWrapper
<
SysUserBase
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SysUserBase:
:
getOpenId
,
userInfo
.
getId
())
.
or
()
.
eq
(
SysUserBase:
:
getPhone
,
userInfo
.
getMobile
())
.
orderByDesc
(
SysUserBase:
:
getUpdateTime
)
.
last
(
"limit 1"
);
SysUserBase
user
=
this
.
getOne
(
wrapper
);
// 未注册用户默认注册
if
(
user
==
null
)
{
user
=
new
SysUserBase
();
user
.
setUserName
(
userInfo
.
getMobile
());
user
.
setOpenId
(
userInfo
.
getId
());
user
.
setName
(
userInfo
.
getUsername
());
user
.
setIdCard
(
userInfo
.
getPersoncard
());
user
.
setSex
(
userInfo
.
getGender
());
user
.
setHeadimg
(
userInfo
.
getAvator
());
user
.
setSource
(
source
);
user
.
setStatus
(
Constant
.
BYTE_NO
);
user
.
setPasswd
(
ENCODER
.
encode
(
Constant
.
DEFAULT_PASSWORD
));
user
.
setPhone
(
userInfo
.
getMobile
());
user
.
setAppId
(
appId
);
this
.
save
(
user
);
}
UserInfo
info
=
new
UserInfo
();
info
.
setSysUserBase
(
user
);
info
.
setOpenId
(
userInfo
.
getId
());
// 设置医疗机构代码,后续查询只显示当前医疗机构下的查询结果
info
.
setHospitalCode
(
hospitalCode
);
return
info
;
}
@Override
@Override
public
boolean
saveDto
(
UserDTO
dto
)
{
public
boolean
saveDto
(
UserDTO
dto
)
{
if
(
NumberUtil
.
isNotNullOrZero
(
dto
.
getUser
().
getId
()))
{
if
(
NumberUtil
.
isNotNullOrZero
(
dto
.
getUser
().
getId
()))
{
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpBusyIdlePredictionService.java
View file @
2c7710f7
...
@@ -3,6 +3,7 @@ package cn.sh.stc.sict.theme.hpgp.service;
...
@@ -3,6 +3,7 @@ package cn.sh.stc.sict.theme.hpgp.service;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateTime
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank
;
import
cn.sh.stc.sict.theme.hphy.model.HpDeptInfo
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -28,7 +29,7 @@ public interface HpgpBusyIdlePredictionService extends IService<HpgpBusyIdlePred
...
@@ -28,7 +29,7 @@ public interface HpgpBusyIdlePredictionService extends IService<HpgpBusyIdlePred
*/
*/
List
<
HpgpBusyIdlePrediction
>
busyIdlePrediction
(
String
hospitalCode
,
String
deptName
);
List
<
HpgpBusyIdlePrediction
>
busyIdlePrediction
(
String
hospitalCode
,
String
deptName
);
void
statisticResourceInfo
(
Hp
gpDepartmentRank
dept
,
Date
startDate
,
Date
endDate
,
Byte
flag
);
void
statisticResourceInfo
(
Hp
DeptInfo
dept
,
Date
startDate
,
Date
endDate
,
Byte
flag
);
List
<
HpgpBusyIdlePrediction
>
listByDept
Rank
(
HpgpDepartmentRank
dept
,
DateTime
startTime
,
DateTime
endTime
);
List
<
HpgpBusyIdlePrediction
>
listByDept
(
HpDeptInfo
dept
,
DateTime
startTime
,
DateTime
endTime
);
}
}
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/HpgpKsHotService.java
View file @
2c7710f7
...
@@ -17,8 +17,9 @@ public interface HpgpKsHotService extends IService<HpgpKsHot> {
...
@@ -17,8 +17,9 @@ public interface HpgpKsHotService extends IService<HpgpKsHot> {
* 根据医疗机构代码查询热门科室
* 根据医疗机构代码查询热门科室
*
*
* @param yljgdm 医疗机构代码
* @param yljgdm 医疗机构代码
* @param size 科室数量
* @return
* @return
*/
*/
List
<
HpgpKsHot
>
listHotDept
(
String
yljgdm
);
List
<
HpgpKsHot
>
listHotDept
(
String
yljgdm
,
int
size
);
}
}
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpHzjlServiceImpl.java
View file @
2c7710f7
...
@@ -8,19 +8,19 @@ import cn.hutool.core.util.StrUtil;
...
@@ -8,19 +8,19 @@ import cn.hutool.core.util.StrUtil;
import
cn.sh.stc.sict.theme.hpgp.dao.HpHzjlMapper
;
import
cn.sh.stc.sict.theme.hpgp.dao.HpHzjlMapper
;
import
cn.sh.stc.sict.theme.hpgp.model.HpHzjl
;
import
cn.sh.stc.sict.theme.hpgp.model.HpHzjl
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpKsHot
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpKsHot
;
import
cn.sh.stc.sict.theme.hpgp.service.HpHzjlService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpHzjlService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpDepartmentRankService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpDepartmentRankService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpKsHotService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpKsHotService
;
import
cn.sh.stc.sict.theme.hphy.model.HpDeptInfo
;
import
cn.sh.stc.sict.theme.hphy.model.HpDocInfo
;
import
cn.sh.stc.sict.theme.hphy.model.HpDocInfo
;
import
cn.sh.stc.sict.theme.hphy.service.HpDeptInfoService
;
import
cn.sh.stc.sict.theme.hphy.service.HpDocInfoService
;
import
cn.sh.stc.sict.theme.hphy.service.HpDocInfoService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -40,6 +40,9 @@ public class HpHzjlServiceImpl extends ServiceImpl<HpHzjlMapper, HpHzjl> impleme
...
@@ -40,6 +40,9 @@ public class HpHzjlServiceImpl extends ServiceImpl<HpHzjlMapper, HpHzjl> impleme
private
final
HpgpBusyIdlePredictionService
hpgpBusyIdlePredictionService
;
private
final
HpgpBusyIdlePredictionService
hpgpBusyIdlePredictionService
;
private
final
HpDocInfoService
hpDocInfoService
;
private
final
HpDocInfoService
hpDocInfoService
;
private
final
HpgpKsHotService
hpgpKsHotService
;
private
final
HpgpKsHotService
hpgpKsHotService
;
private
final
HpDeptInfoService
hpDeptInfoService
;
private
static
final
Integer
MAX_DEPT_SIZE
=
3
;
/**
/**
* 根据身份证号查找最后三次不同科室就诊记录,并计算忙闲
* 根据身份证号查找最后三次不同科室就诊记录,并计算忙闲
...
@@ -53,6 +56,7 @@ public class HpHzjlServiceImpl extends ServiceImpl<HpHzjlMapper, HpHzjl> impleme
...
@@ -53,6 +56,7 @@ public class HpHzjlServiceImpl extends ServiceImpl<HpHzjlMapper, HpHzjl> impleme
public
List
<
HpgpBusyIdlePrediction
>
listByCertIdAndHosCode
(
String
certId
,
public
List
<
HpgpBusyIdlePrediction
>
listByCertIdAndHosCode
(
String
certId
,
String
hospitalCode
)
{
String
hospitalCode
)
{
List
<
HpgpBusyIdlePrediction
>
result
=
new
ArrayList
<>();
List
<
HpgpBusyIdlePrediction
>
result
=
new
ArrayList
<>();
int
resultDeptSize
=
0
;
DateTime
startTime
=
DateUtil
.
tomorrow
();
DateTime
startTime
=
DateUtil
.
tomorrow
();
DateTime
endTime
=
DateUtil
.
offsetDay
(
startTime
,
6
);
DateTime
endTime
=
DateUtil
.
offsetDay
(
startTime
,
6
);
...
@@ -61,33 +65,38 @@ public class HpHzjlServiceImpl extends ServiceImpl<HpHzjlMapper, HpHzjl> impleme
...
@@ -61,33 +65,38 @@ public class HpHzjlServiceImpl extends ServiceImpl<HpHzjlMapper, HpHzjl> impleme
.
eq
(
StrUtil
.
isNotBlank
(
hospitalCode
),
HpHzjl:
:
getYljgdm
,
hospitalCode
)
.
eq
(
StrUtil
.
isNotBlank
(
hospitalCode
),
HpHzjl:
:
getYljgdm
,
hospitalCode
)
.
groupBy
(
HpHzjl:
:
getJzksbm
)
.
groupBy
(
HpHzjl:
:
getJzksbm
)
.
orderByDesc
(
HpHzjl:
:
getJzksrq
)
.
orderByDesc
(
HpHzjl:
:
getJzksrq
)
.
last
(
"limit
10"
);
.
last
(
"limit
"
+
MAX_DEPT_SIZE
);
List
<
HpHzjl
>
recordList
=
this
.
list
(
wrapper
);
List
<
HpHzjl
>
recordList
=
this
.
list
(
wrapper
);
if
(
CollUtil
.
isNotEmpty
(
recordList
))
{
if
(
CollUtil
.
isNotEmpty
(
recordList
))
{
for
(
HpHzjl
record
:
recordList
)
{
for
(
HpHzjl
record
:
recordList
)
{
if
(
result
.
size
()
>=
20
)
{
break
;
}
// 查找科室
// 查找科室
HpgpDepartmentRank
dept
=
hpgpDepartmentRankService
.
getByCode
(
record
.
getYljgdm
(),
null
,
record
.
getJzksbm
());
LambdaQueryWrapper
<
HpDeptInfo
>
deptWrapper
=
Wrappers
.<
HpDeptInfo
>
lambdaQuery
();
if
(
ObjectUtil
.
isEmpty
(
dept
))
{
deptWrapper
.
eq
(
HpDeptInfo:
:
getHosOrgCode
,
record
.
getYljgdm
())
.
eq
(
HpDeptInfo:
:
getDeptCode
,
record
.
getJzksbm
())
.
eq
(
HpDeptInfo:
:
getDeptLevel
,
2
);
HpDeptInfo
dept
=
hpDeptInfoService
.
getOne
(
deptWrapper
);
if
(
ObjectUtil
.
isNull
(
dept
))
{
continue
;
continue
;
}
}
// 忙闲预测
// 忙闲预测
result
.
addAll
(
hpgpBusyIdlePredictionService
.
listByDeptRank
(
dept
,
startTime
,
endTime
));
result
.
addAll
(
hpgpBusyIdlePredictionService
.
listByDept
(
dept
,
startTime
,
endTime
));
resultDeptSize
++;
}
}
}
}
// 历史科室查询结果
为空时,采用热点科室数据
// 历史科室查询结果
少于3个时,采用热点科室数据补充
if
(
CollUtil
.
isEmpty
(
result
)
)
{
if
(
resultDeptSize
<
MAX_DEPT_SIZE
)
{
List
<
HpgpKsHot
>
hotList
=
hpgpKsHotService
.
listHotDept
(
hospitalCode
);
List
<
HpgpKsHot
>
hotList
=
hpgpKsHotService
.
listHotDept
(
hospitalCode
,
MAX_DEPT_SIZE
-
resultDeptSize
);
hotList
.
forEach
(
hot
->
{
hotList
.
forEach
(
hot
->
{
HpgpDepartmentRank
rank
=
new
HpgpDepartmentRank
();
HpDeptInfo
dept
=
new
HpDeptInfo
();
BeanUtils
.
copyProperties
(
hot
,
rank
);
dept
.
setHosOrgCode
(
hot
.
getHospitalCode
());
result
.
addAll
(
hpgpBusyIdlePredictionService
.
listByDeptRank
(
rank
,
startTime
,
endTime
));
dept
.
setHosName
(
hot
.
getHospitalName
());
dept
.
setOneDeptCode
(
hot
.
getOneDeptCode
());
dept
.
setDeptCode
(
hot
.
getDeptCode
());
dept
.
setDeptName
(
hot
.
getDeptName
());
result
.
addAll
(
hpgpBusyIdlePredictionService
.
listByDept
(
dept
,
startTime
,
endTime
));
});
});
}
}
return
result
;
return
result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java
View file @
2c7710f7
...
@@ -15,6 +15,7 @@ import cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction;
...
@@ -15,6 +15,7 @@ import cn.sh.stc.sict.theme.hpgp.model.HpgpBusyIdlePrediction;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService
;
import
cn.sh.stc.sict.theme.hpgp.vo.DeptRankVO
;
import
cn.sh.stc.sict.theme.hpgp.vo.DeptRankVO
;
import
cn.sh.stc.sict.theme.hphy.model.HpDeptInfo
;
import
cn.sh.stc.sict.theme.hphy.model.HpDocInfo
;
import
cn.sh.stc.sict.theme.hphy.model.HpDocInfo
;
import
cn.sh.stc.sict.theme.hphy.service.HpDocInfoService
;
import
cn.sh.stc.sict.theme.hphy.service.HpDocInfoService
;
import
cn.sh.stc.sict.theme.hphy.wd.*
;
import
cn.sh.stc.sict.theme.hphy.wd.*
;
...
@@ -113,19 +114,26 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -113,19 +114,26 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
List
<
HpgpBusyIdlePrediction
>
result
=
new
ArrayList
<>();
List
<
HpgpBusyIdlePrediction
>
result
=
new
ArrayList
<>();
deptList
.
forEach
(
rank
->
{
deptList
.
forEach
(
rank
->
{
HpDeptInfo
dept
=
new
HpDeptInfo
();
dept
.
setHosOrgCode
(
rank
.
getHospitalCode
());
dept
.
setHosName
(
rank
.
getHospitalName
());
dept
.
setOneDeptCode
(
rank
.
getOneDeptCode
());
dept
.
setDeptCode
(
rank
.
getDeptCode
());
dept
.
setDeptName
(
rank
.
getDeptName
());
// 查询医院忙闲
// 查询医院忙闲
result
.
addAll
(
this
.
listByDept
Rank
(
rank
,
startTime
,
endTime
));
result
.
addAll
(
this
.
listByDept
(
dept
,
startTime
,
endTime
));
});
});
return
result
;
return
result
;
}
}
private
HpgpBusyIdlePrediction
getNoneSourcePredictionInfo
(
Hp
gpDepartmentRank
rank
,
Date
i
)
{
private
HpgpBusyIdlePrediction
getNoneSourcePredictionInfo
(
Hp
DeptInfo
dept
,
Date
i
)
{
HpgpBusyIdlePrediction
vo
=
new
HpgpBusyIdlePrediction
();
HpgpBusyIdlePrediction
vo
=
new
HpgpBusyIdlePrediction
();
vo
.
setDeptCode
(
rank
.
getDeptCode
());
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
vo
.
setDeptName
(
rank
.
getDeptName
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setHospitalName
(
rank
.
getHospitalName
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setHospitalCode
(
rank
.
getHospitalCode
());
vo
.
setHospitalName
(
dept
.
getHosName
());
vo
.
setHospitalCode
(
dept
.
getHosOrgCode
());
vo
.
setPredictionDate
(
i
);
vo
.
setPredictionDate
(
i
);
vo
.
setScoreByNum
();
vo
.
setScoreByNum
();
return
vo
;
return
vo
;
...
@@ -133,14 +141,14 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -133,14 +141,14 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
// @Async
// @Async
@Override
@Override
public
void
statisticResourceInfo
(
Hp
gpDepartmentRank
dept
,
Date
startDate
,
Date
endDate
,
Byte
flag
)
{
public
void
statisticResourceInfo
(
Hp
DeptInfo
dept
,
Date
startDate
,
Date
endDate
,
Byte
flag
)
{
try
{
try
{
DeptInfo
deptInfo
=
new
DeptInfo
();
DeptInfo
deptInfo
=
new
DeptInfo
();
deptInfo
.
setHosOrgCode
(
dept
.
getHos
pital
Code
());
deptInfo
.
setHosOrgCode
(
dept
.
getHos
Org
Code
());
deptInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
deptInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
deptInfo
.
setDeptCode
(
dept
.
getDeptCode
());
deptInfo
.
setDeptCode
(
dept
.
getDeptCode
());
List
<
OutPatInfo
>
outList
=
WanDaHttpUtil
.
get
Resource
OutPatInfo
(
deptInfo
);
List
<
OutPatInfo
>
outList
=
WanDaHttpUtil
.
getOutPatInfo
(
deptInfo
);
List
<
DoctInfo
>
docList
=
WanDaHttpUtil
.
get
Resource
DoctInfo
(
deptInfo
);
List
<
DoctInfo
>
docList
=
WanDaHttpUtil
.
getDoctInfo
(
deptInfo
);
List
<
HpDocInfo
>
hpDocList
=
hpDocInfoService
.
listByDeptInfo
(
deptInfo
);
List
<
HpDocInfo
>
hpDocList
=
hpDocInfoService
.
listByDeptInfo
(
deptInfo
);
if
(
CollUtil
.
isEmpty
(
outList
)
&&
CollUtil
.
isEmpty
(
docList
)
&&
CollUtil
.
isEmpty
(
hpDocList
))
{
if
(
CollUtil
.
isEmpty
(
outList
)
&&
CollUtil
.
isEmpty
(
docList
)
&&
CollUtil
.
isEmpty
(
hpDocList
))
{
return
;
return
;
...
@@ -168,13 +176,13 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -168,13 +176,13 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
}
}
@Override
@Override
public
List
<
HpgpBusyIdlePrediction
>
listByDeptRank
(
HpgpDepartmentRank
rank
,
DateTime
startTime
,
DateTime
endTime
)
{
public
List
<
HpgpBusyIdlePrediction
>
listByDept
(
HpDeptInfo
dept
,
DateTime
startTime
,
DateTime
endTime
)
{
List
<
HpgpBusyIdlePrediction
>
result
=
new
ArrayList
<>();
List
<
HpgpBusyIdlePrediction
>
result
=
new
ArrayList
<>();
LambdaQueryWrapper
<
HpgpBusyIdlePrediction
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
HpgpBusyIdlePrediction
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
HpgpBusyIdlePrediction:
:
getHospitalCode
,
rank
.
getHospital
Code
())
wrapper
.
eq
(
HpgpBusyIdlePrediction:
:
getHospitalCode
,
dept
.
getHosOrg
Code
())
.
eq
(
HpgpBusyIdlePrediction:
:
getOneDeptCode
,
rank
.
getOneDeptCode
())
.
eq
(
HpgpBusyIdlePrediction:
:
getOneDeptCode
,
dept
.
getOneDeptCode
())
.
eq
(
HpgpBusyIdlePrediction:
:
getDeptCode
,
rank
.
getDeptCode
())
.
eq
(
HpgpBusyIdlePrediction:
:
getDeptCode
,
dept
.
getDeptCode
())
.
between
(
HpgpBusyIdlePrediction:
:
getPredictionDate
,
DateUtil
.
format
(
startTime
,
DatePattern
.
NORM_DATE_FORMAT
),
DateUtil
.
format
(
endTime
,
DatePattern
.
NORM_DATE_FORMAT
))
.
between
(
HpgpBusyIdlePrediction:
:
getPredictionDate
,
DateUtil
.
format
(
startTime
,
DatePattern
.
NORM_DATE_FORMAT
),
DateUtil
.
format
(
endTime
,
DatePattern
.
NORM_DATE_FORMAT
))
.
orderByAsc
(
HpgpBusyIdlePrediction:
:
getPredictionDate
);
.
orderByAsc
(
HpgpBusyIdlePrediction:
:
getPredictionDate
);
List
<
HpgpBusyIdlePrediction
>
list
=
this
.
list
(
wrapper
);
List
<
HpgpBusyIdlePrediction
>
list
=
this
.
list
(
wrapper
);
...
@@ -184,28 +192,36 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -184,28 +192,36 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
for
(
Date
i
=
startTime
;
DateUtil
.
compare
(
i
,
endTime
)
<
1
;
i
=
DateUtil
.
offsetDay
(
i
,
1
))
{
for
(
Date
i
=
startTime
;
DateUtil
.
compare
(
i
,
endTime
)
<
1
;
i
=
DateUtil
.
offsetDay
(
i
,
1
))
{
Date
key
=
DateUtil
.
beginOfDay
(
i
);
Date
key
=
DateUtil
.
beginOfDay
(
i
);
if
(
dateMap
.
containsKey
(
key
))
{
if
(
dateMap
.
containsKey
(
key
))
{
result
.
add
(
dateMap
.
get
(
key
));
HpgpBusyIdlePrediction
data
=
dateMap
.
get
(
key
);
data
.
setHospitalCode
(
dept
.
getHosOrgCode
());
data
.
setHospitalName
(
dept
.
getHosName
());
data
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
data
.
setDeptCode
(
dept
.
getDeptCode
());
data
.
setDeptName
(
dept
.
getDeptName
());
result
.
add
(
data
);
}
else
{
}
else
{
result
.
add
(
this
.
getNoneSourcePredictionInfo
(
rank
,
i
));
result
.
add
(
this
.
getNoneSourcePredictionInfo
(
dept
,
i
));
}
}
}
}
}
else
{
}
else
{
// 生成无号源信息
// 生成无号源信息
for
(
Date
i
=
startTime
;
DateUtil
.
compare
(
i
,
endTime
)
<
1
;
i
=
DateUtil
.
offsetDay
(
i
,
1
))
{
for
(
Date
i
=
startTime
;
DateUtil
.
compare
(
i
,
endTime
)
<
1
;
i
=
DateUtil
.
offsetDay
(
i
,
1
))
{
result
.
add
(
this
.
getNoneSourcePredictionInfo
(
rank
,
i
));
result
.
add
(
this
.
getNoneSourcePredictionInfo
(
dept
,
i
));
}
}
}
}
return
result
;
return
result
;
}
}
private
void
getDocResourceInfo
(
HpgpDepartmentRank
private
void
getDocResourceInfo
(
HpDeptInfo
dept
,
dept
,
List
<
DoctInfo
>
docList
,
Map
<
String
,
HpgpBusyIdlePrediction
>
dateResultMap
,
Date
startDate
,
Date
List
<
DoctInfo
>
docList
,
endDate
)
{
Map
<
String
,
HpgpBusyIdlePrediction
>
dateResultMap
,
Date
startDate
,
Date
endDate
)
{
if
(
CollUtil
.
isNotEmpty
(
docList
))
{
if
(
CollUtil
.
isNotEmpty
(
docList
))
{
docList
.
forEach
(
doc
->
{
docList
.
forEach
(
doc
->
{
NumSourceInfo
numSourceInfo
=
new
NumSourceInfo
();
NumSourceInfo
numSourceInfo
=
new
NumSourceInfo
();
numSourceInfo
.
setHosOrgCode
(
dept
.
getHos
pital
Code
());
numSourceInfo
.
setHosOrgCode
(
dept
.
getHos
Org
Code
());
numSourceInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
numSourceInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
numSourceInfo
.
setDeptCode
(
dept
.
getDeptCode
());
numSourceInfo
.
setDeptCode
(
dept
.
getDeptCode
());
numSourceInfo
.
setStartTime
(
DateUtil
.
format
(
startDate
,
DatePattern
.
NORM_DATE_FORMAT
));
numSourceInfo
.
setStartTime
(
DateUtil
.
format
(
startDate
,
DatePattern
.
NORM_DATE_FORMAT
));
...
@@ -221,14 +237,24 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -221,14 +237,24 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
HpgpBusyIdlePrediction
vo
=
dateResultMap
.
getOrDefault
(
date
,
new
HpgpBusyIdlePrediction
());
HpgpBusyIdlePrediction
vo
=
dateResultMap
.
getOrDefault
(
date
,
new
HpgpBusyIdlePrediction
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setHospitalName
(
dept
.
getHos
pital
Name
());
vo
.
setHospitalName
(
dept
.
getHosName
());
vo
.
setHospitalCode
(
dept
.
getHos
pital
Code
());
vo
.
setHospitalCode
(
dept
.
getHos
Org
Code
());
vo
.
setPredictionDate
(
DateUtil
.
parseDate
(
date
));
vo
.
setPredictionDate
(
DateUtil
.
parseDate
(
date
));
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
int
reserveOrderNum
=
numList
.
stream
().
mapToInt
(
NumSourceInfo:
:
getReserveOrderNum
).
sum
();
// 计算号源信息
int
reserveOrderNum
=
numList
.
stream
()
// 按最小粒度的预约时段分组,并取出分组后第一条号源信息
.
collect
(
Collectors
.
groupingBy
(
n
->
n
.
getNumSourceId
()
+
n
.
getScheduleId
(),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
value
->
value
.
get
(
0
))))
.
values
().
stream
().
mapToInt
(
NumSourceInfo:
:
getReserveOrderNum
).
sum
();
vo
.
setReserveOrderNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getReserveOrderNum
())
?
reserveOrderNum
:
vo
.
getReserveOrderNum
()
+
reserveOrderNum
);
vo
.
setReserveOrderNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getReserveOrderNum
())
?
reserveOrderNum
:
vo
.
getReserveOrderNum
()
+
reserveOrderNum
);
int
remain
=
numList
.
stream
().
mapToInt
(
NumSourceInfo:
:
getRemainNum
).
sum
();
int
remain
=
numList
.
stream
()
// 按最小粒度的预约时段分组,并取出分组后第一条号源信息
.
collect
(
Collectors
.
groupingBy
(
n
->
n
.
getNumSourceId
()
+
n
.
getScheduleId
(),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
value
->
value
.
get
(
0
))))
.
values
().
stream
().
mapToInt
(
NumSourceInfo:
:
getRemainNum
).
sum
();
vo
.
setRemainNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getRemainNum
())
?
remain
:
vo
.
getRemainNum
()
+
remain
);
vo
.
setRemainNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getRemainNum
())
?
remain
:
vo
.
getRemainNum
()
+
remain
);
vo
.
setScoreByNum
();
vo
.
setScoreByNum
();
dateResultMap
.
put
(
date
,
vo
);
dateResultMap
.
put
(
date
,
vo
);
});
});
...
@@ -239,7 +265,7 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -239,7 +265,7 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
}
}
}
}
private
void
getHpDocResourceInfo
(
Hp
gpDepartmentRank
dept
,
private
void
getHpDocResourceInfo
(
Hp
DeptInfo
dept
,
List
<
HpDocInfo
>
hpDocList
,
List
<
DoctInfo
>
docList
,
List
<
HpDocInfo
>
hpDocList
,
List
<
DoctInfo
>
docList
,
Map
<
String
,
HpgpBusyIdlePrediction
>
dateResultMap
,
Map
<
String
,
HpgpBusyIdlePrediction
>
dateResultMap
,
Date
startDate
,
Date
startDate
,
...
@@ -251,7 +277,7 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -251,7 +277,7 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
return
;
return
;
}
}
NumSourceInfo
numSourceInfo
=
new
NumSourceInfo
();
NumSourceInfo
numSourceInfo
=
new
NumSourceInfo
();
numSourceInfo
.
setHosOrgCode
(
dept
.
getHos
pital
Code
());
numSourceInfo
.
setHosOrgCode
(
dept
.
getHos
Org
Code
());
numSourceInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
numSourceInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
numSourceInfo
.
setDeptCode
(
dept
.
getDeptCode
());
numSourceInfo
.
setDeptCode
(
dept
.
getDeptCode
());
numSourceInfo
.
setStartTime
(
DateUtil
.
format
(
startDate
,
DatePattern
.
NORM_DATE_FORMAT
));
numSourceInfo
.
setStartTime
(
DateUtil
.
format
(
startDate
,
DatePattern
.
NORM_DATE_FORMAT
));
...
@@ -267,14 +293,24 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -267,14 +293,24 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
HpgpBusyIdlePrediction
vo
=
dateResultMap
.
getOrDefault
(
date
,
new
HpgpBusyIdlePrediction
());
HpgpBusyIdlePrediction
vo
=
dateResultMap
.
getOrDefault
(
date
,
new
HpgpBusyIdlePrediction
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setHospitalName
(
dept
.
getHos
pital
Name
());
vo
.
setHospitalName
(
dept
.
getHosName
());
vo
.
setHospitalCode
(
dept
.
getHos
pital
Code
());
vo
.
setHospitalCode
(
dept
.
getHos
Org
Code
());
vo
.
setPredictionDate
(
DateUtil
.
parseDate
(
date
));
vo
.
setPredictionDate
(
DateUtil
.
parseDate
(
date
));
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
int
reserveOrderNum
=
numList
.
stream
().
mapToInt
(
NumSourceInfo:
:
getReserveOrderNum
).
sum
();
// 计算号源信息
int
reserveOrderNum
=
numList
.
stream
()
// 按最小粒度的预约时段分组,并取出分组后第一条号源信息
.
collect
(
Collectors
.
groupingBy
(
n
->
n
.
getNumSourceId
()
+
n
.
getScheduleId
(),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
value
->
value
.
get
(
0
))))
.
values
().
stream
().
mapToInt
(
NumSourceInfo:
:
getReserveOrderNum
).
sum
();
vo
.
setReserveOrderNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getReserveOrderNum
())
?
reserveOrderNum
:
vo
.
getReserveOrderNum
()
+
reserveOrderNum
);
vo
.
setReserveOrderNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getReserveOrderNum
())
?
reserveOrderNum
:
vo
.
getReserveOrderNum
()
+
reserveOrderNum
);
int
remain
=
numList
.
stream
().
mapToInt
(
NumSourceInfo:
:
getRemainNum
).
sum
();
int
remain
=
numList
.
stream
()
// 按最小粒度的预约时段分组,并取出分组后第一条号源信息
.
collect
(
Collectors
.
groupingBy
(
n
->
n
.
getNumSourceId
()
+
n
.
getScheduleId
(),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
value
->
value
.
get
(
0
))))
.
values
().
stream
().
mapToInt
(
NumSourceInfo:
:
getRemainNum
).
sum
();
vo
.
setRemainNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getRemainNum
())
?
remain
:
vo
.
getRemainNum
()
+
remain
);
vo
.
setRemainNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getRemainNum
())
?
remain
:
vo
.
getRemainNum
()
+
remain
);
vo
.
setScoreByNum
();
vo
.
setScoreByNum
();
dateResultMap
.
put
(
date
,
vo
);
dateResultMap
.
put
(
date
,
vo
);
});
});
...
@@ -285,13 +321,13 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -285,13 +321,13 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
}
}
}
}
private
void
getOutResourceInfo
(
Hp
gpDepartmentRank
private
void
getOutResourceInfo
(
Hp
DeptInfo
dept
,
List
<
OutPatInfo
>
outList
,
Map
<
String
,
HpgpBusyIdlePrediction
>
dateResultMap
,
Date
startDate
,
Date
dept
,
List
<
OutPatInfo
>
outList
,
Map
<
String
,
HpgpBusyIdlePrediction
>
dateResultMap
,
Date
startDate
,
Date
endDate
)
{
endDate
)
{
if
(
CollUtil
.
isNotEmpty
(
outList
))
{
if
(
CollUtil
.
isNotEmpty
(
outList
))
{
outList
.
forEach
(
pat
->
{
outList
.
forEach
(
pat
->
{
NumSourceInfo
numSourceInfo
=
new
NumSourceInfo
();
NumSourceInfo
numSourceInfo
=
new
NumSourceInfo
();
numSourceInfo
.
setHosOrgCode
(
dept
.
getHos
pital
Code
());
numSourceInfo
.
setHosOrgCode
(
dept
.
getHos
Org
Code
());
numSourceInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
numSourceInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
numSourceInfo
.
setDeptCode
(
dept
.
getDeptCode
());
numSourceInfo
.
setDeptCode
(
dept
.
getDeptCode
());
numSourceInfo
.
setStartTime
(
DateUtil
.
format
(
startDate
,
DatePattern
.
NORM_DATE_FORMAT
));
numSourceInfo
.
setStartTime
(
DateUtil
.
format
(
startDate
,
DatePattern
.
NORM_DATE_FORMAT
));
...
@@ -306,14 +342,24 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
...
@@ -306,14 +342,24 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl<HpgpBusyIdleP
HpgpBusyIdlePrediction
vo
=
dateResultMap
.
getOrDefault
(
date
,
new
HpgpBusyIdlePrediction
());
HpgpBusyIdlePrediction
vo
=
dateResultMap
.
getOrDefault
(
date
,
new
HpgpBusyIdlePrediction
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setDeptCode
(
dept
.
getDeptCode
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setHospitalName
(
dept
.
getHos
pital
Name
());
vo
.
setHospitalName
(
dept
.
getHosName
());
vo
.
setHospitalCode
(
dept
.
getHos
pital
Code
());
vo
.
setHospitalCode
(
dept
.
getHos
Org
Code
());
vo
.
setPredictionDate
(
DateUtil
.
parseDate
(
date
));
vo
.
setPredictionDate
(
DateUtil
.
parseDate
(
date
));
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
vo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
int
reserveOrderNum
=
numList
.
stream
().
mapToInt
(
NumSourceInfo:
:
getReserveOrderNum
).
sum
();
// 计算号源信息
int
reserveOrderNum
=
numList
.
stream
()
// 按最小粒度的预约时段分组,并取出分组后第一条号源信息
.
collect
(
Collectors
.
groupingBy
(
n
->
n
.
getNumSourceId
()
+
n
.
getScheduleId
(),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
value
->
value
.
get
(
0
))))
.
values
().
stream
().
mapToInt
(
NumSourceInfo:
:
getReserveOrderNum
).
sum
();
vo
.
setReserveOrderNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getReserveOrderNum
())
?
reserveOrderNum
:
vo
.
getReserveOrderNum
()
+
reserveOrderNum
);
vo
.
setReserveOrderNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getReserveOrderNum
())
?
reserveOrderNum
:
vo
.
getReserveOrderNum
()
+
reserveOrderNum
);
int
remain
=
numList
.
stream
().
mapToInt
(
NumSourceInfo:
:
getRemainNum
).
sum
();
int
remain
=
numList
.
stream
()
// 按最小粒度的预约时段分组,并取出分组后第一条号源信息
.
collect
(
Collectors
.
groupingBy
(
n
->
n
.
getNumSourceId
()
+
n
.
getScheduleId
(),
Collectors
.
collectingAndThen
(
Collectors
.
toList
(),
value
->
value
.
get
(
0
))))
.
values
().
stream
().
mapToInt
(
NumSourceInfo:
:
getRemainNum
).
sum
();
vo
.
setRemainNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getRemainNum
())
?
remain
:
vo
.
getRemainNum
()
+
remain
);
vo
.
setRemainNum
(
NumberUtil
.
isNullOrZero
(
vo
.
getRemainNum
())
?
remain
:
vo
.
getRemainNum
()
+
remain
);
vo
.
setScoreByNum
();
vo
.
setScoreByNum
();
dateResultMap
.
put
(
date
,
vo
);
dateResultMap
.
put
(
date
,
vo
);
});
});
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpDepartmentRankServiceImpl.java
View file @
2c7710f7
...
@@ -67,8 +67,8 @@ public class HpgpDepartmentRankServiceImpl extends ServiceImpl<HpgpDepartmentRan
...
@@ -67,8 +67,8 @@ public class HpgpDepartmentRankServiceImpl extends ServiceImpl<HpgpDepartmentRan
deptInfo
.
setHosOrgCode
(
dept
.
getHospitalCode
());
deptInfo
.
setHosOrgCode
(
dept
.
getHospitalCode
());
deptInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
deptInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
deptInfo
.
setDeptCode
(
dept
.
getDeptCode
());
deptInfo
.
setDeptCode
(
dept
.
getDeptCode
());
List
<
OutPatInfo
>
resourceOutPatInfo
=
WanDaHttpUtil
.
get
Resource
OutPatInfo
(
deptInfo
);
List
<
OutPatInfo
>
resourceOutPatInfo
=
WanDaHttpUtil
.
getOutPatInfo
(
deptInfo
);
List
<
DoctInfo
>
resourceDoctInfo
=
WanDaHttpUtil
.
get
Resource
DoctInfo
(
deptInfo
);
List
<
DoctInfo
>
resourceDoctInfo
=
WanDaHttpUtil
.
getDoctInfo
(
deptInfo
);
if
(
CollUtil
.
isEmpty
(
resourceDoctInfo
)
&&
CollUtil
.
isEmpty
(
resourceOutPatInfo
))
{
if
(
CollUtil
.
isEmpty
(
resourceDoctInfo
)
&&
CollUtil
.
isEmpty
(
resourceOutPatInfo
))
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpKsHotServiceImpl.java
View file @
2c7710f7
...
@@ -21,11 +21,11 @@ import java.util.List;
...
@@ -21,11 +21,11 @@ import java.util.List;
public
class
HpgpKsHotServiceImpl
extends
ServiceImpl
<
HpgpKsHotMapper
,
HpgpKsHot
>
implements
HpgpKsHotService
{
public
class
HpgpKsHotServiceImpl
extends
ServiceImpl
<
HpgpKsHotMapper
,
HpgpKsHot
>
implements
HpgpKsHotService
{
@Override
@Override
public
List
<
HpgpKsHot
>
listHotDept
(
String
yljgdm
)
{
public
List
<
HpgpKsHot
>
listHotDept
(
String
yljgdm
,
int
size
)
{
LambdaQueryWrapper
<
HpgpKsHot
>
wrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
HpgpKsHot
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
HpgpKsHot:
:
getGzh
,
StrUtil
.
isBlank
(
yljgdm
)
?
"ALL"
:
yljgdm
)
wrapper
.
eq
(
HpgpKsHot:
:
getGzh
,
StrUtil
.
isBlank
(
yljgdm
)
?
"ALL"
:
yljgdm
)
.
orderByAsc
(
HpgpKsHot:
:
getRankScore
)
.
orderByAsc
(
HpgpKsHot:
:
getRankScore
)
.
last
(
"limit
3"
);
.
last
(
"limit
"
+
size
);
return
this
.
list
(
wrapper
);
return
this
.
list
(
wrapper
);
}
}
}
}
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java
View file @
2c7710f7
...
@@ -77,13 +77,13 @@ public class HpDeptInfoController extends ApiController {
...
@@ -77,13 +77,13 @@ public class HpDeptInfoController extends ApiController {
@RequestParam
(
value
=
"oneDeptCode"
,
required
=
false
)
String
oneDeptCode
,
@RequestParam
(
value
=
"oneDeptCode"
,
required
=
false
)
String
oneDeptCode
,
@RequestParam
(
value
=
"dept"
,
required
=
false
)
String
deptCode
,
@RequestParam
(
value
=
"dept"
,
required
=
false
)
String
deptCode
,
@RequestParam
(
value
=
"flag"
,
required
=
false
,
defaultValue
=
Constant
.
STRING_NO
)
Byte
flag
)
{
@RequestParam
(
value
=
"flag"
,
required
=
false
,
defaultValue
=
Constant
.
STRING_NO
)
Byte
flag
)
{
QueryWrapper
<
HpgpDepartmentRank
>
wrapper
=
Wrappers
.
emptyWrapper
();
LambdaQueryWrapper
<
HpDeptInfo
>
wrapper
=
Wrappers
.<
HpDeptInfo
>
lambdaQuery
();
LambdaQueryWrapper
<
HpgpDepartmentRank
>
queryWrapper
=
wrapper
.
select
(
"DISTINCT standard_dept,hospital_code,hospital_name,one_dept_code,dept_code,dept_name"
).
lambda
();
wrapper
.
eq
(
HpDeptInfo:
:
getDeptLevel
,
2
)
queryWrapper
.
eq
(
StrUtil
.
isNotEmpty
(
hospCode
),
HpgpDepartmentRank:
:
getHospital
Code
,
hospCode
)
.
eq
(
StrUtil
.
isNotEmpty
(
hospCode
),
HpDeptInfo:
:
getHosOrg
Code
,
hospCode
)
.
eq
(
StrUtil
.
isNotEmpty
(
oneDeptCode
),
Hp
gpDepartmentRank
:
:
getOneDeptCode
,
oneDeptCode
)
.
eq
(
StrUtil
.
isNotEmpty
(
oneDeptCode
),
Hp
DeptInfo
:
:
getOneDeptCode
,
oneDeptCode
)
.
eq
(
StrUtil
.
isNotEmpty
(
deptCode
),
Hp
gpDepartmentRank:
:
getDeptCode
,
deptCode
)
;
.
eq
(
StrUtil
.
isNotEmpty
(
deptCode
),
Hp
DeptInfo:
:
getDeptCode
,
deptCode
);
;
List
<
Hp
gpDepartmentRank
>
deptList
=
hpgpDepartmentRankService
.
list
(
queryW
rapper
);
List
<
Hp
DeptInfo
>
deptList
=
hpDeptInfoService
.
list
(
w
rapper
);
log
.
error
(
"医院科室查询结果deptList = {}"
,
deptList
);
log
.
error
(
"医院科室查询结果deptList = {}"
,
deptList
);
deptList
.
forEach
(
dept
->
{
deptList
.
forEach
(
dept
->
{
if
(
StrUtil
.
isEmpty
(
dept
.
getOneDeptCode
())
||
StrUtil
.
isEmpty
(
dept
.
getDeptCode
()))
{
if
(
StrUtil
.
isEmpty
(
dept
.
getOneDeptCode
())
||
StrUtil
.
isEmpty
(
dept
.
getDeptCode
()))
{
...
...
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 @
2c7710f7
...
@@ -6,10 +6,7 @@ import cn.hutool.core.util.StrUtil;
...
@@ -6,10 +6,7 @@ import cn.hutool.core.util.StrUtil;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.constant.enums.LoginTypeEnum
;
import
cn.sh.stc.sict.cloud.common.core.constant.enums.LoginTypeEnum
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserCardInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.*
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.R
;
import
cn.sh.stc.sict.cloud.common.core.util.R
;
import
cn.sh.stc.sict.cloud.common.core.util.SsbUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.SsbUtil
;
...
@@ -143,6 +140,7 @@ public class HphyPatientBaseController {
...
@@ -143,6 +140,7 @@ public class HphyPatientBaseController {
}
}
// 获取患者信息
// 获取患者信息
HphyPatientBase
base
=
hphyPatientBaseService
.
getByOpenId
(
current
.
getOpenId
());
HphyPatientBase
base
=
hphyPatientBaseService
.
getByOpenId
(
current
.
getOpenId
());
log
.
error
(
"获取患者信息 = {}"
,
JSONUtil
.
toJsonStr
(
base
));
// 根据手机号去重
// 根据手机号去重
if
(
ObjectUtil
.
isNull
(
base
)
||
NumberUtil
.
isNullOrZero
(
base
.
getId
()))
{
if
(
ObjectUtil
.
isNull
(
base
)
||
NumberUtil
.
isNullOrZero
(
base
.
getId
()))
{
base
=
hphyPatientBaseService
.
getByPhone
(
current
.
getPhone
(),
true
);
base
=
hphyPatientBaseService
.
getByPhone
(
current
.
getPhone
(),
true
);
...
@@ -172,7 +170,13 @@ public class HphyPatientBaseController {
...
@@ -172,7 +170,13 @@ public class HphyPatientBaseController {
if
(
LoginTypeEnum
.
WOA_ZZ
.
getType
().
equals
(
source
))
{
if
(
LoginTypeEnum
.
WOA_ZZ
.
getType
().
equals
(
source
))
{
WOAZzUserInfo
zzUserInfo
=
WoaUtil
.
getZzUserInfo
(
token
);
WOAZzUserInfo
zzUserInfo
=
WoaUtil
.
getZzUserInfo
(
token
);
log
.
error
(
"zzUser = {}"
,
zzUserInfo
);
log
.
error
(
"zzUser = {}"
,
zzUserInfo
);
base
=
hphyPatientBaseService
.
saveWoaInfo
(
current
,
zzUserInfo
);
base
=
hphyPatientBaseService
.
saveWoaZzInfo
(
current
,
zzUserInfo
);
}
// 万达微信公众后
if
(
LoginTypeEnum
.
WOA_WD
.
getType
().
equals
(
source
))
{
WOAWDUserInfo
wdUserInfo
=
WoaUtil
.
getWoaWDUserInfo
(
token
);
log
.
error
(
"wdUserInfo = {}"
,
wdUserInfo
);
base
=
hphyPatientBaseService
.
saveWoaWdInfo
(
current
,
wdUserInfo
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/WDController.java
View file @
2c7710f7
...
@@ -75,20 +75,23 @@ public class WDController {
...
@@ -75,20 +75,23 @@ public class WDController {
public
R
getOrderNumberInfo
(
NumSourceInfo
numSourceInfo
)
{
public
R
getOrderNumberInfo
(
NumSourceInfo
numSourceInfo
)
{
// 医生查询所有号源能查到,查询指定类型号源差不多,20220715处理:查询所有,过滤
// 医生查询所有号源能查到,查询指定类型号源差不多,20220715处理:查询所有,过滤
String
orderNumType
=
numSourceInfo
.
getOrderNumType
();
// String orderNumType = numSourceInfo.getOrderNumType();
if
(
WanDaConstant
.
ORDER_TYPE_OUTP
.
equals
(
numSourceInfo
.
getOrderType
())){
// if(WanDaConstant.ORDER_TYPE_OUTP.equals(numSourceInfo.getOrderType())){
// numSourceInfo.setOrderNumType(null);
// }
numSourceInfo
.
setOrderNumType
(
null
);
numSourceInfo
.
setOrderNumType
(
null
);
}
List
<
NumSourceInfo
>
list
=
WanDaHttpUtil
.
getOrderNumInfo
(
numSourceInfo
);
List
<
NumSourceInfo
>
list
=
WanDaHttpUtil
.
getOrderNumInfo
(
numSourceInfo
);
if
(
CollUtil
.
isEmpty
(
list
)){
if
(
CollUtil
.
isEmpty
(
list
)){
return
new
R
();
return
new
R
();
}
}
if
(
WanDaConstant
.
ORDER_TYPE_OUTP
.
equals
(
numSourceInfo
.
getOrderType
())){
List
<
NumSourceInfo
>
result
=
list
.
stream
().
filter
(
i
->
orderNumType
.
equals
(
i
.
getOrderNumType
())).
collect
(
Collectors
.
toList
());
return
new
R
(
result
);
}
else
{
return
new
R
(
list
);
return
new
R
(
list
);
}
// if(WanDaConstant.ORDER_TYPE_OUTP.equals(numSourceInfo.getOrderType())){
// List<NumSourceInfo> result = list.stream().filter(i -> orderNumType.equals(i.getOrderNumType())).collect(Collectors.toList());
// return new R(result);
// }else{
// return new R(list);
// }
// if (CollUtil.isNotEmpty(list)) {
// if (CollUtil.isNotEmpty(list)) {
// return R.builder().code(Constant.BYTE_YES).data(list).bizCode(Constant.INT_NO).build();
// return R.builder().code(Constant.BYTE_YES).data(list).bizCode(Constant.INT_NO).build();
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/schedule/RefreshJob.java
View file @
2c7710f7
...
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollectionUtil;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.theme.hpgp.model.HpgpDepartmentRank
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpBusyIdlePredictionService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpDepartmentRankService
;
import
cn.sh.stc.sict.theme.hpgp.service.HpgpDepartmentRankService
;
import
cn.sh.stc.sict.theme.hphy.constant.DataConstant
;
import
cn.sh.stc.sict.theme.hphy.constant.DataConstant
;
...
@@ -19,7 +18,6 @@ import cn.sh.stc.sict.theme.hphy.wd.DoctInfo;
...
@@ -19,7 +18,6 @@ import cn.sh.stc.sict.theme.hphy.wd.DoctInfo;
import
cn.sh.stc.sict.theme.hphy.wd.HosInfo
;
import
cn.sh.stc.sict.theme.hphy.wd.HosInfo
;
import
cn.sh.stc.sict.theme.hphy.wd.WanDaHttpUtil
;
import
cn.sh.stc.sict.theme.hphy.wd.WanDaHttpUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -92,7 +90,7 @@ public class RefreshJob {
...
@@ -92,7 +90,7 @@ public class RefreshJob {
/**
/**
* 每周一 2点 更新医生信息
* 每周一 2点 更新医生信息
*
*
<p>
* 1、调用接口获取医生列表
* 1、调用接口获取医生列表
* 2、删除现有医生信息
* 2、删除现有医生信息
* 3、插入新的医生信息
* 3、插入新的医生信息
...
@@ -115,11 +113,11 @@ public class RefreshJob {
...
@@ -115,11 +113,11 @@ public class RefreshJob {
* 每天中午12点,晚上12点,统计号源信息
* 每天中午12点,晚上12点,统计号源信息
*/
*/
// @Scheduled(cron = "0 50 12 * * ? ")
// @Scheduled(cron = "0 50 12 * * ? ")
@Scheduled
(
cron
=
"0 0
0,12
* * ? "
)
@Scheduled
(
cron
=
"0 0
12,0
* * ? "
)
public
void
statisticRankDeptResourceInfo
()
{
public
void
statisticRankDeptResourceInfo
()
{
QueryWrapper
<
HpgpDepartmentRank
>
wrapper
=
Wrappers
.
emptyWrapper
();
LambdaQueryWrapper
<
HpDeptInfo
>
wrapper
=
Wrappers
.<
HpDeptInfo
>
lambdaQuery
();
LambdaQueryWrapper
<
HpgpDepartmentRank
>
lambda
=
wrapper
.
select
(
"DISTINCT standard_dept,hospital_code,hospital_name,one_dept_code,dept_code,dept_name"
).
lambda
(
);
wrapper
.
eq
(
HpDeptInfo:
:
getDeptLevel
,
2
);
List
<
Hp
gpDepartmentRank
>
deptList
=
hpgpDepartmentRankService
.
list
(
lambda
);
List
<
Hp
DeptInfo
>
deptList
=
deptInfoService
.
list
(
wrapper
);
deptList
.
forEach
(
dept
->
{
deptList
.
forEach
(
dept
->
{
if
(
StrUtil
.
isEmpty
(
dept
.
getOneDeptCode
())
||
StrUtil
.
isEmpty
(
dept
.
getDeptCode
()))
{
if
(
StrUtil
.
isEmpty
(
dept
.
getOneDeptCode
())
||
StrUtil
.
isEmpty
(
dept
.
getDeptCode
()))
{
return
;
return
;
...
@@ -141,7 +139,7 @@ public class RefreshJob {
...
@@ -141,7 +139,7 @@ public class RefreshJob {
List
<
HpDocInfo
>
docInfos
=
factory
.
getMapperFacade
().
mapAsList
(
doctInfos
,
HpDocInfo
.
class
);
List
<
HpDocInfo
>
docInfos
=
factory
.
getMapperFacade
().
mapAsList
(
doctInfos
,
HpDocInfo
.
class
);
try
{
try
{
docInfoService
.
saveDoctor
(
docInfos
,
hosOrgCode
);
docInfoService
.
saveDoctor
(
docInfos
,
hosOrgCode
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"医院 {} 医生信息保存出错"
,
hosOrgCode
);
log
.
error
(
"医院 {} 医生信息保存出错"
,
hosOrgCode
);
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HpDeptInfoService.java
View file @
2c7710f7
...
@@ -21,4 +21,6 @@ public interface HpDeptInfoService extends IService<HpDeptInfo> {
...
@@ -21,4 +21,6 @@ public interface HpDeptInfoService extends IService<HpDeptInfo> {
DeptDoctorsVO
getDeptDoctors
(
String
hospitalCode
,
String
deptCode
);
DeptDoctorsVO
getDeptDoctors
(
String
hospitalCode
,
String
deptCode
);
void
asyncUpdate
(
HpDeptInfo
dept
);
void
asyncUpdate
(
HpDeptInfo
dept
);
}
}
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/HphyPatientBaseService.java
View file @
2c7710f7
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
service
;
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
service
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserCardInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.*
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
cn.sh.stc.sict.cloud.upms.dto.CurrentUser
;
import
cn.sh.stc.sict.cloud.upms.dto.CurrentUser
;
import
cn.sh.stc.sict.theme.hphy.model.HphyPatientBase
;
import
cn.sh.stc.sict.theme.hphy.model.HphyPatientBase
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
...
@@ -39,7 +36,16 @@ public interface HphyPatientBaseService extends IService<HphyPatientBase> {
...
@@ -39,7 +36,16 @@ public interface HphyPatientBaseService extends IService<HphyPatientBase> {
* @param userInfo 公众号用户详情
* @param userInfo 公众号用户详情
* @return XSZYUserInfo {@link WOAZzUserInfo}
* @return XSZYUserInfo {@link WOAZzUserInfo}
*/
*/
HphyPatientBase
saveWoaInfo
(
CurrentUser
current
,
WOAZzUserInfo
userInfo
);
HphyPatientBase
saveWoaZzInfo
(
CurrentUser
current
,
WOAZzUserInfo
userInfo
);
/**
* 保存万达公众号用户信息
*
* @param current 当前用户
* @param userInfo 公众号用户详情
* @return XSZYUserInfo {@link WOAWDUserInfo}
*/
HphyPatientBase
saveWoaWdInfo
(
CurrentUser
current
,
WOAWDUserInfo
userInfo
);
void
savePatient
(
HphyPatientBase
patient
);
void
savePatient
(
HphyPatientBase
patient
);
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java
View file @
2c7710f7
...
@@ -77,8 +77,8 @@ public class HpDeptInfoServiceImpl extends ServiceImpl<HpDeptInfoMapper, HpDeptI
...
@@ -77,8 +77,8 @@ public class HpDeptInfoServiceImpl extends ServiceImpl<HpDeptInfoMapper, HpDeptI
info
.
setHosOrgCode
(
deptInfo
.
getHosOrgCode
());
info
.
setHosOrgCode
(
deptInfo
.
getHosOrgCode
());
info
.
setOneDeptCode
(
deptInfo
.
getOneDeptCode
());
info
.
setOneDeptCode
(
deptInfo
.
getOneDeptCode
());
info
.
setDeptCode
(
deptInfo
.
getDeptCode
());
info
.
setDeptCode
(
deptInfo
.
getDeptCode
());
List
<
OutPatInfo
>
resourceOutPatInfo
=
WanDaHttpUtil
.
get
Resource
OutPatInfo
(
info
);
List
<
OutPatInfo
>
resourceOutPatInfo
=
WanDaHttpUtil
.
getOutPatInfo
(
info
);
List
<
DoctInfo
>
resourceDoctInfo
=
WanDaHttpUtil
.
get
Resource
DoctInfo
(
info
);
List
<
DoctInfo
>
resourceDoctInfo
=
WanDaHttpUtil
.
getDoctInfo
(
info
);
List
<
HpDocInfo
>
remainDoctors
=
this
.
getRemainDoctList
(
doctors
,
resourceDoctInfo
);
List
<
HpDocInfo
>
remainDoctors
=
this
.
getRemainDoctList
(
doctors
,
resourceDoctInfo
);
return
new
DeptDoctorsVO
(
hosInfo
,
deptInfo
,
resourceOutPatInfo
,
remainDoctors
);
return
new
DeptDoctorsVO
(
hosInfo
,
deptInfo
,
resourceOutPatInfo
,
remainDoctors
);
...
@@ -91,8 +91,8 @@ public class HpDeptInfoServiceImpl extends ServiceImpl<HpDeptInfoMapper, HpDeptI
...
@@ -91,8 +91,8 @@ public class HpDeptInfoServiceImpl extends ServiceImpl<HpDeptInfoMapper, HpDeptI
deptInfo
.
setHosOrgCode
(
dept
.
getHosOrgCode
());
deptInfo
.
setHosOrgCode
(
dept
.
getHosOrgCode
());
deptInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
deptInfo
.
setOneDeptCode
(
dept
.
getOneDeptCode
());
deptInfo
.
setDeptCode
(
dept
.
getDeptCode
());
deptInfo
.
setDeptCode
(
dept
.
getDeptCode
());
List
<
OutPatInfo
>
resourceOutPatInfo
=
WanDaHttpUtil
.
get
Resource
OutPatInfo
(
deptInfo
);
List
<
OutPatInfo
>
resourceOutPatInfo
=
WanDaHttpUtil
.
getOutPatInfo
(
deptInfo
);
List
<
DoctInfo
>
resourceDoctInfo
=
WanDaHttpUtil
.
get
Resource
DoctInfo
(
deptInfo
);
List
<
DoctInfo
>
resourceDoctInfo
=
WanDaHttpUtil
.
getDoctInfo
(
deptInfo
);
if
(
CollUtil
.
isEmpty
(
resourceDoctInfo
)
&&
CollUtil
.
isEmpty
(
resourceOutPatInfo
))
{
if
(
CollUtil
.
isEmpty
(
resourceDoctInfo
)
&&
CollUtil
.
isEmpty
(
resourceOutPatInfo
))
{
return
;
return
;
}
}
...
...
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 @
2c7710f7
...
@@ -4,10 +4,7 @@ import cn.hutool.core.collection.CollUtil;
...
@@ -4,10 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserCardInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.*
;
import
cn.sh.stc.sict.cloud.common.core.dto.WDUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.WOAZzUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.dto.XSZYUserInfo
;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
import
cn.sh.stc.sict.cloud.common.core.util.NumberUtil
;
import
cn.sh.stc.sict.cloud.common.security.util.SecurityUtils
;
import
cn.sh.stc.sict.cloud.common.security.util.SecurityUtils
;
import
cn.sh.stc.sict.cloud.upms.dto.CurrentUser
;
import
cn.sh.stc.sict.cloud.upms.dto.CurrentUser
;
...
@@ -112,7 +109,37 @@ public class HphyPatientBaseServiceImpl extends ServiceImpl<HphyPatientBaseMappe
...
@@ -112,7 +109,37 @@ public class HphyPatientBaseServiceImpl extends ServiceImpl<HphyPatientBaseMappe
* @return XSZYUserInfo {@link WOAZzUserInfo}
* @return XSZYUserInfo {@link WOAZzUserInfo}
*/
*/
@Override
@Override
public
HphyPatientBase
saveWoaInfo
(
CurrentUser
current
,
WOAZzUserInfo
userInfo
)
{
public
HphyPatientBase
saveWoaZzInfo
(
CurrentUser
current
,
WOAZzUserInfo
userInfo
)
{
if
(
ObjectUtil
.
isNotNull
(
userInfo
))
{
HphyPatientBase
base
=
new
HphyPatientBase
();
base
.
setUserId
(
current
.
getId
());
base
.
setOpenId
(
current
.
getOpenId
());
base
.
setPhone
(
userInfo
.
getMobile
());
base
.
setName
(
userInfo
.
getUsername
());
base
.
setCertId
(
userInfo
.
getPersoncard
());
base
.
setGender
(
Constant
.
BYTE_YES
.
equals
(
userInfo
.
getGender
())
?
"男"
:
"女"
);
base
.
setVerifyStatus
(
Constant
.
STRING_NO
);
// 身份证号合法,设置年龄、性别、实名认证标志
if
(
IdcardUtil
.
isValidCard
(
base
.
getCertId
()))
{
String
certId
=
base
.
getCertId
();
base
.
setAge
(
String
.
valueOf
(
IdcardUtil
.
getAgeByIdCard
(
certId
)));
base
.
setVerifyStatus
(
Constant
.
STRING_YES
);
}
this
.
save
(
base
);
return
base
;
}
return
null
;
}
/**
* 保存万达公众号用户信息
*
* @param current 当前用户
* @param userInfo 公众号用户详情
* @return XSZYUserInfo {@link WOAWDUserInfo}
*/
@Override
public
HphyPatientBase
saveWoaWdInfo
(
CurrentUser
current
,
WOAWDUserInfo
userInfo
)
{
if
(
ObjectUtil
.
isNotNull
(
userInfo
))
{
if
(
ObjectUtil
.
isNotNull
(
userInfo
))
{
HphyPatientBase
base
=
new
HphyPatientBase
();
HphyPatientBase
base
=
new
HphyPatientBase
();
base
.
setUserId
(
current
.
getId
());
base
.
setUserId
(
current
.
getId
());
...
...
This diff is collapsed.
Click to expand it.
smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/wd/WanDaHttpUtil.java
View file @
2c7710f7
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
wd
;
package
cn
.
sh
.
stc
.
sict
.
theme
.
hphy
.
wd
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.XmlUtil
;
import
cn.hutool.core.util.XmlUtil
;
import
cn.hutool.http.HttpRequest
;
import
cn.hutool.http.HttpRequest
;
...
@@ -8,15 +9,16 @@ import cn.hutool.json.JSONArray;
...
@@ -8,15 +9,16 @@ import cn.hutool.json.JSONArray;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
cn.sh.stc.sict.cloud.common.core.constant.Constant
;
import
com.baomidou.mybatisplus.core.toolkit.StringPool
;
import
lombok.experimental.UtilityClass
;
import
lombok.experimental.UtilityClass
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.NodeList
;
import
org.w3c.dom.NodeList
;
import
javax.print.DocFlavor
;
import
javax.xml.xpath.XPathConstants
;
import
javax.xml.xpath.XPathConstants
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
@Slf4j
@UtilityClass
@UtilityClass
...
@@ -30,7 +32,7 @@ public class WanDaHttpUtil {
...
@@ -30,7 +32,7 @@ public class WanDaHttpUtil {
/**
/**
* 获取家庭医生签约信息
* 获取家庭医生签约信息
*/
*/
public
static
String
getContractInfo
(
String
idNo
){
public
static
String
getContractInfo
(
String
idNo
)
{
ContractParam
param
=
new
ContractParam
(
idNo
);
ContractParam
param
=
new
ContractParam
(
idNo
);
String
body
=
HttpRequest
.
post
(
CONTRACT_INFO_URL
)
String
body
=
HttpRequest
.
post
(
CONTRACT_INFO_URL
)
.
body
(
JSONUtil
.
toJsonStr
(
param
))
.
body
(
JSONUtil
.
toJsonStr
(
param
))
...
@@ -39,7 +41,7 @@ public class WanDaHttpUtil {
...
@@ -39,7 +41,7 @@ public class WanDaHttpUtil {
System
.
out
.
println
(
body
);
System
.
out
.
println
(
body
);
JSON
parse
=
JSONUtil
.
parse
(
body
);
JSON
parse
=
JSONUtil
.
parse
(
body
);
Object
obj
=
parse
.
getByPath
(
"data.pageInfo.totals"
);
Object
obj
=
parse
.
getByPath
(
"data.pageInfo.totals"
);
if
(
null
!=
obj
&&
Integer
.
valueOf
(
obj
.
toString
())>
0
)
{
if
(
null
!=
obj
&&
Integer
.
valueOf
(
obj
.
toString
())
>
0
)
{
JSONArray
arr
=
parse
.
getByPath
(
"data.data"
,
JSONArray
.
class
);
JSONArray
arr
=
parse
.
getByPath
(
"data.data"
,
JSONArray
.
class
);
return
((
JSONObject
)
arr
.
get
(
0
)).
get
(
"SQJGMC"
).
toString
();
return
((
JSONObject
)
arr
.
get
(
0
)).
get
(
"SQJGMC"
).
toString
();
}
}
...
@@ -48,6 +50,7 @@ public class WanDaHttpUtil {
...
@@ -48,6 +50,7 @@ public class WanDaHttpUtil {
/**
/**
* 发送短信
* 发送短信
*
* @param phone
* @param phone
* @param msg
* @param msg
* @param appName
* @param appName
...
@@ -197,6 +200,7 @@ public class WanDaHttpUtil {
...
@@ -197,6 +200,7 @@ public class WanDaHttpUtil {
*/
*/
public
List
<
NumSourceInfo
>
getOrderNumInfo
(
NumSourceInfo
numSourceInfo
)
{
public
List
<
NumSourceInfo
>
getOrderNumInfo
(
NumSourceInfo
numSourceInfo
)
{
String
xml
=
WanDaUtil
.
GetOrderNumInfoServiceXML
(
numSourceInfo
);
String
xml
=
WanDaUtil
.
GetOrderNumInfoServiceXML
(
numSourceInfo
);
log
.
error
(
"号源查询:xml = {}"
,
xml
);
String
body
=
""
;
String
body
=
""
;
try
{
try
{
body
=
HttpRequest
.
post
(
URL
)
body
=
HttpRequest
.
post
(
URL
)
...
@@ -215,14 +219,22 @@ public class WanDaHttpUtil {
...
@@ -215,14 +219,22 @@ public class WanDaHttpUtil {
List
<
NumSourceInfo
>
list
=
new
ArrayList
<>();
List
<
NumSourceInfo
>
list
=
new
ArrayList
<>();
if
(
null
!=
nodeList
&&
nodeList
.
getLength
()
>
0
)
{
if
(
null
!=
nodeList
&&
nodeList
.
getLength
()
>
0
)
{
for
(
int
i
=
0
;
i
<
nodeList
.
getLength
();
i
++)
{
for
(
int
i
=
0
;
i
<
nodeList
.
getLength
();
i
++)
{
try
{
// 外层异常只处理查询号源、解析xml的问题
// 号源数据出现异常,不再处理(大概率是医院数据质量低,造成号源数字解析问题)
list
.
add
(
XmlUtil
.
xmlToBean
(
nodeList
.
item
(
i
),
NumSourceInfo
.
class
));
list
.
add
(
XmlUtil
.
xmlToBean
(
nodeList
.
item
(
i
),
NumSourceInfo
.
class
));
}
catch
(
Exception
e
)
{
// ignore exception
}
}
}
}
}
return
list
;
return
list
;
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"号源查询失败,num = {}"
,
JSONUtil
.
toJsonStr
(
numSourceInfo
));
log
.
error
(
"号源查询失败,num = {}"
,
JSONUtil
.
toJsonStr
(
numSourceInfo
));
log
.
error
(
"号源查询失败,body = {}"
,
body
);
log
.
error
(
"号源查询失败,body = {}"
,
body
);
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
@@ -423,7 +435,7 @@ public class WanDaHttpUtil {
...
@@ -423,7 +435,7 @@ public class WanDaHttpUtil {
*/
*/
public
List
<
DoctInfo
>
getResourceDoctInfo
(
DeptInfo
deptInfo
)
{
public
List
<
DoctInfo
>
getResourceDoctInfo
(
DeptInfo
deptInfo
)
{
String
xml
=
WanDaUtil
.
GetResourceDoctInfoServiceXML
(
deptInfo
);
String
xml
=
WanDaUtil
.
GetResourceDoctInfoServiceXML
(
deptInfo
);
//
log.error("获取可预约医生信息 xml = {}", xml);
log
.
error
(
"获取可预约医生信息 xml = {}"
,
xml
);
String
body
=
HttpRequest
.
post
(
URL
)
String
body
=
HttpRequest
.
post
(
URL
)
.
body
(
xml
)
.
body
(
xml
)
.
execute
()
.
execute
()
...
@@ -433,7 +445,7 @@ public class WanDaHttpUtil {
...
@@ -433,7 +445,7 @@ public class WanDaHttpUtil {
log
.
error
(
"获取可预约医生信息 失败"
);
log
.
error
(
"获取可预约医生信息 失败"
);
return
null
;
return
null
;
}
}
//log.info
("获取可预约医生信息:body = {}", body);
log
.
error
(
"获取可预约医生信息:body = {}"
,
body
);
String
returnXml
=
getReturn
(
body
,
"GetResourceDoctInfoService"
);
String
returnXml
=
getReturn
(
body
,
"GetResourceDoctInfoService"
);
return
serialDoctInfo
(
returnXml
);
return
serialDoctInfo
(
returnXml
);
}
}
...
@@ -446,7 +458,7 @@ public class WanDaHttpUtil {
...
@@ -446,7 +458,7 @@ public class WanDaHttpUtil {
*/
*/
public
List
<
OutPatInfo
>
getResourceOutPatInfo
(
DeptInfo
deptInfo
)
{
public
List
<
OutPatInfo
>
getResourceOutPatInfo
(
DeptInfo
deptInfo
)
{
String
xml
=
WanDaUtil
.
GetResourceOutPatInfoServiceXML
(
deptInfo
);
String
xml
=
WanDaUtil
.
GetResourceOutPatInfoServiceXML
(
deptInfo
);
//
log.error("获取可预约门诊信息 xml = {}", xml);
log
.
error
(
"获取可预约门诊信息 xml = {}"
,
xml
);
String
body
=
HttpRequest
.
post
(
URL
)
String
body
=
HttpRequest
.
post
(
URL
)
.
body
(
xml
)
.
body
(
xml
)
.
execute
()
.
execute
()
...
@@ -456,7 +468,7 @@ public class WanDaHttpUtil {
...
@@ -456,7 +468,7 @@ public class WanDaHttpUtil {
log
.
error
(
"查询门诊信息失败"
);
log
.
error
(
"查询门诊信息失败"
);
return
null
;
return
null
;
}
}
//log.info
("查询门诊信息:body = {}", body);
log
.
error
(
"查询门诊信息:body = {}"
,
body
);
String
returnXml
=
getReturn
(
body
,
"GetResourceOutPatInfoService"
);
String
returnXml
=
getReturn
(
body
,
"GetResourceOutPatInfoService"
);
return
serialOutPatInfo
(
returnXml
);
return
serialOutPatInfo
(
returnXml
);
}
}
...
@@ -487,7 +499,11 @@ public class WanDaHttpUtil {
...
@@ -487,7 +499,11 @@ public class WanDaHttpUtil {
List
<
DoctInfo
>
list
=
new
ArrayList
<>();
List
<
DoctInfo
>
list
=
new
ArrayList
<>();
if
(
null
!=
nodeList
&&
nodeList
.
getLength
()
>
0
)
{
if
(
null
!=
nodeList
&&
nodeList
.
getLength
()
>
0
)
{
for
(
int
i
=
0
;
i
<
nodeList
.
getLength
();
i
++)
{
for
(
int
i
=
0
;
i
<
nodeList
.
getLength
();
i
++)
{
try
{
list
.
add
(
XmlUtil
.
xmlToBean
(
nodeList
.
item
(
i
),
DoctInfo
.
class
));
list
.
add
(
XmlUtil
.
xmlToBean
(
nodeList
.
item
(
i
),
DoctInfo
.
class
));
}
catch
(
Exception
e
){
// ignore exception
}
}
}
}
}
return
list
;
return
list
;
...
@@ -505,7 +521,11 @@ public class WanDaHttpUtil {
...
@@ -505,7 +521,11 @@ public class WanDaHttpUtil {
List
<
OutPatInfo
>
list
=
new
ArrayList
<>();
List
<
OutPatInfo
>
list
=
new
ArrayList
<>();
if
(
null
!=
nodeList
&&
nodeList
.
getLength
()
>
0
)
{
if
(
null
!=
nodeList
&&
nodeList
.
getLength
()
>
0
)
{
for
(
int
i
=
0
;
i
<
nodeList
.
getLength
();
i
++)
{
for
(
int
i
=
0
;
i
<
nodeList
.
getLength
();
i
++)
{
try
{
list
.
add
(
XmlUtil
.
xmlToBean
(
nodeList
.
item
(
i
),
OutPatInfo
.
class
));
list
.
add
(
XmlUtil
.
xmlToBean
(
nodeList
.
item
(
i
),
OutPatInfo
.
class
));
}
catch
(
Exception
e
){
// ignore exception
}
}
}
}
}
return
list
;
return
list
;
...
...
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