Commit 0a0c0f6ad29e5a607a2178a6a68f941f35356310

Authored by jack
1 parent c33910d6

1.bug修复

WebRoot/WEB-INF/jsp/sunvote/paper/test_list2.jsp
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 <th><div style="width:80px">答案</div></th> 82 <th><div style="width:80px">答案</div></th>
83 <th><div style="width:80px">答题人数</div></th> 83 <th><div style="width:80px">答题人数</div></th>
84 <th><div style="width:80px">正确人数</div></th> 84 <th><div style="width:80px">正确人数</div></th>
85 - <th><div style="width:80px" title="正确率=正确人数/答题人数">正确率<img src="../static/images/tip.png" style="width:16px"></div></th> 85 + <th><div style="width:80px" title="正确率=正确人数/答题人数*100">正确率<img src="../static/images/tip.png" style="width:16px"></div></th>
86 <th><div style="width:80px">满分值</div></th> 86 <th><div style="width:80px">满分值</div></th>
87 <th><div style="width:80px" title="平均分=正确人数/答题人数*题目分数">平均分<img src="../static/images/tip.png" style="width:16px"></div></th> 87 <th><div style="width:80px" title="平均分=正确人数/答题人数*题目分数">平均分<img src="../static/images/tip.png" style="width:16px"></div></th>
88 <c:forEach begin="0" end="${pd.MAX-1}" var="var" varStatus="vs"> 88 <c:forEach begin="0" end="${pd.MAX-1}" var="var" varStatus="vs">
@@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
90 <th><div style="width:80px" title="选${myelfun:jstlInt2Char(var+1)}比例=选${myelfun:jstlInt2Char(var+1)}人数/答题人数*100">选${myelfun:jstlInt2Char(var+1)}比例<img src="../static/images/tip.png" style="width:16px"></div></th> 90 <th><div style="width:80px" title="选${myelfun:jstlInt2Char(var+1)}比例=选${myelfun:jstlInt2Char(var+1)}人数/答题人数*100">选${myelfun:jstlInt2Char(var+1)}比例<img src="../static/images/tip.png" style="width:16px"></div></th>
91 </c:forEach> 91 </c:forEach>
92 <th><div style="width:80px">漏选人数</div></th> 92 <th><div style="width:80px">漏选人数</div></th>
93 - <th><div style="width:80px">漏选比例</div></th> 93 + <th><div style="width:80px" title="漏选比例=漏选人数/班级总人数*100">漏选比例<img src="../static/images/tip.png" style="width:16px"></div></th>
94 94
95 </tr> 95 </tr>
96 </thead> 96 </thead>
@@ -99,13 +99,13 @@ @@ -99,13 +99,13 @@
99 <c:when test="${not empty varList}"> 99 <c:when test="${not empty varList}">
100 <c:forEach items="${varList}" var="var" varStatus="vs"> 100 <c:forEach items="${varList}" var="var" varStatus="vs">
101 101
102 - <c:set var="right" value="${var.ANSWERNUM2 == 0 ? 0: (var.RIGHTNUM / var.ANSWERNUM2 * 100)}"></c:set> 102 + <c:set var="right" value="${var.ANSWERNUM == 0 ? 0: (var.RIGHTNUM / var.ANSWERNUM * 100)}"></c:set>
103 103
104 <tr> 104 <tr>
105 105
106 <td>${var.QUESTION_RANK}</td> 106 <td>${var.QUESTION_RANK}</td>
107 <td>${var.ANSWER}</td> 107 <td>${var.ANSWER}</td>
108 - <td >${var.ANSWERNUM2}</td> 108 + <td >${var.ANSWERNUM}</td>
109 <td >${var.RIGHTNUM}</td> 109 <td >${var.RIGHTNUM}</td>
110 <td > 110 <td >
111 <c:if test="${right<=50}"> 111 <c:if test="${right<=50}">
@@ -124,7 +124,7 @@ @@ -124,7 +124,7 @@
124 <td >${var.QUESTION_SCORE}</td> 124 <td >${var.QUESTION_SCORE}</td>
125 <td > 125 <td >
126 <fmt:formatNumber type="number" 126 <fmt:formatNumber type="number"
127 - value="${var.ANSWERNUM2 == 0 ? 0: (var.RIGHTNUM / var.ANSWERNUM2)*var.QUESTION_SCORE}" 127 + value="${var.ANSWERNUM == 0 ? 0: (var.RIGHTNUM / var.ANSWERNUM)*var.QUESTION_SCORE}"
128 maxFractionDigits="2" /> 128 maxFractionDigits="2" />
129 </td> 129 </td>
130 <c:set var="lth" value="${fn:length(var.optin_info)-1}"></c:set> 130 <c:set var="lth" value="${fn:length(var.optin_info)-1}"></c:set>
@@ -134,7 +134,7 @@ @@ -134,7 +134,7 @@
134 <td>${optin_info[vs.index]}</td> 134 <td>${optin_info[vs.index]}</td>
135 <td> 135 <td>
136 <fmt:formatNumber type="number" 136 <fmt:formatNumber type="number"
137 - value="${var.ANSWERNUM2 == 0 ? 0: (optin_info[vs.index] / var.ANSWERNUM2 * 100)}" 137 + value="${var.ANSWERNUM == 0 ? 0: (optin_info[vs.index] / var.ANSWERNUM * 100)}"
138 maxFractionDigits="2" />% 138 maxFractionDigits="2" />%
139 </td> 139 </td>
140 </c:if> 140 </c:if>
src/com/fh/controller/sunvote/paper/PaperController.java
@@ -442,10 +442,13 @@ public class PaperController extends BaseController { @@ -442,10 +442,13 @@ public class PaperController extends BaseController {
442 temp.put("TEST_ID", tpListArray); 442 temp.put("TEST_ID", tpListArray);
443 443
444 List<PageData> queInfo = testpaperinfoService.listTestPaperQuestionIDinfo(temp); 444 List<PageData> queInfo = testpaperinfoService.listTestPaperQuestionIDinfo(temp);
445 - List<PageData> answer_num = testpaperService.listAll(pd);  
446 int answer[] = new int[option_num+1]; 445 int answer[] = new int[option_num+1];
447 int right = 0; 446 int right = 0;
  447 + int lost = 0;
448 for(int j=0;j<queInfo.size();j++){ 448 for(int j=0;j<queInfo.size();j++){
  449 + if(queInfo.get(j).get("ANSWER").toString().isEmpty()){
  450 + lost++;
  451 + }
449 if(queInfo.get(j).get("RIGHT")!=null&&!queInfo.get(j).get("RIGHT").toString().isEmpty()){ 452 if(queInfo.get(j).get("RIGHT")!=null&&!queInfo.get(j).get("RIGHT").toString().isEmpty()){
450 if(queInfo.get(j).get("RIGHT").toString().equals("1")){ 453 if(queInfo.get(j).get("RIGHT").toString().equals("1")){
451 right++; 454 right++;
@@ -464,8 +467,8 @@ public class PaperController extends BaseController { @@ -464,8 +467,8 @@ public class PaperController extends BaseController {
464 } 467 }
465 } 468 }
466 temp.put("RIGHTNUM", right); 469 temp.put("RIGHTNUM", right);
467 - temp.put("ANSWERNUM",queInfo.size());  
468 - temp.put("ANSWERNUM2",answer_num.size()); 470 + temp.put("ANSWERNUM",(queInfo.size()-lost));
  471 + temp.put("ANSWERNUM2",queInfo.size());
469 temp.put("optin_info", answer); 472 temp.put("optin_info", answer);
470 templist.add(temp); 473 templist.add(temp);
471 } 474 }
@@ -533,7 +536,11 @@ public class PaperController extends BaseController { @@ -533,7 +536,11 @@ public class PaperController extends BaseController {
533 List<PageData> queInfo = testpaperinfoService.listTestPaperQuestionIDinfo(temp); 536 List<PageData> queInfo = testpaperinfoService.listTestPaperQuestionIDinfo(temp);
534 int answer[] = new int[option_num+1]; 537 int answer[] = new int[option_num+1];
535 int right = 0; 538 int right = 0;
  539 + int lost = 0;
536 for(int j=0;j<queInfo.size();j++){ 540 for(int j=0;j<queInfo.size();j++){
  541 + if(queInfo.get(j).get("ANSWER").toString().isEmpty()){
  542 + lost++;
  543 + }
537 if(queInfo.get(j).get("RIGHT")!=null&&!queInfo.get(j).get("RIGHT").toString().isEmpty()){ 544 if(queInfo.get(j).get("RIGHT")!=null&&!queInfo.get(j).get("RIGHT").toString().isEmpty()){
538 if(queInfo.get(j).get("RIGHT").toString().equals("1")){ 545 if(queInfo.get(j).get("RIGHT").toString().equals("1")){
539 right++; 546 right++;
@@ -552,7 +559,8 @@ public class PaperController extends BaseController { @@ -552,7 +559,8 @@ public class PaperController extends BaseController {
552 } 559 }
553 } 560 }
554 temp.put("RIGHTNUM", right); 561 temp.put("RIGHTNUM", right);
555 - temp.put("ANSWERNUM",queInfo.size()); 562 + temp.put("ANSWERNUM",(queInfo.size()-lost));
  563 + temp.put("ANSWERNUM2",queInfo.size());
556 temp.put("optin_info", JSONUtils.toJSONString(answer)); 564 temp.put("optin_info", JSONUtils.toJSONString(answer));
557 templist.add(temp); 565 templist.add(temp);
558 } 566 }
@@ -623,7 +631,7 @@ public class PaperController extends BaseController { @@ -623,7 +631,7 @@ public class PaperController extends BaseController {
623 } 631 }
624 632
625 vpd.put("var"+(max*2+8), Integer.valueOf(optoin.get(optoin.size()-1))); //8 633 vpd.put("var"+(max*2+8), Integer.valueOf(optoin.get(optoin.size()-1))); //8
626 - vpd.put("var"+(max*2+9), decimalFormat.format(Integer.valueOf(optoin.get(optoin.size()-1))*100/Integer.valueOf(varOList.get(i).getString("ANSWERNUM")))+"%"); //9 634 + vpd.put("var"+(max*2+9), decimalFormat.format(Integer.valueOf(optoin.get(optoin.size()-1))*100/Integer.valueOf(varOList.get(i).getString("ANSWERNUM2")))+"%"); //9
627 635
628 varList.add(vpd); 636 varList.add(vpd);
629 } 637 }