|
@ -5,8 +5,12 @@ 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;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
@ -59,7 +63,11 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
private String articleBaseUrl;
|
|
|
@Autowired
|
|
|
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";
|
|
|
// private String baseUrl = articleBaseUrl+"/WsPlatform/rest";
|
|
@ -400,11 +408,28 @@ public class ThirdJkEduArticleService extends BaseService {
|
|
|
JSONObject json = null;
|
|
|
try {
|
|
|
Doctor doctor = doctorDao.findByCode(userCode);
|
|
|
String orgName = doctor.getHospitalName();//组织名称
|
|
|
String orgName = "";
|
|
|
|
|
|
|
|
|
List<DoctorRole> roleList = doctorRoleDao.findUserRole(userCode);
|
|
|
|
|
|
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 deptName = doctor.getDeptName();//科室名称
|
|
|
String levelName = doctor.getJobName();//职称
|
|
|
String photo = doctor.getPhoto();//头像
|
|
|
String orgId = doctor.getHospital();//组织
|
|
|
String orgId = operatorRoleCode;//组织
|
|
|
String userName = doctor.getName();//登录名称
|
|
|
JSONObject param = new JSONObject();
|
|
|
param.put("articleId", articleId);
|