Переглянути джерело

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

zouxuan 5 роки тому
батько
коміт
d0f4500909
59 змінених файлів з 2377 додано та 112 видалено
  1. 1 1
      cms/src/main/java/com/ym/mec/cms/controller/HelpCenterCatalogController.java
  2. 1 1
      cms/src/main/java/com/ym/mec/cms/controller/HelpCenterContentControlller.java
  3. 1 1
      mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserLoginServiceImpl.java
  4. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleEvaluateDao.java
  5. 41 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleReviewDao.java
  6. 22 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java
  7. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TenantEntryActivitesDao.java
  8. 162 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseReviewDto.java
  9. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/PracticeGroupDto.java
  10. 29 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ReviewInfoDto.java
  11. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/SimpleUserDto.java
  12. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentCourseInfoDto.java
  13. 36 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherClassHeadInfo.java
  14. 295 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleReview.java
  15. 158 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TenantEntryActivites.java
  16. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroup.java
  17. 77 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseReview4EduQueryInfo.java
  18. 144 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseReviewQueryInfo.java
  19. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/PracticeGroupQueryInfo.java
  20. 32 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TenantEntryActivitesQueryInfo.java
  21. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupQueryInfo.java
  22. 59 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseReviewService.java
  23. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java
  24. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CoursesGroupService.java
  25. 14 1
      mec-biz/src/main/java/com/ym/mec/biz/service/EmployeeService.java
  26. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TenantEntryActivitesService.java
  27. 251 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseReviewServiceImpl.java
  28. 25 11
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleEvaluateServiceImpl.java
  29. 18 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  30. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CoursesGroupServiceImpl.java
  31. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java
  32. 7 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java
  33. 27 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java
  34. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMessageServiceImpl.java
  35. 51 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantEntryActivitesServiceImpl.java
  36. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  37. 1 6
      mec-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml
  38. 9 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleEvaluateMapper.xml
  39. 251 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleReviewMapper.xml
  40. 5 6
      mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml
  41. 24 0
      mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml
  42. 5 6
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  43. 9 5
      mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml
  44. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  45. 4 5
      mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml
  46. 1 1
      mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml
  47. 1 1
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  48. 122 0
      mec-biz/src/main/resources/config/mybatis/TenantEntryActivitesMapper.xml
  49. 8 6
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  50. 1 1
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  51. 33 12
      mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java
  52. 85 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseReviewController.java
  53. 33 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TenantEntryActivitesController.java
  54. 69 0
      mec-web/src/main/java/com/ym/mec/web/controller/CourseReviewController.java
  55. 18 36
      mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java
  56. 19 0
      mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java
  57. 49 0
      mec-web/src/main/java/com/ym/mec/web/controller/TenantEntryActivitesController.java
  58. 60 0
      mec-web/src/main/java/com/ym/mec/web/controller/education/EduCourseReviewController.java
  59. 1 0
      mec-web/src/main/java/com/ym/mec/web/controller/education/EduPracticeGroupController.java

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/controller/HelpCenterCatalogController.java

@@ -7,7 +7,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;

+ 1 - 1
cms/src/main/java/com/ym/mec/cms/controller/HelpCenterContentControlller.java

@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiImplicitParam;
 
 import java.util.Date;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;

+ 1 - 1
mec-auth/mec-auth-server/src/main/java/com/ym/mec/auth/service/impl/SysUserLoginServiceImpl.java

@@ -3,7 +3,7 @@ package com.ym.mec.auth.service.impl;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.commons.lang.time.DateUtils;
+import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleEvaluateDao.java

@@ -75,8 +75,17 @@ public interface CourseScheduleEvaluateDao extends BaseDAO<Long, CourseScheduleE
 
     /**
      * 获取班级课程数
+     *
      * @param classGroupId
      * @return
      */
     Integer getClassGroupCourseTimes(@Param("classGroupId") Integer classGroupId);
+
+    /**
+     * 查询当天是否已有报告
+     * @param classGroupIds
+     * @param nowDate
+     * @return
+     */
+    List<CourseScheduleEvaluate> hasReportList(@Param("classGroupIds") List<Integer> classGroupIds, @Param("nowDate") Date nowDate);
 }

+ 41 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleReviewDao.java

@@ -0,0 +1,41 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.dto.CourseReviewDto;
+import com.ym.mec.biz.dal.entity.CourseScheduleReview;
+import com.ym.mec.common.dal.BaseDAO;
+
+import java.util.List;
+import java.util.Map;
+
+public interface CourseScheduleReviewDao extends BaseDAO<Integer, CourseScheduleReview> {
+
+    /**
+     * 网管课评价列表
+     *
+     * @param params
+     * @return
+     */
+    List<CourseReviewDto> getPracticeGroupReviewList(Map<String, Object> params);
+
+    /**
+     * 网管课评价总条数
+     *
+     * @param params
+     * @return
+     */
+    Integer countPracticeGroupReviews(Map<String, Object> params);
+
+    /**
+     * 教务网管课评论列表
+     *
+     * @return
+     */
+    List<CourseScheduleReview> getPracticeGroupReview4EduList(Map<String, Object> params);
+
+    /**
+     * 教务网管课评论条数
+     *
+     * @return
+     */
+    Integer countPracticeGroupReviews4Edu(Map<String, Object> params);
+}

+ 22 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/EmployeeDao.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.EmployeeDto;
+import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.common.dal.BaseDAO;
 
@@ -72,4 +73,24 @@ public interface EmployeeDao extends BaseDAO<Integer, Employee> {
      * @return
      */
     List<Integer> queryUserRole(Integer userId);
-}
+
+    /**
+     * @describe 根据角色和用户查找用户
+     * @author Joburgess
+     * @date 2020/3/12
+     * @param roleIds: 角色编号列表
+     * @param organIds: 部门编号列表
+     * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
+     */
+    List<SimpleUserDto> findByRole(@Param("roleIds") String roleIds,
+                                   @Param("organIds") String organIds);
+
+    /**
+     * @describe 根据用户编号获取用户
+     * @author Joburgess
+     * @date 2020/3/12
+     * @param userIds:
+     * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
+     */
+    List<SimpleUserDto> findByIds(@Param("userIds") List<Integer> userIds);
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TenantEntryActivitesDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.biz.dal.dao;
+
+import com.ym.mec.biz.dal.entity.TenantEntryActivites;
+import com.ym.mec.common.dal.BaseDAO;
+
+public interface TenantEntryActivitesDao extends BaseDAO<Integer, TenantEntryActivites> {
+
+	
+}

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

