Jelajahi Sumber

乐团档案作业布置调整

zouxuan 4 tahun lalu
induk
melakukan
9596741621

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ExtracurricularExercisesDao.java

@@ -39,6 +39,7 @@ public interface ExtracurricularExercisesDao extends BaseDAO<Long, Extracurricul
                                                                     @Param("musicGroupId") String musicGroupId,
                                                                     @Param("classGroupId") Long classGroupId,
                                                                     @Param("subjectId") Integer subjectId,
-                                                                    @Param("search") String search);
+                                                                    @Param("search") String search,
+                                                                    @Param("hasMember") Integer hasMember);
 
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/ExtracurricularExercisesService.java

@@ -36,7 +36,7 @@ public interface ExtracurricularExercisesService extends BaseService<Long, Extra
      * @param search:
      * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
      */
-    List<BasicUserDto> getDontServeStudents(Integer teacherId, String search, String musicGroupId,Long classGroupId,Integer subjectId);
+    List<BasicUserDto> getDontServeStudents(Integer teacherId, String search, String musicGroupId,Long classGroupId,Integer subjectId,Integer hasMember);
 
     /**
      * @describe 应布置课外训练提醒

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesServiceImpl.java

@@ -168,10 +168,10 @@ public class ExtracurricularExercisesServiceImpl extends BaseServiceImpl<Long, E
 	}
 
 	@Override
-	public List<BasicUserDto> getDontServeStudents(Integer teacherId, String search, String musicGroupId,Long classGroupId,Integer subjectId) {
+	public List<BasicUserDto> getDontServeStudents(Integer teacherId, String search, String musicGroupId,Long classGroupId,Integer subjectId,Integer hasMember) {
 		LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
 		LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
-		return extracurricularExercisesDao.findNoExercisesStudentsInThisWeekWithTeacher(teacherId, monDayDate.toString(), musicGroupId, classGroupId, subjectId, search);
+		return extracurricularExercisesDao.findNoExercisesStudentsInThisWeekWithTeacher(teacherId, monDayDate.toString(), musicGroupId, classGroupId, subjectId, search,hasMember);
 	}
 
 	@Override

+ 8 - 0
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml

@@ -182,6 +182,14 @@
 			AND sees.teacher_id_ = #{teacherId}
 			AND sees.actual_exercises_num_ &lt; sees.expect_exercises_num_
 			AND sees.serve_type_ = 'EXERCISE'
+			<if test="hasMember != null">
+				<if test="hasMember == 1">
+					AND stu.member_rank_setting_id_ IS NOT NULL
+				</if>
+				<if test="hasMember == 0">
+					AND stu.member_rank_setting_id_ IS NULL
+				</if>
+			</if>
 			<if test="musicGroupId!=null and musicGroupId!=''">
 				AND sr.music_group_id_=#{musicGroupId}
 			</if>

+ 4 - 4
mec-teacher/src/main/java/com/ym/mec/teacher/controller/ExtracurricularExercisesController.java

@@ -86,12 +86,12 @@ public class ExtracurricularExercisesController extends BaseController {
 
     @ApiOperation(value = "获取待布置学员列表")
     @GetMapping("/getDontServeStudents")
-    public HttpResponseResult getDontServeStudents(String search, String musicGroupId, Long classGroupId, Integer subjectId){
+    public HttpResponseResult getDontServeStudents(String search, String musicGroupId, Long classGroupId, Integer subjectId,Integer hasMember){
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if(Objects.isNull(sysUser)){
             return failed(HttpStatus.FORBIDDEN,"请登录");
         }
-        return succeed(extracurricularExercisesService.getDontServeStudents(sysUser.getId(), search, musicGroupId, classGroupId, subjectId));
+        return succeed(extracurricularExercisesService.getDontServeStudents(sysUser.getId(), search, musicGroupId, classGroupId, subjectId,hasMember));
     }
 
     @ApiOperation(value = "获取待布置学员乐团列表")
@@ -101,7 +101,7 @@ public class ExtracurricularExercisesController extends BaseController {
         if(Objects.isNull(sysUser)){
             return failed(HttpStatus.FORBIDDEN,"请登录");
         }
-        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUser.getId(), search, null, null,null);
+        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUser.getId(), search, null, null,null,null);
         if(CollectionUtils.isEmpty(dontServeStudents)){
             return succeed(Collections.emptyList());
         }
@@ -118,7 +118,7 @@ public class ExtracurricularExercisesController extends BaseController {
             return failed(HttpStatus.FORBIDDEN,"请登录");
         }
         Map<String, Object> result = new HashMap<>();
-        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUser.getId(), null, null, null, null);
+        List<BasicUserDto> dontServeStudents = extracurricularExercisesService.getDontServeStudents(sysUser.getId(), null, null, null, null,null);
         if(CollectionUtils.isEmpty(dontServeStudents)){
             result.put("musicGroups", Collections.emptyList());
             result.put("classGroups", Collections.emptyList());