diff --git a/resources/mybatis1/sunvote/HomeworkMapper.xml b/resources/mybatis1/sunvote/HomeworkMapper.xml
index e9aa7b6..a09a212 100644
--- a/resources/mybatis1/sunvote/HomeworkMapper.xml
+++ b/resources/mybatis1/sunvote/HomeworkMapper.xml
@@ -20,6 +20,7 @@
MODIFY_DATE,
COMPLETE_COUNT,
ALL_SCORE,
+ TEACHER_ID,
HOMEWORK_ID
@@ -36,6 +37,7 @@
#{MODIFY_DATE},
#{COMPLETE_COUNT},
#{ALL_SCORE},
+ #{TEACHER_ID},
#{HOMEWORK_ID}
@@ -74,6 +76,7 @@
MODIFY_DATE = #{MODIFY_DATE},
COMPLETE_COUNT = #{COMPLETE_COUNT},
ALL_SCORE = #{ALL_SCORE},
+ TEACHER_ID = #{TEACHER_ID},
HOMEWORK_ID = HOMEWORK_ID
where
HOMEWORK_ID = #{HOMEWORK_ID}
@@ -114,6 +117,27 @@
from
+ where 1 = 1
+
+ and SUBJECT_ID = #{SUBJECT_ID}
+
+
+ and CLASS_ID = #{CLASS_ID}
+
+
+ and GRADE_ID = #{GRADE_ID}
+
+
+ and SCHOOL_ID = #{SCHOOL_ID}
+
+
+ and TEACHER_ID = #{TEACHER_ID}
+
+
+ and COMPLETE_DATE > #{COMPLETE_DATE}
+
+
+
diff --git a/resources/mybatis1/sunvote/TeacherMapper.xml b/resources/mybatis1/sunvote/TeacherMapper.xml
index 8686ee2..4bfec78 100644
--- a/resources/mybatis1/sunvote/TeacherMapper.xml
+++ b/resources/mybatis1/sunvote/TeacherMapper.xml
@@ -19,6 +19,7 @@
SEX,
SUBJECT_IDS,
KEYPAD_ID,
+ HEADMASTER,
ID
@@ -34,6 +35,7 @@
#{SEX},
#{SUBJECT_IDS},
#{KEYPAD_ID},
+ #{HEADMASTER},
#{ID}
@@ -52,6 +54,7 @@
PASSWORD,
SEX,
SUBJECT_IDS,
+ HEADMASTER,
KEYPAD_ID
) values (
#{ID},
@@ -64,6 +67,7 @@
#{PASSWORD},
#{SEX},
#{SUBJECT_IDS},
+ #{HEADMASTER},
#{KEYPAD_ID}
)
@@ -91,6 +95,7 @@
SEX = #{SEX},
SUBJECT_IDS = #{SUBJECT_IDS},
KEYPAD_ID = #{KEYPAD_ID},
+ HEADMASTER = #{HEADMASTER},
ID = ID
where
ID = #{ID}
diff --git a/src/com/fh/controller/api/V1.java b/src/com/fh/controller/api/V1.java
index 0c43ff1..3510294 100644
--- a/src/com/fh/controller/api/V1.java
+++ b/src/com/fh/controller/api/V1.java
@@ -45,6 +45,7 @@ import com.fh.service.sunvote.classtype.ClassTypeManager;
import com.fh.service.sunvote.coursemanagement.CourseManagementManager;
import com.fh.service.sunvote.event.EventManager;
import com.fh.service.sunvote.grade.GradeManager;
+import com.fh.service.sunvote.homework.HomeworkManager;
import com.fh.service.sunvote.keypad.KeypadManager;
import com.fh.service.sunvote.keypadcheck.KeypadCheckManager;
import com.fh.service.sunvote.knowledge.KnowledgeManager;
@@ -135,7 +136,10 @@ public class V1 extends BaseController {
@Resource(name = "sclassService")
private SClassManager sclassService;
-
+
+ @Resource(name="homeworkService")
+ private HomeworkManager homeworkService;
+
@Resource(name = "studentService")
private StudentManager studentService;
@@ -2792,6 +2796,24 @@ public class V1 extends BaseController {
return res.toJson();
}
+
+ /**
+ * 获取作业列表
+ *
+ * @param id
+ * @return
+ * @throws Exception
+ */
+ @RequestMapping(value = "/listhomework", produces = "application/json;charset=UTF-8")
+ @ResponseBody
+ public String listhomework() throws Exception {
+ ResponseGson> res = new ResponseGson>();
+ PageData pageData = this.getPageData();
+ List list = homeworkService.listAll(pageData);
+ res.setData(list);
+ return res.toJson();
+
+ }
/**
* 根据ID班级名称
diff --git a/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java b/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
index 5bbba72..5293d9a 100644
--- a/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
+++ b/src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
@@ -8,7 +8,9 @@ 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;
@@ -16,14 +18,14 @@ 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.service.sunvote.headmaster.HeadmasterManager;
import com.fh.util.AppUtil;
+import com.fh.util.Jurisdiction;
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;
/**
* 说明:班主任