|
@ -3,6 +3,7 @@ package com.yihu.wlyy.web.patient.account;
|
|
|
import com.sun.org.apache.regexp.internal.RE;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
|
|
|
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeamMember;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.entity.patient.SignFamily;
|
|
|
import com.yihu.wlyy.service.app.account.PatientInfoService;
|
|
@ -540,6 +541,7 @@ public class PatientController extends WeixinBaseController {
|
|
|
String id = getUID();
|
|
|
//查询家庭签约
|
|
|
SignFamily jt = familyContractService.findByPatientYes(id);
|
|
|
Map<String,Object> docMap = new HashMap<>();
|
|
|
if (jt != null) {
|
|
|
List<Doctor> doctors = doctorTeamService.findJiatingTeamDoctors(id);
|
|
|
if (doctors != null) {
|
|
@ -551,7 +553,20 @@ public class PatientController extends WeixinBaseController {
|
|
|
doctorJson.put("code", doctor.getCode());
|
|
|
doctorJson.put("name", doctor.getName());
|
|
|
doctorJson.put("level", doctor.getLevel());
|
|
|
doctorJson.put("teamlevel",doctorTeamService.findTeamType(id,doctor.getCode()));
|
|
|
List<DoctorTeamMember> oc = new ArrayList<>();
|
|
|
if(docMap.get(doctor.getCode())!=null){//不为空证明全科,建管同一个
|
|
|
oc = (List<DoctorTeamMember>)docMap.get(doctor.getCode());
|
|
|
doctorJson.put("teamlevel",2);
|
|
|
}else{//为空证明建管和全科不一致,或者第一次进入
|
|
|
oc = doctorTeamService.findTeamType(id,doctor.getCode());
|
|
|
if(oc!=null&&oc.size()==1){//找出只有一条直接返回团队所属职位
|
|
|
doctorJson.put("teamlevel",oc.get(0).getType());
|
|
|
}
|
|
|
if(oc!=null&&oc.size()==2){//两条数据证明专科全科一致
|
|
|
docMap.put(doctor.getCode(),oc);
|
|
|
doctorJson.put("teamlevel",3);
|
|
|
}
|
|
|
}
|
|
|
familyDoctors.put(doctor.getCode(), doctorJson);
|
|
|
}
|
|
|
}
|