Przeglądaj źródła

修复保存文章接口BUG

huangwenjie 7 lat temu
rodzic
commit
3498c5350e

+ 19 - 21
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jkEduArticle/ThirdJkEduArticleService.java

@ -408,28 +408,11 @@ public class ThirdJkEduArticleService extends BaseService {
        JSONObject json = null;
        try {
            Doctor doctor = doctorDao.findByCode(userCode);
            String orgName = "";
            
    
            List<DoctorRole> roleList = doctorRoleDao.findUserRole(userCode);
            orgName = doctor.getHospitalName();
            if(roleList.isEmpty()){
            
            }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 = doctor.getHospitalName();
            String	deptName = doctor.getDeptName();//科室名称
            String	levelName = doctor.getJobName();//职称
            String	photo = doctor.getPhoto();//头像
            String	orgId = operatorRoleCode;//组织
            String	orgId = doctor.getHospital();//组织
            String	userName = doctor.getName();//登录名称
            JSONObject param = new JSONObject();
            param.put("articleId", articleId);
@ -455,8 +438,23 @@ public class ThirdJkEduArticleService extends BaseService {
            param.put("roleType", roleType);
            param.put("isAuthentication", isAuthentication);
            if(isAuthentication==1){
                param.put("authentication", doctor.getHospital());
                param.put("authenticationId", doctor.getHospitalName());
                String operatorRoleCodeName = "";//认证机构的名称
                List<DoctorRole> roleList = doctorRoleDao.findUserRole(userCode);
                if(roleList.isEmpty()){
                    operatorRoleCodeName = doctor.getHospitalName();
                }else{
                    HashMap<String,String> rolemap = new HashMap<>();
                    for (DoctorRole doctorRole:roleList) {
                        rolemap.put(doctorRole.getCode(),doctorRole.getName());
                    }
                    if(rolemap.keySet().contains(operatorRoleCode)){
                        operatorRoleCodeName =  rolemap.get(operatorRoleCode);
                    }else{
                        operatorRoleCodeName = doctor.getHospitalName();
                    }
                }
                param.put("authentication", userCode);
                param.put("authenticationId", operatorRoleCodeName);
            }
            response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(saveArticle, param.toString(), "1"));
            json = JSON.parseObject(response);