提交 b1ca1d73 authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 60c58700
...@@ -169,6 +169,7 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -169,6 +169,7 @@ public class ImChatTemplateImpl implements ImChatTemplate {
PatientSignInfo patientSignInfo = getPatientSignInfo(sendImMsgDTO.getAdmId()); PatientSignInfo patientSignInfo = getPatientSignInfo(sendImMsgDTO.getAdmId());
MessageInfo messageInfo = new MessageInfo(); MessageInfo messageInfo = new MessageInfo();
// 报告解读 // 报告解读
String msgType = null;
if (MsgTempTypeEnum.REP_INTER.getValue().equals(sendImMsgDTO.getType())) { if (MsgTempTypeEnum.REP_INTER.getValue().equals(sendImMsgDTO.getType())) {
if (!StringUtils.isEmpty(reportResult)) { if (!StringUtils.isEmpty(reportResult)) {
Result rrResult = JSON.parseObject(reportResult, Result.class); Result rrResult = JSON.parseObject(reportResult, Result.class);
...@@ -194,6 +195,7 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -194,6 +195,7 @@ public class ImChatTemplateImpl implements ImChatTemplate {
} }
} }
map.put("ImageInfoArray", mapList); map.put("ImageInfoArray", mapList);
msgType = "TIMImageElem";
} else { } else {
map.put("UUID", UUIDUtil.getUUID()); map.put("UUID", UUIDUtil.getUUID());
map.put("URL", reportDetailItemVos.get(0).getFileUrl()); map.put("URL", reportDetailItemVos.get(0).getFileUrl());
...@@ -201,6 +203,7 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -201,6 +203,7 @@ public class ImChatTemplateImpl implements ImChatTemplate {
? ReportTypeEnum.getDesc(reportDetailVo.getReportType()) ? ReportTypeEnum.getDesc(reportDetailVo.getReportType())
: reportDetailVo.getReportName()); : reportDetailVo.getReportName());
map.put("Download_Flag", "2"); map.put("Download_Flag", "2");
msgType = "TIMFileElem";
} }
content = JSONObject.toJSONString(map); content = JSONObject.toJSONString(map);
} }
...@@ -242,7 +245,7 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -242,7 +245,7 @@ public class ImChatTemplateImpl implements ImChatTemplate {
if (SenderEnum.DOCTOR.getDesc().equals(componentsList.get(i).getSender())) { if (SenderEnum.DOCTOR.getDesc().equals(componentsList.get(i).getSender())) {
messageInfo = getDoctorInformRefreshPatientParam(patientSignInfo, IMInformConstants.REFRESH); messageInfo = getDoctorInformRefreshPatientParam(patientSignInfo, IMInformConstants.REFRESH);
} else { } else {
messageInfo = getInformRefreshPatientParam(patientSignInfo, IMInformConstants.REFRESH); messageInfo = getInformRefreshPatientParam(patientSignInfo, IMInformConstants.REFRESH, msgType);
} }
messageInfos.add(messageInfo); messageInfos.add(messageInfo);
PersonImInformReq parameter = new PersonImInformReq(); PersonImInformReq parameter = new PersonImInformReq();
...@@ -322,7 +325,7 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -322,7 +325,7 @@ public class ImChatTemplateImpl implements ImChatTemplate {
return messageInfo; return messageInfo;
} }
private <T> MessageInfo getInformRefreshPatientParam(PatientSignInfo patientSignInfo, Integer isRefresh) { private <T> MessageInfo getInformRefreshPatientParam(PatientSignInfo patientSignInfo, Integer isRefresh, String msgType) {
String doctorUserId = patientSignInfo.getDoctorUserId(); String doctorUserId = patientSignInfo.getDoctorUserId();
if (StringUtils.isEmpty(doctorUserId)) { if (StringUtils.isEmpty(doctorUserId)) {
log.error("IM INFORM ERROR : 无法查询到接收人信息"); log.error("IM INFORM ERROR : 无法查询到接收人信息");
...@@ -335,6 +338,9 @@ public class ImChatTemplateImpl implements ImChatTemplate { ...@@ -335,6 +338,9 @@ public class ImChatTemplateImpl implements ImChatTemplate {
message.setApplicationCode(IMInformConstants.IM_SYSTEM_BUSINESS_CODE); message.setApplicationCode(IMInformConstants.IM_SYSTEM_BUSINESS_CODE);
messageInfo.setSingleAccount(newAccount(IMInformConstants.DOCTOR_APPLICATION_CODE, doctorUserId)); messageInfo.setSingleAccount(newAccount(IMInformConstants.DOCTOR_APPLICATION_CODE, doctorUserId));
messageInfo.setSelfAccount(newAccount(IMInformConstants.PATIENT_APPLICATION_CODE, patientSignInfo.getPatientUserId())); messageInfo.setSelfAccount(newAccount(IMInformConstants.PATIENT_APPLICATION_CODE, patientSignInfo.getPatientUserId()));
if (!StringUtils.isEmpty(msgType)) {
messageInfo.setMsgType(msgType);
}
messageInfo.setMessage(message); messageInfo.setMessage(message);
return messageInfo; return messageInfo;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论