diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp index d2ae753..9ee95eb 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp @@ -33,8 +33,7 @@ - -
+
@@ -58,9 +57,7 @@ - - - + 序号 @@ -84,23 +81,24 @@ - - - + ${vs.index+1} - ${var.TITLE} + ${var.TITLE} ${var.CREATE_DATE} ${var.EXAM_TIME} ${var.TEST_NUM} ${var.SCORE} disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩 - + + disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析 + + diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list5.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list5.jsp index be92301..72cb676 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list5.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list5.jsp @@ -108,7 +108,7 @@ ${var.SCORE} disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep.do?MB1=nj&paper_id=${var.PAPER_ID}">查看成绩 - 年级分析 + disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析 diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/test_list3.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/test_list3.jsp index b4f5d93..c007250 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/paper/test_list3.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/paper/test_list3.jsp @@ -37,7 +37,7 @@ - +
@@ -57,13 +57,24 @@
- + ${pd.MB1=="nj"?"年级卷":"个人卷"} > 班级对比 > 答题分析


  - 试卷名称:${pd.PAPER_NAME} + 试卷名称:${pd.PAPER_NAME} +
+ 班级名称: + + +


  试卷总分:${pd.SCORE} @@ -161,14 +172,15 @@ removeOriginal: true }; - $("#simple-table").tablescroller(options); + //$("#simple-table").tablescroller(options); }); function tosearch(){ window.top.loading.remove(); - $("#Form").submit(); + location.href="<%=basePath%>paper/paperRep3.do?PAPER_ID=${pd.PAPER_ID}&CLASS_ID="+$("#CLASS_ID option:selected").val(); + //$("#Form").submit(); } $('#ids').on('click', function(){ @@ -243,7 +255,7 @@ window.top.remove.show(); } function export3(){ - window.open("<%=basePath%>paper/export3?PAPER_ID=${pd.PAPER_ID}","_blank"); + window.open('<%=basePath%>paper/export3?PAPER_ID=${pd.PAPER_ID}&CLASS_ID='+$("#CLASS_ID option:selected").val(),"_blank"); } diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp index 57deabd..218aa8f 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp @@ -269,7 +269,7 @@ }); $("#qingsongkao_paper").click(function() { - var path = "../paper/list2.do?"; + var path = "../paper/list2.do?SCHOOL_ID=${pd.TEACHER.SCHOOL_ID}"; //$(".content_r").html(''); if ($("#mainFrame").attr('src') != (path)) { $("#mainFrame").attr('src', path); @@ -285,7 +285,7 @@ //} }); - var defaultUrl = '${pd.DEFAULTURL}'; + var defaultUrl = '${pd.DEFAULTURL}?SCHOOL_ID=${pd.TEACHER.SCHOOL_ID}'; if (defaultUrl != '' && defaultUrl != '') { $("#mainFrame").attr('src', defaultUrl); } diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp index 39f3a5a..48348c2 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp @@ -126,13 +126,29 @@ ${var.NAME}
