基于javaweb+mysql的宠物医院预约挂号系统(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等等请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

	       return map;
	   }
	   
	  
	   /**
	     * 判断管理员账号
	     */
	    @RequestMapping("/sectionxList")
	    @ResponseBody
	    public List<Section> sectionxList(Model model, Integer id) {
	    	  List<Section> selectByExample = null;
		      if(id != null) {
		    		  Section section = new Section();
			    	  section.setPid(id);
			    	  selectByExample = sectionService.selectByExample(section);
	    	   }
	    	   return    selectByExample;
	    }   
	   
	    /**
	     * 判断管理员账号
	     */
	    @RequestMapping("/mimaUpate")
	    @ResponseBody
	    public Map<String,String> passwordUpate(Model model, String zhanghao) {
	            Map<String, String> map =  new HashMap<String, String>();
	            Admin ad = new Admin();
		    String filename ="C:\\Users\\Administrator\\Pictures\\项目图片\\1156.jpg_wh1200.jpg";
		    int indexOf = filename.indexOf(".");
		    String substring = filename.substring(indexOf); 
		    System.out.println(substring);
	}*/
	   /**
	    * 医生图片上传
	    * @param mufile
	    * @param id
	    * @return
	    * @throws IOException
	    */
	   @RequestMapping(value ="/zixunAdd")
	        //图片上传并保存上传的路径
	        for (int i = 0; i < mufile.length; i++) {
	            try {
	                String random   =  StringRandom.getRandom();
	                String filename =  mufile[i].getOriginalFilename();
	                //随机字符+原图片名用作新的图片名
	                filename = random+filename;
	                //文件保存路径  D:/Java/hospital  
	                File file = new File(filePath+filename);
	                //判断父级文件是否存在
	                if (!file.getParentFile().exists()) {
	                    file.getParentFile().mkdir();
	                }
	                path.append("/files/"+filename+",");
	                mufile[i].transferTo(file);
	            } catch (IllegalStateException | IOException e) {
	                e.printStackTrace();
	            }
	        }
	        Banners banners = new  Banners();
	        if(id != null){
	            //修改图片路径
	            Banners  sh  = bannersService.selectByPrimaryKey(id);
	            banners.setId(id);
	            if(sh.getImg() != null ){
	                banners.setImg(sh.getImg()+path.toString());
	            }else{
    /**
     *  删除医生信息
     */
    @RequestMapping("/doctorDelect")
    public String doctorDelect(Integer id,Model model) {
       if(id !=  null) {
    	
    	   doctorService.deleteByPrimaryKey(id);
       }
        return  "redirect:/admin/doctorList";
    }
    
    
    /**
     *  医生注册界面
    */
   @RequestMapping("/doctorAddPage")
   public String  doctorAddPage(Model model) {
    	   doctor.setId(id);
    	   doctor.setBegindate(simpleDateFormat.parse(begindate)); 
    	   doctor.setEnddate(simpleDateFormat.parse(enddate));
           doctor.setBegintime(simpleDateFormat2.parse(begintime));
    	   doctor.setEndtime(simpleDateFormat2.parse(endtime));    
    	   doctorService.updateByPrimaryKeySelective(doctor);
       }
        return "redirect:/admin/doctorList";
    } 
    
    	
    
    /**
     *  修改医生信息
     */
    @RequestMapping("/admindoctorUptate")
    public String adminUptatePassword(Doctor doctor,Model model) {
       if(doctor !=  null && doctor.getId() != null) {
    	   if(doctor.getSid() != null) {
    		   Section section = sectionService.selectByPrimaryKey(doctor.getSid());
    		   doctor.setSid(section.getId());
    		   doctor.setSname(section.getName());
 			    model.addAttribute("sectionlist2", sectionlist2);
 			    model.addAttribute("se1", se1);
 		    } 
         }
         return  "doctor/doctorUptate";
     }
     
     
     
     /**
      *  修改医生信息
      */
     @RequestMapping("/messageTime")
     public String messageTime(String name,Model model,HttpServletRequest request) {
	   	HttpSession session = request.getSession();
        Doctor dt = (Doctor) session.getAttribute("DOCTOR");
        if(name !=  null) {
        	Messages  mess  = new Messages();
        	mess.setDid(dt.getId());
        int  section = sectionService.countByExample(null); //科室总数
        int  patient = patientService.countByExample(null); //患者总数
        int  messages = messagesService.countByExample(null); //预约总数
        model.addAttribute("doctor",doctor);
        model.addAttribute("section",section);
        model.addAttribute("patient",patient);
        model.addAttribute("messages",messages);
        PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(null,1,4);
         if(pageInfo.getList() != null && pageInfo.getList().size() >0 ) {
       	    List<Doctor> list = pageInfo.getList();
       	    StringBuffer sb = new StringBuffer();
       	    StringBuffer shu = new StringBuffer();
       	         int v = list.size()-1;
	        	 for(int i=0;i<list.size();i++) {
	        		if(v==i) {
	        			 sb.append(list.get(i).getName());
		        		 shu.append(list.get(i).getYipeoples());
    @Autowired
    private AdminService adminService;
  
    @Autowired
    private SectionService sectionService;
    
    @Autowired
    private BannersService  bannersService;   
    
    @Autowired
    private DoctorService doctorService;
    
    @Autowired
	    public String boot(HttpServletRequest request,Model model) {
	        HttpSession session = request.getSession();
	        Integer type = (Integer) session.getAttribute("type");
	        if(type == null){
	            type=1;
	        }
	        
	        if(type == 3){
	        	model.addAttribute("type",type);
		        session.invalidate();   //session销毁
	        	 return "loginByPatient";
	        }
	        
	        model.addAttribute("type",type);
	        session.invalidate();   //session销毁
	        return "login";
	    }
	   
		    
      */
     @RequestMapping("/doctorUptatePage")
     public String doctorUptatePage(Model model,HttpServletRequest request) {
         HttpSession session = request.getSession();
         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);
 		    } 
         }
         return  "doctor/doctorUptate";

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值