【无标题】基于javaweb+springboot的医院预约挂号系统(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等等请添加图片描述
请添加图片描述
请添加图片描述

适用

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

     * @return
     *//*
    @RequestMapping("/merchantUptate")
    public String merchantUptate(Model model) {
        return "behind/merchant/merchantUptate";
    }
*/
}
后端管理员控制层:
/**
 * 后端管理员控制层
 */
@Controller
@RequestMapping("/api")
public class PatientController {
public class LoginController {
	
     @Autowired
     private AdminService adminService;
     @Autowired
     private DoctorService doctorService;
     
     @Autowired
     private SectionService sectionService;
     
     
     @Autowired
     private   PatientService  patientService;
     
     
     @Value("${fileUrl}") //在配置文件中获取文件的保存路径
     private String filePath;
     
     
		/**
	          * 后台登陆界面
	    }
	    
	    /**
		   *患者信息查看
		 */
	    @RequestMapping(value = "/patientUpatePage")
	    @ResponseBody
	    public  Patient  patientUpatePage(Integer id) {
	    	 Patient patient = null;
	         if(id != null) {
	         patient = patientService.selectByPrimaryKey(id);
	        	 
	         }
	        return  patient;
	    }
	    
	    
	    /**
		   *患者信息修改
		 */
	    @RequestMapping(value = "/patientUpdate")
	    @ResponseBody
	    public  Patient  patientUpdate(@RequestBody Patient patient) {
	    	patientService.updateByPrimaryKeySelective(patient);
	        return  null;
	    }
	    	}
	        return -1;
	    }
	    
	    
	    
	    /**
		 *查询科室
		 */
	    @RequestMapping(value = "/sectioNameList")
	    @ResponseBody
	    public  List<Section>  sectioNameList(String name) {
	    	Section  se = new  Section();
	    	se.setName(name);
	    	se.setType(2);
		    List<Section> sectionlist = sectionService.selectByExample(se);
		    if(sectionlist.size() > 0) {
		    	//查询全部科室
		    	se.setName(null);
		    	se.setPid(sectionlist.get(0).getPid());
		    	se.setType(2);
		    	sectionlist = sectionService.selectByExample(se);
		    }
	        return sectionlist;
	    }
	    /**
	     *  坐诊时间yuyue
		    public  String  timeZhuan(String time) throws ParseException {
		    	
		    	  Date parse = new Date();
		    	  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 
		    	  if(time != null) {
		    		  parse = sdf.parse(time);
		    	  }
		     	 
		          return   sdf.format(parse);
		    }
		    
	    
	    
	     
	    /**
		   *添加患者信息
		 */
	     	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);
	         model.addAttribute("type",type);
	         return    "doctor/messageList";
	     }
	     
	     
	     /**
			 *医生列表查询
			 */
	        HttpSession session = request.getSession();
	        session.setAttribute("type",type);
	        //类型为1是医院 2是管理员
	         if(type == 1){
	        	 Doctor doctor = new  Doctor();
	        	 doctor.setUsername(username);
	        	 doctor.setPasswoed(password);
	        	 List<Doctor> doctorlist = doctorService.selectDoctor(doctor);
	             if(doctorlist.size() <= 0){
	                 model.addAttribute("message","密码错误");
	                 model.addAttribute("type",type);
	                 return "login";
	             }
	             session.setAttribute("DOCTOR",doctorlist.get(0));
	             return "redirect:/doctor/index";
	         }
	         if(type == 3){
	        	 Patient patient = new  Patient();
	        	 patient.setUsername(username);
	        	 patient.setPassword(password);
	        	 List<Patient>  list = patientService.selectPatient(patient);
         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);
         model.addAttribute("section",section);
         model.addAttribute("patient",patient);
         model.addAttribute("messages",messages);
         PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(null,1,4);
	    @RequestMapping(value = "/doctorIdList")
	    @ResponseBody
	    public  Section  doctorIdList(Integer sid) {
	       Section selectByPrimaryKey = sectionService.selectByPrimaryKey(sid);
	       
	       return selectByPrimaryKey;
	    }  
	    
	    
    
       /**
  		 *医生列表查询
     * @throws ParseException 
  		 */
  	    @RequestMapping(value = "/doctortimeSelect")
  	    @ResponseBody
	         messages.setType(1);
	         messages.setDid(dt.getId());    
	         PageInfo<Messages> pageInfo = messagesService.selectMessagesList(messages, 1, size);
	         model.addAttribute("doctorList",pageInfo.getList());
	         model.addAttribute("pageInfo",pageInfo);
	         model.addAttribute("patient",patient);
	         return    "doctor/patientList";
	     }
	     
	    /**
		   *预约信息列表
	     * @throws ParseException 
		 */
	    @ResponseBody
	    public Map<String,String> panzhanghao(Model model, String zhanghao) {
	    	 Map<String, String> map =  new HashMap<String, String>();
			  PatientExample se  = new  PatientExample();
			  PatientExample.Criteria criteria = se.createCriteria();
			  criteria.andUsernameEqualTo(zhanghao);
           List<Patient> selectByExample = patientService.selectByExample(se);
           if(selectByExample.size() > 0){
               map.put("pan","err");
           }else{
               map.put("pan","ok");
           }
          return    map;
	    }
	    /**
	     *  患者注册界面
	    */
	   @RequestMapping("/patientAddPage")
	   public String  patientAddPage(Model model) {
		 	  return    "patientRegister";
	   }
	   
	    /**
		   *患者信息列表
		 */
	    @RequestMapping(value = "/patientList")

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值