From 74b6b20f778f6be05fd80493bed7e27af6986f82 Mon Sep 17 00:00:00 2001 From: 陈杰 <504987307@qq.com> Date: Wed, 23 Oct 2019 09:46:25 +0800 Subject: [PATCH] 四维诊断 --- src/main/java/com/jevon/controller/LearnController.java | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- src/main/java/com/jevon/controller/LearnStatController.java | 168 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------- src/main/java/com/jevon/mapper/LeagueMapper.java | 2 ++ src/main/java/com/jevon/model/Analyse.java | 9 +++++++++ src/main/java/com/jevon/service/LeagueService.java | 2 ++ src/main/java/com/jevon/service/StudentDetailService.java | 2 ++ src/main/java/com/jevon/service/impl/LeagueServiceImpl.java | 8 ++++++++ src/main/java/com/jevon/service/impl/StudentDetailServiceImpl.java | 10 ++++++++++ src/main/java/com/jevon/vo/rep/GetLeague.java | 32 ++++++++++++++++++++++++++++++++ src/main/java/com/jevon/vo/rep/GetLeagueRepVo.java | 23 +++++++++++++++++++++++ src/main/java/com/jevon/vo/rep/SuggestRepVo.java | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/jevon/vo/req/CreateExamReqVo.java | 18 +++++++++++++++++- src/main/java/com/jevon/vo/req/GetLearnReqVo.java | 7 ++++++- src/main/java/com/jevon/vo/req/InitLeague.java | 7 ++++++- src/main/java/com/jevon/vo/req/UpdateExamReqVo.java | 5 +++++ src/main/java/com/jevon/vo/req/UpdateLeagueReqVo.java | 28 ++++++++++++++++++++++++++++ src/main/java/com/jevon/wordDTO/Form1.java | 7 +++++++ src/main/java/com/jevon/wordDTO/Form1RepVO.java | 6 ++++++ src/main/java/com/jevon/wordDTO/Form2.java | 11 +++++++++++ src/main/java/com/jevon/wordDTO/Form2RepVO.java | 5 ++++- src/main/java/com/jevon/wordDTO/Form3.java | 12 ++++++++++++ src/main/java/com/jevon/wordDTO/Form4.java | 9 +++++++++ src/main/java/com/jevon/wordDTO/Form4RepVO.java | 2 ++ src/main/java/com/jevon/wordDTO/Form5.java | 18 +++++++++++++++++- src/main/java/com/jevon/wordDTO/Form5RepVO.java | 2 ++ src/main/java/com/jevon/wordDTO/Form6.java | 16 ++++++++++++++++ src/main/java/com/jevon/wordDTO/Form6RepVo.java | 2 ++ src/main/java/com/jevon/wordDTO/Form7.java | 3 +++ src/main/java/com/jevon/wordDTO/Form8.java | 9 +++++++++ src/main/java/com/jevon/wordDTO/Form8RepVO.java | 2 ++ src/main/java/com/jevon/wordDTO/Table1.java | 7 ++++++- src/main/java/com/jevon/wordDTO/test.java | 9 --------- src/main/resources/mapping/AnalyseMapper.xml | 8 ++++++-- src/main/resources/mapping/LeagueMapper.xml | 4 ++++ src/main/resources/mapping/StudentDetailMapper.xml | 1 + 35 files changed, 604 insertions(+), 37 deletions(-) create mode 100644 src/main/java/com/jevon/vo/rep/GetLeague.java create mode 100644 src/main/java/com/jevon/vo/rep/GetLeagueRepVo.java create mode 100644 src/main/java/com/jevon/vo/rep/SuggestRepVo.java create mode 100644 src/main/java/com/jevon/vo/req/UpdateLeagueReqVo.java delete mode 100644 src/main/java/com/jevon/wordDTO/test.java diff --git a/src/main/java/com/jevon/controller/LearnController.java b/src/main/java/com/jevon/controller/LearnController.java index b0b85a5..ae35fe1 100644 --- a/src/main/java/com/jevon/controller/LearnController.java +++ b/src/main/java/com/jevon/controller/LearnController.java @@ -7,6 +7,8 @@ import com.jevon.service.*; import com.jevon.vo.BaseVo; import com.jevon.vo.excel.ExamExcelVo; import com.jevon.vo.excel.ScoreExcelVo; +import com.jevon.vo.rep.GetLeague; +import com.jevon.vo.rep.GetLeagueRepVo; import com.jevon.vo.req.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -15,6 +17,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -55,6 +58,11 @@ public class LearnController { @Autowired LeagueService leagueService; + @Value("${remoting.url}") + private String url ; + @Value("${remoting.prefixFile}") + private String staticUrl ; + @ApiOperation("获取列表") @RequestMapping(value = "getList", method = RequestMethod.POST) public List getList(){ @@ -71,6 +79,7 @@ public class LearnController { analyse.setExamName(createExamReqVo.getExamName()); analyse.setExamTime(createExamReqVo.getExamTime()); analyse.setCreateTime(new Date()); + analyse.setGrade(createExamReqVo.getGrade()); analyseService.insert(analyse); baseVo.setMessage(analyse.getId()+""); return baseVo; @@ -89,6 +98,8 @@ public class LearnController { analyse.setExamTime(updateExamReqVo.getExamTime()); analyse.setExamName(updateExamReqVo.getExamName()); analyse.setCourseName(updateExamReqVo.getCourseName()); + analyse.setGrade(updateExamReqVo.getGrade()); + analyseService.update(analyse); return baseVo; } @@ -107,6 +118,7 @@ public class LearnController { Float maxScore = 0f; Analyse analyse = analyseService.selectById(initAnalyseReqVo.getAnalyseId()); String fileUrl = initAnalyseReqVo.getUrl(); + fileUrl = fileUrl.replace(url, staticUrl); File excelFile = new File(fileUrl); // 获得工作簿 String file = excelFile.getName(); @@ -207,6 +219,7 @@ public class LearnController { scoreMap.put(analyseDetail.getQuestionNumber(),analyseDetail.getScore()); } String fileUrl = initAnalyseReqVo.getUrl(); + fileUrl = fileUrl.replace(url, staticUrl); File excelFile = new File(fileUrl); // 获得工作簿 String file = excelFile.getName(); @@ -236,7 +249,7 @@ public class LearnController { while (sheetRow.getCell(j) != null){ Cell cell = sheetRow.getCell(j); cell.setCellType(CellType.STRING); - map.put(j,cell.getStringCellValue().trim()); + map.put(j,cell.getStringCellValue().trim().replace("(","(").replace(")",")")); j++; } column = j ; @@ -304,4 +317,41 @@ public class LearnController { leagueService.insertBatch(leagues); return baseVo; } + + @ApiOperation("获取该次考试联盟学校信息") + @RequestMapping(value = "getLeague", method = RequestMethod.GET) + public GetLeagueRepVo getLeague(int analyseId){ + GetLeagueRepVo getLeagueRepVo = new GetLeagueRepVo(); + List leagues = leagueService.selectByAnalyseId(analyseId); + List getLeagues = new ArrayList<>(); + for(League league : leagues){ + boolean isExist = false ; + for(GetLeague getLeague : getLeagues){ + if(getLeague.getLeagueName().equals(league.getLeague())){ + isExist = true ; + List list = getLeague.getLeagues(); + list.add(league); + getLeague.setLeagues(list); + } + } + if(!isExist){ + GetLeague getLeague = new GetLeague(); + getLeague.setLeagueName(league.getLeague()); + List list = new ArrayList<>(); + list.add(league); + getLeague.setLeagues(list); + getLeagues.add(getLeague); + } + } + getLeagueRepVo.setData(getLeagues); + return getLeagueRepVo; + } + + @ApiOperation("更新联盟校信息") + @RequestMapping(value = "updateLeague", method = RequestMethod.POST) + public BaseVo updateLeague(@RequestBody UpdateLeagueReqVo updateLeagueReqVo){ + BaseVo baseVo = new BaseVo(); + leagueService.update(updateLeagueReqVo.getId(),updateLeagueReqVo.getLeague()); + return baseVo; + } } diff --git a/src/main/java/com/jevon/controller/LearnStatController.java b/src/main/java/com/jevon/controller/LearnStatController.java index 3beedbd..5cac0a7 100644 --- a/src/main/java/com/jevon/controller/LearnStatController.java +++ b/src/main/java/com/jevon/controller/LearnStatController.java @@ -4,16 +4,19 @@ import com.jevon.enums.DifficultEnums; import com.jevon.enums.DimensionalEnums; import com.jevon.model.*; import com.jevon.service.*; +import com.jevon.vo.rep.SuggestRepVo; import com.jevon.vo.req.GetLearnReqVo; import com.jevon.wordDTO.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.models.auth.In; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; +import java.text.DecimalFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -49,25 +52,25 @@ public class LearnStatController { @Autowired LeagueService leagueService; - @ApiOperation("getForm1_1") - @RequestMapping(value = "getForm1_1", method = RequestMethod.POST) - public List getForm1_1(@RequestBody GetLearnReqVo getLearnReqVo){ - Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); - List list = new ArrayList<>(); - Form7 form7 = new Form7(); - form7.setName(DifficultEnums.easy.getDifficultName()); - form7.setPercent(analyseDetailService.selectDifficult(analyse.getId(),DifficultEnums.easy.getDifficultType())/analyse.getMaxScore()*100); - list.add(form7); - Form7 form = new Form7(); - form.setName(DifficultEnums.medium.getDifficultName()); - form.setPercent(analyseDetailService.selectDifficult(analyse.getId(),DifficultEnums.medium.getDifficultType())/analyse.getMaxScore()*100); - list.add(form); - Form7 form2 = new Form7(); - form2.setName(DifficultEnums.difficult.getDifficultName()); - form2.setPercent(analyseDetailService.selectDifficult(analyse.getId(),DifficultEnums.difficult.getDifficultType())/analyse.getMaxScore()*100); - list.add(form2); - return list; - } +// @ApiOperation("getForm1_1") +// @RequestMapping(value = "getForm1_1", method = RequestMethod.POST) +// public List getForm1_1(@RequestBody GetLearnReqVo getLearnReqVo){ +// Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); +// List list = new ArrayList<>(); +// Form7 form7 = new Form7(); +// form7.setName(DifficultEnums.easy.getDifficultName()); +// form7.setPercent(analyseDetailService.selectDifficult(analyse.getId(),DifficultEnums.easy.getDifficultType())/analyse.getMaxScore()*100); +// list.add(form7); +// Form7 form = new Form7(); +// form.setName(DifficultEnums.medium.getDifficultName()); +// form.setPercent(analyseDetailService.selectDifficult(analyse.getId(),DifficultEnums.medium.getDifficultType())/analyse.getMaxScore()*100); +// list.add(form); +// Form7 form2 = new Form7(); +// form2.setName(DifficultEnums.difficult.getDifficultName()); +// form2.setPercent(analyseDetailService.selectDifficult(analyse.getId(),DifficultEnums.difficult.getDifficultType())/analyse.getMaxScore()*100); +// list.add(form2); +// return list; +// } @ApiOperation("getForm2_1_1") @RequestMapping(value = "getForm2_1_1", method = RequestMethod.POST) @@ -635,4 +638,131 @@ public class LearnStatController { return repVO; } + private Form6RepVo initSchoolDimensional(GetLearnReqVo getLearnReqVo , int dimensionalType){ + Form6RepVo repVO = new Form6RepVo(); + Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); + if(analyse == null){ + repVO.setSuccess(false); + repVO.setMessage("请先创建考试"); + return repVO; + } + List highStudent = new ArrayList<>(); + List lowStudent = new ArrayList<>(); + List students = studentService.selectBySchoolName(analyse.getId(),null,getLearnReqVo.getSchoolName()); + int number = (int) Math.floor(students.size()*0.27) ; + { + //获取本校高分段 低分段 学生编号 + for (int i = 0; i < number ; i++) { + highStudent.add(students.get(i).getStudentNumber()); + } + for(int i =students.size()-number ; i < students.size() ; i++){ + lowStudent.add(students.get(i).getStudentNumber()); + } + } + List list = new ArrayList<>(); + List knowledgeList = dimensionalService.selectByAnalyse(analyse.getId(),dimensionalType); + for(Dimensional dimensional : knowledgeList){ + Form6 form6 = new Form6(); + form6.setDimensional(dimensional.getDimensionalName()); + List analyseDimensionals = analyseDimensionalService.selectByDimensional(analyse.getId(),dimensional.getId()); + Double score = 0d; + StringBuffer examNumber = new StringBuffer(); + List examNumberList = new ArrayList<>(); + for(AnalyseDimensional analyseDimensional :analyseDimensionals){ + score = score + analyseDimensional.getScore() ; + examNumber.append(analyseDimensional.getQuestionNumber()).append(","); + examNumberList.add(analyseDimensional.getQuestionNumber()); + } + Double schoolSumScore = studentDetailService.selectSumScore(analyse.getId(),null,getLearnReqVo.getSchoolName(),examNumberList); + int high = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,getLearnReqVo.getSchoolName() ,examNumberList,highStudent); + int low = studentDetailService.selectTrueByExamNumber(analyse.getId(),null,getLearnReqVo.getSchoolName() ,examNumberList,lowStudent); + form6.setScore(score); + form6.setSchoolRate(schoolSumScore / new Double(students.size()) / score); + form6.setSchoolAvg(schoolSumScore / new Double(students.size())); + form6.setSchoolDist(new Double(high-low) / new Double(number * analyseDimensionals.size())); + form6.setExamNumber(examNumber.toString().substring(0,examNumber.toString().length()-1)); + list.add(form6); + } + repVO.setData(list); + return repVO; + } + + @ApiOperation("获取教学改进建议") + @RequestMapping(value = "getSuggest", method = RequestMethod.POST) + public SuggestRepVo getSuggest(@RequestBody GetLearnReqVo getLearnReqVo){ + SuggestRepVo suggestRepVo = new SuggestRepVo() ; + Analyse analyse = analyseService.selectById(getLearnReqVo.getAnalyseId()); + Double avg = studentService.selectAvgScore(analyse.getId(),null,getLearnReqVo.getSchoolName()) ; + DecimalFormat df = new DecimalFormat("#.00"); + //得分率 + String avgStr = df.format(avg / analyse.getMaxScore()); + + List students = studentService.selectBySchoolName(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName()); + int a = studentService.selectCountByScore(getLearnReqVo.getAnalyseId(),null,getLearnReqVo.getSchoolName(),analyse.getMaxScore()*0.85,analyse.getMaxScore()+1f); + //优秀率 + String aStr = df.format(new Double(a) / new Double(students.size()) * 100); + suggestRepVo.setDifficultyDegree(avgStr); + suggestRepVo.setExcellentRate(aStr); + suggestRepVo.setErrorList(getErrorRate(getLearnReqVo.getAnalyseId(),getLearnReqVo.getSchoolName(),students.size())); + Form6RepVo knowledge = initSchoolDimensional(getLearnReqVo,DimensionalEnums.knowledge.getDimensionalType()); + List lessKnowledgeList = new ArrayList<>(); //不足50% + List midKnowledgeList = new ArrayList<>(); //50-70% + for(Form6 form6 :knowledge.getData()){ + if(form6.getSchoolRate() < 0.5d){ + lessKnowledgeList.add(form6.getDimensional()); + }else if(form6.getSchoolRate() < 0.7d){ + midKnowledgeList.add(form6.getDimensional()); + } + } + suggestRepVo.setLessKnowledgeList(lessKnowledgeList); + suggestRepVo.setMidKnowledgeList(midKnowledgeList); + Form6RepVo ability = initSchoolDimensional(getLearnReqVo,DimensionalEnums.ability.getDimensionalType()); + List lessAbilityList = new ArrayList<>(); //不足70% + List midAbilityList = new ArrayList<>(); //70-80% + List highAbilityList = new ArrayList<>(); //大于80% + for(Form6 form6 :ability.getData()){ + if(form6.getSchoolRate() < 0.7d){ + lessAbilityList.add(form6.getDimensional()); + }else if(form6.getSchoolRate() < 0.8d){ + midAbilityList.add(form6.getDimensional()); + }else if(form6.getSchoolRate() >= 0.8d){ + highAbilityList.add(form6.getDimensional()); + } + } + suggestRepVo.setLessAbilityList(lessAbilityList); + suggestRepVo.setMidAbilityList(midAbilityList); + suggestRepVo.setHighAbilityList(highAbilityList); + Form6RepVo skill = initSchoolDimensional(getLearnReqVo,DimensionalEnums.skill.getDimensionalType()); + List lessSkillList = new ArrayList<>(); //不足70% + List midSkillList = new ArrayList<>(); //70-80% + List highSkillList = new ArrayList<>(); //大于80% + for(Form6 form6 :skill.getData()){ + if(form6.getSchoolRate() < 0.7d){ + lessSkillList.add(form6.getDimensional()); + }else if(form6.getSchoolRate() < 0.8d){ + midSkillList.add(form6.getDimensional()); + }else if(form6.getSchoolRate() >= 0.8d){ + highSkillList.add(form6.getDimensional()); + } + } + suggestRepVo.setLessSkillList(lessSkillList); + suggestRepVo.setMidSkillList(midSkillList); + suggestRepVo.setHighSkillList(highSkillList); + return suggestRepVo; + } + + public List getErrorRate(int analyseId , String schoolName , int studentSize){ + List errorList = new ArrayList<>(); + List analyseDetails = analyseDetailService.selectByAnalyseId(analyseId); + double errorNumber = Math.ceil(studentSize * 0.15) ; + for(AnalyseDetail analyseDetail :analyseDetails){ + if("选择题".equals(analyseDetail.getQuestionType())){ + int number = studentDetailService.selectTrueByExamNumber(analyseId,schoolName,analyseDetail.getQuestionNumber()); + if(errorNumber < (studentSize-number)){ + errorList.add(analyseDetail.getQuestionNumber()); + } + } + } + return errorList; + } } diff --git a/src/main/java/com/jevon/mapper/LeagueMapper.java b/src/main/java/com/jevon/mapper/LeagueMapper.java index 2170e53..80bba20 100644 --- a/src/main/java/com/jevon/mapper/LeagueMapper.java +++ b/src/main/java/com/jevon/mapper/LeagueMapper.java @@ -13,5 +13,7 @@ public interface LeagueMapper { int insertBatch(List list); + int update(League league); + List selectByLeague(League league); } diff --git a/src/main/java/com/jevon/model/Analyse.java b/src/main/java/com/jevon/model/Analyse.java index da41d3b..d36c4f1 100644 --- a/src/main/java/com/jevon/model/Analyse.java +++ b/src/main/java/com/jevon/model/Analyse.java @@ -15,6 +15,7 @@ public class Analyse { private String courseName ; private Date createTime ; private Double maxScore ; + private String grade ; public int getId() { return id; @@ -63,4 +64,12 @@ public class Analyse { public void setMaxScore(Double maxScore) { this.maxScore = maxScore; } + + public String getGrade() { + return grade; + } + + public void setGrade(String grade) { + this.grade = grade; + } } diff --git a/src/main/java/com/jevon/service/LeagueService.java b/src/main/java/com/jevon/service/LeagueService.java index 3baf166..06c17ab 100644 --- a/src/main/java/com/jevon/service/LeagueService.java +++ b/src/main/java/com/jevon/service/LeagueService.java @@ -13,6 +13,8 @@ public interface LeagueService { int insertBatch(List list); + int update(int id , String league); + List selectByAnalyseId(int analyseId); List getLeagueBySchoolName(int analyseId , String schoolName); diff --git a/src/main/java/com/jevon/service/StudentDetailService.java b/src/main/java/com/jevon/service/StudentDetailService.java index f8740a1..0da0957 100644 --- a/src/main/java/com/jevon/service/StudentDetailService.java +++ b/src/main/java/com/jevon/service/StudentDetailService.java @@ -17,6 +17,8 @@ public interface StudentDetailService { Double selectSumScore(int analyseId, List league , String schoolName, List examNumbers); + int selectTrueByExamNumber(int analyseId , String schoolName , String examNumber); + int selectTrueByExamNumber(int analyseId , List league , String schoolName , String examNumber , List studentNumbers); int selectTrueByExamNumber(int analyseId , List league , String schoolName , List examNumbers , List studentNumbers); diff --git a/src/main/java/com/jevon/service/impl/LeagueServiceImpl.java b/src/main/java/com/jevon/service/impl/LeagueServiceImpl.java index bd588b7..7b038ec 100644 --- a/src/main/java/com/jevon/service/impl/LeagueServiceImpl.java +++ b/src/main/java/com/jevon/service/impl/LeagueServiceImpl.java @@ -26,6 +26,14 @@ public class LeagueServiceImpl implements LeagueService { } @Override + public int update(int id, String league) { + League update = new League(); + update.setId(id); + update.setLeague(league); + return leagueMapper.update(update); + } + + @Override public List selectByAnalyseId(int analyseId) { League league = new League(); league.setAnalyseId(analyseId); diff --git a/src/main/java/com/jevon/service/impl/StudentDetailServiceImpl.java b/src/main/java/com/jevon/service/impl/StudentDetailServiceImpl.java index 1529e3b..e839103 100644 --- a/src/main/java/com/jevon/service/impl/StudentDetailServiceImpl.java +++ b/src/main/java/com/jevon/service/impl/StudentDetailServiceImpl.java @@ -46,6 +46,7 @@ public class StudentDetailServiceImpl implements StudentDetailService { return studentDetailMapper.selectSumScore(studentDetail); } + @Override public Double selectSumScore(int analyseId, List league, String schoolName, List examNumbers) { StudentDetail studentDetail = new StudentDetail(); @@ -57,6 +58,15 @@ public class StudentDetailServiceImpl implements StudentDetailService { } @Override + public int selectTrueByExamNumber(int analyseId, String schoolName, String examNumber) { + StudentDetail studentDetail = new StudentDetail(); + studentDetail.setAnalyseId(analyseId); + studentDetail.setSchoolName(schoolName); + studentDetail.setExamNumber(examNumber); + return studentDetailMapper.selectTrueByExamNumber(studentDetail); + } + + @Override public int selectTrueByExamNumber(int analyseId,List league , String schoolName, String examNumber, List studentNumbers) { StudentDetail studentDetail = new StudentDetail(); studentDetail.setAnalyseId(analyseId); diff --git a/src/main/java/com/jevon/vo/rep/GetLeague.java b/src/main/java/com/jevon/vo/rep/GetLeague.java new file mode 100644 index 0000000..5b5a459 --- /dev/null +++ b/src/main/java/com/jevon/vo/rep/GetLeague.java @@ -0,0 +1,32 @@ +package com.jevon.vo.rep; + +import com.jevon.model.League; + +import java.util.List; + +/** + * @author chen + * @version 1.0 + * @date 2019/10/22 0022 15:46 + */ +public class GetLeague { + + private String leagueName ; + private List leagues ; + + public String getLeagueName() { + return leagueName; + } + + public void setLeagueName(String leagueName) { + this.leagueName = leagueName; + } + + public List getLeagues() { + return leagues; + } + + public void setLeagues(List leagues) { + this.leagues = leagues; + } +} diff --git a/src/main/java/com/jevon/vo/rep/GetLeagueRepVo.java b/src/main/java/com/jevon/vo/rep/GetLeagueRepVo.java new file mode 100644 index 0000000..630f5f1 --- /dev/null +++ b/src/main/java/com/jevon/vo/rep/GetLeagueRepVo.java @@ -0,0 +1,23 @@ +package com.jevon.vo.rep; + +import com.jevon.vo.BaseVo; + +import java.util.List; + +/** + * @author chen + * @version 1.0 + * @date 2019/10/22 0022 15:48 + */ +public class GetLeagueRepVo extends BaseVo { + + private List data ; + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } +} diff --git a/src/main/java/com/jevon/vo/rep/SuggestRepVo.java b/src/main/java/com/jevon/vo/rep/SuggestRepVo.java new file mode 100644 index 0000000..db44729 --- /dev/null +++ b/src/main/java/com/jevon/vo/rep/SuggestRepVo.java @@ -0,0 +1,135 @@ +package com.jevon.vo.rep; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * @author chen + * @version 1.0 + * @date 2019/10/23 0023 9:04 + */ +@ApiModel +public class SuggestRepVo { + @ApiModelProperty(value = "总体情况") + private String assess ; + @ApiModelProperty(value = "难度系数") + private String difficultyDegree ; + @ApiModelProperty(value = "优秀率") + private String excellentRate ; + @ApiModelProperty(value = "知识点得分率不到50%的") + private List lessKnowledgeList ; + @ApiModelProperty(value = "知识点得分率不到70%") + private List midKnowledgeList ; + @ApiModelProperty(value = "学习能力得分率<69%") + private List lessAbilityList ; + @ApiModelProperty(value = "学习能力得分率在70%≤η<80%") + private List midAbilityList ; + @ApiModelProperty(value = "学习能力得分率≥80%") + private List highAbilityList ; + @ApiModelProperty(value = "探究技能方面得分率<69%") + private List lessSkillList ; + @ApiModelProperty(value = "探究技能方面得分率在70%≤η<80%") + private List midSkillList ; + @ApiModelProperty(value = "探究技能方面得分率≥80%") + private List highSkillList ; + @ApiModelProperty(value = "选择题错误率>15%") + private List errorList ; + + public List getErrorList() { + return errorList; + } + + public void setErrorList(List errorList) { + this.errorList = errorList; + } + + public String getAssess() { + return assess; + } + + public void setAssess(String assess) { + this.assess = assess; + } + + public String getDifficultyDegree() { + return difficultyDegree; + } + + public void setDifficultyDegree(String difficultyDegree) { + this.difficultyDegree = difficultyDegree; + } + + public String getExcellentRate() { + return excellentRate; + } + + public void setExcellentRate(String excellentRate) { + this.excellentRate = excellentRate; + } + + public List getLessKnowledgeList() { + return lessKnowledgeList; + } + + public void setLessKnowledgeList(List lessKnowledgeList) { + this.lessKnowledgeList = lessKnowledgeList; + } + + public List getMidKnowledgeList() { + return midKnowledgeList; + } + + public void setMidKnowledgeList(List midKnowledgeList) { + this.midKnowledgeList = midKnowledgeList; + } + + public List getLessAbilityList() { + return lessAbilityList; + } + + public void setLessAbilityList(List lessAbilityList) { + this.lessAbilityList = lessAbilityList; + } + + public List getMidAbilityList() { + return midAbilityList; + } + + public void setMidAbilityList(List midAbilityList) { + this.midAbilityList = midAbilityList; + } + + public List getHighAbilityList() { + return highAbilityList; + } + + public void setHighAbilityList(List highAbilityList) { + this.highAbilityList = highAbilityList; + } + + public List getLessSkillList() { + return lessSkillList; + } + + public void setLessSkillList(List lessSkillList) { + this.lessSkillList = lessSkillList; + } + + public List getMidSkillList() { + return midSkillList; + } + + public void setMidSkillList(List midSkillList) { + this.midSkillList = midSkillList; + } + + public List getHighSkillList() { + return highSkillList; + } + + public void setHighSkillList(List highSkillList) { + this.highSkillList = highSkillList; + } +} diff --git a/src/main/java/com/jevon/vo/req/CreateExamReqVo.java b/src/main/java/com/jevon/vo/req/CreateExamReqVo.java index 9a68da0..9bf5717 100644 --- a/src/main/java/com/jevon/vo/req/CreateExamReqVo.java +++ b/src/main/java/com/jevon/vo/req/CreateExamReqVo.java @@ -1,15 +1,23 @@ package com.jevon.vo.req; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/18 0018 14:48 */ +@ApiModel public class CreateExamReqVo { - + @ApiModelProperty(value="考试名称") private String examName ; + @ApiModelProperty(value="学科") private String courseName ; + @ApiModelProperty(value="考试时间") private String examTime ; + @ApiModelProperty(value="年级") + private String grade ; public String getExamName() { return examName; @@ -34,4 +42,12 @@ public class CreateExamReqVo { public void setExamTime(String examTime) { this.examTime = examTime; } + + public String getGrade() { + return grade; + } + + public void setGrade(String grade) { + this.grade = grade; + } } diff --git a/src/main/java/com/jevon/vo/req/GetLearnReqVo.java b/src/main/java/com/jevon/vo/req/GetLearnReqVo.java index 55855d4..c09090c 100644 --- a/src/main/java/com/jevon/vo/req/GetLearnReqVo.java +++ b/src/main/java/com/jevon/vo/req/GetLearnReqVo.java @@ -1,13 +1,18 @@ package com.jevon.vo.req; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/18 0018 14:57 */ +@ApiModel public class GetLearnReqVo { - + @ApiModelProperty(value="考试主键") private int analyseId ; + @ApiModelProperty(value="学校名称") private String schoolName ; public int getAnalyseId() { diff --git a/src/main/java/com/jevon/vo/req/InitLeague.java b/src/main/java/com/jevon/vo/req/InitLeague.java index 308cc50..610e36e 100644 --- a/src/main/java/com/jevon/vo/req/InitLeague.java +++ b/src/main/java/com/jevon/vo/req/InitLeague.java @@ -1,5 +1,8 @@ package com.jevon.vo.req; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + import java.util.List; /** @@ -7,9 +10,11 @@ import java.util.List; * @version 1.0 * @date 2019/10/22 0022 9:28 */ +@ApiModel public class InitLeague { - + @ApiModelProperty(value="联盟名称") private String league ; + @ApiModelProperty(value="联盟校集合") private List schoolNames ; public String getLeague() { diff --git a/src/main/java/com/jevon/vo/req/UpdateExamReqVo.java b/src/main/java/com/jevon/vo/req/UpdateExamReqVo.java index 1d47e57..5666ca4 100644 --- a/src/main/java/com/jevon/vo/req/UpdateExamReqVo.java +++ b/src/main/java/com/jevon/vo/req/UpdateExamReqVo.java @@ -1,12 +1,17 @@ package com.jevon.vo.req; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/18 0018 14:53 */ +@ApiModel public class UpdateExamReqVo extends CreateExamReqVo{ + @ApiModelProperty(value="主键") private int analyseId ; public int getAnalyseId() { diff --git a/src/main/java/com/jevon/vo/req/UpdateLeagueReqVo.java b/src/main/java/com/jevon/vo/req/UpdateLeagueReqVo.java new file mode 100644 index 0000000..8c37dc0 --- /dev/null +++ b/src/main/java/com/jevon/vo/req/UpdateLeagueReqVo.java @@ -0,0 +1,28 @@ +package com.jevon.vo.req; + +/** + * @author chen + * @version 1.0 + * @date 2019/10/22 0022 16:04 + */ +public class UpdateLeagueReqVo { + + private int id ; + private String league ; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getLeague() { + return league; + } + + public void setLeague(String league) { + this.league = league; + } +} diff --git a/src/main/java/com/jevon/wordDTO/Form1.java b/src/main/java/com/jevon/wordDTO/Form1.java index ed3eabd..17270ae 100644 --- a/src/main/java/com/jevon/wordDTO/Form1.java +++ b/src/main/java/com/jevon/wordDTO/Form1.java @@ -1,14 +1,21 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/18 0018 15:37 */ +@ApiModel public class Form1 { + @ApiModelProperty(value="等级") private String level ; + @ApiModelProperty(value="人数") private int number ; + @ApiModelProperty(value="比例") private double prop ; public String getLevel() { diff --git a/src/main/java/com/jevon/wordDTO/Form1RepVO.java b/src/main/java/com/jevon/wordDTO/Form1RepVO.java index 5e03aec..85cd571 100644 --- a/src/main/java/com/jevon/wordDTO/Form1RepVO.java +++ b/src/main/java/com/jevon/wordDTO/Form1RepVO.java @@ -1,5 +1,8 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + import java.util.List; import java.util.Map; @@ -8,9 +11,12 @@ import java.util.Map; * @version 1.0 * @date 2019/10/18 0018 15:46 */ +@ApiModel public class Form1RepVO { + @ApiModelProperty(value="分数段区间") private Map map ; + @ApiModelProperty(value="分数段详情") private List list ; public Map getMap() { diff --git a/src/main/java/com/jevon/wordDTO/Form2.java b/src/main/java/com/jevon/wordDTO/Form2.java index 3b2c76f..ba020e7 100644 --- a/src/main/java/com/jevon/wordDTO/Form2.java +++ b/src/main/java/com/jevon/wordDTO/Form2.java @@ -1,18 +1,29 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/18 0018 16:10 */ +@ApiModel public class Form2 { + @ApiModelProperty(value="名称") private String name ; + @ApiModelProperty(value="参考人数") private int studentNumber ; + @ApiModelProperty(value="参考人数占比") private double studentProp ; + @ApiModelProperty(value="高分段人数") private int highNumber ; + @ApiModelProperty(value="高分段人数占比") private double highProp ; + @ApiModelProperty(value="低分段人数") private int lowNumber ; + @ApiModelProperty(value="低分段人数占比") private double lowProp ; public String getName() { diff --git a/src/main/java/com/jevon/wordDTO/Form2RepVO.java b/src/main/java/com/jevon/wordDTO/Form2RepVO.java index b2f0555..43991f1 100644 --- a/src/main/java/com/jevon/wordDTO/Form2RepVO.java +++ b/src/main/java/com/jevon/wordDTO/Form2RepVO.java @@ -1,6 +1,8 @@ package com.jevon.wordDTO; import com.jevon.vo.BaseVo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.util.List; @@ -9,8 +11,9 @@ import java.util.List; * @version 1.0 * @date 2019/10/22 0022 9:51 */ +@ApiModel public class Form2RepVO extends BaseVo { - + @ApiModelProperty(value="数据") private List data ; public List getData() { diff --git a/src/main/java/com/jevon/wordDTO/Form3.java b/src/main/java/com/jevon/wordDTO/Form3.java index 8d8113b..54e8d78 100644 --- a/src/main/java/com/jevon/wordDTO/Form3.java +++ b/src/main/java/com/jevon/wordDTO/Form3.java @@ -1,19 +1,31 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 9:03 */ +@ApiModel public class Form3 { + @ApiModelProperty(value="名称") private String name ; + @ApiModelProperty(value="最高分") private Double maxScore ; + @ApiModelProperty(value="平均分") private Double average ; + @ApiModelProperty(value="最低分") private Double minScore ; + @ApiModelProperty(value="优秀率") private Double apercent ; + @ApiModelProperty(value="良好率") private Double bpercent ; + @ApiModelProperty(value="及格率") private Double cpercent ; + @ApiModelProperty(value="不及格率") private Double dpercent ; public String getName() { diff --git a/src/main/java/com/jevon/wordDTO/Form4.java b/src/main/java/com/jevon/wordDTO/Form4.java index 245e4ed..648e8f9 100644 --- a/src/main/java/com/jevon/wordDTO/Form4.java +++ b/src/main/java/com/jevon/wordDTO/Form4.java @@ -1,16 +1,25 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 9:51 */ +@ApiModel public class Form4 { + @ApiModelProperty(value="名称") private String name ; + @ApiModelProperty(value="众数") private Double modeNumber ; + @ApiModelProperty(value="中位数") private Double medianNumber ; + @ApiModelProperty(value="标准差") private Double stdev ; + @ApiModelProperty(value="平均分") private Double avgNumber ; public String getName() { diff --git a/src/main/java/com/jevon/wordDTO/Form4RepVO.java b/src/main/java/com/jevon/wordDTO/Form4RepVO.java index 9bb3f66..e518759 100644 --- a/src/main/java/com/jevon/wordDTO/Form4RepVO.java +++ b/src/main/java/com/jevon/wordDTO/Form4RepVO.java @@ -1,6 +1,7 @@ package com.jevon.wordDTO; import com.jevon.vo.BaseVo; +import io.swagger.annotations.ApiModel; import java.util.List; @@ -9,6 +10,7 @@ import java.util.List; * @version 1.0 * @date 2019/10/22 0022 10:23 */ +@ApiModel public class Form4RepVO extends BaseVo { private List data ; diff --git a/src/main/java/com/jevon/wordDTO/Form5.java b/src/main/java/com/jevon/wordDTO/Form5.java index 698aff5..7fec740 100644 --- a/src/main/java/com/jevon/wordDTO/Form5.java +++ b/src/main/java/com/jevon/wordDTO/Form5.java @@ -1,25 +1,41 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 9:59 */ +@ApiModel public class Form5 { - + @ApiModelProperty(value="题号") private String examNumber ; + @ApiModelProperty(value="难度") private String difficultName ; + @ApiModelProperty(value="分值") private Double score ; + @ApiModelProperty(value="得分率 区") private Double allRate ; + @ApiModelProperty(value="得分率 联盟校") private Double leagueRate ; + @ApiModelProperty(value="得分率 本校") private Double schoolRate ; + @ApiModelProperty(value="平均分 区") private Double allAvg ; + @ApiModelProperty(value="平均分 联盟校") private Double leagueAvg ; + @ApiModelProperty(value="平均分 本校") private Double schoolAvg ; + @ApiModelProperty(value="区分度 区") private Double allDist ; + @ApiModelProperty(value="区分度 联盟校") private Double leagueDist ; + @ApiModelProperty(value="区分度 本校") private Double schoolDist ; + public String getExamNumber() { return examNumber; } diff --git a/src/main/java/com/jevon/wordDTO/Form5RepVO.java b/src/main/java/com/jevon/wordDTO/Form5RepVO.java index 13841c4..558e289 100644 --- a/src/main/java/com/jevon/wordDTO/Form5RepVO.java +++ b/src/main/java/com/jevon/wordDTO/Form5RepVO.java @@ -1,6 +1,7 @@ package com.jevon.wordDTO; import com.jevon.vo.BaseVo; +import io.swagger.annotations.ApiModel; import java.util.List; @@ -9,6 +10,7 @@ import java.util.List; * @version 1.0 * @date 2019/10/22 0022 10:28 */ +@ApiModel public class Form5RepVO extends BaseVo { private List data ; diff --git a/src/main/java/com/jevon/wordDTO/Form6.java b/src/main/java/com/jevon/wordDTO/Form6.java index 14cce34..ce15030 100644 --- a/src/main/java/com/jevon/wordDTO/Form6.java +++ b/src/main/java/com/jevon/wordDTO/Form6.java @@ -1,23 +1,39 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 11:25 */ +@ApiModel public class Form6 { + @ApiModelProperty(value="维度名称") private String dimensional ; + @ApiModelProperty(value="分值") private Double score ; + @ApiModelProperty(value="得分率 区") private Double allRate ; + @ApiModelProperty(value="得分率 联盟校") private Double leagueRate ; + @ApiModelProperty(value="得分率 本校") private Double schoolRate ; + @ApiModelProperty(value="平均分 区") private Double allAvg ; + @ApiModelProperty(value="平均分 联盟校") private Double leagueAvg ; + @ApiModelProperty(value="平均分 本校") private Double schoolAvg ; + @ApiModelProperty(value="区分度 区") private Double allDist ; + @ApiModelProperty(value="区分度 联盟校") private Double leagueDist ; + @ApiModelProperty(value="区分度 本校") private Double schoolDist ; + private String examNumber ; diff --git a/src/main/java/com/jevon/wordDTO/Form6RepVo.java b/src/main/java/com/jevon/wordDTO/Form6RepVo.java index 3f5431a..2386b46 100644 --- a/src/main/java/com/jevon/wordDTO/Form6RepVo.java +++ b/src/main/java/com/jevon/wordDTO/Form6RepVo.java @@ -1,6 +1,7 @@ package com.jevon.wordDTO; import com.jevon.vo.BaseVo; +import io.swagger.annotations.ApiModel; import java.util.List; @@ -9,6 +10,7 @@ import java.util.List; * @version 1.0 * @date 2019/10/22 0022 10:51 */ +@ApiModel public class Form6RepVo extends BaseVo { private List data ; diff --git a/src/main/java/com/jevon/wordDTO/Form7.java b/src/main/java/com/jevon/wordDTO/Form7.java index 15bee1a..2d0ba67 100644 --- a/src/main/java/com/jevon/wordDTO/Form7.java +++ b/src/main/java/com/jevon/wordDTO/Form7.java @@ -1,10 +1,13 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 14:58 */ +@ApiModel public class Form7 { private String name ; diff --git a/src/main/java/com/jevon/wordDTO/Form8.java b/src/main/java/com/jevon/wordDTO/Form8.java index f28d979..1323779 100644 --- a/src/main/java/com/jevon/wordDTO/Form8.java +++ b/src/main/java/com/jevon/wordDTO/Form8.java @@ -1,16 +1,25 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 15:14 */ +@ApiModel public class Form8 { + @ApiModelProperty(value="题目难度") private String difficultName ; + @ApiModelProperty(value="分值") private Double score ; + @ApiModelProperty(value="得分率 区") private Double allRate ; + @ApiModelProperty(value="得分率 联盟校") private Double leagueRate ; + @ApiModelProperty(value="得分率 本校") private Double schoolRate ; public String getDifficultName() { diff --git a/src/main/java/com/jevon/wordDTO/Form8RepVO.java b/src/main/java/com/jevon/wordDTO/Form8RepVO.java index 2ebef7a..3e23bd6 100644 --- a/src/main/java/com/jevon/wordDTO/Form8RepVO.java +++ b/src/main/java/com/jevon/wordDTO/Form8RepVO.java @@ -1,6 +1,7 @@ package com.jevon.wordDTO; import com.jevon.vo.BaseVo; +import io.swagger.annotations.ApiModel; import java.util.List; @@ -9,6 +10,7 @@ import java.util.List; * @version 1.0 * @date 2019/10/22 0022 10:47 */ +@ApiModel public class Form8RepVO extends BaseVo { private List data ; diff --git a/src/main/java/com/jevon/wordDTO/Table1.java b/src/main/java/com/jevon/wordDTO/Table1.java index c2c8b11..7767d0a 100644 --- a/src/main/java/com/jevon/wordDTO/Table1.java +++ b/src/main/java/com/jevon/wordDTO/Table1.java @@ -1,13 +1,18 @@ package com.jevon.wordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + /** * @author chen * @version 1.0 * @date 2019/10/21 0021 8:34 */ +@ApiModel public class Table1 { - + @ApiModelProperty(value="分数段") private String score ; + @ApiModelProperty(value="人数") private int number ; public String getScore() { diff --git a/src/main/java/com/jevon/wordDTO/test.java b/src/main/java/com/jevon/wordDTO/test.java deleted file mode 100644 index 1c07fc6..0000000 --- a/src/main/java/com/jevon/wordDTO/test.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.jevon.wordDTO; - -/** - * @author chen - * @version 1.0 - * @date 2019/10/18 0018 15:36 - */ -public class test { -} diff --git a/src/main/resources/mapping/AnalyseMapper.xml b/src/main/resources/mapping/AnalyseMapper.xml index 2173dee..5f2a00f 100644 --- a/src/main/resources/mapping/AnalyseMapper.xml +++ b/src/main/resources/mapping/AnalyseMapper.xml @@ -8,11 +8,12 @@ + - insert into sz_learn_analyse (exam_name, exam_time,course_name,create_time) - values (#{examName},#{examTime},#{courseName},#{createTime}) + insert into sz_learn_analyse (exam_name, exam_time,course_name,create_time,grade) + values (#{examName},#{examTime},#{courseName},#{createTime},#{grade}) @@ -24,6 +25,9 @@ exam_time = #{examTime}, + + grade = #{grade}, + max_score = #{maxScore}, diff --git a/src/main/resources/mapping/LeagueMapper.xml b/src/main/resources/mapping/LeagueMapper.xml index fe30894..3ab92d2 100644 --- a/src/main/resources/mapping/LeagueMapper.xml +++ b/src/main/resources/mapping/LeagueMapper.xml @@ -16,6 +16,10 @@ + + update sz_learn_league set league = #{league} where id = #{id} + + + \ No newline at end of file -- libgit2 0.21.0