@@ -0,0 +1,162 @@
+package com.ym.mec.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+public class CourseReviewDto {
+
+    @ApiModelProperty(value = "分部id",required = false)
+    private Integer organId;
+
+    @ApiModelProperty(value = "分部名称",required = false)
+    private String organName;
+
+    @ApiModelProperty(value = "课程编号",required = false)
+    private Integer id;
+
+    @ApiModelProperty(value = "课程上课日期",required = false)
+    private Date classDate;
+
+    @ApiModelProperty(value = "课程名称",required = false)
+    private String courseName;
+
+    @ApiModelProperty(value = "声部id",required = false)
+    private Integer subjectId;
+
+    @ApiModelProperty(value = "声部名称",required = false)
+    private String subjectName;
+
+    @ApiModelProperty(value = "老师名字",required = false)
+    private String teacherName;
+
+    @ApiModelProperty(value = "教务老师名字",required = false)
+    private String EduTeacherName;
+
+    @ApiModelProperty(value = "购买月数",required = false)
+    private Integer BuyMonths;
+
+    @ApiModelProperty(value = "评论id",required = false)
+    private Integer reviewId;
+
+    @ApiModelProperty(value = "学员评分",required = false)
+    private Integer studentReview;
+
+    @ApiModelProperty(value = "是否提交作业",required = false)
+    private Integer handHomework;
+
+    @ApiModelProperty(value = "教务评价",required = false)
+    private String courseReview;
+
+    public Integer getOrganId() {
+        return organId;
+    }
+
+    public void setOrganId(Integer organId) {
+        this.organId = organId;
+    }
+
+    public String getOrganName() {
+        return organName;
+    }
+
+    public void setOrganName(String organName) {
+        this.organName = organName;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public String getSubjectName() {
+        return subjectName;
+    }
+
+    public void setSubjectName(String subjectName) {
+        this.subjectName = subjectName;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
+    public String getEduTeacherName() {
+        return EduTeacherName;
+    }
+
+    public void setEduTeacherName(String eduTeacherName) {
+        EduTeacherName = eduTeacherName;
+    }
+
+    public Integer getBuyMonths() {
+        return BuyMonths;
+    }
+
+    public void setBuyMonths(Integer buyMonths) {
+        BuyMonths = buyMonths;
+    }
+
+    public Integer getReviewId() {
+        return reviewId;
+    }
+
+    public void setReviewId(Integer reviewId) {
+        this.reviewId = reviewId;
+    }
+
+    public Integer getStudentReview() {
+        return studentReview;
+    }
+
+    public void setStudentReview(Integer studentReview) {
+        this.studentReview = studentReview;
+    }
+
+    public Integer getHandHomework() {
+        return handHomework;
+    }
+
+    public void setHandHomework(Integer handHomework) {
+        this.handHomework = handHomework;
+    }
+
+    public String getCourseReview() {
+        return courseReview;
+    }
+
+    public void setCourseReview(String courseReview) {
+        this.courseReview = courseReview;
+    }
+
+    public Date getClassDate() {
+        return classDate;
+    }
+
+    public void setClassDate(Date classDate) {
+        this.classDate = classDate;
+    }
+}

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

@@ -28,6 +28,16 @@ public class PracticeGroupDto extends PracticeGroup {
 
     private Integer evaluateStatus;
 
+    private String educationalTeacherName;
+
+    public String getEducationalTeacherName() {
+        return educationalTeacherName;
+    }
+
+    public void setEducationalTeacherName(String educationalTeacherName) {
+        this.educationalTeacherName = educationalTeacherName;
+    }
+
     public Integer getSubClassTimes() {
         return subClassTimes;
     }

+ 29 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ReviewInfoDto.java

@@ -0,0 +1,29 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleReview;
+import io.swagger.annotations.ApiModelProperty;
+
+public class ReviewInfoDto {
+
+    @ApiModelProperty(value = "课程信息",required = false)
+    private TeacherClassHeadInfo teacherClassHeadInfo;
+
+    @ApiModelProperty(value = "评价信息",required = false)
+    private CourseScheduleReview courseScheduleReview;
+
+    public TeacherClassHeadInfo getTeacherClassHeadInfo() {
+        return teacherClassHeadInfo;
+    }
+
+    public void setTeacherClassHeadInfo(TeacherClassHeadInfo teacherClassHeadInfo) {
+        this.teacherClassHeadInfo = teacherClassHeadInfo;
+    }
+
+    public CourseScheduleReview getCourseScheduleReview() {
+        return courseScheduleReview;
+    }
+
+    public void setCourseScheduleReview(CourseScheduleReview courseScheduleReview) {
+        this.courseScheduleReview = courseScheduleReview;
+    }
+}

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

@@ -31,6 +31,9 @@ public class SimpleUserDto {
         this.userName = userName;
     }
 
+    public SimpleUserDto() {
+    }
+
     public String getAvatar() {
         return avatar;
     }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentCourseInfoDto.java

@@ -5,7 +5,7 @@ import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.TeachModeEnum;
 import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.ApiModelProperty;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 
 import java.math.BigDecimal;
 import java.util.Date;

+ 36 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherClassHeadInfo.java

@@ -2,6 +2,8 @@ package com.ym.mec.biz.dal.dto;
 
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Date;
+
 /**
  * @Author Joburgess
  * @Date 2019/10/17
@@ -35,6 +37,16 @@ public class TeacherClassHeadInfo {
     @ApiModelProperty(value = "声部信息",required = false)
     private String subjectNames;
 
+    @ApiModelProperty(value = "上课日期",required = false)
+    private String classDate;
+
+    @ApiModelProperty(value = "上课时间",required = false)
+    private String startClassTime;
+
+    @ApiModelProperty(value = "下课时间",required = false)
+    private String endClassTime;
+
+
     public Integer getTotalClassTimes() {
         return totalClassTimes;
     }
@@ -106,4 +118,28 @@ public class TeacherClassHeadInfo {
     public void setSubjectNames(String subjectNames) {
         this.subjectNames = subjectNames;
     }
+
+    public String getStartClassTime() {
+        return startClassTime;
+    }
+
+    public void setStartClassTime(String startClassTime) {
+        this.startClassTime = startClassTime;
+    }
+
+    public String getEndClassTime() {
+        return endClassTime;
+    }
+
+    public void setEndClassTime(String endClassTime) {
+        this.endClassTime = endClassTime;
+    }
+
+    public String getClassDate() {
+        return classDate;
+    }
+
+    public void setClassDate(String classDate) {
+        this.classDate = classDate;
+    }
 }

+ 295 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleReview.java

@@ -0,0 +1,295 @@
+package com.ym.mec.biz.dal.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import java.util.Date;
+
+public class CourseScheduleReview {
+    /**
+    * 评价id
+    */
+    private Integer id;
+
+    /**
+    * 课程id
+    */
+    @ApiModelProperty(value = "课程编号",required = false)
+    private Integer courseScheduleId;
+
+    /**
+    * 班级id
+    */
+    private Integer classGroupId;
+
+    /**
+    * 老师id
+    */
+    private Integer teacherId;
+
+    /**
+    * 教务老师id
+    */
+    private Integer educationalTeacherId;
+
+    /**
+    * 学生id
+    */
+    private Integer studentId;
+
+    /**
+    * 教材内容
+    */
+    private String teachingMaterial;
+
+    /**
+    * 曲目
+    */
+    private String song;
+
+    /**
+    * 评价备注
+    */
+    private String memo;
+
+    /**
+    * 发音
+    */
+    private Integer pronunciation;
+
+    /**
+    * 节奏
+    */
+    private Integer tempo;
+
+    /**
+    * 乐理
+    */
+    private Integer musicTheory;
+
+    /**
+    * 是否双向沟通 0-否 1-是
+    */
+    private Integer hasLiaison;
+
+    /**
+    * 是否交作业 0-否 1-是
+    */
+    private Integer handHomework;
+
+    /**
+    * 课程评价
+    */
+    private String courseReview;
+
+    /**
+     * 学生评价
+     */
+    private Integer studentReview;
+
+    /**
+    * 评价时间
+    */
+    private Date createTime;
+
+    /**
+    * 修改时间
+    */
+    private Date updateTime;
+
+    /**
+     * 作业
+     */
+    @ApiModelProperty(value = "作业",required = false)
+    private String homeWork;
+
+    @ApiModelProperty(value = "上课日期",required = false)
+    private Date classDate;
+
+    @ApiModelProperty(value = "课程名称",required = false)
+    private String courseName;
+
+    @ApiModelProperty(value = "老师名字",required = false)
+    private String teacherName;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getCourseScheduleId() {
+        return courseScheduleId;
+    }
+
+    public void setCourseScheduleId(Integer courseScheduleId) {
+        this.courseScheduleId = courseScheduleId;
+    }
+
+    public Integer getClassGroupId() {
+        return classGroupId;
+    }
+
+    public void setClassGroupId(Integer classGroupId) {
+        this.classGroupId = classGroupId;
+    }
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Integer getEducationalTeacherId() {
+        return educationalTeacherId;
+    }
+
+    public void setEducationalTeacherId(Integer educationalTeacherId) {
+        this.educationalTeacherId = educationalTeacherId;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getTeachingMaterial() {
+        return teachingMaterial;
+    }
+
+    public void setTeachingMaterial(String teachingMaterial) {
+        this.teachingMaterial = teachingMaterial;
+    }
+
+    public String getSong() {
+        return song;
+    }
+
+    public void setSong(String song) {
+        this.song = song;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    public Integer getPronunciation() {
+        return pronunciation;
+    }
+
+    public void setPronunciation(Integer pronunciation) {
+        this.pronunciation = pronunciation;
+    }
+
+    public Integer getTempo() {
+        return tempo;
+    }
+
+    public void setTempo(Integer tempo) {
+        this.tempo = tempo;
+    }
+
+    public Integer getMusicTheory() {
+        return musicTheory;
+    }
+
+    public void setMusicTheory(Integer musicTheory) {
+        this.musicTheory = musicTheory;
+    }
+
+    public Integer getHasLiaison() {
+        return hasLiaison;
+    }
+
+    public void setHasLiaison(Integer hasLiaison) {
+        this.hasLiaison = hasLiaison;
+    }
+
+    public Integer getHandHomework() {
+        return handHomework;
+    }
+
+    public void setHandHomework(Integer handHomework) {
+        this.handHomework = handHomework;
+    }
+
+    public String getCourseReview() {
+        return courseReview;
+    }
+
+    public void setCourseReview(String courseReview) {
+        this.courseReview = courseReview;
+    }
+
+    public Integer getStudentReview() {
+        return studentReview;
+    }
+
+    public void setStudentReview(Integer studentReview) {
+        this.studentReview = studentReview;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    public Date getClassDate() {
+        return classDate;
+    }
+
+    public void setClassDate(Date classDate) {
+        this.classDate = classDate;
+    }
+
+    public String getCourseName() {
+        return courseName;
+    }
+
+    public void setCourseName(String courseName) {
+        this.courseName = courseName;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
+    public String getHomeWork() {
+        return homeWork;
+    }
+
+    public void setHomeWork(String homeWork) {
+        this.homeWork = homeWork;
+    }
+}

+ 158 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TenantEntryActivites.java

@@ -0,0 +1,158 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(tenant_entry_activites):
+ */
+public class TenantEntryActivites {
+
+	/**  */
+	private Integer id;
+	
+	/**  */
+	private String name;
+	
+	/**  */
+	private String coverImg;
+	
+	/**  */
+	private String detail;
+	
+	/**  */
+	private java.math.BigDecimal totalPrice;
+	
+	/**  */
+	private java.math.BigDecimal discountPrice;
+	
+	/**  */
+	private Integer giveMinutes;
+	
+	/**  */
+	private java.util.Date startDate;
+	
+	/**  */
+	private java.util.Date endDate;
+	
+	/**  */
+	private String condition;
+	
+	/**  */
+	private boolean delFlag;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setCoverImg(String coverImg){
+		this.coverImg = coverImg;
+	}
+	
+	public String getCoverImg(){
+		return this.coverImg;
+	}
+			
+	public void setDetail(String detail){
+		this.detail = detail;
+	}
+	
+	public String getDetail(){
+		return this.detail;
+	}
+			
+	public void setTotalPrice(java.math.BigDecimal totalPrice){
+		this.totalPrice = totalPrice;
+	}
+	
+	public java.math.BigDecimal getTotalPrice(){
+		return this.totalPrice;
+	}
+			
+	public void setDiscountPrice(java.math.BigDecimal discountPrice){
+		this.discountPrice = discountPrice;
+	}
+	
+	public java.math.BigDecimal getDiscountPrice(){
+		return this.discountPrice;
+	}
+			
+	public void setGiveMinutes(Integer giveMinutes){
+		this.giveMinutes = giveMinutes;
+	}
+	
+	public Integer getGiveMinutes(){
+		return this.giveMinutes;
+	}
+			
+	public void setStartDate(java.util.Date startDate){
+		this.startDate = startDate;
+	}
+	
+	public java.util.Date getStartDate(){
+		return this.startDate;
+	}
+			
+	public void setEndDate(java.util.Date endDate){
+		this.endDate = endDate;
+	}
+	
+	public java.util.Date getEndDate(){
+		return this.endDate;
+	}
+			
+	public void setCondition(String condition){
+		this.condition = condition;
+	}
+	
+	public String getCondition(){
+		return this.condition;
+	}
+			
+	public void setDelFlag(boolean delFlag){
+		this.delFlag = delFlag;
+	}
+	
+	public boolean isDelFlag(){
+		return this.delFlag;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

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

@@ -126,6 +126,16 @@ public class VipGroup {
 
 	private Integer educationalTeacherId;
 
+	private String educationalTeacherName;
+
+	public String getEducationalTeacherName() {
+		return educationalTeacherName;
+	}
+
+	public void setEducationalTeacherName(String educationalTeacherName) {
+		this.educationalTeacherName = educationalTeacherName;
+	}
+
 	public Integer getEducationalTeacherId() {
 		return educationalTeacherId;
 	}

+ 77 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseReview4EduQueryInfo.java

@@ -0,0 +1,77 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 课次评论
+ */
+public class CourseReview4EduQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "教务老师id",required = false)
+    private Integer eduTeacherId;
+
+    @ApiModelProperty(value = "是否评价 1-评价 0未评价",required = false)
+    private Integer hasReview;
+
+    @ApiModelProperty(value = "是否提价作业 1-提交 0未提交",required = false)
+    private Integer hasHandHomework;
+
+    @ApiModelProperty(value = "是否完成双向沟通 1-是 0-否",required = false)
+    private Integer hasLiaison;
+
+    @ApiModelProperty(value = "开始时间",required = false)
+    private String startTime;
+
+    @ApiModelProperty(value = "结束时间",required = false)
+    private String endTime;
+
+
+    public Integer getEduTeacherId() {
+        return eduTeacherId;
+    }
+
+    public void setEduTeacherId(Integer eduTeacherId) {
+        this.eduTeacherId = eduTeacherId;
+    }
+
+    public Integer getHasReview() {
+        return hasReview;
+    }
+
+    public void setHasReview(Integer hasReview) {
+        this.hasReview = hasReview;
+    }
+
+    public Integer getHasHandHomework() {
+        return hasHandHomework;
+    }
+
+    public void setHasHandHomework(Integer hasHandHomework) {
+        this.hasHandHomework = hasHandHomework;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getHasLiaison() {
+        return hasLiaison;
+    }
+
+    public void setHasLiaison(Integer hasLiaison) {
+        this.hasLiaison = hasLiaison;
+    }
+}

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

@@ -0,0 +1,144 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 课次评论
+ */
+public class CourseReviewQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "分部id",required = false)
+    private String organId;
+
+    @ApiModelProperty(value = "分部id",required = false)
+    private Integer subjectId;
+
+    @ApiModelProperty(value = "指导老师id",required = false)
+    private Integer teacherId;
+
+    @ApiModelProperty(value = "教务老师id",required = false)
+    private Integer eduTeacherId;
+
+    @ApiModelProperty(value = "是否免费 1-免费 0收费",required = false)
+    private Integer isFree;
+
+    @ApiModelProperty(value = "学生评价",required = false)
+    private Integer studentReview;
+
+    @ApiModelProperty(value = "是否评价 1-评价 0未评价",required = false)
+    private Integer hasReview;
+
+    @ApiModelProperty(value = "是否提价作业 1-提交 0未提交",required = false)
+    private Integer hasHandHomework;
+
+    @ApiModelProperty(value = "是否完成双向沟通 1-是 0-否",required = false)
+    private Integer hasLiaison;
+
+    @ApiModelProperty(value = "教务评价",required = false)
+    private String courseReview;
+
+    @ApiModelProperty(value = "开始时间",required = false)
+    private String startTime;
+
+    @ApiModelProperty(value = "结束时间",required = false)
+    private String endTime;
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getOrganId() {
+        return organId;
+    }
+
+    public void setOrganId(String organId) {
+        this.organId = organId;
+    }
+
+
+    public Integer getIsFree() {
+        return isFree;
+    }
+
+    public void setIsFree(Integer isFree) {
+        this.isFree = isFree;
+    }
+
+
+    public Integer getEduTeacherId() {
+        return eduTeacherId;
+    }
+
+    public void setEduTeacherId(Integer eduTeacherId) {
+        this.eduTeacherId = eduTeacherId;
+    }
+
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Integer getStudentReview() {
+        return studentReview;
+    }
+
+    public void setStudentReview(Integer studentReview) {
+        this.studentReview = studentReview;
+    }
+
+    public Integer getHasReview() {
+        return hasReview;
+    }
+
+    public void setHasReview(Integer hasReview) {
+        this.hasReview = hasReview;
+    }
+
+    public Integer getHasHandHomework() {
+        return hasHandHomework;
+    }
+
+    public void setHasHandHomework(Integer hasHandHomework) {
+        this.hasHandHomework = hasHandHomework;
+    }
+
+    public String getCourseReview() {
+        return courseReview;
+    }
+
+    public void setCourseReview(String courseReview) {
+        this.courseReview = courseReview;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getHasLiaison() {
+        return hasLiaison;
+    }
+
+    public void setHasLiaison(Integer hasLiaison) {
+        this.hasLiaison = hasLiaison;
+    }
+}

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/PracticeGroupQueryInfo.java

@@ -22,8 +22,18 @@ public class PracticeGroupQueryInfo extends QueryInfo {
 
     private Integer hasReport;
 
+    private Integer educationalTeacherId;
+
     private boolean isExport = false;
 
+    public Integer getEducationalTeacherId() {
+        return educationalTeacherId;
+    }
+
+    public void setEducationalTeacherId(Integer educationalTeacherId) {
+        this.educationalTeacherId = educationalTeacherId;
+    }
+
     public boolean getIsExport() {
         return isExport;
     }

+ 32 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TenantEntryActivitesQueryInfo.java

@@ -0,0 +1,32 @@
+package com.ym.mec.biz.dal.page;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+import com.ym.mec.common.page.QueryInfo;
+
+public class TenantEntryActivitesQueryInfo extends QueryInfo {
+
+	@ApiModelProperty(value = "开始时间", required = false)
+	private Date startDate;
+
+	private Boolean delFlag;
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Boolean getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(Boolean delFlag) {
+		this.delFlag = delFlag;
+	}
+
+}

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupQueryInfo.java

@@ -20,6 +20,16 @@ public class VipGroupQueryInfo extends QueryInfo {
 
     private boolean isExport = false;
 
+    private Integer educationalTeacherId;
+
+    public Integer getEducationalTeacherId() {
+        return educationalTeacherId;
+    }
+
+    public void setEducationalTeacherId(Integer educationalTeacherId) {
+        this.educationalTeacherId = educationalTeacherId;
+    }
+
     public boolean getIsExport() {
         return isExport;
     }

+ 59 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseReviewService.java

@@ -0,0 +1,59 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.entity.CourseScheduleReview;
+import com.ym.mec.biz.dal.page.CourseReview4EduQueryInfo;
+import com.ym.mec.biz.dal.page.CourseReviewQueryInfo;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.BaseService;
+
+
+
+public interface CourseReviewService extends BaseService<Integer, CourseScheduleReview> {
+	/**
+	 * 获取网管课列表
+	 * @param queryInfo
+	 * @return
+	 */
+	PageInfo<CourseReviewDto> findPracticeGroupReviews(CourseReviewQueryInfo queryInfo);
+
+
+	/**
+	 * 教务网管课评论列表
+	 * @param queryInfo
+	 * @return
+	 */
+	PageInfo<CourseScheduleReview> findPracticeGroupReviews4Edu(CourseReview4EduQueryInfo queryInfo);
+
+
+
+	/**
+	 * 添加网管课评论
+	 * @param courseScheduleReview
+	 * @return
+	 */
+	CourseScheduleReview addPracticeGroupReview(CourseScheduleReview courseScheduleReview);
+
+
+	/**
+	 * 获取评论详情
+	 * @param id
+	 * @return
+	 */
+	ReviewInfoDto getReviewInfo(Integer id);
+
+	/**
+	 * 获取课程信息
+	 * @return
+	 */
+	TeacherClassHeadInfo getCourseInfoHead(Integer id);
+
+	/**
+	 * 跟新评论信息
+	 * @param courseScheduleReview
+	 * @return
+	 */
+	CourseScheduleReview updateReview(CourseScheduleReview courseScheduleReview);
+
+
+}

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

@@ -443,7 +443,7 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	 * @param practiceGroupId
 	 * @param teacherId
 	 */
-	void practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId);
+	void practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId, Integer educationalTeacherId);
 
 	/**
 	 * 清空老师和学生考勤

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CoursesGroupService.java

@@ -9,6 +9,7 @@ import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.service.BaseService;
 
 import java.util.List;
+import java.util.Map;
 
 public interface CoursesGroupService extends BaseService<Long, CoursesGroup> {
 
@@ -40,6 +41,15 @@ public interface CoursesGroupService extends BaseService<Long, CoursesGroup> {
     GroupHeadInfoDto getGroupHeadInfo(Long courseScheduleId);
 
     /**
+     * @describe 获取课程组详情
+     * @author Joburgess
+     * @date 2020/3/12
+     * @param groupId:
+     * @return Map<String,Object>
+     */
+    Map<String,Object> getGroupDetail(Long groupId);
+
+    /**
      * @describe 购买课程组
      * @author Joburgess
      * @date 2020/3/11

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

@@ -1,11 +1,14 @@
 package com.ym.mec.biz.service;
 
+import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.enums.EmployeeOperateEnum;
 import com.ym.mec.biz.dal.page.EmployeeQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
+import java.util.List;
+
 public interface EmployeeService extends BaseService<Integer, Employee> {
 
     /**
@@ -40,4 +43,14 @@ public interface EmployeeService extends BaseService<Integer, Employee> {
      * 删除员工
      */
     void deleteEmployee(Long userId);
-}
+
+    /**
+     * @describe 根据角色和部门获取用户
+     * @author Joburgess
+     * @date 2020/3/12
+     * @param roleIds: 角色编号列表
+     * @param organIds: 用户编号列表
+     * @return java.util.List<com.ym.mec.biz.dal.dto.SimpleUserDto>
+     */
+    List<SimpleUserDto> findByRole(String roleIds,String organIds);
+}

+ 14 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/TenantEntryActivitesService.java

@@ -0,0 +1,14 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.TenantEntryActivites;
+import com.ym.mec.common.service.BaseService;
+
+public interface TenantEntryActivitesService extends BaseService<Integer, TenantEntryActivites> {
+
+	/**
+	 * 合并对象
+	 * @param tenantEntryActivites
+	 * @return
+	 */
+	public boolean merge(TenantEntryActivites tenantEntryActivites);
+}

+ 251 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseReviewServiceImpl.java

@@ -0,0 +1,251 @@
+package com.ym.mec.biz.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.enums.*;
+import com.ym.mec.biz.dal.page.CourseReview4EduQueryInfo;
+import com.ym.mec.biz.dal.page.CourseReviewQueryInfo;
+import com.ym.mec.biz.dal.page.PracticeGroupQueryInfo;
+import com.ym.mec.biz.service.*;
+import com.ym.mec.common.constant.CommonConstants;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.entity.ImGroupMember;
+import com.ym.mec.common.entity.ImGroupModel;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.IdGeneratorService;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.im.ImFeignService;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
+import com.ym.mec.util.collection.MapUtil;
+import com.ym.mec.util.date.DateUtil;
+import com.ym.mec.util.http.HttpUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+import org.springframework.util.CollectionUtils;
+
+import java.math.BigDecimal;
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.WeekFields;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+public class CourseReviewServiceImpl extends BaseServiceImpl<Integer, CourseScheduleReview> implements CourseReviewService {
+
+
+    @Autowired
+    private CourseScheduleReviewDao courseScheduleReviewDao;
+
+    @Autowired
+    private SubjectDao subjectDao;
+
+    @Autowired
+    private OrganizationDao organizationDao;
+
+    @Autowired
+    private CourseScheduleDao courseScheduleDao;
+
+    @Autowired
+    private PracticeGroupDao practiceGroupDao;
+
+    @Autowired
+    private ClassGroupService classGroupService;
+
+    @Autowired
+    private CourseHomeworkService courseHomeworkService;
+
+    @Autowired
+    private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
+
+    @Autowired
+    private StudentCourseHomeworkDao studentCourseHomeworkDao;
+
+    @Autowired
+    private CourseHomeworkDao courseHomeworkDao;
+
+
+    @Override
+    public BaseDAO<Integer, CourseScheduleReview> getDAO() {
+        return courseScheduleReviewDao;
+    }
+
+
+    @Override
+    public PageInfo<CourseReviewDto> findPracticeGroupReviews(CourseReviewQueryInfo queryInfo) {
+        PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<>();
+        MapUtil.populateMap(params, queryInfo);
+
+        List<CourseReviewDto> dataList = null;
+        int count = courseScheduleReviewDao.countPracticeGroupReviews(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            dataList = courseScheduleReviewDao.getPracticeGroupReviewList(params);
+            if (dataList != null && dataList.size() > 0) {
+                List<Integer> subjectIds = dataList.stream().map(CourseReviewDto::getSubjectId).distinct().collect(Collectors.toList());
+                Set<Integer> organIds = dataList.stream().map(CourseReviewDto::getOrganId).collect(Collectors.toSet());
+                //声部名称列表
+                Map<Long, String> subjectNames = MapUtil.convertMybatisMap(subjectDao.findBySubjecIds(StringUtils.join(subjectIds, ",")));
+                Map<Integer, String> organNames = MapUtil.convertMybatisMap(organizationDao.findOrganNameMapList(organIds));
+                dataList.forEach(e -> {
+                    e.setSubjectName(subjectNames.get(e.getSubjectId().intValue()));
+                    e.setOrganName(organNames.get(e.getOrganId()));
+                });
+            }
+        }
+        if (count == 0) {
+            dataList = new ArrayList<>();
+        }
+        pageInfo.setRows(dataList);
+        return pageInfo;
+    }
+
+    @Override
+    public PageInfo<CourseScheduleReview> findPracticeGroupReviews4Edu(CourseReview4EduQueryInfo queryInfo) {
+        PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<>();
+        MapUtil.populateMap(params, queryInfo);
+
+        List<CourseScheduleReview> dataList = null;
+        int count = courseScheduleReviewDao.countPracticeGroupReviews4Edu(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            dataList = courseScheduleReviewDao.getPracticeGroupReview4EduList(params);
+        }
+        if (count == 0) {
+            dataList = new ArrayList<>();
+        }
+        pageInfo.setRows(dataList);
+        return pageInfo;
+    }
+
+    @Override
+    public CourseScheduleReview addPracticeGroupReview(CourseScheduleReview courseScheduleReview) {
+        Integer courseScheduleId = courseScheduleReview.getCourseScheduleId();
+        if (courseScheduleId == null || courseScheduleId <= 0) {
+            throw new BizException("课程id必须大于0");
+        }
+        Date date = new Date();
+        CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId.longValue());
+        if (courseSchedule == null) {
+            throw new BizException("课程不存在");
+        }
+        PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(courseSchedule.getMusicGroupId()));
+
+        courseScheduleReview.setClassGroupId(courseSchedule.getClassGroupId());
+        courseScheduleReview.setEducationalTeacherId(practiceGroup.getEducationalTeacherId());
+        courseScheduleReview.setStudentId(practiceGroup.getStudentId());
+        courseScheduleReview.setCreateTime(date);
+        courseSchedule.setUpdateTime(date);
+        long num = courseScheduleReviewDao.insert(courseScheduleReview);
+        if (num <= 0) {
+            throw new BizException("评论提交失败,请重试");
+        }
+
+        if(StringUtils.isNotBlank(courseScheduleReview.getHomeWork())){
+            //新增课堂作业
+            CourseHomework courseHomework=new CourseHomework();
+            courseHomework.setCourseScheduleId(courseSchedule.getId());
+            courseHomework.setMusicGroupId(courseSchedule.getMusicGroupId());
+            courseHomework.setGroupType(courseSchedule.getGroupType());
+            courseHomework.setClassGroupId(courseSchedule.getClassGroupId());
+            courseHomework.setExpiryDate(DateUtil.addDays(date,7));
+            List<CourseScheduleStudentPayment> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findByCourseSchedule(courseSchedule.getId());
+
+            courseHomework.setExpectNum(CollectionUtils.isEmpty(courseScheduleStudentPayments)?0:courseScheduleStudentPayments.size());
+            courseHomeworkService.insert(courseHomework);
+
+            if(!CollectionUtils.isEmpty(courseScheduleStudentPayments)){
+                List<StudentCourseHomework> studentCourseHomeworks=new ArrayList<>();
+                for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) {
+                    StudentCourseHomework studentCourseHomework=new StudentCourseHomework();
+                    studentCourseHomework.setCourseHomeworkId(courseHomework.getId());
+                    studentCourseHomework.setUserId(courseScheduleStudentPayment.getUserId());
+                    studentCourseHomework.setCourseScheduleId(courseSchedule.getId());
+                    studentCourseHomework.setCreateTime(date);
+                    studentCourseHomework.setUpdateTime(date);
+                    studentCourseHomework.setStatus(YesOrNoEnum.NO);
+                    studentCourseHomework.setIsView(YesOrNoEnum.NO);
+                    studentCourseHomework.setIsReplied(YesOrNoEnum.NO);
+                    studentCourseHomeworks.add(studentCourseHomework);
+                }
+                studentCourseHomeworkDao.batchInsertStudentCourseHomeworkRecord(studentCourseHomeworks);
+            }
+        }
+
+        return courseScheduleReview;
+    }
+
+    @Override
+    public ReviewInfoDto getReviewInfo(Integer id) {
+        CourseScheduleReview courseScheduleReview = courseScheduleReviewDao.get(id);
+        if (courseScheduleReview == null) {
+            throw new BizException("评价不存在");
+        }
+        CourseHomework homework = courseHomeworkDao.findByCourseSchedule(courseScheduleReview.getCourseScheduleId().longValue());
+        courseScheduleReview.setHomeWork(homework.getContent());
+        CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleReview.getCourseScheduleId().longValue());
+
+        TeacherClassHeadInfo teacherClassGroupInfo = classGroupService.findTeacherClassGroupInfo(courseScheduleReview.getClassGroupId().longValue());
+        teacherClassGroupInfo.setClassDate(courseSchedule.getClassDate().toString());
+        teacherClassGroupInfo.setStartClassTime(courseSchedule.getStartClassTime().toString());
+        teacherClassGroupInfo.setEndClassTime(courseSchedule.getEndClassTime().toString());
+
+        ReviewInfoDto reviewInfoDto = new ReviewInfoDto();
+        reviewInfoDto.setCourseScheduleReview(courseScheduleReview);
+        reviewInfoDto.setTeacherClassHeadInfo(teacherClassGroupInfo);
+        return reviewInfoDto;
+    }
+
+    @Override
+    public TeacherClassHeadInfo getCourseInfoHead(Integer id) {
+        CourseSchedule courseSchedule = courseScheduleDao.get(id.longValue());
+        TeacherClassHeadInfo teacherClassGroupInfo = classGroupService.findTeacherClassGroupInfo(courseSchedule.getClassGroupId().longValue());
+        teacherClassGroupInfo.setClassDate(courseSchedule.getClassDate().toString());
+        teacherClassGroupInfo.setStartClassTime(courseSchedule.getStartClassTime().toString());
+        teacherClassGroupInfo.setEndClassTime(courseSchedule.getEndClassTime().toString());
+        return teacherClassGroupInfo;
+    }
+
+    @Override
+    public CourseScheduleReview updateReview(CourseScheduleReview courseScheduleReview) {
+        if (courseScheduleReview.getId() == null || courseScheduleReview.getId() <= 0) {
+            throw new BizException("评论id为空");
+        }
+        CourseScheduleReview review = courseScheduleReviewDao.get(courseScheduleReview.getId());
+        if(review == null){
+            throw new BizException("评论不存在");
+        }
+        courseScheduleReviewDao.update(courseScheduleReview);
+
+        if(StringUtils.isNotBlank(courseScheduleReview.getHomeWork())){
+            CourseHomework homework = courseHomeworkDao.findByCourseSchedule(courseScheduleReview.getCourseScheduleId().longValue());
+            if(!homework.getContent().equals(courseScheduleReview.getHomeWork())){
+                homework.setContent(courseScheduleReview.getHomeWork());
+                courseHomeworkDao.update(homework);
+            }
+        }
+
+        return courseScheduleReview;
+    }
+}

+ 25 - 11
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleEvaluateServiceImpl.java

@@ -68,7 +68,7 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
             Integer classGroupCourseTimes = courseScheduleEvaluateDao.getClassGroupCourseTimes(classGroup.getId());
             Date date = new Date();
             courseScheduleEvaluate.setTimes(classGroupCourseTimes);
-            courseScheduleEvaluate.setTotalMinutes(classGroupCourseTimes);
+            courseScheduleEvaluate.setTotalMinutes(classGroupCourseTimes*25);
             courseScheduleEvaluate.setMusicGroupId(classGroup.getMusicGroupId());
             courseScheduleEvaluate.setCreateTime(date);
             courseScheduleEvaluate.setUpdateTime(date);
@@ -135,26 +135,40 @@ public class CourseScheduleEvaluateServiceImpl extends BaseServiceImpl<Long, Cou
         List<CourseScheduleEvaluate> needPostReportPracticeGroups = practiceGroupDao.getNeedPostReportPracticeGroups(startDate, afterDate,afterDateIsLastDay);
 
         Map<Integer, Integer> courseTimesMap = new HashMap<>();
+        Map<Integer, Integer> reportCountMap = new HashMap<>();
         if (needPostReportPracticeGroups.size() > 0) {
             Date courseStartDate = DateUtil.addMonths(startDate, -1);
             List<Integer> classGroupIds = needPostReportPracticeGroups.stream().map(CourseScheduleEvaluate::getClassGroupId).collect(Collectors.toList());
             List<ClassGroup> reportCourseTimes = practiceGroupDao.getReportCourseTimes(classGroupIds, courseStartDate, startDate);
             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));
