浏览代码

新增训练说明

zouxuan 5 月之前
父节点
当前提交
c4c9507c06

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/LessonExaminationResultDto.java

@@ -57,5 +57,8 @@ public class LessonExaminationResultDto{
 
     @ApiModelProperty(value = "学员姓名")
     private String studentNames;
+
+    @ApiModelProperty("作业分组")
+    private Integer group;
 }
 

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentLessonExaminationDetailDto.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.dal.dto;
 
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.ym.mec.biz.dal.enums.HardLevelEnum;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -59,5 +60,8 @@ public class StudentLessonExaminationDetailDto {
 
     private String memo;
 
+    @ApiModelProperty("作业分组")
+    private Integer group;
+
 }
 

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentLessonExaminationDto.java

@@ -40,5 +40,8 @@ public class StudentLessonExaminationDto {
 
     @ApiModelProperty(value = "声部")
     private String subjectName;
+
+    @ApiModelProperty("作业分组")
+    private Integer group;
 }
 

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentLessonExaminationDto1.java

@@ -33,6 +33,9 @@ public class StudentLessonExaminationDto1 {
     @ApiModelProperty(value = "训练时间")
     private Date trainingTime;
 
+    @ApiModelProperty("作业分组")
+    private Integer group;
+
     private List<StudentLessonExaminationDetailDto1> detailDtos;
 }
 

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentLessonExamination.java

@@ -47,6 +47,10 @@ public class StudentLessonExamination {
     @ApiModelProperty(value = "声部")
     private Integer subjectId;
 
+    @ApiModelProperty("作业分组")
+    @TableField("group_")
+    private Integer group;
+
     @TableField("create_time_")
     @ApiModelProperty(value = "创建时间")
     private Date createTime;

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentLessonExaminationServiceImpl.java

@@ -63,6 +63,7 @@ public class StudentLessonExaminationServiceImpl extends ServiceImpl<StudentLess
             for (String studentId : studentIds) {
                 StudentLessonExamination studentLessonExamination = new StudentLessonExamination();
                 studentLessonExamination.setLessonExaminationId(lessonExaminationId);
+                studentLessonExamination.setGroup(dto.getGroup());
                 Integer parseInt = Integer.parseInt(studentId);
                 studentIdList.add(parseInt);
                 studentLessonExamination.setUserId(parseInt);

+ 4 - 3
mec-biz/src/main/resources/config/mybatis/StudentLessonExaminationDetailMapper.xml

@@ -17,6 +17,7 @@
         <result column="part_index_" property="partIndex"/>
         <result column="training_time_" property="trainingTime"/>
         <result column="memo_" property="memo"/>
+        <result column="group_" property="group"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
     </resultMap>
@@ -24,18 +25,18 @@
     <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
             parameterType="com.ym.mec.biz.dal.entity.StudentLessonExaminationDetail">
         insert into student_lesson_examination_detail(user_id_, lesson_examination_id_, music_score_id_, heard_level_,standard_score_,
-                                                      avg_score_, part_index_,start_,end_,memo_)
+                                                      avg_score_, part_index_,start_,end_,memo_,group_)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.userId}, #{entity.lessonExaminationId},#{entity.musicScoreId}, #{entity.heardLevel,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-             #{entity.standardScore}, #{entity.avgScore},#{entity.partIndex},#{entity.start},#{entity.end},#{entity.memo})
+             #{entity.standardScore}, #{entity.avgScore},#{entity.partIndex},#{entity.start},#{entity.end},#{entity.memo},#{entity.group})
         </foreach>
     </insert>
     <select id="queryAll" resultType="com.ym.mec.biz.dal.dto.StudentLessonExaminationDetailDto">
         select sms.name_ musicScoreName,sled.id_ studentLessonExaminationDetailId, sled.user_id_ userId, sled.lesson_examination_id_ lessonExaminationId, sled.music_score_id_ musicScoreId,
                sled.heard_level_ heardLevel, sled.training_score_ trainingScore,sled.avg_score_ avgScore, sled.actual_avg_score_ actualAvgScore, sled.start_ start, sled.end_ end,
                sled.standard_score_ standardScore, sled.part_index_ partIndex,CASE WHEN sled.training_time_ IS NULL THEN 0 ELSE 1 END trainingFlag,
