Commit bda221f495cfdb67922e21667865c3ab412e9aae
1 parent
ff7ab13e
0830版本
Showing
12 changed files
with
174 additions
and
16 deletions
WebRoot/WEB-INF/jsp/sunvote/teacher/paper_view1.jsp
| @@ -143,7 +143,7 @@ | @@ -143,7 +143,7 @@ | ||
| 143 | <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> | 143 | <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> |
| 144 | <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> | 144 | <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> |
| 145 | <script src="../static/js/echars.js"></script> | 145 | <script src="../static/js/echars.js"></script> |
| 146 | - <script src="../static/js/paper_view1.js?a=1"></script> | 146 | + <script src="../static/js/paper_view1.js?a=2"></script> |
| 147 | 147 | ||
| 148 | </html> | 148 | </html> |
| 149 | 149 |
WebRoot/static/js/paper_view.js
| @@ -66,6 +66,11 @@ function getQueryString(name) { | @@ -66,6 +66,11 @@ function getQueryString(name) { | ||
| 66 | star(j,parseInt(data.data[j].DIFFICULTY)); | 66 | star(j,parseInt(data.data[j].DIFFICULTY)); |
| 67 | } | 67 | } |
| 68 | } | 68 | } |
| 69 | + }, | ||
| 70 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 71 | + // 错误信息 | ||
| 72 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 73 | + window.top.loading.remove(); | ||
| 69 | } | 74 | } |
| 70 | }) | 75 | }) |
| 71 | 76 | ||
| @@ -157,6 +162,11 @@ function getQueryString(name) { | @@ -157,6 +162,11 @@ function getQueryString(name) { | ||
| 157 | success:function(data){ | 162 | success:function(data){ |
| 158 | alert("上传成功"); | 163 | alert("上传成功"); |
| 159 | window.history.go(-2); | 164 | window.history.go(-2); |
| 165 | + }, | ||
| 166 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 167 | + // 错误信息 | ||
| 168 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 169 | + window.top.loading.remove(); | ||
| 160 | } | 170 | } |
| 161 | }) | 171 | }) |
| 162 | }) | 172 | }) |
| 163 | \ No newline at end of file | 173 | \ No newline at end of file |
WebRoot/static/js/paper_view1.js
| @@ -119,6 +119,8 @@ function getQueryString(name) { | @@ -119,6 +119,8 @@ function getQueryString(name) { | ||
| 119 | } | 119 | } |
| 120 | for(k=0;k<answerinfo.length;k++){ | 120 | for(k=0;k<answerinfo.length;k++){ |
| 121 | data1[k]=parseInt(answerinfo[k].COUNT); | 121 | data1[k]=parseInt(answerinfo[k].COUNT); |
| 122 | + if(answerinfo[k].ANSWER=="") | ||
| 123 | + answerinfo[k].ANSWER="未答"; | ||
| 122 | data2[k]=answerinfo[k].ANSWER; | 124 | data2[k]=answerinfo[k].ANSWER; |
| 123 | color[k]="#fcb35b"; | 125 | color[k]="#fcb35b"; |
| 124 | if(answerinfo[k].ISRIGHT==1){ | 126 | if(answerinfo[k].ISRIGHT==1){ |
| @@ -140,6 +142,11 @@ function getQueryString(name) { | @@ -140,6 +142,11 @@ function getQueryString(name) { | ||
| 140 | $(".analysis ul").children("li").eq(j).append('<div class="chou">抽</div>'); | 142 | $(".analysis ul").children("li").eq(j).append('<div class="chou">抽</div>'); |
| 141 | } | 143 | } |
| 142 | } | 144 | } |
| 145 | + }, | ||
| 146 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 147 | + // 错误信息 | ||
| 148 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 149 | + window.top.loading.remove(); | ||
| 143 | } | 150 | } |
| 144 | }) | 151 | }) |
| 145 | }) | 152 | }) |
| @@ -166,9 +173,16 @@ function getQueryString(name) { | @@ -166,9 +173,16 @@ function getQueryString(name) { | ||
| 166 | success:function(data){ | 173 | success:function(data){ |
| 167 | console.log(data); | 174 | console.log(data); |
| 168 | for(var i=0;i<data.data.length;i++){ | 175 | for(var i=0;i<data.data.length;i++){ |
| 176 | + if(typeof(data.data[i].ANSWER)=="undefined") | ||
| 177 | + data.data[i].ANSWER="未答"; | ||
| 169 | student_html+='<tr><td>'+(i+1)+'</td><td>'+data.data[i].NAME+'</td><td>'+data.data[i].ANSWER+'</td><td>'+data.data[i].PRESS_TIME+'秒</td></tr>'; | 178 | student_html+='<tr><td>'+(i+1)+'</td><td>'+data.data[i].NAME+'</td><td>'+data.data[i].ANSWER+'</td><td>'+data.data[i].PRESS_TIME+'秒</td></tr>'; |
| 170 | } | 179 | } |
| 171 | $(".student_list").html(student_html); | 180 | $(".student_list").html(student_html); |
| 181 | + }, | ||
| 182 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 183 | + // 错误信息 | ||
| 184 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 185 | + window.top.loading.remove(); | ||
| 172 | } | 186 | } |
| 173 | }); | 187 | }); |
| 174 | $('#myModal').modal('show'); | 188 | $('#myModal').modal('show'); |
WebRoot/static/js/paper_view2.js
| @@ -55,6 +55,11 @@ function getQueryString(name) { | @@ -55,6 +55,11 @@ function getQueryString(name) { | ||
| 55 | } | 55 | } |
| 56 | } | 56 | } |
| 57 | window.top.loading.remove(); | 57 | window.top.loading.remove(); |
| 58 | + }, | ||
| 59 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 60 | + // 错误信息 | ||
| 61 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 62 | + window.top.loading.remove(); | ||
| 58 | } | 63 | } |
| 59 | }) | 64 | }) |
| 60 | }) | 65 | }) |
WebRoot/static/js/set_question.js
| @@ -42,6 +42,11 @@ var url=""; | @@ -42,6 +42,11 @@ var url=""; | ||
| 42 | } | 42 | } |
| 43 | $(".section").children("ul").html(point_html); | 43 | $(".section").children("ul").html(point_html); |
| 44 | getQuestion($(".section li").eq(0)); | 44 | getQuestion($(".section li").eq(0)); |
| 45 | + }, | ||
| 46 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 47 | + // 错误信息 | ||
| 48 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 49 | + window.top.loading.remove(); | ||
| 45 | } | 50 | } |
| 46 | }) | 51 | }) |
| 47 | } | 52 | } |
| @@ -63,6 +68,11 @@ var url=""; | @@ -63,6 +68,11 @@ var url=""; | ||
| 63 | } | 68 | } |
| 64 | } | 69 | } |
| 65 | getQuestion($(".section li").eq(0)); | 70 | getQuestion($(".section li").eq(0)); |
| 71 | + }, | ||
| 72 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 73 | + // 错误信息 | ||
| 74 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 75 | + window.top.loading.remove(); | ||
| 66 | } | 76 | } |
| 67 | }) | 77 | }) |
| 68 | } | 78 | } |
| @@ -83,6 +93,11 @@ var url=""; | @@ -83,6 +93,11 @@ var url=""; | ||
| 83 | _html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-img-click=0 data-span-click=0 ><img src="../static/images/add.png" class="add"/><span>'+(i+1)+data.data[i].NAME+'</span></li>'; | 93 | _html +='<li data-id="'+data.data[i].KNOWLEDGE_ID+'" data-img-click=0 data-span-click=0 ><img src="../static/images/add.png" class="add"/><span>'+(i+1)+data.data[i].NAME+'</span></li>'; |
| 84 | } | 94 | } |
| 85 | obj.children('ul').html(_html); | 95 | obj.children('ul').html(_html); |
| 96 | + }, | ||
| 97 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 98 | + // 错误信息 | ||
| 99 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 100 | + window.top.loading.remove(); | ||
| 86 | } | 101 | } |
| 87 | }) | 102 | }) |
| 88 | } | 103 | } |
| @@ -153,7 +168,7 @@ var url=""; | @@ -153,7 +168,7 @@ var url=""; | ||
| 153 | // 状态 | 168 | // 状态 |
| 154 | console.log(XMLHttpRequest.readyState); | 169 | console.log(XMLHttpRequest.readyState); |
| 155 | // 错误信息 | 170 | // 错误信息 |
| 156 | - console.log(textStatus); | 171 | + alert(textStatus); |
| 157 | flag=0; | 172 | flag=0; |
| 158 | pageNum-=1; | 173 | pageNum-=1; |
| 159 | if(pageNum<1) | 174 | if(pageNum<1) |
| @@ -203,7 +218,12 @@ var url=""; | @@ -203,7 +218,12 @@ var url=""; | ||
| 203 | $("#book_name").text($(".name").eq(0).text()+"/"+$(".float_box").eq(0).find('li').eq(0).text()); | 218 | $("#book_name").text($(".name").eq(0).text()+"/"+$(".float_box").eq(0).find('li').eq(0).text()); |
| 204 | } | 219 | } |
| 205 | 220 | ||
| 206 | - } | 221 | + }, |
| 222 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 223 | + // 错误信息 | ||
| 224 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 225 | + window.top.loading.remove(); | ||
| 226 | + } | ||
| 207 | }) | 227 | }) |
| 208 | 228 | ||
| 209 | } | 229 | } |
| @@ -220,6 +240,11 @@ var url=""; | @@ -220,6 +240,11 @@ var url=""; | ||
| 220 | textBookName[i]={"name":data.data[i].NAME,"id":data.data[i].ID}; | 240 | textBookName[i]={"name":data.data[i].NAME,"id":data.data[i].ID}; |
| 221 | } | 241 | } |
| 222 | } | 242 | } |
| 243 | + }, | ||
| 244 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 245 | + // 错误信息 | ||
| 246 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 247 | + window.top.loading.remove(); | ||
| 223 | } | 248 | } |
| 224 | }) | 249 | }) |
| 225 | return textBookName; | 250 | return textBookName; |
| @@ -232,6 +257,11 @@ var url=""; | @@ -232,6 +257,11 @@ var url=""; | ||
| 232 | data:{id:class_id}, | 257 | data:{id:class_id}, |
| 233 | success:function(data){ | 258 | success:function(data){ |
| 234 | $(".classList li").html(data.data); | 259 | $(".classList li").html(data.data); |
| 260 | + }, | ||
| 261 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 262 | + // 错误信息 | ||
| 263 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 264 | + window.top.loading.remove(); | ||
| 235 | } | 265 | } |
| 236 | }) | 266 | }) |
| 237 | } | 267 | } |
WebRoot/static/js/teach_paper.js
| @@ -26,6 +26,11 @@ | @@ -26,6 +26,11 @@ | ||
| 26 | $("#dealer_id_2").html(option_html); | 26 | $("#dealer_id_2").html(option_html); |
| 27 | } | 27 | } |
| 28 | getList(); | 28 | getList(); |
| 29 | + }, | ||
| 30 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 31 | + // 错误信息 | ||
| 32 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 33 | + window.top.loading.remove(); | ||
| 29 | } | 34 | } |
| 30 | }) | 35 | }) |
| 31 | 36 | ||
| @@ -60,7 +65,12 @@ | @@ -60,7 +65,12 @@ | ||
| 60 | } | 65 | } |
| 61 | $("#tab_body").html(tab_html); | 66 | $("#tab_body").html(tab_html); |
| 62 | window.top.loading.remove(); | 67 | window.top.loading.remove(); |
| 63 | - } | 68 | + }, |
| 69 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 70 | + // 错误信息 | ||
| 71 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 72 | + window.top.loading.remove(); | ||
| 73 | + } | ||
| 64 | }); | 74 | }); |
| 65 | } | 75 | } |
| 66 | $('#ids').on('click', function(){ | 76 | $('#ids').on('click', function(){ |
| @@ -106,7 +116,12 @@ | @@ -106,7 +116,12 @@ | ||
| 106 | data:{id:id}, | 116 | data:{id:id}, |
| 107 | success:function(data){ | 117 | success:function(data){ |
| 108 | subjectName=data.data; | 118 | subjectName=data.data; |
| 109 | - } | 119 | + }, |
| 120 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 121 | + // 错误信息 | ||
| 122 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 123 | + window.top.loading.remove(); | ||
| 124 | + } | ||
| 110 | }) | 125 | }) |
| 111 | return subjectName; | 126 | return subjectName; |
| 112 | } | 127 | } |
| @@ -119,7 +134,12 @@ | @@ -119,7 +134,12 @@ | ||
| 119 | data:{id:id}, | 134 | data:{id:id}, |
| 120 | success:function(data){ | 135 | success:function(data){ |
| 121 | className=data.data; | 136 | className=data.data; |
| 122 | - } | 137 | + }, |
| 138 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 139 | + // 错误信息 | ||
| 140 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 141 | + window.top.loading.remove(); | ||
| 142 | + } | ||
| 123 | }) | 143 | }) |
| 124 | return className; | 144 | return className; |
| 125 | } | 145 | } |
WebRoot/static/js/test_list.js
| @@ -10,8 +10,7 @@ function getQueryString(name) { | @@ -10,8 +10,7 @@ function getQueryString(name) { | ||
| 10 | return null; | 10 | return null; |
| 11 | } | 11 | } |
| 12 | var class_id = getQueryString("classid"); | 12 | var class_id = getQueryString("classid"); |
| 13 | -$(document) | ||
| 14 | - .ready( | 13 | +$(document).ready( |
| 15 | function() { | 14 | function() { |
| 16 | 15 | ||
| 17 | $.ajax({ | 16 | $.ajax({ |
| @@ -32,6 +31,11 @@ $(document) | @@ -32,6 +31,11 @@ $(document) | ||
| 32 | $("#dealer_id_2").html(option_html); | 31 | $("#dealer_id_2").html(option_html); |
| 33 | } | 32 | } |
| 34 | getList(); | 33 | getList(); |
| 34 | + }, | ||
| 35 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 36 | + // 错误信息 | ||
| 37 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 38 | + window.top.loading.remove(); | ||
| 35 | } | 39 | } |
| 36 | }) | 40 | }) |
| 37 | // 日期框 | 41 | // 日期框 |
| @@ -76,6 +80,11 @@ function getList(start_date, end_date, class_id) { // 获取测验列表 | @@ -76,6 +80,11 @@ function getList(start_date, end_date, class_id) { // 获取测验列表 | ||
| 76 | + '" >查看</a></td></tr>' | 80 | + '" >查看</a></td></tr>' |
| 77 | } | 81 | } |
| 78 | $("#tab_body").html(tab_html); | 82 | $("#tab_body").html(tab_html); |
| 83 | + }, | ||
| 84 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 85 | + // 错误信息 | ||
| 86 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 87 | + window.top.loading.remove(); | ||
| 79 | } | 88 | } |
| 80 | }); | 89 | }); |
| 81 | } | 90 | } |
| @@ -109,7 +118,12 @@ function getClassName(id) { // 获取班级中文名 | @@ -109,7 +118,12 @@ function getClassName(id) { // 获取班级中文名 | ||
| 109 | }, | 118 | }, |
| 110 | success : function(data) { | 119 | success : function(data) { |
| 111 | className = data.data; | 120 | className = data.data; |
| 112 | - } | 121 | + }, |
| 122 | + error: function (XMLHttpRequest, textStatus, errorThrown) { | ||
| 123 | + // 错误信息 | ||
| 124 | + alert("状态码:"+XMLHttpRequest.status+"状态:"+XMLHttpRequest.readyState+"错误信息:"+textStatus+""); | ||
| 125 | + window.top.loading.remove(); | ||
| 126 | + } | ||
| 113 | }) | 127 | }) |
| 114 | return className; | 128 | return className; |
| 115 | } | 129 | } |
resources/mybatis1/api/V1Mapper.xml
| @@ -181,6 +181,44 @@ | @@ -181,6 +181,44 @@ | ||
| 181 | </select> | 181 | </select> |
| 182 | 182 | ||
| 183 | 183 | ||
| 184 | + <select id="getLastWrongQuestionInfo" parameterType="pd" resultType="pd"> | ||
| 185 | + | ||
| 186 | + SELECT | ||
| 187 | + sv_question.QUESTION_ID, | ||
| 188 | + sv_question.CONTENT, | ||
| 189 | + sv_testpaper.`NAME`, | ||
| 190 | + sv_paper.TITLE, | ||
| 191 | + sv_testpaperinfo.TESTPAPERINFO_ID, | ||
| 192 | + sv_testpaperinfo.PAPER_ID, | ||
| 193 | + sv_testpaperinfo.TEST_ID, | ||
| 194 | + sv_testpaper.CREATE_DATE, | ||
| 195 | + count(*) AS WRONG_NUM | ||
| 196 | + FROM | ||
| 197 | + sv_testpaperinfo | ||
| 198 | + LEFT JOIN sv_question ON sv_question.QUESTION_ID = sv_testpaperinfo.QUESTION_ID | ||
| 199 | + LEFT JOIN sv_testpaper ON sv_testpaperinfo.TEST_ID = sv_testpaper.TESTPAPER_ID | ||
| 200 | + LEFT JOIN sv_paper ON sv_testpaperinfo.PAPER_ID = sv_paper.PAPER_ID | ||
| 201 | + WHERE | ||
| 202 | + sv_testpaperinfo.`RIGHT` = '0' | ||
| 203 | + AND sv_question.QUESTION_FROM = '101' | ||
| 204 | + <if test="START_DATE != null and START_DATE != ''"> | ||
| 205 | + AND sv_testpaper.CREATE_DATE > #{START_DATE} | ||
| 206 | + </if> | ||
| 207 | + <if test="END_DATE != null and END_DATE != ''"> | ||
| 208 | + AND sv_testpaper.CREATE_DATE < #{END_DATE} | ||
| 209 | + </if> | ||
| 210 | + GROUP BY | ||
| 211 | + sv_testpaperinfo.QUESTION_ID,sv_testpaperinfo.TEST_ID | ||
| 212 | + ORDER BY | ||
| 213 | + WRONG_NUM DESC | ||
| 214 | + | ||
| 215 | + <if test="COUNT != null and COUNT != ''"> | ||
| 216 | + LIMIT ${COUNT} | ||
| 217 | + </if> | ||
| 218 | + <if test="COUNT == null or COUNT == ''"> | ||
| 219 | + LIMIT 5 | ||
| 220 | + </if> | ||
| 221 | + </select> | ||
| 184 | 222 | ||
| 185 | 223 | ||
| 186 | 224 |
src/com/fh/controller/api/V1.java
| @@ -561,10 +561,10 @@ public class V1 extends BaseController { | @@ -561,10 +561,10 @@ public class V1 extends BaseController { | ||
| 561 | .getString("PROBLEM_TYPE_ID")); | 561 | .getString("PROBLEM_TYPE_ID")); |
| 562 | question.setRank(qpd.getString("RANK")); | 562 | question.setRank(qpd.getString("RANK")); |
| 563 | question.setNo_name(qpd.getString("NO_NAME")); | 563 | question.setNo_name(qpd.getString("NO_NAME")); |
| 564 | + question.setQuestions(new ArrayList<Question>()); | ||
| 564 | if ("-1".equals("" + qpd.getString("P_ID"))) { | 565 | if ("-1".equals("" + qpd.getString("P_ID"))) { |
| 565 | PageData pidPd = new PageData(); | 566 | PageData pidPd = new PageData(); |
| 566 | pidPd.put("PID", question.getQuestion_id()); | 567 | pidPd.put("PID", question.getQuestion_id()); |
| 567 | - question.setQuestions(new ArrayList<Question>()); | ||
| 568 | List<PageData> qs = v1Service | 568 | List<PageData> qs = v1Service |
| 569 | .getQuestionsByPID(pidPd); | 569 | .getQuestionsByPID(pidPd); |
| 570 | for (PageData q : qs) { | 570 | for (PageData q : qs) { |
| @@ -1471,7 +1471,7 @@ public class V1 extends BaseController { | @@ -1471,7 +1471,7 @@ public class V1 extends BaseController { | ||
| 1471 | testPaper.getCreateDate() == null ? Tools | 1471 | testPaper.getCreateDate() == null ? Tools |
| 1472 | .date2Str(new Date()) : testPaper | 1472 | .date2Str(new Date()) : testPaper |
| 1473 | .getCreateDate()); | 1473 | .getCreateDate()); |
| 1474 | - testPd.put("TEST_TYPE", testPaper.getTest_type() != null ? testPaper.getTest_type() :"101"); | 1474 | + testPd.put("TEST_TYPE", testPaper.getTest_type() != null ? testPaper.getTest_type() :"1"); |
| 1475 | List<PageData> listData = testpaperService.listAll(testPd); | 1475 | List<PageData> listData = testpaperService.listAll(testPd); |
| 1476 | if (!(listData != null && listData.size() > 0)) { | 1476 | if (!(listData != null && listData.size() > 0)) { |
| 1477 | testPd.put("START_DATE", testPaper.getStartDate()); | 1477 | testPd.put("START_DATE", testPaper.getStartDate()); |
| @@ -1563,7 +1563,7 @@ public class V1 extends BaseController { | @@ -1563,7 +1563,7 @@ public class V1 extends BaseController { | ||
| 1563 | 1563 | ||
| 1564 | return res.toJson(); | 1564 | return res.toJson(); |
| 1565 | 1565 | ||
| 1566 | - } | 1566 | + } |
| 1567 | 1567 | ||
| 1568 | /** | 1568 | /** |
| 1569 | * 上传测验成绩 | 1569 | * 上传测验成绩 |
| @@ -1590,7 +1590,7 @@ public class V1 extends BaseController { | @@ -1590,7 +1590,7 @@ public class V1 extends BaseController { | ||
| 1590 | testPaper.getCreateDate() == null ? Tools | 1590 | testPaper.getCreateDate() == null ? Tools |
| 1591 | .date2Str(new Date()) : testPaper | 1591 | .date2Str(new Date()) : testPaper |
| 1592 | .getCreateDate()); | 1592 | .getCreateDate()); |
| 1593 | - testPd.put("TEST_TYPE", testPaper.getTest_type() != null ? testPaper.getTest_type() :"101"); | 1593 | + testPd.put("TEST_TYPE", testPaper.getTest_type() != null ? testPaper.getTest_type() :"1"); |
| 1594 | List<PageData> listData = testpaperService.listAll(testPd); | 1594 | List<PageData> listData = testpaperService.listAll(testPd); |
| 1595 | if ((listData != null && listData.size() > 0)) { | 1595 | if ((listData != null && listData.size() > 0)) { |
| 1596 | testPaperId = listData.get(0).getString("TESTPAPER_ID"); | 1596 | testPaperId = listData.get(0).getString("TESTPAPER_ID"); |
| @@ -1794,7 +1794,7 @@ public class V1 extends BaseController { | @@ -1794,7 +1794,7 @@ public class V1 extends BaseController { | ||
| 1794 | } else { | 1794 | } else { |
| 1795 | res.setDataError(); | 1795 | res.setDataError(); |
| 1796 | } | 1796 | } |
| 1797 | - logger.info("uploadupdatetestpaper cost time:" | 1797 | + logger.info("uploadupdateTestpaper2 cost time:" |
| 1798 | + (System.currentTimeMillis() - cur)); | 1798 | + (System.currentTimeMillis() - cur)); |
| 1799 | 1799 | ||
| 1800 | return res.toJson(); | 1800 | return res.toJson(); |
| @@ -2788,6 +2788,23 @@ public class V1 extends BaseController { | @@ -2788,6 +2788,23 @@ public class V1 extends BaseController { | ||
| 2788 | 2788 | ||
| 2789 | } | 2789 | } |
| 2790 | 2790 | ||
| 2791 | + /** | ||
| 2792 | + * 根据ID班级名称 | ||
| 2793 | + * @param id | ||
| 2794 | + * @return | ||
| 2795 | + * @throws Exception | ||
| 2796 | + */ | ||
| 2797 | + @RequestMapping(value = "/wrongquestion", produces = "application/json;charset=UTF-8") | ||
| 2798 | + @ResponseBody | ||
| 2799 | + public String wrongquestion() throws Exception { | ||
| 2800 | + ResponseGson<List<PageData>> res = new ResponseGson(); | ||
| 2801 | + PageData pageData = this.getPageData(); | ||
| 2802 | + List<PageData> list = v1Service.getLastWrongQuestionInfo(pageData); | ||
| 2803 | + res.setData(list); | ||
| 2804 | + return res.toJson(); | ||
| 2805 | + | ||
| 2806 | + } | ||
| 2807 | + | ||
| 2791 | @RequestMapping(value = "/uploadfile", produces = "application/json;charset=UTF-8") | 2808 | @RequestMapping(value = "/uploadfile", produces = "application/json;charset=UTF-8") |
| 2792 | @ResponseBody | 2809 | @ResponseBody |
| 2793 | public String uploadFile(@RequestParam(value="file",required=false)MultipartFile file, HttpServletRequest request) throws Exception{ | 2810 | public String uploadFile(@RequestParam(value="file",required=false)MultipartFile file, HttpServletRequest request) throws Exception{ |
src/com/fh/controller/sunvote/teacher/TeacherController.java
| @@ -184,6 +184,7 @@ public class TeacherController extends BaseController { | @@ -184,6 +184,7 @@ public class TeacherController extends BaseController { | ||
| 184 | ModelAndView mv = this.getModelAndView(); | 184 | ModelAndView mv = this.getModelAndView(); |
| 185 | PageData pd = new PageData(); | 185 | PageData pd = new PageData(); |
| 186 | pd = this.getPageData(); | 186 | pd = this.getPageData(); |
| 187 | + pd.put("userId", userId); | ||
| 187 | mv.setViewName("sunvote/teacher/test_list"); | 188 | mv.setViewName("sunvote/teacher/test_list"); |
| 188 | mv.addObject("pd", pd); | 189 | mv.addObject("pd", pd); |
| 189 | return mv; | 190 | return mv; |
| @@ -202,6 +203,7 @@ public class TeacherController extends BaseController { | @@ -202,6 +203,7 @@ public class TeacherController extends BaseController { | ||
| 202 | ModelAndView mv = this.getModelAndView(); | 203 | ModelAndView mv = this.getModelAndView(); |
| 203 | PageData pd = new PageData(); | 204 | PageData pd = new PageData(); |
| 204 | pd = this.getPageData(); | 205 | pd = this.getPageData(); |
| 206 | + pd.put("userId", userId); | ||
| 205 | mv.setViewName("sunvote/teacher/paper_view"); | 207 | mv.setViewName("sunvote/teacher/paper_view"); |
| 206 | mv.addObject("pd", pd); | 208 | mv.addObject("pd", pd); |
| 207 | return mv; | 209 | return mv; |
| @@ -220,6 +222,7 @@ public class TeacherController extends BaseController { | @@ -220,6 +222,7 @@ public class TeacherController extends BaseController { | ||
| 220 | ModelAndView mv = this.getModelAndView(); | 222 | ModelAndView mv = this.getModelAndView(); |
| 221 | PageData pd = new PageData(); | 223 | PageData pd = new PageData(); |
| 222 | pd = this.getPageData(); | 224 | pd = this.getPageData(); |
| 225 | + pd.put("userId", userId); | ||
| 223 | mv.setViewName("sunvote/teacher/paper_view2"); | 226 | mv.setViewName("sunvote/teacher/paper_view2"); |
| 224 | mv.addObject("pd", pd); | 227 | mv.addObject("pd", pd); |
| 225 | return mv; | 228 | return mv; |
| @@ -238,6 +241,7 @@ public class TeacherController extends BaseController { | @@ -238,6 +241,7 @@ public class TeacherController extends BaseController { | ||
| 238 | ModelAndView mv = this.getModelAndView(); | 241 | ModelAndView mv = this.getModelAndView(); |
| 239 | PageData pd = new PageData(); | 242 | PageData pd = new PageData(); |
| 240 | pd = this.getPageData(); | 243 | pd = this.getPageData(); |
| 244 | + pd.put("userId", userId); | ||
| 241 | mv.setViewName("sunvote/teacher/paper_view1"); | 245 | mv.setViewName("sunvote/teacher/paper_view1"); |
| 242 | mv.addObject("pd", pd); | 246 | mv.addObject("pd", pd); |
| 243 | return mv; | 247 | return mv; |
| @@ -253,8 +257,10 @@ public class TeacherController extends BaseController { | @@ -253,8 +257,10 @@ public class TeacherController extends BaseController { | ||
| 253 | public ModelAndView set_question(Page page) throws Exception { | 257 | public ModelAndView set_question(Page page) throws Exception { |
| 254 | logBefore(logger, Jurisdiction.getUsername() + "列表Paper"); | 258 | logBefore(logger, Jurisdiction.getUsername() + "列表Paper"); |
| 255 | ModelAndView mv = this.getModelAndView(); | 259 | ModelAndView mv = this.getModelAndView(); |
| 260 | + String userId = this.getUserID(); | ||
| 256 | PageData pd = new PageData(); | 261 | PageData pd = new PageData(); |
| 257 | pd = this.getPageData(); | 262 | pd = this.getPageData(); |
| 263 | + pd.put("userId", userId); | ||
| 258 | mv.setViewName("sunvote/teacher/set_question"); | 264 | mv.setViewName("sunvote/teacher/set_question"); |
| 259 | mv.addObject("pd", pd); | 265 | mv.addObject("pd", pd); |
| 260 | return mv; | 266 | return mv; |
src/com/fh/service/api/V1Manager.java
| @@ -14,12 +14,11 @@ public interface V1Manager { | @@ -14,12 +14,11 @@ public interface V1Manager { | ||
| 14 | 14 | ||
| 15 | public List<PageData> getTestPaperInfo(PageData pd) throws Exception; | 15 | public List<PageData> getTestPaperInfo(PageData pd) throws Exception; |
| 16 | 16 | ||
| 17 | - | ||
| 18 | public List<PageData> getQuestionsByPID(PageData pd) throws Exception; | 17 | public List<PageData> getQuestionsByPID(PageData pd) throws Exception; |
| 19 | 18 | ||
| 20 | public List<PageData> getTeacherInfo(PageData pd) throws Exception; | 19 | public List<PageData> getTeacherInfo(PageData pd) throws Exception; |
| 21 | 20 | ||
| 22 | public List<PageData> getQuestionWrongInfo(PageData pd) throws Exception ; | 21 | public List<PageData> getQuestionWrongInfo(PageData pd) throws Exception ; |
| 23 | 22 | ||
| 24 | - | 23 | + public List<PageData> getLastWrongQuestionInfo(PageData pd) throws Exception; |
| 25 | } | 24 | } |
src/com/fh/service/api/impl/V1Service.java
| @@ -50,5 +50,10 @@ public class V1Service implements V1Manager { | @@ -50,5 +50,10 @@ public class V1Service implements V1Manager { | ||
| 50 | public List<PageData> getQuestionWrongInfo(PageData pd) throws Exception { | 50 | public List<PageData> getQuestionWrongInfo(PageData pd) throws Exception { |
| 51 | return (List<PageData>)dao.findForList("V1Mapper.getQuestionWrongInfo", pd); | 51 | return (List<PageData>)dao.findForList("V1Mapper.getQuestionWrongInfo", pd); |
| 52 | } | 52 | } |
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public List<PageData> getLastWrongQuestionInfo(PageData pd) throws Exception { | ||
| 56 | + return (List<PageData>)dao.findForList("V1Mapper.getLastWrongQuestionInfo", pd); | ||
| 57 | + } | ||
| 53 | 58 | ||
| 54 | } | 59 | } |