|
@@ -10,10 +10,7 @@ import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
|
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
|
|
|
import com.ym.mec.biz.dal.page.*;
|
|
|
-import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
-import com.ym.mec.biz.service.StudentAttendanceService;
|
|
|
-import com.ym.mec.biz.service.SysConfigService;
|
|
|
-import com.ym.mec.biz.service.SysTenantConfigService;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
@@ -29,10 +26,12 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.MediaType;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @Author Joburgess
|
|
@@ -56,6 +55,9 @@ public class TeacherCourseScheduleController extends BaseController {
|
|
|
@Autowired
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SubjectService subjectService;
|
|
|
+
|
|
|
@ApiOperation(value = "根据月份获取该月有课的日期")
|
|
|
@GetMapping("/getCourseScheduleDateByMonth")
|
|
|
public Object getCourseScheduleDateByMonth(@ApiParam(value = "月份", required = true) @RequestParam Date month,
|
|
@@ -384,7 +386,24 @@ public class TeacherCourseScheduleController extends BaseController {
|
|
|
@PostMapping("/studyStandardList")
|
|
|
@AuditLogAnnotation(operateName = "学员学习标准列表")
|
|
|
public HttpResponseResult studyStandardList(EvaluateCourseQueryInfo queryInfo){
|
|
|
- return succeed(scheduleService.studyStandardList(queryInfo));
|
|
|
+ PageInfo<StudentStandardDto> studentStandardDtoPageInfo = scheduleService.studyStandardList(queryInfo);
|
|
|
+ List<StudentStandardDto> courseStudents = studentStandardDtoPageInfo.getRows();
|
|
|
+ // 乐团声部为空,取student的声部
|
|
|
+ if (!CollectionUtils.isEmpty(courseStudents)) {
|
|
|
+ Set<Long> collect = courseStudents.stream().map(o -> o.getUserId()).map(o -> o.longValue()).collect(Collectors.toSet());
|
|
|
+
|
|
|
+ Map<Integer, StudentSubjectDto> subjectDtoMap = subjectService.getSubjectByStudentId(collect);
|
|
|
+ courseStudents.forEach(studentAttendanceViewDto -> {
|
|
|
+ if (studentAttendanceViewDto.getSubjectId() == null) {
|
|
|
+ StudentSubjectDto subjectDto = subjectDtoMap.getOrDefault(studentAttendanceViewDto.getUserId(), new StudentSubjectDto());
|
|
|
+ if (subjectDto.getSubjectId() != null) {
|
|
|
+ studentAttendanceViewDto.setSubjectName(subjectDto.getSubjectName());
|
|
|
+ studentAttendanceViewDto.setSubjectId(subjectDto.getSubjectId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return succeed(studentStandardDtoPageInfo);
|
|
|
}
|
|
|
|
|
|
|