91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 19.2MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-06-18
  • 語言: 其他
  • 標(biāo)簽: SSM??考試系統(tǒng)??

資源簡(jiǎn)介

SSm(Spring、SpringMVC和Mybatis)開發(fā)的在線考試系統(tǒng) 包括前后臺(tái),

資源截圖

代碼片段和文件信息

package?controller;

import?java.sql.Timestamp;
import?java.text.SimpleDateFormat;
import?java.util.Date;
import?java.util.Iterator;
import?java.util.List;
import?java.util.Map;
import?java.util.Set;

import?javax.servlet.http.HttpSession;

import?org.springframework.beans.BeanUtils;
import?org.springframework.beans.factory.annotation.Autowired;
import?org.springframework.stereotype.Controller;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.servlet.ModelAndView;

import?po.Exam;
import?po.Questions;
import?po.QuestionsCustom;
import?po.Student;
import?po.Studentresult;
import?po.StudentresultCustom;
import?po.Taoti;
import?service.QuestionsService;
import?service.ResultService;
import?service.StudentService;
import?service.TaotiService;

@Controller
public?class?ExamController?{
@Autowired
private?TaotiService?taotiService;

@Autowired
private?QuestionsService?questionsService;

@Autowired
private?StudentService?studentService;

@Autowired
private?ResultService?resultService;

@RequestMapping(“/toExam.action“)
public?String?toExam()?throws?Exception{
return?“/exam“;
}

@RequestMapping(“/toExamPage.action“)
public?ModelAndView?toExamPage(Integer?lessonid)?throws?Exception{
ModelAndView?modelAndView=new?ModelAndView();
List?list?=?taotiService.findListByLessonid(lessonid);
if?(list.size()>0)?{
Integer?length=list.size();
Integer?index=(int)?(Math.random()*(length-1));
Taoti?taoti=list.get(index);
List?list2?=?questionsService.findListByTaotiid(taoti.getId());
modelAndView.addobject(“l(fā)ist“?list2);
}else?{
modelAndView.addobject(“l(fā)ist“?null);
}
modelAndView.setViewName(“/examPage“);
return?modelAndView;
}

@RequestMapping(“/postExam.action“)
public?ModelAndView?postExam(Exam?examHttpSession?session)?throws?Exception{
ModelAndView?modelAndView=new?ModelAndView();

Studentresult?studentresult=new?Studentresult();

Map?map?=?exam.getAnswerMap();
Set?keySet=map.keySet();
Iterator?it=keySet.iterator();
Integer?singleGrade=0;
Integer?doubleGrade=0;
Integer?taotiId=null;
while(it.hasNext())?{
Integer?key=it.next();
String?value=map.get(key);

Questions?questions?=?questionsService.findById(key);
if(taotiId?==?null)?{
taotiId=questions.getTaotiid();
}
if(questions.getType().equals(“單選“))?{
if(questions.getAnswer().equals(value))?{
singleGrade+=10;
}
}else?{
if(questions.getAnswer().equals(value))?{
doubleGrade+=20;
}
}
}
Integer?totalGrade=singleGrade+doubleGrade;

Taoti?taoti?=?taotiService.fintOneById(taotiId);

String?examnumber=“CN“;
SimpleDateFormat?simpleDateFormat=new?SimpleDateFormat(“yyyyMMdd“);
Date?date=new?Date();
String?strD?=?simpleDateFormat.format(date);
object?studentName?=?session.getAttribute(“studentName“);
String?studentId=null;
if(studentName!=null)?{
String?studentName2

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-09-20?14:09??OnlineExamSystem\
?????文件?????????816??2017-09-20?14:10??OnlineExamSystem\.classpath
?????文件???????????8??2017-08-06?13:16??OnlineExamSystem\.gitignore
?????文件?????????885??2017-08-06?13:16??OnlineExamSystem\.project
?????目錄???????????0??2017-09-20?14:09??OnlineExamSystem\.settings\
?????文件?????????555??2017-08-06?13:16??OnlineExamSystem\.settings\.jsdtscope
?????文件?????????357??2017-08-06?13:16??OnlineExamSystem\.settings\org.eclipse.jdt.core.prefs
?????文件?????????568??2017-08-06?13:16??OnlineExamSystem\.settings\org.eclipse.wst.common.component
?????文件?????????335??2017-08-06?13:16??OnlineExamSystem\.settings\org.eclipse.wst.common.project.facet.core.xml
?????文件??????????49??2017-08-06?13:16??OnlineExamSystem\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2017-08-06?13:16??OnlineExamSystem\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2017-09-20?14:09??OnlineExamSystem\build\
?????目錄???????????0??2017-09-20?14:15??OnlineExamSystem\build\classes\
?????目錄???????????0??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\
?????文件????????6185??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\ExamController.class
?????文件????????3787??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\LessonController.class
?????文件????????4103??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\ManagerController.class
?????文件????????3351??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\QuestionsController.class
?????文件????????8132??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\ResultController.class
?????文件????????5477??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\StudentController.class
?????文件????????4108??2017-09-20?14:12??OnlineExamSystem\build\classes\controller\TaoTiController.class
?????文件?????????157??2017-09-20?14:15??OnlineExamSystem\build\classes\db.properties
?????目錄???????????0??2017-09-20?14:12??OnlineExamSystem\build\classes\exception\
?????文件?????????634??2017-09-20?14:12??OnlineExamSystem\build\classes\exception\CustomException.class
?????文件????????1478??2017-09-20?14:12??OnlineExamSystem\build\classes\exception\CustomExceptionResolver.class
?????目錄???????????0??2017-09-20?14:12??OnlineExamSystem\build\classes\interceptor\
?????文件????????2343??2017-09-20?14:12??OnlineExamSystem\build\classes\interceptor\CheckIsLogin.class
?????文件????????2323??2017-09-20?14:12??OnlineExamSystem\build\classes\interceptor\CheckManagerIsLogin.class
?????文件?????????344??2017-08-06?13:16??OnlineExamSystem\build\classes\log4j.properties
?????目錄???????????0??2017-09-20?14:12??OnlineExamSystem\build\classes\mapper\
?????文件?????????827??2017-09-20?14:12??OnlineExamSystem\build\classes\mapper\LessonMapper.class
............此處省略1141個(gè)文件信息

評(píng)論

共有 條評(píng)論