Commit c84e91768d06d2fa134a10f1315449edc06ff221
1 parent
f4a89b1fea
Exists in
master
and in
6 other branches
医生信息
Showing 1 changed file with 30 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
c84e917
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
14 | 14 | import com.lyms.platform.common.enums.*; |
15 | 15 | import com.lyms.platform.common.result.BaseListResponse; |
16 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
17 | +import com.lyms.platform.common.result.BaseResponse; | |
16 | 18 | import com.lyms.platform.common.utils.*; |
17 | 19 | import com.lyms.platform.operate.web.facade.AccessPermissionFacade; |
18 | 20 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; |
... | ... | @@ -1298,7 +1300,7 @@ |
1298 | 1300 | usersService.updateUsers(users); |
1299 | 1301 | |
1300 | 1302 | operateLogFacade.addModifyOptLog(getUserId(request), |
1301 | - users.getOrgId(),before, users, OptActionEnums.UPDATE.getId(), "重置用户密码"); | |
1303 | + users.getOrgId(), before, users, OptActionEnums.UPDATE.getId(), "重置用户密码"); | |
1302 | 1304 | LoginContext loginContext = iSessionProvider.register(users.getLogincenterId(), users.getPhone(), users.getAccount(), users.getPwd().toUpperCase()); |
1303 | 1305 | if (loginContext.getErrorcode().equals(0)) { |
1304 | 1306 | ResultUtils.buildSuccessResultAndWrite(response); |
... | ... | @@ -1354,6 +1356,33 @@ |
1354 | 1356 | } |
1355 | 1357 | } |
1356 | 1358 | return result; |
1359 | + } | |
1360 | + | |
1361 | + | |
1362 | + | |
1363 | + @RequestMapping(value = "/getSysDoctorInfo/{userId}", method = RequestMethod.GET) | |
1364 | + @ResponseBody | |
1365 | + public BaseResponse getSysDoctorInfo(@PathVariable("userId") String userId) { | |
1366 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
1367 | + Users users = usersService.getUsers(Integer.valueOf(userId)); | |
1368 | + if (null != users) { | |
1369 | + Map<String, Object> result = new HashMap<>(); | |
1370 | + Departments departments = departmentsService.getDepartments(users.getDeptId()); | |
1371 | + Organization organization = organizationService.getOrganization(users.getOrgId()); | |
1372 | + result.put("doctorName", users.getName()); | |
1373 | + if (null != organization) { | |
1374 | + result.put("hospitalName", organization.getName()); | |
1375 | + } | |
1376 | + if (null != departments) { | |
1377 | + result.put("zhiCheng", ZhiChenEnums.getById(users.getZhiChenId())); | |
1378 | + result.put("deptPhone",users.getPhone()); | |
1379 | + result.put("deptName", departments.getName()); | |
1380 | + } | |
1381 | + objectResponse.setData(result); | |
1382 | + } | |
1383 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
1384 | + objectResponse.setErrormsg("成功"); | |
1385 | + return objectResponse; | |
1357 | 1386 | } |
1358 | 1387 | } |