老年人能力评估4
查看基本信息表:
import data.plandata;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
@WebServlet("/checkplan")
public class checkplan extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String number = request.getParameter("number");
Dao dao = new Dao();
try {
List<plandata> data=dao.checkplan(number);
request.setAttribute("data", data);
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
request.getRequestDispatcher("checkplan.jsp").forward(request, response);
}
<%@ page import="java.util.List" %>
<%@ page import="data.plandata" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
Created by IntelliJ IDEA.
User: Lenovo
Date: 2025/2/4
Time: 下午5:44
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>查看老年人能力评估基本信息表</title>
</head>
<body>
<form action="checkplan" method="get">
<label for="number">评估编号:</label>
<input name="number" type="text" id="number"><br>
<input type="submit" value="查看">
</form>
<table border="1">
<tr>
<th>评估编号</th>
<th>评估基准日期</th>
<th>评估原因</th>
</tr>
<%
List<plandata> data=(List<plandata>) request.getAttribute("data");
if(data.size()>0)
for(plandata d:data){%>
<tr>
<td><%=d.getNumber()%></td>
<td><%=d.getDate()%></td>
<td><%=d.getReason()%></td>
</tr>
<%}%>
</table>
</body>
</html>
查看被评估人信息表:
import data.peopledata;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;
import java.util.List;
@WebServlet("/checkpeople")
public class checkpeople extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) {
String number = request.getParameter("number");
Dao dao = new Dao();
try {
List<peopledata> data=dao.checkpeople(number);
request.setAttribute("data", data);
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
}
}
<%@ page import="java.util.List" %>
<%@ page import="data.peopledata" %><%--
Created by IntelliJ IDEA.
User: Lenovo
Date: 2025/2/4
Time: 下午6:04
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>查看被评估者的基本信息表</title>
</head>
<body>
<form action="checkplan" method="get">
<label for="number">评估编号:</label>
<input name="number" type="text" id="number"><br>
<input type="submit" value="查看">
</form>
<table border="1">
<tr>
<th>姓名</th>
<th>性别</th>
<th>出生日期</th>
<th>身份证号</th>
<th>社保卡号</th>
<th>民族</th>
<th>文化程度</th>
<th>宗教信仰</th>
<th>婚姻状况</th>
<th>居住情况</th>
<th>医疗费用支付方式</th>
<th>经济来源</th>
<th>痴呆</th>
<th>精神疾病</th>
<th>慢性疾病</th>
<th>跌倒</th>
<th>走失</th>
<th>噎食</th>
<th>自杀</th>
<th>其他</th>
</tr>
<%
List<peopledata> data=(List<peopledata>) request.getAttribute("data");
if(data.size()>0)
for(peopledata d:data){%>
<tr>
<td><%=d.getName()%></td>
<td><%=d.getSex()%></td>
<td><%=d.getBirthday()%></td>
<td><%=d.getIdnumber()%></td>
<td><%=d.getSocialid()%></td>
<td><%=d.getNation()%></td>
<td><%=d.getEducation()%></td>
<td><%=d.getReligion()%></td>
<td><%=d.getMarriage()%></td>
<td><%=d.getReside()%></td>
<td><%=d.getMedical()%></td>
<td><%=d.getIncome()%></td>
<td><%=d.getStupid()%></td>
<td><%=d.getMental()%></td>
<td><%=d.getChronic()%></td>
<td><%=d.getTumble()%></td>
<td><%=d.getLost()%></td>
<td><%=d.getDysphoria()%></td>
<td><%=d.getSuicide()%></td>
<td><%=d.getOther()%></td>
</tr>
<%}
%>
</table>
</body>
</html>
查看信息提供者及联系人信息表:
import data.informatdata;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
@WebServlet("/checkinformat")
public class checkinformat extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String number = request.getParameter("number");
Dao dao = new Dao();
try {
List<informatdata> data=dao.checkinformat(number);
request.setAttribute("data", data);
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
request.getRequestDispatcher("checkinformat").forward(request,response);
}
}
<%@ page import="java.util.List" %>
<%@ page import="data.informatdata" %><%--
Created by IntelliJ IDEA.
User: Lenovo
Date: 2025/2/4
Time: 下午7:25
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>查看信息提供者及联系人信息表</title>
</head>
<body>
<form action="checkinformat" method="get">
<label for="number">评估编号:</label>
<input name="number" type="text" id="number"><br>
<input type="submit" value="查看">
</form>
<table border="1">
<tr>
<th>信息提供者的姓名</th>
<th>信息提供者与老人的关系</th>
<th>联系人姓名</th>
<th>联系人电话</th>
</tr>
<%
List<informatdata> data=(List<informatdata>)request.getAttribute("data");
if(data.size()>0)
for(informatdata d:data){%>
<tr>
<td><%=d.getName()%></td>
<td><%=d.getRelation()%></td>
<td><%=d.getContacts()%></td>
<td><%=d.getPhone()%></td>
</tr>
<%}
%>
</table>
</body>
</html>