基于javaweb的宠物医院预约挂号系统

基于javaweb的宠物医院预约挂号系统,第1张

基于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等等







适用

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

    
    @Autowired
    private BannersService  bannersService;   
    
    @Autowired
    private DoctorService doctorService;
    
    @Autowired
    private  PatientService  patientService;
    
    @Autowired
    private   MessagesService  messagesService;
    
    
    private Integer size  = 6;//每页显示数量
    
    @Value("${fileUrl}") //在配置文件中获取文件的保存路径
    private String filePath;
    
    /**
     * 导入
     * @param file
     * @param response
     * @throws IOException 
     */
	    public String  doctorRegister(Model model) {
	    	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")
	   public String admin_Register(Admin admin,Model model) {
      * @return
      */
     @RequestMapping("/tiaomessagelist")
     public String tiaomessagelist(@RequestBody  List<Messages> mlist,Model model) {
    	 System.out.println(mlist.size());
    	 
         model.addAttribute("mlist",mlist);
         return    "doctor/messageList";
     }
     
     
     
     @RequestMapping("/index")
     public String index(Model model,HttpServletRequest request) {
    	  HttpSession session = request.getSession();
          Doctor dt = (Doctor) session.getAttribute("DOCTOR");
          if(dt == null) {
	           type = 1;
	       }
	       model.addAttribute("type",type);
	       return "login";
	   }
	   
		 /**
        * 后台登陆界面
   */
  @RequestMapping("/font/index")
  public String fontIndex(Integer type,Model model) {
      if(type == null){
          type = 3;
      }
      model.addAttribute("type",type);
      return "loginByPatient";
  }
/*	   public static void main(String[] args) {
		    String filename ="C:\Users\Administrator\Pictures\项目图片\1156.jpg_wh1200.jpg";
		    int indexOf = filename.indexOf(".");
		    String substring = filename.substring(indexOf); 
		    System.out.println(substring);
	}*/
        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());
	        		}else {
	        			 sb.append(list.get(i).getName()+",");
		        		 shu.append(list.get(i).getYipeoples()+",");
	        		}
	        	 }
	        	   model.addAttribute("name",sb.toString());
	               model.addAttribute("nu",shu.toString());
    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("/doctorTimePage")
    public String doctorTimePage(Integer id,Model model) {
       if(id !=  null) {
     private AdminService adminService;
     @Autowired
     private DoctorService doctorService;
     
     @Autowired
     private SectionService sectionService;
     
     @Autowired
     private  PatientService  patientService;
     
     
     @Autowired
     private   MessagesService  messagesService;
     
     
     private Integer size  = 8;//每页显示数量
     
     
     
     /**
  	  * 修改信息
      * @param model
      * @return
      */
     @RequestMapping("/tiaomessagelist")
    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());
    	   }
    	   doctorService.updateByPrimaryKeySelective(doctor);
       }
        return  "redirect:/admin/doctorList";
    }
    
    /**
     *  删除医生信息
     */
    @RequestMapping("/doctorDelect")
    public String doctorDelect(Integer id,Model model) {
       if(id !=  null) {
    	
    	   doctorService.deleteByPrimaryKey(id);
       }
        return  "redirect:/admin/doctorList";
    }
    
    
    /**
     *  医生注册界面
          }
         int  doctor  = doctorService.countByExample(null); //医生总数
         int  section = sectionService.count(); //科室总数
         //患者总数
         int patient = 0;
         List<Patient> selectByExample = patientService.selectByExample(null);
         Messages   mess  = new Messages();
         for (Patient pa : selectByExample) {
        	 if(pa.getName() != null) {
        		mess.setDid(dt.getId());
         	 	mess.setUsername(pa.getName());
         	    List<Messages> selectMessages = messagesService.selectMessages(mess);
         	    if(selectMessages.size() > 0 )
         	    {
         	    	patient++;
         	    }
        	 }
		 }
	     //预约总数
	 	 MessagesExample me  = new  MessagesExample();
		 MessagesExample.Criteria mecriteria = me.createCriteria();
		 mecriteria.andDidEqualTo(dt.getId());
         int  messages = messagesService.countByExample(me); 
         model.addAttribute("doctor",doctor);

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/733026.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-27
下一篇 2022-04-27

发表评论

登录后才能评论

评论列表(0条)

保存