|
@ -138,13 +138,21 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
|
|
|
int updateComment(String commentContent, double commentStar, String consult);
|
|
|
|
|
|
// 查询医生所有未读的消息总数
|
|
|
@Query("SELECT SUM(a.doctorRead) FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.del = '1' AND a.status = 0")
|
|
|
@Query("SELECT SUM(a.doctorRead) FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.del = '1' AND a.status = 0 AND a.type <> 6")
|
|
|
int amountAllDoctorUnread(String doctor);
|
|
|
|
|
|
// 查询医生所有未读的消息总数
|
|
|
@Query("SELECT a.name,b.czrq FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.del = '1' AND a.status = 0 order by b.czrq desc")
|
|
|
@Query("SELECT SUM(a.doctorRead) FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.del = '1' AND a.status = 0 AND a.type = 6")
|
|
|
int amountAlFamouslDoctorUnread(String doctor);
|
|
|
|
|
|
// 查询医生所有未读的消息总数
|
|
|
@Query("SELECT a.name,b.czrq FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.del = '1' AND a.status = 0 AND a.type <> 6 order by b.czrq desc")
|
|
|
Page<Object> AllDoctorUnreadLast(String doctor,Pageable pageRequest);
|
|
|
|
|
|
// 查询医生所有未读的消息总数
|
|
|
@Query("SELECT a.name,b.czrq FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.del = '1' AND a.status = 0 AND a.type = 6 order by b.czrq desc")
|
|
|
Page<Object> AllDoctorFamousUnreadLast(String doctor,Pageable pageRequest);
|
|
|
|
|
|
// 查询带未读数量的所有健康咨询列表
|
|
|
@Query("SELECT a FROM ConsultTeam a, ConsultTeamDoctor b WHERE a.consult = b.consult AND b.to = ?1 AND a.status = 0 and a.type< 3")
|
|
|
Page<ConsultTeam> findListByUnreadDoctor(String doctor, Pageable pageRequest);
|
|
@ -187,19 +195,19 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
|
|
|
ConsultTeam findByParientCodeAndSignTypeAndDoctor(String patientCode, String doctor, int s);
|
|
|
|
|
|
//名医咨询 -全部 带symptoms 未处理、未回复
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply != 1) and a.del = '1' and b.del = '1'")
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
|
|
|
Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid, long id,String title, Pageable pageRequest);
|
|
|
|
|
|
//名医咨询 -全部 带symptoms 处理、未回复
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.symptoms like ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply != 1) and a.del = '1' and b.del = '1'")
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.symptoms like ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
|
|
|
Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid,String title, Pageable pageRequest);
|
|
|
|
|
|
//名医咨询 -全部 处理、未回复
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply != 1) and a.del = '1' and b.del = '1'")
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
|
|
|
Page<ConsultTeam> findFamousDoctorUnReplyReadNoTitleList(String uid, long id, Pageable pageRequest);
|
|
|
|
|
|
//名医咨询 -全部
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.status = 0 and (a.doctorRead > 0 or b.reply != 1) and a.del = '1' and b.del = '1'")
|
|
|
@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
|
|
|
Page<ConsultTeam> findFamousDoctorUnReplyReadNoTitleList(String uid, Pageable pageRequest);
|
|
|
|
|
|
//名医咨询 -全部 带symptoms 进行中
|