大家好,我是java1234_小锋老师,分享一套微信小程序医院预约挂号管理系统(uni-app+SpringBoot后端+Vue管理端) 。
项目简介
设计并且实现一个基于java技术的医院预约挂号管理系统。它是在Windows下,以MYSQL为数据库开发平台,java技术和Tomcat网络信息服务作为应用服务器。医院预约挂号管理系统的功能已基本实现,主要实现首页、个人中心、用户管理、专家管理、科室类型管理、科室信息管理、预约信息管理、取消信息管理、系统管理等功能的操作系统。
论文主要从系统的分析与设计、数据库设计和系统的详细设计等几个方面来进行论述,系统分析与设计部分主要论述了系统的功能分析、系统的设计思路,数据库设计主要论述了数据库的设计,系统的详细设计部分主要论述了几个主要模块的详细设计过程。
源码下载
链接: pan.baidu.com/s/1VO7Cwy8v…
提取码: 1234
相关截图
核心代码
package cn.test.hospital.controller;
import cn.test.hospital.common.api.CommonPage;
import cn.test.hospital.common.api.CommonResult;
import cn.test.hospital.dto.HospitalDoctorDTO;
import cn.test.hospital.dto.param.HospitalDoctorParam;
import cn.test.hospital.service.IHospitalDoctorService;
import cn.test.hospital.service.IHospitalOutpatientService;
import cn.test.hospital.service.IHospitalSpecialService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Optional;
/**
* @author admin
*/
@Api(value = "医院模块", tags = "医生信息接口")
@RestController
@CrossOrigin
@RequestMapping("/hospital")
public class HospitalDoctorController {
private static final int GIRL = 2;
private static final int BOY = 1;
@Resource
private IHospitalOutpatientService outpatientService;
@Resource
private IHospitalSpecialService specialService;
@Resource
private IHospitalDoctorService doctorService;
@ApiOperation(value = "添加医生信息", notes = "传入 医生信息参数(姓名,性别,职称,专长,所属专科,所属门诊)")
@RequestMapping(value = "/doctor", method = RequestMethod.POST)
public CommonResult insertDoctor(@RequestBody HospitalDoctorParam param) {
if (param.getGender() > GIRL || param.getGender() < BOY) {
return CommonResult.validateFailed("性别参数错误!");
}
if (!outpatientService.count(param.getOutpatientId())) {
return CommonResult.validateFailed("不存在,该门诊编号!");
}
if (!specialService.count(param.getSpecialId())) {
return CommonResult.validateFailed("不存在,该专科编号!");
}
if (doctorService.insert(param)) {
return CommonResult.success();
}
return CommonResult.failed("服务器错误,请联系管理员!");
}
@ApiOperation(value = "更新医生信息", notes = "传入 医生编号、医生信息参数(姓名,性别,职称,专长,所属专科,所属门诊)")
@ApiImplicitParam(name = "id", value = "医生编号", paramType = "path", dataType = "Long", required = true)
@RequestMapping(value = "/doctor/{id}", method = RequestMethod.PUT)
public CommonResult updateDoctor(@PathVariable Long id, @RequestBody HospitalDoctorParam param) {
if (!doctorService.count(id)) {
return CommonResult.validateFailed("不存在,该医生编号");
}
if (param.getGender() > GIRL || param.getGender() < BOY) {
return CommonResult.validateFailed("性别参数错误!");
}
if (!outpatientService.count(param.getOutpatientId())) {
return CommonResult.validateFailed("不存在,该门诊编号!");
}
if (!specialService.count(param.getSpecialId())) {
return CommonResult.validateFailed("不存在,该专科编号!");
}
if (doctorService.update(id, param)) {
return CommonResult.success();
}
return CommonResult.failed("服务器错误,请联系管理员!");
}
@ApiOperation(value = "删除医生信息", notes = "传入 医生编号")
@ApiImplicitParam(name = "id", value = "医生编号", paramType = "path", dataType = "Long", required = true)
@RequestMapping(value = "/doctor/{id}", method = RequestMethod.DELETE)
public CommonResult deleteDoctor(@PathVariable Long id) {
if (!doctorService.count(id)) {
return CommonResult.validateFailed("不存在,该医生编号");
}
if (doctorService.delete(id)) {
return CommonResult.success();
}
return CommonResult.failed("服务器错误,请联系管理员!");
}
@ApiOperation(value = "分页:通过姓名,搜索医生信息", notes = "传入 医生姓名")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "医生姓名", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "Integer",
required = true),
@ApiImplicitParam(name = "pageSize", value = "页大小", paramType = "query", dataType = "Integer",
required = true),
})
@RequestMapping(value = "/doctor/list", method = RequestMethod.GET)
public CommonResult<CommonPage<HospitalDoctorDTO>> searchDoctor(@RequestParam(required = false) String name,
@RequestParam Integer pageNum,
@RequestParam Integer pageSize) {
return CommonResult.success(CommonPage.restPage(doctorService.list(name, pageNum, pageSize)));
}
@ApiOperation(value = "分页:通过专科、门诊,查找医生信息", notes = "传入 专科编号、门诊编号")
@ApiImplicitParams({
@ApiImplicitParam(name = "specialId", value = "专科编号", paramType = "query", dataType = "Long"),
@ApiImplicitParam(name = "outpatientId", value = "门诊编号", paramType = "query", dataType = "Long"),
@ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "Integer",
required = true),
@ApiImplicitParam(name = "pageSize", value = "页大小", paramType = "query", dataType = "Integer",
required = true),
})
@RequestMapping(value = "/doctor/list/special/outpatient", method = RequestMethod.GET)
public CommonResult listDoctorBySpecialAndOutpatient(@RequestParam(required = false) Long specialId,
@RequestParam(required = false) Long outpatientId,
@RequestParam Integer pageNum,
@RequestParam Integer pageSize) {
return CommonResult.success(CommonPage.restPage(doctorService.list(null, specialId, outpatientId, pageNum, pageSize)));
}
@ApiOperation(value = "分页:通过姓名、专科、门诊,搜索医生信息", notes = "传入 医生姓名、专科编号、门诊编号")
@ApiImplicitParams({
@ApiImplicitParam(name = "name", value = "医生姓名", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "specialId", value = "专科编号", paramType = "query", dataType = "Long"
, required = true),
@ApiImplicitParam(name = "outpatientId", value = "门诊编号", paramType = "query", dataType = "Long"
, required = true),
@ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "Integer",
required = true),
@ApiImplicitParam(name = "pageSize", value = "页大小", paramType = "query", dataType = "Integer",
required = true),
})
@RequestMapping(value = "/doctor/list/name", method = RequestMethod.GET)
public CommonResult listDoctorBySpecialAndOutpatientAndName(@RequestParam(required = false) String name,
@RequestParam Long specialId,
@RequestParam Long outpatientId,
@RequestParam Integer pageNum,
@RequestParam Integer pageSize) {
return CommonResult.success(CommonPage.restPage(doctorService.list(name, specialId, outpatientId, pageNum, pageSize)));
}
@ApiOperation(value = "获取医生信息", notes = "传入 医生编号")
@ApiImplicitParam(name = "id", value = "医生编号", paramType = "path", dataType = "Long", required = true)
@RequestMapping(value = "/doctor/{id}", method = RequestMethod.GET)
public CommonResult<HospitalDoctorDTO> getDoctor(@PathVariable Long id) {
if (!doctorService.count(id)) {
return CommonResult.validateFailed("不存在,该医生编号");
}
Optional<HospitalDoctorDTO> doctorOptional = doctorService.getConvert(id);
return doctorOptional.map(CommonResult::success)
.orElseGet(() -> CommonResult.failed("服务器错误,请联系管理员!"));
}
}