|  | @@ -43,49 +43,34 @@ public class StudentLessonExaminationDetailServiceImpl extends ServiceImpl<Stude
 | 
	
		
			
				|  |  |          for (StudentLessonExaminationSaveDto dto : studentLessonExaminationSaveDtos) {
 | 
	
		
			
				|  |  |              String[] studentIds = dto.getStudentIds().split(",");
 | 
	
		
			
				|  |  |              List<LessonExaminationDetailDto> detailDtos = dto.getExaminationDetailDtos();
 | 
	
		
			
				|  |  | -            if (CollectionUtils.isEmpty(detailDtos) && StringUtils.isEmpty(dto.getMemo())) {
 | 
	
		
			
				|  |  | +            if (CollectionUtils.isEmpty(detailDtos)) {
 | 
	
		
			
				|  |  |                  throw new BizException("有部分声部未设置作业内容");
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            if (CollectionUtils.isEmpty(detailDtos)) {
 | 
	
		
			
				|  |  | -//                throw new BizException("有部分声部未选择曲目");
 | 
	
		
			
				|  |  | -                for (String id : studentIds) {
 | 
	
		
			
				|  |  | -                    Integer studentId = Integer.parseInt(id);
 | 
	
		
			
				|  |  | -                    for (int i = 0; i < 4; i++) {
 | 
	
		
			
				|  |  | -                        StudentLessonExaminationDetail studentLessonExaminationDetail = new StudentLessonExaminationDetail();
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setUserId(studentId);
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setMemo(dto.getMemo());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setLessonExaminationId(lessonExaminationId);
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setGroup(dto.getGroup());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setType("DESCRIPTION");
 | 
	
		
			
				|  |  | -                        detailList.add(studentLessonExaminationDetail);
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  | -            } else {
 | 
	
		
			
				|  |  | -                for (String id : studentIds) {
 | 
	
		
			
				|  |  | -                    Integer studentId = Integer.parseInt(id);
 | 
	
		
			
				|  |  | -                    Integer score = 100 / detailDtos.size();
 | 
	
		
			
				|  |  | -                    Integer subScore = 100 - score * detailDtos.size();
 | 
	
		
			
				|  |  | -                    for (int i = 0; i < detailDtos.size(); i++) {
 | 
	
		
			
				|  |  | -                        LessonExaminationDetailDto vo = detailDtos.get(i);
 | 
	
		
			
				|  |  | -                        StudentLessonExaminationDetail studentLessonExaminationDetail = new StudentLessonExaminationDetail();
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setUserId(studentId);
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setMemo(dto.getMemo());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setLessonExaminationId(lessonExaminationId);
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setMusicScoreId(vo.getMusicScoreId());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setHeardLevel(vo.getHeardLevel());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setStandardScore(vo.getScore());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setStart(vo.getStart());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setType("MUSIC_SCORE");
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setEnd(vo.getEnd());
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setGroup(dto.getGroup());
 | 
	
		
			
				|  |  | -                        if (i == 0) {
 | 
	
		
			
				|  |  | -                            studentLessonExaminationDetail.setAvgScore(score + subScore);
 | 
	
		
			
				|  |  | -                        } else {
 | 
	
		
			
				|  |  | -                            studentLessonExaminationDetail.setAvgScore(score);
 | 
	
		
			
				|  |  | -                        }
 | 
	
		
			
				|  |  | -                        studentLessonExaminationDetail.setPartIndex(vo.getPartIndex());
 | 
	
		
			
				|  |  | -                        detailList.add(studentLessonExaminationDetail);
 | 
	
		
			
				|  |  | +            for (String id : studentIds) {
 | 
	
		
			
				|  |  | +                Integer studentId = Integer.parseInt(id);
 | 
	
		
			
				|  |  | +                Integer score = 100 / detailDtos.size();
 | 
	
		
			
				|  |  | +                Integer subScore = 100 - score * detailDtos.size();
 | 
	
		
			
				|  |  | +                for (int i = 0; i < detailDtos.size(); i++) {
 | 
	
		
			
				|  |  | +                    LessonExaminationDetailDto vo = detailDtos.get(i);
 | 
	
		
			
				|  |  | +                    StudentLessonExaminationDetail studentLessonExaminationDetail = new StudentLessonExaminationDetail();
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setUserId(studentId);
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setMemo(dto.getMemo());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setLessonExaminationId(lessonExaminationId);
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setMusicScoreId(vo.getMusicScoreId());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setHeardLevel(vo.getHeardLevel());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setStandardScore(vo.getScore());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setStart(vo.getStart());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setType(vo.getType());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setDesc(vo.getDesc());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setEnd(vo.getEnd());
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setGroup(dto.getGroup());
 | 
	
		
			
				|  |  | +                    if (i == 0) {
 | 
	
		
			
				|  |  | +                        studentLessonExaminationDetail.setAvgScore(score + subScore);
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        studentLessonExaminationDetail.setAvgScore(score);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | +                    studentLessonExaminationDetail.setPartIndex(vo.getPartIndex());
 | 
	
		
			
				|  |  | +                    detailList.add(studentLessonExaminationDetail);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 |