Browse Source

作业接口

liujunchi 2 năm trước cách đây
mục cha
commit
b756902396

+ 101 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseHomeworkWrapper.java

@@ -1,7 +1,9 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.enums.EHomeWorkStatus;
 import com.ym.mec.biz.dal.enums.ELessonTrainingType;
+import com.ym.mec.biz.dal.enums.ImSendTypeEnum;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -52,6 +54,10 @@ public class CourseHomeworkWrapper {
 
         @ApiModelProperty(value = "作业练习状态 UNASSIGNED:未布置,ASSIGNED:已布置,DEADLINE:已截止")
         private EHomeWorkStatus homeWorkStatus;
+
+
+        @ApiModelProperty(value = "作业类型 来源(HOMEWORK,EXTRACURRICULAR,EXTRA)",required = true)
+        private ELessonTrainingType type;
     }
 
 
@@ -209,4 +215,99 @@ public class CourseHomeworkWrapper {
     }
 
 
+    @Data
+    @ApiModel(value = "WebExtraCourseHomework-课外作业列表")
+    public static class WebExtraCourseHomework {
+
+        /**  */
+        private Long id;
+
+        private String musicGroupId;
+
+        /** 老师编号 */
+        @ApiModelProperty(value="等级")
+        private Integer teacherId;
+
+        private SysUser teacher = new SysUser();
+
+        /** 学生列表 */
+        @ApiModelProperty(value="学生列表")
+        private String studentIdList;
+
+        @ApiModelProperty("班级id")
+        private Integer classGroupId;
+
+        @ApiModelProperty("作业来源分类")
+        private String groupType;
+
+        /** 批次号 */
+        @ApiModelProperty(value="批次号")
+        private String batchNo;
+
+        /** 标题 */
+        @ApiModelProperty(value="标题")
+        private String title;
+
+        /** 附件地址(多个用逗号分隔) */
+        @ApiModelProperty(value="附件地址(多个用逗号分隔)")
+        private String attachments;
+
+        /** 作业内容 */
+        @ApiModelProperty(value="作业内容")
+        private String content;
+
+        /** 截止日期 */
+        @ApiModelProperty(value="截止日期")
+        private java.util.Date expireDate;
+
+        /** 完成人数 */
+        @ApiModelProperty(value="完成人数")
+        private Integer completedNum;
+
+        /** 预计人数 */
+        @ApiModelProperty(value="预计人数")
+        private Integer expectNum;
+
+        /**  */
+        private java.util.Date createTime;
+
+        /**  */
+        private java.util.Date updateTime;
+
+        @ApiModelProperty(value="是否及时回复")
+        private int isReplied;
+
+        @ApiModelProperty(value="是否提交")
+        private int isSubmit;
+
+        private int status;
+
+        private String organName;
+
+        private ImSendTypeEnum msgType = ImSendTypeEnum.TXT;
+
+        /** 伴奏列表(多个用逗号分隔) */
+        @ApiModelProperty(value="伴奏列表(多个用逗号分隔)")
+        private String musicScoreId;
+
+        private String musicScoreName;
+
+        private List<MusicScoreSubjectDto> musicScoreSubjectDtos;
+
+
+        @ApiModelProperty("乐团名")
+        private String musicGroupName;
+
+        @ApiModelProperty("班级名")
+        private String classGroupName;
+
+
+        @ApiModelProperty("布置时间")
+        private Date assignTime;
+
+        @ApiModelProperty("练习内容")
+        private List<StudentLessonTrainingDetailWrapper.StudentLessonTrainingDetail> trainingDetailList;
+    }
+
+
 }

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/HomeworkStat.java

@@ -0,0 +1,20 @@
+package com.ym.mec.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * Description
+ *
+ * @author liujunchi
+ * @date 2023-04-06
+ */
+@Data
+public class HomeworkStat {
+
+    @ApiModelProperty("类型  HOMEWORK:作业,EXAMINATION:评测")
+    private String type;
+
+    @ApiModelProperty("是否展示  true:展示,false:不展示")
+    private boolean show;
+}

+ 34 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ExtraExercilseQueryInfo.java

