Commit 694fbd54462ec5e9a892ca47f569a81311b34191
1 parent
be2f84a1
添加作业管理模块
Showing
4 changed files
with
57 additions
and
4 deletions
resources/mybatis1/sunvote/HomeworkMapper.xml
| ... | ... | @@ -20,6 +20,7 @@ |
| 20 | 20 | MODIFY_DATE, |
| 21 | 21 | COMPLETE_COUNT, |
| 22 | 22 | ALL_SCORE, |
| 23 | + TEACHER_ID, | |
| 23 | 24 | HOMEWORK_ID |
| 24 | 25 | </sql> |
| 25 | 26 | |
| ... | ... | @@ -36,6 +37,7 @@ |
| 36 | 37 | #{MODIFY_DATE}, |
| 37 | 38 | #{COMPLETE_COUNT}, |
| 38 | 39 | #{ALL_SCORE}, |
| 40 | + #{TEACHER_ID}, | |
| 39 | 41 | #{HOMEWORK_ID} |
| 40 | 42 | </sql> |
| 41 | 43 | |
| ... | ... | @@ -74,6 +76,7 @@ |
| 74 | 76 | MODIFY_DATE = #{MODIFY_DATE}, |
| 75 | 77 | COMPLETE_COUNT = #{COMPLETE_COUNT}, |
| 76 | 78 | ALL_SCORE = #{ALL_SCORE}, |
| 79 | + TEACHER_ID = #{TEACHER_ID}, | |
| 77 | 80 | HOMEWORK_ID = HOMEWORK_ID |
| 78 | 81 | where |
| 79 | 82 | HOMEWORK_ID = #{HOMEWORK_ID} |
| ... | ... | @@ -114,6 +117,27 @@ |
| 114 | 117 | <include refid="Field"></include> |
| 115 | 118 | from |
| 116 | 119 | <include refid="tableName"></include> |
| 120 | + where 1 = 1 | |
| 121 | + <if test="pd.SUBJECT_ID != null and pd.SUBJECT_ID != ''"><!-- 关键词检索 --> | |
| 122 | + and SUBJECT_ID = #{SUBJECT_ID} | |
| 123 | + </if> | |
| 124 | + <if test="pd.CLASS_ID != null and pd.CLASS_ID != ''"><!-- 关键词检索 --> | |
| 125 | + and CLASS_ID = #{CLASS_ID} | |
| 126 | + </if> | |
| 127 | + <if test="pd.GRADE_ID != null and pd.GRADE_ID != ''"><!-- 关键词检索 --> | |
| 128 | + and GRADE_ID = #{GRADE_ID} | |
| 129 | + </if> | |
| 130 | + <if test="pd.SCHOOL_ID != null and pd.SCHOOL_ID != ''"><!-- 关键词检索 --> | |
| 131 | + and SCHOOL_ID = #{SCHOOL_ID} | |
| 132 | + </if> | |
| 133 | + <if test="pd.TEACHER_ID != null and pd.TEACHER_ID != ''"><!-- 关键词检索 --> | |
| 134 | + and TEACHER_ID = #{TEACHER_ID} | |
| 135 | + </if> | |
| 136 | + <if test="pd.COMPLETE != null and pd.COMPLETE != ''"><!-- 关键词检索 --> | |
| 137 | + and COMPLETE_DATE > #{COMPLETE_DATE} | |
| 138 | + </if> | |
| 139 | + | |
| 140 | + | |
| 117 | 141 | </select> |
| 118 | 142 | |
| 119 | 143 | <!-- 批量删除 --> | ... | ... |
resources/mybatis1/sunvote/TeacherMapper.xml
| ... | ... | @@ -19,6 +19,7 @@ |
| 19 | 19 | SEX, |
| 20 | 20 | SUBJECT_IDS, |
| 21 | 21 | KEYPAD_ID, |
| 22 | + HEADMASTER, | |
| 22 | 23 | ID |
| 23 | 24 | </sql> |
| 24 | 25 | |
| ... | ... | @@ -34,6 +35,7 @@ |
| 34 | 35 | #{SEX}, |
| 35 | 36 | #{SUBJECT_IDS}, |
| 36 | 37 | #{KEYPAD_ID}, |
| 38 | + #{HEADMASTER}, | |
| 37 | 39 | #{ID} |
| 38 | 40 | </sql> |
| 39 | 41 | |
| ... | ... | @@ -52,6 +54,7 @@ |
| 52 | 54 | PASSWORD, |
| 53 | 55 | SEX, |
| 54 | 56 | SUBJECT_IDS, |
| 57 | + HEADMASTER, | |
| 55 | 58 | KEYPAD_ID |
| 56 | 59 | ) values ( |
| 57 | 60 | #{ID}, |
| ... | ... | @@ -64,6 +67,7 @@ |
| 64 | 67 | #{PASSWORD}, |
| 65 | 68 | #{SEX}, |
| 66 | 69 | #{SUBJECT_IDS}, |
| 70 | + #{HEADMASTER}, | |
| 67 | 71 | #{KEYPAD_ID} |
| 68 | 72 | ) |
| 69 | 73 | </insert> |
| ... | ... | @@ -91,6 +95,7 @@ |
| 91 | 95 | SEX = #{SEX}, |
| 92 | 96 | SUBJECT_IDS = #{SUBJECT_IDS}, |
| 93 | 97 | KEYPAD_ID = #{KEYPAD_ID}, |
| 98 | + HEADMASTER = #{HEADMASTER}, | |
| 94 | 99 | ID = ID |
| 95 | 100 | where |
| 96 | 101 | ID = #{ID} | ... | ... |
src/com/fh/controller/api/V1.java
| ... | ... | @@ -45,6 +45,7 @@ import com.fh.service.sunvote.classtype.ClassTypeManager; |
| 45 | 45 | import com.fh.service.sunvote.coursemanagement.CourseManagementManager; |
| 46 | 46 | import com.fh.service.sunvote.event.EventManager; |
| 47 | 47 | import com.fh.service.sunvote.grade.GradeManager; |
| 48 | +import com.fh.service.sunvote.homework.HomeworkManager; | |
| 48 | 49 | import com.fh.service.sunvote.keypad.KeypadManager; |
| 49 | 50 | import com.fh.service.sunvote.keypadcheck.KeypadCheckManager; |
| 50 | 51 | import com.fh.service.sunvote.knowledge.KnowledgeManager; |
| ... | ... | @@ -135,7 +136,10 @@ public class V1 extends BaseController { |
| 135 | 136 | |
| 136 | 137 | @Resource(name = "sclassService") |
| 137 | 138 | private SClassManager sclassService; |
| 138 | - | |
| 139 | + | |
| 140 | + @Resource(name="homeworkService") | |
| 141 | + private HomeworkManager homeworkService; | |
| 142 | + | |
| 139 | 143 | @Resource(name = "studentService") |
| 140 | 144 | private StudentManager studentService; |
| 141 | 145 | |
| ... | ... | @@ -2792,6 +2796,24 @@ public class V1 extends BaseController { |
| 2792 | 2796 | return res.toJson(); |
| 2793 | 2797 | |
| 2794 | 2798 | } |
| 2799 | + | |
| 2800 | + /** | |
| 2801 | + * 获取作业列表 | |
| 2802 | + * | |
| 2803 | + * @param id | |
| 2804 | + * @return | |
| 2805 | + * @throws Exception | |
| 2806 | + */ | |
| 2807 | + @RequestMapping(value = "/listhomework", produces = "application/json;charset=UTF-8") | |
| 2808 | + @ResponseBody | |
| 2809 | + public String listhomework() throws Exception { | |
| 2810 | + ResponseGson<List<PageData>> res = new ResponseGson<List<PageData>>(); | |
| 2811 | + PageData pageData = this.getPageData(); | |
| 2812 | + List<PageData> list = homeworkService.listAll(pageData); | |
| 2813 | + res.setData(list); | |
| 2814 | + return res.toJson(); | |
| 2815 | + | |
| 2816 | + } | |
| 2795 | 2817 | |
| 2796 | 2818 | /** |
| 2797 | 2819 | * 根据ID班级名称 | ... | ... |
src/com/fh/controller/sunvote/headmaster/HeadmasterController.java
| ... | ... | @@ -8,7 +8,9 @@ import java.util.Date; |
| 8 | 8 | import java.util.HashMap; |
| 9 | 9 | import java.util.List; |
| 10 | 10 | import java.util.Map; |
| 11 | + | |
| 11 | 12 | import javax.annotation.Resource; |
| 13 | + | |
| 12 | 14 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
| 13 | 15 | import org.springframework.stereotype.Controller; |
| 14 | 16 | import org.springframework.web.bind.WebDataBinder; |
| ... | ... | @@ -16,14 +18,14 @@ import org.springframework.web.bind.annotation.InitBinder; |
| 16 | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
| 17 | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
| 18 | 20 | import org.springframework.web.servlet.ModelAndView; |
| 21 | + | |
| 19 | 22 | import com.fh.controller.base.BaseController; |
| 20 | 23 | import com.fh.entity.Page; |
| 24 | +import com.fh.service.sunvote.headmaster.HeadmasterManager; | |
| 21 | 25 | import com.fh.util.AppUtil; |
| 26 | +import com.fh.util.Jurisdiction; | |
| 22 | 27 | import com.fh.util.ObjectExcelView; |
| 23 | 28 | import com.fh.util.PageData; |
| 24 | -import com.fh.util.Jurisdiction; | |
| 25 | -import com.fh.util.Tools; | |
| 26 | -import com.fh.service.sunvote.headmaster.HeadmasterManager; | |
| 27 | 29 | |
| 28 | 30 | /** |
| 29 | 31 | * 说明:班主任 | ... | ... |