提交 234b629f authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 215ed4b6
package com.ebaiyihui.family.doctor.common.bo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
......@@ -43,7 +42,7 @@ public class PatientSignInfo {
* 患者名字
*/
private String patientName;
/**
* 患者手机号码
*/
......@@ -65,4 +64,14 @@ public class PatientSignInfo {
* 团队成员信息(个人这个值为null)
*/
private List<MemberInfo> memberInfos;
/**
* 医生头像图片地址
*/
private String doctorHeadPortrait;
/**
* 医生职称
*/
private String doctorProfessional;
}
......@@ -144,4 +144,8 @@ public class CommonConstants {
public static final String SUPPLIER_CODE = "ZhongKang";
public static final String SUPPLIER_CODE_JTYS = "zhongkang_mfd";
public static final String USER_ACTION ="2000";
public static final String MSG_TYPE = "PICTURE";
}
......@@ -185,26 +185,26 @@ public class ImChatTemplateImpl implements ImChatTemplate {
Map<String, Object> map = new HashMap<>();
if (reportDetailVo.getReportType().equals(1)) {
List<Map<String, Object>> mapList = new ArrayList<>();
map.put("UUID", UUIDUtil.getUUID());
map.put("ImageFormat", 1);
for (ReportDetailItemVo reportDetailItemVo : reportDetailItemVos) {
if (reportDetailItemVo.getFileType().equals(1)) {
Map<String, Object> imageMap = new HashMap<>();
imageMap.put("Type", 1);
imageMap.put("URL", reportDetailItemVo.getFileUrl());
mapList.add(imageMap);
}
}
map.put("ImageInfoArray", mapList);
msgType = "TIMImageElem";
} else {
map.put("UUID", UUIDUtil.getUUID());
map.put("URL", reportDetailItemVos.get(0).getFileUrl());
map.put("FileName", StringUtils.isEmpty(reportDetailVo.getReportName())
? ReportTypeEnum.getDesc(reportDetailVo.getReportType())
: reportDetailVo.getReportName());
map.put("Download_Flag", "2");
msgType = "TIMFileElem";
Map<String, Object> imageMap = new HashMap<>();
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);
mapList.add(imageMap);
map.put("data", mapList);
msgType = "TIMCustomElem";
}
content = JSONObject.toJSONString(map);
} else if (i == 2) {
......@@ -309,6 +309,8 @@ public class ImChatTemplateImpl implements ImChatTemplate {
return new PatientSignInfo();
}
patientSignInfo.setDoctorUserId(userInfoByUserIdRespVO.getUserId());
patientSignInfo.setDoctorHeadPortrait(doctorInfo.getData().getPortrait());
patientSignInfo.setDoctorProfessional(doctorInfo.getData().getTitle());
log.info("patientSignInfo:{}" + JSON.toJSONString(patientSignInfo));
return patientSignInfo;
}
......@@ -345,7 +347,7 @@ public class ImChatTemplateImpl implements ImChatTemplate {
messageInfo.setSingleAccount(newAccount(IMInformConstants.DOCTOR_APPLICATION_CODE, doctorUserId));
messageInfo.setSelfAccount(newAccount(IMInformConstants.PATIENT_APPLICATION_CODE, patientSignInfo.getPatientUserId()));
// if (!StringUtils.isEmpty(msgType)) {
messageInfo.setMsgType(msgType);
messageInfo.setMsgType(msgType);
// }
messageInfo.setMessage(message);
log.info("messageInfo={}", messageInfo);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论