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

feat:家庭医生初始化

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