|
|
@ -41,7 +41,6 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.function.Function;
|
|
|
|
import java.util.function.Function;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
@ -78,9 +77,10 @@ public class TeaGradeManageController {
|
|
|
|
@ApiOperation("考试模式--页面展示(学生端实战考核复用)")
|
|
|
|
@ApiOperation("考试模式--页面展示(学生端实战考核复用)")
|
|
|
|
public ResultEntity<PageInfo<TeaExamManageCountDto>> getExamInfo(@RequestParam Integer index,
|
|
|
|
public ResultEntity<PageInfo<TeaExamManageCountDto>> getExamInfo(@RequestParam Integer index,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@ApiParam("ManyAnswer为考试时间,JudgeAnswer为发布人") @RequestParam String schoolId) {
|
|
|
|
@ApiParam("ManyAnswer为考试时间,JudgeAnswer为发布人") @RequestParam String schoolId,
|
|
|
|
|
|
|
|
@ApiParam("系统名称") @RequestParam String systemOwner) {
|
|
|
|
|
|
|
|
|
|
|
|
List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolId(schoolId);
|
|
|
|
List<TeaExamManage> teaExamManages = teaExamManageMapper.selectBySchoolIdAndSystemOwner(schoolId, systemOwner);
|
|
|
|
if (teaExamManages.isEmpty()) {
|
|
|
|
if (teaExamManages.isEmpty()) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -149,7 +149,7 @@ public class TeaGradeManageController {
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam(required = false) String examManageId) {
|
|
|
|
@RequestParam(required = false) String examManageId) {
|
|
|
|
List<TeaExamAndUserDto> list = getTeaExamAndUserDtos(schoolId, keyWord, classId, examManageId);
|
|
|
|
List<TeaExamAndUserDto> list = getTeaExamAndUserDtos(schoolId, keyWord, classId, examManageId);
|
|
|
|
if (list == null||list.isEmpty()) {
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
return new ResultEntity<PageInfo<TeaExamAndUserDto>>(new PageInfo<>());
|
|
|
|
return new ResultEntity<PageInfo<TeaExamAndUserDto>>(new PageInfo<>());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 先对列表按照 totalScore 进行降序排序
|
|
|
|
// 先对列表按照 totalScore 进行降序排序
|
|
|
@ -416,7 +416,7 @@ public class TeaGradeManageController {
|
|
|
|
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
return new ResultEntity<PageInfo<TeaTrainingInfoDTO>>(iTeaGradeManageService.getTrainingInfo(index, size, schoolId, keyWord, classId,systemOwner));
|
|
|
|
return new ResultEntity<PageInfo<TeaTrainingInfoDTO>>(iTeaGradeManageService.getTrainingInfo(index, size, schoolId, keyWord, classId, systemOwner));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
@ -427,7 +427,7 @@ public class TeaGradeManageController {
|
|
|
|
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
@ApiParam("学号或姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
iTeaGradeManageService.exportTrainingInfo(response, schoolId, keyWord, classId,systemOwner);
|
|
|
|
iTeaGradeManageService.exportTrainingInfo(response, schoolId, keyWord, classId, systemOwner);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
@ -457,10 +457,11 @@ public class TeaGradeManageController {
|
|
|
|
@ApiOperation("练习模式--实训报告展示")
|
|
|
|
@ApiOperation("练习模式--实训报告展示")
|
|
|
|
public ResultEntity<PageInfo<TrainingReportDto>> getReportBySchoolID(@RequestParam Integer index,
|
|
|
|
public ResultEntity<PageInfo<TrainingReportDto>> getReportBySchoolID(@RequestParam Integer index,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam String schoolId) {
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
PageHelper.startPage(index, size);
|
|
|
|
TrainingReportExample reportExample = new TrainingReportExample();
|
|
|
|
TrainingReportExample reportExample = new TrainingReportExample();
|
|
|
|
reportExample.createCriteria().andSchoolIdEqualTo(schoolId);
|
|
|
|
reportExample.createCriteria().andSchoolIdEqualTo(schoolId).andSystemOwnerEqualTo(systemOwner);
|
|
|
|
List<TrainingReportDto> list = new AstList();
|
|
|
|
List<TrainingReportDto> list = new AstList();
|
|
|
|
List<TrainingReport> trainingReports = reportMapper.selectByExampleWithBLOBs(reportExample);
|
|
|
|
List<TrainingReport> trainingReports = reportMapper.selectByExampleWithBLOBs(reportExample);
|
|
|
|
if (!trainingReports.isEmpty()) {
|
|
|
|
if (!trainingReports.isEmpty()) {
|
|
|
@ -496,7 +497,7 @@ public class TeaGradeManageController {
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@PostMapping("/getChapterName")
|
|
|
|
@PostMapping("/getChapterName")
|
|
|
|
@ApiOperation("***评阅-章节下拉框")
|
|
|
|
@ApiOperation("***评阅-章节下拉框")
|
|
|
|
public ResultEntity<List<String>> getReportCorrect(String schoolId,String systemOwner) {
|
|
|
|
public ResultEntity<List<String>> getReportCorrect(String schoolId, String systemOwner) {
|
|
|
|
List<String> list = null;
|
|
|
|
List<String> list = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
list = CourseAPI.selectNameByCourseID(schoolId, systemOwner);
|
|
|
|
list = CourseAPI.selectNameByCourseID(schoolId, systemOwner);
|
|
|
@ -553,7 +554,7 @@ public class TeaGradeManageController {
|
|
|
|
@ApiOperation("练习模式--成绩详情页面设置权重")
|
|
|
|
@ApiOperation("练习模式--成绩详情页面设置权重")
|
|
|
|
public void updateWeightByModule(@ApiParam("所有框必须传") @RequestBody SysWeight sysWeight) {
|
|
|
|
public void updateWeightByModule(@ApiParam("所有框必须传") @RequestBody SysWeight sysWeight) {
|
|
|
|
SysWeightExample sysWeightExample = new SysWeightExample();
|
|
|
|
SysWeightExample sysWeightExample = new SysWeightExample();
|
|
|
|
sysWeightExample.createCriteria().andCourseIdEqualTo(sysWeight.getCourseId());
|
|
|
|
sysWeightExample.createCriteria().andCourseIdEqualTo(sysWeight.getCourseId()).andSystemOwnerEqualTo(sysWeight.getSystemOwner());
|
|
|
|
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
|
|
|
|
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
|
|
|
|
if (!sysWeights.isEmpty()) {//有 update
|
|
|
|
if (!sysWeights.isEmpty()) {//有 update
|
|
|
|
sysWeightMapper.updateByPrimaryKey(sysWeight);
|
|
|
|
sysWeightMapper.updateByPrimaryKey(sysWeight);
|
|
|
@ -566,14 +567,14 @@ public class TeaGradeManageController {
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@PostMapping("/getModuleBySchoolId")
|
|
|
|
@PostMapping("/getModuleBySchoolId")
|
|
|
|
@ApiOperation("***练习模式--权重页面下拉选择模块框")
|
|
|
|
@ApiOperation("***练习模式--权重页面下拉选择模块框")
|
|
|
|
public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId,@RequestParam String systemOwner) {
|
|
|
|
public ResultEntity<List<Map<String, String>>> getModuleBySchoolId(@RequestParam String schoolId, @RequestParam String systemOwner) {
|
|
|
|
List<Map<String,String>> list= null;
|
|
|
|
List<Map<String, String>> list = null;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
List<SysTwoCatalog> twoCatalogs = CourseAPI.selectCourseList(systemOwner, schoolId);
|
|
|
|
List<SysTwoCatalog> twoCatalogs = CourseAPI.selectCourseList(systemOwner, schoolId);
|
|
|
|
for (int i = 0; i < twoCatalogs.size(); i++) {
|
|
|
|
for (int i = 0; i < twoCatalogs.size(); i++) {
|
|
|
|
HashMap<String, String> hashMap = new HashMap<>();
|
|
|
|
HashMap<String, String> hashMap = new HashMap<>();
|
|
|
|
SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i);
|
|
|
|
SysTwoCatalog sysTwoCatalog = twoCatalogs.get(i);
|
|
|
|
hashMap.put(sysTwoCatalog.getTwoId(),sysTwoCatalog.getTwoName());
|
|
|
|
hashMap.put(sysTwoCatalog.getTwoId(), sysTwoCatalog.getTwoName());
|
|
|
|
list.add(hashMap);
|
|
|
|
list.add(hashMap);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
@ -586,9 +587,10 @@ public class TeaGradeManageController {
|
|
|
|
@PostMapping("/getModuleByCourseId")
|
|
|
|
@PostMapping("/getModuleByCourseId")
|
|
|
|
@ApiOperation("练习模式--权重回显")
|
|
|
|
@ApiOperation("练习模式--权重回显")
|
|
|
|
public ResultEntity<SysWeight> getModuleByCourseId(@RequestParam String courseId,
|
|
|
|
public ResultEntity<SysWeight> getModuleByCourseId(@RequestParam String courseId,
|
|
|
|
@RequestParam String schoolId) {
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
SysWeightExample sysWeightExample = new SysWeightExample();
|
|
|
|
SysWeightExample sysWeightExample = new SysWeightExample();
|
|
|
|
sysWeightExample.createCriteria().andSchoolIdEqualTo(schoolId).andCourseIdEqualTo(courseId);
|
|
|
|
sysWeightExample.createCriteria().andSchoolIdEqualTo(schoolId).andCourseIdEqualTo(courseId).andSystemOwnerEqualTo(systemOwner);
|
|
|
|
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
|
|
|
|
List<SysWeight> sysWeights = sysWeightMapper.selectByExample(sysWeightExample);
|
|
|
|
if (sysWeights.isEmpty()) {
|
|
|
|
if (sysWeights.isEmpty()) {
|
|
|
|
//todo 是否需要设置默认权重
|
|
|
|
//todo 是否需要设置默认权重
|
|
|
@ -605,8 +607,9 @@ public class TeaGradeManageController {
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam Integer size,
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
@RequestParam String schoolId,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@RequestParam(required = false) String classId,
|
|
|
|
@ApiParam("学号/姓名搜索框") @RequestParam(required = false) String keyWord) {
|
|
|
|
@ApiParam("学号/姓名搜索框") @RequestParam(required = false) String keyWord,
|
|
|
|
return new ResultEntity<>(iTeaGradeManageService.getTheoryInfo(index, size, schoolId, classId, keyWord));
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
|
|
|
|
return new ResultEntity<>(iTeaGradeManageService.getTheoryInfo(index, size, schoolId, classId, keyWord,systemOwner));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|