赞
踩
基于javaweb+JSP+Servlet医院挂号预约管理系统(管理员、用户)
开发工具:eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
String arrId[] = str.split(","); // 将字符串分割成数组,得到所有复选框的value,即管理员id for (int i = 0; i < arrId.length; i++) { System.out.println(arrId[i]); b = adminService.delete(Integer.valueOf(arrId[i])); } } else { if (adminId != null) { b = adminService.delete(Integer.valueOf(adminId)); } else { // 都为空的时候 JOptionPane.showMessageDialog(null, "您还没有选择删除的人");// 跳出去 showList(request, response); return; } }
rs=stmt.executeQuery(sql);
Doctor doc=null;
while(rs.next()){
doc=new Doctor();
doc.setDocId(rs.getInt(1));
doc.setDocName(rs.getString(2));
doc.setDocImg(rs.getString(3));
doc.setMoney(rs.getInt(4));
doc.setDocTime(rs.getDate(5));
doc.setSumCount(rs.getInt(6));
doc.setLessCount(rs.getInt(7));
doc.setDocStatus(rs.getString(8));
doc.setOffId(rs.getInt(9));
int rowsCount=0; try { conn=DBConnection.getConnection(); stmt=conn.createStatement(); String sql=""; if(name==null){ sql="select count(*) from register "; }else{ sql="select count(*) from register where '"+name+"' in (select to_char(order_time,'dd') from dual)"; //sql="select count(*) from register where reg_name like '%"+name+"%' "; } rs=stmt.executeQuery(sql); if(rs.next()){ rowsCount=rs.getInt(1); } } catch (SQLException e) {
text-decoration: none;
}
.button {
font-family: "宋体";
font-size: 14px;
height: 37px;
}
html {
overflow-x: auto;
overflow-y: auto;
border: 0;
}
<style type="text/css"> body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .tabfont01 { font-family: "宋体"; font-size: 9px; color: #555555; text-decoration: none; text-align: center; } .font051 { font-family: "宋体"; font-size: 12px; color: #333333; text-decoration: none;
public void frontShowList(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // 前台显示 String offId = request.getParameter("offId");// 前台挂号时,通过选择科室得到下面的医生 // 挂号时,选择医生,把医生id传过来 String docId = request.getParameter("docId"); if (docId != null) { // 跳到“挂号开始”页面 Doctor doctor = doctorService.get(Integer.valueOf(docId)); Office office = officeService.get(doctor.getOffId()); request.setAttribute("office", office); request.setAttribute("doctor", doctor); request.getRequestDispatcher("/guhaoStart.jsp").forward(request, response); } else {
for (int i = 0; i < arrId.length; i++) { b = registerService.delete(Integer.valueOf(arrId[i])); } } else { if (regId != null) { b = registerService.delete(Integer.valueOf(regId)); } else { // 都为空的时候 JOptionPane.showMessageDialog(null, "您还没有选择删除的人");// 跳出去 showList(request, response); return; } } if (!b) { request.setAttribute("error", "删除失败"); }
HttpServletResponse response) throws ServletException, IOException { // 模糊查询 String checkName = request.getParameter("checkName"); // 得到名字,根据姓名查找时用 // 分页 PageData pageData = new PageData(); // 得到当前页 String currentPage = request.getParameter("currentPage"); if (currentPage != null) { pageData.setCurrentPage(Integer.valueOf(currentPage)); } // 得到每页行数 String pageRows = request.getParameter("pageRows"); if (pageRows != null) { pageData.setPageRows(Integer.valueOf(pageRows)); } // 得到总行数 int rowsCount = officeService.getRowsCount(checkName); pageData.setRowsCount(rowsCount); // 计算总页数 int pageCount = 0; if (rowsCount % pageData.getPageRows() == 0) {
ch[i].checked=true; } } //反选 function unselectAll(){ var ch=document.getElementsByName("delid"); for(var i=0;i<ch.length;i++){ ch[i].checked=!ch[i].checked; } } //删除所选人员信息 function del(){ var adminIdStr=""; var arr=document.getElementsByName("delid"); //复选框名字 for(var i=0;i<arr.length;i++){ if(arr[i].checked){ adminIdStr+=arr[i].value+","; //传过去 解析 } } //alert(userIdStr);
<td height="20" bgcolor="#FFFFFF"> ${p.sex } </td> <td height="20" bgcolor="#FFFFFF"> ${p.card } </td> <td height="20" bgcolor="#FFFFFF"> ${p.tel } </td> <td bgcolor="#FFFFFF"> <a href="patient?method=delete&pId=${p.pId}">删除</a> </td> </tr> </c:forEach> <tr align="center"> <td colspan="7" bgcolor="#FFFFFF"> 共<font style="font-family:隶书;font-size:small;color:red;">${page.rowsCount}</font>条数据 共分为<font style="font-family:隶书;font-size:small;color:red;">${page.pageCount}</font>页 <c:if test="${page.currentPage==1}"> <img alt="首页" border="0" src="img/firstPage.gif">
//删除所选科室信息 function del(){ var strId=""; var arr=document.getElementsByName("delid"); //复选框名字 for(var i=0;i<arr.length;i++){ if(arr[i].checked){ strId+=arr[i].value+","; //传过去 解析 } } location="office?method=delete&strId="+strId; } //点击添加人员信息 function link(){ location="admin/addOffice.jsp";
运行环境
Java≥8、Tomcat≥7.0、MySQL≥5.5
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
CSS JavaScript JSP Servlet JDBC MySQL
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
管理员:登录、管理员、医生、病人、预约挂号、科室管理
普通用户:注册、登录、预约挂号、挂号查询
普通用户(前台)
管理员(后台)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。