+            }
         }
-        for (CourseScheduleEvaluate needPostReportPracticeGroup : needPostReportPracticeGroups) {
+        Iterator<CourseScheduleEvaluate> iterator = needPostReportPracticeGroups.iterator();
+        while (iterator.hasNext()){
+            CourseScheduleEvaluate courseScheduleEvaluate = iterator.next();
+            if(reportCountMap.containsKey(courseScheduleEvaluate.getClassGroupId()) &&
+                    reportCountMap.get(courseScheduleEvaluate.getClassGroupId()) > 0){
+                iterator.remove();
+                continue;
+            }
             int times = 0;
-            if (courseTimesMap.containsKey(needPostReportPracticeGroup.getClassGroupId()) &&
-                    courseTimesMap.get(needPostReportPracticeGroup.getClassGroupId()) != null
+            if (courseTimesMap.containsKey(courseScheduleEvaluate.getClassGroupId()) &&
+                    courseTimesMap.get(courseScheduleEvaluate.getClassGroupId()) != null
             ) {
-                times = courseTimesMap.get(needPostReportPracticeGroup.getClassGroupId());
+                times = courseTimesMap.get(courseScheduleEvaluate.getClassGroupId());
             }
-            needPostReportPracticeGroup.setTimes(times);
-            needPostReportPracticeGroup.setTotalMinutes(times * needPostReportPracticeGroup.getTotalMinutes());
-            needPostReportPracticeGroup.setCreateTime(nowDate);
-            needPostReportPracticeGroup.setUpdateTime(nowDate);
-            needPostReportPracticeGroup.setStatus(0);
-            needPostReportPracticeGroup.setVersion(2);
+            courseScheduleEvaluate.setTimes(times);
+            courseScheduleEvaluate.setTotalMinutes(times * courseScheduleEvaluate.getTotalMinutes());
+            courseScheduleEvaluate.setCreateTime(nowDate);
+            courseScheduleEvaluate.setUpdateTime(nowDate);
+            courseScheduleEvaluate.setStatus(0);
+            courseScheduleEvaluate.setVersion(2);
         }
+
         if (needPostReportPracticeGroups.size() > 0) {
             courseScheduleEvaluateDao.batchAdd(needPostReportPracticeGroups);
         }

+ 18 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -16,19 +16,20 @@ import com.ym.mec.biz.dal.page.StudentCourseScheduleRecordQueryInfo;
 import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
 import com.ym.mec.biz.service.*;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.entity.ImGroupMember;
+import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.im.ImFeignService;
 import com.ym.mec.jiari.JiaRiFeignService;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.collection.ListUtil;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.json.JsonUtil;
-
 import feign.codec.DecodeException;
-
 import org.apache.commons.collections.ListUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -113,6 +114,8 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     private SysConfigService sysConfigService;
     @Autowired
     private SchoolDao schoolDao;
+    @Autowired
+	private ImFeignService imFeignService;
     
     @Autowired
     private CourseHomeworkService courseHomeworkService;
@@ -3768,7 +3771,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId) {
+    public void practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId, Integer educationalTeacherId) {
         SysUser user = sysUserFeignService.queryUserInfo();
         if (null == user) {
             throw new BizException("获取用户信息失败");
@@ -3784,6 +3787,17 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
             courseSchedules = courseSchedules.stream().filter(courseSchedule -> !courseSchedule.getActualTeacherId().equals(teacherId)).collect(Collectors.toList());
         }
 		PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(practiceGroupId));
+		ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(practiceGroupId, GroupType.PRACTICE.getCode());
+        if(Objects.nonNull(educationalTeacherId)&&!educationalTeacherId.equals(practiceGroup.getEducationalTeacherId())){
+			if(Objects.nonNull(practiceGroup.getEducationalTeacherId())){
+				ImGroupMember[] imGroupMembers = new ImGroupMember[]{new ImGroupMember(practiceGroup.getEducationalTeacherId().toString())};
+				imFeignService.groupQuit(new ImGroupModel(classGroup.getId().toString(), imGroupMembers, classGroup.getName()));
+			}
+
+			practiceGroup.setEducationalTeacherId(educationalTeacherId);
+			ImGroupMember[] newImGroupMemberList = new ImGroupMember[]{new ImGroupMember(practiceGroup.getEducationalTeacherId().toString())};
+			imFeignService.groupJoin(new ImGroupModel(classGroup.getId().toString(), newImGroupMemberList,classGroup.getName()));
+		}
 		if(Objects.nonNull(subjectId)&&!subjectId.equals(practiceGroup.getSubjectId())){
 			Subject subject = subjectDao.get(subjectId);
 			String groupName = practiceGroup.getName();
@@ -3791,14 +3805,13 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			groupName=subject.getName()+groupName;
 			practiceGroup.setName(groupName);
 			practiceGroup.setSubjectId(subjectId);
-			practiceGroupDao.update(practiceGroup);
-			ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(practiceGroupId, GroupType.PRACTICE.getCode());
 			classGroup.setSubjectIdList(subjectId.toString());
 			classGroup.setName(groupName);
 			classGroup.setSubjectIdList(subjectId.toString());
 			classGroupDao.update(classGroup);
 			courseScheduleDao.updateCourseNameByGroup(practiceGroupId,GroupType.PRACTICE,groupName);
 		}
+		practiceGroupDao.update(practiceGroup);
         classGroupTeacherMapperService.updateTeacher(practiceGroupId,teacherId,GroupType.PRACTICE.getCode());
         classGroupTeacherSalaryDao.updateTeacher(practiceGroupId,teacherId,GroupType.PRACTICE.getCode());
         practiceGroupDao.updateUserId(practiceGroupId,teacherId);

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CoursesGroupServiceImpl.java

@@ -280,6 +280,26 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
     }
 
     @Override
