|
|
|
@ -2,6 +2,7 @@ package com.ibeetl.jlw.web;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import cn.jlw.Interceptor.GetFile;
|
|
|
|
@ -74,44 +75,73 @@ public class TeacherController extends BaseController {
|
|
|
|
|
private static final String MODEL = "/jlw/teacher";
|
|
|
|
|
private static final String API = "/api/teacher";
|
|
|
|
|
|
|
|
|
|
@Autowired private CorePlatformService platformService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CorePlatformService platformService;
|
|
|
|
|
|
|
|
|
|
@Autowired private StudentService studentService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentService studentService;
|
|
|
|
|
|
|
|
|
|
@Autowired private TeacherService teacherService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherService teacherService;
|
|
|
|
|
|
|
|
|
|
@Autowired private UniversitiesCollegesService universitiesCollegesService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversitiesCollegesService universitiesCollegesService;
|
|
|
|
|
|
|
|
|
|
@Autowired private CompetitionTeacherEvaluationService competitionTeacherEvaluationService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTeacherEvaluationService competitionTeacherEvaluationService;
|
|
|
|
|
|
|
|
|
|
@Autowired private CompetitionService competitionService;
|
|
|
|
|
@Autowired private CompetitionStudentsService competitionStudentsService;
|
|
|
|
|
@Autowired private CompetitionTaskOneQuestionService competitionTaskOneQuestionService;
|
|
|
|
|
@Autowired private CompetitionTaskSecondQuestionService competitionTaskSecondQuestionService;
|
|
|
|
|
@Autowired private CompetitionTaskSecondQuestionStepService competitionTaskSecondQuestionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionService competitionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionStudentsService competitionStudentsService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTaskOneQuestionService competitionTaskOneQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTaskSecondQuestionService competitionTaskSecondQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CompetitionTaskSecondQuestionStepService competitionTaskSecondQuestionStepService;
|
|
|
|
|
|
|
|
|
|
@Autowired private ExamService examService;
|
|
|
|
|
@Autowired private ExamStudentsService examStudentsService;
|
|
|
|
|
@Autowired private ExamTaskOneQuestionService examTaskOneQuestionService;
|
|
|
|
|
@Autowired private ExamTaskSecondQuestionService examTaskSecondQuestionService;
|
|
|
|
|
@Autowired private ExamTaskSecondQuestionStepService examTaskSecondQuestionStepService;
|
|
|
|
|
@Autowired private ExamTaskThreeQuestionService examTaskThreeQuestionService;
|
|
|
|
|
@Autowired private ExamTaskThreeQuestionStepService examTaskThreeQuestionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamService examService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamStudentsService examStudentsService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskOneQuestionService examTaskOneQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskSecondQuestionService examTaskSecondQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskSecondQuestionStepService examTaskSecondQuestionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskThreeQuestionService examTaskThreeQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ExamTaskThreeQuestionStepService examTaskThreeQuestionStepService;
|
|
|
|
|
|
|
|
|
|
@Autowired private CourseInfoService courseInfoService;
|
|
|
|
|
@Autowired private ResourcesQuestionService resourcesQuestionService;
|
|
|
|
|
@Autowired private ResourcesCompetitionService resourcesCompetitionService;
|
|
|
|
|
@Autowired private ResourcesCompetitionStepService resourcesCompetitionStepService;
|
|
|
|
|
@Autowired private ResourcesTrainingService resourcesTrainingService;
|
|
|
|
|
@Autowired private ResourcesTrainingStepService resourcesTrainingStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private CourseInfoService courseInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesQuestionService resourcesQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesCompetitionService resourcesCompetitionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesCompetitionStepService resourcesCompetitionStepService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesTrainingService resourcesTrainingService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesTrainingStepService resourcesTrainingStepService;
|
|
|
|
|
|
|
|
|
|
@Autowired private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesApplicationService resourcesApplicationService;
|
|
|
|
|
|
|
|
|
|
@Autowired private StudentDefenceLogService studentDefenceLogService;
|
|
|
|
|
@Autowired private StudentDefenceLogInfoService studentDefenceLogInfoService;
|
|
|
|
|
@Autowired private UniversitiesCollegesDao universitiesCollegesDao;
|
|
|
|
|
@Autowired private UniversityFacultyService universityFacultyService;
|
|
|
|
|
@Autowired private UniversitySystemService universitySystemService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentDefenceLogService studentDefenceLogService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private StudentDefenceLogInfoService studentDefenceLogInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversitiesCollegesDao universitiesCollegesDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversityFacultyService universityFacultyService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversitySystemService universitySystemService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
FileService fileService;
|
|
|
|
@ -347,7 +377,8 @@ public class TeacherController extends BaseController {
|
|
|
|
|
Map<Integer, List<ResourcesQuestion>> groupByQuestionType = null;
|
|
|
|
|
try {
|
|
|
|
|
groupByQuestionType = resourcesQuestionList.stream().collect(Collectors.groupingBy(e -> e.getQuestionType()));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.put("data", groupByQuestionType);
|
|
|
|
|
map.put("nowTime", System.currentTimeMillis());
|
|
|
|
@ -616,7 +647,8 @@ public class TeacherController extends BaseController {
|
|
|
|
|
Map<Integer, List<CompetitionTaskOneQuestion>> groupByQuestionType = null;
|
|
|
|
|
try {
|
|
|
|
|
groupByQuestionType = cT1QuestionList.stream().collect(Collectors.groupingBy(e -> e.getQuestionType()));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.put("data", groupByQuestionType);//所有数据
|
|
|
|
|
map.put("nowTime", System.currentTimeMillis());
|
|
|
|
@ -868,7 +900,8 @@ public class TeacherController extends BaseController {
|
|
|
|
|
Map<Integer, List<ExamTaskOneQuestion>> groupByQuestionType = null;
|
|
|
|
|
try {
|
|
|
|
|
groupByQuestionType = cT1QuestionList.stream().collect(Collectors.groupingBy(e -> e.getQuestionType()));
|
|
|
|
|
}catch (Exception e){}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.put("data", groupByQuestionType);//所有数据
|
|
|
|
|
map.put("nowTime", System.currentTimeMillis());
|
|
|
|
@ -1004,7 +1037,6 @@ public class TeacherController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping(MODEL + "/list.json")
|
|
|
|
|
@Function("teacher.query")
|
|
|
|
|
@ResponseBody
|
|
|
|
@ -1064,6 +1096,10 @@ public class TeacherController extends BaseController {
|
|
|
|
|
teacher.setAddTime(null);
|
|
|
|
|
teacher.setUserId(null);
|
|
|
|
|
teacher.setOrgId(null);
|
|
|
|
|
|
|
|
|
|
if (teacher.getTeacherJobNumber().length() >= 16) {
|
|
|
|
|
return JsonResult.failMessage("输入内容:" + teacher.getTeacherJobNumber() + " 超过16个字符!");
|
|
|
|
|
}
|
|
|
|
|
boolean success = teacherService.edit(teacher);
|
|
|
|
|
if (success) {
|
|
|
|
|
|
|
|
|
@ -1356,7 +1392,8 @@ public class TeacherController extends BaseController {
|
|
|
|
|
if (null != response && null != response.getOutputStream()) {
|
|
|
|
|
response.getOutputStream().close();
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) { }
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1518,12 +1555,14 @@ public class TeacherController extends BaseController {
|
|
|
|
|
if (null != response && null != response.getOutputStream()) {
|
|
|
|
|
response.getOutputStream().close();
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) { }
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 导出批量模板
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@SneakyThrows
|
|
|
|
@ -1538,8 +1577,7 @@ public class TeacherController extends BaseController {
|
|
|
|
|
if (coreUser.isAdmin()) {
|
|
|
|
|
// 输出 Excel
|
|
|
|
|
com.ibeetl.admin.core.util.excelGroupValidation.ExcelUtil.createExcel(Arrays.asList(new TeacherBatchImportAdminDTO()), response.getOutputStream());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
// 输出 Excel
|
|
|
|
|
com.ibeetl.admin.core.util.excelGroupValidation.ExcelUtil.createExcel(Arrays.asList(new TeacherBatchImportUniAdminDTO()), response.getOutputStream());
|
|
|
|
|
}
|
|
|
|
@ -1547,6 +1585,7 @@ public class TeacherController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能描述: <br>
|
|
|
|
|
*
|
|
|
|
|
* @param file
|
|
|
|
|
* @return {@link JsonResult}
|
|
|
|
|
* @Author: 87966
|
|
|
|
@ -1644,8 +1683,7 @@ public class TeacherController extends BaseController {
|
|
|
|
|
|
|
|
|
|
// 导入并添加身份信息
|
|
|
|
|
list.forEach(teacherService::add);
|
|
|
|
|
}
|
|
|
|
|
catch (IllegalArgumentException exception) {
|
|
|
|
|
} catch (IllegalArgumentException exception) {
|
|
|
|
|
return JsonResult.failMessage(exception.getMessage()).setCode(DIY_ERROR.getCode());
|
|
|
|
|
}
|
|
|
|
|
return JsonResult.successMessage("导入成功!");
|
|
|
|
|