@@ -43,6 +43,40 @@ public class ExtraExercilseQueryInfo extends QueryInfo {
     @ApiModelProperty("完成状态 false 未完成 true 已完成")
     private Boolean finishStatus;
 
+    @ApiModelProperty("模糊查询 乐团名称/老师")
+    private String search;
+
+    @ApiModelProperty("是否是学员布置")
+    private Boolean studentAssignFlag;
+
+    private Long studentExerciseId;
+
+    public Boolean getStudentAssignFlag() {
+        return studentAssignFlag;
+    }
+
+    public void setStudentAssignFlag(Boolean studentAssignFlag) {
+        this.studentAssignFlag = studentAssignFlag;
+    }
+
+    public Long getStudentExerciseId() {
+        return studentExerciseId;
+    }
+
+    public void setStudentExerciseId(Long studentExerciseId) {
+        this.studentExerciseId = studentExerciseId;
+    }
+
+    @Override
+    public String getSearch() {
+        return search;
+    }
+
+    @Override
+    public void setSearch(String search) {
+        this.search = search;
+    }
+
     public ELessonTrainingType getType() {
         return type;
     }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ExtracurricularExercisesReplyService.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto;
+import com.ym.mec.biz.dal.dto.CourseHomeworkWrapper;
 import com.ym.mec.biz.dal.dto.EduHomeworkCardDto;
 import com.ym.mec.biz.dal.dto.ExtraExerciseStudentsDto;
 import com.ym.mec.biz.dal.dto.StudentHomeworkRecordDto;
@@ -70,4 +71,9 @@ public interface ExtracurricularExercisesReplyService extends BaseService<Long,
      *
      */
     PageInfo<StudentHomeworkRecordDto> findStudentExtraExercisesV2(ExtraExercilseQueryInfo queryInfo);
+
+    /**
+     * 查询学生课外训练详情
+     */
+    CourseHomeworkWrapper.CourseHomeworkList findStudentExtraExerciseDetailV2(Long studentExerciseId);
 }

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

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.dto.BasicUserDto;
+import com.ym.mec.biz.dal.dto.CourseHomeworkWrapper;
 import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.dto.TeacherHomeworkListDto;
 import com.ym.mec.biz.dal.dto.WebCourseHomeworkListDto;
@@ -61,4 +62,6 @@ public interface ExtracurricularExercisesService extends BaseService<Long, Extra
      * @return
      */
     PageInfo<TeacherHomeworkListDto> findExtraExercilsesHomeworks(ExtraExercilseQueryInfo queryInfo);
+
+    PageInfo<CourseHomeworkWrapper.WebExtraCourseHomework> findExtraExercilsesV2(ExtraExercilseQueryInfo queryInfo);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentServeService.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.service;
 
+import com.ym.mec.biz.dal.dto.HomeworkStat;
 import com.ym.mec.biz.dal.dto.IndexBaseDto;
 
 import java.util.Date;
@@ -67,4 +68,11 @@ public interface StudentServeService {
 
 
     List<IndexBaseDto> musicGroupHomeworkStatWithStu(String musicGroupId, Integer studentId, String startDay, String endDay);
+
+    /**
+     * 展示按钮红点
+     *
+     * @param userId 用户id
+     */
+    List<HomeworkStat> homeworkStat(Integer userId);
 }

+ 25 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesReplyServiceImpl.java

@@ -3,11 +3,13 @@ package com.ym.mec.biz.service.impl;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto;
+import com.ym.mec.biz.dal.dto.CourseHomeworkWrapper;
 import com.ym.mec.biz.dal.dto.EduHomeworkCardDto;
 import com.ym.mec.biz.dal.dto.ExtraExerciseStudentsDto;
 import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.dto.StudentHomeworkRecordDto;
 import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.enums.EHomeWorkStatus;
 import com.ym.mec.biz.dal.enums.ELessonTrainingType;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
@@ -15,6 +17,7 @@ import com.ym.mec.biz.dal.page.ExtraExercilseQueryInfo;
 import com.ym.mec.biz.dal.page.ExtraExercilseReplyQueryInfo;
 import com.ym.mec.biz.dal.page.StudentCourseHomeWorkQueryInfo;
 import com.ym.mec.biz.service.ExtracurricularExercisesReplyService;
+import com.ym.mec.biz.service.ExtracurricularExercisesService;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.StudentServeService;
 import com.ym.mec.biz.service.SysConfigService;
@@ -65,6 +68,9 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
     @Autowired
     private ClassGroupDao classGroupDao;
 
+    @Autowired
+    private ExtracurricularExercisesService extracurricularExercisesService;
+
 	@Override
 	public BaseDAO<Long, ExtracurricularExercisesReply> getDAO() {
 		return extracurricularExercisesReplyDao;
@@ -360,4 +366,23 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
         pageInfo.setTotal(studentExtraExercises.getTotal());
         return pageInfo;
     }
