一、项目简述
功能包括:
用户分为宠物,医生,管理员,宠物主人可进行注册选择医生挂号,选择日期,选择号源,医生可进行宠物接诊,管理员可对宠物,医生信息的维护等等功能。
二、项目运行
环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
JSP +Spring + SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
sectionService.updateByPrimaryKeySelective(section);
return "redirect:/admin/sectionList";
}
/**
* 修改科室下级
*/
@RequestMapping("/sectionBelowUptate")
public String sectionBelowUptate(Section section) {
sectionService.updateByPrimaryKeySelective(section);
return "redirect:/admin/sectionBelowList?id="+section.getPid();
}
/**
* 删除科室下级
*/
@RequestMapping("/sectionBelowDelect")
public String sectionBelowUptate(Integer id) {
Section section = sectionService.selectByPrimaryKey(id);
Integer pid = section.getPid();
sectionService.deleteByPrimaryKey(section.getId());
return "redirect:/admin/sectionBelowList?id="+pid;
}
/**
* 删除科室
Section section = sectionService.selectByPrimaryKey(se.getPid());
model.addAttribute("se",se);
model.addAttribute("sname",section.getName());
}
return "admin/sectionBelowUptate";
}
/**
* 跳转修改科室界面
*/
@RequestMapping("/sectionUptatePage")
public String sectionUptatePage(Model model,Integer id) {
if(id != null) {
Section se = sectionService.selectByPrimaryKey(id);
model.addAttribute("se",se);
}
return "admin/sectionUptate";
}
/**
* 添加科室
*/
@RequestMapping("/sectionAdd")
@ResponseBody
public Map<String,String> sectionAdd(String name) {
List<Doctor> selectByExample = doctorService.selectByExample(se);
if(selectByExample.size() > 0){
map.put("pan","err");
}else{
map.put("pan","ok");
}
return map;
}
/**
* 医生添加
* @param model
* @param zixun
* @return
*/
@RequestMapping("/zixunInsert")
public String zixunInsert(Model model,Doctor doctor){
if(doctor.getId() != null){
*//**
* 管理评论
* @return
*//*
@RequestMapping("/commentList")
public String commentList(Model model,Integer type) {
if(type != null){
Comment comment = new Comment();
comment.setType(type);//商品评论
comment.setReport(1);//1为举报的
List<Comment> commentsList = commentService.selectComment(comment);
model.addAttribute("commentsList",commentsList);
}
return "behind/admin/commentList";
}
*//**
* 评论删除
* @return
type=1;
}
if(type == 3){
model.addAttribute("type",type);
session.invalidate(); //session销毁
return "loginByPatient";
}
model.addAttribute("type",type);
session.invalidate(); //session销毁
return "login";
}
/*
*//**
* 跳转忘记密码界面
*//*
@RequestMapping("/mimaPageUptate")
public String passwordUpate() {
@ResponseBody
public String messagesQundingUptate(Integer id) {
if(id != null) {
Messages messages = new Messages();
messages.setId(id);
messages.setType(3); //3表示预约成功
messagesService.updateByPrimaryKeySelective(messages);
Messages selectByPrimaryKey = messagesService.selectByPrimaryKey(id);
Messages mes = new Messages();
mes.setType(1);
mes.setTime(new Date());
mes.setDid(selectByPrimaryKey.getDid());
List<Messages> list = messagesService.selectMessagesPai(mes);
for (int i = 0; i < list.size(); i++) {
list.get(i).setPai(i+1);
messagesService.updateByPrimaryKeySelective(list.get(i));
}
}
if (!file.getParentFile().exists()) {
file.getParentFile().mkdir();
}
mufile.transferTo(file);
} catch (IllegalStateException | IOException e) {
e.printStackTrace();
}
Doctor doctor = new Doctor();
if(id != -1){
doctor.setId(id);
doctor.setImg("/files/"+filename);
doctorService.updateByPrimaryKeySelective(doctor);
}else {
//添加图片路径
doctor.setImg("/files/"+filename);
for (String[] strings : jieExcel) {
System.out.println(Arrays.toString(strings));
}
return "redirect:/admin/index";
}
/**
* 导出
*
* @param file
* @param response
*/
@RequestMapping("/xiazai")
public void excelString(HttpServletRequest request,HttpServletResponse response) {
try {
response.setCharacterEncoding("utf-8");
//content-type类型是告诉页面要响应内容的类型,以及字符编码,页面要以什么方式打开
}
doctorService.updateByPrimaryKeySelective(doctor);
}
return "redirect:/admin/doctorList";
}
/**
* 删除医生信息
*/
@RequestMapping("/doctorDelect")
public String doctorDelect(Integer id,Model model) {
if(id != null) {
doctorService.deleteByPrimaryKey(id);
List<Section> sectionlist2 = null;
Section se = new Section();
se.setType(1);
List<Section> sectionlist = sectionService.selectByExample(se);
if(sectionlist.size() > 0 ) {
//科室详情
Section section = new Section();
section.setPid(sectionlist.get(0).getId());
section.setType(2);
sectionlist2 = sectionService.selectByExample(section);
}
model.addAttribute("sectionlist", sectionlist);
model.addAttribute("sectionlist2", sectionlist2);
return "doctorRegister";
}
/**
* 管理员注册
*/
@RequestMapping("/admin_Register")
Doctor doctor = doctorService.selectByPrimaryKey(id);
model.addAttribute("doctor",doctor);
}
return "admin/doctorTime";
}
/**
* 坐诊时间设置界面
* @throws ParseException
*/
@RequestMapping("/doctorTimeUpdate")
public String doctorTimeUpdate(Integer id,Model model,String begindate,String enddate,String begintime,String endtime) throws ParseException {
if(id != null) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("HH:mm");
Doctor doctor = new Doctor();