|
@ -13,6 +13,7 @@ import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeamMember;
|
|
|
import com.yihu.wlyy.entity.education.HealthEduArticle;
|
|
|
import com.yihu.wlyy.entity.followup.Followup;
|
|
|
import com.yihu.wlyy.entity.message.Message;
|
|
|
import com.yihu.wlyy.entity.message.MessageNoticeSetting;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.PatientFamilyMember;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
@ -33,6 +34,7 @@ import com.yihu.wlyy.repository.prescription.*;
|
|
|
import com.yihu.wlyy.service.app.health.HealthEduArticleService;
|
|
|
import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
|
|
|
import com.yihu.wlyy.service.app.health.PatientHealthIndexService;
|
|
|
import com.yihu.wlyy.service.app.message.MessageService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionFollowupContentService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
|
|
|
import com.yihu.wlyy.service.app.prescription.PrescriptionLogService;
|
|
@ -148,6 +150,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
private PrescriptionFollowupContentDao prescriptionFollowupContentDao;
|
|
|
@Autowired
|
|
|
private PatientHealthIndexService healthIndexService;
|
|
|
@Autowired
|
|
|
private MessageService messageService;
|
|
|
//健康问题 高血压
|
|
|
private static final String gxy = "HP0093";
|
|
|
//健康问题 糖尿病
|
|
@ -160,6 +164,8 @@ public class ConsultTeamService extends ConsultService {
|
|
|
|
|
|
@Value("${im.im_list_get}")
|
|
|
private String im_list_get;
|
|
|
@Value("${im.data_base_name}")
|
|
|
private String imdb;
|
|
|
@Autowired
|
|
|
private PushMsgTask pushMsgTask;
|
|
|
@Autowired
|
|
@ -871,8 +877,12 @@ public class ConsultTeamService extends ConsultService {
|
|
|
ct.setDoctor(sf.getDoctorHealth());
|
|
|
if (StringUtils.isNotBlank(sf.getDoctor())) {
|
|
|
if (users.isNull(sf.getDoctor())) {
|
|
|
// users.put(sf.getDoctor(), 1); 全科默认也收到消息
|
|
|
users.put(sf.getDoctor(), 0);
|
|
|
//全科需要判断是否开启健管师邀请后在接收消息
|
|
|
int isGetMessage = 1;
|
|
|
if(messageService.getMessageNoticeSettingByMessageType(sf.getDoctor(),"1", MessageNoticeSetting.MessageTypeEnum.healthSignSwitch.getValue())){
|
|
|
isGetMessage = 0;
|
|
|
}
|
|
|
users.put(sf.getDoctor(), isGetMessage);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@ -2686,4 +2696,26 @@ public class ConsultTeamService extends ConsultService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* pcim 使用
|
|
|
* @param patient
|
|
|
*/
|
|
|
public com.alibaba.fastjson.JSONObject getSessionId(String patient){
|
|
|
com.alibaba.fastjson.JSONObject re = new com.alibaba.fastjson.JSONObject();
|
|
|
StringBuffer sql = new StringBuffer();
|
|
|
sql.append("SELECT a. STATUS, t.session_id FROM wlyy_consult_team a, ");
|
|
|
sql.append(imdb).append(".topics t WHERE a.patient = '").append(patient).append("' ");
|
|
|
sql.append("AND a.consult = t.id AND a.type = 2 AND a.del = '1' ORDER BY a.id DESC LIMIT 1");
|
|
|
|
|
|
List<Map<String,Object>> list = jdbcTemplate.queryForList(sql.toString());
|
|
|
if(list!=null&&list.size()>0){
|
|
|
re.put("status",list.get(0).get("STATUS"));
|
|
|
re.put("sessionId",list.get(0).get("session_id"));
|
|
|
}else{
|
|
|
re.put("status",-1);
|
|
|
}
|
|
|
return re;
|
|
|
}
|
|
|
|
|
|
}
|