|
@ -178,6 +178,7 @@ public class ConsultService {
|
|
"d.job_title_name AS \"jobTitleName\", " +
|
|
"d.job_title_name AS \"jobTitleName\", " +
|
|
"h.dept_name AS \"deptName\", " +
|
|
"h.dept_name AS \"deptName\", " +
|
|
"h.org_name AS \"hospitalName\", " +
|
|
"h.org_name AS \"hospitalName\", " +
|
|
|
|
"h.org_code AS orgCode, " +
|
|
"a.pay_status AS \"payStatus\", "+
|
|
"a.pay_status AS \"payStatus\", "+
|
|
"a.source AS \"source\" "+
|
|
"a.source AS \"source\" "+
|
|
"FROM wlyy_consult a," +
|
|
"FROM wlyy_consult a," +
|
|
@ -212,13 +213,20 @@ public class ConsultService {
|
|
sql += " ORDER BY a.czrq desc ";
|
|
sql += " ORDER BY a.czrq desc ";
|
|
logger.info("sql="+sql);
|
|
logger.info("sql="+sql);
|
|
List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql,page,pagesize);
|
|
List<Map<String,Object>> result = hibenateUtils.createSQLQuery(sql,page,pagesize);
|
|
|
|
Map<String,Integer> unreadNum = new HashedMap();
|
|
for (Map<String,Object> map:result){
|
|
for (Map<String,Object> map:result){
|
|
if(type.equals(ImUtil.SESSION_TYPE_ONLINE)){
|
|
if(type.equals(ImUtil.SESSION_TYPE_ONLINE)){
|
|
String sessionId = patient+"_"+String.valueOf(map.get("doctorCode"))+"_23";
|
|
String sessionId = patient+"_"+String.valueOf(map.get("doctorCode"))+"_23";
|
|
//新增未读消息数量
|
|
//新增未读消息数量
|
|
Integer count = imUtil.UserSessionsUnreadMessageCount(sessionId,patient);
|
|
|
|
|
|
if(unreadNum.containsKey(sessionId)){
|
|
|
|
map.put("count",0);
|
|
|
|
}else{
|
|
|
|
Integer count = imUtil.UserSessionsUnreadMessageCount(sessionId,patient);
|
|
|
|
map.put("count",count);
|
|
|
|
unreadNum.put(sessionId,count);
|
|
|
|
}
|
|
map.put("sessionId",sessionId);
|
|
map.put("sessionId",sessionId);
|
|
map.put("count",count);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|