浏览代码

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 年之前
父节点
当前提交
acf37aa5ce

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

@@ -56,6 +56,7 @@ public class StudentServeServiceImpl implements StudentServeService {
         if(StringUtils.isNotBlank(monday)){
             nowDate=LocalDate.parse(monday, DateUtil.dateFormatter);
         }
+
         LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
         LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
         Date nextMonday = Date.from(sunDayDate.plusDays(1).atStartOfDay(DateUtil.zoneId).toInstant());
@@ -74,6 +75,7 @@ public class StudentServeServiceImpl implements StudentServeService {
         //本周无课学员编号集合
         Set<Integer> noClassStudentIds=new HashSet<>();
         for (Map.Entry<Integer, List<StudentServeDto>> studentCoursesEntry : studentCoursesMap.entrySet()) {
+
             List<StudentServeDto> haveCourseStudents = studentCoursesEntry.getValue().stream().filter(e -> Objects.nonNull(e.getCourseStartTime())).collect(Collectors.toList());
             if(CollectionUtils.isEmpty(haveCourseStudents)){
                 noClassStudentIds.add(studentCoursesEntry.getKey());
@@ -84,7 +86,7 @@ public class StudentServeServiceImpl implements StudentServeService {
                 noClassStudentIds.add(studentCoursesEntry.getKey());
                 continue;
             }
-            if(!nextMonday.before(studentServeDto.getCourseStartTime())){
+            if(!studentServeDto.getCourseStartTime().before(nextMonday)){
                 dontServeInCurrentWeekStudentIds.add(studentCoursesEntry.getKey());
                 continue;
             }

+ 4 - 5
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml

@@ -161,7 +161,7 @@
 		ORDER BY create_time_ DESC LIMIT 1
 	</select>
     <select id="findNoExercisesStudentsInThisWeekWithTeacher"
-            resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
+            resultType="com.ym.mec.biz.dal.dto.BasicUserDto">
 		SELECT
 			su.id_ userId,
 			su.username_ name,
@@ -169,16 +169,15 @@
 			GROUP_CONCAT(sub.name_) subjectName
 		FROM
 			student_extracurricular_exercises_situation_ sees
-			LEFT JOIN extracurricular_exercises_reply eer ON sees.student_id_ = eer.user_id_
-			AND DATE_FORMAT( eer.create_time_, '%Y-%m-%d' ) &gt;= #{startDate}
 			LEFT JOIN student stu ON stu.user_id_ = sees.student_id_
 			LEFT JOIN sys_user su ON su.id_ = sees.student_id_
 			LEFT JOIN `subject` sub ON FIND_IN_SET( sub.id_, stu.subject_id_list_ )
 		WHERE
 			sees.monday_ = #{startDate}
 			AND sees.teacher_id_ = #{teacherId}
-			AND eer.id_ IS NULL
-			<if test="search!=null">
+			AND sees.actual_exercises_num_ = 0
+			AND sees.serve_type_ = 'EXERCISE'
+		<if test="search!=null">
 				AND (su.username_ LIKE CONCAT('%', #{search}, '%') OR su.phone_ LIKE CONCAT(#{search}, '%'))
 			</if>
 		GROUP BY su.id_