基于javaweb+mysql的体检管理系统(java+SpringBoot+JSP+layui+html+mysql)

项目介绍:

登录、注册、用户管理、角色管理、体检人管理、体检健康史、体检人档案、体检中心管理

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
6.是否Maven项目:是;

技术栈

JSP +SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
  2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
    若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
  3. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置;
  4. 运行项目

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

	    
	    /** 
	    * @throws ParseException 
		 */
	    @RequestMapping(value = "/doctortouList")
	    @ResponseBody
	    public  List<Doctor>  doctortouList() {
	      	PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(null,1,4);
	
		    return   pageInfo.getList();
	    }
	    
	    
	    /** 
	    * @throws ParseException 
		 */
	    @RequestMapping(value = "/datatimeGua")
 	    /**
		   *时间格式转换
		 */
	    @RequestMapping(value = "/doctorYuyueTime")
	    @ResponseBody
	    public  Map<String,String>  doctorYuyueTime(Integer id) {
            Map<String,String> map =  new HashMap<String,String>();
	    	SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); 
	 	    Doctor doctor = doctorService.selectByPrimaryKey(id);
	 	    map.put("begin",sdf.format(doctor.getBegintime()));
		    map.put("end",sdf.format(doctor.getEndtime()));  
	        return  map;
	    }
	    
	    /**
			   *时间格式转换
	     * @throws ParseException 
			 */
		    @RequestMapping(value = "/timeZhuan")
		    @ResponseBody
		    public  String  timeZhuan(String time) throws ParseException {
            Map<String,List<Section>> map =  new HashMap<String,List<Section>>();
	    	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);
	        }
		    map.put("sectionlist",sectionlist);
		    map.put("sectionlist2",sectionlist2);  
    private AdminService adminService;
  
    @Autowired
    private SectionService sectionService;
    
    @Autowired
    private BannersService  bannersService;   
    
    @Autowired
    private DoctorService doctorService;
    
    @Autowired
    private   PatientService  patientService;
    
    @Autowired
    private   MessagesService  messagesService;
    
    /**
     * 医生列表
     */
    @RequestMapping("/doctorList1")
    public String doctorList(Model model, Doctor doctor, @RequestParam(value="page",defaultValue="1")Integer page) {
    	if(doctor == null) {
    		doctor = new Doctor();
    	}
    	PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(doctor,page,size);
			/*
			 * PageInfo<Patient> pageInfo =
			 * patientService.selectPatientList(patient,1,size); List<Patient> list =
			 * pageInfo.getList(); List<Patient> list2 = new ArrayList<Patient>(); Messages
			 * messages = new Messages(); boolean pan = false; SimpleDateFormat sdf = new
			 * SimpleDateFormat("yyyy-MM-dd"); for (Patient pa : list) { if(pa.getPid() !=
			 * null && pa.getPid() != 0){ messages.setDid(dt.getId());
			 * messages.setUid(pa.getPid()); messages.setUsername(pa.getName());
			 * List<Messages> ml = messagesService.selectMessages(messages); if(ml.size() >
			 * 0 ){ Date time = ml.get(0).getTime(); pa.setUsername(sdf.format(time));
			 * pa.setPhone(dt.getName()); pa.setIdentitys(dt.getSname()); list2.add(pa); }
			 * 
			 * } } if(list2.size() <= 8) { pageInfo.setPages(1); }
			 */
         Messages messages = new Messages();
//         messages.setTime(new Date());
         messages.setType(1);
         messages.setUid(patient1.getPid());   
         PageInfo<Messages> pageInfo = messagesService.selectMessagesList(messages, 1, size);
         model.addAttribute("doctorList",pageInfo.getList());
         model.addAttribute("pageInfo",pageInfo);
         model.addAttribute("patient",patient);
         return    "patient/patientList";
     }
	           //判断父级文件是否存在
	           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);
	    	   doctor.setImg("/files/"+filename);
	       	doctorService.updateByPrimaryKeySelective(doctor);
	       }else {
	           //添加图片路径
	       	doctor.setImg("/files/"+filename);
	       	doctorService.insertSelective(doctor);
	    	   }
	           doctorService.updateByPrimaryKeySelective(doctor);
	       }
	        model.addAttribute("type",1);
	        return "login";
	   }
		    
		
	    /**
	        *  管理员注册界面
	     */
	    @RequestMapping("/mimaPageUptate")
	    public String  mimaPageUptate(Integer type,Model model) {
	    	//1医生  2 管理员
	    	if(type == 1 ) {
	    		  return "doctorRegister";
	    	}
	  	  return "adminRegister";
	    public Map<String,String> passwordUpate(Model model, String zhanghao) {
	            Map<String, String> map =  new HashMap<String, String>();
	            Admin ad = new Admin();
	            ad.setUsername(zhanghao);
	            List<Admin> selectAdmin = adminService.selectAdmin(ad);
	            if(selectAdmin.size() > 0){
	                map.put("pan","err");
	            }else{
	                map.put("pan","ok");
	            }
	           return    map;
	    }
	    /**
	     * 判断医生账号
	     */
	    @RequestMapping("/panzhanghao")
	    @ResponseBody
             if(merchants.size() <= 0){
                 model.addAttribute("message","密码错误");
                 model.addAttribute("type",type);
                 return "behind/login";
             }
             session.setAttribute("MERCHANT",merchants.get(0));
             return "redirect:/merchant/index";
         }
        Admin admin = new Admin();
        admin.setUsername(username);
        admin.setPassword(password);
        List<Admin> adminlist  = adminService.selectAdmin(admin);
        if(adminlist.size() <= 0){
            model.addAttribute("message","密码错误");
            model.addAttribute("type",type);
            return "behind/login";
        }
        session.setAttribute("ADMIN",adminlist.get(0));
        return "redirect:/admin/index";
	    @RequestMapping("/sessionInvalidate")
	    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(value = "/doctorLike")
  	    @ResponseBody
  	    public  List<Doctor>  doctorLike(String name) {
  	       Doctor doctor = new Doctor();
  	       doctor.setName(name);
  	       
  	       List<Doctor> selectDoctor = doctorService.selectDoctor(doctor);
  	       return selectDoctor;
  	    }  
    
	    
	    /**
		 *科室查询
		 */
	    @RequestMapping(value = "/doctorIdList")
	    @ResponseBody
	    public  Section  doctorIdList(Integer sid) {
	       Section selectByPrimaryKey = sectionService.selectByPrimaryKey(sid);
	       
	       return selectByPrimaryKey;
	    }  
	    

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2.2 功能分析 (1)模型概述 本次设计的系统,有三个用户角色,每个角色都是独立的操作。所以这次设计针对每个用户的操作界面即每个用户独立操作的表示层。在系统文件中,…/hospital/admin;…/hospital/patient;…/hospital/doctor三个文件夹中分别放了每个用户独立操作的JSP页面。比如管理员文件中的addDoctor.jsp就是来实现添加医生信息的JSP文件。 (2)功能模型 根据对医院门诊流程的分析及客户的要求,整个系统需要实现以下功能。 软件的整体功能,系统要操作简单,要有友好的界面,系统的操作者的权限层次要有明确的分类,进入软件时要进行身份验证。而且出于对患者个人隐私的负责,患者病历记录只能在患者就医期间由主治医生调阅,其他任何人包括管理员无权查阅。这样使的系统更具有人性化,因为系统中三个角色之间没有联系,所以设置三个独立操作的角色对象。 1)患者角色能进行的对象操作 ①可以联机注册成为用户,设定自己的登录名及密码。 ②可按医生姓名自定义查询。 ③可基于查询结果进行预约,若指定医生当日预约量已满,则预约失败。预约结果随机返回给患者。 ④可对已经进行预约的情况查看或撤消。 ⑤预约成功后可查询主治医生信息,病例信息。 2)医生角色 ①可查看预约患者的情况。 ②可查询患者病例。 ③可创建患者病历。 ④可对患者的病例进行修改。 3)管理员角色 有固定的帐号,直接在数据库添加,不能注册成管理员,可以添加和删除医生帐号,对医生用户进行管理。但不能管理患者用户,保证患者的隐私。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值