基于javaweb+jsp的宠物医院商城系统(java+Springboot+Jsp+maven+Mysql)

基于javaweb+jsp的宠物医院商城系统(java+Springboot+Jsp+maven+Mysql)
项目运行

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

项目技术:
Springboot+ SpringMVC + MyBatis + Jsp + Html+ JavaScript + JQuery + Ajax + maven等等

宠物医院与商城一体的系统请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

     @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")
	     * @throws ParseException 
		 */
	    @RequestMapping(value = "/messagesList")
	    @ResponseBody
	    public  List<Messages>  messagesList(@RequestParam("type")Integer type,@RequestParam("uid")Integer uid) throws ParseException {
	    	Messages message = new Messages();
	    	List<Messages>  list = null;
	    	message.setType(type);
	    	message.setUid(uid);
	    	if(type != null && type == 1) {
	    		  message.setTime(new Date());
	    		  list  = messagesService.selectMessagesPai(message);  
    	}
    	PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(doctor,page,size);
    	
    	List<Doctor> list = pageInfo.getList();
        model.addAttribute("doctorList",pageInfo.getList());
        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;
  	       List<Doctor> selectDoctor = doctorService.selectDoctor(doctor);
  	       return selectDoctor;
  	    }  
    
	    
	    /**
		 *科室查询
		 */
	    @RequestMapping(value = "/doctorIdList")
	    @ResponseBody
	    public  Section  doctorIdList(Integer sid) {
	     /**
			 *医生列表查询
			 */
		    @RequestMapping(value = "/messageAjax")
		    @ResponseBody
		    public  List<Messages>  doctorList(HttpServletRequest request) {
		    	 Messages		messages = new Messages();
		         HttpSession session = request.getSession();
		         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
		         messages.setDid(dt.getId());
		       
		     	messages.setType(1);
		     	messages.setTime(new Date());
		    	PageInfo<Messages> pageInfo2 = messagesService.selectMessagesListDemo(messages,1,99);
		       
		       return pageInfo2.getList();
		    }  
		    
     }
     
     
	     /**
	      *  修改医生信息
	      */
	     @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());
	     	   }
	     	   doctorService.updateByPrimaryKeySelective(doctor);
     @Autowired
     private DoctorService doctorService;
     
     @Autowired
     private SectionService sectionService;
     
     @Autowired
     private  PatientService  patientService;
     
     
     @Autowired
     private   MessagesService  messagesService;
     
     
     private Integer size  = 8;//每页显示数量
     
     
     
				    		list.get(i).setPai(i+1);
				    		messagesService.updateByPrimaryKeySelective(list.get(i));
						}
			        }
		       
		       return "ok";
		    }  
 
	     
	     
	     /**
	         *患者信息列表
	      */
	     @RequestMapping("/patientList")
	     public String messageList(Model model, Patient patient, @RequestParam(value="page",defaultValue="1")Integer page,HttpServletRequest request) {
	     	if(patient == null) {
	     		patient = new Patient();
	     	}
	        HttpSession session = request.getSession();
	         Doctor dt = (Doctor) session.getAttribute("DOCTOR");
	         if(dt == null){
	        	  return  "redirect:/login/index";
	         }
	        }
	        model.addAttribute("type",type);
	        return "login";
	    }
	    
	 /**
	         * 后台登陆界面
	    */
	   @RequestMapping("/index")
	   public String index(Integer type,Model model) {
	       if(type == null){
	           type = 1;
	       }
	       model.addAttribute("type",type);
	       return "login";
	   }
	   
		 /**
        * 后台登陆界面
   */
  @RequestMapping("/font/index")
  public String fontIndex(Integer type,Model model) {
      if(type == null){
          type = 3;
	    
    
       /**
  		 *医生列表查询
     * @throws ParseException 
  		 */
  	    @RequestMapping(value = "/doctortimeSelect")
  	    @ResponseBody
  	    public  List<Doctor>  doctortimeSelect(@RequestParam("datetimei")String datetimei,@RequestParam("id")Integer id) throws ParseException {
  	       Doctor doctor = new Doctor();
  	       SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
  	       doctor.setSid(id);
  	       doctor.setBegindate(simpleDateFormat.parse(datetimei));
  	       List<Doctor> selectDoctor = doctorService.selectTime(doctor);
  	       return selectDoctor;
  	    }  
  	  
       /**
	    } 
	  
    
    
  	    
       /**
   		 *登录验证
         * @throws ParseException 
   		 */
   	    @RequestMapping(value = "/userLoginView")
   	    @ResponseBody
   	    public  String  userLoginView(HttpServletRequest request) throws ParseException {
   	    	   HttpSession session = request.getSession();
   	    	   Patient  patient =(Patient) session.getAttribute("USER");
   	    	   System.out.println("*********登陆验证********");
		         System.out.println(patient);   
   	            if(patient != null) {
   	             return  "ok";
   	            }
   		        
   	         return  "err";
	        	 return "redirect:/api/doctorList1";
	         }
	         
	         
	        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 "login";
	        }
	        session.setAttribute("ADMIN",adminlist.get(0));
	        return "redirect:/admin/index";
	    }
	   
	    /**
	     * 退出登录
	     * @param request
	     * @return
	     */
	    @RequestMapping("/sessionInvalidate")
		   *科室查询
		 */
	    @RequestMapping(value = "/sectionList")
	    @ResponseBody
	    public  Map<String,List<Section>>  sectionList() {
            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 ) {
	     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:/doctor/index";
	     }
	     
	     
	     /**
	      * 预约信息列表
	      */
	    
	    /** 
	    * @throws ParseException 
		 */
	    @RequestMapping(value = "/datatimeGua")
	    @ResponseBody
	    public  Integer  datatimeGua(@RequestParam("datetime")String datetime,@RequestParam("did")Integer did) throws ParseException {
    	    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    	    Date parse = sdf.parse(datetime);
        	Messages message = new Messages();
	    	message.setTime(parse);
	    	message.setDid(did);
	    	message.setType(-1);
  	    }  
  	  
       /**
 		 *医生列表查询
         * @throws ParseException 
 	     */
 	    @RequestMapping(value = "/doctorGeRenList")
 	    @ResponseBody
 	    public  Doctor  doctorGeRenList(Integer id) throws ParseException {
 	       Doctor doctor = doctorService.selectByPrimaryKey(id);
 	       return doctor;
 	    }  
  	    
 	    /**
		   *时间格式转换
		 */
	    @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()));  
		    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) {
		   int insertSelective = adminService.insertSelective(admin);
	  	        	doctor.setYipeoples(doctor.getYipeoples()+1);
	  	        	doctorService.updateByPrimaryKeySelective(doctor);
	  	        	
	  	        }
	  	        Section section = sectionService.selectByPrimaryKey(patient.getSid());//科室
	  	        if(section != null) {
	  	        	patient.setSname(section.getName());
	  	        }
	  	        
	  	        Patient pa = patientService.selectByPrimaryKey(patient1.getId()); //患者
	  	        if(pa != null) {
    		doctor = new Doctor();
    	}
    	PageInfo<Doctor> pageInfo  =  doctorService.selectDoctorList(doctor,page,size);
    	
    	List<Doctor> list = pageInfo.getList();
        model.addAttribute("doctorList",pageInfo.getList());
        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) {
	    @RequestMapping(value = "/sectionList")
	    @ResponseBody
	    public  Map<String,List<Section>>  sectionList() {
            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);  
	        return map;
	    }
    
	    
				 * 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.setDid(dt.getId());    
	         PageInfo<Messages> pageInfo = messagesService.selectMessagesList(messages, 1, size);
	         model.addAttribute("doctorList",pageInfo.getList());
		    String substring = filename.substring(indexOf); 
		    System.out.println(substring);
	}*/
	   /**
	    * 医生图片上传
	    * @param mufile
	    * @param id
	    * @return
	    * @throws IOException
	    */
	   @RequestMapping(value ="/zixunAdd")
	   @ResponseBody
	   public  Map<String, Object>  zixunAdd(@RequestParam("mf")MultipartFile mufile,@RequestParam("id")Integer  id) throws IOException{
	       Map<String, Object> map =  new HashMap<String, Object>();
	       String random   =  StringRandom.getRandom();
	       String filename =  mufile.getOriginalFilename();
	       //随机字符+原图片名用作新的图片名
	       filename = random+".jpg";
	       try {
	           //文件保存路径  D:/xxxx/xxxx/
	           File file = new File(filePath+filename);
	        	 
	         }
	        return  patient;
	    }
	    
	    
	    /**
		   *患者信息修改
		 */
	    @RequestMapping(value = "/patientUpdate")
	    @ResponseBody
	    public  Patient  patientUpdate(@RequestBody Patient patient) {
	    	patientService.updateByPrimaryKeySelective(patient);
	        return  null;
 */
@Controller
@RequestMapping("/login")
public class LoginController {
	
     @Autowired
     private AdminService adminService;
     @Autowired
     private DoctorService doctorService;
     
     @Autowired
     private SectionService sectionService;
     
			    	  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();
	            ad.setUsername(zhanghao);
	            List<Admin> selectAdmin = adminService.selectAdmin(ad);
	            if(selectAdmin.size() > 0){
	                map.put("pan","err");
	            }else{
	                map.put("pan","ok");
	            }
	           return    map;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
【资源说明】 Java开发基于SSM框架的医院体检预约管理系统源码+项目说明.zip Java开发基于SSM框架的医院体检预约管理系统源码+项目说明.zip 1、该资源内项目代码都是经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载使用,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果有一点儿基础,亦可在此代码基础上进行修改,以实现其他功能。 功能需求: 系统分为三个角色:系统管理员、医生和体检人员。 系统管理员主要有以下几个功能: 体检人员管理:增删改查,模糊查询 医生人员管理:增删改查,模糊查询 预约审批:体检人员预约以后,可以审批通过或者不通过 角色管理:增删改查,分配权限给不同的角色 个人信息:查看和修改自己的个人信息 密码修改:修改自己的系统密码 统计分析:系统中出现的各种疾病的男女比例 医生有以下功能: 体检人员管理:增删改查模糊查询体检人员 体检项目管理:增删改查体检项目 套餐管理:增删改查体检套餐 体检管理:给体检人员反馈体检情况 个人信息:查看和修改自己的个人信息 密码修改:修改自己的系统密码 统计分析:系统中出现的各种疾病的男女比例 体检人员有以下功能: 个人体检预约:预约体检 个人信息:查看和修改自己的个人信息 密码修改:修改自己的系统密码 统计分析:系统中出现的各种疾病的男女比例 项目技术 后台:SSM(Spring+Spring MVC+ Mybits) 前台:主要是layui,还有jsp+jquery+ajax
《网睿健康体检管理系统》利用信息化手段规范传统的健康体检模式,同时建立标准的人群档案、体检档案。在此基础上进行数据分析与挖掘,实现健康管理服务过程的环形运转循环。同时在横向上满足日常六大类(职业、从业、特种行业、学生、驾驶员、普通群众)健康体检工作需要;纵向上根据其它监督机构的工作性质或相应用人单位进行数据推送;单点上与相应体检者进行信息交互。从而达到:减轻体检机构内部的工作压力、体检报告流通过程中防止伪造篡改、精确到个人的健康管理服务、“大数据”模式的综合信息分析。 健康体检管理系统优势: 1)系统依据医疗机构工作规范与流程进行设计开发,结合传统办公自动化系统(OA)的工作流模式,将传统的工作流“搬至”信息化工作流,取消纸笔操作,大大减轻基层工作人员压力。 2)系统与传统硬件做深度结合,可通过身份证识别仪识别身份证;单反数码相机或摄像头进行标准化人像拍照;高拍仪识别驾照信息。从根本上简化体检人员的基础档案建立操作。 3)系统采用层次化的界面设计,结合细致到任一子模块的权限设置。使系统界面简洁清晰,工作人员无需培训即可使用。 4)系统以相应国际/国家体检、检验、检测为标准。具备完全自适应的扩展数据字典,并延伸至任意检查项目的数据字段。工作人员只需进行“选择”操作,即可完成体检信息录入。 5)系统以“数据字典”技术核心,支持多种体检类型的“套餐”扩展。只需进行自定义扩展,便可适用于本单位的需要。 健康体检管理系统 V2.0.3更新日志: 1.改进检验设备连接稳定性; 2.“体检中心-检验结果”中增加“使用特殊启动方式”选项; 3.修正一些已知的BUG。 健康体检管理系统截图
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值