diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/.gitignore" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..35410cacdc5e87f985c93a96520f5e11a5c822e4 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/.gitignore" @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/artifacts/Day20230606_war_exploded.xml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/artifacts/Day20230606_war_exploded.xml" new file mode 100644 index 0000000000000000000000000000000000000000..85c9871b462f98a13b3e73c58225d5a4f95b511d --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/artifacts/Day20230606_war_exploded.xml" @@ -0,0 +1,13 @@ + + + $PROJECT_DIR$/out/artifacts/Day20230606_war_exploded + + + + + + + + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/dataSources.xml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/dataSources.xml" new file mode 100644 index 0000000000000000000000000000000000000000..d17f22cd460912e82feb4563b55774e9fe24dc2c --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/dataSources.xml" @@ -0,0 +1,12 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306 + $ProjectFileDir$ + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/libraries/lib.xml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/libraries/lib.xml" new file mode 100644 index 0000000000000000000000000000000000000000..23106033b23a0c8e5ae95ddf611aebd76dc3d72f --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/libraries/lib.xml" @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/misc.xml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/misc.xml" new file mode 100644 index 0000000000000000000000000000000000000000..05483570e041eb648703359441d61bf9a5feeb13 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/misc.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/modules.xml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/modules.xml" new file mode 100644 index 0000000000000000000000000000000000000000..7660e7bb5b5bff71c188506975f5117bdae6f3d8 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/modules.xml" @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/webContexts.xml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/webContexts.xml" new file mode 100644 index 0000000000000000000000000000000000000000..322627a55ca2a5019b36c0a7768663aa0a42557c --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/.idea/webContexts.xml" @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/Day20230606.iml" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/Day20230606.iml" new file mode 100644 index 0000000000000000000000000000000000000000..bc73df7611ec684b1bbe278ef7410a3c374a9849 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/Day20230606.iml" @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/add.jsp" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/add.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..b6e0b7b6278777302e4812e87e22d7e9399d4b17 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/add.jsp" @@ -0,0 +1,47 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2023-06-06 + Time: 19:35 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 学生考勤系统 + + + +
+

学生考勤系统

+ + + + + + + + + + + + + + + + +
学生姓名 + +
考勤时间
考勤情况 + 已到: + 迟到: + 旷课: +
+
+ + diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/bean/Attence.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/bean/Attence.class" new file mode 100644 index 0000000000000000000000000000000000000000..e57d105aa004954f27606cf68feae9d00fbf1920 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/bean/Attence.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/bean/Student.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/bean/Student.class" new file mode 100644 index 0000000000000000000000000000000000000000..f19ef1fd922b1e8244eb21eb168a218e7e70d6c8 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/bean/Student.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/servlet/AddServlet.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/servlet/AddServlet.class" new file mode 100644 index 0000000000000000000000000000000000000000..d3ada399484161cfb4a6b92772d1170144684c1d Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/servlet/AddServlet.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/servlet/ListServlet.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/servlet/ListServlet.class" new file mode 100644 index 0000000000000000000000000000000000000000..1c15d4338b986de4461f29235c2f9fd2ddae4a00 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/servlet/ListServlet.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/utils/DBUtil.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/utils/DBUtil.class" new file mode 100644 index 0000000000000000000000000000000000000000..e9234b0cc16f767adfcdc6a0395dc023b084a8f7 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/classes/utils/DBUtil.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/jstl.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/jstl.jar" new file mode 100644 index 0000000000000000000000000000000000000000..a02abecc8b888f09e4d1f9e4c9790dc482426d4f Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/jstl.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.48.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.48.jar" new file mode 100644 index 0000000000000000000000000000000000000000..bd1c4bbc218ccff3c5a0dc9a09d248c54c577fd8 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.48.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/servlet-api.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/servlet-api.jar" new file mode 100644 index 0000000000000000000000000000000000000000..daf690af39e115e15974b23843a3987eb3089e18 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/servlet-api.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/standard.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/standard.jar" new file mode 100644 index 0000000000000000000000000000000000000000..bc528acb949096eeb2e3048de1ff5b9ab12a66c5 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/lib/standard.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/list.jsp" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/list.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..a900c31e59aaaa464fcd17e61724bf7eef43d3df --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/list.jsp" @@ -0,0 +1,40 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2023-06-06 + Time: 11:35 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 添加 + Title + + + + + + + + + + + + + + + + + + + + +
考勤编号学生编号学生姓名出勤时间出勤情况
${stu.type}${stu.aid}${stu.sname}${stu.time} + 已到 + 迟到 + 旷课 +
+ + diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/msg.jsp" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/msg.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..045d72c7eade51cb919ab8b36ec6c3432d1122db --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/artifacts/Day20230606_war_exploded/WEB-INF/msg.jsp" @@ -0,0 +1,18 @@ +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2023-06-06 + Time: 20:13 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 提示信息 + + +