-
+ + %
-
${var.GETSCORE }
+ maxFractionDigits="2" />% + + -- +
+
+ + ${var.GETSCORE } + + + -- + +
${var[TEST_ID] }
+ value="${var1.TESTPAPER_ID}" /> + + ${empty var[TEST_ID]?"--":var[TEST_ID]} + +
diff --git a/WebRoot/static/js/control_template.js b/WebRoot/static/js/control_template.js index 7bb70ec..9400e8f 100644 --- a/WebRoot/static/js/control_template.js +++ b/WebRoot/static/js/control_template.js @@ -202,8 +202,11 @@ $(function() { score: $(".section").eq(i).attr("data-fraction") }; } + self.location.href = URL + JSON.stringify(content) + "&page_score=" + total_score; + } + else{ + alert("模板内容不能为空"); } - self.location.href = URL + JSON.stringify(content) + "&page_score=" + total_score; }); /* ajax封装函数 */ diff --git a/resources/mybatis1/sunvote/PaperMapper.xml b/resources/mybatis1/sunvote/PaperMapper.xml index 9ae38f3..30ada3c 100644 --- a/resources/mybatis1/sunvote/PaperMapper.xml +++ b/resources/mybatis1/sunvote/PaperMapper.xml @@ -249,6 +249,29 @@ + + + delete from diff --git a/resources/mybatis1/sunvote/StudentTestMapper.xml b/resources/mybatis1/sunvote/StudentTestMapper.xml index 8f45be2..611365e 100644 --- a/resources/mybatis1/sunvote/StudentTestMapper.xml +++ b/resources/mybatis1/sunvote/StudentTestMapper.xml @@ -108,6 +108,9 @@ LEFT JOIN sv_student on sv_studenttest.STUDENT_ID = sv_student.ID where sv_studenttest.PAPER_ID = #{PAPER_ID} + + and sv_studenttest.CLASS_ID=#{CLASS_ID} + diff --git a/src/com/fh/controller/sunvote/paper/PaperController.java b/src/com/fh/controller/sunvote/paper/PaperController.java index f44bc70..cf1e2d4 100644 --- a/src/com/fh/controller/sunvote/paper/PaperController.java +++ b/src/com/fh/controller/sunvote/paper/PaperController.java @@ -734,7 +734,9 @@ public class PaperController extends BaseController { public ModelAndView paperRep3() throws Exception { ModelAndView mv = this.getModelAndView(); PageData pd = new PageData(); + pd=this.getPageData(); List temp = new ArrayList(); + List sclass_list = new ArrayList(); PageData saveData = new PageData(); ResponseGson res = new ResponseGson(); @@ -750,9 +752,13 @@ public class PaperController extends BaseController { List sid = new ArrayList(); Integer test_num = 0; Integer lost_num = 0; + List classId = new ArrayList(); + PageData sclass = new PageData(); for (PageData item : list) { PageData p = new PageData(); + + p.put("ID", item.getString("STUDENT_ID")); PageData student = stundentService.findById(p); if (student != null) { @@ -793,6 +799,13 @@ public class PaperController extends BaseController { PageData stu = new PageData(); stu.put("STUDENT_NAME", item.get("STUDENT_NAME")); stu.put("CLASS_NAME", item.get("CLASS_NAME")); + if(!classId.contains(item.getString("CLASS_ID"))){ + classId.add(item.getString("CLASS_ID")); + sclass.put("CLASS_ID", item.get("CLASS_ID")); + sclass.put("CLASS_NAME", item.get("CLASS_NAME")); + sclass_list.add(sclass); + } + List testList = new ArrayList(); PageData test = new PageData(); test.put("CREATE_DATE", item.get("CREATE_DATE")); @@ -810,6 +823,7 @@ public class PaperController extends BaseController { stu.put("LOST_NUM", lost_num); sid.add(item.getString("STUDENT_ID")); temp.add(stu); + } } } @@ -829,7 +843,9 @@ public class PaperController extends BaseController { } }); + mv.setViewName("sunvote/paper/test_list3"); + mv.addObject("sclass", sclass_list); mv.addObject("varList", temp); mv.addObject("pd", pd); res.setData(saveData); @@ -1171,7 +1187,7 @@ public class PaperController extends BaseController { pd.put("USER_ID", userID); pd.put("PAPER_TYPE", "1"); page.setPd(pd); - List varList = paperService.list(page); // 列出Paper列表 + List varList = paperService.listAllBySidAndTid(pd); // 列出Paper列表 page.setLangIsChina(isChineseLanguageClient()); if (isChineseLanguageClient()) { mv.setViewName("sunvote/paper/paper_list2"); diff --git a/src/com/fh/controller/sunvote/report/ReportController.java b/src/com/fh/controller/sunvote/report/ReportController.java index 997b11f..744f018 100644 --- a/src/com/fh/controller/sunvote/report/ReportController.java +++ b/src/com/fh/controller/sunvote/report/ReportController.java @@ -90,6 +90,7 @@ public class ReportController extends BaseController { List reportData = v1Service.classReport(pd); List testpaperList = new ArrayList(); List studentList = new ArrayList(); + List studentId = new ArrayList(); PageData studentPd = null; double totalScore = 0 ; double getScore = 0 ; @@ -128,6 +129,7 @@ public class ReportController extends BaseController { studentPd.put("TOTALSCORE", totalScore); studentPd.put("GETSCORE", getScore); studentList.add(studentPd); + studentId.add(studentPd.getString("STUDENT_ID")); totalScore = 0 ; getScore = 0 ; } @@ -173,6 +175,7 @@ public class ReportController extends BaseController { studentPd.put("TOTALSCORE", totalScore); studentPd.put("GETSCORE", getScore); studentList.add(studentPd); + studentId.add(studentPd.getString("STUDENT_ID")); totalScore = 0 ; getScore = 0 ; } @@ -190,7 +193,14 @@ public class ReportController extends BaseController { mv.addObject("testpaperList", testpaperList); info.put("testsize", testpaperList != null ? testpaperList.size() : 0); - + List student_class = studentService.findByClassId(pd); + for(int x = 0;x listAllByType(PageData pd)throws Exception; + public List listAllBySidAndTid(PageData pd)throws Exception; + + /**列表(全部) * @param pd * @throws Exception diff --git a/src/com/fh/service/sunvote/paper/impl/PaperService.java b/src/com/fh/service/sunvote/paper/impl/PaperService.java index 44dde4f..dffb7d9 100644 --- a/src/com/fh/service/sunvote/paper/impl/PaperService.java +++ b/src/com/fh/service/sunvote/paper/impl/PaperService.java @@ -1,12 +1,15 @@ package com.fh.service.sunvote.paper.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.paper.PaperManager; +import com.fh.util.PageData; /** * 说明: 试卷 @@ -70,6 +73,17 @@ public class PaperService implements PaperManager{ return (List)dao.findForList("PaperMapper.listAllByTypelistPage", pd);//.*listPage.* } + + /**列表(全部) + * @param pd + * @throws Exception + */ + @SuppressWarnings("unchecked") + public List listAllBySidAndTid(PageData pd)throws Exception{ + return (List)dao.findForList("PaperMapper.listAllBySidAndTid", pd);//.*listPage.* + } + + /**列表(全部) * @param pd * @throws Exception