|
|
@ -212,7 +212,8 @@ public class TeaGradeManageController {
|
|
|
|
@AnonymousAccess
|
|
|
|
@AnonymousAccess
|
|
|
|
@PostMapping("/getClassByExamManageId")
|
|
|
|
@PostMapping("/getClassByExamManageId")
|
|
|
|
@ApiOperation("考试模式--图表统计接口班级下拉框返回classID和班级名") //只显示新建实训时添加的班级
|
|
|
|
@ApiOperation("考试模式--图表统计接口班级下拉框返回classID和班级名") //只显示新建实训时添加的班级
|
|
|
|
public ResultEntity<List<Map<String, String>>> getClassByExamManageId(@RequestParam String examManageId) {
|
|
|
|
public ResultEntity<List<Map<String, String>>> getClassByExamManageId(@RequestParam String examManageId,
|
|
|
|
|
|
|
|
@RequestParam String systemOwner) {
|
|
|
|
TeaAndStudentExamExample teaAndStudentExamExample = new TeaAndStudentExamExample();
|
|
|
|
TeaAndStudentExamExample teaAndStudentExamExample = new TeaAndStudentExamExample();
|
|
|
|
teaAndStudentExamExample.createCriteria().andExamManageIdEqualTo(examManageId);
|
|
|
|
teaAndStudentExamExample.createCriteria().andExamManageIdEqualTo(examManageId);
|
|
|
|
List<TeaAndStudentExam> teaAndStudentExams = teaAndStudentExamMapper.selectByExample(teaAndStudentExamExample);
|
|
|
|
List<TeaAndStudentExam> teaAndStudentExams = teaAndStudentExamMapper.selectByExample(teaAndStudentExamExample);
|
|
|
@ -226,8 +227,8 @@ public class TeaGradeManageController {
|
|
|
|
String[] split = classId.split(",");
|
|
|
|
String[] split = classId.split(",");
|
|
|
|
List<String> idlist = Arrays.asList(split);
|
|
|
|
List<String> idlist = Arrays.asList(split);
|
|
|
|
|
|
|
|
|
|
|
|
StuClassExample example =new StuClassExample();
|
|
|
|
StuClassExample example = new StuClassExample();
|
|
|
|
example.createCriteria().andClassIdIn(idlist);
|
|
|
|
example.createCriteria().andClassIdIn(idlist).andSystemOwnerEqualTo(systemOwner);
|
|
|
|
List<StuClass> stuClassList = stuClassMapper.selectByExample(example);
|
|
|
|
List<StuClass> stuClassList = stuClassMapper.selectByExample(example);
|
|
|
|
|
|
|
|
|
|
|
|
for (StuClass stuClass : stuClassList) {
|
|
|
|
for (StuClass stuClass : stuClassList) {
|
|
|
@ -381,7 +382,7 @@ public class TeaGradeManageController {
|
|
|
|
.collect(Collectors.toMap(StuStudentExamWithBLOBs::getUserid, Function.identity()));
|
|
|
|
.collect(Collectors.toMap(StuStudentExamWithBLOBs::getUserid, Function.identity()));
|
|
|
|
|
|
|
|
|
|
|
|
StuClassExample example = new StuClassExample();
|
|
|
|
StuClassExample example = new StuClassExample();
|
|
|
|
example.createCriteria().andClassIdIn(classIds);
|
|
|
|
example.createCriteria().andClassIdIn(classIds).andSystemOwnerEqualTo(systemOwner);
|
|
|
|
List<StuClass> stuClass = stuClassMapper.selectByExample(example);
|
|
|
|
List<StuClass> stuClass = stuClassMapper.selectByExample(example);
|
|
|
|
|
|
|
|
|
|
|
|
// 构建班级ID与班级对象的映射关系
|
|
|
|
// 构建班级ID与班级对象的映射关系
|
|
|
@ -393,9 +394,12 @@ public class TeaGradeManageController {
|
|
|
|
TeaExamAndUserDto teaExamAndUserDto = new TeaExamAndUserDto();
|
|
|
|
TeaExamAndUserDto teaExamAndUserDto = new TeaExamAndUserDto();
|
|
|
|
teaExamAndUserDto.setName(stuUser.getName());
|
|
|
|
teaExamAndUserDto.setName(stuUser.getName());
|
|
|
|
teaExamAndUserDto.setStudentId(stuUser.getStudentId());
|
|
|
|
teaExamAndUserDto.setStudentId(stuUser.getStudentId());
|
|
|
|
|
|
|
|
|
|
|
|
// 从映射关系中获取班级对象
|
|
|
|
// 从映射关系中获取班级对象
|
|
|
|
|
|
|
|
if (classMap.get(stuUser.getClassId())==null){
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
StuClass classdata = classMap.get(stuUser.getClassId());
|
|
|
|
StuClass classdata = classMap.get(stuUser.getClassId());
|
|
|
|
|
|
|
|
|
|
|
|
teaExamAndUserDto.setClassName(classdata.getClassName());
|
|
|
|
teaExamAndUserDto.setClassName(classdata.getClassName());
|
|
|
|
|
|
|
|
|
|
|
|
StuStudentExamWithBLOBs stuStudentExam = userExamMap.get(stuUser.getUserid());
|
|
|
|
StuStudentExamWithBLOBs stuStudentExam = userExamMap.get(stuUser.getUserid());
|
|
|
@ -482,7 +486,8 @@ public class TeaGradeManageController {
|
|
|
|
StuUser user = userMapper.selectByPrimaryKey(trainingReport.getUserId());
|
|
|
|
StuUser user = userMapper.selectByPrimaryKey(trainingReport.getUserId());
|
|
|
|
trainingReportDto.setName(user.getName());
|
|
|
|
trainingReportDto.setName(user.getName());
|
|
|
|
trainingReportDto.setStudentId(user.getStudentId());
|
|
|
|
trainingReportDto.setStudentId(user.getStudentId());
|
|
|
|
StuClassExample example =new StuClassExample();
|
|
|
|
StuClassExample example = new StuClassExample();
|
|
|
|
|
|
|
|
example.createCriteria().andClassIdEqualTo(user.getClassId());
|
|
|
|
List<StuClass> stuClassList = stuClassMapper.selectByExample(example);
|
|
|
|
List<StuClass> stuClassList = stuClassMapper.selectByExample(example);
|
|
|
|
StuClass stuClass = stuClassList.get(0);
|
|
|
|
StuClass stuClass = stuClassList.get(0);
|
|
|
|
trainingReportDto.setClassName(stuClass.getClassName());
|
|
|
|
trainingReportDto.setClassName(stuClass.getClassName());
|
|
|
|