|
@@ -7,10 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
-import com.qmth.distributed.print.business.bean.dto.FieldsDto;
|
|
|
|
-import com.qmth.distributed.print.business.bean.dto.PrintTaskDto;
|
|
|
|
-import com.qmth.distributed.print.business.bean.dto.PrintTaskTotalDto;
|
|
|
|
-import com.qmth.distributed.print.business.bean.dto.TaskTotalLeftDto;
|
|
|
|
|
|
+import com.qmth.distributed.print.business.bean.dto.*;
|
|
import com.qmth.distributed.print.business.bean.result.ExaminationDetailResult;
|
|
import com.qmth.distributed.print.business.bean.result.ExaminationDetailResult;
|
|
import com.qmth.distributed.print.business.bean.result.ExaminationResult;
|
|
import com.qmth.distributed.print.business.bean.result.ExaminationResult;
|
|
import com.qmth.distributed.print.business.bean.result.SummarizedDataResult;
|
|
import com.qmth.distributed.print.business.bean.result.SummarizedDataResult;
|
|
@@ -229,8 +226,9 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
for (ExaminationResult examinationResult : list) {
|
|
for (ExaminationResult examinationResult : list) {
|
|
String examDetailCourseIds = examinationResult.getExamDetailCourseIds();
|
|
String examDetailCourseIds = examinationResult.getExamDetailCourseIds();
|
|
if (examDetailCourseIds == null || examDetailCourseIds.length() == 0) {
|
|
if (examDetailCourseIds == null || examDetailCourseIds.length() == 0) {
|
|
- throw ExceptionResultEnum.ERROR.exception("考务数据确实课程信息");
|
|
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("考务数据缺失课程信息");
|
|
}
|
|
}
|
|
|
|
+ // 处理课程和科目
|
|
String[] arr = examDetailCourseIds.split(",");
|
|
String[] arr = examDetailCourseIds.split(",");
|
|
|
|
|
|
final String separator = "、";
|
|
final String separator = "、";
|
|
@@ -248,6 +246,15 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
paperNumberStr = paperNumberStr.substring(0, paperNumberStr.length() - separator.length());
|
|
paperNumberStr = paperNumberStr.substring(0, paperNumberStr.length() - separator.length());
|
|
examinationResult.setCourseNameCode(courseNameCodeStr);
|
|
examinationResult.setCourseNameCode(courseNameCodeStr);
|
|
examinationResult.setPaperNumber(paperNumberStr);
|
|
examinationResult.setPaperNumber(paperNumberStr);
|
|
|
|
+
|
|
|
|
+ // 处理时间
|
|
|
|
+ Long startTime = examinationResult.getExamStartTime();
|
|
|
|
+ Long endTime = examinationResult.getExamEndTime();
|
|
|
|
+ Map<String,Object> dateMap = ConvertUtil.analyzeDateAndTime(startTime,endTime);
|
|
|
|
+ String date = String.valueOf(dateMap.get("date"));
|
|
|
|
+ String time = String.valueOf(dateMap.get("time"));
|
|
|
|
+ examinationResult.setExamDate(date);
|
|
|
|
+ examinationResult.setExamTime(time);
|
|
}
|
|
}
|
|
return page;
|
|
return page;
|
|
}
|
|
}
|
|
@@ -511,6 +518,61 @@ public class ExamDetailServiceImpl extends ServiceImpl<ExamDetailMapper, ExamDet
|
|
return this.list(queryWrapper);
|
|
return this.list(queryWrapper);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
+ @Override
|
|
|
|
+ public List<ExaminationExportDto> findExaminationExportDtoDatasource(Map<String, Object> map) {
|
|
|
|
+ Long printPlanId = null;
|
|
|
|
+ if (map.get("printPlanId") != null) {
|
|
|
|
+ printPlanId = SystemConstant.convertIdToLong(String.valueOf(map.get("printPlanId")));
|
|
|
|
+ }
|
|
|
|
+ String courseCode = null;
|
|
|
|
+ if (map.get("courseCode") != null) {
|
|
|
|
+ courseCode = String.valueOf(map.get("courseCode"));
|
|
|
|
+ }
|
|
|
|
+ String paperNumber = null;
|
|
|
|
+ if (map.get("paperNumber") != null) {
|
|
|
|
+ paperNumber = String.valueOf(map.get("paperNumber"));
|
|
|
|
+ }
|
|
|
|
+ String examPlace = null;
|
|
|
|
+ if (map.get("examPlace") != null) {
|
|
|
|
+ examPlace = String.valueOf(map.get("examPlace"));
|
|
|
|
+ }
|
|
|
|
+ String examRoom = null;
|
|
|
|
+ if (map.get("examRoom") != null) {
|
|
|
|
+ examRoom = String.valueOf(map.get("examRoom"));
|
|
|
|
+ }
|
|
|
|
+ String packageCode = null;
|
|
|
|
+ if (map.get("packageCode") != null) {
|
|
|
|
+ packageCode = String.valueOf(map.get("packageCode"));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
|
|
|
|
+ Long userId = tbTask.getCreateId();
|
|
|
|
+ Long schoolId = tbTask.getSchoolId();
|
|
|
|
+
|
|
|
|
+ List<ExaminationResult> examinationResultList = this.findExaminationBriefPage(schoolId,
|
|
|
|
+ printPlanId, courseCode, paperNumber, examPlace, examRoom, packageCode,
|
|
|
|
+ SystemConstant.PAGE_NUMBER, SystemConstant.PAGE_SIZE).getRecords();
|
|
|
|
+ int index = 0;
|
|
|
|
+ List<ExaminationExportDto> examinationExportDtoList = new ArrayList<>();
|
|
|
|
+ for (ExaminationResult examinationResult : examinationResultList) {
|
|
|
|
+ index ++;
|
|
|
|
+ ExaminationExportDto examinationExportDto = new ExaminationExportDto();
|
|
|
|
+ examinationExportDto.setIndex((long) index);
|
|
|
|
+ examinationExportDto.setPrintPlanName(examinationResult.getPrintPlanName());
|
|
|
|
+ examinationExportDto.setExamDate(examinationResult.getExamDate());
|
|
|
|
+ examinationExportDto.setExamTime(examinationResult.getExamTime());
|
|
|
|
+ examinationExportDto.setExamPlace(examinationResult.getExamPlace());
|
|
|
|
+ examinationExportDto.setExamRoom(examinationResult.getExamRoom());
|
|
|
|
+ examinationExportDto.setPackageCode(examinationResult.getPackageCode());
|
|
|
|
+ examinationExportDto.setCourseNameCode(examinationResult.getCourseNameCode());
|
|
|
|
+ examinationExportDto.setPaperNumber(examinationResult.getPaperNumber());
|
|
|
|
+ examinationExportDto.setTotalSubjects(examinationResult.getTotalSubjects());
|
|
|
|
+ examinationExportDtoList.add(examinationExportDto);
|
|
|
|
+ }
|
|
|
|
+ return examinationExportDtoList;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public void deleteExaminationData(Long printPlanId) {
|
|
public void deleteExaminationData(Long printPlanId) {
|