Commit 97f1d6f24f34c27f2ebe5e59671949b7e0d0b76f
1 parent
7f386c8954
Exists in
master
and in
7 other branches
分娩作废产检劵
Showing 1 changed file with 30 additions and 8 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
97f1d6f
... | ... | @@ -452,7 +452,7 @@ |
452 | 452 | for (Integer roleMaps : userRoleMapses) { |
453 | 453 | Roles roles1 = rolesService.getRoles(roleMaps); |
454 | 454 | if (roles1 != null && StringUtils.isNotEmpty(orgId)) { |
455 | - if(roles1.getOrgId() == null||roles1.getOrgId() == rog){ | |
455 | + if (roles1.getOrgId() == null || roles1.getOrgId() == rog) { | |
456 | 456 | roles.add(roles1); |
457 | 457 | } |
458 | 458 | } |
459 | 459 | |
... | ... | @@ -484,14 +484,14 @@ |
484 | 484 | //是否是建档医院 |
485 | 485 | users.setbStatus(organization.getbStatus()); |
486 | 486 | |
487 | - String hospital=autoMatchFacade.getHospitalId(loginContext.getId()); | |
487 | + String hospital = autoMatchFacade.getHospitalId(loginContext.getId()); | |
488 | 488 | //设置建档方式 |
489 | - String groupId= groupsFacade.findByCurrentUserId(hospital); | |
490 | - Integer bType= GroupEnums.BuildType.SINGLE.getbType(); | |
491 | - if(StringUtils.isNotEmpty(groupId)){ | |
492 | - OrganizationGroups groups= groupsService.findById(groupId); | |
493 | - if(null!=groups){ | |
494 | - bType= groups.getbType(); | |
489 | + String groupId = groupsFacade.findByCurrentUserId(hospital); | |
490 | + Integer bType = GroupEnums.BuildType.SINGLE.getbType(); | |
491 | + if (StringUtils.isNotEmpty(groupId)) { | |
492 | + OrganizationGroups groups = groupsService.findById(groupId); | |
493 | + if (null != groups) { | |
494 | + bType = groups.getbType(); | |
495 | 495 | } |
496 | 496 | } |
497 | 497 | users.setbType(bType); |
... | ... | @@ -1173,6 +1173,28 @@ |
1173 | 1173 | Map<String, Object> result = new HashMap<>(); |
1174 | 1174 | result.put("errorcode", ConstantInterface.SUCCESS); |
1175 | 1175 | result.put("errormsg", "update"); |
1176 | + return result; | |
1177 | + } | |
1178 | + | |
1179 | + @RequestMapping(value = "/getUserById", method = RequestMethod.GET) | |
1180 | + @ResponseBody | |
1181 | + public Map<String, Object> getUser(@RequestParam("id") String id) { | |
1182 | + Map<String, Object> result = new HashMap<>(); | |
1183 | + Users users = usersService.getUsers(Integer.valueOf(id)); | |
1184 | + result.put("errorcode", ConstantInterface.BUSINESS_ERROR); | |
1185 | + result.put("errormsg", "数据不存在"); | |
1186 | + if (null != users) { | |
1187 | + Departments departments = departmentsService.getDepartments(users.getKsId()); | |
1188 | + Organization organization = organizationService.getOrganization(users.getOrgId()); | |
1189 | + if (null != organization) { | |
1190 | + result.put("hName", organization.getName()); | |
1191 | + } | |
1192 | + result.put("errorcode", ConstantInterface.SUCCESS); | |
1193 | + result.put("errormsg", "成功"); | |
1194 | + if (null != departments) { | |
1195 | + result.put("kName", departments.getName()); | |
1196 | + } | |
1197 | + } | |
1176 | 1198 | return result; |
1177 | 1199 | } |
1178 | 1200 | } |