|
@ -1,3 +1,4 @@
|
|
|
|
|
|
package com.yihu.wlyy.service.app.consult;
|
|
|
|
|
|
import java.util.Date;
|
|
@ -114,22 +115,14 @@ public class ConsultService extends BaseService {
|
|
|
|
|
|
public void sendMucMessageBySingnType(String doctor,String doctorName,String patient,String content,String contentType,String title){
|
|
|
//add by linz 增加签约关系查询,
|
|
|
List<SignFamily> sfList = signFamilyDao.findSSandFamilyByDoctorPatient(doctor, patient);
|
|
|
int type = 2;
|
|
|
if(sfList!=null&&sfList.size()==1){
|
|
|
//只存在一种签约关系
|
|
|
type = sfList.get(0).getType();
|
|
|
}else if(sfList!=null&&sfList.size()==2){
|
|
|
//两种签约关系直接取家庭签约
|
|
|
type = 2;
|
|
|
}else{
|
|
|
//没找到签约关系
|
|
|
type=0;
|
|
|
SignFamily signFamily = signFamilyDao.findByDoctorPatient(doctor, patient);
|
|
|
if(signFamily==null){
|
|
|
signFamily = signFamilyDao.findSsSignByDoctorPatient(doctor, patient);
|
|
|
}
|
|
|
if(type!=0){
|
|
|
new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,type+"",sfList.get(0).getTeamCode()).start();
|
|
|
}else{
|
|
|
new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,"2",sfList.get(0).getTeamCode()).start();
|
|
|
|
|
|
if(signFamily==null){
|
|
|
throw new RuntimeException("无有效签约关系!");
|
|
|
}
|
|
|
new SendPatientUtil(doctor,doctorName,patient, contentType, content,title,signFamily.getType()+"",signFamily.getTeamCode()).start();
|
|
|
}
|
|
|
}
|