diff --git a/WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_edit.jsp
new file mode 100644
index 0000000..8703012
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_edit.jsp
@@ -0,0 +1,164 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_list.jsp
new file mode 100644
index 0000000..0d1dbd3
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/headmaster/headmaster_list.jsp
@@ -0,0 +1,374 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit.jsp
new file mode 100644
index 0000000..ed50bd1
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/homework/homework_edit.jsp
@@ -0,0 +1,234 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
new file mode 100644
index 0000000..898b91b
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/homework/homework_list.jsp
@@ -0,0 +1,384 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_edit.jsp
new file mode 100644
index 0000000..d574d1e
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_edit.jsp
@@ -0,0 +1,206 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_list.jsp
new file mode 100644
index 0000000..21746d1
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/homeworkproblem/homeworkproblem_list.jsp
@@ -0,0 +1,380 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_edit.jsp
new file mode 100644
index 0000000..fe63d56
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_edit.jsp
@@ -0,0 +1,234 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_list.jsp
new file mode 100644
index 0000000..6cbc16c
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/studenthomework/studenthomework_list.jsp
@@ -0,0 +1,384 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_edit.jsp
new file mode 100644
index 0000000..5e46d3a
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_edit.jsp
@@ -0,0 +1,192 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+%>
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_list.jsp b/WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_list.jsp
new file mode 100644
index 0000000..a7bb285
--- /dev/null
+++ b/WebRoot/WEB-INF/jsp/sunvote/studenthomeworkinfo/studenthomeworkinfo_list.jsp
@@ -0,0 +1,378 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+<%
+ String path = request.getContextPath();
+ String basePath = request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + path + "/";
+%>
+
+
+
+
+
+
+
+<%@ include file="../../system/index/top.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="../../system/index/foot.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/dbconfig.properties b/resources/dbconfig.properties
index 896903b..0a550a0 100644
--- a/resources/dbconfig.properties
+++ b/resources/dbconfig.properties
@@ -1,5 +1,5 @@
#数据源 1
-url:jdbc:mysql://47.107.98.47:3306/education?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+url:jdbc:mysql://47.107.98.47:3306/education2?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
#url:jdbc:mysql://120.78.57.84:3306/education3?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
#url:jdbc:mysql://192.168.0.3:3306/education?autoReconnect=true&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
driverClassName:com.mysql.jdbc.Driver
diff --git a/resources/mybatis1/sunvote/HeadmasterMapper.xml b/resources/mybatis1/sunvote/HeadmasterMapper.xml
new file mode 100644
index 0000000..f9e53af
--- /dev/null
+++ b/resources/mybatis1/sunvote/HeadmasterMapper.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+ SV_HEADMASTER
+
+
+
+
+ NAME,
+ USERNAME,
+ PASSWORD,
+ SCHOOL_ID,
+ PERMISSION,
+ PHONE,
+ HEADMASTER_ID
+
+
+
+
+ #{NAME},
+ #{USERNAME},
+ #{PASSWORD},
+ #{SCHOOL_ID},
+ #{PERMISSION},
+ #{PHONE},
+ #{HEADMASTER_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ HEADMASTER_ID = #{HEADMASTER_ID}
+
+
+
+
+ update
+
+ set
+ NAME = #{NAME},
+ USERNAME = #{USERNAME},
+ PASSWORD = #{PASSWORD},
+ SCHOOL_ID = #{SCHOOL_ID},
+ PERMISSION = #{PERMISSION},
+ PHONE = #{PHONE},
+ HEADMASTER_ID = HEADMASTER_ID
+ where
+ HEADMASTER_ID = #{HEADMASTER_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ HEADMASTER_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/HomeworkMapper.xml b/resources/mybatis1/sunvote/HomeworkMapper.xml
new file mode 100644
index 0000000..e9aa7b6
--- /dev/null
+++ b/resources/mybatis1/sunvote/HomeworkMapper.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+ SV_HOMEWORK
+
+
+
+
+ CODE,
+ NAME,
+ SUBJECT_ID,
+ CLASS_ID,
+ GRADE_ID,
+ SCHOOL_ID,
+ COMPLETE_DATE,
+ CREATE_DATE,
+ MODIFY_DATE,
+ COMPLETE_COUNT,
+ ALL_SCORE,
+ HOMEWORK_ID
+
+
+
+
+ #{CODE},
+ #{NAME},
+ #{SUBJECT_ID},
+ #{CLASS_ID},
+ #{GRADE_ID},
+ #{SCHOOL_ID},
+ #{COMPLETE_DATE},
+ #{CREATE_DATE},
+ #{MODIFY_DATE},
+ #{COMPLETE_COUNT},
+ #{ALL_SCORE},
+ #{HOMEWORK_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ HOMEWORK_ID = #{HOMEWORK_ID}
+
+
+
+
+ update
+
+ set
+ CODE = #{CODE},
+ NAME = #{NAME},
+ SUBJECT_ID = #{SUBJECT_ID},
+ CLASS_ID = #{CLASS_ID},
+ GRADE_ID = #{GRADE_ID},
+ SCHOOL_ID = #{SCHOOL_ID},
+ COMPLETE_DATE = #{COMPLETE_DATE},
+ CREATE_DATE = #{CREATE_DATE},
+ MODIFY_DATE = #{MODIFY_DATE},
+ COMPLETE_COUNT = #{COMPLETE_COUNT},
+ ALL_SCORE = #{ALL_SCORE},
+ HOMEWORK_ID = HOMEWORK_ID
+ where
+ HOMEWORK_ID = #{HOMEWORK_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ HOMEWORK_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/HomeworkProblemMapper.xml b/resources/mybatis1/sunvote/HomeworkProblemMapper.xml
new file mode 100644
index 0000000..f68c2af
--- /dev/null
+++ b/resources/mybatis1/sunvote/HomeworkProblemMapper.xml
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+ SV_HOMEWORKPROBLEM
+
+
+
+
+ CODE,
+ RANK,
+ P_HOMEWORK_PROBLEM_ID,
+ NAME,
+ TYPE,
+ OPTION_NUM,
+ RIGHT_ANSWER,
+ SCORE,
+ PART_SCORE,
+ HOMEWORKPROBLEM_ID
+
+
+
+
+ #{CODE},
+ #{RANK},
+ #{P_HOMEWORK_PROBLEM_ID},
+ #{NAME},
+ #{TYPE},
+ #{OPTION_NUM},
+ #{RIGHT_ANSWER},
+ #{SCORE},
+ #{PART_SCORE},
+ #{HOMEWORKPROBLEM_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ HOMEWORKPROBLEM_ID = #{HOMEWORKPROBLEM_ID}
+
+
+
+
+ update
+
+ set
+ CODE = #{CODE},
+ RANK = #{RANK},
+ P_HOMEWORK_PROBLEM_ID = #{P_HOMEWORK_PROBLEM_ID},
+ NAME = #{NAME},
+ TYPE = #{TYPE},
+ OPTION_NUM = #{OPTION_NUM},
+ RIGHT_ANSWER = #{RIGHT_ANSWER},
+ SCORE = #{SCORE},
+ PART_SCORE = #{PART_SCORE},
+ HOMEWORKPROBLEM_ID = HOMEWORKPROBLEM_ID
+ where
+ HOMEWORKPROBLEM_ID = #{HOMEWORKPROBLEM_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ HOMEWORKPROBLEM_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/StudentHomeworkInfoMapper.xml b/resources/mybatis1/sunvote/StudentHomeworkInfoMapper.xml
new file mode 100644
index 0000000..de9dbd9
--- /dev/null
+++ b/resources/mybatis1/sunvote/StudentHomeworkInfoMapper.xml
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+ SV_STUDENTHOMEWORKINFO
+
+
+
+
+ HOMEWORK_PROBLEM_ID,
+ RANK,
+ CODE,
+ STUDENT_ID,
+ CLASS_ID,
+ ANSWER,
+ RIGHT,
+ HOMEWORK_ID,
+ STUDENTHOMEWORKINFO_ID
+
+
+
+
+ #{HOMEWORK_PROBLEM_ID},
+ #{RANK},
+ #{CODE},
+ #{STUDENT_ID},
+ #{CLASS_ID},
+ #{ANSWER},
+ #{RIGHT},
+ #{HOMEWORK_ID},
+ #{STUDENTHOMEWORKINFO_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ STUDENTHOMEWORKINFO_ID = #{STUDENTHOMEWORKINFO_ID}
+
+
+
+
+ update
+
+ set
+ HOMEWORK_PROBLEM_ID = #{HOMEWORK_PROBLEM_ID},
+ RANK = #{RANK},
+ CODE = #{CODE},
+ STUDENT_ID = #{STUDENT_ID},
+ CLASS_ID = #{CLASS_ID},
+ ANSWER = #{ANSWER},
+ RIGHT = #{RIGHT},
+ HOMEWORK_ID = #{HOMEWORK_ID},
+ STUDENTHOMEWORKINFO_ID = STUDENTHOMEWORKINFO_ID
+ where
+ STUDENTHOMEWORKINFO_ID = #{STUDENTHOMEWORKINFO_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ STUDENTHOMEWORKINFO_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/mybatis1/sunvote/StudentHomeworkMapper.xml b/resources/mybatis1/sunvote/StudentHomeworkMapper.xml
new file mode 100644
index 0000000..4fe0c3d
--- /dev/null
+++ b/resources/mybatis1/sunvote/StudentHomeworkMapper.xml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+ SV_STUDENTHOMEWORK
+
+
+
+
+ CODE,
+ STUDENT_ID,
+ STUDENT_NAME,
+ HOMEWORK_ID,
+ HOMEWORK_NAME,
+ SUBJECT_ID,
+ CLASS_ID,
+ TEACHER_ID,
+ TEACHER_NAME,
+ SCORE,
+ CREATE_DATE,
+ STUDENTHOMEWORK_ID
+
+
+
+
+ #{CODE},
+ #{STUDENT_ID},
+ #{STUDENT_NAME},
+ #{HOMEWORK_ID},
+ #{HOMEWORK_NAME},
+ #{SUBJECT_ID},
+ #{CLASS_ID},
+ #{TEACHER_ID},
+ #{TEACHER_NAME},
+ #{SCORE},
+ #{CREATE_DATE},
+ #{STUDENTHOMEWORK_ID}
+
+
+
+
+ insert into
+
+ (
+
+ ) values (
+
+ )
+
+
+
+
+ delete from
+
+ where
+ STUDENTHOMEWORK_ID = #{STUDENTHOMEWORK_ID}
+
+
+
+
+ update
+
+ set
+ CODE = #{CODE},
+ STUDENT_ID = #{STUDENT_ID},
+ STUDENT_NAME = #{STUDENT_NAME},
+ HOMEWORK_ID = #{HOMEWORK_ID},
+ HOMEWORK_NAME = #{HOMEWORK_NAME},
+ SUBJECT_ID = #{SUBJECT_ID},
+ CLASS_ID = #{CLASS_ID},
+ TEACHER_ID = #{TEACHER_ID},
+ TEACHER_NAME = #{TEACHER_NAME},
+ SCORE = #{SCORE},
+ CREATE_DATE = #{CREATE_DATE},
+ STUDENTHOMEWORK_ID = STUDENTHOMEWORK_ID
+ where
+ STUDENTHOMEWORK_ID = #{STUDENTHOMEWORK_ID}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from
+
+ where
+ STUDENTHOMEWORK_ID in
+
+ #{item}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java b/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
new file mode 100644
index 0000000..5bbba72
--- /dev/null
+++ b/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
@@ -0,0 +1,215 @@
+package com.fh.controller.sunvote.headmaster;
+
+import java.io.PrintWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.beans.propertyeditors.CustomDateEditor;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.WebDataBinder;
+import org.springframework.web.bind.annotation.InitBinder;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+import com.fh.controller.base.BaseController;
+import com.fh.entity.Page;
+import com.fh.util.AppUtil;
+import com.fh.util.ObjectExcelView;
+import com.fh.util.PageData;
+import com.fh.util.Jurisdiction;
+import com.fh.util.Tools;
+import com.fh.service.sunvote.headmaster.HeadmasterManager;
+
+/**
+ * 说明:班主任
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-08
+ */
+@Controller
+@RequestMapping(value="/headmaster")
+public class HeadmasterController extends BaseController {
+
+ String menuUrl = "headmaster/list.do"; //菜单地址(权限用)
+ @Resource(name="headmasterService")
+ private HeadmasterManager headmasterService;
+
+ /**保存
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/save")
+ public ModelAndView save() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"新增Headmaster");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd.put("HEADMASTER_ID", this.get32UUID()); //主键
+ headmasterService.save(pd);
+ mv.addObject("msg","success");
+ mv.setViewName("save_result");
+ return mv;
+ }
+
+ /**删除
+ * @param out
+ * @throws Exception
+ */
+ @RequestMapping(value="/delete")
+ public void delete(PrintWriter out) throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"删除Headmaster");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ headmasterService.delete(pd);
+ out.write("success");
+ out.close();
+ }
+
+ /**修改
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/edit")
+ public ModelAndView edit() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"修改Headmaster");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ headmasterService.edit(pd);
+ mv.addObject("msg","success");
+ mv.setViewName("save_result");
+ return mv;
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @RequestMapping(value="/list")
+ public ModelAndView list(Page page) throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"列表Headmaster");
+ //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码)
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ String keywords = pd.getString("keywords"); //关键词检索条件
+ if(null != keywords && !"".equals(keywords)){
+ pd.put("keywords", keywords.trim());
+ }
+ page.setPd(pd);
+ List varList = headmasterService.list(page); //列出Headmaster列表
+ mv.setViewName("sunvote/headmaster/headmaster_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/headmaster/headmaster_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = headmasterService.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/headmaster/headmaster_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除Headmaster");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ headmasterService.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出Headmaster到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("姓名"); //1
+ titles.add("用户名"); //2
+ titles.add("密码"); //3
+ titles.add("所在学校"); //4
+ titles.add("权限"); //5
+ titles.add("联系电话"); //6
+ dataMap.put("titles", titles);
+ List varOList = headmasterService.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = homeworkService.list(page); //列出Homework列表
+ mv.setViewName("sunvote/homework/homework_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/homework/homework_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = homeworkService.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/homework/homework_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除Homework");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ homeworkService.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出Homework到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("作业代码"); //1
+ titles.add("作业名称"); //2
+ titles.add("科目ID"); //3
+ titles.add("班级ID"); //4
+ titles.add("年级ID"); //5
+ titles.add("学校ID"); //6
+ titles.add("需要完成时间"); //7
+ titles.add("创建时间"); //8
+ titles.add("修改时间"); //9
+ titles.add("完成次数"); //10
+ titles.add("总分"); //11
+ dataMap.put("titles", titles);
+ List varOList = homeworkService.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = homeworkproblemService.list(page); //列出HomeworkProblem列表
+ mv.setViewName("sunvote/homeworkproblem/homeworkproblem_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/homeworkproblem/homeworkproblem_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = homeworkproblemService.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/homeworkproblem/homeworkproblem_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除HomeworkProblem");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ homeworkproblemService.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出HomeworkProblem到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("作业编号"); //1
+ titles.add("排序号"); //2
+ titles.add("父题ID"); //3
+ titles.add("题目名称"); //4
+ titles.add("题目类型"); //5
+ titles.add("答案个数"); //6
+ titles.add("标准答案"); //7
+ titles.add("分数"); //8
+ titles.add("部分分"); //9
+ dataMap.put("titles", titles);
+ List varOList = homeworkproblemService.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = studenthomeworkService.list(page); //列出StudentHomework列表
+ mv.setViewName("sunvote/studenthomework/studenthomework_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/studenthomework/studenthomework_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = studenthomeworkService.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/studenthomework/studenthomework_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除StudentHomework");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ studenthomeworkService.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出StudentHomework到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("学生代码"); //1
+ titles.add("学生ID"); //2
+ titles.add("学生姓名"); //3
+ titles.add("作业ID"); //4
+ titles.add("作业名称"); //5
+ titles.add("科目ID"); //6
+ titles.add("班级ID"); //7
+ titles.add("教师ID"); //8
+ titles.add("教师姓名"); //9
+ titles.add("得分"); //10
+ titles.add("创建时间"); //11
+ dataMap.put("titles", titles);
+ List varOList = studenthomeworkService.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i varList = studenthomeworkinfoService.list(page); //列出StudentHomeworkInfo列表
+ mv.setViewName("sunvote/studenthomeworkinfo/studenthomeworkinfo_list");
+ mv.addObject("varList", varList);
+ mv.addObject("pd", pd);
+ mv.addObject("QX",Jurisdiction.getHC()); //按钮权限
+ return mv;
+ }
+
+ /**去新增页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goAdd")
+ public ModelAndView goAdd()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ mv.setViewName("sunvote/studenthomeworkinfo/studenthomeworkinfo_edit");
+ mv.addObject("msg", "save");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**去修改页面
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/goEdit")
+ public ModelAndView goEdit()throws Exception{
+ ModelAndView mv = this.getModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ pd = studenthomeworkinfoService.findById(pd); //根据ID读取
+ mv.setViewName("sunvote/studenthomeworkinfo/studenthomeworkinfo_edit");
+ mv.addObject("msg", "edit");
+ mv.addObject("pd", pd);
+ return mv;
+ }
+
+ /**批量删除
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/deleteAll")
+ @ResponseBody
+ public Object deleteAll() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"批量删除StudentHomeworkInfo");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限
+ PageData pd = new PageData();
+ Map map = new HashMap();
+ pd = this.getPageData();
+ List pdList = new ArrayList();
+ String DATA_IDS = pd.getString("DATA_IDS");
+ if(null != DATA_IDS && !"".equals(DATA_IDS)){
+ String ArrayDATA_IDS[] = DATA_IDS.split(",");
+ studenthomeworkinfoService.deleteAll(ArrayDATA_IDS);
+ pd.put("msg", "ok");
+ }else{
+ pd.put("msg", "no");
+ }
+ pdList.add(pd);
+ map.put("list", pdList);
+ return AppUtil.returnObject(pd, map);
+ }
+
+ /**导出到excel
+ * @param
+ * @throws Exception
+ */
+ @RequestMapping(value="/excel")
+ public ModelAndView exportExcel() throws Exception{
+ logBefore(logger, Jurisdiction.getUsername()+"导出StudentHomeworkInfo到excel");
+ if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;}
+ ModelAndView mv = new ModelAndView();
+ PageData pd = new PageData();
+ pd = this.getPageData();
+ Map dataMap = new HashMap();
+ List titles = new ArrayList();
+ titles.add("试题ID"); //1
+ titles.add("排序号"); //2
+ titles.add("作业编号"); //3
+ titles.add("学生ID"); //4
+ titles.add("班级ID"); //5
+ titles.add("答案"); //6
+ titles.add("是否正确"); //7
+ titles.add("作业ID"); //8
+ dataMap.put("titles", titles);
+ List varOList = studenthomeworkinfoService.listAll(pd);
+ List varList = new ArrayList();
+ for(int i=0;i list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/headmaster/impl/HeadmasterService.java b/src/com/fh/service/sunvote/headmaster/impl/HeadmasterService.java
new file mode 100644
index 0000000..4b25a4a
--- /dev/null
+++ b/src/com/fh/service/sunvote/headmaster/impl/HeadmasterService.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.headmaster.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.headmaster.HeadmasterManager;
+
+/**
+ * 说明: 班主任
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-08
+ * @version
+ */
+@Service("headmasterService")
+public class HeadmasterService implements HeadmasterManager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("HeadmasterMapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("HeadmasterMapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("HeadmasterMapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("HeadmasterMapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("HeadmasterMapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("HeadmasterMapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("HeadmasterMapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/homework/HomeworkManager.java b/src/com/fh/service/sunvote/homework/HomeworkManager.java
new file mode 100644
index 0000000..9fb373f
--- /dev/null
+++ b/src/com/fh/service/sunvote/homework/HomeworkManager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.homework;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 作业接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-07
+ * @version
+ */
+public interface HomeworkManager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/homework/impl/HomeworkService.java b/src/com/fh/service/sunvote/homework/impl/HomeworkService.java
new file mode 100644
index 0000000..17c66a3
--- /dev/null
+++ b/src/com/fh/service/sunvote/homework/impl/HomeworkService.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.homework.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.homework.HomeworkManager;
+
+/**
+ * 说明: 作业
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-07
+ * @version
+ */
+@Service("homeworkService")
+public class HomeworkService implements HomeworkManager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("HomeworkMapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("HomeworkMapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("HomeworkMapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("HomeworkMapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("HomeworkMapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("HomeworkMapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("HomeworkMapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/homeworkproblem/HomeworkProblemManager.java b/src/com/fh/service/sunvote/homeworkproblem/HomeworkProblemManager.java
new file mode 100644
index 0000000..d266176
--- /dev/null
+++ b/src/com/fh/service/sunvote/homeworkproblem/HomeworkProblemManager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.homeworkproblem;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 作业题目表接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-07
+ * @version
+ */
+public interface HomeworkProblemManager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/homeworkproblem/impl/HomeworkProblemService.java b/src/com/fh/service/sunvote/homeworkproblem/impl/HomeworkProblemService.java
new file mode 100644
index 0000000..3a697a8
--- /dev/null
+++ b/src/com/fh/service/sunvote/homeworkproblem/impl/HomeworkProblemService.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.homeworkproblem.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.homeworkproblem.HomeworkProblemManager;
+
+/**
+ * 说明: 作业题目表
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-07
+ * @version
+ */
+@Service("homeworkproblemService")
+public class HomeworkProblemService implements HomeworkProblemManager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("HomeworkProblemMapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("HomeworkProblemMapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("HomeworkProblemMapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("HomeworkProblemMapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("HomeworkProblemMapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("HomeworkProblemMapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("HomeworkProblemMapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/studenthomework/StudentHomeworkManager.java b/src/com/fh/service/sunvote/studenthomework/StudentHomeworkManager.java
new file mode 100644
index 0000000..7e7d11e
--- /dev/null
+++ b/src/com/fh/service/sunvote/studenthomework/StudentHomeworkManager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.studenthomework;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 学生作业接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-08
+ * @version
+ */
+public interface StudentHomeworkManager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/studenthomework/impl/StudentHomeworkService.java b/src/com/fh/service/sunvote/studenthomework/impl/StudentHomeworkService.java
new file mode 100644
index 0000000..fcf35ba
--- /dev/null
+++ b/src/com/fh/service/sunvote/studenthomework/impl/StudentHomeworkService.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.studenthomework.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.studenthomework.StudentHomeworkManager;
+
+/**
+ * 说明: 学生作业
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-08
+ * @version
+ */
+@Service("studenthomeworkService")
+public class StudentHomeworkService implements StudentHomeworkManager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("StudentHomeworkMapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("StudentHomeworkMapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("StudentHomeworkMapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("StudentHomeworkMapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("StudentHomeworkMapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("StudentHomeworkMapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("StudentHomeworkMapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/src/com/fh/service/sunvote/studenthomeworkinfo/StudentHomeworkInfoManager.java b/src/com/fh/service/sunvote/studenthomeworkinfo/StudentHomeworkInfoManager.java
new file mode 100644
index 0000000..5a88cc8
--- /dev/null
+++ b/src/com/fh/service/sunvote/studenthomeworkinfo/StudentHomeworkInfoManager.java
@@ -0,0 +1,58 @@
+package com.fh.service.sunvote.studenthomeworkinfo;
+
+import java.util.List;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+
+/**
+ * 说明: 学生作业详细接口
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-08
+ * @version
+ */
+public interface StudentHomeworkInfoManager{
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception;
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception;
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception;
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ public List list(Page page)throws Exception;
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ public List listAll(PageData pd)throws Exception;
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception;
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
+
+}
+
diff --git a/src/com/fh/service/sunvote/studenthomeworkinfo/impl/StudentHomeworkInfoService.java b/src/com/fh/service/sunvote/studenthomeworkinfo/impl/StudentHomeworkInfoService.java
new file mode 100644
index 0000000..98e84c3
--- /dev/null
+++ b/src/com/fh/service/sunvote/studenthomeworkinfo/impl/StudentHomeworkInfoService.java
@@ -0,0 +1,82 @@
+package com.fh.service.sunvote.studenthomeworkinfo.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import com.fh.dao.DaoSupport;
+import com.fh.entity.Page;
+import com.fh.util.PageData;
+import com.fh.service.sunvote.studenthomeworkinfo.StudentHomeworkInfoManager;
+
+/**
+ * 说明: 学生作业详细
+ * 创建人:FH Q313596790
+ * 创建时间:2019-03-08
+ * @version
+ */
+@Service("studenthomeworkinfoService")
+public class StudentHomeworkInfoService implements StudentHomeworkInfoManager{
+
+ @Resource(name = "daoSupport")
+ private DaoSupport dao;
+
+ /**新增
+ * @param pd
+ * @throws Exception
+ */
+ public void save(PageData pd)throws Exception{
+ dao.save("StudentHomeworkInfoMapper.save", pd);
+ }
+
+ /**删除
+ * @param pd
+ * @throws Exception
+ */
+ public void delete(PageData pd)throws Exception{
+ dao.delete("StudentHomeworkInfoMapper.delete", pd);
+ }
+
+ /**修改
+ * @param pd
+ * @throws Exception
+ */
+ public void edit(PageData pd)throws Exception{
+ dao.update("StudentHomeworkInfoMapper.edit", pd);
+ }
+
+ /**列表
+ * @param page
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List list(Page page)throws Exception{
+ return (List)dao.findForList("StudentHomeworkInfoMapper.datalistPage", page);
+ }
+
+ /**列表(全部)
+ * @param pd
+ * @throws Exception
+ */
+ @SuppressWarnings("unchecked")
+ public List listAll(PageData pd)throws Exception{
+ return (List)dao.findForList("StudentHomeworkInfoMapper.listAll", pd);
+ }
+
+ /**通过id获取数据
+ * @param pd
+ * @throws Exception
+ */
+ public PageData findById(PageData pd)throws Exception{
+ return (PageData)dao.findForObject("StudentHomeworkInfoMapper.findById", pd);
+ }
+
+ /**批量删除
+ * @param ArrayDATA_IDS
+ * @throws Exception
+ */
+ public void deleteAll(String[] ArrayDATA_IDS)throws Exception{
+ dao.delete("StudentHomeworkInfoMapper.deleteAll", ArrayDATA_IDS);
+ }
+
+}
+
diff --git a/常用操作数据库功能语句.txt b/常用操作数据库功能语句.txt
new file mode 100644
index 0000000..7a508a4
--- /dev/null
+++ b/常用操作数据库功能语句.txt
@@ -0,0 +1,22 @@
+删除老师和班级名下的测试数据:
+
+-- DELETE
+-- FROM
+-- sv_studenttest
+-- WHERE
+-- TEST_ID IN (
+-- SELECT
+-- TESTPAPER_ID
+-- FROM
+-- sv_testpaper
+-- WHERE
+-- TEACHER_ID = 'e38a18e965bc4d7ca937404a192bcb70'
+-- AND SCLASS_ID = '59d0e1f86bc34ff7920b8d58097e6864'
+-- )
+--
+delete FROM
+ sv_testpaper
+ WHERE
+ TEACHER_ID = 'e38a18e965bc4d7ca937404a192bcb70'
+ AND SCLASS_ID = '59d0e1f86bc34ff7920b8d58097e6864'
+
\ No newline at end of file