|
@ -4,6 +4,7 @@ package com.yihu.wlyy.service.app.consult;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
import com.yihu.wlyy.repository.patient.SignFamilyDao;
|
|
import com.yihu.wlyy.util.SendPatientUtil;
|
|
import com.yihu.wlyy.util.SendPatientUtil;
|
|
@ -114,15 +115,18 @@ public class ConsultService extends BaseService {
|
|
|
|
|
|
|
|
|
|
public void sendMucMessageBySingnType(String doctor,String doctorName,String patient,String content,String contentType,String title){
|
|
public void sendMucMessageBySingnType(String doctor,String doctorName,String patient,String content,String contentType,String title){
|
|
//add by linz 增加签约关系查询,
|
|
|
|
SignFamily signFamily = signFamilyDao.findByDoctorPatient(doctor, patient);
|
|
|
|
|
|
Doctor d = doctorDao.findByCode(doctor);
|
|
|
|
SignFamily signFamily = signFamilyDao.findByPatient(patient);//当前签约团队
|
|
if(signFamily==null){
|
|
if(signFamily==null){
|
|
signFamily = signFamilyDao.findSsSignByDoctorPatient(doctor, patient);
|
|
|
|
|
|
List<SignFamily> signFamilys = signFamilyDao.findLastJySignByPatient(patient,2);//获取旧的家庭签约关系
|
|
|
|
if(signFamilys!=null&&signFamilys.size()>0){
|
|
|
|
signFamily = signFamilys.get(0);
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
if(signFamily==null){
|
|
|
|
throw new RuntimeException("无有效签约关系!");
|
|
|
|
|
|
if(signFamily!=null){
|
|
|
|
new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,signFamily.getType()+"",signFamily.getTeamCode()).start();
|
|
|
|
}else {
|
|
|
|
throw new RuntimeException("无法找到签约关系!");
|
|
}
|
|
}
|
|
new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,signFamily.getType()+"",signFamily.getTeamCode()).start();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|