基于javaweb+mysql的ssm医院管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

基于javaweb+mysql的ssm医院管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb的SSM医院管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

项目介绍

医院管理系统,主要分为管理员与普通员工两种角色; 管理员主要功能包括: 通知管理、员工管理、请假管理、考勤管理、招聘管理、部门管理、工资管理、系统管理:角色管理、用户管理、菜单管理; 普通员工主要功能包括: 通知管理、请假管理、考勤管理;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml; 若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7版本;

技术栈

  1. 后端:Spring SpringMVC MyBatis 2. 前端:JSP+bootstrap+jQuery

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行; 3. 将项目中applicationContext.xml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/yygl 登录 注:tomcat中配置的路径必须为/yygl,否则会引起错误;

@Autowired

DrugsService drugsService;

@Autowired

HospitalizationService hospitalizationService;

@Autowired

MedicalhistoryService medicalhistoryService;

@RequestMapping("/admin/doctorManage")

public String doctorManage(HttpServletRequest request,@RequestParam(value="name",required = false) String name,@RequestParam(value="certId",required = false) String certId){

request.setAttribute("doctors",doctorService.getAllDoctor(name,certId));

return "admin/doctorManage";

@RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.DELETE)

row.createCell(4).setCellValue(hospitalization.getMedicalname());

row.createCell(5).setCellValue(hospitalization.getPatientname());

HSSFCell cell1 = row.createCell(6);

HSSFCell cell2 = row.createCell(7);

cell1.setCellValue(hospitalization.getIntime());

cell2.setCellValue(hospitalization.getOuttime());

cell1.setCellStyle(style);

cell2.setCellStyle(style);

rowNum++;

String fileName = "住院信息.xls";

//生成excel文件

//ExcelUtils.buildExcelFile(fileName, workbook);

//浏览器下载excel


row.createCell(4).setCellValue(hospitalization.getMedicalname());

row.createCell(5).setCellValue(hospitalization.getPatientname());

HSSFCell cell1 = row.createCell(6);

HSSFCell cell2 = row.createCell(7);

cell1.setCellValue(hospitalization.getIntime());

cell2.setCellValue(hospitalization.getOuttime());

cell1.setCellStyle(style);

cell2.setCellStyle(style);

rowNum++;

String fileName = "住院信息.xls";

//生成excel文件

//ExcelUtils.buildExcelFile(fileName, workbook);

//浏览器下载excel

row.createCell(4).setCellValue(hospitalization.getMedicalname());

row.createCell(5).setCellValue(hospitalization.getPatientname());

HSSFCell cell1 = row.createCell(6);

HSSFCell cell2 = row.createCell(7);

cell1.setCellValue(hospitalization.getIntime());

cell2.setCellValue(hospitalization.getOuttime());

cell1.setCellStyle(style);

cell2.setCellStyle(style);

rowNum++;

String fileName = "住院信息.xls";

//生成excel文件

//ExcelUtils.buildExcelFile(fileName, workbook);
@RequestMapping("/admin/doctorAdd")

