项目介绍
随着信息技术和网络技术的飞速发展,人类已进入全新信息化时代,传统管理技术已无法高效,便捷地管理信息。为了迎合时代需求,优化管理效率,各种各样的管理系统应运而生,各行各业相继进入信息管理时代,医院门诊挂号系统就是信息时代变革中的产物之一。
任何系统都要遵循系统设计的基本流程,本系统也不例外,同样需要经过市场调研,需求分析,概要设计,详细设计,编码,测试这些步骤,基于java技术、ssm框架、B/S架构、Mysql数据库设计并实现了医院门诊挂号系统。系统主要包括主页、个人中心、护士管理、医生管理、病人信息管理、科室信息管理、挂号管理、诊断信息管理、病例库管理、开药信息管理、药品信息管理、收费信息管理等功能模块。
本文首先介绍了医院门诊挂号管理技术的发展背景与发展现状,然后遵循软件常规开发流程,首先针对系统选取适用的语言和开发平台,根据需求分析制定模块并设计数据库结构,再根据系统总体功能模块的设计绘制系统的功能模块图,流程图以及E-R图。然后,设计框架并根据设计的框架编写代码以实现系统的各个功能模块。最后,对初步完成的系统进行测试,主要是功能测试、单元测试和性能测试。测试结果表明,该系统能够实现所需的功能,运行状况尚可并无明显缺点。
开发环境
开发语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
前端框架:Vue
开发工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序ue/爬虫/c#/asp.net
系统截图
部分代码
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.YishengEntity;
import com.entity.view.YishengView;
import com.service.YishengService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
import com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 医生
* 后端接口
*/
@RestController
@RequestMapping("/yisheng")
public class YishengController {
@Autowired
private YishengService yishengService;
@Autowired
private StoreupService storeupService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YishengEntity user = yishengService.selectOne(new EntityWrapper<YishengEntity>().eq("yishenggonghao", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"yisheng", "管理员" );
return R.ok().put("token", token);
}
/**
* 注册
*/
@IgnoreAuth
@RequestMapping("/register")
public R register(@RequestBody YishengEntity yisheng){
//ValidatorUtils.validateEntity(yisheng);
YishengEntity user = yishengService.selectOne(new EntityWrapper<YishengEntity>().eq("yishenggonghao", yisheng.getYishenggonghao()));
if(user!=null) {
return R.error("注册用户已存在");
}
Long uId = new Date().getTime();
yisheng.setId(uId);
yishengService.insert(yisheng);
return R.ok();
}
/**
* 退出
*/
@RequestMapping("/logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Long id = (Long)request.getSession().getAttribute("userId");
YishengEntity user = yishengService.selectById(id);
return R.ok().put("data", user);
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
YishengEntity user = yishengService.selectOne(new EntityWrapper<YishengEntity>().eq("yishenggonghao", username));
if(user==null) {
return R.error("账号不存在");
}
user.setMima("123456");
yishengService.updateById(user);
return R.ok("密码已重置为:123456");
}
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,YishengEntity yisheng,
HttpServletRequest request){
EntityWrapper<YishengEntity> ew = new EntityWrapper<YishengEntity>();
PageUtils page = yishengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yisheng), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,YishengEntity yisheng,
HttpServletRequest request){
EntityWrapper<YishengEntity> ew = new EntityWrapper<YishengEntity>();
PageUtils page = yishengService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yisheng), params), params));
request.setAttribute("data", page);
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YishengEntity yisheng){
EntityWrapper<YishengEntity> ew = new EntityWrapper<YishengEntity>();
ew.allEq(MPUtil.allEQMapPre( yisheng, "yisheng"));
return R.ok().put("data", yishengService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YishengEntity yisheng){
EntityWrapper< YishengEntity> ew = new EntityWrapper< YishengEntity>();
ew.allEq(MPUtil.allEQMapPre( yisheng, "yisheng"));
YishengView yishengView = yishengService.selectView(ew);
return R.ok("查询医生成功").put("data", yishengView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YishengEntity yisheng = yishengService.selectById(id);
return R.ok().put("data", yisheng);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YishengEntity yisheng = yishengService.selectById(id);
return R.ok().put("data", yisheng);
}
/**
* 赞或踩
*/
@RequestMapping("/thumbsup/{id}")
public R vote(@PathVariable("id") String id,String type){
YishengEntity yisheng = yishengService.selectById(id);
if(type.equals("1")) {
yisheng.setThumbsupnum(yisheng.getThumbsupnum()+1);
} else {
yisheng.setCrazilynum(yisheng.getCrazilynum()+1);
}
yishengService.updateById(yisheng);
return R.ok("投票成功");
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YishengEntity yisheng, HttpServletRequest request){
yisheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yisheng);
YishengEntity user = yishengService.selectOne(new EntityWrapper<YishengEntity>().eq("yishenggonghao", yisheng.getYishenggonghao()));
if(user!=null) {
return R.error("用户已存在");
}
yisheng.setId(new Date().getTime());
yishengService.insert(yisheng);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YishengEntity yisheng, HttpServletRequest request){
yisheng.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(yisheng);
YishengEntity user = yishengService.selectOne(new EntityWrapper<YishengEntity>().eq("yishenggonghao", yisheng.getYishenggonghao()));
if(user!=null) {
return R.error("用户已存在");
}
yisheng.setId(new Date().getTime());
yishengService.insert(yisheng);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YishengEntity yisheng, HttpServletRequest request){
//ValidatorUtils.validateEntity(yisheng);
yishengService.updateById(yisheng);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
yishengService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<YishengEntity> wrapper = new EntityWrapper<YishengEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = yishengService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
目录
第一章 绪论 5
1.1 研究背景 5
1.2 系统研究现状 5
1.3 系统实现的功能 6
1.4 系统实现的特点 6
1.5 本文的组织结构 6
第二章开发技术与环境配置 7
2.1 Java语言简介 7
2.2 Vue技术 8
2.3 MySQL环境配置 8
2.4 IDEA环境配置 9
2.5 Mysql数据库介绍 9
2.6 B/S架构 9
第三章系统分析与设计 11
3.1 可行性分析 11
3.1.1 技术可行性 11
3.1.2 操作可行性 11
3.1.3经济可行性 11
3.2 需求分析 12
3.3 总体设计 12
3.4 数据库设计与实现 13
3.4.1 数据库概念结构设计 13
3.4.2 数据库具体设计 14
第四章 系统功能的具体实现 22
4.1 系统功能模块 22
4.2 管理员功能模块 25
第五章 系统测试 29
总结 30
参考文献 31
致谢 32