${msg}

+
+ 返回列表 + + diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/bean/Attence.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/bean/Attence.class" new file mode 100644 index 0000000000000000000000000000000000000000..e57d105aa004954f27606cf68feae9d00fbf1920 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/bean/Attence.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/bean/Student.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/bean/Student.class" new file mode 100644 index 0000000000000000000000000000000000000000..f19ef1fd922b1e8244eb21eb168a218e7e70d6c8 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/bean/Student.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/servlet/AddServlet.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/servlet/AddServlet.class" new file mode 100644 index 0000000000000000000000000000000000000000..d3ada399484161cfb4a6b92772d1170144684c1d Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/servlet/AddServlet.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/servlet/ListServlet.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/servlet/ListServlet.class" new file mode 100644 index 0000000000000000000000000000000000000000..1c15d4338b986de4461f29235c2f9fd2ddae4a00 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/servlet/ListServlet.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/utils/DBUtil.class" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/utils/DBUtil.class" new file mode 100644 index 0000000000000000000000000000000000000000..e9234b0cc16f767adfcdc6a0395dc023b084a8f7 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/out/production/Day20230606/utils/DBUtil.class" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/bean/Attence.java" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/bean/Attence.java" new file mode 100644 index 0000000000000000000000000000000000000000..b6c289120c7dc095104ac6a7de9491aafb304684 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/bean/Attence.java" @@ -0,0 +1,71 @@ +package bean; + +public class Attence { + private int aid; + private String time; + private int type; + private int sid; + private String sname; + + public Attence() { + } + + public Attence(int aid, String time, int type, int sid, String sname) { + this.aid = aid; + this.time = time; + this.type = type; + this.sid = sid; + this.sname = sname; + } + + public int getAid() { + return aid; + } + + public void setAid(int aid) { + this.aid = aid; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public int getSid() { + return sid; + } + + public void setSid(int sid) { + this.sid = sid; + } + + public String getSname() { + return sname; + } + + public void setSname(String sname) { + this.sname = sname; + } + + @Override + public String toString() { + return "Attence{" + + "aid=" + aid + + ", time='" + time + '\'' + + ", type=" + type + + ", sid=" + sid + + ", sname='" + sname + '\'' + + '}'; + } +} diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/bean/Student.java" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/bean/Student.java" new file mode 100644 index 0000000000000000000000000000000000000000..4fb66b71faebf96e2be706872a9624dbcdd2ed31 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/bean/Student.java" @@ -0,0 +1,38 @@ +package bean; + +public class Student { + private int sid; + private String sname; + + public Student() { + } + + public Student(int sid, String sname) { + this.sid = sid; + this.sname = sname; + } + + public int getSid() { + return sid; + } + + public void setSid(int sid) { + this.sid = sid; + } + + public String getSname() { + return sname; + } + + public void setSname(String sname) { + this.sname = sname; + } + + @Override + public String toString() { + return "Student{" + + "sid=" + sid + + ", sname='" + sname + '\'' + + '}'; + } +} diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/servlet/AddServlet.java" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/servlet/AddServlet.java" new file mode 100644 index 0000000000000000000000000000000000000000..5ef7c109adce4f5ac646e252782318d6367a28e5 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/servlet/AddServlet.java" @@ -0,0 +1,56 @@ +package servlet; + +import bean.Attence; +import bean.Student; +import utils.DBUtil; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.annotation.*; +import java.io.IOException; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; + +@WebServlet("/add") +public class AddServlet extends HttpServlet { + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + ArrayList list = new ArrayList<>(); + request.setCharacterEncoding("utf-8"); + String sql = "select * from student"; + ResultSet rs = DBUtil.query(sql); + try { + while (rs.next()){ + int sid = rs.getInt("sid"); + String sname = rs.getString("sname"); + Student stu = new Student(sid, sname); + list.add(stu); + } + } catch (SQLException e) { + e.printStackTrace(); + } + request.setAttribute("list",list); + request.getRequestDispatcher("/WEB-INF/add.jsp").forward(request,response); + + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + request.setCharacterEncoding("utf-8"); + + String sid = request.getParameter("sid"); + String time = request.getParameter("time"); + String type = request.getParameter("type"); + + String sql = "insert into attence values(?,?,?,?)"; + int i = DBUtil.update(sql, null, time, type, sid); + + if(i>0){ + request.setAttribute("msg","添加成功"); + request.getRequestDispatcher("/WEB-INF/msg.jsp").forward(request,response); + }else{ + request.setAttribute("msg","添加失败"); + } + } +} diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/servlet/ListServlet.java" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/servlet/ListServlet.java" new file mode 100644 index 0000000000000000000000000000000000000000..c7d098692861c280d1ef041838bbb07f00ef0a40 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/servlet/ListServlet.java" @@ -0,0 +1,46 @@ +package servlet; + +import bean.Attence; +import utils.DBUtil; + +import javax.servlet.*; +import javax.servlet.http.*; +import javax.servlet.annotation.*; +import java.io.IOException; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; + +@WebServlet("/list") +public class ListServlet extends HttpServlet { + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + ArrayList list = new ArrayList<>(); + //处理乱码问题 + request.setCharacterEncoding("utf-8"); + //编写sql语句 + String sql ="select * from attence a ,student s where a.sid=s.sid"; + ResultSet rs = DBUtil.query(sql); + try { + while (rs.next()){ + int aid = rs.getInt("aid"); + String time = rs.getString("time"); + int type = rs.getInt("type"); + int sid = rs.getInt("sid"); + String sname = rs.getString("sname"); + Attence stu = new Attence(aid, time, type, sid, sname); + list.add(stu); + } + } catch (SQLException e) { + throw new RuntimeException(e); + } + request.setAttribute("list",list); + request.getRequestDispatcher("/WEB-INF/list.jsp").forward(request,response); + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + + } +} diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/utils/DBUtil.java" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/utils/DBUtil.java" new file mode 100644 index 0000000000000000000000000000000000000000..666c3acfcaabe28cebadb3f4e303189661152ace --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/src/utils/DBUtil.java" @@ -0,0 +1,70 @@ +package utils; + +import java.sql.*; + +public class DBUtil { + //1.定义数据库地址,用户名,密码,utf8编码 + public static final String URL="jdbc:mysql:///attdb?useSSL=false&characterEncoding=utf8"; + public static final String USER="root"; + public static final String PSW="root"; + //2.注册驱动 + static { + try { + Class.forName("com.mysql.jdbc.Driver"); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + //3.获取连接对象 + public static Connection getConn() { + Connection conn; + try { + conn = DriverManager.getConnection(URL, USER, PSW); + } catch (SQLException e) { + throw new RuntimeException(e); + } + return conn; + } + + //4.通用的查询方法 + public static ResultSet query(String sql,Object... keys){ + //1.获取连接对象 + Connection conn = getConn(); + //2.获取执行sql语句的对象 + ResultSet rs = null; + try { + PreparedStatement prs = conn.prepareStatement(sql); + //2.5遍历数组,将数据赋值给每个? + for (int i = 0; i < keys.length; i++) { + prs.setObject((i+1),keys[i]); + } + //3.得到并返回结果集 + rs = prs.executeQuery(); + } catch (SQLException e) { + throw new RuntimeException(e); + } + + return rs; + } + + //5.通用的update方法 + public static int update(String sql,Object... keys){ + //1.获取连接对象 + Connection conn = getConn(); + //2.获取执行sql语句的对象 + int num=0; + try { + PreparedStatement prs = conn.prepareStatement(sql); + //2.5遍历数组,将数据赋值给每个? + for (int i = 0; i < keys.length; i++) { + prs.setObject((i+1),keys[i]); + } + //3.得到并返回结果集 + num = prs.executeUpdate(); + } catch (SQLException e) { + throw new RuntimeException(e); + } + + return num; + } +} diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/add.jsp" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/add.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..b6e0b7b6278777302e4812e87e22d7e9399d4b17 --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/add.jsp" @@ -0,0 +1,47 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2023-06-06 + Time: 19:35 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 学生考勤系统 + + + +
+

学生考勤系统

+ + + + + + + + + + + + + + + + +
学生姓名 + +
考勤时间
考勤情况 + 已到: + 迟到: + 旷课: +
+
+ + diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/jstl.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/jstl.jar" new file mode 100644 index 0000000000000000000000000000000000000000..a02abecc8b888f09e4d1f9e4c9790dc482426d4f Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/jstl.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/mysql-connector-java-5.1.48.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/mysql-connector-java-5.1.48.jar" new file mode 100644 index 0000000000000000000000000000000000000000..bd1c4bbc218ccff3c5a0dc9a09d248c54c577fd8 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/mysql-connector-java-5.1.48.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/servlet-api.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/servlet-api.jar" new file mode 100644 index 0000000000000000000000000000000000000000..daf690af39e115e15974b23843a3987eb3089e18 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/servlet-api.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/standard.jar" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/standard.jar" new file mode 100644 index 0000000000000000000000000000000000000000..bc528acb949096eeb2e3048de1ff5b9ab12a66c5 Binary files /dev/null and "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/lib/standard.jar" differ diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/list.jsp" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/list.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..a900c31e59aaaa464fcd17e61724bf7eef43d3df --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/list.jsp" @@ -0,0 +1,40 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2023-06-06 + Time: 11:35 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 添加 + Title + + + + + + + + + + + + + + + + + + + + +
考勤编号学生编号学生姓名出勤时间出勤情况
${stu.type}${stu.aid}${stu.sname}${stu.time} + 已到 + 迟到 + 旷课 +
+ + diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/msg.jsp" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/msg.jsp" new file mode 100644 index 0000000000000000000000000000000000000000..045d72c7eade51cb919ab8b36ec6c3432d1122db --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/Day20230606/web/WEB-INF/msg.jsp" @@ -0,0 +1,18 @@ +<%-- + Created by IntelliJ IDEA. + User: Administrator + Date: 2023-06-06 + Time: 20:13 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 提示信息 + + +

${msg}

+
+ 返回列表 + + diff --git "a/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/student.sql" "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/student.sql" new file mode 100644 index 0000000000000000000000000000000000000000..a49a0b8d714e470ad68581d51f4f511ed72a563a --- /dev/null +++ "b/04 \346\235\216\346\230\216\345\201\245/20230607 \350\200\203\345\213\244\347\263\273\347\273\237\347\273\203\344\271\240/student.sql" @@ -0,0 +1,29 @@ +create database AttDB charset utf8; +use AttDB; + +create table Student( + sid int primary key auto_increment, #学号 主键,自动增长列 + sname varchar(20) unique not null #学生姓名 唯一,非空 +); + +create table Attence ( + aid int primary key auto_increment, #考勤编号 主键,自动增长列 + time varchar(20) not null, #出勤时间 非空 + type int comment "1:已到;2:迟到;3旷课", #出勤状况 1:已到;2:迟到;3旷课 + sid int, #学号 外键 + foreign key(sid) references Student(sid) +); + +insert into student values +(null,"张三"), +(null,"李四"), +(null,"王五"); + +insert into attence values +(null,"2022-05-06 08:01:25",1,1), +(null,"2022-05-06 08:01:25",2,1), +(null,"2022-05-06 08:01:25",2,2), +(null,"2022-05-06 08:01:25",3,2), +(null,"2022-05-06 08:01:25",2,3); + +select * from student; \ No newline at end of file