项目描述
基于springboot医疗信息管理系统:
多角色:
页面路径:
http://localhost:8090/
管理员账号:
admin 123
医生
doc 123
患者
pat 123
体检员
tijian 123
运行环境
jdk8+tomcat8+mysql+maven+IDEA
项目技术
springboot+thymeleaf+jquery
项目截图
管理员端
部分代码
@RestController
@RequestMapping(value = "/admin")
@Api(tags = "管理员操作API")
public class AdminController {
@Autowired
private IAdminService iadminService;
/**
* 新建角色
*
* @param roleVO
* @return
*/
@RequestMapping(value = "/createRole", method = RequestMethod.POST)
public BaseResponse<String> createRole(@RequestBody @Validated RoleVO roleVO) {
return iadminService.createRole(roleVO);
}
/**
* 后台添加账户
*
* @param reqVO
* @return
*/
@RequestMapping(value = "/adduser", method = RequestMethod.POST)
public BaseResponse<String> addUser(@RequestBody @Validated AddUserReqVO reqVO) {
return iadminService.addUser(reqVO);
}
/**
* 后台添加角色
*
* @param addRoleVO
* @return
*/
@RequestMapping(value = "/addRole", method = RequestMethod.POST)
public BaseResponse<String> addRole(@RequestBody @Validated AddRoleVO addRoleVO) {
return iadminService.addRole(addRoleVO);
}
/**
* 获取审核角色
*
* @param
* @return
*/
@GetMapping(value = "/getRoleApply")
public PageRspVO<applyRspVO> getRoleApply(BasePageReqVO reqVO) {
return iadminService.getRoleApply(reqVO);
}
/**
* 修改角色状态
*
* @param status
* @param email
*/
@PostMapping(value = "/changeRoleStatus")
public void changeRoleStatus(@RequestParam String status, @RequestParam String email) {
iadminService.changeRoleStatus(status, email);
}
/**
* 公告
*
* @param reqVO
* @return
*/
@PostMapping(value = "/addAnnouncement")
public BaseResponse<String> addAnnouncement(@RequestBody @Validated AnnouncementVO reqVO) {
return iadminService.addAnnouncement(reqVO);
}
@GetMapping(value = "/getAnnouncement")
public PageRspVO<AnnouncementVO> getAnnouncement(BasePageReqVO reqVO) {
return iadminService.getAnnouncement(reqVO);
}
@PostMapping(value = "/changeAnnouncement")
public BaseResponse<String> changeAnnouncement(@RequestBody @Validated AnnouncementVO announcementVO) {
return iadminService.changeAnnouncement(announcementVO);
}
@PostMapping(value = "/deleteAnnouncement")
public BaseResponse<String> deleteAnnouncement(@RequestParam String id) {
return iadminService.deleteAnnouncement(id);
}
@PostMapping(value = "/showAnnouncement")
public BaseResponse<String> showAnnouncement(@RequestParam String id) {
return iadminService.showAnnouncement(id);
}
@PostMapping(value = "/hiddenAnnouncement")
public BaseResponse<String> hiddenAnnouncement(@RequestParam String id) {
return iadminService.hiddenAnnouncement(id);
}
@PostMapping(value = "/adddepartment")
@ApiOperation(value = "添加科室", httpMethod = "POST", notes = "添加科室")
@ApiImplicitParam(name = "reqVO",value = "添加科室", dataType = "AddDepartmentReqVO")
public BaseResponse<String> addDepartment(@RequestBody @Validated AddDepartmentReqVO reqVO) {
return iadminService.addDepartment(reqVO);
}
@PostMapping(value = "/getDepartment")
@ApiOperation(value = "获取所有科室", httpMethod = "POST", notes = "获取所有科室")
public List<GetDepartmentRspVO> getDepartment() {
return iadminService.getDepartment();
}
}
@RestController
@RequestMapping(value = "/user")
@Api(tags = "用户管理API")
public class UserController {
@Autowired
private IUserService iUserService;
/**
* 登录验证
*
* @param reqVO
* @return
*/
@RequestMapping(value = "/dologin", method = RequestMethod.POST)
public BaseResponse<String> doLogin(@RequestBody @Validated UserLoginReqVO reqVO) {
return iUserService.doLogin(reqVO);
}
/**
* 保存用户注册信息,向用户发送激活链接
*
* @param reqVO
* @return
*/
@RequestMapping(value = "/doregister", method = RequestMethod.POST)
public BaseResponse<String> registered(@RequestBody @Validated UserRegisterReqVO reqVO) {
return iUserService.saveUserAndSendEmail(reqVO);
}
/**
* 获取登录日志
*
* @param reqVO
* @return
*/
@RequestMapping(value = "/getLoginfor", method = RequestMethod.GET)
public PageRspVO<LoginInforRspVO> getLoginfor(BasePageReqVO reqVO) {
return iUserService.getLoginfor(reqVO);
}
/**
* 修改密码
*
* @param reqVO
* @return
*/
@PostMapping(value = "/changePassword")
public BaseResponse<String> changePassword(@RequestBody @Validated ChangePasswordReqVO reqVO) {
return iUserService.changePassword(reqVO);
}
/**
* 个人资料设置
*
* @return
*/
@PostMapping(value = "/getUserInfo")
public List<UserInfoVO> getUserInfo() {
return iUserService.getUserInfo();
}
@PostMapping(value = "/changeUserInfo")
public BaseResponse<String> changeUserInfo(@RequestBody @Validated UserInfoVO reqVO) {
return iUserService.changeUserInfo(reqVO);
}
@PostMapping(value = "/getAnnContent")
public AnnRspVO getAnnContent(@RequestParam String id) {
return iUserService.getAnnContent(id);
}
@PostMapping(value = "/addAnotherRole")
public BaseResponse<String> addAnotherRole(@RequestBody @Validated AccountRoleVO reqVO) {
return iUserService.addAnotherRole(reqVO);
}
/**
* 获取所有角色
*
* @param
* @return
*/
@PostMapping(value = "/getAllRole")
public List<GetAllRoleRspVO> getAllRole() {
return iUserService.getAllRole();
}
/**
* 获取所有医生等级
*/
@PostMapping(value = "/doctor/grade/query")
public BaseResponse<List<QueryDoctorGradeReqVO>> queryDoctorGrade() {
return iUserService.queryDoctorGrade();
}
}