+    public Map<String, Object> getGroupDetail(Long groupId) {
+        if(Objects.isNull(groupId)){
+            throw new BizException("请指定课程组");
+        }
+        CoursesGroup coursesGroup = coursesGroupDao.get(groupId);
+        Teacher teacher = teacherDao.get(coursesGroup.getTeacherId());
+        Map<String, Object> result=new HashMap<>();
+        result.put("groupId", groupId);
+        result.put("groupName", coursesGroup.getName());
+        result.put("courseStartDate",coursesGroup.getCoursesStartDate());
+        result.put("courseEndDate", coursesGroup.getCoursesEndDate());
+        result.put("teacherName", teacher.getRealName());
+        result.put("introduction", teacher.getIntroduction());
+        result.put("lectureNum", teacher.getLectureNum());
+        List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(groupId.toString(), GroupType.COMM);
+        result.put("courseSchedules",groupNotStartCourses);
+        return result;
+    }
+
+    @Override
     @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public HttpResponseResult buyCourseGroup(Integer userId, Long courseGroupId, boolean isUseBalancePayment) {
         if(Objects.isNull(courseGroupId)){

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

@@ -24,7 +24,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;

+ 7 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EmployeeServiceImpl.java

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.dto.EmployeeDto;
+import com.ym.mec.biz.dal.dto.SimpleUserDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.enums.EmployeeOperateEnum;
@@ -157,4 +158,9 @@ public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  imp
 				break;
 		}
 	}
-}
+
+	@Override
+	public List<SimpleUserDto> findByRole(String roleIds, String organIds) {
+		return employeeDao.findByRole(roleIds,organIds);
+	}
+}

+ 27 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -120,6 +120,8 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
     private PracticeLessonApplyDao practiceLessonApplyDao;
     @Autowired
     private CourseScheduleEvaluateDao courseScheduleEvaluateDao;
