Commit 78353cf9a21c8c7cc61545144bea9a03dc8eaad4
1 parent
8791e5b3
1.增加老师端可以看到年级卷
2.考试情况中显示出班级所有学生 3.年级分析报表中增加班级筛选
Showing
12 changed files
with
125 additions
and
27 deletions
WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp
| @@ -33,8 +33,7 @@ | @@ -33,8 +33,7 @@ | ||
| 33 | <![endif]--> | 33 | <![endif]--> |
| 34 | </head> | 34 | </head> |
| 35 | <body> | 35 | <body> |
| 36 | - | ||
| 37 | - <form action="../paper/list2.do" method="post" name="Form" id="Form"> | 36 | + <form action="../paper/list2.do?SCHOOL_ID=${pd.SCHOOL_ID }" method="post" name="Form" id="Form"> |
| 38 | <div class="head_box"> | 37 | <div class="head_box"> |
| 39 | <div class="box_header"> | 38 | <div class="box_header"> |
| 40 | <div class="head_box_l"> | 39 | <div class="head_box_l"> |
| @@ -58,9 +57,7 @@ | @@ -58,9 +57,7 @@ | ||
| 58 | <col style="width: 10%" /> | 57 | <col style="width: 10%" /> |
| 59 | <col style="width: 10%" /> | 58 | <col style="width: 10%" /> |
| 60 | <col style="width: 10%" /> | 59 | <col style="width: 10%" /> |
| 61 | - <col style="width: 10%" /> | ||
| 62 | - <col style="width: 10%" /> | ||
| 63 | - <col style="width: 10%" /> | 60 | + <col style="width: 17%" /> |
| 64 | <thead> | 61 | <thead> |
| 65 | <tr> | 62 | <tr> |
| 66 | <th><input type="checkbox" name='ids' id="ids" />序号</th> | 63 | <th><input type="checkbox" name='ids' id="ids" />序号</th> |
| @@ -84,23 +81,24 @@ | @@ -84,23 +81,24 @@ | ||
| 84 | <col style="width: 10%" /> | 81 | <col style="width: 10%" /> |
| 85 | <col style="width: 10%" /> | 82 | <col style="width: 10%" /> |
| 86 | <col style="width: 10%" /> | 83 | <col style="width: 10%" /> |
| 87 | - <col style="width: 10%" /> | ||
| 88 | - <col style="width: 10%" /> | ||
| 89 | - <col style="width: 10%" /> | 84 | + <col style="width: 17%" /> |
| 90 | <tbody> | 85 | <tbody> |
| 91 | <c:choose> | 86 | <c:choose> |
| 92 | <c:when test="${not empty varList}"> | 87 | <c:when test="${not empty varList}"> |
| 93 | <c:forEach items="${varList}" var="var" varStatus="vs"> | 88 | <c:forEach items="${varList}" var="var" varStatus="vs"> |
| 94 | <tr> | 89 | <tr> |
| 95 | <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td> | 90 | <td><input type="checkbox" name='ids' id="ids" value="${var.PAPER_ID}"/>${vs.index+1}</td> |
| 96 | - <td ><a target="_blank" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.PAPER_ID}">${var.TITLE}</a></td> | 91 | + <td ><a target="_blank" style="display: inline-block;width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap" href="<%=basePath%>paper/iteminfo.do?paper_id=${var.PAPER_ID}" title="${var.TITLE}">${var.TITLE}</a></td> |
| 97 | <td >${var.CREATE_DATE}</td> | 92 | <td >${var.CREATE_DATE}</td> |
| 98 | <td >${var.EXAM_TIME}</td> | 93 | <td >${var.EXAM_TIME}</td> |
| 99 | <td >${var.TEST_NUM}</td> | 94 | <td >${var.TEST_NUM}</td> |
| 100 | <td >${var.SCORE}</td> | 95 | <td >${var.SCORE}</td> |
| 101 | <td> | 96 | <td> |
| 102 | <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩</a> | 97 | <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩</a> |
| 103 | - <a href="#" onclick="del('${var.PAPER_ID}');"><img src="../static/images/remove.png" /></a> | 98 | + <c:if test="${var.PAPER_TYPE ==2 }"> |
| 99 | + <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析</a> | ||
| 100 | + </c:if> | ||
| 101 | + <a href="#" onclick="del('${var.PAPER_ID}');" style="float:right"><img src="../static/images/remove.png" /></a> | ||
| 104 | </td> | 102 | </td> |
| 105 | </tr> | 103 | </tr> |
| 106 | 104 |
WebRoot/WEB-INF/jsp/sunvote/paper/paper_list5.jsp
| @@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
| 108 | <td >${var.SCORE}</td> | 108 | <td >${var.SCORE}</td> |
| 109 | <td> | 109 | <td> |
| 110 | <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep.do?MB1=nj&paper_id=${var.PAPER_ID}">查看成绩</a> | 110 | <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep.do?MB1=nj&paper_id=${var.PAPER_ID}">查看成绩</a> |
| 111 | - <a href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析</a> | 111 | + <a <c:if test="${var.TEST_NUM == 0}" >disabled style="pointer-events:none;color:#ccc" </c:if> href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析</a> |
| 112 | <a href="#" onclick="del('${var.PAPER_ID}');"><img src="../static/images/remove.png" /></a> | 112 | <a href="#" onclick="del('${var.PAPER_ID}');"><img src="../static/images/remove.png" /></a> |
| 113 | </td> | 113 | </td> |
| 114 | </tr> | 114 | </tr> |
WebRoot/WEB-INF/jsp/sunvote/paper/test_list3.jsp
| @@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
| 37 | </head> | 37 | </head> |
| 38 | <body> | 38 | <body> |
| 39 | 39 | ||
| 40 | - <form action="../paper/list4.do" method="post" name="Form" id="Form"> | 40 | + <form action="../paper/paperRep3.do" method="post" name="Form" id="Form"> |
| 41 | <div class="head_box"> | 41 | <div class="head_box"> |
| 42 | <div class="box_header"> | 42 | <div class="box_header"> |
| 43 | <div class="head_box_l"> | 43 | <div class="head_box_l"> |
| @@ -57,13 +57,24 @@ | @@ -57,13 +57,24 @@ | ||
| 57 | </div> | 57 | </div> |
| 58 | <div class="table_box" style="padding:0 5%;background:#fff;"> | 58 | <div class="table_box" style="padding:0 5%;background:#fff;"> |
| 59 | <div style="padding:15px 0;background:#fff;" class="paper_title"> | 59 | <div style="padding:15px 0;background:#fff;" class="paper_title"> |
| 60 | - | 60 | + <input type="hidden" name="PAPER_ID" id="PAPER_ID" valu="${pd.PAPER_ID }" /> |
| 61 | ${pd.MB1=="nj"?"年级卷":"个人卷"} > 班级对比 > 答题分析 | 61 | ${pd.MB1=="nj"?"年级卷":"个人卷"} > 班级对比 > 答题分析 |
| 62 | <br/> | 62 | <br/> |
| 63 | <br/> | 63 | <br/> |
| 64 | <br/> | 64 | <br/> |
| 65 | | 65 | |
| 66 | - <b>试卷名称:</b>${pd.PAPER_NAME} | 66 | + <b>试卷名称:</b>${pd.PAPER_NAME} |
| 67 | + <div style="float:right"> | ||
| 68 | + <b>班级名称:</b> | ||
| 69 | + <select class="chosen-select form-control" style="width:120px; display:inline-block" name="CLASS_ID" id="CLASS_ID" data-placeholder="选择班级"> | ||
| 70 | + <option value="">全部</option> | ||
| 71 | + <c:forEach var="item" items="${sclass}"> | ||
| 72 | + <option value="${item.CLASS_ID}" <c:if test="${pd.CLASS_ID==item.CLASS_ID}">selected="true"</c:if>>${item.CLASS_NAME}</option> | ||
| 73 | + </c:forEach> | ||
| 74 | + </select> | ||
| 75 | + <a href="#" onclick="tosearch();"><img | ||
| 76 | + src="../static/images/search.png" /></a> | ||
| 77 | + </div> | ||
| 67 | <br> | 78 | <br> |
| 68 | <br> | 79 | <br> |
| 69 | <b>试卷总分:</b>${pd.SCORE} | 80 | <b>试卷总分:</b>${pd.SCORE} |
| @@ -161,14 +172,15 @@ | @@ -161,14 +172,15 @@ | ||
| 161 | removeOriginal: true | 172 | removeOriginal: true |
| 162 | }; | 173 | }; |
| 163 | 174 | ||
| 164 | - $("#simple-table").tablescroller(options); | 175 | + //$("#simple-table").tablescroller(options); |
| 165 | }); | 176 | }); |
| 166 | 177 | ||
| 167 | 178 | ||
| 168 | 179 | ||
| 169 | function tosearch(){ | 180 | function tosearch(){ |
| 170 | window.top.loading.remove(); | 181 | window.top.loading.remove(); |
| 171 | - $("#Form").submit(); | 182 | + location.href="<%=basePath%>paper/paperRep3.do?PAPER_ID=${pd.PAPER_ID}&CLASS_ID="+$("#CLASS_ID option:selected").val(); |
| 183 | + //$("#Form").submit(); | ||
| 172 | } | 184 | } |
| 173 | 185 | ||
| 174 | $('#ids').on('click', function(){ | 186 | $('#ids').on('click', function(){ |
| @@ -243,7 +255,7 @@ | @@ -243,7 +255,7 @@ | ||
| 243 | window.top.remove.show(); | 255 | window.top.remove.show(); |
| 244 | } | 256 | } |
| 245 | function export3(){ | 257 | function export3(){ |
| 246 | - window.open("<%=basePath%>paper/export3?PAPER_ID=${pd.PAPER_ID}","_blank"); | 258 | + window.open('<%=basePath%>paper/export3?PAPER_ID=${pd.PAPER_ID}&CLASS_ID='+$("#CLASS_ID option:selected").val(),"_blank"); |
| 247 | } | 259 | } |
| 248 | 260 | ||
| 249 | </script> | 261 | </script> |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
| @@ -269,7 +269,7 @@ | @@ -269,7 +269,7 @@ | ||
| 269 | }); | 269 | }); |
| 270 | 270 | ||
| 271 | $("#qingsongkao_paper").click(function() { | 271 | $("#qingsongkao_paper").click(function() { |
| 272 | - var path = "../paper/list2.do?"; | 272 | + var path = "../paper/list2.do?SCHOOL_ID=${pd.TEACHER.SCHOOL_ID}"; |
| 273 | //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>'); | 273 | //$(".content_r").html('<iframe name="mainFrame" id="mainFrame" frameborder="0" style="width:100%;height:'+$(".content_l").height()+'px;" src=' + path + '></iframe>'); |
| 274 | if ($("#mainFrame").attr('src') != (path)) { | 274 | if ($("#mainFrame").attr('src') != (path)) { |
| 275 | $("#mainFrame").attr('src', path); | 275 | $("#mainFrame").attr('src', path); |
| @@ -285,7 +285,7 @@ | @@ -285,7 +285,7 @@ | ||
| 285 | //} | 285 | //} |
| 286 | }); | 286 | }); |
| 287 | 287 | ||
| 288 | - var defaultUrl = '${pd.DEFAULTURL}'; | 288 | + var defaultUrl = '${pd.DEFAULTURL}?SCHOOL_ID=${pd.TEACHER.SCHOOL_ID}'; |
| 289 | if (defaultUrl != '' && defaultUrl != '') { | 289 | if (defaultUrl != '' && defaultUrl != '') { |
| 290 | $("#mainFrame").attr('src', defaultUrl); | 290 | $("#mainFrame").attr('src', defaultUrl); |
| 291 | } | 291 | } |
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp
| @@ -126,13 +126,29 @@ | @@ -126,13 +126,29 @@ | ||
| 126 | ${var.NAME} | 126 | ${var.NAME} |
| 127 | </div> | 127 | </div> |
| 128 | </td> | 128 | </td> |
| 129 | - <td class="center"><div style="width:150px;"><fmt:formatNumber type="number" | 129 | + <td class="center"><div style="width:150px;"> |
| 130 | + <c:if test="${not empty var.GETSCORE}"> | ||
| 131 | + <fmt:formatNumber type="number" | ||
| 130 | value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" | 132 | value="${var.TOTALSCORE == 0 ? 0: (var.GETSCORE / var.TOTALSCORE * 100)}" |
| 131 | - maxFractionDigits="2" />%</div></td> | ||
| 132 | - <td class="center"><div style="width:80px;margin:0 auto;">${var.GETSCORE }</div></td> | 133 | + maxFractionDigits="2" />% |
| 134 | + </c:if> | ||
| 135 | + <c:if test="${empty var.GETSCORE }">--</c:if> | ||
| 136 | + </div></td> | ||
| 137 | + <td class="center"><div style="width:80px;margin:0 auto;"> | ||
| 138 | + <c:if test="${not empty var.GETSCORE}"> | ||
| 139 | + ${var.GETSCORE } | ||
| 140 | + </c:if> | ||
| 141 | + <c:if test="${empty var.GETSCORE}"> | ||
| 142 | + -- | ||
| 143 | + </c:if> | ||
| 144 | + </div></td> | ||
| 133 | <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> | 145 | <c:forEach items="${testpaperList}" var="var1" varStatus="vs1"> |
| 134 | <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" | 146 | <td class="center"><div style="width:180px;margin:0 auto;"><c:set var="TEST_ID" |
| 135 | - value="${var1.TESTPAPER_ID}" /> ${var[TEST_ID] }</div></td> | 147 | + value="${var1.TESTPAPER_ID}" /> |
| 148 | + | ||
| 149 | + ${empty var[TEST_ID]?"--":var[TEST_ID]} | ||
| 150 | + | ||
| 151 | + </div></td> | ||
| 136 | </c:forEach> | 152 | </c:forEach> |
| 137 | </tr> | 153 | </tr> |
| 138 | </c:forEach> | 154 | </c:forEach> |
WebRoot/static/js/control_template.js
| @@ -202,8 +202,11 @@ $(function() { | @@ -202,8 +202,11 @@ $(function() { | ||
| 202 | score: $(".section").eq(i).attr("data-fraction") | 202 | score: $(".section").eq(i).attr("data-fraction") |
| 203 | }; | 203 | }; |
| 204 | } | 204 | } |
| 205 | + self.location.href = URL + JSON.stringify(content) + "&page_score=" + total_score; | ||
| 206 | + } | ||
| 207 | + else{ | ||
| 208 | + alert("模板内容不能为空"); | ||
| 205 | } | 209 | } |
| 206 | - self.location.href = URL + JSON.stringify(content) + "&page_score=" + total_score; | ||
| 207 | }); | 210 | }); |
| 208 | 211 | ||
| 209 | /* ajax封装函数 */ | 212 | /* ajax封装函数 */ |
resources/mybatis1/sunvote/PaperMapper.xml
| @@ -249,6 +249,29 @@ | @@ -249,6 +249,29 @@ | ||
| 249 | </choose> | 249 | </choose> |
| 250 | </select> | 250 | </select> |
| 251 | 251 | ||
| 252 | + <!-- 查找指定老师卷和年级卷 --> | ||
| 253 | + <select id="listAllBySidAndTid" parameterType="pd" resultType="pd"> | ||
| 254 | + select | ||
| 255 | + <include refid="Field"></include> | ||
| 256 | + from | ||
| 257 | + <include refid="tableName"></include> | ||
| 258 | + where 1 = 1 | ||
| 259 | + AND | ||
| 260 | + (SCHOOL_ID = #{SCHOOL_ID} AND PAPER_TYPE = '2') OR | ||
| 261 | + (USER_ID = #{USER_ID} AND PAPER_TYPE = #{PAPER_TYPE}) | ||
| 262 | + | ||
| 263 | + order by CREATE_DATE DESC | ||
| 264 | + | ||
| 265 | + <choose> | ||
| 266 | + <when test="CURRENTPAGE != null and CURRENTPAGE != '' and SHOWCOUNT != null and SHOWCOUNT != ''"> | ||
| 267 | + limit ${CURRENTPAGE}, ${SHOWCOUNT} | ||
| 268 | + </when> | ||
| 269 | + <otherwise> | ||
| 270 | + limit 0,30 | ||
| 271 | + </otherwise> | ||
| 272 | + </choose> | ||
| 273 | + </select> | ||
| 274 | + | ||
| 252 | <!-- 批量删除 --> | 275 | <!-- 批量删除 --> |
| 253 | <delete id="deleteAll" parameterType="String"> | 276 | <delete id="deleteAll" parameterType="String"> |
| 254 | delete from | 277 | delete from |
resources/mybatis1/sunvote/StudentTestMapper.xml
| @@ -108,6 +108,9 @@ | @@ -108,6 +108,9 @@ | ||
| 108 | LEFT JOIN sv_student on sv_studenttest.STUDENT_ID = sv_student.ID | 108 | LEFT JOIN sv_student on sv_studenttest.STUDENT_ID = sv_student.ID |
| 109 | where | 109 | where |
| 110 | sv_studenttest.PAPER_ID = #{PAPER_ID} | 110 | sv_studenttest.PAPER_ID = #{PAPER_ID} |
| 111 | + <if test="CLASS_ID != null and CLASS_ID != ''"> | ||
| 112 | + and sv_studenttest.CLASS_ID=#{CLASS_ID} | ||
| 113 | + </if> | ||
| 111 | </select> | 114 | </select> |
| 112 | 115 | ||
| 113 | <!-- 列表 --> | 116 | <!-- 列表 --> |
src/com/fh/controller/sunvote/paper/PaperController.java
| @@ -734,7 +734,9 @@ public class PaperController extends BaseController { | @@ -734,7 +734,9 @@ public class PaperController extends BaseController { | ||
| 734 | public ModelAndView paperRep3() throws Exception { | 734 | public ModelAndView paperRep3() throws Exception { |
| 735 | ModelAndView mv = this.getModelAndView(); | 735 | ModelAndView mv = this.getModelAndView(); |
| 736 | PageData pd = new PageData(); | 736 | PageData pd = new PageData(); |
| 737 | + pd=this.getPageData(); | ||
| 737 | List<PageData> temp = new ArrayList<PageData>(); | 738 | List<PageData> temp = new ArrayList<PageData>(); |
| 739 | + List<PageData> sclass_list = new ArrayList<PageData>(); | ||
| 738 | PageData saveData = new PageData(); | 740 | PageData saveData = new PageData(); |
| 739 | 741 | ||
| 740 | ResponseGson<PageData> res = new ResponseGson(); | 742 | ResponseGson<PageData> res = new ResponseGson(); |
| @@ -750,9 +752,13 @@ public class PaperController extends BaseController { | @@ -750,9 +752,13 @@ public class PaperController extends BaseController { | ||
| 750 | List<String> sid = new ArrayList<String>(); | 752 | List<String> sid = new ArrayList<String>(); |
| 751 | Integer test_num = 0; | 753 | Integer test_num = 0; |
| 752 | Integer lost_num = 0; | 754 | Integer lost_num = 0; |
| 755 | + List<String> classId = new ArrayList(); | ||
| 756 | + PageData sclass = new PageData(); | ||
| 753 | for (PageData item : list) { | 757 | for (PageData item : list) { |
| 754 | 758 | ||
| 755 | PageData p = new PageData(); | 759 | PageData p = new PageData(); |
| 760 | + | ||
| 761 | + | ||
| 756 | p.put("ID", item.getString("STUDENT_ID")); | 762 | p.put("ID", item.getString("STUDENT_ID")); |
| 757 | PageData student = stundentService.findById(p); | 763 | PageData student = stundentService.findById(p); |
| 758 | if (student != null) { | 764 | if (student != null) { |
| @@ -793,6 +799,13 @@ public class PaperController extends BaseController { | @@ -793,6 +799,13 @@ public class PaperController extends BaseController { | ||
| 793 | PageData stu = new PageData(); | 799 | PageData stu = new PageData(); |
| 794 | stu.put("STUDENT_NAME", item.get("STUDENT_NAME")); | 800 | stu.put("STUDENT_NAME", item.get("STUDENT_NAME")); |
| 795 | stu.put("CLASS_NAME", item.get("CLASS_NAME")); | 801 | stu.put("CLASS_NAME", item.get("CLASS_NAME")); |
| 802 | + if(!classId.contains(item.getString("CLASS_ID"))){ | ||
| 803 | + classId.add(item.getString("CLASS_ID")); | ||
| 804 | + sclass.put("CLASS_ID", item.get("CLASS_ID")); | ||
| 805 | + sclass.put("CLASS_NAME", item.get("CLASS_NAME")); | ||
| 806 | + sclass_list.add(sclass); | ||
| 807 | + } | ||
| 808 | + | ||
| 796 | List<PageData> testList = new ArrayList<PageData>(); | 809 | List<PageData> testList = new ArrayList<PageData>(); |
| 797 | PageData test = new PageData(); | 810 | PageData test = new PageData(); |
| 798 | test.put("CREATE_DATE", item.get("CREATE_DATE")); | 811 | test.put("CREATE_DATE", item.get("CREATE_DATE")); |
| @@ -810,6 +823,7 @@ public class PaperController extends BaseController { | @@ -810,6 +823,7 @@ public class PaperController extends BaseController { | ||
| 810 | stu.put("LOST_NUM", lost_num); | 823 | stu.put("LOST_NUM", lost_num); |
| 811 | sid.add(item.getString("STUDENT_ID")); | 824 | sid.add(item.getString("STUDENT_ID")); |
| 812 | temp.add(stu); | 825 | temp.add(stu); |
| 826 | + | ||
| 813 | } | 827 | } |
| 814 | } | 828 | } |
| 815 | } | 829 | } |
| @@ -829,7 +843,9 @@ public class PaperController extends BaseController { | @@ -829,7 +843,9 @@ public class PaperController extends BaseController { | ||
| 829 | } | 843 | } |
| 830 | 844 | ||
| 831 | }); | 845 | }); |
| 846 | + | ||
| 832 | mv.setViewName("sunvote/paper/test_list3"); | 847 | mv.setViewName("sunvote/paper/test_list3"); |
| 848 | + mv.addObject("sclass", sclass_list); | ||
| 833 | mv.addObject("varList", temp); | 849 | mv.addObject("varList", temp); |
| 834 | mv.addObject("pd", pd); | 850 | mv.addObject("pd", pd); |
| 835 | res.setData(saveData); | 851 | res.setData(saveData); |
| @@ -1171,7 +1187,7 @@ public class PaperController extends BaseController { | @@ -1171,7 +1187,7 @@ public class PaperController extends BaseController { | ||
| 1171 | pd.put("USER_ID", userID); | 1187 | pd.put("USER_ID", userID); |
| 1172 | pd.put("PAPER_TYPE", "1"); | 1188 | pd.put("PAPER_TYPE", "1"); |
| 1173 | page.setPd(pd); | 1189 | page.setPd(pd); |
| 1174 | - List<PageData> varList = paperService.list(page); // 列出Paper列表 | 1190 | + List<PageData> varList = paperService.listAllBySidAndTid(pd); // 列出Paper列表 |
| 1175 | page.setLangIsChina(isChineseLanguageClient()); | 1191 | page.setLangIsChina(isChineseLanguageClient()); |
| 1176 | if (isChineseLanguageClient()) { | 1192 | if (isChineseLanguageClient()) { |
| 1177 | mv.setViewName("sunvote/paper/paper_list2"); | 1193 | mv.setViewName("sunvote/paper/paper_list2"); |
src/com/fh/controller/sunvote/report/ReportController.java
| @@ -90,6 +90,7 @@ public class ReportController extends BaseController { | @@ -90,6 +90,7 @@ public class ReportController extends BaseController { | ||
| 90 | List<PageData> reportData = v1Service.classReport(pd); | 90 | List<PageData> reportData = v1Service.classReport(pd); |
| 91 | List<PageData> testpaperList = new ArrayList(); | 91 | List<PageData> testpaperList = new ArrayList(); |
| 92 | List<PageData> studentList = new ArrayList(); | 92 | List<PageData> studentList = new ArrayList(); |
| 93 | + List<String> studentId = new ArrayList(); | ||
| 93 | PageData studentPd = null; | 94 | PageData studentPd = null; |
| 94 | double totalScore = 0 ; | 95 | double totalScore = 0 ; |
| 95 | double getScore = 0 ; | 96 | double getScore = 0 ; |
| @@ -128,6 +129,7 @@ public class ReportController extends BaseController { | @@ -128,6 +129,7 @@ public class ReportController extends BaseController { | ||
| 128 | studentPd.put("TOTALSCORE", totalScore); | 129 | studentPd.put("TOTALSCORE", totalScore); |
| 129 | studentPd.put("GETSCORE", getScore); | 130 | studentPd.put("GETSCORE", getScore); |
| 130 | studentList.add(studentPd); | 131 | studentList.add(studentPd); |
| 132 | + studentId.add(studentPd.getString("STUDENT_ID")); | ||
| 131 | totalScore = 0 ; | 133 | totalScore = 0 ; |
| 132 | getScore = 0 ; | 134 | getScore = 0 ; |
| 133 | } | 135 | } |
| @@ -173,6 +175,7 @@ public class ReportController extends BaseController { | @@ -173,6 +175,7 @@ public class ReportController extends BaseController { | ||
| 173 | studentPd.put("TOTALSCORE", totalScore); | 175 | studentPd.put("TOTALSCORE", totalScore); |
| 174 | studentPd.put("GETSCORE", getScore); | 176 | studentPd.put("GETSCORE", getScore); |
| 175 | studentList.add(studentPd); | 177 | studentList.add(studentPd); |
| 178 | + studentId.add(studentPd.getString("STUDENT_ID")); | ||
| 176 | totalScore = 0 ; | 179 | totalScore = 0 ; |
| 177 | getScore = 0 ; | 180 | getScore = 0 ; |
| 178 | } | 181 | } |
| @@ -190,7 +193,14 @@ public class ReportController extends BaseController { | @@ -190,7 +193,14 @@ public class ReportController extends BaseController { | ||
| 190 | 193 | ||
| 191 | mv.addObject("testpaperList", testpaperList); | 194 | mv.addObject("testpaperList", testpaperList); |
| 192 | info.put("testsize", testpaperList != null ? testpaperList.size() : 0); | 195 | info.put("testsize", testpaperList != null ? testpaperList.size() : 0); |
| 193 | - | 196 | + List<PageData> student_class = studentService.findByClassId(pd); |
| 197 | + for(int x = 0;x<student_class.size();x++){ | ||
| 198 | + if(studentId.contains(student_class.get(x).getString("ID"))){ | ||
| 199 | + continue; | ||
| 200 | + }else{ | ||
| 201 | + studentList.add(student_class.get(x)); | ||
| 202 | + } | ||
| 203 | + } | ||
| 194 | mv.addObject("studentList", studentList); | 204 | mv.addObject("studentList", studentList); |
| 195 | info.put("STUDENT_NUM", studentList != null ? studentList.size() : 0); | 205 | info.put("STUDENT_NUM", studentList != null ? studentList.size() : 0); |
| 196 | mv.addObject("info", info); | 206 | mv.addObject("info", info); |
src/com/fh/service/sunvote/paper/PaperManager.java
| @@ -39,6 +39,9 @@ public interface PaperManager{ | @@ -39,6 +39,9 @@ public interface PaperManager{ | ||
| 39 | 39 | ||
| 40 | public List<PageData> listAllByType(PageData pd)throws Exception; | 40 | public List<PageData> listAllByType(PageData pd)throws Exception; |
| 41 | 41 | ||
| 42 | + public List<PageData> listAllBySidAndTid(PageData pd)throws Exception; | ||
| 43 | + | ||
| 44 | + | ||
| 42 | /**列表(全部) | 45 | /**列表(全部) |
| 43 | * @param pd | 46 | * @param pd |
| 44 | * @throws Exception | 47 | * @throws Exception |
src/com/fh/service/sunvote/paper/impl/PaperService.java
| 1 | package com.fh.service.sunvote.paper.impl; | 1 | package com.fh.service.sunvote.paper.impl; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | + | ||
| 4 | import javax.annotation.Resource; | 5 | import javax.annotation.Resource; |
| 6 | + | ||
| 5 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
| 8 | + | ||
| 6 | import com.fh.dao.DaoSupport; | 9 | import com.fh.dao.DaoSupport; |
| 7 | import com.fh.entity.Page; | 10 | import com.fh.entity.Page; |
| 8 | -import com.fh.util.PageData; | ||
| 9 | import com.fh.service.sunvote.paper.PaperManager; | 11 | import com.fh.service.sunvote.paper.PaperManager; |
| 12 | +import com.fh.util.PageData; | ||
| 10 | 13 | ||
| 11 | /** | 14 | /** |
| 12 | * 说明: 试卷 | 15 | * 说明: 试卷 |
| @@ -70,6 +73,17 @@ public class PaperService implements PaperManager{ | @@ -70,6 +73,17 @@ public class PaperService implements PaperManager{ | ||
| 70 | return (List<PageData>)dao.findForList("PaperMapper.listAllByTypelistPage", pd);//.*listPage.* | 73 | return (List<PageData>)dao.findForList("PaperMapper.listAllByTypelistPage", pd);//.*listPage.* |
| 71 | } | 74 | } |
| 72 | 75 | ||
| 76 | + | ||
| 77 | + /**列表(全部) | ||
| 78 | + * @param pd | ||
| 79 | + * @throws Exception | ||
| 80 | + */ | ||
| 81 | + @SuppressWarnings("unchecked") | ||
| 82 | + public List<PageData> listAllBySidAndTid(PageData pd)throws Exception{ | ||
| 83 | + return (List<PageData>)dao.findForList("PaperMapper.listAllBySidAndTid", pd);//.*listPage.* | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + | ||
| 73 | /**列表(全部) | 87 | /**列表(全部) |
| 74 | * @param pd | 88 | * @param pd |
| 75 | * @throws Exception | 89 | * @throws Exception |