From 7bbf523611dcaf373244748ad02260f811d0238f Mon Sep 17 00:00:00 2001 From: jack_rabbit <376168706@qq.com> Date: Thu, 19 Dec 2019 17:35:04 +0800 Subject: [PATCH] 2.限制出题数为64 3.修改重复任课bug 4.修改按时间搜索,开始大于结束时间问题 --- WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp | 22 ++++++++++++++++++---- WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp | 8 ++++---- WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp | 4 ++-- WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp | 25 +++++++++++++++++++------ WebRoot/static/js/control-604.js | 16 ++++++++++++---- resources/mybatis1/sunvote/CourseManagementMapper.xml | 4 ++-- src/com/fh/controller/sunvote/paper/PaperController.java | 34 ++++++++++++++++++++++++++++++++++ 7 files changed, 91 insertions(+), 22 deletions(-) diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp index 9ee95eb..3099500 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/paper/paper_list2.jsp @@ -31,6 +31,16 @@ +
@@ -43,8 +53,8 @@
- - +
@@ -94,11 +104,15 @@ ${var.TEST_NUM} ${var.SCORE} - disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩 + + disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep.do?paper_id=${var.PAPER_ID}">查看成绩 + disabled style="pointer-events:none;color:#ccc" href="<%=basePath%>paper/paperRep3.do?MB1=${pd.MB1 }&PAPER_ID=${var.PAPER_ID}">年级分析 - + + + diff --git a/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp b/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp index 70eaff7..9ec674d 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/paper/test_list1.jsp @@ -78,7 +78,7 @@
及格率
低分人数
低分率
-
操作
+ @@ -100,7 +100,7 @@ ${myelfun:findClassName(var.class_id)} - 年级平均 + 班级平均 @@ -172,7 +172,7 @@ value="${var.student_num == 0 ? 0: (var.difen / var.student_num * 100)}" maxFractionDigits="2" />% - + <%-- 查看成绩 @@ -181,7 +181,7 @@ 查看成绩 - + --%> diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp index 1572914..90a8443 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/creat_question.jsp @@ -32,8 +32,8 @@

总分:0

