|
@ -72,6 +72,7 @@ public class NoticeJob implements Job {
|
|
//判断医生是不是在工作时间内
|
|
//判断医生是不是在工作时间内
|
|
String noticeContent1 = " 您当前有[zxsize]条未处理消息,其中有[qysize]条签约消息。请尽快处理~";
|
|
String noticeContent1 = " 您当前有[zxsize]条未处理消息,其中有[qysize]条签约消息。请尽快处理~";
|
|
String noticeContent2 = " 您当前有[zxsize]条未处理消息,请尽快处理~";
|
|
String noticeContent2 = " 您当前有[zxsize]条未处理消息,请尽快处理~";
|
|
|
|
String noticeContent3 = " 您当前有[qysize]条签约消息,请尽快处理~";
|
|
if ("1".equals(doctorWorkTimeService.isDoctorWorking(doctor.getCode(), -1).get("status"))) {
|
|
if ("1".equals(doctorWorkTimeService.isDoctorWorking(doctor.getCode(), -1).get("status"))) {
|
|
//得到医生多少条咨询消息
|
|
//得到医生多少条咨询消息
|
|
Integer zxsize = getDoctorMesssageCount(doctor.getCode(), 1);
|
|
Integer zxsize = getDoctorMesssageCount(doctor.getCode(), 1);
|
|
@ -80,8 +81,8 @@ public class NoticeJob implements Job {
|
|
//如果既有签约又有咨询
|
|
//如果既有签约又有咨询
|
|
if (zxsize > 0 && qysize > 0) {
|
|
if (zxsize > 0 && qysize > 0) {
|
|
JSONObject jo = new JSONObject();
|
|
JSONObject jo = new JSONObject();
|
|
noticeContent1.replace("[zxsize]", zxsize + "");
|
|
|
|
noticeContent1.replace("[qysize]", qysize + "");
|
|
|
|
|
|
noticeContent1 = noticeContent1.replace("[zxsize]", zxsize + "");
|
|
|
|
noticeContent1 = noticeContent1.replace("[qysize]", qysize + "");
|
|
jo.put("content", noticeContent1);
|
|
jo.put("content", noticeContent1);
|
|
jo.put("level", doctor.getLevel());
|
|
jo.put("level", doctor.getLevel());
|
|
maps.put(doctor.getCode(), jo);
|
|
maps.put(doctor.getCode(), jo);
|
|
@ -89,11 +90,19 @@ public class NoticeJob implements Job {
|
|
//只有咨询
|
|
//只有咨询
|
|
if (zxsize > 0 && qysize == 0) {
|
|
if (zxsize > 0 && qysize == 0) {
|
|
JSONObject jo = new JSONObject();
|
|
JSONObject jo = new JSONObject();
|
|
noticeContent2.replace("[zxsize]", zxsize + "");
|
|
|
|
|
|
noticeContent2 = noticeContent2.replace("[zxsize]", zxsize + "");
|
|
jo.put("content", noticeContent2);
|
|
jo.put("content", noticeContent2);
|
|
jo.put("level", doctor.getLevel());
|
|
jo.put("level", doctor.getLevel());
|
|
maps.put(doctor.getCode(), jo);
|
|
maps.put(doctor.getCode(), jo);
|
|
}
|
|
}
|
|
|
|
//只有咨询
|
|
|
|
if (zxsize == 0 && qysize > 0) {
|
|
|
|
JSONObject jo = new JSONObject();
|
|
|
|
noticeContent3 = noticeContent3.replace("[qysize]", qysize + "");
|
|
|
|
jo.put("content", noticeContent3);
|
|
|
|
jo.put("level", doctor.getLevel());
|
|
|
|
maps.put(doctor.getCode(), jo);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|
|
@ -160,7 +169,7 @@ public class NoticeJob implements Job {
|
|
return getImMsgAmount(doctorCode);
|
|
return getImMsgAmount(doctorCode);
|
|
}
|
|
}
|
|
case 2: {
|
|
case 2: {
|
|
String sql = "select count(a.id) from wlyy_message a where a.type =1 and a.readonly=1 and a.receiver=?";
|
|
|
|
|
|
String sql = "select count(a.id) from wlyy_message a where a.type =1 and a.has_read=1 and a.receiver=?";
|
|
return jdbcTemplate.queryForObject(sql, Integer.class, doctorCode);
|
|
return jdbcTemplate.queryForObject(sql, Integer.class, doctorCode);
|
|
}
|
|
}
|
|
}
|
|
}
|