+    @Autowired
+    private StudentRegistrationDao studentRegistrationDao;
 
     private static Map<Integer, Map<Integer, List<Integer>>> schoolSubjectTeachersMap;
 
@@ -1674,6 +1676,14 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 //            }
 //        }
 
+        List<String> musicGroupIds = studentRegistrationDao.queryStudentMusicGroup(practiceGroup.getStudentId());
+        if(!CollectionUtils.isEmpty(musicGroupIds)){
+            MusicGroup musicGroup = musicGroupDao.get(musicGroupIds.get(0));
+            if(Objects.nonNull(musicGroup)){
+                practiceGroup.setEducationalTeacherId(musicGroup.getEducationalTeacherId());
+            }
+        }
+
         List<Date> allCourseDates = new ArrayList<>();
         allCourseDates.add(practiceGroup.getFirstCourseTime());
         allCourseDates.add(practiceGroup.getSecondCourseTime());
@@ -2069,6 +2079,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
                 List<Integer> subjectIds = dataList.stream().map(practiceGroup -> practiceGroup.getSubjectId()).distinct().collect(Collectors.toList());
                 Set<Integer> organIds = dataList.stream().map(practiceGroup -> practiceGroup.getOrganId()).collect(Collectors.toSet());
                 List<String> practiceGroupIds = dataList.stream().map(e -> String.valueOf(e.getId())).distinct().collect(Collectors.toList());
+                List<Integer> educationalTeacherIds=dataList.stream().filter(data -> Objects.nonNull(data.getEducationalTeacherId())).map(PracticeGroupDto::getEducationalTeacherId).collect(Collectors.toList());
 
                 List<ClassGroup> classGroupsByVipGroups = classGroupDao
                         .findByMusicGroupsAndType(practiceGroupIds.stream().map(groupId -> String.valueOf(groupId)).collect(Collectors.toList()),
@@ -2081,6 +2092,10 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
                 //声部名称列表
                 Map<Long, String> subjectNames = MapUtil.convertMybatisMap(subjectDao.findBySubjecIds(StringUtils.join(subjectIds, ",")));
                 Map<Integer, String> organNames = MapUtil.convertMybatisMap(organizationDao.findOrganNameMapList(organIds));
+
+                List<SimpleUserDto> educationalUsers = employeeDao.findByIds(educationalTeacherIds);
+                Map<Integer, String> idNameMap = educationalUsers.stream().collect(Collectors.toMap(SimpleUserDto::getUserId, user -> user.getUserName()));
+
                 dataList.forEach(e -> {
                     e.setSubjectName(subjectNames.get(e.getSubjectId().intValue()));
                     e.setOrganName(organNames.get(e.getOrganId()));
@@ -2092,6 +2107,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
                     e.setTotalClassTimes(aLong == null ? 0 : aLong.intValue());
                     Long aLong1 = currentClassTimeMap.get(e.getId() + "");
                     e.setCurrentClassTimes(aLong1 == null ? 0 : aLong1.intValue());
+                    e.setEducationalTeacherName(idNameMap.get(e.getEducationalTeacherId()));
                 });
             }
         }
@@ -2684,11 +2700,22 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
                     courseStartDay=lastExpiredDay;
                 }
                 practiceGroupBuyParams.setBeRenewGroupId(practiceGroupBuyParams.getGroupId());
+                practiceGroupBuyParams.setEducationalTeacherId(userLatestPracticeGroup.getEducationalTeacherId());
             }else{
                 return BaseController.failed(HttpStatus.EXPECTATION_FAILED, "需要续费的课程组不存在");
             }
         }
 
+        if(Objects.isNull(practiceGroupBuyParams.getEducationalTeacherId())){
+            List<String> musicGroupIds = studentRegistrationDao.queryStudentMusicGroup(practiceGroupBuyParams.getStudentId());
+            if(!CollectionUtils.isEmpty(musicGroupIds)){
+                MusicGroup musicGroup = musicGroupDao.get(musicGroupIds.get(0));
+                if(Objects.nonNull(musicGroup)){
+                    practiceGroupBuyParams.setEducationalTeacherId(musicGroup.getEducationalTeacherId());
+                }
+            }
+        }
+
         courseStartDay=courseStartDay.plusDays(1);
         Date courseStartDate=Date.from(courseStartDay.atStartOfDay(DateUtil.zoneId).toInstant());
         practiceGroupBuyParams.setCoursesStartDate(courseStartDate);

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

@@ -19,7 +19,7 @@ import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.string.MessageFormatter;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;

+ 51 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantEntryActivitesServiceImpl.java

@@ -0,0 +1,51 @@
+package com.ym.mec.biz.service.impl;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.TenantEntryActivitesDao;
+import com.ym.mec.biz.dal.entity.TenantEntryActivites;
+import com.ym.mec.biz.service.TenantEntryActivitesService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class TenantEntryActivitesServiceImpl extends BaseServiceImpl<Integer, TenantEntryActivites> implements TenantEntryActivitesService {
+
+	@Autowired
+	private TenantEntryActivitesDao tenantEntryActivitesDao;
+
+	@Override
+	public BaseDAO<Integer, TenantEntryActivites> getDAO() {
+		return tenantEntryActivitesDao;
+	}
+
+	@Override
+	public boolean merge(TenantEntryActivites tenantEntryActivites) {
+
+		if (!tenantEntryActivites.getStartDate().before(tenantEntryActivites.getEndDate())) {
+			throw new BizException("活动开始时间必须在结束时间之前");
+		}
+
+		Date date = new Date();
+		if (tenantEntryActivites.getId() != null) {
+			TenantEntryActivites orginTenantEntryActivites = tenantEntryActivitesDao.get(tenantEntryActivites.getId());
+
+			if (orginTenantEntryActivites == null) {
+				throw new BizException("操作失败,请检查输入参数");
+			}
+			tenantEntryActivites.setCreateTime(orginTenantEntryActivites.getCreateTime());
+			tenantEntryActivites.setUpdateTime(date);
+			tenantEntryActivitesDao.update(tenantEntryActivites);
+		} else {
+			tenantEntryActivites.setCreateTime(date);
+			tenantEntryActivites.setUpdateTime(date);
+			tenantEntryActivitesDao.insert(tenantEntryActivites);
+		}
+		return true;
+	}
+
+}

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

@@ -121,6 +121,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	private IdGeneratorService idGeneratorService;
 	@Autowired
 	private StudentAttendanceDao studentAttendanceDao;
+	@Autowired
+	private EmployeeDao employeeDao;
 
 	private static final Logger LOGGER = LoggerFactory
 			.getLogger(VipGroup.class);
@@ -568,6 +570,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 				List<String> vipGroupIds = dataList.stream().map(vipGroup -> String.valueOf(vipGroup.getId())).distinct().collect(Collectors.toList());
 				List<Map<Long, Integer>> vipGroupOverCourses = courseScheduleDao.countGroupOverCourse(vipGroupIds,"VIP");
 				Map<String,Integer> vipGroupOverCourseMaps = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(vipGroupOverCourses)),HashMap.class);
+				List<Integer> educationalTeacherIds=dataList.stream().filter(data -> Objects.nonNull(data.getEducationalTeacherId())).map(VipGroup::getEducationalTeacherId).collect(Collectors.toList());
 
 				List<ClassGroup> classGroupsByVipGroups = classGroupDao
 						.findByMusicGroupsAndType(vipGroupIds.stream().map(vipGroupId->String.valueOf(vipGroupId)).collect(Collectors.toList()),
@@ -578,6 +581,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 				Map<String,Long> totalClassTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalCourseScheduleNum(vipGroupIds,"VIP"));
 				Map<String,Long> currentClassTimeMap = MapUtil.convertIntegerMap(courseScheduleDao.countCourseScheduleNum(vipGroupIds,"VIP"));
 
