Selaa lähdekoodia

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

yonge 5 vuotta sitten
vanhempi
commit
247d7e0c2a

+ 3 - 0
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/core/filter/PhoneLoginAuthenticationFilter.java

@@ -4,6 +4,7 @@ import com.ym.mec.auth.api.dto.SysUserInfo;
 import com.ym.mec.auth.config.token.PhoneAuthenticationToken;
 import com.ym.mec.auth.service.SysUserService;
 import com.ym.mec.common.security.SecurityConstants;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.security.authentication.AbstractAuthenticationToken;
 import org.springframework.security.authentication.AuthenticationServiceException;
 import org.springframework.security.authentication.LockedException;
@@ -54,6 +55,8 @@ public class PhoneLoginAuthenticationFilter extends AbstractAuthenticationProces
 		String clientId = request.getParameter(clientIdParameter).toUpperCase();
 		if (userInfo == null) {
 			userInfo = sysUserService.initUser(principal,clientId,isRegister,isLessee);
+		}else if(StringUtils.isNotEmpty(isLessee)){
+			throw new LockedException("用户已存在");
 		}
 		if("EDUCATION".equals(clientId)){
 			clientId = "SYSTEM";

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

@@ -114,6 +114,9 @@ public class CourseReviewDto {
     @ApiModelProperty(value = "乐理Str",required = false)
     private String musicTheoryStr;
 
+    @ApiModelProperty(value = "作业是否回复",required = false)
+    private String homeWorkReplied;
+
     public Integer getOrganId() {
         return organId;
     }
@@ -401,4 +404,12 @@ public class CourseReviewDto {
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
+
+    public String getHomeWorkReplied() {
+        return homeWorkReplied;
+    }
+
+    public void setHomeWorkReplied(String homeWorkReplied) {
+        this.homeWorkReplied = homeWorkReplied;
+    }
 }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherHomeworkListDto.java

@@ -46,6 +46,16 @@ public class TeacherHomeworkListDto {
 
     private int isReplied;
 
+    private int isSubmit;
+
+    public int getIsSubmit() {
+        return isSubmit;
+    }
+
+    public void setIsSubmit(int isSubmit) {
+        this.isSubmit = isSubmit;
+    }
+
     public int getIsReplied() {
         return isReplied;
     }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleEvaluate.java

@@ -72,6 +72,8 @@ public class CourseScheduleEvaluate {
     @ApiModelProperty(value = "状态 1-已提交 0-未提交")
     private Integer status;
 
+    private Integer subjectId;
+
     public String getStudentIdList() {
         return studentIdList;
     }
@@ -273,4 +275,12 @@ public class CourseScheduleEvaluate {
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
+
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
 }

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

@@ -44,6 +44,9 @@ public class CourseReviewQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "结束时间",required = false)
     private String endTime;
 
+    @ApiModelProperty(value = "是否导出",required = false)
+    private Integer isExport;
+
     public Integer getTeacherId() {
         return teacherId;
     }
@@ -141,4 +144,12 @@ public class CourseReviewQueryInfo extends QueryInfo {
     public void setHasLiaison(Integer hasLiaison) {
         this.hasLiaison = hasLiaison;
     }
+
+    public Integer getIsExport() {
+        return isExport;
+    }
+
+    public void setIsExport(Integer isExport) {
+        this.isExport = isExport;
+    }
 }

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseHomeworkServiceImpl.java

@@ -56,6 +56,7 @@ public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomew
 			List<Long> courseIds = dataList.stream().mapToLong(TeacherHomeworkListDto::getCourseScheduleId).boxed().collect(Collectors.toList());
 			List<StudentCourseHomework> allStudentCourseHomeworks = studentCourseHomeworkDao.findByCourses(courseIds);
 			Map<Long, List<StudentCourseHomework>> homeworkStudentMap = allStudentCourseHomeworks.stream().collect(Collectors.groupingBy(StudentCourseHomework::getCourseScheduleId));
+			Map<YesOrNoEnum, List<StudentCourseHomework>> statusStudentMpa = allStudentCourseHomeworks.stream().collect(Collectors.groupingBy(StudentCourseHomework::getStatus));
 			for (TeacherHomeworkListDto teacherHomeworkListDto : dataList) {
 				List<StudentCourseHomework> studentCourseHomeworks = homeworkStudentMap.get(teacherHomeworkListDto.getCourseScheduleId().longValue());
 				if(CollectionUtils.isEmpty(studentCourseHomeworks)){
@@ -65,6 +66,10 @@ public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomew
 				if(CollectionUtils.isEmpty(replyStudentsMap.get(YesOrNoEnum.NO))){
 					teacherHomeworkListDto.setIsReplied(YesOrNoEnum.YES.getCode());
 				}
+				List<StudentCourseHomework> studentCourseHomeworks1 = statusStudentMpa.get(YesOrNoEnum.YES);
+				if(!CollectionUtils.isEmpty(studentCourseHomeworks1)&&studentCourseHomeworks1.size()>0){
+					teacherHomeworkListDto.setIsSubmit(1);
+				}
 			}
 		}
 		if (count != 0) {

+ 14 - 16
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseReviewServiceImpl.java

@@ -468,25 +468,23 @@ public class CourseReviewServiceImpl extends BaseServiceImpl<Integer, CourseSche
             throw new BizException("评价不存在");
         }
 
-        if (courseScheduleReview == null) {
-            courseScheduleReview = new CourseScheduleReview();
-        }
-
         TeacherClassHeadInfo teacherClassGroupInfo = getCourseInfoHead(courseId.intValue());
-
-        CourseHomework homework = courseHomeworkDao.findByCourseSchedule(courseId);
-        if (homework != null) {
-            courseScheduleReview.setHomeWork(homework.getContent());
-        }
-        courseScheduleReview.setTeacherName(teacherClassGroupInfo.getBishopTeacher());
-        CourseSchedule courseSchedule = courseScheduleDao.get(courseId);
-        if (courseSchedule.getGroupType().equals(GroupType.PRACTICE)) {
-            PracticeCourseDto practiceGroup = practiceGroupDao.findByGroupId(Integer.parseInt(courseSchedule.getMusicGroupId()));
-            courseScheduleReview.setEduTeacherName(practiceGroup.getEduTeacherName());
-        }
         ReviewInfoDto reviewInfoDto = new ReviewInfoDto();
         reviewInfoDto.setTeacherClassHeadInfo(teacherClassGroupInfo);
-        reviewInfoDto.setCourseScheduleReview(courseScheduleReview);
+
+        if (courseScheduleReview != null) {
+            CourseHomework homework = courseHomeworkDao.findByCourseSchedule(courseId);
+            if (homework != null) {
+                courseScheduleReview.setHomeWork(homework.getContent());
+            }
+            courseScheduleReview.setTeacherName(teacherClassGroupInfo.getBishopTeacher());
+            CourseSchedule courseSchedule = courseScheduleDao.get(courseId);
+            if (courseSchedule.getGroupType().equals(GroupType.PRACTICE)) {
+                PracticeCourseDto practiceGroup = practiceGroupDao.findByGroupId(Integer.parseInt(courseSchedule.getMusicGroupId()));
+                courseScheduleReview.setEduTeacherName(practiceGroup.getEduTeacherName());
+            }
+            reviewInfoDto.setCourseScheduleReview(courseScheduleReview);
+        }
 
         if (courseScheduleComplaint != null) {
             List<CourseScheduleComplaintsDto> courseScheduleComplaints = new ArrayList<>();

+ 19 - 7
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleEvaluateServiceImpl.java

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.CourseScheduleEvaluate;
 import com.ym.mec.biz.dal.entity.PracticeGroup;
+import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.service.CourseScheduleEvaluateService;
 import com.ym.mec.biz.service.SysConfigService;
@@ -43,6 +44,8 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
     private SysMessageService sysMessageService;
     @Autowired
     private SysConfigDao sysConfigDao;
+    @Autowired
+    private SubjectDao subjectDao;
 
     @Override
     public BaseDAO<Long, CourseScheduleEvaluate> getDAO() {
@@ -68,7 +71,7 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
             Integer classGroupCourseTimes = courseScheduleEvaluateDao.getClassGroupCourseTimes(classGroup.getId());
             Date date = new Date();
             courseScheduleEvaluate.setTimes(classGroupCourseTimes);
-            courseScheduleEvaluate.setTotalMinutes(classGroupCourseTimes*25);
+            courseScheduleEvaluate.setTotalMinutes(classGroupCourseTimes * 25);
             courseScheduleEvaluate.setMusicGroupId(classGroup.getMusicGroupId());
             courseScheduleEvaluate.setCreateTime(date);
             courseScheduleEvaluate.setUpdateTime(date);
@@ -132,10 +135,11 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
         Date afterDate = DateUtil.addDays(DateUtil.getLastSecondWithDay(nowDate), 5);
         boolean afterDateIsLastDay = DateUtil.isSameDay(DateUtil.getLastDayOfMonth(startDate), afterDate);
 
-        List<CourseScheduleEvaluate> needPostReportPracticeGroups = practiceGroupDao.getNeedPostReportPracticeGroups(startDate, afterDate,afterDateIsLastDay);
+        List<CourseScheduleEvaluate> needPostReportPracticeGroups = practiceGroupDao.getNeedPostReportPracticeGroups(startDate, afterDate, afterDateIsLastDay);
 
         Map<Integer, Integer> courseTimesMap = new HashMap<>();
         Map<Integer, Integer> reportCountMap = new HashMap<>();
+        Map<Integer, String> subjectMap = new HashMap<>();
         if (needPostReportPracticeGroups.size() > 0) {
             Date courseStartDate = DateUtil.addMonths(startDate, -1);
             List<Integer> classGroupIds = needPostReportPracticeGroups.stream().map(CourseScheduleEvaluate::getClassGroupId).collect(Collectors.toList());
@@ -143,15 +147,23 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
             courseTimesMap = reportCourseTimes.stream().collect(Collectors.toMap(ClassGroup::getId, ClassGroup::getTotalClassTimes));
 
             List<CourseScheduleEvaluate> courseScheduleEvaluates = courseScheduleEvaluateDao.hasReportList(classGroupIds, startDate);
-            if(courseScheduleEvaluates.size() > 0){
-                reportCountMap = courseScheduleEvaluates.stream().collect(Collectors.toMap(CourseScheduleEvaluate::getClassGroupId,CourseScheduleEvaluate::getTimes));
+            if (courseScheduleEvaluates.size() > 0) {
+                reportCountMap = courseScheduleEvaluates.stream().collect(Collectors.toMap(CourseScheduleEvaluate::getClassGroupId, CourseScheduleEvaluate::getTimes));
             }
+            List<Integer> subjectIds = needPostReportPracticeGroups.stream().map(CourseScheduleEvaluate::getSubjectId).collect(Collectors.toList());
+            List<Subject> subjects = subjectDao.findBySubjectIds(subjectIds);
+            subjectMap = subjects.stream().collect(Collectors.toMap(Subject::getId, Subject::getName));
         }
         Iterator<CourseScheduleEvaluate> iterator = needPostReportPracticeGroups.iterator();
-        while (iterator.hasNext()){
+        while (iterator.hasNext()) {
             CourseScheduleEvaluate courseScheduleEvaluate = iterator.next();
-            if(reportCountMap.containsKey(courseScheduleEvaluate.getClassGroupId()) &&
-                    reportCountMap.get(courseScheduleEvaluate.getClassGroupId()) > 0){
+            if (subjectMap.get(courseScheduleEvaluate.getSubjectId()).contains("钢琴")) {
+                iterator.remove();
+                continue;
+            }
+
+            if (reportCountMap.containsKey(courseScheduleEvaluate.getClassGroupId()) &&
+                    reportCountMap.get(courseScheduleEvaluate.getClassGroupId()) > 0) {
                 iterator.remove();
                 continue;
             }

+ 1 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleEvaluateMapper.xml

@@ -12,6 +12,7 @@
         <result column="create_time_" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
         <result column="student_id_" jdbcType="INTEGER" property="studentId"/>
+        <result column="subject_id_" jdbcType="INTEGER" property="subjectId"/>
         <result column="subject_name_" jdbcType="VARCHAR" property="subjectName"/>
         <result column="is_pushed_" jdbcType="INTEGER" property="isPushed"/>
         <result column="month_" jdbcType="VARCHAR" property="month"/>

+ 15 - 4
mec-biz/src/main/resources/config/mybatis/CourseScheduleReviewMapper.xml

@@ -29,7 +29,8 @@
     </resultMap>
 
     <select id="get" parameterType="java.lang.Integer" resultMap="CourseScheduleReview">
-        select * from course_schedule_review
+        select *
+        from course_schedule_review
         where id_ = #{id,jdbcType=INTEGER}
     </select>
 
@@ -153,11 +154,13 @@
         <result column="update_time_" property="updateTime"/>
         <result column="has_liaison_" property="hasLiaison"/>
         <result column="student_id_" property="studentId"/>
+        <result column="home_work_replied_" property="homeWorkReplied"/>
     </resultMap>
 
     <sql id="practiceGroupReviewsQueryCondition">
         <where>
-            AND pg.id_ > 0 AND cs.group_type_='PRACTICE' AND cs.status_='OVER' AND (cs.del_flag_ = 0 OR cs.del_flag_ IS NULL)
+            AND pg.id_ > 0 AND cs.group_type_='PRACTICE' AND cs.status_='OVER' AND (cs.del_flag_ = 0 OR cs.del_flag_ IS
+            NULL)
             <if test="search!=null and search!=''">
                 AND (cs.name_ LIKE CONCAT('%',#{search},'%') OR cs.id_= #{search})
             </if>
@@ -219,12 +222,18 @@
         edu_teacher_name_,pg.buy_months_,csr.id_ review_id_, csc.score_
         student_review_,csr.hand_homework_,csr.course_review_,pg.student_id_,csr.teaching_material_,csr.pronunciation_,csr.tempo_,
         csr.music_theory_,csr.song_,csr.memo_,csr.create_time_,csr.has_liaison_,csr.create_time_,csr.update_time_
+        <if test='isExport !=null and isExport=="1"'>
+            ,sch.is_replied_ home_work_replied_
+        </if>
         FROM course_schedule cs
         LEFT JOIN practice_group pg ON cs.music_group_id_ = pg.id_
         LEFT JOIN sys_user su ON cs.actual_teacher_id_ = su.id_
         LEFT JOIN sys_user edsu ON pg.educational_teacher_id_ = edsu.id_
         LEFT JOIN course_schedule_review csr on cs.id_ = csr.course_schedule_id_
         LEFT JOIN course_schedule_complaints csc on csc.course_schedule_id_ = cs.id_
+        <if test='isExport !=null and isExport=="1"'>
+            LEFT JOIN student_course_homework sch on cs.id_ = sch.course_schedule_id_
+        </if>
         <include refid="practiceGroupReviewsQueryCondition"/>
         ORDER BY cs.class_date_ DESC
         <include refid="global.limit"/>
@@ -339,7 +348,9 @@
     </select>
 
     <select id="findStudentByClassGroupId" resultMap="com.ym.mec.biz.dal.dao.TeacherDao.SysUser">
-        SELECT su.id_, su.username_,su.avatar_ FROM  class_group_student_mapper cgsm
-        LEFT JOIN sys_user su on cgsm.user_id_ = su.id_ WHERE cgsm.class_group_id_ = #{classGroupId}
+        SELECT su.id_, su.username_, su.avatar_
+        FROM class_group_student_mapper cgsm
+                 LEFT JOIN sys_user su on cgsm.user_id_ = su.id_
+        WHERE cgsm.class_group_id_ = #{classGroupId}
     </select>
 </mapper>

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml

@@ -343,7 +343,8 @@
         SELECT pg.id_                   music_group_id_,
                pg.user_id_              teacher_id_,
                cg.id_                   class_group_id_,
-               pg.single_class_minutes_ total_minutes_
+               pg.single_class_minutes_ total_minutes_,
+               pg.subject_id_
         FROM practice_group pg
                  LEFT JOIN class_group cg on pg.id_ = cg.music_group_id_ AND cg.group_type_ = 'PRACTICE'
          WHERE pg.group_status_ = 'NORMAL' AND cg.group_type_ = 'PRACTICE'

+ 81 - 74
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -85,14 +85,14 @@ public class ExportController extends BaseController {
         List<ExportTeacherSalaryDto> rows = courseScheduleTeacherSalaryService.exportTeacherSalary(queryInfo);
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"课时编号", "老师编号", "老师姓名", "老师分部", "工作类别",
-                    "课程分部","课程组编号", "课程班名称", "乐团模式", "vip活动名称", "阶梯奖励名称","线上课/线下课", "线上课单价", "线下课单价",
+                    "课程分部", "课程组编号", "课程班名称", "乐团模式", "vip活动名称", "阶梯奖励名称", "线上课/线下课", "线上课单价", "线下课单价",
                     "课程类别", "课时时长", "实际上课时长", "上课日期",
                     "上课时间", "教师签到状态", "教师签退状态", "教师签到时间", "教师签退时间",
-                    "主辅", "上课地点", "应到学员", "学员签到时间", "学员签退时间","课时课酬","阶梯奖励"}, new String[]{
+                    "主辅", "上课地点", "应到学员", "学员签到时间", "学员签退时间", "课时课酬", "阶梯奖励"}, new String[]{
                     "courseScheduleId", "teacherId", "teacherName", "teacherOrganName", "jobType",
-                    "courseScheduleOrganName", "groupId", "groupName", "changeType", "vipActiveName","activeName", "teachMode", "onlineClassesUnitPrice", "offlineClassesUnitPrice",
-                    "courseScheduleType","signCourseScheduleTime","currentTime","classDate","courseScheduleStartTime","signInStatus",
-                    "signOutStatus","signInTime","signOutTime","teacherRole","address","studentNum","studentSignInTime","studentSignOutTime","price","rewards"}, rows);
+                    "courseScheduleOrganName", "groupId", "groupName", "changeType", "vipActiveName", "activeName", "teachMode", "onlineClassesUnitPrice", "offlineClassesUnitPrice",
+                    "courseScheduleType", "signCourseScheduleTime", "currentTime", "classDate", "courseScheduleStartTime", "signInStatus",
+                    "signOutStatus", "signInTime", "signOutTime", "teacherRole", "address", "studentNum", "studentSignInTime", "studentSignOutTime", "price", "rewards"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
@@ -113,15 +113,15 @@ public class ExportController extends BaseController {
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        if(!sysUser.getIsSuperAdmin()){
+        if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
             if (StringUtils.isEmpty(queryInfo.getOrganId())) {
                 queryInfo.setOrganId(employee.getOrganIdList());
-            }else if(StringUtils.isEmpty(employee.getOrganIdList())){
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
                 throw new BizException("用户所在分部异常");
-            }else {
+            } else {
                 List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-                if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
                     throw new BizException("非法请求");
                 }
             }
@@ -130,11 +130,11 @@ public class ExportController extends BaseController {
         List<StudentManageListDto> rows = studentManageService.findStudentsByOrganId(queryInfo).getRows();
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "学员编号", "学员姓名", "性别", "家长姓名",
-                    "家长联系电话", "是否激活", "是否有课", "是否预约网管课","是否有网管课", "课程余额(元)",
+                    "家长联系电话", "是否激活", "是否有课", "是否预约网管课", "是否有网管课", "课程余额(元)",
                     "所在乐团", "乐团所属声部", "所在乐团状态", "所在vip课", "所在VIP状态"}, new String[]{
                     "organName", "userId", "username", "gender.description", "parentsName", "parentsPhone",
-                    "isActive.msg","hasCourse.msg","isMake.msg","hasPracticeCourse.msg","courseBalance","musicGroupName",
-                    "subjectName","musicGroupStatus","vipGroupName","vipGroupStatus"}, rows);
+                    "isActive.msg", "hasCourse.msg", "isMake.msg", "hasPracticeCourse.msg", "courseBalance", "musicGroupName",
+                    "subjectName", "musicGroupStatus", "vipGroupName", "vipGroupStatus"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
@@ -149,37 +149,37 @@ public class ExportController extends BaseController {
     @ApiOperation(value = "导出陪练课列表")
     @GetMapping("export/practiceGroupList")
     @PreAuthorize("@pcs.hasPermissions('export/practiceGroupList')")
-    public void queryAll(HttpServletResponse response,PracticeGroupQueryInfo queryInfo) {
+    public void queryAll(HttpServletResponse response, PracticeGroupQueryInfo queryInfo) {
         queryInfo.setIsExport(true);
         queryInfo.setRows(999999999);
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        if(!sysUser.getIsSuperAdmin()){
+        if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
             if (StringUtils.isEmpty(queryInfo.getOrganId())) {
                 queryInfo.setOrganId(employee.getOrganIdList());
-            }else if(StringUtils.isEmpty(employee.getOrganIdList())){
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
                 throw new BizException("用户所在分部异常");
-            }else {
+            } else {
                 List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-                if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
                     throw new BizException("非法请求");
                 }
             }
         }
         List<PracticeGroupDto> rows = practiceGroupService.findPracticeGroups(queryInfo).getRows();
-        if(rows != null && rows.size() > 0){
-            rows.forEach(e->{
-                e.setSubClassTimes(e.getTotalClassTimes()==null?0:e.getTotalClassTimes() - (e.getCurrentClassTimes()==null?0:e.getCurrentClassTimes()));
+        if (rows != null && rows.size() > 0) {
+            rows.forEach(e -> {
+                e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
             });
         }
         try {
-            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部","网管课编号", "课程名称", "指导老师", "教务老师", "班级人数", "先上课单价", "线下课单价",
-                    "当前课次", "总课次", "剩余课次","开课时间", "结束时间"}, new String[]{
-                    "organName","id", "name", "teacherName", "educationalTeacherName", "studentNum", "onlineClassesUnitPrice",
-                    "offlineClassesUnitPrice", "currentClassTimes", "totalClassTimes", "subClassTimes","coursesStartDate", "coursesExpireDate"}, rows);
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "网管课编号", "课程名称", "指导老师", "教务老师", "班级人数", "先上课单价", "线下课单价",
+                    "当前课次", "总课次", "剩余课次", "开课时间", "结束时间"}, new String[]{
+                    "organName", "id", "name", "teacherName", "educationalTeacherName", "studentNum", "onlineClassesUnitPrice",
+                    "offlineClassesUnitPrice", "currentClassTimes", "totalClassTimes", "subClassTimes", "coursesStartDate", "coursesExpireDate"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
@@ -193,30 +193,30 @@ public class ExportController extends BaseController {
     @ApiOperation(value = "导出VIP课管理")
     @GetMapping("export/vipGroupList")
     @PreAuthorize("@pcs.hasPermissions('export/vipGroupList')")
-    public void queryAll(HttpServletResponse response,VipGroupQueryInfo queryInfo) {
+    public void queryAll(HttpServletResponse response, VipGroupQueryInfo queryInfo) {
         queryInfo.setRows(999999999);
         queryInfo.setIsExport(true);
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        if(!sysUser.getIsSuperAdmin()){
+        if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
             if (StringUtils.isEmpty(queryInfo.getOrganId())) {
                 queryInfo.setOrganId(employee.getOrganIdList());
-            }else if(StringUtils.isEmpty(employee.getOrganIdList())){
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
                 throw new BizException("用户所在分部异常");
-            }else {
+            } else {
                 List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-                if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
                     throw new BizException("非法请求");
                 }
             }
         }
         List<VipGroup> rows = vipGroupService.findVipGroups(queryInfo).getRows();
-        if(rows != null && rows.size() > 0){
-            rows.forEach(e->{
-                e.setSubClassTimes(e.getTotalClassTimes()==null?0:e.getTotalClassTimes() - (e.getCurrentClassTimes()==null?0:e.getCurrentClassTimes()));
+        if (rows != null && rows.size() > 0) {
+            rows.forEach(e -> {
+                e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
             });
         }
         try {
@@ -238,22 +238,22 @@ public class ExportController extends BaseController {
     @ApiOperation(value = "终课表列表导出")
     @GetMapping("export/superFindCourseSchedules")
     @PreAuthorize("@pcs.hasPermissions('export/superFindCourseSchedules')")
-    public void superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo,HttpServletResponse response){
+    public void superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo, HttpServletResponse response) {
         queryInfo.setRows(999999999);
         queryInfo.setIsExport(true);
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        if(!sysUser.getIsSuperAdmin()){
+        if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
             if (org.apache.commons.lang3.StringUtils.isEmpty(queryInfo.getOrganIdList())) {
                 queryInfo.setOrganIdList(employee.getOrganIdList());
-            }else if(org.apache.commons.lang3.StringUtils.isEmpty(employee.getOrganIdList())){
+            } else if (org.apache.commons.lang3.StringUtils.isEmpty(employee.getOrganIdList())) {
                 throw new BizException("用户所在分部异常");
-            }else {
+            } else {
                 List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-                if(!list.containsAll(Arrays.asList(queryInfo.getOrganIdList().split(",")))){
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganIdList().split(",")))) {
                     throw new BizException("非法请求");
                 }
             }
@@ -261,10 +261,10 @@ public class ExportController extends BaseController {
         List<CourseScheduleEndDto> rows = scheduleService.endFindCourseSchedules(queryInfo).getRows();
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部名称", "课程编号", "开始时间", "结束时间", "班级名称", "班级声部", "课程名称", "课程类型", "教学模式",
-                    "教学点", "课程状态", "是否点名", "指导老师", "学员编号", "签到时间", "签退时间","签到备注"}, new String[]{
-                    "organName", "id", "startClassTime", "endClassTime", "classGroupName","subjectName", "name",
+                    "教学点", "课程状态", "是否点名", "指导老师", "学员编号", "签到时间", "签退时间", "签到备注"}, new String[]{
+                    "organName", "id", "startClassTime", "endClassTime", "classGroupName", "subjectName", "name",
                     "groupType.desc", "teachMode.msg", "schoolName", "status.msg", "isCallNames.msg", "teacherName", "studentId", "signInTime",
-                    "signOutTime","remark"}, rows);
+                    "signOutTime", "remark"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
@@ -279,30 +279,30 @@ public class ExportController extends BaseController {
     @ApiOperation(value = "导出零星收费列表")
     @GetMapping("export/sporadicChargeInfo")
     @PreAuthorize("@pcs.hasPermissions('export/sporadicChargeInfo')")
-    public void queryPage(SporadicChargeInfoQueryInfo queryInfo,HttpServletResponse response) {
+    public void queryPage(SporadicChargeInfoQueryInfo queryInfo, HttpServletResponse response) {
         queryInfo.setRows(999999999);
         queryInfo.setIsExport(true);
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if (sysUser == null) {
             throw new BizException("用户信息获取失败");
         }
-        if(!sysUser.getIsSuperAdmin()){
+        if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
             if (StringUtils.isEmpty(queryInfo.getOrganId())) {
                 queryInfo.setOrganId(employee.getOrganIdList());
-            }else if(StringUtils.isEmpty(employee.getOrganIdList())){
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
                 throw new BizException("用户所在分部异常");
-            }else {
+            } else {
                 List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
-                if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
                     throw new BizException("非法请求");
                 }
             }
         }
         List<SporadicChargeInfo> rows = sporadicChargeInfoService.queryDetailPage(queryInfo).getRows();
         try {
-            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "收费类型", "标题", "金额", "时间", "学生姓名","创建人"}, new String[]{
-                    "organName", "chargeType.msg", "title", "amount", "updateTime", "userName","operatorName"}, rows);
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "收费类型", "标题", "金额", "时间", "学生姓名", "创建人"}, new String[]{
+                    "organName", "chargeType.msg", "title", "amount", "updateTime", "userName", "operatorName"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
@@ -346,7 +346,7 @@ public class ExportController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('order/musicalListExport')")
     public void musicalListExport(HttpServletResponse response, String musicGroupId) {
         List<Goods> musicalList = studentPaymentOrderDetailService.getMusicalList(musicGroupId);
-        if(musicalList.size() > 50000){
+        if (musicalList.size() > 50000) {
             throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
         }
         try {
@@ -367,7 +367,7 @@ public class ExportController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('order/musicalListDetailExport')")
     public void musicalListDetailExport(HttpServletResponse response, String musicGroupId) {
         List<musicalListDetailDto> musicalList = studentPaymentOrderDetailService.getMusicalListDetail(musicGroupId);
-        if(musicalList.size() > 50000){
+        if (musicalList.size() > 50000) {
             throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
         }
         try {
@@ -428,9 +428,9 @@ public class ExportController extends BaseController {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         if (!sysUser.getIsSuperAdmin()) {
             Employee employee = employeeDao.get(sysUser.getId());
-            if(StringUtils.isEmpty(queryInfo.getOrganId()) && queryInfo.getOrderType().equals("3")){
+            if (StringUtils.isEmpty(queryInfo.getOrganId()) && queryInfo.getOrderType().equals("3")) {
                 queryInfo.setRoutingOrganId(employee.getOrganIdList());
-            }else if (StringUtils.isEmpty(queryInfo.getOrganId())) {
+            } else if (StringUtils.isEmpty(queryInfo.getOrganId())) {
                 queryInfo.setOrganId(employee.getOrganIdList());
             }
         }
@@ -439,7 +439,7 @@ public class ExportController extends BaseController {
         Map<String, Object> params = new HashMap<String, Object>();
         MapUtil.populateMap(params, queryInfo);
         List<StudentPaymentOrderExportDto> studentPaymentOrderExportDtos = studentPaymentOrderService.ExportQueryPage(params);
-        if(studentPaymentOrderExportDtos.size() > 50000){
+        if (studentPaymentOrderExportDtos.size() > 50000) {
             throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
         }
 
@@ -465,9 +465,9 @@ public class ExportController extends BaseController {
             if (row.getOrderDetailList() != null) {
                 for (StudentPaymentOrderDetail orderDetail : row.getOrderDetailList()) {
                     if (orderDetail.getType().equals(OrderDetailTypeEnum.MUSICAL)) {
-                        if(orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)){
+                        if (orderDetail.getKitGroupPurchaseType() != null && orderDetail.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {
                             leaseFee = orderDetail.getPrice();
-                        }else {
+                        } else {
                             musicalFee = orderDetail.getPrice();
                         }
                     } else if (orderDetail.getType().equals(OrderDetailTypeEnum.COURSE)) {
@@ -477,7 +477,7 @@ public class ExportController extends BaseController {
                     }
                 }
             }
-            if(row.getGoodsList() != null){
+            if (row.getGoodsList() != null) {
                 goodsName = row.getGoodsList().stream().map(Goods::getName).collect(Collectors.joining("|"));
             }
             row.setCourseFee(courseFee);
@@ -514,24 +514,24 @@ public class ExportController extends BaseController {
                         row.setSporadicType("乐器更换");
                     } else if (row.getChargeType().equals(4)) {
                         row.setSporadicType("配件销售");
-                    }else if (row.getChargeType().equals(5)) {
+                    } else if (row.getChargeType().equals(5)) {
                         row.setSporadicType("维修费");
-                    }else if (row.getChargeType().equals(6)) {
+                    } else if (row.getChargeType().equals(6)) {
                         row.setSporadicType("福袋活动");
-                    }else if (row.getChargeType().equals(7)) {
+                    } else if (row.getChargeType().equals(7)) {
                         row.setSporadicType("上门费");
-                    }else if (row.getChargeType().equals(9)) {
+                    } else if (row.getChargeType().equals(9)) {
                         row.setSporadicType("账户充值");
                     }
                 }
                 School userSchool = musicGroupDao.findUserSchool(row.getUserId());
-                if(userSchool!= null){
+                if (userSchool != null) {
                     row.setSchoolName(userSchool.getName());
                 }
-            }else if (row.getGroupType().equals(GroupType.PRACTICE)) {
+            } else if (row.getGroupType().equals(GroupType.PRACTICE)) {
                 row.setCourseFee(row.getActualAmount());
                 School userSchool = musicGroupDao.findUserSchool(row.getUserId());
-                if(userSchool!= null){
+                if (userSchool != null) {
                     row.setSchoolName(userSchool.getName());
                 }
                 PracticeCourseDto practiceGroup = practiceGroupDao.findByGroupId(Integer.parseInt(row.getMusicGroupId()));
@@ -555,9 +555,9 @@ public class ExportController extends BaseController {
 
         try {
             String[] header = {"序号", "学生姓名", "交易流水号", "订单编号", "收款渠道", "收款账户", "支付金额", "到账时间",
-                    "关联乐团ID/VIP课ID", "课程形态", "课程费用","减免费用","押金", "乐器", "教辅费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校","合作机构","备注"};
+                    "关联乐团ID/VIP课ID", "课程形态", "课程费用", "减免费用", "押金", "乐器", "教辅费用", "零星收款费用", "零星收款类别", "手续费", "专业", "分部", "单位/学校", "合作机构", "备注"};
             String[] body = {"id", "user.username", "transNo", "orderNo", "paymentChannel", "merNos", "actualAmount", "payTime", "musicGroupId",
-                    "groupType.desc", "courseFee","remitFee", "leaseFee", "musicalFee", "teachingFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName","cooperationOrganName", "memo"};
+                    "groupType.desc", "courseFee", "remitFee", "leaseFee", "musicalFee", "teachingFee", "sporadicAmount", "sporadicType", "transferFee", "subjectName", "organName", "schoolName", "cooperationOrganName", "memo"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, studentPaymentOrderExportDtos);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
@@ -638,9 +638,10 @@ public class ExportController extends BaseController {
             Employee employee = employeeDao.get(sysUser.getId());
             queryInfo.setOrganId(employee.getOrganIdList());
         }
+        queryInfo.setIsExport(1);
         queryInfo.setRows(99999);
         PageInfo<CourseReviewDto> practiceGroupReviews = courseReviewService.findPracticeGroupReviews(queryInfo);
-        if(practiceGroupReviews.getTotal() <= 0){
+        if (practiceGroupReviews.getTotal() <= 0) {
             response.setStatus(500);
             response.setContentType("Content-Type: application/json;charset=UTF-8");
             response.getOutputStream().write("{\"data\": null, \"code\": 500, \"status\": false, \"msg\": \"没有可导出的记录\"}".getBytes());
@@ -663,20 +664,26 @@ public class ExportController extends BaseController {
                 if (row.getCreateTime() != null) {
                     row.setCreateTimeStr(DateUtil.dateToString(row.getCreateTime(), "yyyy-MM-dd"));
                 }
-                if(row.getPronunciation() != null){
-                    row.setPronunciationStr(row.getPronunciation()+"星");
+                if (row.getPronunciation() != null) {
+                    row.setPronunciationStr(row.getPronunciation() + "星");
                 }
-                if(row.getTempo() != null){
-                    row.setTempoStr(row.getTempo()+"星");
+                if (row.getTempo() != null) {
+                    row.setTempoStr(row.getTempo() + "星");
                 }
-                if(row.getMusicTheory() != null){
-                    row.setMusicTheoryStr(row.getMusicTheory()+"星");
+                if (row.getMusicTheory() != null) {
+                    row.setMusicTheoryStr(row.getMusicTheory() + "星");
+                }
+                if (row.getHomeWorkReplied() != null && row.getHomeWorkReplied().equals("1")) {
+                    row.setHomeWorkReplied("已回复");
+                } else if (row.getHandHomework() != null && row.getHandHomework() > 0) {
+                    row.setHomeWorkReplied("未回复");
+                }else {
+                    row.setHomeWorkReplied(null);
                 }
-
             }
 
-            String[] header = {"分部", "上课日期", "学生编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置作业)", "完成app双向沟通", "是否提交作业", "教务老师", "教务评价"};
-            String[] body = {"organName", "classDateStr", "studentId", "courseName", "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "hasLiaison", "handHomeworkStr", "eduTeacherName", "courseReview"};
+            String[] header = {"分部", "上课日期", "学生编号","课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置作业)", "完成app双向沟通", "是否提交作业","是否回复作业", "教务老师", "教务评价"};
+            String[] body = {"organName", "classDateStr", "studentId","id", "courseName", "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "hasLiaison", "handHomeworkStr","homeWorkReplied", "eduTeacherName", "courseReview"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupReviews.getRows());
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");