+
+    @Override
+    public CourseHomeworkWrapper.CourseHomeworkList findStudentExtraExerciseDetailV2(Long studentExerciseId) {
+        ExtraExercilseQueryInfo queryInfo = new ExtraExercilseQueryInfo();
+        queryInfo.setPage(1);
+        queryInfo.setRows(1);
+        queryInfo.setStudentExerciseId(studentExerciseId);
+        PageInfo<ExtracurricularExercises> extracurricularExercisesReplyPageInfo = extracurricularExercisesService.queryPage(queryInfo);
+        if (CollectionUtils.isEmpty(extracurricularExercisesReplyPageInfo.getRows())) {
+            throw new BizException("课外训练不存在");
+        }
+        ExtracurricularExercises extracurricularExercises = extracurricularExercisesReplyPageInfo.getRows().get(0);
+
+
+
+        return null;
+
+
+    }
 }

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

@@ -1,9 +1,11 @@
 package com.ym.mec.biz.service.impl;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Lists;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
 import com.ym.mec.biz.dal.entity.ExtracurricularExercises;
 import com.ym.mec.biz.dal.entity.ExtracurricularExercisesReply;
@@ -39,6 +41,7 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 @Service
@@ -65,6 +68,9 @@ public class ExtracurricularExercisesServiceImpl extends BaseServiceImpl<Long, E
     private ClassGroupStudentMapperDao classGroupStudentMapperDao;
 
     @Autowired
+    private ClassGroupDao classGroupDao;
+
+    @Autowired
     private StudentLessonTrainingDetailService studentLessonTrainingDetailService;
 
 	@Override
@@ -351,4 +357,41 @@ public class ExtracurricularExercisesServiceImpl extends BaseServiceImpl<Long, E
 		}
 		return pageInfo;
 	}
+
+    @Override
+    public PageInfo<CourseHomeworkWrapper.WebExtraCourseHomework> findExtraExercilsesV2(ExtraExercilseQueryInfo queryInfo) {
+        PageInfo<ExtracurricularExercises> extracurricularExercisesPageInfo = this.queryPage(queryInfo);
+        List<ExtracurricularExercises> rows = extracurricularExercisesPageInfo.getRows();
+        if (CollectionUtils.isEmpty(rows)) {
+            return new PageInfo<>();
+        }
+
+        PageInfo<CourseHomeworkWrapper.WebExtraCourseHomework> convert = extracurricularExercisesPageInfo.convert(
+            o -> JSON.parseObject(JSON.toJSONString(o), CourseHomeworkWrapper.WebExtraCourseHomework.class));
+
+        List<CourseHomeworkWrapper.WebExtraCourseHomework> rows1 = convert.getRows();
+
+        // 设置班级名称
+        List<Integer> classIds = rows1.stream().map(CourseHomeworkWrapper.WebExtraCourseHomework::getClassGroupId).filter(Objects::nonNull).collect(Collectors.toList());
+        if (CollectionUtils.isEmpty(classIds)) {
+            return convert;
+        }
+
+        List<ClassGroup> classGroups = classGroupDao.queryByIds(classIds);
+
+        // 分组
+        Map<Integer, ClassGroup> classGroupMap = classGroups.stream().collect(Collectors.toMap(ClassGroup::getId, Function.identity()));
+
+        rows1.forEach(o -> {
+            if (o.getClassGroupId() == null) {
+                return;
+            }
+            ClassGroup classGroup = classGroupMap.get(o.getClassGroupId());
+            if (classGroup != null) {
+                o.setClassGroupName(classGroup.getName());
+            }
+        });
+
+        return convert;
+    }
 }

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

@@ -821,4 +821,19 @@ public class StudentServeServiceImpl implements StudentServeService {
         }
         return result;
     }
+
+    /**
+     * 展示按钮红点
+     *
+     * @param userId 用户id
+     */
+    @Override
+    public List<HomeworkStat> homeworkStat(Integer userId) {
+        List<HomeworkStat> homeworkStatList = new ArrayList<>();
+
+        // 作业按钮红点
+        // studentCourseHomeworkDao.queryNotSuccessHomeworkList(userId);
+
+        return null;
+    }
 }

+ 24 - 1
mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesMapper.xml

