——————————DescriptionStart——————————
运行环境 Java≥8、MySQL≥5.7、Tomcat≥8
开发工具 eclipse/idea/myeclipse/sts等均可配置运行
适用 课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM医院管理系统(java+ssm+jsp+bootstrap+jquery+mysql)
项目介绍
医院管理系统,主要分为管理员与普通员工两种角色; 管理员主要功能包括: 通知管理、员工管理、请假管理、考勤管理、招聘管理、部门管理、工资管理、系统管理:角色管理、用户管理、菜单管理; 普通员工主要功能包括: 通知管理、请假管理、考勤管理;
技术栈
后端:Spring SpringMVC MyBatis 2. 前端:JSP+bootstrap+jQuery
——————————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 if (paramValue.equals("" )) { } else { queryMap.put(paramName, paramValue); } } String page = request.getParameter("page" ); String rows = request.getParameter("rows" ); if (page != null && rows != null ) { queryMap.put("pageIndex" ,(Integer.parseInt(page))); queryMap.put("rows" , (Integer.parseInt(rows))); } Map<Object, Object> map = new HashMap<Object, Object>(); try { List<MobileUser> list = mobileUserDao.get(queryMap); map.put("rows" , list); map.put("total" , mobileUserDao.getCount(queryMap)); map.put("success" ,true ); map.put("page" , page); map.put("msg" ,"查询成功" ); } catch (Exception e) { map.put("success" ,false ); map.put("msg" ,"查询失败" ); return map; } return map; } @RequestMapping(params = "delMoreEvent") @ResponseBody public Map<Object, Object> deleteMore (String id,HttpServletRequest request) { Map<Object, Object> map = new HashMap<Object, Object>(); try { List<String> listId = new ArrayList<String>(); String[] arrId = id.split("," ); for (int i = 0 ; i < arrId.length ; i ++ ){ listId.add(arrId[i]); Map<Object, Object> queryMap = new HashMap<Object, Object>();
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 49 50 51 52 map.put("msg" , "添加失败" ); } return map; } @RequestMapping(params = "update") @ResponseBody public Map update (HttpSession session,HttpServletRequest request,PowerRole params) { Map<Object, Object> map = new HashMap<Object, Object>(); try { params.setUpdateTime(Time.nowDateToString()); powerRoleDao.updateByPrimaryKeySelective(params); powerRoleMenuDao.deleteByRoleId(params.getId()); String addlist=request.getParameter("addlist" ); JSONArray jsonArray = JSONArray.fromObject(addlist); List<Map<String,Object>> mapListJson =(List)jsonArray; dao.insertMore(mapListJson); map.put("msg" , "修改成功" ); map.put("success" , true ); } catch (Exception e) { e.printStackTrace(); map.put("success" , false ); map.put("msg" , "修改失败" ); } return map; } @RequestMapping(params = "addRole") @ResponseBody public Map addRole (PowerRole paramT, HttpSession session, HttpServletRequest request) { Map<Object, Object> map = new HashMap<Object, Object>(); String[] roleId = request.getParameterValues("roleId" ); try { PowerUser u = (PowerUser) session.getAttribute("users" ); paramT.setUpdateUserId(u.getId()); paramT.setUpdateUserName(u.getUserName());
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 } } } @Controller("yuangong") @Scope("prototype") @RequestMapping("yuangong.action") public class yuangongController extends BaseController <yuangong > { public yuangongMapper yuangongMapper; @Autowired public void setPlansMapperDao (yuangongMapper yuangongMapper) { this .yuangongMapper = yuangongMapper; } @PostConstruct public void setBaseDao () { super .setBaseDao(yuangongMapper); } @RequestMapping(params = "add") @ResponseBody public Map<Object, Object> add (HttpSession session,HttpServletRequest request,yuangong params) { System.out.println("你好" ); Map<Object, Object> map = new HashMap<Object, Object>();
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 try { Thread.sleep(millis); } catch (InterruptedException e) { } } public static void sleepSeconds (long seconds) { try { Thread.sleep(seconds); } catch (InterruptedException e) { } } public static long getDisplayOrder () { return new Date().getTime() - DISPLAY_ORDER_OFFSET; } public static long getTopDisplayOrder (long displayOrder, String orderDirection, boolean topFlag) { if (orderDirection == null || orderDirection.trim().equals("asc" )) { if (topFlag) return displayOrder - DISPLAY_ORDER_TOP; else return displayOrder + DISPLAY_ORDER_TOP; } else { if (topFlag) return displayOrder + DISPLAY_ORDER_TOP; else return displayOrder - DISPLAY_ORDER_TOP; } } public static boolean isDisplayOrderTop (long displayOrder, String orderDirection) { if (orderDirection == null || orderDirection.trim().equals("asc" )) { if (displayOrder < 0 ) return true ; else return false ; } else { if (displayOrder > DISPLAY_ORDER_TOP) return true ; else return false ; } }
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 49 50 51 return str; Set set = map.entrySet(); Iterator it = set.iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); str += entry.getKey(); str += keyValueDelimiter; str += entry.getValue(); str += elementDelimiter; } return str; } public static List map2List (Map map) { List list = new ArrayList(); if (map == null || map.size() == 0 ) return list; Set set = map.entrySet(); Iterator it = set.iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); list.add(entry.getValue()); } return list; } public static List<Map<String, Object>> map2MapList(Map map) { List<Map<String, Object>> list = new ArrayList(); if (map == null || map.size() == 0 ) return list; Set set = map.entrySet(); Iterator it = set.iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); Map<String, Object> tMap = new HashMap<String, Object>(); tMap.put("key" , entry.getKey()); tMap.put("value" , entry.getValue()); list.add(tMap); } return list; } public static String addPara (String para, String paraName, String paraValue) { if (para == null || para.trim().equals("" )) para = "" ; Map<String, String> paraMap = ToolUtil.parseMap(para, "\\," , "\\=" ); if (paraName == null || paraName.trim().equals("" ) || paraValue == null ) return para; paraMap.put(paraName, paraValue); return ToolUtil.map2String(paraMap, "," , "=" ); }
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 * */ @Controller("powerMenu") @Scope("prototype") @RequestMapping("powerMenu.action") public class PowerMenuController extends BaseController <PowerMenu > { public PowerUserMapper powerUserDao; public LogLoginMapper logLoginDao; public PowerRoleMapper powerRoleDao; public PowerRoleUserMapper powerRoleUserDao; public PowerMenuMapper powerMenuDao; public PowerRoleMenuMapper powerRoleMenuDao; List<PowerMenu> menuList=new ArrayList<PowerMenu>(); @Autowired public void setPowerRoleDao (PowerRoleMapper powerRoleMapper) { this .powerRoleDao = powerRoleMapper; } @Autowired public void setPowerRoleUserDao (PowerRoleUserMapper powerRoleUserMapper) { this .powerRoleUserDao = powerRoleUserMapper; } @Autowired public void setPowerMenuDao (PowerMenuMapper powerMenuMapper) { this .powerMenuDao = powerMenuMapper; } @Autowired public void setPowerRoleMenuDao (PowerRoleMenuMapper powerRoleMenuMapper) { this .powerRoleMenuDao = powerRoleMenuMapper; } @PostConstruct public void setBaseDao () { super .setBaseDao(powerMenuDao); } @RequestMapping(params = "getUserMenu") @ResponseBody public List getUserMenu (HttpServletRequest request,HttpSession session) { Map<Object, Object> map = new HashMap<Object, Object>(); List resultList = new ArrayList(); try {
——————————PayStart——————————
项目链接: https://javayms.github.io?id=281422272105200az https://javayms.pages.dev?id=281422272105200az