소스 검색

Merge branch 'dev' of wujunjie/patient-co-management into dev

yeshijie 7 년 전
부모
커밋
1ee8d0a99d

+ 1 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/prenatalInspector/PrenatalInspectorPreCardService.java

@ -249,6 +249,7 @@ public class PrenatalInspectorPreCardService extends BaseService {
            message.setTitle("孕检提醒");
            message.setContent(content);
            message.setType(13);
            message.setDel("1");
            messageDao.save(message);
            // 推送消息给医生
            pushMsgTask.put(doctor, "13", "孕检提醒", content, "");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -62,7 +62,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12)")
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12) and (a.del = '1' or a.del is null) ")
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")

+ 9 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -263,6 +263,15 @@ public class MessageService extends BaseService {
     * @param msgid
     */
    public int readHealth(long msgid) {
        //        by wujunjie type13 医生点击阅读后隐藏
        Message message = messageDao.findOne(msgid);
        int type = message.getType();
        switch (type){
            case 13:
                message.setDel("0");
                messageDao.save(message);
                break;
        }
        return messageDao.read(msgid);
    }