@@ -11,6 +11,7 @@
 		<result column="music_group_id_" property="musicGroupId" />
 		<result column="teacher_id_" property="teacherId" />
 		<result column="username_" property="teacher.username" />
+		<result column="classGroupId" property="classGroupId" />
 		<result column="student_id_list_" property="studentIdList" />
 		<result column="batch_no_" property="batchNo" />
 		<result column="title_" property="title" />
@@ -25,6 +26,7 @@
 		<result column="tenant_id_" property="tenantId" />
 		<result column="music_score_id_" property="musicScoreId" />
 		<result column="assignTime" property="assignTime" />
+		<result column="musicGroupName" property="musicGroupName" />
 	</resultMap>
 
 	<sql id="queryPageCondition">
@@ -60,6 +62,23 @@
             <if test="type != null">
                 and ee.group_type_ = #{type}
             </if>
+            <if test="search != null ">
+                and (su.username_ like '%' #{search} '%' or mg.name_ like '%' #{search} '%')
+            </if>
+            <if test="type != null">
+                and ee.group_type_ = #{type}
+            </if>
+            <if test="studentExerciseId != null">
+                and ee.id_ = #{studentExerciseId}
+            </if>
+            <if test="studentAssignFlag != null">
+                <if test="studentAssignFlag == true">
+                    and ee.music_group_id_ is null
+                </if>
+                <if test="studentAssignFlag == false">
+                    and ee.student_id_list_  is not null
+                </if>
+            </if>
 		</where>
 	</sql>
 	
@@ -128,10 +147,12 @@
 	<select id="queryPage" resultMap="ExtracurricularExercises" parameterType="map">
 		SELECT ee.id_,ee.teacher_id_,ee.student_id_list_,ee.batch_no_,ee.title_,ee.attachments_,ee.music_group_id_,
 		       ee.content_,ee.expire_date_,ee.completed_num_,ee.expect_num_,ee.create_time_,ee.update_time_,ee.tenant_id_
-		     ,u.real_name_ username_,o.name_ organ_name_,eer.music_score_id_,ee.create_time_ as assignTime
+		     ,u.real_name_ username_,o.name_ organ_name_,eer.music_score_id_,ee.create_time_ as assignTime,mg.name_ as musicGroupName,ee.class_group_id_ as classGroupId
 		FROM extracurricular_exercises ee LEFT JOIN sys_user u ON ee.teacher_id_ = u.id_
 		LEFT JOIN teacher t ON t.id_ = ee.teacher_id_
+        left join sys_user su on t.id_ = su.id_
 		LEFT JOIN organization o ON o.id_ = t.organ_id_
+        left join music_group mg on mg.id_ = ee.music_group_id_
 		LEFT JOIN extracurricular_exercises_reply eer ON ee.id_ = eer.extracurricular_exercises_id_
 		<include refid="queryPageCondition"/>
 		GROUP BY ee.id_
@@ -142,7 +163,9 @@
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(DISTINCT ee.id_) FROM extracurricular_exercises ee left join sys_user u on ee.teacher_id_ = u.id_
 		left join teacher t on t.id_ = ee.teacher_id_
+        left join sys_user su on t.id_ = su.id_
 		left join organization o on o.id_ = t.organ_id_
+        left join music_group mg on mg.id_ = ee.music_group_id_
 		LEFT JOIN extracurricular_exercises_reply eer ON ee.id_ = eer.extracurricular_exercises_id_
 		<include refid="queryPageCondition"/>
 	</select>

+ 21 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/page/PageInfo.java

@@ -7,10 +7,15 @@
  */
 package com.ym.mec.common.page;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.function.Function;
+
+import static java.util.stream.Collectors.toList;
 
 /**
  * 分页对象
@@ -161,4 +166,20 @@ public class PageInfo<T> implements Serializable {
 		this.footer = footer;
 	}
 
+
+    /**
+     * <p>
+     * IPage 的泛型转换
+     * </p>
+     *
+     * @param mapper 转换函数
+     * @param <R>    转换后的泛型
+     * @return 转换泛型后的 IPage
+     */
+    @SuppressWarnings("unchecked")
+    public  <R> PageInfo<R> convert(Function<? super T, ? extends R> mapper) {
+        List<R> collect = this.getRows().stream().map(mapper).collect(toList());
+        ((PageInfo<R>) this).setRows(collect);
+        return (PageInfo<R>) this;
+    }
 }