- - + +
diff --git a/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp b/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp index 48348c2..6e2914f 100644 --- a/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp +++ b/WebRoot/WEB-INF/jsp/sunvote/teacher/teacher_report_1.jsp @@ -26,7 +26,16 @@ + .date-picker{ + height:30px; + line-height:30px; + } + .search_btn{ + width:30px; + display:inline-block; + vertical-align:bottom; + } + @@ -62,13 +71,17 @@ class="span10 date-picker" name="lastEnd" id="lastEnd" value="${end_date}" type="text" data-date-format="yyyy-mm-dd" readonly="readonly" style="width:88px;" placeholder="结束日期" title="结束日期" /> - + + + + 导出 + diff --git a/WebRoot/static/js/control-604.js b/WebRoot/static/js/control-604.js index 154675c..f53f71e 100644 --- a/WebRoot/static/js/control-604.js +++ b/WebRoot/static/js/control-604.js @@ -240,7 +240,7 @@ $(function() { option = String.fromCharCode(0x41 + j); $( ".section-" + answer_index_b + " .question" - + questionNUm + ' ul').append( + + i + ' ul').append( '
  • ' + option + '
  • '); } } @@ -292,9 +292,12 @@ $(function() { $(".section").eq(i).find(".que_num").text(SectionToChinese(i+1)+'、'); var className = $(".section").attr("class").replace(/\d+/g,i); - console.log(className) $(".section").attr("class",className); } + var section = $(this).parent().parent(".section"); + var this_score = parseFloat(section.attr("data-score")); + total_score = total_score-this_score; + $("#score_all").text(total_score); }) $("#fast_submit").click(function() { // 点击确定,创建答案列表 @@ -345,8 +348,13 @@ $(function() { return; } // console.log(typeof(type_2)); - addQuestion(type_2, num_ans_2, index_s_2, index_e_2, fraction2); - $('.addQuestion').modal('hide'); + var qestion_num = $(".question").length+index_e_2; + if(qestion_num<=64){ + addQuestion(type_2, num_ans_2, index_s_2, index_e_2, fraction2); + $('.addQuestion').modal('hide'); + }else{ + alert("题目总不能超过64题,请检查后在提交"); + } }) $("#type").change(function() { if ($("#type").val() == 4) { diff --git a/resources/mybatis1/sunvote/CourseManagementMapper.xml b/resources/mybatis1/sunvote/CourseManagementMapper.xml index 5ca8d23..f00cf29 100644 --- a/resources/mybatis1/sunvote/CourseManagementMapper.xml +++ b/resources/mybatis1/sunvote/CourseManagementMapper.xml @@ -119,8 +119,8 @@ where 1 =1 and TEACHER_ID = #{TEACHER_ID} - and CLASS_ID= #{TEACHER_ID} - and SUBJECT_ID= #{TEACHER_ID} + and CLASS_ID= #{CLASS_ID} + limit 0,1 diff --git a/src/com/fh/controller/sunvote/paper/PaperController.java b/src/com/fh/controller/sunvote/paper/PaperController.java index 77ea0b9..67ab6cd 100644 --- a/src/com/fh/controller/sunvote/paper/PaperController.java +++ b/src/com/fh/controller/sunvote/paper/PaperController.java @@ -50,6 +50,7 @@ import com.fh.util.Jurisdiction; import com.fh.util.ObjectExcelView; import com.fh.util.ObjectExcelView2; import com.fh.util.PageData; +import com.hp.hpl.sparta.ParseException; /** * 说明:试卷 创建时间:2018-05-17 @@ -1188,6 +1189,17 @@ public class PaperController extends BaseController { String userID = getUserID(); pd.put("USER_ID", userID); pd.put("PAPER_TYPE", "1"); + String last_start = pd.getString("LASTSTART"); + String last_end = pd.getString("LASTEND"); + if(!last_start.isEmpty()&&!last_end.isEmpty()){ + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + Date begin = fmt.parse(last_start); //开始时间 + Date end = fmt.parse(last_end); //结束时间 + if(begin.compareTo(end)==1){ + pd.put("LASTSTART", last_end); + pd.put("LASTEND", last_start); + } + } page.setPd(pd); List varList = paperService.listAllBySidAndTid(pd); // 列出Paper列表 page.setLangIsChina(isChineseLanguageClient()); @@ -1251,6 +1263,17 @@ public class PaperController extends BaseController { pd.put("keywords", keywords.trim()); } pd.put("PAPER_TYPE", "1"); + String last_start = pd.getString("LASTSTART"); + String last_end = pd.getString("LASTEND"); + if(!last_start.isEmpty()&&!last_end.isEmpty()){ + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + Date begin = fmt.parse(last_start); //开始时间 + Date end = fmt.parse(last_end); //结束时间 + if(begin.compareTo(end)==1){ + pd.put("LASTSTART", last_end); + pd.put("LASTEND", last_start); + } + } page.setPd(pd); page.setLangIsChina(isChineseLanguageClient()); List varList = paperService.list(page); // 列出Paper列表 @@ -1329,6 +1352,17 @@ public class PaperController extends BaseController { } pd.put("PAPER_TYPE", "2"); pd.put("USER_ID", this.getUserID()); + String last_start = pd.getString("LASTSTART"); + String last_end = pd.getString("LASTEND"); + if(!last_start.isEmpty()&&!last_end.isEmpty()){ + DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); + Date begin = fmt.parse(last_start); //开始时间 + Date end = fmt.parse(last_end); //结束时间 + if(begin.compareTo(end)==1){ + pd.put("LASTSTART", last_end); + pd.put("LASTEND", last_start); + } + } page.setPd(pd); page.setLangIsChina(isChineseLanguageClient()); List varList = paperService.list(page); // 列出Paper列表 -- libgit2 0.21.4