From fef182bebce5a90ef28837bafa8637793d09a522 Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Mon, 13 Nov 2023 17:33:05 +0800 Subject: [PATCH] =?UTF-8?q?update=3D=3D=3D>:=E4=BF=AE=E6=94=B9=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xinelu/common/config/AppletPageConfig.java | 5 +++++ .../controller/chatrecord/ChatRecordController.java | 4 ---- .../xinelu/manage/dto/chatrecord/MessageSearchDto.java | 4 ++-- .../service/chatrecord/impl/ChatRecordServiceImpl.java | 8 +++++++- .../messagepush/Impl/MessagePushServiceImpl.java | 5 ++++- .../impl/ScreeningRecordServiceImpl.java | 10 ++++------ .../manage/consultationInfo/ConsultationInfoMapper.xml | 1 + 7 files changed, 23 insertions(+), 14 deletions(-) diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java index 9308321..a3b1d13 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java +++ b/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java @@ -43,4 +43,9 @@ public class AppletPageConfig { * 护理结构详情页面跳转路径 */ private String nurseStationDetailsPageUrl; + + /** + * 筛查记录页面跳转路径 + */ + private String screeningRecordPageUrl; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java index b249303..559eff1 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java @@ -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; - /** * 查询聊天记录 */ diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/dto/chatrecord/MessageSearchDto.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/dto/chatrecord/MessageSearchDto.java index 9b3d006..c37dd32 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/dto/chatrecord/MessageSearchDto.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/dto/chatrecord/MessageSearchDto.java @@ -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 crowdNoList; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/chatrecord/impl/ChatRecordServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/chatrecord/impl/ChatRecordServiceImpl.java index 061a5f7..f4157c3 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/chatrecord/impl/ChatRecordServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/chatrecord/impl/ChatRecordServiceImpl.java @@ -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 list = new ArrayList<>(); List 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": diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/messagepush/Impl/MessagePushServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/messagepush/Impl/MessagePushServiceImpl.java index 56614f7..a30b63c 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/messagepush/Impl/MessagePushServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/messagepush/Impl/MessagePushServiceImpl.java @@ -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: diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java index 5a2ed84..1af1667 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java @@ -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()); diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/consultationInfo/ConsultationInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/consultationInfo/ConsultationInfoMapper.xml index a2aaa28..613ec35 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/consultationInfo/ConsultationInfoMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/consultationInfo/ConsultationInfoMapper.xml @@ -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'