——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SpringBoot体检管理系统(java+springboot+thymeleaf+layui+html+mysql+maven)
1 2 分为:管理员、医生、体检人 体检人预约-管理员审核-医生问诊
项目介绍:
登录、注册、用户管理、角色管理、体检人管理、体检健康史、体检人档案、体检中心管理
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 4.数据库:MySql 5.7版本;
技术栈
JSP +SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 hsMin+=s.getHeightMin(); hsMax+=s.getHeightMax(); asMin+=s.getAppetiteMin(); asMax+=s.getAppetiteMax(); } tsMin = tsMin / ssRows.size(); tsMax = tsMax / ssRows.size(); wsMin = wsMin / ssRows.size(); wsMax = wsMax / ssRows.size(); hsMin = hsMin / ssRows.size(); hsMax = hsMax / ssRows.size(); asMin = asMin / ssRows.size(); asMax = asMax / ssRows.size(); mt.add(tsMax); mw.add(wsMax); mh.add(hsMax); ma.add(asMax); if (t>=tsMin && t<=tsMax){ tsCount.add(" 体温正常" ); }else if (t<tsMin){ tsCount.add( " 体温偏低" ); }else if (t>tsMax){ tsCount.add( " 体温偏高" ); } if (w>=wsMin && w<=wsMax){ wsCount.add( " 体重正常" ); }else if (w<wsMin){ wsCount.add(" 体重偏低" ); }else if (w>wsMax){ wsCount.add(" 体重偏高" ); } if (h>=hsMin && h<=hsMax){ hsCount.add(" 身高正常" ); }else if (h<hsMin){ hsCount.add( " 身高偏低" ); }else if (h>hsMax){ hsCount.add(" 身高偏高" ); } if (a>=asMin && a<=asMax){ asCount.add( " 饭量正常" ); }else if (a<asMin){ asCount.add(" 饭量偏低" ); }else if (a>asMax){
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 String suffixName = fileName.substring(fileName.lastIndexOf("." )); String filePath = "D://upload//" ; fileName = UUID.randomUUID() + suffixName; FileResponse fileResponse = new FileResponse(); File dest = new File(filePath + fileName); if (!dest.getParentFile().exists()) { dest.getParentFile().mkdirs(); } try { file.transferTo(dest); out = response.getWriter(); String filename = "/file/" + fileName; String s = fileResponse.success(1 , fileName, filename, null ); out.println(s); } catch (IOException e) { String s = fileResponse.error(0 , "上传失败!" ); out.println(s); } } } package com.phms.controller.user;@Controller("UserPetController") @RequestMapping("/user/pet") public class UserPetController {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 return "app" ; } try { petService.deleteById(id); return "SUCCESS" ; } catch (Exception e) { logger.error("删除异常" , e); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return "ERROR" ; } } @RequestMapping(value = "/add") public String add () { return "user/petAdd" ; } @RequestMapping(value = "/doAdd") @ResponseBody @Transactional public String doAdd (Pet pojo) { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); try { pojo.setUserId(user.getId()); pojo.setCreateTime(new Date()); petService.add(pojo); return "SUCCESS" ; } catch (Exception e) { logger.error("添加异常" , e); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return "ERROR" ; } } } package com.phms.controller.user;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 PetDaily petDaily = new PetDaily(); petDaily.setPetId(p.getId()); petDaily.setPage(1 ); petDaily.setLimit(10 ); MMGridPageVoBean<PetDaily> ps = (MMGridPageVoBean<PetDaily>) petDailyService.getAllByLimit(petDaily); List<PetDaily> psRows = ps.getRows(); double t = 0 ;double w = 0 ;double h = 0 ;double a = 0 ;for (PetDaily petDaily1 : psRows){ t+=petDaily1.getTemperature(); w+=petDaily1.getWeight(); h+=petDaily1.getHeight(); a+=petDaily1.getAppetite(); } t = t/psRows.size(); w = w/psRows.size(); h = h/psRows.size(); a = a/psRows.size(); pt.add(t); pw.add(w); ph.add(h); pa.add(a); Standard standard = new Standard(); standard.setType(p.getType()); standard.setStatus(1 ); int petAge = MyUtils.get2DateDay(MyUtils.getDate2String(p.getBirthday(), "yyyy-MM-dd" ), MyUtils.getDate2String(new Date(), "yyyy-MM-dd" ));petAge = (petAge<0 ? -petAge : petAge)/365 ; standard.setAgeMax(petAge); standard.setPage(1 ); standard.setLimit(100 ); MMGridPageVoBean<Standard> ss = (MMGridPageVoBean<Standard>) standardService.getAllByLimit(standard); List<Standard> ssRows = ss.getRows(); double tsMin = 0 ;double tsMax = 0 ;double wsMin = 0 ;double wsMax = 0 ;double hsMin = 0 ;double hsMax = 0 ;double asMin = 0 ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 @RequestMapping("/getAllByLimitDoctor") @ResponseBody public Object getAllByLimitDoctor (PetDaily pojo) { return petDailyService.getAllByLimit(pojo); } @RequestMapping(value = "/del") @ResponseBody @Transactional public String del (Long id) { try { petDailyService.deleteById(id); return "SUCCESS" ; } catch (Exception e) { logger.error("删除异常" , e); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); return "ERROR" ; } } @RequestMapping(value = "/add") public String add (Model model) { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); Pet pet = new Pet(); pet.setUserId(user.getId()); pet.setPage(1 ); pet.setLimit(100 ); MMGridPageVoBean<Pet> voBean = (MMGridPageVoBean<Pet>) petService.getAllByLimit(pet); List<Pet> rows = voBean.getRows(); model.addAttribute("pets" , rows); return "user/petDailyAdd" ; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 ids[0 ] = user.getId()+"" ; userRoleService.addUserRole(2 , ids); return resultMap.success().message("注册成功" ); }catch (Exception e){ e.printStackTrace(); return resultMap.fail().message("注册失败" ); } } @RequestMapping(value = "/") public String index (Model model) { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); if (null != user) { model.addAttribute("user" , user); List<Page> pageList = pageService.getAllRolePageByUserId(user.getId()+"" ); model.addAttribute("pageList" , pageList); return "index" ; } else { return "login" ; } } @RequestMapping(value = "/main") public String main (Model model) { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); if (null != user) { model.addAttribute("user" , user); } else { return "login" ; }
——————————PayStart——————————
项目链接: https://javayms.github.io?id=242322092805200mc https://javayms.pages.dev?id=242322092805200mc