hisystem
1. 用idea打开项目,并且配置maven下载依赖
2. 导入数据库 hisystem.sql
3. 修改application.yml数据库相关配置
4. 用户注册,验证邮件的邮箱考虑到安全问题,暂不提供授权码,如有需求可使用自己邮箱,开启POP3/SMTP服务后,配置到项目里。
host: smtp.qq.om
password:授权码
username:邮箱
5. 运行后端项目 `HisystemApplication`启动类
6. 访问 http://localhost:8090/
7. 账号:123456@qq.com 密码:123
源码效果视频:
【java毕业设计】基于SpringBoot医院信息管理系统源码
Admin关键代码:
package com.xgs.hisystem.controller;
import com.xgs.hisystem.pojo.bo.BaseResponse;
import com.xgs.hisystem.pojo.vo.PageRspVO;
import com.xgs.hisystem.pojo.vo.*;
import com.xgs.hisystem.service.IAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @description:
*/
@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> saveUserAndSendEmailTemp(@RequestBody @Validated UserRegisterReqVO reqVO) {
return iadminService.saveUserAndSendEmailTemp(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();
}
}
package com.xgs.hisystem.controller;
import com.xgs.hisystem.config.ServerConfig;
import com.xgs.hisystem.pojo.bo.BaseResponse;
import com.xgs.hisystem.pojo.vo.AnnouncementVO;
import com.xgs.hisystem.pojo.vo.applyRspVO;
import com.xgs.hisystem.service.IAdminService;
import com.xgs.hisystem.service.IUserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.List;
@Controller
@Api(tags = "页面跳转")
public class PageController {
@Autowired
private IUserService iUserService;
@Autowired
private IAdminService iAdminService;
@Autowired
private ServerConfig serverConfig;
@GetMapping(value = "/")
public String login() {
return "login";
}
/**
* 主页
*
* @param model
* @return
*/
@GetMapping(value = "/main")
public String main(Model model) {
return "main";
}
/**
* 邮件发送成功
*
* @param request
* @param model
* @return
*/
@GetMapping(value = "/fmail")
public String fmail(HttpServletRequest request, Model model) {
String email = request.getParameter("email");
model.addAttribute("email", email);
model.addAttribute("url", serverConfig.getUrl());
return "email/fmail";
}
/**
* 激活用户状态
*
* @param email
* @param validateCode
* @return
* @throws ParseException
*/
@RequestMapping(value = "/activation", method = RequestMethod.GET)
public String activation(String email, String validateCode, Model model) throws ParseException {
BaseResponse baseResponse = iUserService.activation(email, validateCode);
model.addAttribute("url", serverConfig.getUrl());
if (baseResponse.getStatus() == 1) {
return "email/dmail";
} else {
return "error";
}
}
@GetMapping(value = "/accountset")
public String accountSet() {
return "accountset";
}
@GetMapping("/toApply")
public String toApply() {
return "/admin/roleApply";
}
@GetMapping(value = "/register")
public String getUserID() {
return "register/register";
}
/**
* 导航栏通知数量显示,角色审核
*
* @param model
* @return
*/
@GetMapping(value = "/getRoleNotice")
public String getRoleNotice(Model model) {
List<applyRspVO> applyRspList = iAdminService.getRoleNotice();
model.addAttribute("applyRspList", applyRspList);
return "common/common_head::notice";
}
@GetMapping(value = "/toUserinfo")
public String toUserinfo() {
return "userInfo";
}
@GetMapping(value = "/announcement")
public String announcement() {
return "admin/announcement";
}
/**
* 首页公告显示
*
* @param model
* @return
*/
@GetMapping(value = "/annDisplay")
public String annDisplay(Model model) {
List<AnnouncementVO> annList = iUserService.annDisplay();
model.addAttribute("annList", annList);
return "main::ann";
}
/**
* 获取当前用户所有角色
*
* @param model
* @return
*/
@GetMapping(value = "/getAccountRole")
public String getAccountRole(Model model) {
List<String> accountRoleList = iUserService.getAccountRole();
model.addAttribute("accountRole", accountRoleList);
return "accountset::accountRole";
}
@GetMapping(value = "/registerRecord")
public String registerRecord() {
return "register/registerRecord";
}
@GetMapping(value = "/outpatient")
public String outpatient() {
return "outpatient/outpatient";
}
@GetMapping(value = "/storageManage")
public String storageManage() {
return "drugStore/storageManage";
}
@GetMapping(value = "/outpatientToll")
public String outpatientToll() {
return "toll/outpatientToll";
}
@GetMapping(value = "/examinationToll")
public String examinationToll() {
return "toll/examinationToll";
}
@GetMapping(value = "/takingdrug")
public String takingdrug() {
return "takingdrug/takingdrug";
}
@GetMapping(value = "/medicalExamination")
public String medicalExamination() {
return "medicalExamination/medicalExamination";
}
@GetMapping(value = "/drugManage")
public String drugManage() {
return "drugStore/drugManage";
}
@GetMapping(value = "/medicalRecord")
public String medicalRecord() {
return "outpatient/medicalRecord";
}
}
package com.xgs.hisystem.controller;
import com.xgs.hisystem.pojo.bo.BaseResponse;
import com.xgs.hisystem.pojo.vo.outpatient.*;
import com.xgs.hisystem.pojo.vo.register.GetCardIdInforReqVO;
import com.xgs.hisystem.service.IOutpatientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping(value = "/outpatient")
@Api(tags = "门诊管理API")
public class OutpatientController {
@Autowired
private IOutpatientService iOutpatientService;
/**
* 读取就诊卡,获取病人信息
*
* @return
*/
@PostMapping(value = "/getCardIdInfor")
public PatientInforRspVO getCardIdInfor(@RequestBody GetCardIdInforReqVO reqVO) throws Exception {
return iOutpatientService.getCardIdInfor(reqVO);
}
/**
* 修改患者基础信息
*
* @param reqVO
* @return
*/
@PostMapping(value = "/changePatientInfor")
public BaseResponse<String> changePatientInfor(@RequestBody OtherPatientInforReqVO reqVO) {
return iOutpatientService.changePatientInfor(reqVO);
}
/**
* 就诊,稍后处理
*
* @param reqVO
* @return
*/
@PostMapping(value = "/ProcessLaterMedicalRecord")
public BaseResponse<String> processLaterMedicalRecord(@RequestBody MedicalRecordReqVO reqVO) {
return iOutpatientService.processLaterMedicalRecord(reqVO);
}
/**
* 从稍后处理恢复到队列
*
* @param registerId
* @return
*/
@PostMapping(value = "/restorePatientInfor")
public PatientInforRspVO restorePatientInfor(@RequestParam String registerId) throws Exception {
return iOutpatientService.restorePatientInfor(registerId);
}
/**
* 所有药品名
*
* @return
*/
@PostMapping(value = "/getAllDrug")
public List<String> getAllDrug() {
return iOutpatientService.getAllDrug();
}
/**
* 单个药品规格
*
* @param drug
* @return
*/
@PostMapping(value = "/getDrugInfor")
public DrugRspVO getDrugInfor(String drug) {
return iOutpatientService.getDrugInfor(drug);
}
/**
* 就诊完成,保存病历
*
* @param reqVO
* @return
*/
@PostMapping(value = "/addMedicalRecord")
public BaseResponse<String> addMedicalRecord(@RequestBody @Validated MedicalRecordReqVO reqVO) {
return iOutpatientService.addMedicalRecord(reqVO);
}
/**
* 就诊获取体检信息
*
* @param prescriptionNum
* @return
*/
@PostMapping(value = "/getMedicalExamination")
public medicalExaminationInfoRspVO getMedicalExamination(@RequestParam String prescriptionNum) {
return iOutpatientService.getMedicalExamination(prescriptionNum);
}
@PostMapping(value = "/getalloutpatientqueue")
@ApiOperation(value = "获取当前医生下所有门诊队列患者", httpMethod = "POST", notes = "获取当前医生下所有门诊队列患者")
public List<GetAllOutpatientQueueRspVO> getAllOutpatientQueue() {
return iOutpatientService.getAllOutpatientQueue();
}
}