-               sms.del_flag_ = 0 AND sms.show_flag_ = 1 validFlag,sled.memo_ memo
+               sms.del_flag_ = 0 AND sms.show_flag_ = 1 validFlag,sled.memo_ memo,sled.group_ 'group'
         from student_lesson_examination_detail sled
         left join sys_music_score sms ON sms.id_ = sled.music_score_id_
         <where>

+ 6 - 4
mec-biz/src/main/resources/config/mybatis/StudentLessonExaminationMapper.xml

@@ -9,16 +9,17 @@
         <result column="training_time_" property="trainingTime"/>
         <result column="training_flag_" property="trainingFlag"/>
         <result column="subject_id_" property="subjectId"/>
+        <result column="group_" property="group"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
     </resultMap>
 
     <insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
             parameterType="com.ym.mec.biz.dal.entity.StudentLessonExamination">
-        insert into student_lesson_examination(user_id_, lesson_examination_id_,subject_id_)
+        insert into student_lesson_examination(user_id_, lesson_examination_id_,subject_id_,group_)
         values
         <foreach collection="entities" item="entity" separator=",">
-            (#{entity.userId}, #{entity.lessonExaminationId}, #{entity.subjectId})
+            (#{entity.userId}, #{entity.lessonExaminationId}, #{entity.subjectId},#{entity.group})
         </foreach>
     </insert>
     <update id="updateTrainingScore">
@@ -53,7 +54,7 @@
     <select id="queryPage" resultType="com.ym.mec.biz.dal.dto.StudentLessonExaminationDto">
         select su.avatar_ avatar,su.username_ username,sle.training_time_ trainingTime,sle.training_score_ trainingScore,
                CASE WHEN s.membership_end_time_ > NOW() THEN 1 ELSE 0 END memberFlag,sle.training_flag_ trainingFlag,
-               sle.user_id_ userId,sle.lesson_examination_id_ lessonExaminationId,sb.name_ subjectName
+               sle.user_id_ userId,sle.lesson_examination_id_ lessonExaminationId,sb.name_ subjectName,sle.group_ 'group'
         from student_lesson_examination sle
         left join student s ON s.user_id_ = sle.user_id_
         left join subject sb ON s.subject_id_list_ = sb.id_
@@ -74,6 +75,7 @@
         <result property="username" column="username_"/>
         <result property="trainingScore" column="trainingScore"/>
         <result property="trainingTime" column="training_time_"/>
+        <result property="group" column="group_"/>
         <collection property="detailDtos" ofType="com.ym.mec.biz.dal.dto.StudentLessonExaminationDetailDto1">
             <result property="standardScore" column="standard_score_"/>
             <result property="trainingScore" column="training_score_"/>
@@ -86,7 +88,7 @@
     <select id="queryStudentPage" resultMap="StudentLessonExaminationDtoMap">
         select sle.user_id_,su.username_,su.phone_,sb.name_ subjectName,sle.training_score_ trainingScore,
                sms.name_ musicScoreName,sled.actual_avg_score_,sled.standard_score_,sled.training_score_,
-               sled.avg_score_,sled.heard_level_,sle.training_time_
+               sled.avg_score_,sled.heard_level_,sle.training_time_,sle.group_
         from student_lesson_examination sle
         left join student_lesson_examination_detail sled ON sled.lesson_examination_id_ = sle.lesson_examination_id_ AND sled.user_id_ = sle.user_id_
         left join sys_music_score sms ON sms.id_ = sled.music_score_id_