update===>:修改测试问题。
This commit is contained in:
parent
b8449df3bb
commit
fef182bebc
@ -43,4 +43,9 @@ public class AppletPageConfig {
|
||||
* 护理结构详情页面跳转路径
|
||||
*/
|
||||
private String nurseStationDetailsPageUrl;
|
||||
|
||||
/**
|
||||
* 筛查记录页面跳转路径
|
||||
*/
|
||||
private String screeningRecordPageUrl;
|
||||
}
|
||||
|
||||
@ -11,7 +11,6 @@ import com.xinelu.manage.domain.chatRecord.ChatRecord;
|
||||
import com.xinelu.manage.dto.chatrecord.ChatRecordDTO;
|
||||
import com.xinelu.manage.dto.chatrecord.MessageSearchDto;
|
||||
import com.xinelu.manage.service.chatrecord.IChatRecordService;
|
||||
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
|
||||
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
|
||||
import com.xinelu.manage.vo.chatrecord.MessageCenterVo;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
@ -51,9 +50,6 @@ public class ChatRecordController extends BaseController {
|
||||
@Resource
|
||||
private IPatientInfoService patientInfoService;
|
||||
|
||||
@Resource
|
||||
private IHospitalPersonInfoService hospitalPersonInfoService;
|
||||
|
||||
/**
|
||||
* 查询聊天记录
|
||||
*/
|
||||
|
||||
@ -54,12 +54,12 @@ public class MessageSearchDto {
|
||||
* 页码
|
||||
*/
|
||||
@ApiModelProperty(value = "页码")
|
||||
private Integer pageNum = 1;
|
||||
private Integer pageNum;
|
||||
/**
|
||||
* 每页大小
|
||||
*/
|
||||
@ApiModelProperty(value = "每页大小")
|
||||
private Integer pageSize = 15;
|
||||
private Integer pageSize;
|
||||
|
||||
@ApiModelProperty(value = "通知适用人群编号集合")
|
||||
private List<String> crowdNoList;
|
||||
|
||||
@ -32,6 +32,7 @@ import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -241,6 +242,7 @@ public class ChatRecordServiceImpl implements IChatRecordService {
|
||||
break;
|
||||
case "3":
|
||||
// 在线咨询
|
||||
List<MessageCenterVo> list = new ArrayList<>();
|
||||
List<MessageVo> chatList = groupByCategory.get(key);
|
||||
if (chatList != null && chatList.size() > 0) {
|
||||
// 先根据consultationId分组
|
||||
@ -254,6 +256,7 @@ public class ChatRecordServiceImpl implements IChatRecordService {
|
||||
|
||||
long receive = groupByConsultation.get(consultationId).get(0).getRecipientId();
|
||||
MessageCenterVo chat = chatRecordMapper.selectOneChatRecord(consultationId);
|
||||
|
||||
if (receive != messageDto.getRecipientId()) {
|
||||
// 查询咨询的最新一条聊天记录
|
||||
if (chat.getSenderId().equals(messageDto.getRecipientId())) {
|
||||
@ -268,8 +271,11 @@ public class ChatRecordServiceImpl implements IChatRecordService {
|
||||
}
|
||||
}
|
||||
chat.setUnreadCount(CollectionUtils.isEmpty(unreadList) ? 0 : unreadList.size());
|
||||
messageCenterVos.add(chat);
|
||||
list.add(chat);
|
||||
});
|
||||
// list按照图文问诊id倒序排序
|
||||
list.sort(Comparator.comparing(MessageCenterVo::getConsultationId).reversed());
|
||||
messageCenterVos.addAll(list);
|
||||
}
|
||||
break;
|
||||
case "4":
|
||||
|
||||
@ -315,7 +315,10 @@ public class MessagePushServiceImpl implements MessagePushService {
|
||||
|
||||
if (StringUtils.isNotBlank(body.getString("sourceType"))) {
|
||||
switch (body.getString("sourceType")) {
|
||||
case "1": // 1:订单页面
|
||||
case "1": // 1:筛查页面
|
||||
paramsMap.put("page", appletPageConfig.getScreeningRecordPageUrl());
|
||||
break;
|
||||
case "2": // 2:订单页面
|
||||
paramsMap.put("page", appletPageConfig.getAppointOrderPageUrl());
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -168,21 +168,19 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
body.setScreeningDate(new Date());
|
||||
int flag = screeningRecordMapper.update(body);
|
||||
// 校验是否已经注册
|
||||
PatientInfoVO registerVo = patientService.selectPatientInfoById(Long.getLong(body.getPatientId()));
|
||||
PatientInfoVO registerVo = patientService.selectPatientInfoById(Long.valueOf(body.getPatientId()));
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("patientId", body.getPatientId());
|
||||
if (flag > 0) {
|
||||
// 组装发送消息通知参数
|
||||
result.put("openid", registerVo.getOpenid());
|
||||
result.put("receiveName", registerVo.getPatientName());
|
||||
result.put("text1", body.getHospitalName());
|
||||
result.put("text2", (body.getProjectName().length() >= 17? (body.getProjectName().substring(0, 17) + "..."): body.getProjectName()));
|
||||
result.put("text3", body.getProjectName());
|
||||
result.put("sendTitle", "筛查预约");
|
||||
result.put("sendTime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
|
||||
result.put("busType", "10");
|
||||
result.put("senderName", SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
result.put("busType", "");
|
||||
result.put("sendContent", "您的筛查项目已检测完成,点击查看详情。");
|
||||
result.put("messageType", "6");
|
||||
result.put("messageType", "1");
|
||||
result.put("messageCategory", "4");
|
||||
result.put("cardNo", registerVo.getCardNo());
|
||||
result.put("contentId", body.getScreeningId());
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
ci.doctor_name,
|
||||
ci.problem_description,
|
||||
ci.create_time,
|
||||
ci.status,
|
||||
(SELECT content FROM chat_record cr WHERE cr.consultation_id = ci.id ORDER BY create_time DESC LIMIT 1) as content,
|
||||
(SELECT message_type FROM chat_record cr WHERE cr.consultation_id = ci.id ORDER BY create_time DESC LIMIT 1) as messageType,
|
||||
(SELECT COUNT(cr.id) FROM chat_record cr WHERE cr.consultation_id = ci.id AND read_status = '0'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user