yonge 2 years ago
parent
commit
1820aba50d

+ 15 - 15
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServeServiceImpl.java

@@ -447,13 +447,13 @@ public class StudentServeServiceImpl implements StudentServeService {
         List<StudentExtracurricularExercisesSituation> results=new ArrayList<StudentExtracurricularExercisesSituation>();
         
         Map<Integer,Map<Integer,Set<Long>>> studentTeacherCourseMap = new HashMap<Integer, Map<Integer,Set<Long>>>();
-        Map<Integer,Map<Integer,Set<Long>>> studentTeacherNotOverCourseMap = new HashMap<Integer, Map<Integer,Set<Long>>>();
+        //Map<Integer,Map<Integer,Set<Long>>> studentTeacherNotOverCourseMap = new HashMap<Integer, Map<Integer,Set<Long>>>();
         //Map<Integer,Map<Integer,Integer>> studentTeacherCourseNumMap = new HashMap<Integer, Map<Integer,Integer>>();
 		
-		Map<Integer, Set<Long>> teacherCourseMap = null;
-		Map<Integer, Set<Long>> teacherNotOverCourseMap = null;
+		//Map<Integer, Set<Long>> teacherCourseMap = null;
+		//Map<Integer, Set<Long>> teacherNotOverCourseMap = null;
 		Integer teacherId = null;
-		Set<Long> courseIdList = null;
+		//Set<Long> courseIdList = null;
 		ClassGroupTypeEnum teacherType;
 		//Map<Integer,Integer> teacherCourseNumMap = null;
 		List<Integer> musicGroupStudentIdList = null;
@@ -515,7 +515,7 @@ public class StudentServeServiceImpl implements StudentServeService {
 					studentServeCourseDto = userCourseMap.get(studentId);
 					teacherId = studentServeCourseDto.getActualTeacherId();
 					
-					teacherCourseMap = studentTeacherCourseMap.get(studentId);
+					/*teacherCourseMap = studentTeacherCourseMap.get(studentId);
 					if(teacherCourseMap == null){
 						teacherCourseMap = new HashMap<Integer, Set<Long>>();
 					}
@@ -525,29 +525,29 @@ public class StudentServeServiceImpl implements StudentServeService {
 					}
 					courseIdList.add(studentServeCourseDto.getCourseScheduleId());
 					teacherCourseMap.put(teacherId, courseIdList);
-					studentTeacherCourseMap.put(studentId, teacherCourseMap);
+					studentTeacherCourseMap.put(studentId, teacherCourseMap);*/
 					
 					studentExtracurricularExercisesSituation = new StudentExtracurricularExercisesSituation(musicGroupId, studentId, teacherId,
 							nowDate.get(DateUtil.weekFields.weekOfYear()), DateUtil.stringToDate(monDayDate.toString(), "yyyy-MM-dd"), DateUtil.stringToDate(
-									sunDayDate.toString(), "yyyy-MM-dd"), "HOMEWORK", StringUtils.join(courseIdList, ","));
-                    studentExtracurricularExercisesSituation.setExpectExercisesNum(courseIdList.size());
+									sunDayDate.toString(), "yyyy-MM-dd"), "HOMEWORK", studentServeCourseDto.getCourseScheduleId() + "");
+                    studentExtracurricularExercisesSituation.setExpectExercisesNum(1);
                     
-                    teacherNotOverCourseMap = studentTeacherNotOverCourseMap.get(studentId);
+                    /*teacherNotOverCourseMap = studentTeacherNotOverCourseMap.get(studentId);
 					if(teacherNotOverCourseMap == null){
 						teacherNotOverCourseMap = new HashMap<Integer, Set<Long>>();
 					}
 					courseIdList = teacherNotOverCourseMap.get(teacherId);
 					if(courseIdList == null){
 						courseIdList = new HashSet<Long>();
-					}
+					}*/
                     if(studentServeCourseDto.getStatus() != CourseStatusEnum.OVER){
-    					courseIdList.add(studentServeCourseDto.getCourseScheduleId());
-    					teacherNotOverCourseMap.put(teacherId, courseIdList);
-    					studentTeacherNotOverCourseMap.put(studentId, teacherCourseMap);
+
+                        studentExtracurricularExercisesSituation.setNotOverCourseIds(studentServeCourseDto.getCourseScheduleId() + "");
+                        studentExtracurricularExercisesSituation.setNotOverCourseNum(1);
+    					//teacherNotOverCourseMap.put(teacherId, courseIdList);
+    					//studentTeacherNotOverCourseMap.put(studentId, teacherCourseMap);
                     }
                     
-                    studentExtracurricularExercisesSituation.setNotOverCourseIds(StringUtils.join(courseIdList, ","));
-                    studentExtracurricularExercisesSituation.setNotOverCourseNum(courseIdList.size());
 					if(results.contains(studentExtracurricularExercisesSituation)){
 						results.remove(studentExtracurricularExercisesSituation);
 					}