基于javaweb的宠物医院预约挂号系统(java+JSP+Spring+SpringBoot+MyBatis+html+layui+maven+Mysql)
一、项目简述
功能包括:
用户分为宠物,医生,管理员,宠物主人可进行注册选择医生挂号,选择日期,选择号源,医生可进行宠物接诊,管理员可对宠物,医生信息的维护等等功能。
二、项目运行
环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)
项目技术:
JSP +Spring + SpringBoot + MyBatis + html+ css + Javascript + JQuery + Ajax + layui+ maven等等
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
if(doctor.getSid() != null) {
Section section = sectionService.selectByPrimaryKey(doctor.getSid());
doctor.setSid(section.getId());
doctor.setSname(section.getName());
}
doctorService.updateByPrimaryKeySelective(doctor);
}
return "redirect:/doctor/index";
}
return pageInfo2.getList();
}
@RequestMapping(value = "/messagesQundingUptate")
@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 list = messagesService.selectMessagesPai(mes);
for (int i = 0; i < list.size(); i++) {
}else{
map.put("massage","删除失败");
}
}else{
sb.append(split[i]+",");
}
}
}
}
Banners banners = new Banners();
banners.setId(id);
banners.setImg(sb.toString());
System.out.println(mlist.size());
model.addAttribute("mlist",mlist);
return "doctor/messageList";
}
@RequestMapping("/index")
public String index(Model model,HttpServletRequest request) {
filename = random+".jpg";
try {
//文件保存路径 D:/xxxx/xxxx/
File file = new File(filePath+filename);
//判断父级文件是否存在
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);
*/
@RequestMapping("/mimaUpate")
@ResponseBody
public Map passwordUpate(Model model, String zhanghao) {
Map map = new HashMap();
Admin ad = new Admin();
ad.setUsername(zhanghao);
List selectAdmin = adminService.selectAdmin(ad);
if(selectAdmin.size() > 0){
map.put("pan","err");
}else{
map.put("pan","ok");
}
return map;
}
@RequestMapping("/adminUptatePassword")
public String adminUptatePassword(Model model,Admin admin,HttpServletRequest request) {
HttpSession session = request.getSession();
Admin ad = (Admin) session.getAttribute("ADMIN");
if(ad != null && admin.getPassword() != null){
admin.setId(ad.getId());
adminService.updateByPrimaryKeySelective(admin);
}
return "redirect:/admin/index";
}
@RequestMapping("/sectionAdd")
@ResponseBody
public Map sectionAdd(String name) {
Map map = new HashMap();
if(name != null ){
Section section = new Section();
section.setName(name);
section.setType(1);
sectionService.insertSelective(section);
public MapsectionAdd(String name) { Map map = new HashMap (); if(name != null ){ Section section = new Section(); section.setName(name); section.setType(1); sectionService.insertSelective(section); map.put("pan","ok"); }else{ map.put("pan","err"); } return map; } @RequestMapping("/sectionxList") @ResponseBody public List sectionxList(Model model, Integer id) { List selectByExample = null; if(id != null) { Section section = new Section(); section.setPid(id); selectByExample = sectionService.selectByExample(section); } return selectByExample;
patient.setUsername(username); patient.setPassword(password); Listlist = patientService.selectPatient(patient); if(list.size() <= 0) { model.addAttribute("message","密码错误"); model.addAttribute("type",type); return "loginByPatient"; } session.setAttribute("PATIENT",list.get(0)); return "redirect:/api/doctorList1"; } Admin admin = new Admin(); admin.setUsername(username); admin.setPassword(password); List adminlist = adminService.selectAdmin(admin); if(adminlist.size() <= 0){ model.addAttribute("message","密码错误"); model.addAttribute("type",type); return "login"; } session.setAttribute("ADMIN",adminlist.get(0));
@Autowired
private SectionService sectionService;
@Autowired
private PatientService patientService;
@Value("${fileUrl}") //在配置文件中获取文件的保存路径
private String filePath;
/**
* 管理员-非遗讲堂
*/
@RequestMapping("/excelInput")
model.addAttribute("sectionlist", sectionlist);
//科室详情
Section se1 = sectionService.selectByPrimaryKey(doctor.getSid());
if(se1 != null) {
Section section = new Section();
section.setPid(se1.getPid());
section.setType(2);
sectionlist2 = sectionService.selectByExample(section);
model.addAttribute("sectionlist2", sectionlist2);
model.addAttribute("se1", se1);
}
}
return "doctor/doctorUptate";
}
String urlsrls = video.getUrls();
String name = urlsrls.substring(urlsrls.indexOf("s") + 2); //获取文件名
File file = new File(filePath +name);
if(file.exists()){
file.delete();
}
videoService.deleteByPrimaryKey(id);
}
return "redirect:/admin/feiyi_videoList";
}
*//**
* 管理员-人物列表
*//*
@RequestMapping("/personList")
public String personList(Model model,Person person,@RequestParam(value="page",defaultValue="1")Integer page,String sou) {
PageInfo pageInfo = personService.selectPageList(person,page,size);
List list = pageInfo.getList();
List list2 = new ArrayList();
//默认显示第一张图片
for(int i =0; i
model.addAttribute("facount",facount);
//总评论数
int commentcount = commentService.countByExample(null);
//用户数
int usercount = usertService.countByExample(null);
//商品数量
int shopcount = shopService.countByExample(null);
//资讯数量
int zixuncount = zixunService.countByExample(null);
model.addAttribute("commentcount",commentcount);
model.addAttribute("usercount",usercount);
model.addAttribute("shopcount",shopcount);
model.addAttribute("zixuncount",zixuncount);
return "behind/admin/index";
}
*//**
* 资讯列表
* @param model
* @return
*//*
@RequestMapping("/zixunList")



