| | |
| | | |
| | | List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class); |
| | | String str=""; |
| | | Long hospital=-1L; |
| | | if(sysDoctors!=null&&sysDoctors.size()>0){ |
| | | str= sysDoctors.get(0).getDoctorName(); |
| | | hospital=sysDoctors.get(0).getHospitalId(); |
| | | } |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_ID_HEADER, String.valueOf(user.getId())); |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_HEADER, user.getUsername()); |
| | | |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_REAL_NAME,str);//待完善 |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_REAL_NAME,URLEncoder.encode(str,"UTF-8"));//待完善 |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_HOSPITAL_ID_HEADER,hospital.toString()); |
| | | tenantId=hospital.toString(); |
| | | List<SysOrganization> organizations = (List<SysOrganization>) user.getOrganizations(); |
| | | //将组织数据 存到header 里面 |
| | | organizations.sort((e1,e2)->e1.getOrgLevel().compareTo(e2.getOrgLevel())); |
| | |
| | | } |
| | | //将角色放到header |
| | | ctx.addZuulRequestHeader(SecurityConstants.ROLE_HEADER, JSON.toJSONString(user.getRoles())); |
| | | tenantId=String.valueOf(organizations.get(0).getId()); |
| | | |
| | | } |
| | | |
| | | |