diff --git a/WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit.jsp b/WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit.jsp index 8a06184..ae73386 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/coursemanagement/coursemanagement_edit.jsp @@ -34,8 +34,7 @@ 老师: - <%-- --%> - @@ -54,6 +53,16 @@ + 年级: + + + + + 科目: <%-- --%> @@ -66,24 +75,14 @@ 学期: + + - <%-- - 开始时间: - - - - 结束时间: - - - - 备注: - - --%> 保存 diff --git a/resources/mybatis1/sunvote/CourseManagementMapper.xml b/resources/mybatis1/sunvote/CourseManagementMapper.xml index f917867..07b0456 100644 --- a/resources/mybatis1/sunvote/CourseManagementMapper.xml +++ b/resources/mybatis1/sunvote/CourseManagementMapper.xml @@ -38,6 +38,7 @@ insert into ( + ID, TEACHER_ID, CLASS_ID, SUBJECT_ID, @@ -47,6 +48,7 @@ TERM_ID, REMARK ) values ( + #{ID}, #{TEACHER_ID}, #{CLASS_ID}, #{SUBJECT_ID}, @@ -79,7 +81,7 @@ REMARK = #{REMARK}, GRADE_ID = #{GRADE_ID}, TERM_ID = #{TERM_ID}, - ID = ${ID} + ID = ID where ID = #{ID} diff --git a/resources/mybatis1/sunvote/TeacherMapper.xml b/resources/mybatis1/sunvote/TeacherMapper.xml index f1c5864..182617d 100644 --- a/resources/mybatis1/sunvote/TeacherMapper.xml +++ b/resources/mybatis1/sunvote/TeacherMapper.xml @@ -91,7 +91,7 @@ SEX = #{SEX}, SUBJECT_IDS = #{SUBJECT_IDS}, KEYPAD_ID = #{KEYPAD_ID}, - ID = ${ID} + ID = ID where ID = #{ID} diff --git a/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java b/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java index 6efff7e..142597d 100644 --- a/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java +++ b/src/com/fh/controller/sunvote/coursemanagement/CourseManagementController.java @@ -27,6 +27,7 @@ import com.fh.util.PageData; import com.fh.util.Jurisdiction; import com.fh.util.Tools; import com.fh.service.sunvote.coursemanagement.CourseManagementManager; +import com.fh.service.sunvote.grade.GradeManager; import com.fh.service.sunvote.sclass.SClassManager; import com.fh.service.sunvote.subject.SubjectManager; import com.fh.service.sunvote.teacher.TeacherManager; @@ -57,6 +58,9 @@ public class CourseManagementController extends BaseController { @Resource(name="termService") private TermManager termService; + @Resource(name="gradeService") + private GradeManager gradeService; + /**保存 * @param * @throws Exception @@ -68,6 +72,7 @@ public class CourseManagementController extends BaseController { ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); + pd.put("ID", this.get32UUID()); coursemanagementService.save(pd); mv.addObject("msg","success"); mv.setViewName("save_result"); @@ -176,6 +181,8 @@ public class CourseManagementController extends BaseController { mv.addObject("subjects", subjects); List terms = termService.listAll(pd); mv.addObject("terms", terms); + List grades = gradeService.listAll(pd); + mv.addObject("grades", grades); mv.addObject("msg", "edit"); mv.addObject("pd", pd);