|
@ -22,6 +22,7 @@ import com.yihu.wlyy.repository.doctor.DoctorPatientDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorTeamDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorTeamMemberDao;
|
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
|
import com.yihu.wlyy.service.app.health.HealthEduArticleService;
|
|
|
import com.yihu.wlyy.service.app.health.PatientHealthGuidanceService;
|
|
|
import com.yihu.wlyy.service.app.talk.TalkGroupService;
|
|
|
import com.yihu.wlyy.task.PushMsgTask;
|
|
@ -81,6 +82,10 @@ public class ConsultTeamService extends ConsultService {
|
|
|
private JdbcTemplate jdbcTemplate;
|
|
|
@Autowired
|
|
|
private PatientHealthGuidanceService guidanceService;
|
|
|
|
|
|
@Autowired
|
|
|
private HealthEduArticleService healthEduArticleService;
|
|
|
|
|
|
@Autowired
|
|
|
private TalkGroupService talkGroupService;
|
|
|
@Autowired
|
|
@ -745,10 +750,7 @@ public class ConsultTeamService extends ConsultService {
|
|
|
consult.setGuidance(ct.getGuidance());
|
|
|
// 设置咨询标识
|
|
|
ct.setConsult(consult.getCode());
|
|
|
// 保存医生咨询信息
|
|
|
// 添加咨询转发记录
|
|
|
// 添加医生咨询日志
|
|
|
String content = addLogs(ct);
|
|
|
|
|
|
//推送给IM去创建议题,取得成员消息
|
|
|
// JSONObject messages = ImUtill.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), "咨询问题:"+consult.getSymptoms(), consult.getImages());
|
|
|
JSONObject messages = ImUtill.getCreateTopicMessage(patient, tempPatient.getName(), consult.getTitle(), consult.getSymptoms(), consult.getImages());
|
|
@ -772,6 +774,12 @@ public class ConsultTeamService extends ConsultService {
|
|
|
cd.setTo(key);
|
|
|
consultTeamDoctorDao.save(cd);
|
|
|
}
|
|
|
|
|
|
// 保存医生咨询信息
|
|
|
// 添加咨询转发记录
|
|
|
// 添加医生咨询日志
|
|
|
String content = addLogs(ct);
|
|
|
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
@ -826,12 +834,21 @@ public class ConsultTeamService extends ConsultService {
|
|
|
String content = "";
|
|
|
|
|
|
if (ct.getGuidance() != null && ct.getGuidance() > 0) {
|
|
|
//先判断从健康指导转咨询是否存在指导。
|
|
|
JSONObject json = guidanceService.findById(ct.getGuidance());
|
|
|
|
|
|
|
|
|
if (json == null) {
|
|
|
throw new Exception("guidance not exist");
|
|
|
//再判断从健康教育文章转咨询是否存在文章 20170602
|
|
|
Object article = healthEduArticleService.findArticleById(ct.getGuidance());
|
|
|
if(article == null) {
|
|
|
throw new Exception("guidance not exist");
|
|
|
}
|
|
|
}else{
|
|
|
content += "医生" + (json.get("doctorName") != null ? json.get("doctorName").toString() : "")
|
|
|
+ "发出的指导:" + (json.getString("content") != null ? json.getString("content").toString() : "") + "<br/>";
|
|
|
}
|
|
|
content += "医生" + (json.get("doctorName") != null ? json.get("doctorName").toString() : "")
|
|
|
+ "发出的指导:" + (json.getString("content") != null ? json.getString("content").toString() : "") + "<br/>";
|
|
|
|
|
|
}
|
|
|
|
|
|
content += "咨询问题:" + (StringUtils.isEmpty(ct.getSymptoms()) ? "无" : ct.getSymptoms());
|