基于javaweb+mysql的医院预约挂号系统(java+Springboot+jsp+maven+layui+mysql)

一、项目简述

功能包括:
用户分为患者,医生,管理员,患者可进行注册选择医生挂号,选择日期,选择号源,医生可进行接诊,管理员可对用户,医生信息的维护等等功能。
二、项目运行

环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

项目技术:

JSP +Spring + SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
         if(dt != null) {
        	 Doctor  doctor = doctorService.selectByPrimaryKey(dt.getId());
 			List<Section> sectionlist2  = null;
 			model.addAttribute("doctor",doctor);
 			//科室
 	    	Section  se = new  Section();
 	    	se.setType(1);
 		    List<Section> sectionlist = sectionService.selectByExample(se);
 		    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);
 		    } 
         }
	     	//工作区数据
	     	messages.setTime(new Date());
	    	List<Messages> list = messagesService.selectMessagesPai(messages);
	    	 model.addAttribute("mlist",list);
	    	 model.addAttribute("messagesList",pageInfo.getList());
	         model.addAttribute("pageInfo",pageInfo);
	         model.addAttribute("messages",messages);
	         model.addAttribute("type",type);
	         return    "doctor/messageList";
	     }
	     
	     
	     /**
			 *医生列表查询
			 */
    public String  passwordUpate() {
        return "behind/merchant/mibaoUptate";
    }
    *//**
     * 修改密码
     *//*
    @RequestMapping("/mimaUpate")
    @ResponseBody
    public Map<String,String> passwordUpate(Model model, String  mima, String  mibao, String zhanghao) {
            Map<String, String> map =  new HashMap<String, String>();
            Merchant me = new Merchant();
            me.setZhanghao(zhanghao);
            me.setMibao(mibao);
            List<Merchant> list = merchantService.selectMerchant(me);
            if(list.size() > 0){
                Merchant me2 = new Merchant();
                me2.setId(list.get(0).getId());
	  	        	patient.setUserid(pa.getId());
	  	        	patient.setPhone(pa.getPhone()); 
	  	        	patient.setUsername(pa.getUsername());
	  	        	patient.setAge(pa.getAge());
	  	        	int countByExample = messagesService.countByExample(null);
	  	        	patient.setBianhao(countByExample+1);
	  	        	//排序
	  	        	Messages message = new Messages();
//	  	        	message.setUid(patient.getUid());
	  		    	message.setTime(patient.getTime());
	  		    	message.setDid(patient.getDid());
	  		    	message.setType(-1);
	  		    	List<Messages>  list  = messagesService.selectMessages(message);
	  		    	if(list.size() <= 0) {
	  		    		patient.setPai(1);
	  		    	}else {
	  		    		patient.setPai(list.size()+1);
	  		    	}
	        	 messages.setDid(dt.getId());
	         }else{
	        	  return  "redirect:/login/index";
	         }
	     	
	     	messages.setType(type);
	     	//底层数据
	     	PageInfo<Messages> pageInfo = messagesService.selectMessagesList(messages,page,size);
	     	//工作区数据
	     	messages.setTime(new Date());
	    	List<Messages> list = messagesService.selectMessagesPai(messages);
	    	 model.addAttribute("mlist",list);
	    	 model.addAttribute("messagesList",pageInfo.getList());
	         model.addAttribute("pageInfo",pageInfo);
	         model.addAttribute("messages",messages);
		    	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")
	   public String admin_Register(Admin admin,Model model) {
	     * @throws ParseException 
		 */
	    @RequestMapping(value = "/messagesSave")
	    public  String  messagesSave(Messages patient,HttpServletRequest request) throws ParseException {
	    	 HttpSession session =  request.getSession();
	         Patient       patient1   =  (Patient) session.getAttribute("PATIENT");
	    	    Messages  hui = null;
	    	    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
	    	    Date shijian = simpleDateFormat.parse(patient.getSname());
	  	        patient.setTime(shijian);
	  	        patient.setType(1);//待预约
	  	       
	  	        Doctor doctor = doctorService.selectByPrimaryKey(patient.getDid());//医生
		   *预约信息列表
	     * @throws ParseException 
		 */
	    @RequestMapping(value = "/tiaozhuanList")
	    @ResponseBody
	    public  String  messagesList(@RequestParam("xiao")Integer xiao,@RequestParam("da")Integer da)  {
	    	Messages message = new Messages();
	    	if(xiao != null & da != null) {
	    		Messages mexiao = messagesService.selectByPrimaryKey(xiao);
	    		Integer px = mexiao.getPai();
	    		Messages meda = messagesService.selectByPrimaryKey(da);
	    		mexiao.setPai(meda.getPai());
	    		meda.setPai(px);
	    		messagesService.updateByPrimaryKeySelective(mexiao);
	    		messagesService.updateByPrimaryKeySelective(meda);
	    	  }
		      return  null;
	    }
  
	     /**
	      *  确定预约
	      */
	     @RequestMapping("/messagesUptate")
	     public String messagesUptate(Integer id) {
	        if(id != null) {
	        	Messages messages = new Messages();
	            type = 1;
	        }
	        model.addAttribute("type",type);
	        return "login";
	    }
	    
	 /**
	         * 后台登陆界面
	    */
	   @RequestMapping("/index")
	   public String index(Integer type,Model model) {
	       if(type == null){
	           type = 1;
	       }
	    	   Doctor doctor = doctorService.selectByPrimaryKey(id);
	    	   model.addAttribute("doctor",doctor);
	       }
	        return  "patient/doctorTime";
	    }
	    /**
		 *医生列表查询
		 */
	    @RequestMapping(value = "/doctorList")
	    @ResponseBody
	    public  List<Doctor>  doctorList(Integer sid) {
	       Doctor doctor = new Doctor();
	       doctor.setSid(sid);
	       List<Doctor> selectDoctor = doctorService.selectDoctor(doctor);
	       return selectDoctor;
	    }  
	    
    
      /**
        model.addAttribute("pageInfo",pageInfo);
        model.addAttribute("doctor",doctor);
        return    "patient/doctorList";
    }
       /**
  		 *登录
        * @throws ParseException 
  		 */
  	    @RequestMapping(value = "/userLogin")
  	    @ResponseBody
  	    public  Patient  userLogin(@RequestBody Patient patient) throws ParseException {
  	    	List<Patient>  list = patientService.selectPatient(patient);
  	    	if(patient != null && patient.getUsername() != null && patient.getPassword() != null) {
	  	    	if(list.size() > 0) {
	  	    	    return  list.get(0);
	  	    	}
  	    	}
  	      return  patient;
  	    } 
       /**
	 	 *登录
        * @throws ParseException 
		 */
	    @RequestMapping(value = "/passwordSave")
	    @ResponseBody

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值