Commit ca546da0b324ee94954d2aa11efa9f78b148387c
Merge branch 'develop' of http://120.78.57.84/Elvis/SunvoteEducation into develop
Showing
14 changed files
with
231 additions
and
35 deletions
WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_main.jsp
| @@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
| 67 | <p>测验分析</p> | 67 | <p>测验分析</p> |
| 68 | <ul class="menu_2"> | 68 | <ul class="menu_2"> |
| 69 | <c:forEach items="${pd.CLASSINFO}" var="var" varStatus="vs"> | 69 | <c:forEach items="${pd.CLASSINFO}" var="var" varStatus="vs"> |
| 70 | - <li onclick="event.stopPropagation();report('${var.CLASS_ID}')"><p>${var.CLASS_NAME}${var.CNAME} | 70 | + <li onclick="event.stopPropagation();report('${var.CLASS_ID}')"><p title="${var.CLASS_NAME}${var.CNAME}">${var.CLASS_NAME}${var.CNAME} |
| 71 | 成绩</p></li> | 71 | 成绩</p></li> |
| 72 | </c:forEach> | 72 | </c:forEach> |
| 73 | </ul> | 73 | </ul> |
| @@ -89,8 +89,7 @@ | @@ -89,8 +89,7 @@ | ||
| 89 | <p>测验分析</p> | 89 | <p>测验分析</p> |
| 90 | <ul class="menu_2"> | 90 | <ul class="menu_2"> |
| 91 | <c:forEach items="${pd.CLASSINFO}" var="var" varStatus="vs"> | 91 | <c:forEach items="${pd.CLASSINFO}" var="var" varStatus="vs"> |
| 92 | - <li onclick="event.stopPropagation();report2('${var.CLASS_ID}')"><p>${var.CLASS_NAME}${var.CNAME} | ||
| 93 | - 成绩</p></li> | 92 | + <li onclick="event.stopPropagation();report2('${var.CLASS_ID}')"><p title="${var.CLASS_NAME}${var.CNAME}成绩">${var.CLASS_NAME}${var.CNAME} 成绩</p></li> |
| 94 | </c:forEach> | 93 | </c:forEach> |
| 95 | </ul> | 94 | </ul> |
| 96 | </li> | 95 | </li> |
resources/mybatis1/sunvote/HomeworkMapper.xml
| @@ -27,6 +27,7 @@ | @@ -27,6 +27,7 @@ | ||
| 27 | GET_SCORE, | 27 | GET_SCORE, |
| 28 | GET_SCORE_PERSENT, | 28 | GET_SCORE_PERSENT, |
| 29 | GET_MAX_SCORE, | 29 | GET_MAX_SCORE, |
| 30 | + GET_MIN_SCORE, | ||
| 30 | QUESTION_COUNT, | 31 | QUESTION_COUNT, |
| 31 | ANSWER_PERSENT, | 32 | ANSWER_PERSENT, |
| 32 | HOMEWORK_ID | 33 | HOMEWORK_ID |
| @@ -52,6 +53,7 @@ | @@ -52,6 +53,7 @@ | ||
| 52 | #{GET_SCORE}, | 53 | #{GET_SCORE}, |
| 53 | #{GET_SCORE_PERSENT}, | 54 | #{GET_SCORE_PERSENT}, |
| 54 | #{GET_MAX_SCORE}, | 55 | #{GET_MAX_SCORE}, |
| 56 | + #{GET_MIN_SCORE}, | ||
| 55 | #{QUESTION_COUNT}, | 57 | #{QUESTION_COUNT}, |
| 56 | #{ANSWER_PERSENT}, | 58 | #{ANSWER_PERSENT}, |
| 57 | #{HOMEWORK_ID} | 59 | #{HOMEWORK_ID} |
| @@ -117,6 +119,8 @@ | @@ -117,6 +119,8 @@ | ||
| 117 | GET_SCORE_PERSENT = #{GET_SCORE_PERSENT}, | 119 | GET_SCORE_PERSENT = #{GET_SCORE_PERSENT}, |
| 118 | </if><if test="GET_MAX_SCORE != null and GET_MAX_SCORE != ''"> | 120 | </if><if test="GET_MAX_SCORE != null and GET_MAX_SCORE != ''"> |
| 119 | GET_MAX_SCORE = #{GET_MAX_SCORE}, | 121 | GET_MAX_SCORE = #{GET_MAX_SCORE}, |
| 122 | + </if><if test="GET_MIN_SCORE != null and GET_MIN_SCORE != ''"> | ||
| 123 | + GET_MIN_SCORE = #{GET_MIN_SCORE}, | ||
| 120 | </if><if test="QUESTION_COUNT != null and QUESTION_COUNT != ''"> | 124 | </if><if test="QUESTION_COUNT != null and QUESTION_COUNT != ''"> |
| 121 | QUESTION_COUNT = #{QUESTION_COUNT}, | 125 | QUESTION_COUNT = #{QUESTION_COUNT}, |
| 122 | </if><if test="ANSWER_PERSENT != null and ANSWER_PERSENT != ''"> | 126 | </if><if test="ANSWER_PERSENT != null and ANSWER_PERSENT != ''"> |
resources/mybatis1/sunvote/HomeworkReportMapper.xml
| @@ -113,6 +113,15 @@ | @@ -113,6 +113,15 @@ | ||
| 113 | HOMEWORK_ID = #{HOMEWORK_ID} | 113 | HOMEWORK_ID = #{HOMEWORK_ID} |
| 114 | </select> | 114 | </select> |
| 115 | 115 | ||
| 116 | + <select id="findNoAnswerByHomeworkID" parameterType="pd" resultType="pd"> | ||
| 117 | + select | ||
| 118 | + <include refid="Field"></include> | ||
| 119 | + from | ||
| 120 | + <include refid="tableName"></include> | ||
| 121 | + where | ||
| 122 | + HOMEWORK_ID = #{HOMEWORK_ID} and (answer is null or GET_SCORE = '0') | ||
| 123 | + </select> | ||
| 124 | + | ||
| 116 | <!-- 列表 --> | 125 | <!-- 列表 --> |
| 117 | <select id="datalistPage" parameterType="page" resultType="pd"> | 126 | <select id="datalistPage" parameterType="page" resultType="pd"> |
| 118 | select | 127 | select |
resources/mybatis1/sunvote/InstantQuestionDataSource1Mapper.xml
| @@ -19,7 +19,7 @@ | @@ -19,7 +19,7 @@ | ||
| 19 | GRADE_ID, | 19 | GRADE_ID, |
| 20 | SCHOOL_ID, | 20 | SCHOOL_ID, |
| 21 | USER_ID, | 21 | USER_ID, |
| 22 | - 创建时间, | 22 | + CREATE_DATE, |
| 23 | CLASS_ID, | 23 | CLASS_ID, |
| 24 | INSTANTQUESTIONDATASOURCE1_ID | 24 | INSTANTQUESTIONDATASOURCE1_ID |
| 25 | </sql> | 25 | </sql> |
| @@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
| 36 | #{GRADE_ID}, | 36 | #{GRADE_ID}, |
| 37 | #{SCHOOL_ID}, | 37 | #{SCHOOL_ID}, |
| 38 | #{USER_ID}, | 38 | #{USER_ID}, |
| 39 | - #{创建时间}, | 39 | + #{CREATE_DATE}, |
| 40 | #{CLASS_ID}, | 40 | #{CLASS_ID}, |
| 41 | #{INSTANTQUESTIONDATASOURCE1_ID} | 41 | #{INSTANTQUESTIONDATASOURCE1_ID} |
| 42 | </sql> | 42 | </sql> |
| @@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
| 75 | GRADE_ID = #{GRADE_ID}, | 75 | GRADE_ID = #{GRADE_ID}, |
| 76 | SCHOOL_ID = #{SCHOOL_ID}, | 76 | SCHOOL_ID = #{SCHOOL_ID}, |
| 77 | USER_ID = #{USER_ID}, | 77 | USER_ID = #{USER_ID}, |
| 78 | - 创建时间 = #{创建时间}, | 78 | + 创建时间 = #{CREATE_DATE}, |
| 79 | CLASS_ID = #{CLASS_ID}, | 79 | CLASS_ID = #{CLASS_ID}, |
| 80 | INSTANTQUESTIONDATASOURCE1_ID = INSTANTQUESTIONDATASOURCE1_ID | 80 | INSTANTQUESTIONDATASOURCE1_ID = INSTANTQUESTIONDATASOURCE1_ID |
| 81 | where | 81 | where |
src/com/fh/bean/ResultHomework.java
| @@ -13,6 +13,7 @@ public class ResultHomework { | @@ -13,6 +13,7 @@ public class ResultHomework { | ||
| 13 | private String COMPLETE_DESC; | 13 | private String COMPLETE_DESC; |
| 14 | private String GET_MAX_SCORE; | 14 | private String GET_MAX_SCORE; |
| 15 | private String ANSWER_PERSENT; | 15 | private String ANSWER_PERSENT; |
| 16 | + private String GET_MIN_SCORE; | ||
| 16 | private List<ResultStudent> STUDENTS; | 17 | private List<ResultStudent> STUDENTS; |
| 17 | 18 | ||
| 18 | public void setHOMEWORK_ID(String HOMEWORK_ID) { | 19 | public void setHOMEWORK_ID(String HOMEWORK_ID) { |
| @@ -71,7 +72,13 @@ public class ResultHomework { | @@ -71,7 +72,13 @@ public class ResultHomework { | ||
| 71 | return STUDENTS; | 72 | return STUDENTS; |
| 72 | } | 73 | } |
| 73 | 74 | ||
| 75 | + public String getGET_MIN_SCORE() { | ||
| 76 | + return GET_MIN_SCORE; | ||
| 77 | + } | ||
| 74 | 78 | ||
| 79 | + public void setGET_MIN_SCORE(String gET_MIN_SCORE) { | ||
| 80 | + GET_MIN_SCORE = gET_MIN_SCORE; | ||
| 81 | + } | ||
| 75 | 82 | ||
| 76 | public String getANSWER_PERSENT() { | 83 | public String getANSWER_PERSENT() { |
| 77 | return ANSWER_PERSENT; | 84 | return ANSWER_PERSENT; |
src/com/fh/controller/api/V1.java
| @@ -2908,6 +2908,7 @@ public class V1 extends BaseController { | @@ -2908,6 +2908,7 @@ public class V1 extends BaseController { | ||
| 2908 | homePd.put("GET_SCORE_PERSENT", resultHomework.getGET_SCORE_PERSENT()); | 2908 | homePd.put("GET_SCORE_PERSENT", resultHomework.getGET_SCORE_PERSENT()); |
| 2909 | homePd.put("COMPLETE_DESC", resultHomework.getCOMPLETE_DESC()); | 2909 | homePd.put("COMPLETE_DESC", resultHomework.getCOMPLETE_DESC()); |
| 2910 | homePd.put("GET_MAX_SCORE", resultHomework.getGET_MAX_SCORE()); | 2910 | homePd.put("GET_MAX_SCORE", resultHomework.getGET_MAX_SCORE()); |
| 2911 | + homePd.put("GET_MIN_SCORE", resultHomework.getGET_MIN_SCORE()); | ||
| 2911 | homePd.put("ANSWER_PERSENT", resultHomework.getANSWER_PERSENT()); | 2912 | homePd.put("ANSWER_PERSENT", resultHomework.getANSWER_PERSENT()); |
| 2912 | homePd.put("COMPLETE_COUNT", "1"); | 2913 | homePd.put("COMPLETE_COUNT", "1"); |
| 2913 | homeworkService.edit(homePd); | 2914 | homeworkService.edit(homePd); |
src/com/fh/controller/sunvote/homework/HomeworkController.java
| @@ -16,6 +16,7 @@ import javax.annotation.Resource; | @@ -16,6 +16,7 @@ import javax.annotation.Resource; | ||
| 16 | 16 | ||
| 17 | import org.springframework.beans.propertyeditors.CustomDateEditor; | 17 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
| 18 | import org.springframework.stereotype.Controller; | 18 | import org.springframework.stereotype.Controller; |
| 19 | +import org.springframework.util.StringUtils; | ||
| 19 | import org.springframework.web.bind.WebDataBinder; | 20 | import org.springframework.web.bind.WebDataBinder; |
| 20 | import org.springframework.web.bind.annotation.InitBinder; | 21 | import org.springframework.web.bind.annotation.InitBinder; |
| 21 | import org.springframework.web.bind.annotation.RequestMapping; | 22 | import org.springframework.web.bind.annotation.RequestMapping; |
| @@ -39,6 +40,7 @@ import com.fh.util.AppUtil; | @@ -39,6 +40,7 @@ import com.fh.util.AppUtil; | ||
| 39 | import com.fh.util.Jurisdiction; | 40 | import com.fh.util.Jurisdiction; |
| 40 | import com.fh.util.ObjectExcelView; | 41 | import com.fh.util.ObjectExcelView; |
| 41 | import com.fh.util.PageData; | 42 | import com.fh.util.PageData; |
| 43 | +import com.fh.util.StringUtil; | ||
| 42 | import com.google.gson.Gson; | 44 | import com.google.gson.Gson; |
| 43 | 45 | ||
| 44 | /** | 46 | /** |
| @@ -290,6 +292,173 @@ public class HomeworkController extends BaseController { | @@ -290,6 +292,173 @@ public class HomeworkController extends BaseController { | ||
| 290 | 292 | ||
| 291 | 293 | ||
| 292 | /** | 294 | /** |
| 295 | + * 传入homework_id | ||
| 296 | + * 查询该场课后练的整体情况,最高分,最低分,平均分,总分,总题数,未答人数等 | ||
| 297 | + * 未答人数列表 | ||
| 298 | + * @return | ||
| 299 | + * @throws Exception | ||
| 300 | + */ | ||
| 301 | + @RequestMapping(value = "/report2") | ||
| 302 | + public ModelAndView report2() throws Exception { | ||
| 303 | + PageData pageData = this.getPageData(); | ||
| 304 | + ModelAndView modelAndView = getModelAndView(); | ||
| 305 | + | ||
| 306 | + String homeworkId = pageData.getString("HOMEWORK_ID"); | ||
| 307 | + if(!StringUtils.isEmpty(homeworkId.trim())){ | ||
| 308 | + pageData = homeworkService.findById(pageData); | ||
| 309 | + List<PageData> data = homeworkReporkService.findNoAnswerByHomeworkID(pageData); | ||
| 310 | + pageData.put("NO_COUNT", data.size()); | ||
| 311 | + modelAndView.addObject("pageData", pageData); // 报表统计情况 | ||
| 312 | + modelAndView.addObject("data", data);// 未答学生列表 | ||
| 313 | + | ||
| 314 | + } | ||
| 315 | + if(isChineseLanguageClient()){ | ||
| 316 | + modelAndView.setViewName("sunvote/homework/??????"); | ||
| 317 | + }else{ | ||
| 318 | + modelAndView.setViewName("sunvote/homework/??????"); | ||
| 319 | + } | ||
| 320 | + | ||
| 321 | + return modelAndView; | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + /** | ||
| 325 | + * 传入homework_id | ||
| 326 | + * index 第几题 | ||
| 327 | + * @return | ||
| 328 | + * @throws Exception | ||
| 329 | + */ | ||
| 330 | + @RequestMapping(value = "/homeworkindexview") | ||
| 331 | + public ModelAndView homeworkindexview() throws Exception { | ||
| 332 | + PageData pageData = this.getPageData(); | ||
| 333 | + ModelAndView modelAndView = getModelAndView(); | ||
| 334 | + | ||
| 335 | + String homeworkId = pageData.getString("HOMEWORK_ID"); | ||
| 336 | + String index = pageData.getString("INDEX"); | ||
| 337 | + int indexint = Integer.parseInt(index); | ||
| 338 | + List<PageData> data = homeworkReporkService.findNoAnswerByHomeworkID(pageData); | ||
| 339 | + List<PageData> result = new ArrayList(); | ||
| 340 | + PageData aresult = new PageData(); | ||
| 341 | + aresult.put("ANSWER", "A"); | ||
| 342 | + PageData bresult = new PageData(); | ||
| 343 | + bresult.put("ANSWER", "B"); | ||
| 344 | + PageData cresult = new PageData(); | ||
| 345 | + cresult.put("ANSWER", "C"); | ||
| 346 | + PageData dresult = new PageData(); | ||
| 347 | + dresult.put("ANSWER", "D"); | ||
| 348 | + PageData eresult = new PageData(); | ||
| 349 | + eresult.put("ANSWER", ""); | ||
| 350 | + result.add(aresult); | ||
| 351 | + result.add(bresult); | ||
| 352 | + result.add(cresult); | ||
| 353 | + result.add(dresult); | ||
| 354 | + result.add(eresult); | ||
| 355 | + for(PageData pd : data){ | ||
| 356 | + String answer = pd.getString("ANSWER"); | ||
| 357 | + if(!StringUtils.isEmpty(answer)){ | ||
| 358 | + String[] answers = answer.split(";"); | ||
| 359 | + if(answers.length >= indexint -1){ | ||
| 360 | + String ans = answers[indexint - 1]; | ||
| 361 | + String[] anss = ans.split(":"); | ||
| 362 | + if(anss != null && anss.length == 2){ | ||
| 363 | + PageData tresult = null; | ||
| 364 | + for(PageData ptd : result){ | ||
| 365 | + if(anss[0].toUpperCase().equals(anss[0].toUpperCase())){ | ||
| 366 | + tresult = ptd; | ||
| 367 | + } | ||
| 368 | + } | ||
| 369 | + if(tresult == null){ | ||
| 370 | + tresult = new PageData(); | ||
| 371 | + result.add(tresult); | ||
| 372 | + } | ||
| 373 | + List<String> list = (List)tresult.get("STUDENTS"); | ||
| 374 | + if(list == null){ | ||
| 375 | + list = new ArrayList(); | ||
| 376 | + } | ||
| 377 | + list.add(pd.getString("STUDENT_NAME")); | ||
| 378 | + tresult.put("ANSWER", anss[0].toUpperCase()); | ||
| 379 | + tresult.put("STUDENTS", list); | ||
| 380 | + tresult.put("RIGHT", !"0".equals(anss[1])); | ||
| 381 | + } | ||
| 382 | + } | ||
| 383 | + } | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | + modelAndView.addObject("datas", new Gson().toJson(result)); | ||
| 387 | +// modelAndView.addObject("datas",result); | ||
| 388 | + | ||
| 389 | + modelAndView.setViewName(""); | ||
| 390 | + return modelAndView; | ||
| 391 | + } | ||
| 392 | + | ||
| 393 | + | ||
| 394 | + /** | ||
| 395 | + * 传入homework_id | ||
| 396 | + * index 第几题 | ||
| 397 | + * @return | ||
| 398 | + * @throws Exception | ||
| 399 | + */ | ||
| 400 | + @RequestMapping(value = "/homeworkindex") | ||
| 401 | + @ResponseBody | ||
| 402 | + public Object homeworkindex() throws Exception { | ||
| 403 | + PageData pageData = this.getPageData(); | ||
| 404 | + | ||
| 405 | + String homeworkId = pageData.getString("HOMEWORK_ID"); | ||
| 406 | + String index = pageData.getString("INDEX"); | ||
| 407 | + int indexint = Integer.parseInt(index); | ||
| 408 | + List<PageData> data = homeworkReporkService.findNoAnswerByHomeworkID(pageData); | ||
| 409 | + List<PageData> result = new ArrayList(); | ||
| 410 | + PageData aresult = new PageData(); | ||
| 411 | + aresult.put("ANSWER", "A"); | ||
| 412 | + PageData bresult = new PageData(); | ||
| 413 | + bresult.put("ANSWER", "B"); | ||
| 414 | + PageData cresult = new PageData(); | ||
| 415 | + cresult.put("ANSWER", "C"); | ||
| 416 | + PageData dresult = new PageData(); | ||
| 417 | + dresult.put("ANSWER", "D"); | ||
| 418 | + PageData eresult = new PageData(); | ||
| 419 | + eresult.put("ANSWER", ""); | ||
| 420 | + result.add(aresult); | ||
| 421 | + result.add(bresult); | ||
| 422 | + result.add(cresult); | ||
| 423 | + result.add(dresult); | ||
| 424 | + result.add(eresult); | ||
| 425 | + for(PageData pd : data){ | ||
| 426 | + String answer = pd.getString("ANSWER"); | ||
| 427 | + if(!StringUtils.isEmpty(answer)){ | ||
| 428 | + String[] answers = answer.split(";"); | ||
| 429 | + if(answers.length >= indexint -1){ | ||
| 430 | + String ans = answers[indexint - 1]; | ||
| 431 | + String[] anss = ans.split(":"); | ||
| 432 | + if(anss != null && anss.length == 2){ | ||
| 433 | + PageData tresult = null; | ||
| 434 | + for(PageData ptd : result){ | ||
| 435 | + if(anss[0].toUpperCase().equals(anss[0].toUpperCase())){ | ||
| 436 | + tresult = ptd; | ||
| 437 | + } | ||
| 438 | + } | ||
| 439 | + if(tresult == null){ | ||
| 440 | + tresult = new PageData(); | ||
| 441 | + result.add(tresult); | ||
| 442 | + } | ||
| 443 | + List<String> list = (List)tresult.get("STUDENTS"); | ||
| 444 | + if(list == null){ | ||
| 445 | + list = new ArrayList(); | ||
| 446 | + } | ||
| 447 | + list.add(pd.getString("STUDENT_NAME")); | ||
| 448 | + tresult.put("ANSWER", anss[0].toUpperCase()); | ||
| 449 | + tresult.put("STUDENTS", list); | ||
| 450 | + tresult.put("RIGHT", !"0".equals(anss[1])); | ||
| 451 | + } | ||
| 452 | + } | ||
| 453 | + } | ||
| 454 | + } | ||
| 455 | + return new Gson().toJson(result); | ||
| 456 | + | ||
| 457 | + } | ||
| 458 | + | ||
| 459 | + | ||
| 460 | + | ||
| 461 | + /** | ||
| 293 | * 去修改页面 | 462 | * 去修改页面 |
| 294 | * | 463 | * |
| 295 | * @param | 464 | * @param |
| @@ -953,4 +1122,6 @@ public class HomeworkController extends BaseController { | @@ -953,4 +1122,6 @@ public class HomeworkController extends BaseController { | ||
| 953 | } | 1122 | } |
| 954 | return responseGson.toJson(); | 1123 | return responseGson.toJson(); |
| 955 | } | 1124 | } |
| 1125 | + | ||
| 1126 | + | ||
| 956 | } | 1127 | } |
src/com/fh/controller/sunvote/instantpaper1/InstantPaper1Controller.java
| @@ -45,7 +45,6 @@ public class InstantPaper1Controller extends BaseController { | @@ -45,7 +45,6 @@ public class InstantPaper1Controller extends BaseController { | ||
| 45 | @RequestMapping(value="/save") | 45 | @RequestMapping(value="/save") |
| 46 | public ModelAndView save() throws Exception{ | 46 | public ModelAndView save() throws Exception{ |
| 47 | logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1"); | 47 | logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1"); |
| 48 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | ModelAndView mv = this.getModelAndView(); | 48 | ModelAndView mv = this.getModelAndView(); |
| 50 | PageData pd = new PageData(); | 49 | PageData pd = new PageData(); |
| 51 | pd = this.getPageData(); | 50 | pd = this.getPageData(); |
| @@ -64,7 +63,6 @@ public class InstantPaper1Controller extends BaseController { | @@ -64,7 +63,6 @@ public class InstantPaper1Controller extends BaseController { | ||
| 64 | @RequestMapping(value="/delete") | 63 | @RequestMapping(value="/delete") |
| 65 | public void delete(PrintWriter out) throws Exception{ | 64 | public void delete(PrintWriter out) throws Exception{ |
| 66 | logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1"); | 65 | logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1"); |
| 67 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 68 | PageData pd = new PageData(); | 66 | PageData pd = new PageData(); |
| 69 | pd = this.getPageData(); | 67 | pd = this.getPageData(); |
| 70 | instantpaper1Service.delete(pd); | 68 | instantpaper1Service.delete(pd); |
| @@ -79,7 +77,6 @@ public class InstantPaper1Controller extends BaseController { | @@ -79,7 +77,6 @@ public class InstantPaper1Controller extends BaseController { | ||
| 79 | @RequestMapping(value="/edit") | 77 | @RequestMapping(value="/edit") |
| 80 | public ModelAndView edit() throws Exception{ | 78 | public ModelAndView edit() throws Exception{ |
| 81 | logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1"); | 79 | logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1"); |
| 82 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 83 | ModelAndView mv = this.getModelAndView(); | 80 | ModelAndView mv = this.getModelAndView(); |
| 84 | PageData pd = new PageData(); | 81 | PageData pd = new PageData(); |
| 85 | pd = this.getPageData(); | 82 | pd = this.getPageData(); |
| @@ -96,7 +93,6 @@ public class InstantPaper1Controller extends BaseController { | @@ -96,7 +93,6 @@ public class InstantPaper1Controller extends BaseController { | ||
| 96 | @RequestMapping(value="/list") | 93 | @RequestMapping(value="/list") |
| 97 | public ModelAndView list(Page page) throws Exception{ | 94 | public ModelAndView list(Page page) throws Exception{ |
| 98 | logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1"); | 95 | logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1"); |
| 99 | - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
| 100 | ModelAndView mv = this.getModelAndView(); | 96 | ModelAndView mv = this.getModelAndView(); |
| 101 | PageData pd = new PageData(); | 97 | PageData pd = new PageData(); |
| 102 | pd = this.getPageData(); | 98 | pd = this.getPageData(); |
| @@ -152,7 +148,6 @@ public class InstantPaper1Controller extends BaseController { | @@ -152,7 +148,6 @@ public class InstantPaper1Controller extends BaseController { | ||
| 152 | @ResponseBody | 148 | @ResponseBody |
| 153 | public Object deleteAll() throws Exception{ | 149 | public Object deleteAll() throws Exception{ |
| 154 | logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1"); | 150 | logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1"); |
| 155 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
| 156 | PageData pd = new PageData(); | 151 | PageData pd = new PageData(); |
| 157 | Map<String,Object> map = new HashMap<String,Object>(); | 152 | Map<String,Object> map = new HashMap<String,Object>(); |
| 158 | pd = this.getPageData(); | 153 | pd = this.getPageData(); |
| @@ -177,7 +172,6 @@ public class InstantPaper1Controller extends BaseController { | @@ -177,7 +172,6 @@ public class InstantPaper1Controller extends BaseController { | ||
| 177 | @RequestMapping(value="/excel") | 172 | @RequestMapping(value="/excel") |
| 178 | public ModelAndView exportExcel() throws Exception{ | 173 | public ModelAndView exportExcel() throws Exception{ |
| 179 | logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1到excel"); | 174 | logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1到excel"); |
| 180 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 181 | ModelAndView mv = new ModelAndView(); | 175 | ModelAndView mv = new ModelAndView(); |
| 182 | PageData pd = new PageData(); | 176 | PageData pd = new PageData(); |
| 183 | pd = this.getPageData(); | 177 | pd = this.getPageData(); |
src/com/fh/controller/sunvote/instantpaper1content/InstantPaper1ContentController.java
| @@ -45,7 +45,6 @@ public class InstantPaper1ContentController extends BaseController { | @@ -45,7 +45,6 @@ public class InstantPaper1ContentController extends BaseController { | ||
| 45 | @RequestMapping(value="/save") | 45 | @RequestMapping(value="/save") |
| 46 | public ModelAndView save() throws Exception{ | 46 | public ModelAndView save() throws Exception{ |
| 47 | logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1Content"); | 47 | logBefore(logger, Jurisdiction.getUsername()+"新增InstantPaper1Content"); |
| 48 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | ModelAndView mv = this.getModelAndView(); | 48 | ModelAndView mv = this.getModelAndView(); |
| 50 | PageData pd = new PageData(); | 49 | PageData pd = new PageData(); |
| 51 | pd = this.getPageData(); | 50 | pd = this.getPageData(); |
| @@ -63,7 +62,6 @@ public class InstantPaper1ContentController extends BaseController { | @@ -63,7 +62,6 @@ public class InstantPaper1ContentController extends BaseController { | ||
| 63 | @RequestMapping(value="/delete") | 62 | @RequestMapping(value="/delete") |
| 64 | public void delete(PrintWriter out) throws Exception{ | 63 | public void delete(PrintWriter out) throws Exception{ |
| 65 | logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1Content"); | 64 | logBefore(logger, Jurisdiction.getUsername()+"删除InstantPaper1Content"); |
| 66 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 67 | PageData pd = new PageData(); | 65 | PageData pd = new PageData(); |
| 68 | pd = this.getPageData(); | 66 | pd = this.getPageData(); |
| 69 | instantpaper1contentService.delete(pd); | 67 | instantpaper1contentService.delete(pd); |
| @@ -78,7 +76,6 @@ public class InstantPaper1ContentController extends BaseController { | @@ -78,7 +76,6 @@ public class InstantPaper1ContentController extends BaseController { | ||
| 78 | @RequestMapping(value="/edit") | 76 | @RequestMapping(value="/edit") |
| 79 | public ModelAndView edit() throws Exception{ | 77 | public ModelAndView edit() throws Exception{ |
| 80 | logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1Content"); | 78 | logBefore(logger, Jurisdiction.getUsername()+"修改InstantPaper1Content"); |
| 81 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 82 | ModelAndView mv = this.getModelAndView(); | 79 | ModelAndView mv = this.getModelAndView(); |
| 83 | PageData pd = new PageData(); | 80 | PageData pd = new PageData(); |
| 84 | pd = this.getPageData(); | 81 | pd = this.getPageData(); |
| @@ -95,7 +92,6 @@ public class InstantPaper1ContentController extends BaseController { | @@ -95,7 +92,6 @@ public class InstantPaper1ContentController extends BaseController { | ||
| 95 | @RequestMapping(value="/list") | 92 | @RequestMapping(value="/list") |
| 96 | public ModelAndView list(Page page) throws Exception{ | 93 | public ModelAndView list(Page page) throws Exception{ |
| 97 | logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1Content"); | 94 | logBefore(logger, Jurisdiction.getUsername()+"列表InstantPaper1Content"); |
| 98 | - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
| 99 | ModelAndView mv = this.getModelAndView(); | 95 | ModelAndView mv = this.getModelAndView(); |
| 100 | PageData pd = new PageData(); | 96 | PageData pd = new PageData(); |
| 101 | pd = this.getPageData(); | 97 | pd = this.getPageData(); |
| @@ -151,7 +147,6 @@ public class InstantPaper1ContentController extends BaseController { | @@ -151,7 +147,6 @@ public class InstantPaper1ContentController extends BaseController { | ||
| 151 | @ResponseBody | 147 | @ResponseBody |
| 152 | public Object deleteAll() throws Exception{ | 148 | public Object deleteAll() throws Exception{ |
| 153 | logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1Content"); | 149 | logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantPaper1Content"); |
| 154 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
| 155 | PageData pd = new PageData(); | 150 | PageData pd = new PageData(); |
| 156 | Map<String,Object> map = new HashMap<String,Object>(); | 151 | Map<String,Object> map = new HashMap<String,Object>(); |
| 157 | pd = this.getPageData(); | 152 | pd = this.getPageData(); |
| @@ -176,7 +171,6 @@ public class InstantPaper1ContentController extends BaseController { | @@ -176,7 +171,6 @@ public class InstantPaper1ContentController extends BaseController { | ||
| 176 | @RequestMapping(value="/excel") | 171 | @RequestMapping(value="/excel") |
| 177 | public ModelAndView exportExcel() throws Exception{ | 172 | public ModelAndView exportExcel() throws Exception{ |
| 178 | logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1Content到excel"); | 173 | logBefore(logger, Jurisdiction.getUsername()+"导出InstantPaper1Content到excel"); |
| 179 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 180 | ModelAndView mv = new ModelAndView(); | 174 | ModelAndView mv = new ModelAndView(); |
| 181 | PageData pd = new PageData(); | 175 | PageData pd = new PageData(); |
| 182 | pd = this.getPageData(); | 176 | pd = this.getPageData(); |
src/com/fh/controller/sunvote/instantquestiondatasource1/InstantQuestionDataSource1Controller.java
| @@ -8,7 +8,9 @@ import java.util.Date; | @@ -8,7 +8,9 @@ import java.util.Date; | ||
| 8 | import java.util.HashMap; | 8 | import java.util.HashMap; |
| 9 | import java.util.List; | 9 | import java.util.List; |
| 10 | import java.util.Map; | 10 | import java.util.Map; |
| 11 | + | ||
| 11 | import javax.annotation.Resource; | 12 | import javax.annotation.Resource; |
| 13 | + | ||
| 12 | import org.springframework.beans.propertyeditors.CustomDateEditor; | 14 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
| 13 | import org.springframework.stereotype.Controller; | 15 | import org.springframework.stereotype.Controller; |
| 14 | import org.springframework.web.bind.WebDataBinder; | 16 | import org.springframework.web.bind.WebDataBinder; |
| @@ -16,14 +18,14 @@ import org.springframework.web.bind.annotation.InitBinder; | @@ -16,14 +18,14 @@ import org.springframework.web.bind.annotation.InitBinder; | ||
| 16 | import org.springframework.web.bind.annotation.RequestMapping; | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
| 17 | import org.springframework.web.bind.annotation.ResponseBody; | 19 | import org.springframework.web.bind.annotation.ResponseBody; |
| 18 | import org.springframework.web.servlet.ModelAndView; | 20 | import org.springframework.web.servlet.ModelAndView; |
| 21 | + | ||
| 19 | import com.fh.controller.base.BaseController; | 22 | import com.fh.controller.base.BaseController; |
| 20 | import com.fh.entity.Page; | 23 | import com.fh.entity.Page; |
| 24 | +import com.fh.service.sunvote.instantquestiondatasource1.InstantQuestionDataSource1Manager; | ||
| 21 | import com.fh.util.AppUtil; | 25 | import com.fh.util.AppUtil; |
| 26 | +import com.fh.util.Jurisdiction; | ||
| 22 | import com.fh.util.ObjectExcelView; | 27 | import com.fh.util.ObjectExcelView; |
| 23 | import com.fh.util.PageData; | 28 | import com.fh.util.PageData; |
| 24 | -import com.fh.util.Jurisdiction; | ||
| 25 | -import com.fh.util.Tools; | ||
| 26 | -import com.fh.service.sunvote.instantquestiondatasource1.InstantQuestionDataSource1Manager; | ||
| 27 | 29 | ||
| 28 | /** | 30 | /** |
| 29 | * 说明:即时测题库1 | 31 | * 说明:即时测题库1 |
| @@ -45,7 +47,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -45,7 +47,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 45 | @RequestMapping(value="/save") | 47 | @RequestMapping(value="/save") |
| 46 | public ModelAndView save() throws Exception{ | 48 | public ModelAndView save() throws Exception{ |
| 47 | logBefore(logger, Jurisdiction.getUsername()+"新增InstantQuestionDataSource1"); | 49 | logBefore(logger, Jurisdiction.getUsername()+"新增InstantQuestionDataSource1"); |
| 48 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "add")){return null;} //校验权限 | ||
| 49 | ModelAndView mv = this.getModelAndView(); | 50 | ModelAndView mv = this.getModelAndView(); |
| 50 | PageData pd = new PageData(); | 51 | PageData pd = new PageData(); |
| 51 | pd = this.getPageData(); | 52 | pd = this.getPageData(); |
| @@ -63,7 +64,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -63,7 +64,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 63 | @RequestMapping(value="/delete") | 64 | @RequestMapping(value="/delete") |
| 64 | public void delete(PrintWriter out) throws Exception{ | 65 | public void delete(PrintWriter out) throws Exception{ |
| 65 | logBefore(logger, Jurisdiction.getUsername()+"删除InstantQuestionDataSource1"); | 66 | logBefore(logger, Jurisdiction.getUsername()+"删除InstantQuestionDataSource1"); |
| 66 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return;} //校验权限 | ||
| 67 | PageData pd = new PageData(); | 67 | PageData pd = new PageData(); |
| 68 | pd = this.getPageData(); | 68 | pd = this.getPageData(); |
| 69 | instantquestiondatasource1Service.delete(pd); | 69 | instantquestiondatasource1Service.delete(pd); |
| @@ -78,7 +78,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -78,7 +78,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 78 | @RequestMapping(value="/edit") | 78 | @RequestMapping(value="/edit") |
| 79 | public ModelAndView edit() throws Exception{ | 79 | public ModelAndView edit() throws Exception{ |
| 80 | logBefore(logger, Jurisdiction.getUsername()+"修改InstantQuestionDataSource1"); | 80 | logBefore(logger, Jurisdiction.getUsername()+"修改InstantQuestionDataSource1"); |
| 81 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "edit")){return null;} //校验权限 | ||
| 82 | ModelAndView mv = this.getModelAndView(); | 81 | ModelAndView mv = this.getModelAndView(); |
| 83 | PageData pd = new PageData(); | 82 | PageData pd = new PageData(); |
| 84 | pd = this.getPageData(); | 83 | pd = this.getPageData(); |
| @@ -95,7 +94,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -95,7 +94,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 95 | @RequestMapping(value="/list") | 94 | @RequestMapping(value="/list") |
| 96 | public ModelAndView list(Page page) throws Exception{ | 95 | public ModelAndView list(Page page) throws Exception{ |
| 97 | logBefore(logger, Jurisdiction.getUsername()+"列表InstantQuestionDataSource1"); | 96 | logBefore(logger, Jurisdiction.getUsername()+"列表InstantQuestionDataSource1"); |
| 98 | - //if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} //校验权限(无权查看时页面会有提示,如果不注释掉这句代码就无法进入列表页面,所以根据情况是否加入本句代码) | ||
| 99 | ModelAndView mv = this.getModelAndView(); | 97 | ModelAndView mv = this.getModelAndView(); |
| 100 | PageData pd = new PageData(); | 98 | PageData pd = new PageData(); |
| 101 | pd = this.getPageData(); | 99 | pd = this.getPageData(); |
| @@ -151,7 +149,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -151,7 +149,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 151 | @ResponseBody | 149 | @ResponseBody |
| 152 | public Object deleteAll() throws Exception{ | 150 | public Object deleteAll() throws Exception{ |
| 153 | logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantQuestionDataSource1"); | 151 | logBefore(logger, Jurisdiction.getUsername()+"批量删除InstantQuestionDataSource1"); |
| 154 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "del")){return null;} //校验权限 | ||
| 155 | PageData pd = new PageData(); | 152 | PageData pd = new PageData(); |
| 156 | Map<String,Object> map = new HashMap<String,Object>(); | 153 | Map<String,Object> map = new HashMap<String,Object>(); |
| 157 | pd = this.getPageData(); | 154 | pd = this.getPageData(); |
| @@ -176,7 +173,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -176,7 +173,6 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 176 | @RequestMapping(value="/excel") | 173 | @RequestMapping(value="/excel") |
| 177 | public ModelAndView exportExcel() throws Exception{ | 174 | public ModelAndView exportExcel() throws Exception{ |
| 178 | logBefore(logger, Jurisdiction.getUsername()+"导出InstantQuestionDataSource1到excel"); | 175 | logBefore(logger, Jurisdiction.getUsername()+"导出InstantQuestionDataSource1到excel"); |
| 179 | - if(!Jurisdiction.buttonJurisdiction(menuUrl, "cha")){return null;} | ||
| 180 | ModelAndView mv = new ModelAndView(); | 176 | ModelAndView mv = new ModelAndView(); |
| 181 | PageData pd = new PageData(); | 177 | PageData pd = new PageData(); |
| 182 | pd = this.getPageData(); | 178 | pd = this.getPageData(); |
| @@ -192,7 +188,7 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -192,7 +188,7 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 192 | titles.add("年级"); //8 | 188 | titles.add("年级"); //8 |
| 193 | titles.add("学校"); //9 | 189 | titles.add("学校"); //9 |
| 194 | titles.add("用户ID"); //10 | 190 | titles.add("用户ID"); //10 |
| 195 | - titles.add("create_time"); //11 | 191 | + titles.add("创建时间"); //11 |
| 196 | titles.add("班级"); //12 | 192 | titles.add("班级"); //12 |
| 197 | dataMap.put("titles", titles); | 193 | dataMap.put("titles", titles); |
| 198 | List<PageData> varOList = instantquestiondatasource1Service.listAll(pd); | 194 | List<PageData> varOList = instantquestiondatasource1Service.listAll(pd); |
| @@ -209,7 +205,7 @@ public class InstantQuestionDataSource1Controller extends BaseController { | @@ -209,7 +205,7 @@ public class InstantQuestionDataSource1Controller extends BaseController { | ||
| 209 | vpd.put("var8", varOList.get(i).getString("GRADE_ID")); //8 | 205 | vpd.put("var8", varOList.get(i).getString("GRADE_ID")); //8 |
| 210 | vpd.put("var9", varOList.get(i).getString("SCHOOL_ID")); //9 | 206 | vpd.put("var9", varOList.get(i).getString("SCHOOL_ID")); //9 |
| 211 | vpd.put("var10", varOList.get(i).getString("USER_ID")); //10 | 207 | vpd.put("var10", varOList.get(i).getString("USER_ID")); //10 |
| 212 | - vpd.put("var11", varOList.get(i).getString("创建时间")); //11 | 208 | + vpd.put("var11", varOList.get(i).getString("CREATE_DATE")); //11 |
| 213 | vpd.put("var12", varOList.get(i).getString("CLASS_ID")); //12 | 209 | vpd.put("var12", varOList.get(i).getString("CLASS_ID")); //12 |
| 214 | varList.add(vpd); | 210 | varList.add(vpd); |
| 215 | } | 211 | } |
src/com/fh/controller/system/login/LoginController.java
| @@ -257,6 +257,15 @@ public class LoginController extends BaseController { | @@ -257,6 +257,15 @@ public class LoginController extends BaseController { | ||
| 257 | session.setAttribute(USERNAME + Const.ROLE_ID, | 257 | session.setAttribute(USERNAME + Const.ROLE_ID, |
| 258 | "teacher"); | 258 | "teacher"); |
| 259 | session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session | 259 | session.setAttribute(Const.SESSION_USERNAME, USERNAME); // 放入用户名到session |
| 260 | + session.setAttribute(getUsername() | ||
| 261 | + + Const.SCHOOL_ID, teacherInfo.get("SCHOOL_ID")); | ||
| 262 | + session.setAttribute(getUsername() | ||
| 263 | + + Const.SCHOOL_NAME, teacherInfo.get("SNAME")); | ||
| 264 | + session.setAttribute(getUsername() | ||
| 265 | + + Const.GRADE_ID, teacherInfo.get("GRADE_ID")); | ||
| 266 | + session.setAttribute(getUsername() | ||
| 267 | + + Const.SUBJECT_ID, teacherInfo.get("SUBJECT_ID")); | ||
| 268 | + | ||
| 260 | if(isChineseLanguageClient()){ | 269 | if(isChineseLanguageClient()){ |
| 261 | mv.setViewName("sunvote/teacher/teacher_main"); | 270 | mv.setViewName("sunvote/teacher/teacher_main"); |
| 262 | }else{ | 271 | }else{ |
src/com/fh/service/sunvote/homework/HomeworkReportManager.java
| @@ -57,6 +57,13 @@ public interface HomeworkReportManager{ | @@ -57,6 +57,13 @@ public interface HomeworkReportManager{ | ||
| 57 | * @throws Exception | 57 | * @throws Exception |
| 58 | */ | 58 | */ |
| 59 | public List<PageData> findByHomeworkID(PageData pd)throws Exception; | 59 | public List<PageData> findByHomeworkID(PageData pd)throws Exception; |
| 60 | + /** | ||
| 61 | + * | ||
| 62 | + * @param pd | ||
| 63 | + * @return | ||
| 64 | + * @throws Exception | ||
| 65 | + */ | ||
| 66 | + public List<PageData> findNoAnswerByHomeworkID(PageData pd)throws Exception; | ||
| 60 | 67 | ||
| 61 | /**列表(全部) | 68 | /**列表(全部) |
| 62 | * @param pd | 69 | * @param pd |
src/com/fh/service/sunvote/homework/impl/HomeworkReportService.java
| @@ -82,6 +82,11 @@ public class HomeworkReportService implements HomeworkReportManager{ | @@ -82,6 +82,11 @@ public class HomeworkReportService implements HomeworkReportManager{ | ||
| 82 | return (List<PageData>)dao.findForList("HomeworkReportMapper.findByHomeworkID", pd); | 82 | return (List<PageData>)dao.findForList("HomeworkReportMapper.findByHomeworkID", pd); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | + @SuppressWarnings("unchecked") | ||
| 86 | + public List<PageData> findNoAnswerByHomeworkID(PageData pd)throws Exception{ | ||
| 87 | + return (List<PageData>)dao.findForList("HomeworkReportMapper.findNoAnswerByHomeworkID", pd); | ||
| 88 | + } | ||
| 89 | + | ||
| 85 | /**通过id获取数据 | 90 | /**通过id获取数据 |
| 86 | * @param pd | 91 | * @param pd |
| 87 | * @throws Exception | 92 | * @throws Exception |
src/com/fh/util/Watermark.java
| @@ -10,8 +10,8 @@ import java.io.FileOutputStream; | @@ -10,8 +10,8 @@ import java.io.FileOutputStream; | ||
| 10 | 10 | ||
| 11 | import javax.imageio.ImageIO; | 11 | import javax.imageio.ImageIO; |
| 12 | 12 | ||
| 13 | -import com.sun.image.codec.jpeg.JPEGCodec; | ||
| 14 | -import com.sun.image.codec.jpeg.JPEGImageEncoder; | 13 | +//import com.sun.image.codec.jpeg.JPEGCodec; |
| 14 | +//import com.sun.image.codec.jpeg.JPEGImageEncoder; | ||
| 15 | 15 | ||
| 16 | public class Watermark { | 16 | public class Watermark { |
| 17 | 17 | ||
| @@ -89,8 +89,8 @@ public class Watermark { | @@ -89,8 +89,8 @@ public class Watermark { | ||
| 89 | //水印文件结束 | 89 | //水印文件结束 |
| 90 | g.dispose(); | 90 | g.dispose(); |
| 91 | FileOutputStream out = new FileOutputStream(targetImg); | 91 | FileOutputStream out = new FileOutputStream(targetImg); |
| 92 | - JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); | ||
| 93 | - encoder.encode(image); | 92 | +// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); |
| 93 | +// encoder.encode(image); | ||
| 94 | out.close(); | 94 | out.close(); |
| 95 | } catch (Exception e) { | 95 | } catch (Exception e) { |
| 96 | e.printStackTrace(); | 96 | e.printStackTrace(); |
| @@ -133,8 +133,8 @@ public class Watermark { | @@ -133,8 +133,8 @@ public class Watermark { | ||
| 133 | g.drawString(pressText, x, y); | 133 | g.drawString(pressText, x, y); |
| 134 | g.dispose(); | 134 | g.dispose(); |
| 135 | FileOutputStream out = new FileOutputStream(targetImg); | 135 | FileOutputStream out = new FileOutputStream(targetImg); |
| 136 | - JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); | ||
| 137 | - encoder.encode(image); | 136 | +// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); |
| 137 | +// encoder.encode(image); | ||
| 138 | out.close(); | 138 | out.close(); |
| 139 | } catch (Exception e) { | 139 | } catch (Exception e) { |
| 140 | System.out.println(e); | 140 | System.out.println(e); |