|
@ -5,9 +5,11 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.es.entity.HealthEduArticlePatient;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.DoctorRole;
|
|
|
import com.yihu.wlyy.entity.organization.HospitalMapping;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorDao;
|
|
|
import com.yihu.wlyy.repository.doctor.DoctorRoleDao;
|
|
|
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
|
|
|
import com.yihu.wlyy.repository.patient.PatientDao;
|
|
|
import com.yihu.wlyy.service.BaseService;
|
|
@ -63,6 +65,8 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
private GcLabelService labelService;
|
|
|
@Autowired
|
|
|
private HospitalMappingDao hospitalMappingDao;
|
|
|
@Autowired
|
|
|
private DoctorRoleDao doctorRoleDao;
|
|
|
|
|
|
// private String baseUrl = "http://service.yihu.com:8085/WsPlatform/rest";
|
|
|
// private String baseUrl = "http://172.17.110.230:83/WsPlatform/rest";
|
|
@ -404,10 +408,24 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
JSONObject json = null;
|
|
|
try {
|
|
|
Doctor doctor = doctorDao.findByCode(userCode);
|
|
|
String orgName = "";
|
|
|
|
|
|
|
|
|
List<DoctorRole> roleList = doctorRoleDao.findUserRole(userCode);
|
|
|
|
|
|
HospitalMapping hospitalMapping = hospitalMappingDao.findByCode(operatorRoleCode);
|
|
|
if(roleList.isEmpty()){
|
|
|
orgName = doctor.getHospitalName();
|
|
|
}else{
|
|
|
|
|
|
HashMap<String,String> rolemap = new HashMap<>();
|
|
|
for (DoctorRole doctorRole:roleList) {
|
|
|
rolemap.put(doctorRole.getCode(),doctorRole.getName());
|
|
|
}
|
|
|
if(rolemap.keySet().contains(operatorRoleCode)){
|
|
|
orgName = rolemap.get(operatorRoleCode);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
String orgName = hospitalMapping.getName();//组织名称
|
|
|
String deptName = doctor.getDeptName();//科室名称
|
|
|
String levelName = doctor.getJobName();//职称
|
|
|
String photo = doctor.getPhoto();//头像
|