瀏覽代碼

1、恢复休学时返回默认教师

Joburgess 5 年之前
父節點
當前提交
325aeeddb1

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupStudentSignDto.java

@@ -16,6 +16,17 @@ public class MusicGroupStudentSignDto{
     @ApiModelProperty(value = "课程名称",required = false)
     private String courseScheduleName;
 
+    @ApiModelProperty(value = "班级名称",required = false)
+    private String classGroupName;
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
     public String getName() {
         return name;
     }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentSignQueryInfo.java

@@ -23,6 +23,17 @@ public class StudentSignQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "乐团编号",required = false)
     private String musicGroupId;
 
+    @ApiModelProperty(value = "班级编号")
+    private Integer classGroupId;
+
+    public Integer getClassGroupId() {
+        return classGroupId;
+    }
+
+    public void setClassGroupId(Integer classGroupId) {
+        this.classGroupId = classGroupId;
+    }
+
     public String getStartTime() {
         return startTime;
     }

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

@@ -390,6 +390,9 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 
 	@Override
 	public TeacherSignOutDto getTeacherSignDetail(Integer courseScheduleId, Integer userId) {
+		if(Objects.isNull(courseScheduleId)){
+			throw new BizException("请指定课程");
+		}
 		TeacherSignOutDto teacherSignDetail = new TeacherSignOutDto();
 		TeacherAttendance teacherAttendanceInfo = teacherAttendanceDao.findByTeacherAttendanceInfo(userId.longValue(), courseScheduleId.longValue());
 		teacherSignDetail.setTeacherAttendanceInfo(teacherAttendanceInfo);

+ 6 - 1
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -455,12 +455,14 @@
         <result property="name" column="real_name_"/>
         <result property="signStatus" column="status_"/>
         <result property="courseScheduleName" column="name_"/>
+        <result property="classGroupName" column="class_group_name_"/>
     </resultMap>
     <select id="queryMusicGroupStudentsSign" resultMap="MusicGroupStudentSignDto">
-        SELECT sa.create_time_,su.username_ real_name_,sa.status_,cs.name_
+        SELECT sa.create_time_,su.username_ real_name_,sa.status_,cs.name_,cg.name_ class_group_name_
         FROM student_attendance sa
         LEFT JOIN sys_user su ON sa.user_id_ = su.id_
         LEFT JOIN course_schedule cs ON sa.course_schedule_id_ = cs.id_
+        LEFT JOIN class_group cg ON sa.class_group_id_=cg.id_
         <include refid="queryMusicGroupStudentsSignSql"/>
         <include refid="global.limit"/>
     </select>
@@ -486,6 +488,9 @@
             <if test="userName != null">
                 AND su.username_ LIKE CONCAT('%',#{userName},'%')
             </if>
+            <if test="classGroupId != null">
+                AND sa.class_group_id_ = #{classGroupId}
+            </if>
         </where>
     </sql>
 

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

@@ -100,7 +100,7 @@ public class TeacherCourseScheduleController extends BaseController {
     @GetMapping("/getCurrentCourseDetail")
     public Object getCurrentCourseDetail(Long courseID){
         if(Objects.isNull(courseID)){
-            return failed(HttpStatus.FORBIDDEN, "请指定课程!");
+            return failed("请指定课程!");
         }
         return succeed(scheduleService.getCurrentCourseDetail(courseID));
     }

+ 1 - 2
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupManageController.java

@@ -24,7 +24,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
@@ -286,7 +285,7 @@ public class VipGroupManageController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('vipGroupManage/classStartDateAdjust')")
     public Object classStartDateAdjust(ClassDateAdjustDto classDateAdjustDto){
         if(Objects.isNull(classDateAdjustDto.getId())){
-            return failed(HttpStatus.FORBIDDEN, "请指定课程!");
+            return failed( "请指定课程!");
         }
         CourseSchedule courseSchedule = scheduleService.get(classDateAdjustDto.getId());
         if(Objects.isNull(classDateAdjustDto.getClassGroupId())){