|
@@ -1438,7 +1438,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
List<ExcelError> excelErrorTemp = new ArrayList<>();
|
|
// 校验系统中是否存在
|
|
// 校验系统中是否存在
|
|
Map<String, SysOrg> collegeOrgMap = new HashMap<>();
|
|
Map<String, SysOrg> collegeOrgMap = new HashMap<>();
|
|
- Map<String,SysOrg> teachingRoomMap = new HashMap<>();
|
|
|
|
|
|
+ Map<String, SysOrg> teachingRoomMap = new HashMap<>();
|
|
Map<String, BasicCourse> courseMap = new HashMap<>();
|
|
Map<String, BasicCourse> courseMap = new HashMap<>();
|
|
Map<String, DictionaryResult> clazzMap = new HashMap<>();
|
|
Map<String, DictionaryResult> clazzMap = new HashMap<>();
|
|
String batchNo = SystemConstant.getUuid();
|
|
String batchNo = SystemConstant.getUuid();
|
|
@@ -1453,7 +1453,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
SysOrg teachingRoomOrg = this.validSysOrgExists(teachingRoomMap, statisticsImportDto.getTeachingRoomName(), sysUser.getSchoolId(), OrgTypeEnum.TEACHING_ROOM, excelErrorTemp, (y + 1), (i + 1), "开课部门");
|
|
SysOrg teachingRoomOrg = this.validSysOrgExists(teachingRoomMap, statisticsImportDto.getTeachingRoomName(), sysUser.getSchoolId(), OrgTypeEnum.TEACHING_ROOM, excelErrorTemp, (y + 1), (i + 1), "开课部门");
|
|
BasicCourse basicCourse = this.validBasicCourseExists(courseMap, statisticsImportDto.getCourseName(), sysUser.getSchoolId(), statisticsImportDto.getCourseCode(), excelErrorTemp, (y + 1), (i + 1));
|
|
BasicCourse basicCourse = this.validBasicCourseExists(courseMap, statisticsImportDto.getCourseName(), sysUser.getSchoolId(), statisticsImportDto.getCourseCode(), excelErrorTemp, (y + 1), (i + 1));
|
|
String teacherName = statisticsImportDto.getTeacherName();
|
|
String teacherName = statisticsImportDto.getTeacherName();
|
|
- String clazzNames= statisticsImportDto.getClazzName();
|
|
|
|
|
|
+ String clazzNames = statisticsImportDto.getClazzName();
|
|
List<DictionaryResult> dictionaryResultList = new ArrayList<>();
|
|
List<DictionaryResult> dictionaryResultList = new ArrayList<>();
|
|
for (String clazzName : clazzNames.split(",")) {
|
|
for (String clazzName : clazzNames.split(",")) {
|
|
DictionaryResult clazz = this.validBasicClazzExists(clazzMap, clazzName, sysUser.getSchoolId(), excelErrorTemp, (y + 1), (i + 1));
|
|
DictionaryResult clazz = this.validBasicClazzExists(clazzMap, clazzName, sysUser.getSchoolId(), excelErrorTemp, (y + 1), (i + 1));
|
|
@@ -1462,7 +1462,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
String clazzIds = dictionaryResultList.stream().map(e -> String.valueOf(e.getId())).collect(Collectors.joining(","));
|
|
String clazzIds = dictionaryResultList.stream().map(e -> String.valueOf(e.getId())).collect(Collectors.joining(","));
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
if (excelErrorTemp.size() == 0) {
|
|
if (excelErrorTemp.size() == 0) {
|
|
|
|
|
|
TCStatisticsTemp tcStatistics = new TCStatisticsTemp(
|
|
TCStatisticsTemp tcStatistics = new TCStatisticsTemp(
|
|
@@ -1487,7 +1486,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(errors));
|
|
throw ExceptionResultEnum.ERROR.exception(JSONObject.toJSONString(errors));
|
|
}
|
|
}
|
|
//加入删除(根据考试id和当前登录人)
|
|
//加入删除(根据考试id和当前登录人)
|
|
- tcStatisticsService.removeImportData(examId,sysUser.getId());
|
|
|
|
|
|
+ tcStatisticsService.removeImportData(examId, sysUser.getId());
|
|
tcStatisticsTempService.saveBatch(tcStatisticsImportTempList);
|
|
tcStatisticsTempService.saveBatch(tcStatisticsImportTempList);
|
|
map.put("dataCount", tcStatisticsImportTempList.size());
|
|
map.put("dataCount", tcStatisticsImportTempList.size());
|
|
tcStatisticsService.importJoinData(tcStatisticsImportTempList);
|
|
tcStatisticsService.importJoinData(tcStatisticsImportTempList);
|
|
@@ -1641,7 +1640,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> executeDownloadPaperFileBatch(Map<String, Object> map) throws Exception {
|
|
public Map<String, Object> executeDownloadPaperFileBatch(Map<String, Object> map) throws Exception {
|
|
TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
|
|
TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
|
|
- String specialSuccessMessage = "";
|
|
|
|
DownloadPaperFileParam downloadPaperFileParam = (DownloadPaperFileParam) map.get("downloadPaperFileParam");
|
|
DownloadPaperFileParam downloadPaperFileParam = (DownloadPaperFileParam) map.get("downloadPaperFileParam");
|
|
Long schoolId = tbTask.getSchoolId();
|
|
Long schoolId = tbTask.getSchoolId();
|
|
Long semesterId = downloadPaperFileParam.getSemesterId();
|
|
Long semesterId = downloadPaperFileParam.getSemesterId();
|
|
@@ -1652,6 +1650,17 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
Boolean namedByOriginalFile = downloadPaperFileParam.getNamedByOriginalFile();
|
|
Boolean namedByOriginalFile = downloadPaperFileParam.getNamedByOriginalFile();
|
|
PaperFileDownloadContentEnum paperFileDownloadContent = downloadPaperFileParam.getPaperFileDownloadContentType();
|
|
PaperFileDownloadContentEnum paperFileDownloadContent = downloadPaperFileParam.getPaperFileDownloadContentType();
|
|
PaperFileDownloadExposureStatusEnum paperFileDownloadExposureStatus = downloadPaperFileParam.getPaperFileDownloadExposureStatus();
|
|
PaperFileDownloadExposureStatusEnum paperFileDownloadExposureStatus = downloadPaperFileParam.getPaperFileDownloadExposureStatus();
|
|
|
|
+ String specialSuccessMessage = "";
|
|
|
|
+ if (Objects.nonNull(paperFileDownloadExposureStatus)) {
|
|
|
|
+ switch (paperFileDownloadExposureStatus) {
|
|
|
|
+ case EXPOSED_PAPER: // 曝光的
|
|
|
|
+ specialSuccessMessage = "所选择的命题任务中没有已曝光的试卷";
|
|
|
|
+ break;
|
|
|
|
+ case UNEXPOSED_PAPER: // 未曝光的
|
|
|
|
+ specialSuccessMessage = "所选择的命题任务中没有未曝光的试卷";
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
String courseName = downloadPaperFileParam.getCourseName();
|
|
String courseName = downloadPaperFileParam.getCourseName();
|
|
Set<Long> idSet = downloadPaperFileParam.getIdSet();
|
|
Set<Long> idSet = downloadPaperFileParam.getIdSet();
|
|
@@ -1751,14 +1760,14 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
switch (paperFileDownloadExposureStatus) {
|
|
switch (paperFileDownloadExposureStatus) {
|
|
case EXPOSED_PAPER: // 曝光的
|
|
case EXPOSED_PAPER: // 曝光的
|
|
paperCellList = paperCellList.stream().filter(ExamTaskPaperFileDto::getExposureStatus).collect(Collectors.toList());
|
|
paperCellList = paperCellList.stream().filter(ExamTaskPaperFileDto::getExposureStatus).collect(Collectors.toList());
|
|
- if (paperCellList.size() == 0) {
|
|
|
|
- specialSuccessMessage = "所选择的命题任务中没有已曝光的试卷";
|
|
|
|
|
|
+ if (paperCellList.size() > 0) {
|
|
|
|
+ specialSuccessMessage = "";
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case UNEXPOSED_PAPER: // 未曝光的
|
|
case UNEXPOSED_PAPER: // 未曝光的
|
|
paperCellList = paperCellList.stream().filter(e -> !e.getExposureStatus()).collect(Collectors.toList());
|
|
paperCellList = paperCellList.stream().filter(e -> !e.getExposureStatus()).collect(Collectors.toList());
|
|
- if (paperCellList.size() == 0) {
|
|
|
|
- specialSuccessMessage = "所选择的命题任务中没有未曝光的试卷";
|
|
|
|
|
|
+ if (paperCellList.size() > 0) {
|
|
|
|
+ specialSuccessMessage = "";
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case ALL_PAPER: // 全部试卷
|
|
case ALL_PAPER: // 全部试卷
|
|
@@ -1858,14 +1867,14 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
/**
|
|
/**
|
|
* 验证机构是否存在
|
|
* 验证机构是否存在
|
|
*
|
|
*
|
|
- * @param orgMap 机构map
|
|
|
|
- * @param key 机构名称
|
|
|
|
- * @param schoolId 学校id
|
|
|
|
- * @param orgTypeEnum 机构类型
|
|
|
|
|
|
+ * @param orgMap 机构map
|
|
|
|
+ * @param key 机构名称
|
|
|
|
+ * @param schoolId 学校id
|
|
|
|
+ * @param orgTypeEnum 机构类型
|
|
* @param excelErrorTemp 错误信息
|
|
* @param excelErrorTemp 错误信息
|
|
- * @param row 行
|
|
|
|
- * @param sheet 区
|
|
|
|
- * @param cloumnName cloumnName
|
|
|
|
|
|
+ * @param row 行
|
|
|
|
+ * @param sheet 区
|
|
|
|
+ * @param cloumnName cloumnName
|
|
* @return 机构
|
|
* @return 机构
|
|
*/
|
|
*/
|
|
private SysOrg validSysOrgExists(Map<String, SysOrg> orgMap,
|
|
private SysOrg validSysOrgExists(Map<String, SysOrg> orgMap,
|
|
@@ -1899,13 +1908,13 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
/**
|
|
/**
|
|
* 验证课程是否存在
|
|
* 验证课程是否存在
|
|
*
|
|
*
|
|
- * @param courseMap courseMap
|
|
|
|
- * @param key 课程名称
|
|
|
|
- * @param schoolId 学校id
|
|
|
|
- * @param value 课程编号
|
|
|
|
|
|
+ * @param courseMap courseMap
|
|
|
|
+ * @param key 课程名称
|
|
|
|
+ * @param schoolId 学校id
|
|
|
|
+ * @param value 课程编号
|
|
* @param excelErrorTemp 错误信息
|
|
* @param excelErrorTemp 错误信息
|
|
- * @param row 行
|
|
|
|
- * @param sheet 区
|
|
|
|
|
|
+ * @param row 行
|
|
|
|
+ * @param sheet 区
|
|
* @return 基础课程
|
|
* @return 基础课程
|
|
*/
|
|
*/
|
|
private BasicCourse validBasicCourseExists(Map<String, BasicCourse> courseMap,
|
|
private BasicCourse validBasicCourseExists(Map<String, BasicCourse> courseMap,
|