public String doctorAddPage(){

return "admin/add/doctoradd";

@RequestMapping("/doctor/seekMedicalAdvice")

public String seekMedicalAdvice(HttpServletRequest request, HttpSession session,@RequestParam(value = "patientname",required = false)String patientname,@RequestParam(value = "time",required = false)String time){

Login login=(Login)session.getAttribute("login");

Doctor doctor=doctorService.getDoctorByLoginId(login.getId());

request.setAttribute("appointments" ,appointmentService.selectByDoctorId(doctor.getId(),patientname,time));

return "doctor/seekMedicalAdvice";

@RequestMapping("/doctor/seek/{id}")

public String seek(@PathVariable Integer id,HttpServletRequest request){


JSONObject json=new JSONObject();

json.put("message",hospitalizationService.AddHospitalization(hospitalization));

return json;

@RequestMapping(value = "/admin/hospitalization/{id}",method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delHospitalization(@PathVariable Integer id){

JSONObject json=new JSONObject();

json.put("message",hospitalizationService.deleteHospitalization(id));

return json;

@RequestMapping(value = "/admin/hospitalization/{id}",method = RequestMethod.GET)

public String hospitalizationInfo(HttpServletRequest request,@PathVariable Integer id){

request.setAttribute("h",hospitalizationService.getHospitalization(id));


patient.setId(Integer.parseInt((String)map.get("patientid")));

json.put("message",patientService.seek(patient));

return json;

@RequestMapping(value = "/doctor/zation",method = RequestMethod.POST)

@ResponseBody

public JSONObject zation(@RequestBody Hospitalization hospitalization){

JSONObject json=new JSONObject();

json.put("message",hospitalizationService.AddHospitalization(hospitalization));

return json;

@RequestMapping(value = "/doctor/medicalhistory/{id}")

public String medicalhistory(@PathVariable Integer id,HttpServletRequest request){

request.setAttribute("medicalhistorys",medicalhistoryService.getMedicalhistoryByPatientId(id));

return "doctor/medicalhistory";

return"admin/info/hospitalizationinfo";

@RequestMapping(value = "/admin/hospitalization",method = RequestMethod.PUT)

@ResponseBody

public JSONObject delHospitalization(@RequestBody Hospitalization hospitalization){

JSONObject json=new JSONObject();

json.put("message",hospitalizationService.updateHospitalization(hospitalization));

return json;

//生成user表excel

@GetMapping(value = "/admin/getHospitalization")

public String getUser(HttpServletResponse response) throws Exception{

HSSFWorkbook workbook = new HSSFWorkbook();

HSSFSheet sheet = workbook.createSheet("统计表");
json.put("message",drugsService.delDrug(id));

return json;

@RequestMapping(value = "/admin/drug",method = RequestMethod.POST)

@ResponseBody

public JSONObject addDrug(@RequestBody Drugs drugs){

JSONObject json=new JSONObject();

json.put("message",drugsService.addDrug(drugs));

return json;

@RequestMapping("/admin/drugAdd")

public String drugAddPage(){

return  "/admin/add/drugadd";


@Autowired

MedicalhistoryService medicalhistoryService;

@RequestMapping("/admin/doctorManage")

public String doctorManage(HttpServletRequest request,@RequestParam(value="name",required = false) String name,@RequestParam(value="certId",required = false) String certId){

request.setAttribute("doctors",doctorService.getAllDoctor(name,certId));

return "admin/doctorManage";

@RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delDoctor(@PathVariable Integer id){

JSONObject json=new JSONObject();


public String doctorManage(HttpServletRequest request,@RequestParam(value="name",required = false) String name,@RequestParam(value="certId",required = false) String certId){

request.setAttribute("doctors",doctorService.getAllDoctor(name,certId));

return "admin/doctorManage";

@RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delDoctor(@PathVariable Integer id){

JSONObject json=new JSONObject();

json.put("message",doctorService.delDoctor(id));

return json;

@RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.GET)

public String doctorInfo(@PathVariable Integer id,HttpServletRequest request){

request.setAttribute("doctor",doctorService.getDoctor(id));

@Autowired

HospitalizationService hospitalizationService;

@Autowired

MedicalhistoryService medicalhistoryService;

@RequestMapping("/admin/doctorManage")

public String doctorManage(HttpServletRequest request,@RequestParam(value="name",required = false) String name,@RequestParam(value="certId",required = false) String certId){

request.setAttribute("doctors",doctorService.getAllDoctor(name,certId));

return "admin/doctorManage";

@RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delDoctor(@PathVariable Integer id){

JSONObject json=new JSONObject();


public JSONObject hospitalizationAdd(@RequestBody Hospitalization hospitalization){

JSONObject json=new JSONObject();

json.put("message",hospitalizationService.AddHospitalization(hospitalization));

return json;

@RequestMapping(value = "/admin/hospitalization/{id}",method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delHospitalization(@PathVariable Integer id){

JSONObject json=new JSONObject();

json.put("message",hospitalizationService.deleteHospitalization(id));

return json;

@RequestMapping(value = "/admin/hospitalization/{id}",method = RequestMethod.GET)


ExcelUtils.createTitle(workbook,sheet);

List<Hospitalization> rows = hospitalizationService.getAllHospitalizations();

//设置日期格式

HSSFCellStyle style = workbook.createCellStyle();

style.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy h:mm"));

//新增数据行,并且设置单元格数据

int rowNum=1;

for(Hospitalization hospitalization:rows){

HSSFRow row = sheet.createRow(rowNum);

row.createCell(0).setCellValue(rowNum);

row.createCell(1).setCellValue(hospitalization.getFloor());

row.createCell(2).setCellValue(hospitalization.getBed());

row.createCell(0).setCellValue(rowNum);

row.createCell(1).setCellValue(hospitalization.getFloor());

row.createCell(2).setCellValue(hospitalization.getBed());

row.createCell(3).setCellValue(hospitalization.getDoor());

row.createCell(4).setCellValue(hospitalization.getMedicalname());

row.createCell(5).setCellValue(hospitalization.getPatientname());

HSSFCell cell1 = row.createCell(6);

HSSFCell cell2 = row.createCell(7);

cell1.setCellValue(hospitalization.getIntime());

cell2.setCellValue(hospitalization.getOuttime());

cell1.setCellStyle(style);

cell2.setCellStyle(style);

rowNum++;

row.createCell(4).setCellValue(hospitalization.getMedicalname());

row.createCell(5).setCellValue(hospitalization.getPatientname());

HSSFCell cell1 = row.createCell(6);

HSSFCell cell2 = row.createCell(7);

cell1.setCellValue(hospitalization.getIntime());

cell2.setCellValue(hospitalization.getOuttime());

cell1.setCellStyle(style);

cell2.setCellStyle(style);

rowNum++;

String fileName = "住院信息.xls";

//生成excel文件

//ExcelUtils.buildExcelFile(fileName, workbook);

//浏览器下载excel


@ResponseBody

public JSONObject drug(@RequestBody Map map){

JSONObject json=new JSONObject();

Patient patient=new Patient();

System.out.println(map);

patient.setDrugsids(DrugsUtils.vaild(map));

patient.setId(Integer.parseInt((String)map.get("patientid")));

json.put("message",patientService.seek(patient));

return json;

@RequestMapping(value = "/doctor/zation",method = RequestMethod.POST)

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

java毕业

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值