Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
B
byh-family-doctor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
包
包
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
杨凯
byh-family-doctor
Commits
4d67f70e
提交
4d67f70e
authored
4月 10, 2024
作者:
杨凯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:家庭医生初始化
上级
32be867f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
189 行增加
和
104 行删除
+189
-104
pom.xml
family-doctor-server/pom.xml
+1
-1
ImChatTemplateImpl.java
...family/doctor/server/service/impl/ImChatTemplateImpl.java
+188
-103
没有找到文件。
family-doctor-server/pom.xml
浏览文件 @
4d67f70e
...
...
@@ -214,7 +214,7 @@
<dependency>
<groupId>
com.ihospital
</groupId>
<artifactId>
doctor-basedata-api
</artifactId>
<version>
2.0.0
</version>
<version>
${doctoruser-api.version}
</version>
</dependency>
<dependency>
...
...
family-doctor-server/src/main/java/com/ebaiyihui/family/doctor/server/service/impl/ImChatTemplateImpl.java
浏览文件 @
4d67f70e
...
...
@@ -154,88 +154,188 @@ public class ImChatTemplateImpl implements ImChatTemplate {
if
(!
componentsList
.
isEmpty
())
{
log
.
info
(
"componentsList={}"
,
componentsList
);
String
reportResult
=
""
;
PatientSignInfo
patientSignInfo
=
getPatientSignInfo
(
sendImMsgDTO
.
getAdmId
());
// 报告推送
if
(
MsgTempTypeEnum
.
REP_INTER
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
ReportDetailDTO
reportDetailDTO
=
new
ReportDetailDTO
();
reportDetailDTO
.
setThirdId
(
sendImMsgDTO
.
getThirdId
());
reportResult
=
thirdOrderPushUtil
.
getReportDetail
(
reportDetailDTO
);
// reportResult = "{\"code\":\"200\",\"message\":\"success\",\"data\":{\"reportType\":1,\"institution\":\"瑞金医院\",\"reportFileList\":[{\"fileUrl\":\"https://pension.home.komect.com/ac-health-oss/health-container/K4aW5uWQToWj0Ty7rCUlqw?AWSAccessKeyId=82A0955SWSXVITYRB1Z4&Expires=4070880000&Signature=Efrj6X4BI%2BtYlcdjoGboaJhedE0%3D\",\"fileType\":1}],\"reportName\":\"验血报告\",\"createTime\":\"2024-03-26 19:29:28\",\"examinationTime\":\"2024-03-26\"},\"time\":1711530711174}";
}
for
(
int
i
=
0
;
i
<
componentsList
.
size
();
i
++)
{
String
content
=
componentsList
.
get
(
i
).
getContent
();
String
msgType
=
null
;
List
<
MessageInfo
>
messageInfos
=
new
ArrayList
<>();
PatientSignInfo
patientSignInfo
=
getPatientSignInfo
(
sendImMsgDTO
.
getAdmId
());
MessageInfo
messageInfo
=
new
MessageInfo
();
// 报告解读
String
msgType
=
null
;
if
(
MsgTempTypeEnum
.
REP_INTER
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
for
(
int
i
=
0
;
i
<
componentsList
.
size
();
i
++)
{
List
<
String
>
contentStr
=
new
ArrayList
<>();
String
content
=
componentsList
.
get
(
i
).
getContent
();
ReportDetailDTO
reportDetailDTO
=
new
ReportDetailDTO
();
reportDetailDTO
.
setThirdId
(
sendImMsgDTO
.
getThirdId
());
reportResult
=
thirdOrderPushUtil
.
getReportDetail
(
reportDetailDTO
);
reportResult
=
"{\"code\":\"200\",\"message\":\"success\",\"data\":{\"reportType\":1,\"institution\":\"瑞金医院\",\"reportFileList\":[{\"fileUrl\":\"https://pension.home.komect.com/ac-health-oss/health-container/K4aW5uWQToWj0Ty7rCUlqw?AWSAccessKeyId=82A0955SWSXVITYRB1Z4&Expires=4070880000&Signature=Efrj6X4BI%2BtYlcdjoGboaJhedE0%3D\",\"fileType\":1},{\"fileUrl\":\"https://pension.home.komect.com/ac-health-oss/health-container/K4aW5uWQToWj0Ty7rCUlqw?AWSAccessKeyId=82A0955SWSXVITYRB1Z4&Expires=4070880000&Signature=Efrj6X4BI%2BtYlcdjoGboaJhedE0%3D\",\"fileType\":1},{\"fileUrl\":\"https://pension.home.komect.com/ac-health-oss/health-container/K4aW5uWQToWj0Ty7rCUlqw?AWSAccessKeyId=82A0955SWSXVITYRB1Z4&Expires=4070880000&Signature=Efrj6X4BI%2BtYlcdjoGboaJhedE0%3D\",\"fileType\":1}],\"reportName\":\"验血报告\",\"createTime\":\"2024-03-26 19:29:28\",\"examinationTime\":\"2024-03-26\"},\"time\":1711530711174}"
;
if
(!
StringUtils
.
isEmpty
(
reportResult
))
{
Result
rrResult
=
JSON
.
parseObject
(
reportResult
,
Result
.
class
);
if
(
rrResult
.
isSuccess
())
{
ReportDetailVo
reportDetailVo
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
rrResult
.
getData
()),
ReportDetailVo
.
class
);
List
<
ReportDetailItemVo
>
reportDetailItemVos
=
reportDetailVo
.
getReportFileList
();
if
(
i
==
0
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
)
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
)
)
{
if
(
i
==
0
)
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
()));
}
}
else
if
(
i
==
1
)
{
Map
<
String
,
Object
>
imageMap
=
new
HashMap
<>();
// if (reportDetailVo.getReportType().equals(1)) {
imageMap
.
put
(
"UserAction"
,
CommonConstants
.
USER_ACTION
);
imageMap
.
put
(
"applicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"appointmentId"
,
sendImMsgDTO
.
getAdmId
());
imageMap
.
put
(
"attacheUrl"
,
reportDetailItemVos
.
get
(
0
).
getFileUrl
());
imageMap
.
put
(
"businessCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"doctorHeadUrl"
,
patientSignInfo
.
getDoctorHeadPortrait
());
imageMap
.
put
(
"doctorName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"msgId"
,
UUIDUtil
.
getUUID
());
imageMap
.
put
(
"msgType"
,
CommonConstants
.
MSG_TYPE
);
imageMap
.
put
(
"senderName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"senderProfessional"
,
patientSignInfo
.
getDoctorProfessional
());
imageMap
.
put
(
"team"
,
false
);
imageMap
.
put
(
"teamFlag"
,
0
);
imageMap
.
put
(
"toApplicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
}
else
if
(
i
==
1
)
{
Map
<
String
,
Object
>
imageMap
=
new
HashMap
<>();
for
(
ReportDetailItemVo
reportDetailItemVo
:
reportDetailItemVos
)
{
imageMap
.
put
(
"UserAction"
,
CommonConstants
.
USER_ACTION
);
imageMap
.
put
(
"applicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"appointmentId"
,
sendImMsgDTO
.
getAdmId
());
imageMap
.
put
(
"attacheUrl"
,
reportDetailItemVo
.
getFileUrl
());
imageMap
.
put
(
"businessCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"doctorHeadUrl"
,
patientSignInfo
.
getDoctorHeadPortrait
());
imageMap
.
put
(
"doctorName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"msgId"
,
UUIDUtil
.
getUUID
());
imageMap
.
put
(
"msgType"
,
CommonConstants
.
MSG_TYPE
);
imageMap
.
put
(
"senderName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"senderProfessional"
,
patientSignInfo
.
getDoctorProfessional
());
imageMap
.
put
(
"team"
,
false
);
imageMap
.
put
(
"teamFlag"
,
0
);
imageMap
.
put
(
"toApplicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
content
=
JSONObject
.
toJSONString
(
imageMap
);
contentStr
.
add
(
content
);
}
msgType
=
"TIMCustomElem"
;
// }
content
=
JSONObject
.
toJSONString
(
imageMap
);
}
else
if
(
i
==
2
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
))
{
content
=
MessageFormat
.
format
(
content
,
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
()));
}
else
if
(
i
==
2
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
)
)
{
content
=
MessageFormat
.
format
(
content
,
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
()));
}
}
}
}
}
if
(
SenderEnum
.
DOCTOR
.
getDesc
().
equals
(
componentsList
.
get
(
i
).
getSender
()))
{
messageInfo
=
getDoctorInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
}
else
{
log
.
info
(
"msgType={}"
,
msgType
);
messageInfo
=
getInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
,
msgType
);
}
messageInfos
.
add
(
messageInfo
);
PersonImInformReq
parameter
=
new
PersonImInformReq
();
parameter
.
setMessageInfos
(
messageInfos
);
parameter
.
setAdmissionId
(
sendImMsgDTO
.
getAdmId
());
parameter
.
setBusiCode
(
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
log
.
info
(
"推送家庭医生提示语推送:{}"
+
JSON
.
toJSONString
(
parameter
.
getMessageInfos
()));
Long
syncFlag
=
i
*
100L
;
if
(
i
==
1
)
{
if
(
personUserImInform
(
parameter
,
content
,
syncFlag
,
msgType
))
{
log
.
info
(
"推送家庭医生提示语推送成功,admissionId:{}"
,
sendImMsgDTO
.
getAdmId
());
flag
=
true
;
}
}
else
if
(
i
==
1
)
{
for
(
int
j
=
1
;
j
<
contentStr
.
size
();
j
++)
{
syncFlag
=
j
*
100L
;
if
(
personUserImInform
(
parameter
,
content
,
syncFlag
,
msgType
))
{
log
.
info
(
"推送家庭医生提示语推送成功,admissionId:{}"
,
sendImMsgDTO
.
getAdmId
());
flag
=
true
;
}
}
}
else
if
(
MsgTempTypeEnum
.
REP_ANO
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
// 报告异常特殊处理
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
sendImMsgDTO
.
getIntention
());
}
else
if
(
MsgTempTypeEnum
.
AFTER_HEAL_ASSE
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
// 健康评估后特殊处理
MasterUrlDTO
masterUrlDTO
=
new
MasterUrlDTO
();
masterUrlDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
masterUrlDTO
.
setSignSeqId
(
String
.
valueOf
(
patientSignInfo
.
getSignedId
()));
masterUrlDTO
.
setType
(
"2"
);
String
masterResult
=
thirdOrderPushUtil
.
getMasterUrl
(
masterUrlDTO
);
if
(!
StringUtils
.
isEmpty
(
masterResult
))
{
Result
<
String
>
muResult
=
JSON
.
parseObject
(
masterResult
,
Result
.
class
);
if
(
muResult
.
isSuccess
())
{
content
=
MessageFormat
.
format
(
content
,
muResult
.
getData
());
}
else
if
(
i
==
2
)
{
syncFlag
=
contentStr
.
size
()
+
1L
;
if
(
personUserImInform
(
parameter
,
content
,
syncFlag
,
msgType
))
{
log
.
info
(
"推送家庭医生提示语推送成功,admissionId:{}"
,
sendImMsgDTO
.
getAdmId
());
flag
=
true
;
}
}
}
else
{
if
(!
StringUtils
.
isEmpty
(
sendImMsgDTO
.
getOldAdmId
()))
{
if
(
MsgTempTypeEnum
.
UP_SUC
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
if
(!
Objects
.
nonNull
(
componentsList
.
get
(
i
).
getConditionFlag
())
&&
CommonConstants
.
STATUS_VALID
.
equals
(
componentsList
.
get
(
i
).
getConditionFlag
()))
{
// 查询用户健康计划是否开启状态
HealthInfoDTO
healthInfoDTO
=
new
HealthInfoDTO
();
healthInfoDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
String
result
=
thirdOrderPushUtil
.
getHealthSchStatus
(
healthInfoDTO
);
if
(!
StringUtils
.
isEmpty
(
result
))
{
Result
<
String
>
hssResult
=
JSON
.
parseObject
(
result
,
Result
.
class
);
if
(
hssResult
.
isSuccess
()
&&
CommonConstants
.
STATUS_VALID
.
equals
(
hssResult
.
getData
()))
{
continue
;
}
}
else
{
for
(
int
i
=
0
;
i
<
componentsList
.
size
();
i
++)
{
String
content
=
componentsList
.
get
(
i
).
getContent
();
List
<
MessageInfo
>
messageInfos
=
new
ArrayList
<>();
MessageInfo
messageInfo
=
new
MessageInfo
();
// 报告解读
String
msgType
=
null
;
if
(
MsgTempTypeEnum
.
REP_INTER
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
if
(!
StringUtils
.
isEmpty
(
reportResult
))
{
Result
rrResult
=
JSON
.
parseObject
(
reportResult
,
Result
.
class
);
if
(
rrResult
.
isSuccess
())
{
ReportDetailVo
reportDetailVo
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
rrResult
.
getData
()),
ReportDetailVo
.
class
);
List
<
ReportDetailItemVo
>
reportDetailItemVos
=
reportDetailVo
.
getReportFileList
();
if
(
i
==
0
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
()));
}
}
else
if
(
i
==
1
)
{
List
<
String
>
contentStr
=
new
ArrayList
<>();
Map
<
String
,
Object
>
imageMap
=
new
HashMap
<>();
for
(
ReportDetailItemVo
reportDetailItemVo
:
reportDetailItemVos
)
{
imageMap
.
put
(
"UserAction"
,
CommonConstants
.
USER_ACTION
);
imageMap
.
put
(
"applicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"appointmentId"
,
sendImMsgDTO
.
getAdmId
());
imageMap
.
put
(
"attacheUrl"
,
reportDetailItemVo
.
getFileUrl
());
imageMap
.
put
(
"businessCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
imageMap
.
put
(
"doctorHeadUrl"
,
patientSignInfo
.
getDoctorHeadPortrait
());
imageMap
.
put
(
"doctorName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"msgId"
,
UUIDUtil
.
getUUID
());
imageMap
.
put
(
"msgType"
,
CommonConstants
.
MSG_TYPE
);
imageMap
.
put
(
"senderName"
,
patientSignInfo
.
getDoctorName
());
imageMap
.
put
(
"senderProfessional"
,
patientSignInfo
.
getDoctorProfessional
());
imageMap
.
put
(
"team"
,
false
);
imageMap
.
put
(
"teamFlag"
,
0
);
imageMap
.
put
(
"toApplicationCode"
,
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
content
=
JSONObject
.
toJSONString
(
imageMap
);
contentStr
.
add
(
content
);
}
msgType
=
"TIMCustomElem"
;
}
else
if
(
i
==
2
)
{
if
(
Objects
.
nonNull
(
reportDetailVo
))
{
content
=
MessageFormat
.
format
(
content
,
ReportTypeEnum
.
getDesc
(
reportDetailVo
.
getReportType
()));
}
}
}
}
}
else
if
(
MsgTempTypeEnum
.
REP_ANO
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
// 报告异常特殊处理
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
(),
sendImMsgDTO
.
getIntention
());
}
else
if
(
MsgTempTypeEnum
.
AFTER_HEAL_ASSE
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
// 健康评估后特殊处理
MasterUrlDTO
masterUrlDTO
=
new
MasterUrlDTO
();
masterUrlDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
masterUrlDTO
.
setSignSeqId
(
String
.
valueOf
(
patientSignInfo
.
getSignedId
()));
masterUrlDTO
.
setType
(
"2"
);
String
masterResult
=
thirdOrderPushUtil
.
getMasterUrl
(
masterUrlDTO
);
if
(!
StringUtils
.
isEmpty
(
masterResult
))
{
Result
<
String
>
muResult
=
JSON
.
parseObject
(
masterResult
,
Result
.
class
);
if
(
muResult
.
isSuccess
())
{
content
=
MessageFormat
.
format
(
content
,
muResult
.
getData
());
}
}
}
else
{
if
(!
StringUtils
.
isEmpty
(
sendImMsgDTO
.
getOldAdmId
()))
{
if
(
MsgTempTypeEnum
.
UP_SUC
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
if
(!
Objects
.
nonNull
(
componentsList
.
get
(
i
).
getConditionFlag
())
&&
CommonConstants
.
STATUS_VALID
.
equals
(
componentsList
.
get
(
i
).
getConditionFlag
()))
{
// 查询用户健康计划是否开启状态
HealthInfoDTO
healthInfoDTO
=
new
HealthInfoDTO
();
healthInfoDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
String
result
=
thirdOrderPushUtil
.
getHealthSchStatus
(
healthInfoDTO
);
if
(!
StringUtils
.
isEmpty
(
result
))
{
Result
<
String
>
hssResult
=
JSON
.
parseObject
(
result
,
Result
.
class
);
if
(
hssResult
.
isSuccess
()
&&
CommonConstants
.
STATUS_VALID
.
equals
(
hssResult
.
getData
()))
{
continue
;
}
MasterUrlDTO
masterUrlDTO
=
new
MasterUrlDTO
();
masterUrlDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
masterUrlDTO
.
setSignSeqId
(
String
.
valueOf
(
patientSignInfo
.
getSignedId
()));
masterUrlDTO
.
setType
(
"3"
);
String
masterResult
=
thirdOrderPushUtil
.
getMasterUrl
(
masterUrlDTO
);
if
(!
StringUtils
.
isEmpty
(
masterResult
))
{
Result
<
String
>
muResult
=
JSON
.
parseObject
(
masterResult
,
Result
.
class
);
if
(
muResult
.
isSuccess
())
{
content
=
MessageFormat
.
format
(
content
,
muResult
.
getData
());
}
}
}
}
}
else
if
(
MsgTempTypeEnum
.
SIG_SUC
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
if
(!
Objects
.
nonNull
(
componentsList
.
get
(
i
).
getConditionFlag
())
&&
CommonConstants
.
STATUS_VALID
.
equals
(
componentsList
.
get
(
i
).
getConditionFlag
()))
{
MasterUrlDTO
masterUrlDTO
=
new
MasterUrlDTO
();
masterUrlDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
masterUrlDTO
.
setSignSeqId
(
String
.
valueOf
(
patientSignInfo
.
getSignedId
()));
...
...
@@ -248,55 +348,40 @@ public class ImChatTemplateImpl implements ImChatTemplate {
}
}
}
}
else
{
PatientSignInfo
oldPatientSignInfo
=
getPatientSignInfo
(
sendImMsgDTO
.
getOldAdmId
());
log
.
info
(
"之前的doctorName={}"
,
oldPatientSignInfo
.
getDoctorName
());
log
.
info
(
"来源的doctorName={}"
,
oldPatientSignInfo
.
getDoctorName
());
content
=
MessageFormat
.
format
(
content
,
oldPatientSignInfo
.
getDoctorName
(),
patientSignInfo
.
getDoctorName
());
}
}
else
if
(
MsgTempTypeEnum
.
SIG_SUC
.
getValue
().
equals
(
sendImMsgDTO
.
getType
()))
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
if
(!
Objects
.
nonNull
(
componentsList
.
get
(
i
).
getConditionFlag
())
&&
CommonConstants
.
STATUS_VALID
.
equals
(
componentsList
.
get
(
i
).
getConditionFlag
()))
{
MasterUrlDTO
masterUrlDTO
=
new
MasterUrlDTO
();
masterUrlDTO
.
setPhone
(
patientSignInfo
.
getPatientPhone
());
masterUrlDTO
.
setSignSeqId
(
String
.
valueOf
(
patientSignInfo
.
getSignedId
()));
masterUrlDTO
.
setType
(
"3"
);
String
masterResult
=
thirdOrderPushUtil
.
getMasterUrl
(
masterUrlDTO
);
if
(!
StringUtils
.
isEmpty
(
masterResult
))
{
Result
<
String
>
muResult
=
JSON
.
parseObject
(
masterResult
,
Result
.
class
);
if
(
muResult
.
isSuccess
())
{
content
=
MessageFormat
.
format
(
content
,
muResult
.
getData
());
}
}
}
}
else
{
PatientSignInfo
oldPatientSignInfo
=
getPatientSignInfo
(
sendImMsgDTO
.
getOldAdmId
());
log
.
info
(
"之前的doctorName={}"
,
oldPatientSignInfo
.
getDoctorName
());
log
.
info
(
"来源的doctorName={}"
,
oldPatientSignInfo
.
getDoctorName
());
content
=
MessageFormat
.
format
(
content
,
oldPatientSignInfo
.
getDoctorName
(),
patientSignInfo
.
getDoctorName
());
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
}
}
else
{
content
=
MessageFormat
.
format
(
content
,
patientSignInfo
.
getDoctorName
());
}
}
if
(
SenderEnum
.
DOCTOR
.
getDesc
().
equals
(
componentsList
.
get
(
i
).
getSender
()))
{
messageInfo
=
getDoctorInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
}
else
{
log
.
info
(
"msgType={}"
,
msgType
);
messageInfo
=
getInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
,
msgType
);
}
messageInfos
.
add
(
messageInfo
);
PersonImInformReq
parameter
=
new
PersonImInformReq
();
parameter
.
setMessageInfos
(
messageInfos
);
parameter
.
setAdmissionId
(
sendImMsgDTO
.
getAdmId
());
parameter
.
setBusiCode
(
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
log
.
info
(
"推送家庭医生提示语推送:{}"
+
JSON
.
toJSONString
(
parameter
.
getMessageInfos
()));
Long
syncFlag
=
i
*
100L
;
if
(
personUserImInform
(
parameter
,
content
,
syncFlag
,
msgType
))
{
log
.
info
(
"推送家庭医生提示语推送成功,admissionId:{}"
,
sendImMsgDTO
.
getAdmId
());
flag
=
true
;
if
(
SenderEnum
.
DOCTOR
.
getDesc
().
equals
(
componentsList
.
get
(
i
).
getSender
()))
{
messageInfo
=
getDoctorInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
);
}
else
{
log
.
info
(
"msgType={}"
,
msgType
);
messageInfo
=
getInformRefreshPatientParam
(
patientSignInfo
,
IMInformConstants
.
REFRESH
,
msgType
);
}
messageInfos
.
add
(
messageInfo
);
PersonImInformReq
parameter
=
new
PersonImInformReq
();
parameter
.
setMessageInfos
(
messageInfos
);
parameter
.
setAdmissionId
(
sendImMsgDTO
.
getAdmId
());
parameter
.
setBusiCode
(
IMInformConstants
.
IM_SYSTEM_BUSINESS_CODE
);
log
.
info
(
"推送家庭医生提示语推送:{}"
+
JSON
.
toJSONString
(
parameter
.
getMessageInfos
()));
Long
syncFlag
=
i
*
100L
;
if
(
personUserImInform
(
parameter
,
content
,
syncFlag
,
msgType
))
{
log
.
info
(
"推送家庭医生提示语推送成功,admissionId:{}"
,
sendImMsgDTO
.
getAdmId
());
flag
=
true
;
}
}
}
}
return
flag
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论