+ 14 - 0
mec-student/src/main/java/com/ym/mec/student/controller/StudentCourseHomeworkController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.student.controller;
 
 import com.ym.mec.biz.dal.dto.CourseHomeworkWrapper;
+import com.ym.mec.biz.dal.dto.HomeworkStat;
 import com.ym.mec.biz.dal.dto.StudentHomeworkRecordDto;
 import com.ym.mec.biz.dal.entity.ExtracurricularExercisesReply;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
@@ -22,6 +23,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 /**
  * @Author Joburgess
  * @Date 2019/9/18
@@ -151,4 +154,15 @@ public class StudentCourseHomeworkController extends BaseController {
         return succeed(studentServeService.musicGroupHomeworkStatWithStu(musicGroupId, sysUserService.getUserId(), startDay, endDay));
     }
 
+
+
+    @ApiOperation(value = "学生端-乐团作业情况")
+    @GetMapping("/homeworkStat")
+    public HttpResponseResult<List<HomeworkStat>> homeworkStat() {
+
+        Integer userId = sysUserService.getUserId();
+
+        return succeed(studentServeService.homeworkStat(userId));
+    }
+
 }

+ 1 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseHomeworkController.java

@@ -144,7 +144,7 @@ public class CourseHomeworkController extends BaseController {
 
     @ApiOperation(value = "获取作业详情")
     @GetMapping(value = "/findCourseHomeworkDetail")
-    public HttpResponseResult<CourseHomeworkWrapper.CourseHomeworkList> findCourseHomeworkDetail(Integer courseScheduleId){
+    public HttpResponseResult<CourseHomeworkWrapper.CourseHomeworkList> findCourseHomeworkDetail(Integer courseScheduleId,ELessonTrainingType type){
 
         return succeed(courseHomeworkService.findCourseHomeworkDetail(courseScheduleId));
     }

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

@@ -79,6 +79,17 @@ public class ExtracurricularExercisesController extends BaseController {
         return succeed(studentExtracurricularExercisesSituationService.queryTeacherServeHomeworkDetailV2(queryInfo));
     }
 
+    @ApiOperation(value = "获取教师有服务指标的课程列表")
+    @GetMapping("/queryTeacherExtraHomeworkDetail/v2")
+    public HttpResponseResult<PageInfo<CourseHomeworkWrapper.CourseHomeworkList>> queryTeacherExtraHomeworkDetailV2(CourseHomeworkWrapper.CourseHomeworkQuery queryInfo) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        queryInfo.setTeacherId(sysUser.getId());
+        return succeed(studentExtracurricularExercisesSituationService.queryTeacherServeHomeworkDetailV2(queryInfo));
+    }
+
 
     @ApiOperation(value = "获取老师训练统计")
     @GetMapping("/getStatistics")

+ 21 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ExtracurricularExercisesController.java

@@ -1,11 +1,15 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.dto.CourseHomeworkWrapper;
+import com.ym.mec.biz.dal.dto.WebCourseHomeworkListDto;
+import com.ym.mec.biz.dal.entity.ExtracurricularExercises;
 import com.ym.mec.biz.dal.page.ExtraExercilseQueryInfo;
 import com.ym.mec.biz.service.ExtracurricularExercisesReplyService;
 import com.ym.mec.biz.service.ExtracurricularExercisesService;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.page.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,4 +46,21 @@ public class ExtracurricularExercisesController extends BaseController {
         }
         return succeed(extracurricularExercisesReplyService.findStudentExtraExerciseDetail(studentExerciseId));
     }
+
+
+    @ApiOperation(value = "获取课外训练列表")
+    @GetMapping("/queryPageList/v2")
+    private HttpResponseResult<PageInfo<CourseHomeworkWrapper.WebExtraCourseHomework>> findExtraExercilsesV2(ExtraExercilseQueryInfo queryInfo){
+        queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(queryInfo.getOrganIdList()));
+        return succeed(extracurricularExercisesService.findExtraExercilsesV2(queryInfo));
+    }
+
+    @ApiOperation(value = "获取课外训练详情")
+    @GetMapping("/findStudentExtraExerciseDetail/v2")
+    private HttpResponseResult<CourseHomeworkWrapper.CourseHomeworkList> findStudentExtraExerciseDetailV2(Long studentExerciseId){
+        if(Objects.isNull(studentExerciseId)){
+            return failed("请选择课外训练");
+        }
+        return succeed(extracurricularExercisesReplyService.findStudentExtraExerciseDetailV2(studentExerciseId));
+    }
 }