+				List<SimpleUserDto> educationalUsers = employeeDao.findByIds(educationalTeacherIds);
+				Map<Integer, String> idNameMap = educationalUsers.stream().collect(Collectors.toMap(SimpleUserDto::getUserId, user -> user.getUserName()));
+
 				dataList.forEach(vipGroup -> {
 					Integer overCourses = vipGroupOverCourseMaps.get(vipGroup.getId().toString());
 					ClassGroup classGroup = vipGroupClassGroupMap.get(vipGroup.getId().toString());
@@ -590,6 +596,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 					Long aLong1 = currentClassTimeMap.get(vipGroup.getId() + "");
 					vipGroup.setCurrentClassTimes(aLong1==null?0:aLong1.intValue());
 
+					vipGroup.setEducationalTeacherName(idNameMap.get(vipGroup.getEducationalTeacherId()));
+
 					Integer totalClassTimes=vipGroup.getTotalClassTimes();
 					if(Objects.isNull(totalClassTimes) || Objects.isNull(overCourses)){
 						vipGroup.setMonthConsumeRate(0);

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

@@ -90,21 +90,16 @@
 			<if test="expectNum != null">
 				expect_num_ = #{expectNum},
 			</if>
-			<if test="updateTime != null">
-				update_time_ = NOW(),
-			</if>
 			<if test="content != null">
 				content_ = #{content},
 			</if>
 			<if test="musicGroupId != null">
 				music_group_id_ = #{musicGroupId},
 			</if>
-			<if test="createTime != null">
-				create_time_ = #{createTime},
-			</if>
 			<if test="expiryDate != null">
 				expiry_date_ = #{expiryDate},
 			</if>
+			update_time_ = NOW()
 		</set>
 		WHERE id_ = #{id}
 	</update>

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

@@ -233,4 +233,13 @@
     <select id="getClassGroupCourseTimes" resultType="int">
         SELECT COUNT(*) FROM course_schedule WHERE class_group_id_ = #{classGroupId} AND (del_flag_=0 OR del_flag_ IS NULL)
     </select>
+
+    <select id="hasReportList" resultMap="CourseScheduleEvaluate">
+        SELECT COUNT(*) times_, class_group_id_ FROM course_schedule_evaluate WHERE class_group_id_ IN
+        <foreach collection="classGroupIds" item="classGroupId" open="(" separator="," close=")">
+            #{classGroupId}
+        </foreach>
+        AND DATE_FORMAT(create_time_,'%Y%m%d') = DATE_FORMAT(#{nowDate},'%Y%m%d')
+        GROUP BY class_group_id_;
+    </select>
 </mapper>

+ 251 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleReviewMapper.xml

@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ym.mec.biz.dal.dao.CourseScheduleReviewDao">
+    <resultMap id="CourseScheduleReview" type="com.ym.mec.biz.dal.entity.CourseScheduleReview">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="course_schedule_id_" jdbcType="INTEGER" property="courseScheduleId"/>
+        <result column="class_group_id_" jdbcType="INTEGER" property="classGroupId"/>
+        <result column="teacher_id_" jdbcType="INTEGER" property="teacherId"/>
+        <result column="educational_teacher_id_" jdbcType="INTEGER" property="educationalTeacherId"/>
+        <result column="student_id_" jdbcType="INTEGER" property="studentId"/>
+        <result column="teaching_material_" jdbcType="VARCHAR" property="teachingMaterial"/>
+        <result column="song_" jdbcType="VARCHAR" property="song"/>
+        <result column="memo_" jdbcType="VARCHAR" property="memo"/>
+        <result column="pronunciation_" jdbcType="INTEGER" property="pronunciation"/>
+        <result column="tempo_" jdbcType="INTEGER" property="tempo"/>
+        <result column="music_theory_" jdbcType="INTEGER" property="musicTheory"/>
+        <result column="has_liaison_" jdbcType="TINYINT" property="hasLiaison"/>
+        <result column="hand_homework_" jdbcType="TINYINT" property="handHomework"/>
+        <result column="course_review_" jdbcType="VARCHAR" property="courseReview"/>
+        <result column="student_review_" jdbcType="TINYINT" property="studentReview"/>
+        <result column="create_time_" jdbcType="DATE" property="createTime"/>
+        <result column="update_time_" jdbcType="DATE" property="updateTime"/>
+        <result column="coursre_name_" jdbcType="VARCHAR" property="courseName"/>
+        <result column="teacher_name_" jdbcType="VARCHAR" property="teacherName"/>
+        <result column="class_date_" jdbcType="DATE" property="classDate"/>
+    </resultMap>
+
+    <select id="get" parameterType="java.lang.Integer" resultMap="CourseScheduleReview">
+        select * from course_schedule_review
+        where id_ = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="delete" parameterType="java.lang.Integer">
+        delete
+        from course_schedule_review
+        where id_ = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleReview"
+            useGeneratedKeys="true">
+        <!--@mbg.generated-->
+        insert into course_schedule_review (course_schedule_id_, class_group_id_, teacher_id_,
+        educational_teacher_id_, student_id_, teaching_material_,
+        song_, memo_, pronunciation_,
+        tempo_, music_theory_, has_liaison_,
+        hand_homework_, course_review_, create_time_,
+        update_time_)
+        values (#{courseScheduleId,jdbcType=INTEGER}, #{classGroupId,jdbcType=INTEGER}, #{teacherId,jdbcType=INTEGER},
+        #{educationalTeacherId,jdbcType=INTEGER}, #{studentId,jdbcType=INTEGER}, #{teachingMaterial,jdbcType=VARCHAR},
+        #{song,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, #{pronunciation,jdbcType=INTEGER},
+        #{tempo,jdbcType=INTEGER}, #{musicTheory,jdbcType=INTEGER}, #{hasLiaison,jdbcType=TINYINT},
+        #{handHomework,jdbcType=TINYINT}, #{courseReview,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+        #{updateTime,jdbcType=TIMESTAMP})
+    </insert>
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleReview">
+        <!--@mbg.generated-->
+        update course_schedule_review
+        <set>
+            <if test="courseScheduleId != null">
+                course_schedule_id_ = #{courseScheduleId,jdbcType=INTEGER},
+            </if>
+            <if test="classGroupId != null">
+                class_group_id_ = #{classGroupId,jdbcType=INTEGER},
+            </if>
+            <if test="teacherId != null">
+                teacher_id_ = #{teacherId,jdbcType=INTEGER},
+            </if>
+            <if test="educationalTeacherId != null">
+                educational_teacher_id_ = #{educationalTeacherId,jdbcType=INTEGER},
+            </if>
+            <if test="studentId != null">
+                student_id_ = #{studentId,jdbcType=INTEGER},
+            </if>
+            <if test="teachingMaterial != null">
+                teaching_material_ = #{teachingMaterial,jdbcType=VARCHAR},
+            </if>
+            <if test="song != null">
+                song_ = #{song,jdbcType=VARCHAR},
+            </if>
+            <if test="memo != null">
+                memo_ = #{memo,jdbcType=VARCHAR},
+            </if>
+            <if test="pronunciation != null">
+                pronunciation_ = #{pronunciation,jdbcType=INTEGER},
+            </if>
+            <if test="tempo != null">
+                tempo_ = #{tempo,jdbcType=INTEGER},
+            </if>
+            <if test="musicTheory != null">
+                music_theory_ = #{musicTheory,jdbcType=INTEGER},
+            </if>
+            <if test="hasLiaison != null">
+                has_liaison_ = #{hasLiaison,jdbcType=TINYINT},
+            </if>
+            <if test="handHomework != null">
+                hand_homework_ = #{handHomework,jdbcType=TINYINT},
+            </if>
+            <if test="courseReview != null">
+                course_review_ = #{courseReview,jdbcType=VARCHAR},
+            </if>
+            <if test="studentReview != null">
+                student_review_ = #{studentReview,jdbcType=TINYINT},
+            </if>
+            <if test="createTime != null">
+                create_time_ = #{createTime,jdbcType=DATE},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime,jdbcType=DATE},
+            </if>
+        </set>
+        where id_ = #{id,jdbcType=INTEGER}
+    </update>
+    <resultMap id="CourseReviewDto" type="com.ym.mec.biz.dal.dto.CourseReviewDto">
+        <id column="id_" jdbcType="INTEGER" property="id"/>
+        <result column="subject_id_" jdbcType="INTEGER" property="subjectId"/>
+        <result column="organ_id_" jdbcType="INTEGER" property="organId"/>
+        <result column="class_date_" jdbcType="DATE" property="classDate"/>
+        <result column="coursre_name_" jdbcType="VARCHAR" property="courseName"/>
+        <result column="teacher_name_" jdbcType="VARCHAR" property="teacherName"/>
+        <result column="edu_teacher_name_" jdbcType="VARCHAR" property="eduTeacherName"/>
+        <result column="buy_months_" property="BuyMonths"/>
+        <result column="review_id_" property="reviewId"/>
+        <result column="student_review_" property="studentReview"/>
+        <result column="hand_homework_" property="handHomework"/>
+        <result column="course_review_" property="courseReview"/>
+    </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)
+            <if test="organId != null">
+                AND FIND_IN_SET(pg.organ_id_,#{organId})
+            </if>
+            <if test="subjectId != null">
+                AND pg.subject_id_=#{subjectId}
+            </if>
+            <if test="teacherId != null">
+                AND cs.actual_teacher_id_=#{teacherId}
+            </if>
+            <if test="eduTeacherId != null">
+                AND pg.educational_teacher_id_=#{eduTeacherId}
+            </if>
+            <if test='isFree !=null and isFree=="0"'>
+                AND pg.buy_months_ > 0
+            </if>
+            <if test='isFree !=null and isFree=="1"'>
+                AND pg.buy_months_ IS NULL
+            </if>
+            <if test="studentReview !=null">
+                AND pg.student_review_ =#{studentReview}
+            </if>
+            <if test='hasReview !=null and hasReview=="1"'>
+                AND csr.id_ > 0
+            </if>
+            <if test='hasReview !=null and hasReview=="0"'>
+                AND csr.id_ IS NULL
+            </if>
+            <if test='hasHandHomework !=null and hasHandHomework=="1"'>
+                AND csr.hand_homework_ = 1
+            </if>
+            <if test='hasHandHomework !=null and hasHandHomework=="0"'>
+                AND csr.hand_homework_ IS NULL
+            </if>
+            <if test='hasLiaison !=null and hasLiaison=="1"'>
+                AND csr.has_liaison_ = 1
+            </if>
+            <if test='hasLiaison !=null and hasLiaison=="0"'>
+                AND (csr.has_liaison_ = 0 OR csr.has_liaison_ IS NULL
+            </if>
+            <if test="courseReview != null">
+                AND csr.course_review_=#{courseReview}
+            </if>
+            <if test="startTime !=null">
+                <![CDATA[AND cs.class_date_ >= #{startTime} ]]>
+            </if>
+            <if test="endTime !=null">
+                <![CDATA[AND cs.class_date_ <= #{endTime} ]]>
+            </if>
+        </where>
+    </sql>
+
+    <select id="getPracticeGroupReviewList" resultMap="CourseReviewDto">
+        SELECT cs.id_,cs.class_date_, pg.subject_id_,pg.organ_id_,pg.name_ coursre_name_,su.real_name_ teacher_name_,edsu.real_name_
+        edu_teacher_name_,pg.buy_months_,csr.id_ review_id_, csr.student_review_,csr.hand_homework_,csr.course_review_
+        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_
+        <include refid="practiceGroupReviewsQueryCondition"/>
+        <include refid="global.limit"/>
+    </select>
+
+    <select id="countPracticeGroupReviews" resultType="java.lang.Integer">
+        SELECT count(*) FROM course_schedule cs
+        LEFT JOIN practice_group pg ON cs.music_group_id_ = pg.id_
+        LEFT JOIN course_schedule_review csr on cs.id_ = csr.course_schedule_id_
+        <include refid="practiceGroupReviewsQueryCondition"/>
+    </select>
+
+    <sql id="practiceGroupReviews4EduQueryCondition">
+        <where>
+            <if test="eduTeacherId != null">
+                AND pg.educational_teacher_id_=#{eduTeacherId}
+            </if>
+            <if test='hasReview !=null and hasReview=="1"'>
+                AND csr.course_review_ IS NOT NULL
+            </if>
+            <if test='hasReview !=null and hasReview=="0"'>
+                AND csr.course_review_ IS NULL
+            </if>
+            <if test='hasHandHomework !=null and hasHandHomework=="1"'>
+                AND csr.hand_homework_ = 1
+            </if>
+            <if test='hasHandHomework !=null and hasHandHomework=="0"'>
+                AND csr.hand_homework_ IS NULL
+            </if>
+            <if test='hasLiaison !=null and hasLiaison=="1"'>
+                AND csr.has_liaison_ = 1
+            </if>
+            <if test='hasLiaison !=null and hasLiaison=="0"'>
+                AND csr.has_liaison_ = 0
+            </if>
+            <if test="startTime !=null">
+                <![CDATA[AND cs.class_date_ >= #{startTime} ]]>
+            </if>
+            <if test="endTime !=null">
+                <![CDATA[AND cs.class_date_ <= #{endTime} ]]>
+            </if>
+        </where>
+    </sql>
+
+    <select id="getPracticeGroupReview4EduList" resultMap="CourseScheduleReview">
+        SELECT csr.id_,cs.class_date_, pg.name_ coursre_name_,su.real_name_ teacher_name_,csr.hand_homework_
+        FROM course_schedule_review csr
+        LEFT JOIN course_schedule cs on cs.id_ = csr.course_schedule_id_
+        LEFT JOIN practice_group pg ON cs.music_group_id_ = pg.id_
+        LEFT JOIN sys_user su ON cs.actual_teacher_id_ = su.id_
+        <include refid="practiceGroupReviews4EduQueryCondition"/>
+        <include refid="global.limit"/>
+    </select>
+
+
+    <select id="countPracticeGroupReviews4Edu" resultType="java.lang.Integer">
+        SELECT count(*) FROM course_schedule_review csr
+        LEFT JOIN course_schedule cs on cs.id_ = csr.course_schedule_id_
+        LEFT JOIN practice_group pg ON cs.music_group_id_ = pg.id_
+        <include refid="practiceGroupReviews4EduQueryCondition"/>
+    </select>
+
+
+</mapper>

+ 5 - 6
mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml

@@ -307,18 +307,17 @@
 		select sum(case when dgcp.status_ = 0 then 1 else 0 end) unbooked_num_,
 		sum(case when dgcp.status_ = 1 then 1 else 0 end) booked_num_
 		from demo_group_courses_plan dgcp left join demo_group dg on dgcp.demo_group_id_ = dg.id_
-		<where>
-            <if test="organIds != null">
-                AND INTE_ARRAY(dg.organ_id_list_,#{organIds})
-            </if>
-    	</where> 
+		where INTE_ARRAY(dg.organ_id_list_,'36,38') = 0
+        <if test="organIds != null">
+            AND INTE_ARRAY(dg.organ_id_list_,#{organIds})
+        </if>
 	</select>
     
     <select id="queryCurrentMonthCoursesNum" resultType="int">
     	select count(cs.id_) from course_schedule cs
         left join demo_group vg on cs.music_group_id_ = vg.id_
         where cs.type_ = 'DEMO'
-  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null)
+  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null) and INTE_ARRAY(vg.organ_id_list_,'36,38') = 0
         <if test="organIds != null">
             AND INTE_ARRAY(vg.organ_id_list_,#{organIds})
         </if>

+ 24 - 0
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -228,4 +228,28 @@
     <select id="queryUserRole" resultType="java.lang.Integer">
         SELECT sur.role_id_ FROM sys_user_role sur WHERE sur.user_id_ = #{userId}
     </select>
+
+    <select id="findByRole" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
+        SELECT
+          su.id_ userId,
+          su.real_name_ userName,
+          su.avatar_ avatar
+        FROM
+            sys_user su
+            LEFT JOIN sys_user_role sur ON su.id_ = sur.user_id_
+            LEFT JOIN employee e ON e.user_id_ = su.id_
+        WHERE
+            FIND_IN_SET(sur.role_id_, #{roleIds})
+            <if test="organIds!=null and organIds!=''">
+                AND INTE_ARRAY(e.organ_id_list_,#{organIds})
+            </if>
+    </select>
+    <select id="findByIds" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
+        SELECT su.id_ userId,su.real_name_ userName
+        FROM sys_user
+        WHERE id_ IN
+        <foreach collection="userIds" item="userId" separator="," open="(" close=")">
+            #{userId}
+        </foreach>
+    </select>
 </mapper>

+ 5 - 6
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -304,11 +304,10 @@
     
   	<select id="queryOrganMusicGroupNum" resultType="map">
     	select count(*) total,sum(case when status_ = 'PREPARE' then 1 else 0 end) prepare_num_,sum(case when status_ = 'PROGRESS' then 1 else 0 end) progress_num_,sum(case when status_ = 'PAUSE' then 1 else 0 end) pause_num_ from music_group
-    	<where>
-    		<if test="organId != null">
-    			FIND_IN_SET(organ_id_,#{organId})
-    		</if>
-    	</where>
+   		where organ_id_ not in (36,38)
+   		<if test="organId != null">
+   			and FIND_IN_SET(organ_id_,#{organId})
+   		</if>
   	</select>
   	
   	<select id="queryCurrentMonthCoursesNum" resultType="int">
@@ -316,7 +315,7 @@
 		left join class_group cg on cs.class_group_id_ = cg.id_
 		left join music_group mg on cg.music_group_id_ = mg.id_
 		where cs.group_type_ = 'MUSIC' AND cg.group_type_ = 'MUSIC'
-  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null)
+  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null) and mg.organ_id_ not in (36,38)
    		<if test="organId != null">
    			AND FIND_IN_SET(mg.organ_id_,#{organId})
    		</if>

+ 9 - 5
mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml

@@ -236,6 +236,9 @@
             <if test="organId != null">
                 AND FIND_IN_SET(pg.organ_id_,#{organId})
             </if>
+            <if test="educationalTeacherId!=null">
+                AND pg.educational_teacher_id_=#{educationalTeacherId}
+            </if>
         </where>
     </sql>
 
@@ -269,7 +272,7 @@
 
     <sql id="practiceGroupReviewsQueryCondition">
         <where>
-            pg.group_status_='NORMAL'
+            pg.group_status_ != 'CANCEL' AND pg.group_status_ != 'LOCK'
             <if test="month != null">
                 AND DATE_FORMAT(cse.create_time_, '%Y-%m') = #{month}
             </if>
@@ -292,11 +295,11 @@
                 AND pg.buy_months_ IS NULL
             </if>
             <if test='isOver !=null and isOver=="0"'>
-                <![CDATA[AND pg.courses_expire_date_ > NOW()
+                <![CDATA[AND pg.group_status_ = 'NORMAL'
 			]]>
             </if>
             <if test='isOver !=null and isOver=="1"'>
-                <![CDATA[ AND pg.courses_expire_date_ <= NOW()
+                <![CDATA[ AND pg.group_status_ ='FINISH'
 			]]></if>
             <if test='hasReport !=null and hasReport=="0"'>
                 <![CDATA[AND cse.status_ =0
@@ -336,7 +339,9 @@
                pg.single_class_minutes_ total_minutes_
         FROM practice_group pg
                  LEFT JOIN class_group cg on pg.id_ = cg.music_group_id_ AND cg.group_type_ = 'PRACTICE'
-        WHERE pg.courses_start_date_ <= #{nowDate,jdbcType=DATE}
+        WHERE cg.group_type_ = 'PRACTICE'
+          AND pg.buy_months_ >= 1
+          AND pg.courses_start_date_ <= #{nowDate,jdbcType=DATE}
           AND pg.courses_expire_date_ >= #{afterDate,jdbcType=DATE}
         ]]>
         <if test="afterDateIsLastDay == false">
@@ -348,7 +353,6 @@
           AND cg.del_flag_ = 0
           AND pg.group_status_ != 'CANCEL'
           AND pg.group_status_ != 'LOCK'
-
     </select>
 
     <select id="getReportCourseTimes" resultMap="com.ym.mec.biz.dal.dao.ClassGroupDao.ClassGroup">

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

@@ -522,7 +522,7 @@
     <select id="queryIncomeStatisticsWithCurrentMonth" resultType="map">
         select count(*) total,sum(actual_amount_) total_num_ from student_payment_order
         where actual_amount_ &gt; 0 and DATE_FORMAT(create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) AND
-        status_ = 'SUCCESS'
+        status_ = 'SUCCESS' and organ_id_ not in (36,38)
         <if test="organId != null">
             and FIND_IN_SET(organ_id_,#{organId})
         </if>

+ 4 - 5
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -502,11 +502,10 @@
     <select id="queryStudentNum" resultType="map">
         SELECT count(distinct sr.user_id_) total_num_,sum(case when sr.create_time_ >= timestamp(date_add(curdate(), interval - day(curdate()) + 1 day)) then 1 else 0 end) new_num_,sum(case when sr.music_group_status_ = 'QUIT' and sr.update_time_ >= timestamp(date_add(curdate(), interval - day(curdate()) + 1 day)) then 1 else 0 end) quit_num_
         FROM student_registration sr left join music_group mg on sr.music_group_id_ = mg.id_
-        <where>
-    		<if test="organId != null">
-    			AND FIND_IN_SET(mg.organ_id_,#{organId})
-    		</if>
-    	</where>
+        where mg.organ_id_ not in (36,38)
+   		<if test="organId != null">
+   			AND FIND_IN_SET(mg.organ_id_,#{organId})
+   		</if>
     </select>
     <select id="findMapByMusicGroupId" resultType="java.util.Map">
         SELECT sr.user_id_ 'key',MIN(sr.parents_phone_) 'value' FROM student_registration sr

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

@@ -194,7 +194,7 @@
         sucad.type_ = 'REWARDS' or sucad.type_ = 'WAGE') then sucad.amount_ else 0 end) expend_total_ from
         sys_user_cash_account_detail sucad
         left join sys_user u on sucad.user_id_ = u.id_
-        where sucad.status_ = 'SUCCESS' and DATE_FORMAT(sucad.create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' )
+        where sucad.status_ = 'SUCCESS' and DATE_FORMAT(sucad.create_time_, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) and u.organ_id_ not in (36,38)
         <if test="organId != null">
             AND FIND_IN_SET(u.organ_id_,#{organId})
         </if>

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

@@ -662,7 +662,7 @@
     <select id="queryOrganTeacherNum" resultType="map">
         select count(*) total,sum(case when job_nature_ = 'PART_TIME' then 1 else 0 end) part_time_num_,sum(case when
         job_nature_ = 'FULL_TIME' then 1 else 0 end) full_time_num_ from teacher
-        where demission_date_ is null
+        where demission_date_ is null and organ_id_ not in (36,38)
             <if test="organId != null">
                 and FIND_IN_SET(organ_id_,#{organId})
             </if>

+ 122 - 0
mec-biz/src/main/resources/config/mybatis/TenantEntryActivitesMapper.xml

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
+<mapper namespace="com.ym.mec.biz.dal.dao.TenantEntryActivitesDao">
+
+	<resultMap type="com.ym.mec.biz.dal.entity.TenantEntryActivites"
+		id="TenantEntryActivites">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="cover_img_" property="coverImg" />
+		<result column="detail_" property="detail" />
+		<result column="total_price_" property="totalPrice" />
+		<result column="discount_price_" property="discountPrice" />
+		<result column="give_minutes_" property="giveMinutes" />
+		<result column="start_date_" property="startDate" />
+		<result column="end_date_" property="endDate" />
+		<result column="condition_" property="condition" />
+		<result column="del_flag_" property="delFlag" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<sql id="queryCondition">
+		<where>
+			<if test="startDate != null">
+				and (start_date_ &gt;= #{startDate} and end_date_ &lt;= #{startDate})
+			</if>
+			<if test="delFlag != null">
+				and del_flag_ = #{delFlag}
+			</if>
+		</where>
+	</sql>
+
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="TenantEntryActivites">
+		SELECT * FROM tenant_entry_activites WHERE id_ = #{id}
+	</select>
+
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="TenantEntryActivites">
+		SELECT * FROM
+		tenant_entry_activites ORDER BY id_
+	</select>
+
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.TenantEntryActivites"
+		useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
+			AS ID FROM DUAL </selectKey> -->
+		INSERT INTO tenant_entry_activites
+		(id_,name_,cover_img_,detail_,total_price_,discount_price_,give_minutes_,start_date_,end_date_,condition_,del_flag_,create_time_,update_time_)
+		VALUES(#{id},#{name},#{coverImg},#{detail},#{totalPrice},#{discountPrice},#{giveMinutes},#{startDate},#{endDate},#{condition},#{delFlag},#{createTime},#{updateTime})
+	</insert>
+
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.TenantEntryActivites">
+		UPDATE tenant_entry_activites
+		<set>
+			<if test="condition != null">
+				condition_ = #{condition},
+			</if>
+			<if test="delFlag != null">
+				del_flag_ = #{delFlag},
+			</if>
+			<if test="startDate != null">
+				start_date_ = #{startDate},
+			</if>
+			<if test="coverImg != null">
+				cover_img_ = #{coverImg},
+			</if>
+			<if test="id != null">
+				id_ = #{id},
+			</if>
+			<if test="giveMinutes != null">
+				give_minutes_ = #{giveMinutes},
+			</if>
+			<if test="name != null">
+				name_ = #{name},
+			</if>
+			<if test="createTime != null">
+				create_time_ = #{createTime},
+			</if>
+			<if test="totalPrice != null">
+				total_price_ = #{totalPrice},
+			</if>
+			<if test="detail != null">
+				detail_ = #{detail},
+			</if>
+			<if test="endDate != null">
+				end_date_ = #{endDate},
+			</if>
+			<if test="updateTime != null">
+				update_time_ = #{updateTime},
+			</if>
+			<if test="discountPrice != null">
+				discount_price_ = #{discountPrice},
+			</if>
+		</set>
+		WHERE id_ = #{id}
+	</update>
+
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete">
+		DELETE FROM tenant_entry_activites WHERE id_ = #{id}
+	</delete>
+
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="TenantEntryActivites"
+		parameterType="map">
+		SELECT * FROM tenant_entry_activites
+		<include refid="queryCondition" />
+		order by id_ desc
+		<include refid="global.limit" />
+	</select>
+
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM tenant_entry_activites
+		<include refid="queryCondition" />
+		order by id_ desc
+	</select>
+</mapper>

+ 8 - 6
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -180,6 +180,9 @@
             <if test="organId != null">
                 AND FIND_IN_SET(vg.organ_id_,#{organId})
             </if>
+            <if test="educationalTeacherId!=null">
+                AND vg.educational_teacher_id_=#{educationalTeacherId}
+            </if>
         </where>
     </sql>
 
@@ -738,16 +741,15 @@
     
     <select id="queryVipGroupNum" resultType="map">
     	select count(*) total,sum(case when group_status_ = 2 then 1 else 0 end) applying_num_,sum(case when group_status_ = 4 then 1 else 0 end) finished_num_ from vip_group
-    	<where>
-    		<if test="organId != null">
-                FIND_IN_SET(organ_id_,#{organId})
-    		</if>
-    	</where>
+    	where organ_id_ not in (36,38)
+   		<if test="organId != null">
+              and FIND_IN_SET(organ_id_,#{organId})
+   		</if>
     </select>
     
     <select id="queryCurrentMonthCoursesNum" resultType="int">
     	select count(cs.id_) from course_schedule cs left join vip_group vg on cs.music_group_id_ = vg.id_ where cs.type_ in ('VIP')
-  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null)
+  		and DATE_FORMAT(cs.class_date_, '%Y%m' ) = DATE_FORMAT(CURDATE() , '%Y%m') and (cs.del_flag_ = 0 or cs.del_flag_ is null) and  vg.organ_id_ not in (36,38)
    		<if test="organId != null">
    		    AND FIND_IN_SET(vg.organ_id_,#{organId})
    		</if>

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -17,7 +17,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.ui.ModelMap;

+ 33 - 12
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -1,10 +1,5 @@
 package com.ym.mec.student.controller;
 
-import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.dto.*;
-import com.ym.mec.biz.dal.entity.*;
-import com.ym.mec.biz.service.*;
-import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -12,16 +7,23 @@ import io.swagger.annotations.ApiOperation;
 
 import java.io.IOException;
 import java.math.BigDecimal;
-import java.math.RoundingMode;
 import java.net.URLEncoder;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
-import org.apache.commons.lang.StringUtils;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.snaker.engine.entity.Order;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -34,8 +36,29 @@ import org.springframework.web.bind.annotation.RestController;
 import com.alibaba.fastjson.JSON;
 import com.huifu.adapay.model.payment.PayChannelEnum;
 import com.huifu.adapay.model.payment.Payment;
+import com.ym.mec.biz.dal.dao.CourseScheduleEvaluateDao;
+import com.ym.mec.biz.dal.dao.OrganizationDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.dao.TeacherCourseStatisticsDao;
+import com.ym.mec.biz.dal.dto.LuckStatisDto;
+import com.ym.mec.biz.dal.dto.OrderStatisDto;
+import com.ym.mec.biz.dal.dto.PracticeGroupsDto;
+import com.ym.mec.biz.dal.dto.VipBuyResultDto;
+import com.ym.mec.biz.dal.dto.practiceGroupStatisDto;
+import com.ym.mec.biz.dal.entity.Goods;
+import com.ym.mec.biz.dal.entity.MusicGroup;
+import com.ym.mec.biz.dal.entity.Organization;
+import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
+import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.service.MusicGroupService;
+import com.ym.mec.biz.service.SporadicChargeInfoService;
+import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.thirdparty.adapay.NotifyEvent;
@@ -46,8 +69,6 @@ import com.ym.mec.thirdparty.yqpay.YqPayFeignService;
 import com.ym.mec.thirdparty.yqpay.YqPayUtil;
 import com.ym.mec.util.http.HttpUtil;
 
-import javax.servlet.http.HttpServletResponse;
-
 @RequestMapping("studentOrder")
 @Api(tags = "订单回调")
 @RestController

+ 85 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseReviewController.java

@@ -0,0 +1,85 @@
+package com.ym.mec.teacher.controller;
+
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.CourseScheduleDao;
+import com.ym.mec.biz.dal.dao.EmployeeDao;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.entity.CourseScheduleEvaluate;
+import com.ym.mec.biz.dal.entity.CourseScheduleReview;
+import com.ym.mec.biz.dal.entity.Employee;
+import com.ym.mec.biz.dal.page.CourseReviewQueryInfo;
+import com.ym.mec.biz.dal.page.PracticeGroupQueryInfo;
+import com.ym.mec.biz.service.CourseReviewService;
+import com.ym.mec.biz.service.CourseScheduleEvaluateService;
+import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+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.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+
+@RequestMapping("courseReview")
+@Api(tags = "课程评价")
+@RestController
+public class CourseReviewController extends BaseController {
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @Autowired
+    private CourseReviewService courseReviewService;
+
+
+    @ApiOperation(value = "网管课评论列表")
+    @GetMapping("getPracticeGroup")
+    public Object getPracticeGroup(CourseReviewQueryInfo queryInfo) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        queryInfo.setTeacherId(sysUser.getId());
+        return succeed(courseReviewService.findPracticeGroupReviews(queryInfo));
+    }
+
+
+    @ApiOperation(value = "提交评论")
+    @PostMapping(value = "/add")
+    public HttpResponseResult add(CourseScheduleReview courseScheduleReview) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (Objects.isNull(sysUser)) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        courseScheduleReview.setTeacherId(sysUser.getId());
+        return succeed(courseReviewService.addPracticeGroupReview(courseScheduleReview));
+    }
+
+    @ApiOperation(value = "网管课评论详情")
+    @GetMapping("getReviewInfo")
+    public HttpResponseResult getReviewInfo(int id) {
+        return succeed(courseReviewService.getReviewInfo(id));
+    }
+
+    @ApiOperation(value = "获取课程头部信息")
+    @GetMapping("getCourseInfoHead")
+    public HttpResponseResult getCourseInfoHead(int courseId) {
+        return succeed(courseReviewService.getCourseInfoHead(courseId));
+    }
+
+    @ApiOperation(value = "修改评论信息")
+    @GetMapping("updateReviewInfo")
+    public HttpResponseResult updateReviewInfo(CourseScheduleReview courseScheduleReview) {
+        return succeed(courseReviewService.updateReview(courseScheduleReview));
+    }
+}

+ 33 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TenantEntryActivitesController.java

@@ -0,0 +1,33 @@
+package com.ym.mec.teacher.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.biz.dal.page.TenantEntryActivitesQueryInfo;
+import com.ym.mec.biz.service.TenantEntryActivitesService;
+import com.ym.mec.common.controller.BaseController;
+
+@RequestMapping("tenantEntryActivites")
+@Api(tags = "租客入驻活动")
+@RestController
+public class TenantEntryActivitesController extends BaseController {
+
+    @Autowired
+    private TenantEntryActivitesService tenantEntryActivitesService;
+
+    @ApiOperation(value = "分页查询活动列表")
+    @GetMapping("/queryPage")
+    public Object queryPage(TenantEntryActivitesQueryInfo queryInfo) {
+    	queryInfo.setDelFlag(false);
+    	queryInfo.setStartDate(new Date());
+        return succeed(tenantEntryActivitesService.queryPage(queryInfo));
+    }
+
+}

+ 69 - 0
mec-web/src/main/java/com/ym/mec/web/controller/CourseReviewController.java

@@ -0,0 +1,69 @@
+package com.ym.mec.web.controller;
+
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.EmployeeDao;
+import com.ym.mec.biz.dal.entity.Employee;
+import com.ym.mec.biz.dal.page.CourseReviewQueryInfo;
+import com.ym.mec.biz.service.CourseReviewService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+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.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Arrays;
+import java.util.List;
+
+@RequestMapping("courseReview")
+@Api(tags = "课程评价")
+@RestController
+public class CourseReviewController extends BaseController {
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @Autowired
+    private EmployeeDao employeeDao;
+
+    @Autowired
+    private CourseReviewService courseReviewService;
+
+
+    @ApiOperation(value = "网管课课程评论管理")
+    @GetMapping("getPracticeGroup")
+    @PreAuthorize("@pcs.hasPermissions('courseReview/getPracticeGroup')")
+    public Object getPracticeGroup(CourseReviewQueryInfo queryInfo) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        if (!sysUser.getIsSuperAdmin()) {
+            Employee employee = employeeDao.get(sysUser.getId());
+            if (StringUtils.isEmpty(queryInfo.getOrganId())) {
+                queryInfo.setOrganId(employee.getOrganIdList());
+            } else if (StringUtils.isEmpty(employee.getOrganIdList())) {
+                return failed("用户所在分部异常");
+            } else {
+                List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
+                if (!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))) {
+                    return failed("非法请求");
+                }
+            }
+        }
+        return succeed(courseReviewService.findPracticeGroupReviews(queryInfo));
+    }
+
+    @ApiOperation(value = "网管课评论详情")
+    @GetMapping("getReviewInfo")
+    @PreAuthorize("@pcs.hasPermissions('courseReview/getReviewInfo')")
+    public HttpResponseResult getReviewInfo(int id) {
+        return succeed(courseReviewService.getReviewInfo(id));
+    }
+
+}

+ 18 - 36
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java

@@ -1,33 +1,5 @@
 package com.ym.mec.web.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.ui.ModelMap;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ClassGroupDao;
@@ -37,13 +9,8 @@ import com.ym.mec.biz.dal.dto.BatchInsertCoursesDto;
 import com.ym.mec.biz.dal.dto.CoursePostponeDto;
 import com.ym.mec.biz.dal.dto.CreateCourseScheduleDto;
 import com.ym.mec.biz.dal.dto.VipGroupCourseAdjustInfoDto;
-import com.ym.mec.biz.dal.entity.ClassGroup;
-import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
-import com.ym.mec.biz.dal.entity.CourseScheduleComplaints;
-import com.ym.mec.biz.dal.entity.Employee;
-import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.enums.AuditStatusEnum;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
@@ -57,6 +24,21 @@ import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.exception.BizException;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.apache.commons.lang3.ArrayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @Author Joburgess
@@ -369,8 +351,8 @@ public class CourseScheduleController extends BaseController {
     @ApiOperation(value = "陪练课课程组老师调整")
     @PostMapping("/practiceGroupTeacherAdjust")
     @PreAuthorize("@pcs.hasPermissions('courseSchedule/practiceGroupTeacherAdjust')")
-    public Object practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId){
-        scheduleService.practiceGroupTeacherAdjust(practiceGroupId,teacherId,subjectId);
+    public Object practiceGroupTeacherAdjust(String practiceGroupId, Integer teacherId, Integer subjectId, Integer educationalTeacherId){
+        scheduleService.practiceGroupTeacherAdjust(practiceGroupId,teacherId,subjectId, educationalTeacherId);
         return succeed();
     }
 

+ 19 - 0
mec-web/src/main/java/com/ym/mec/web/controller/EmployeeController.java

@@ -9,12 +9,14 @@ import com.ym.mec.biz.service.EmployeeService;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
 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.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -126,4 +128,21 @@ public class EmployeeController extends BaseController {
         }
         return failed("获取用户信息失败");
     }
+
+    @ApiOperation(value = "获取教务人员")
+    @GetMapping("/findEducationUsers")
+    public HttpResponseResult findEducationUsers(){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        String organIds=new String();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        if (!sysUser.getIsSuperAdmin()) {
+            Employee employee = employeeService.get(sysUser.getId());
+            if (StringUtils.isEmpty(organIds)) {
+                organIds=employee.getOrganIdList();
+            }
+        }
+        return succeed(employeeService.findByRole("4,5",organIds));
+    }
 }

+ 49 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TenantEntryActivitesController.java

@@ -0,0 +1,49 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.biz.dal.entity.TenantEntryActivites;
+import com.ym.mec.biz.service.TenantEntryActivitesService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+
+@RequestMapping("tenantEntryActivites")
+@Api(tags = "租客入驻活动")
+@RestController
+public class TenantEntryActivitesController extends BaseController {
+
+	@Autowired
+	private TenantEntryActivitesService tenantEntryActivitesService;
+
+	@ApiOperation(value = "分页查询活动列表")
+	@GetMapping("/queryPage")
+	@PreAuthorize("@pcs.hasPermissions('tenantEntryActivites/queryPage')")
+	public Object queryPage(QueryInfo queryInfo) {
+		return succeed(tenantEntryActivitesService.queryPage(queryInfo));
+	}
+
+	@ApiOperation(value = "查询活动信息")
+	@GetMapping("/query")
+	@PreAuthorize("@pcs.hasPermissions('tenantEntryActivites/query')")
+	public Object query(Integer id) {
+		return succeed(tenantEntryActivitesService.get(id));
+	}
+
+	@ApiOperation(value = "新增、修改活动")
+	@PostMapping("/merge")
+	@PreAuthorize("@pcs.hasPermissions('tenantEntryActivites/merge')")
+	public Object merge(@RequestBody TenantEntryActivites tenantEntryActivites) {
+		tenantEntryActivitesService.merge(tenantEntryActivites);
+		return succeed();
+	}
+
+}

+ 60 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduCourseReviewController.java

@@ -0,0 +1,60 @@
+package com.ym.mec.web.controller.education;
+
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.EmployeeDao;
+import com.ym.mec.biz.dal.entity.CourseScheduleReview;
+import com.ym.mec.biz.dal.entity.Employee;
+import com.ym.mec.biz.dal.page.CourseReview4EduQueryInfo;
+import com.ym.mec.biz.dal.page.CourseReviewQueryInfo;
+import com.ym.mec.biz.service.CourseReviewService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+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.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Arrays;
+import java.util.List;
+
+@RequestMapping("eduCourseReview")
+@Api(tags = "教务端课程评价")
+@RestController
+public class EduCourseReviewController extends BaseController {
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @Autowired
+    private CourseReviewService courseReviewService;
+
+
+    @ApiOperation(value = "网管课课程评论管理")
+    @GetMapping("getPracticeGroup")
+    public Object getPracticeGroup(CourseReview4EduQueryInfo queryInfo) {
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        queryInfo.setEduTeacherId(sysUser.getId());
+        return succeed(courseReviewService.findPracticeGroupReviews4Edu(queryInfo));
+    }
+
+    @ApiOperation(value = "网管课评论详情")
+    @GetMapping("getReviewInfo")
+    public HttpResponseResult getReviewInfo(int id) {
+        return succeed(courseReviewService.getReviewInfo(id));
+    }
+
+    @ApiOperation(value = "教务评论")
+    @GetMapping("updateReviewInfo")
+    public HttpResponseResult updateReviewInfo(CourseScheduleReview courseScheduleReview) {
+        return succeed(courseReviewService.updateReview(courseScheduleReview));
+    }
+
+}

+ 1 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduPracticeGroupController.java

@@ -131,6 +131,7 @@ public class EduPracticeGroupController extends BaseController {
         if(Objects.isNull(practiceGroupBuyParams.getStudentId())){
             throw new BizException("请指定学生");
         }
+        practiceGroupBuyParams.setEducationalTeacherId(sysUser.getId());
         return eduPracticeGroupService.buyPracticeGroup(practiceGroupBuyParams, sysUser.getRealName()+"("+sysUser.getId()+")");
     }