Jelajahi Sumber

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

zouxuan 5 tahun lalu
induk
melakukan
5d3be5504b
69 mengubah file dengan 1808 tambahan dan 674 penghapusan
  1. 10 0
      mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/entity/SysUser.java
  2. 10 14
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  3. 26 8
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentAttendanceDao.java
  4. 30 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java
  5. 32 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentExtracurricularExercisesSituationDao.java
  6. 6 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherAttendanceDao.java
  7. 12 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherSalaryComplaintsDao.java
  8. 31 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseReviewDto.java
  9. 130 122
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/Student4operating.java
  10. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentManageListDto.java
  11. 73 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentTeacherCourseDto.java
  12. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherClassGroupDto.java
  13. 40 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherExercisesServiceDto.java
  14. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java
  15. 14 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/PracticeGroup.java
  16. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Student.java
  17. 25 7
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java
  18. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultPracticeGroupSalary.java
  19. 18 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/PracticeGroupType.java
  20. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseReviewQueryInfo.java
  21. 30 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/PracticeGroupQueryInfo.java
  22. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentExercisesSituationQueryInfo.java
  23. 12 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentManageQueryInfo.java
  24. 0 1
      mec-biz/src/main/java/com/ym/mec/biz/service/PracticeGroupService.java
  25. 15 1
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentAttendanceService.java
  26. 21 6
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java
  27. 9 1
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentService.java
  28. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherAttendanceService.java
  29. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  30. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseReviewServiceImpl.java
  31. 69 51
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  32. 3 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  33. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/EduPracticeGroupServiceImpl.java
  34. 24 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesMessageServiceImpl.java
  35. 23 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesReplyServiceImpl.java
  36. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  37. 5 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java
  38. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java
  39. 62 30
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java
  40. 46 11
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java
  41. 74 10
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java
  42. 56 19
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java
  43. 13 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultPracticeGroupSalaryServiceImpl.java
  44. 31 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultVipGroupSalaryServiceImpl.java
  45. 1 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherSalaryComplaintsServiceImpl.java
  46. 13 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherSalaryModifyLogServiceImpl.java
  47. 43 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  48. 13 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  49. 4 2
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  50. 16 15
      mec-biz/src/main/resources/config/mybatis/CourseScheduleEvaluateMapper.xml
  51. 1 3
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  52. 15 2
      mec-biz/src/main/resources/config/mybatis/CourseScheduleReviewMapper.xml
  53. 29 4
      mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  54. 23 10
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  55. 2 2
      mec-biz/src/main/resources/config/mybatis/ExtracurricularExercisesReplyMapper.xml
  56. 38 19
      mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml
  57. 21 1
      mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml
  58. 29 2
      mec-biz/src/main/resources/config/mybatis/StudentExtracurricularExercisesSituationMapper.xml
  59. 10 1
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  60. 313 237
      mec-biz/src/main/resources/config/mybatis/StudentMapper.xml
  61. 13 1
      mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml
  62. 12 3
      mec-biz/src/main/resources/config/mybatis/TeacherSalaryComplaintsMapper.xml
  63. 1 1
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  64. 63 12
      mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java
  65. 11 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSalaryComplaintsController.java
  66. 2 3
      mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleTeacherSalaryController.java
  67. 49 11
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  68. 15 5
      mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java
  69. 20 6
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

+ 10 - 0
mec-auth/mec-auth-api/src/main/java/com/ym/mec/auth/api/entity/SysUser.java

@@ -116,6 +116,8 @@ public class SysUser implements Serializable{
 	private Integer serviceTag;
 
 	private Integer operatingTag;
+	
+	private Integer teacherId;
 
 	public Integer getServiceTag() {
 		return serviceTag;
@@ -349,6 +351,14 @@ public class SysUser implements Serializable{
 		this.isSuperAdmin = isSuperAdmin;
 	}
 
+	public Integer getTeacherId() {
+		return teacherId;
+	}
+
+	public void setTeacherId(Integer teacherId) {
+		this.teacherId = teacherId;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 10 - 14
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -1,23 +1,18 @@
 package com.ym.mec.biz.dal.dao;
 
+import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
+import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.ibatis.annotations.Param;
-
-import com.ym.mec.biz.dal.dto.BasicUserDto;
-import com.ym.mec.biz.dal.dto.Practice4ExercisesSituationDto;
-import com.ym.mec.biz.dal.dto.StudentAttendanceStatisticsResponse;
-import com.ym.mec.biz.dal.dto.StudentCourseTimesDto;
-import com.ym.mec.biz.dal.dto.VipGroupGiveCourseSortDto;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
-import com.ym.mec.biz.dal.enums.GroupType;
-import com.ym.mec.common.dal.BaseDAO;
-
 public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseScheduleStudentPayment> {
 
     /**
@@ -255,8 +250,9 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
     
     /**
      * 从指定时间开始查询学的线上可数
-     * @param startDate 指定的开始时间
      * @return
      */
-    List<StudentCourseTimesDto> queryStudentCourseTimesOfOnline(Date startDate);
+    List<StudentCourseTimesDto> queryStudentNotStartCourseTimesOfOnline();
+
+    List<StudentTeacherCourseDto> findAllStudentCourseInfo();
 }

+ 26 - 8
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentAttendanceDao.java

@@ -1,20 +1,20 @@
 package com.ym.mec.biz.dal.dao;
 
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ibatis.annotations.Delete;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
 import com.ym.mec.biz.dal.dto.StudentAttendanceResponse;
 import com.ym.mec.biz.dal.dto.StudentAttendanceStatusCountDto;
 import com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto;
 import com.ym.mec.biz.dal.dto.StudentStatusCountUtilEntity;
 import com.ym.mec.biz.dal.entity.StudentAttendance;
 import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 public interface StudentAttendanceDao extends BaseDAO<Long, StudentAttendance> {
 
@@ -150,6 +150,17 @@ public interface StudentAttendanceDao extends BaseDAO<Long, StudentAttendance> {
     List<Map<Integer,Integer>> countStudentAttendancesByCourses(@Param("courseScheduleIds") List courseScheduleIds);
 
     /**
+     * @describe 统计课程里对应状态的学生数量
+     * @author Joburgess
+     * @date 2020/4/18
+     * @param courseScheduleIds:
+     * @param status:
+     * @return java.util.List<java.util.Map<java.lang.Integer,java.lang.Integer>>
+     */
+    List<Map<Integer, Integer>> countStudentAttendancesByCoursesAndStatus(@Param("courseScheduleIds") List courseScheduleIds,
+                                                                          @Param("status") StudentAttendanceStatusEnum status);
+
+    /**
      * @describe 根据课程获取最后的点名时间
      * @author Joburgess
      * @date 2019/10/24
@@ -266,4 +277,11 @@ public interface StudentAttendanceDao extends BaseDAO<Long, StudentAttendance> {
      * @param endDateTime
      */
     void cuntinueCourseSign(@Param("courseScheduleId")Long courseScheduleId,@Param("startDateTime")Date startDateTime,@Param("endDateTime")Date endDateTime);
+
+    /**
+     * 清除学员签退信息
+     * @param courseId
+     * @param userId
+     */
+    void cleanCourseStudentSignOut(@Param("courseId") Long courseId, @Param("userId") Integer userId);
 }

+ 30 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.dao;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.Student4operating;
 import com.ym.mec.biz.dal.entity.Student;
+import com.ym.mec.biz.dal.enums.GroupType;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -14,14 +15,16 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
 
 
     List<SysUser> findStudents(Map<String, Object> params);
+
     int countStudents(Map<String, Object> params);
-    
-    List<Student> queryByOperatingTag(Integer operatingTag);
-    
+
+    List<Student> queryByOperatingTempTag(Integer operatingTag);
+
     int batchUpdate(@Param("studentList") List<Student> studentList);
 
     /**
      * 查询运营学生列表
+     *
      * @param params
      * @return
      */
@@ -29,8 +32,32 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
 
     /**
      * 查询运营学生总数
+     *
      * @param params
      * @return
      */
     Integer countOperatingStudents(Map<String, Object> params);
+
+    /**
+     * 批量获取老师体验学生数
+     *
+     * @param teacherIds
+     * @return
+     */
+    List<Map<Integer,Integer>> getTeacherOperatingStudentsNum(@Param("teacherIds") String teacherIds);
+
+    /**
+     * 根据类型批量获取老师转化
+     * @param teacherIds
+     * @param groupType
+     * @return
+     */
+    List<Map<Integer,Integer>> getBuyNums(@Param("teacherIds") String teacherIds, @Param("groupType") GroupType groupType);
+
+     /**
+     * 根据同事存在vip和网管的转化
+     * @param teacherIds
+     * @return
+     */
+    List<Map<Integer,Integer>> getPracticeAndVipNums(@Param("teacherIds") String teacherIds);
 }

+ 32 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentExtracurricularExercisesSituationDao.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.dto.StudentExercisesSituationDto;
+import com.ym.mec.biz.dal.dto.TeacherExercisesServiceDto;
 import com.ym.mec.biz.dal.entity.StudentExtracurricularExercisesSituation;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
@@ -32,5 +33,36 @@ public interface StudentExtracurricularExercisesSituationDao extends BaseDAO<Lon
     int countExercisesSituations(Map<String, Object> params);
 
     List<StudentExercisesSituationDto> findExercisesSituationsById(@Param("ids") List<Long> ids);
+
+    /**
+     * @describe 统计老师指定星期的服务指标
+     * @author Joburgess
+     * @date 2020/4/17
+     * @param monday:
+     * @param teacherIds:
+     * @return java.util.List<com.ym.mec.biz.dal.dto.TeaherExercisesServiceDto>
+     */
+    List<TeacherExercisesServiceDto> findTeacherExercisesServiceSituations(@Param("monday") String monday,
+                                                                           @Param("teacherIds") List<Integer> teacherIds);
+
+    /**
+     * @describe 统计上周数据今日跟新的条数
+     * @author Joburgess
+     * @date 2020/4/20
+     * @param sunday:
+     * @return int
+     */
+    int findLastWeekTodayUpdateNum(@Param("sunday") String sunday);
+
+    /**
+     * @describe 获取学生指定星期的课外训练统计记录
+     * @author Joburgess
+     * @date 2020/4/22
+     * @param monday:
+     * @param studentId:
+     * @return com.ym.mec.biz.dal.dto.StudentExercisesSituationDto
+     */
+    StudentExtracurricularExercisesSituation findStudentExercisesSituationsWithMonDay(@Param("monday") String monday,
+                                                                          @Param("studentId") Integer studentId);
 	
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherAttendanceDao.java

@@ -191,4 +191,10 @@ public interface TeacherAttendanceDao extends BaseDAO<Long, TeacherAttendance> {
 	 * @return
 	 */
     int getTotalMinutes(@Param("courseId") Long courseId, @Param("teacherId") Integer teacherId);
+
+	/**
+	 * 清空签退信息
+	 * @param courseId
+	 */
+	void cleanCourseTeacherSignOut(@Param("courseId") Long courseId);
 }

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherSalaryComplaintsDao.java

@@ -35,5 +35,16 @@ public interface TeacherSalaryComplaintsDao extends BaseDAO<Long, TeacherSalaryC
      * @return java.util.List<com.ym.mec.biz.dal.entity.TeacherSalaryComplaints>
      */
     List<TeacherSalaryComplaints> findTeacherSalaryComplaintsWithMonth(@Param("teacherId") Integer teacherId,
-                                                                       @Param("month") String month);
+                                                                       @Param("month") String month,
+                                                                        @Param("status") TeacherSalaryComplaintsStatusEnum status);
+
+    /**
+     * @describe 根据月份更新未处理的申诉至已结束
+     * @author Joburgess
+     * @date 2020/4/18
+     * @param month:
+     * @return int
+     */
+    int updateComplaintStatusTuDoneWithMonth(@Param("month") String month);
+
 }

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

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.ym.mec.biz.dal.enums.PracticeGroupType;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.Date;
@@ -36,12 +37,18 @@ public class CourseReviewDto {
     @ApiModelProperty(value = "购买月数",required = false)
     private Integer BuyMonths;
 
+    private PracticeGroupType practiceGroupType;
+
     @ApiModelProperty(value = "评论id",required = false)
     private Integer reviewId;
 
     @ApiModelProperty(value = "学员评分",required = false)
     private Integer studentReview;
 
+    @ApiModelProperty(value = "是否布置作业")
+    private Integer assignHomework;
+    private String assignHomeworkStr;
+
     @ApiModelProperty(value = "是否提交作业",required = false)
     private Integer handHomework;
 
@@ -123,6 +130,30 @@ public class CourseReviewDto {
     @ApiModelProperty(value = "考勤Str",required = false)
     private String attendanceStr;
 
+    public PracticeGroupType getPracticeGroupType() {
+        return practiceGroupType;
+    }
+
+    public void setPracticeGroupType(PracticeGroupType practiceGroupType) {
+        this.practiceGroupType = practiceGroupType;
+    }
+
+    public String getAssignHomeworkStr() {
+        return assignHomeworkStr;
+    }
+
+    public void setAssignHomeworkStr(String assignHomeworkStr) {
+        this.assignHomeworkStr = assignHomeworkStr;
+    }
+
+    public Integer getAssignHomework() {
+        return assignHomework;
+    }
+
+    public void setAssignHomework(Integer assignHomework) {
+        this.assignHomework = assignHomework;
+    }
+
     public Integer getOrganId() {
         return organId;
     }

+ 130 - 122
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/Student4operating.java

@@ -4,137 +4,145 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 
 public class Student4operating {
 
-private String organName;
-private String organId;
-private String studentName;
-private Integer studentId;
-private String teacherId;
-private String teacherName;
-private Integer operatingTag;
-private Integer vipTimes;
-private Integer freePracticeTimes;
-private Integer buyPracticeTimes;
-
-private String operatingTagStr;
-private String vipTimesStr;
-private String freePracticeTimesStr;
-private String buyPracticeTimesStr;
-
-
-	public String getOrganName() {
-		return organName;
-	}
-
-	public void setOrganName(String organName) {
-		this.organName = organName;
-	}
-
-	public String getOrganId() {
-		return organId;
-	}
-
-	public void setOrganId(String organId) {
-		this.organId = organId;
-	}
-
-	public String getStudentName() {
-		return studentName;
-	}
-
-	public void setStudentName(String studentName) {
-		this.studentName = studentName;
-	}
-
-	public Integer getStudentId() {
-		return studentId;
-	}
-
-	public void setStudentId(Integer studentId) {
-		this.studentId = studentId;
-	}
-
-	public String getTeacherId() {
-		return teacherId;
-	}
-
-	public void setTeacherId(String teacherId) {
-		this.teacherId = teacherId;
-	}
-
-	public String getTeacherName() {
-		return teacherName;
-	}
-
-	public void setTeacherName(String teacherName) {
-		this.teacherName = teacherName;
-	}
+    private String organName;
+    private String organId;
+    private String studentName;
+    private Integer studentId;
+    private String teacherId;
+    private String teacherName;
+    private Integer operatingTag;
+    private Integer vipTimes;
+    private Integer freePracticeTimes;
+    private Integer buyPracticeTimes;
+
+    private String operatingTagStr;
+    private String vipTimesStr;
+    private String freePracticeTimesStr;
+    private String buyPracticeTimesStr;
+    private Integer studentNum;
+
+    public String getOrganName() {
+        return organName;
+    }
+
+    public void setOrganName(String organName) {
+        this.organName = organName;
+    }
+
+    public String getOrganId() {
+        return organId;
+    }
+
+    public void setOrganId(String organId) {
+        this.organId = organId;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(String teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getTeacherName() {
+        return teacherName;
+    }
+
+    public void setTeacherName(String teacherName) {
+        this.teacherName = teacherName;
+    }
+
+    public Integer getOperatingTag() {
+        return operatingTag;
+    }
+
+    public void setOperatingTag(Integer operatingTag) {
+        this.operatingTag = operatingTag;
+    }
+
+    public Integer getVipTimes() {
+        return vipTimes;
+    }
+
+    public void setVipTimes(Integer vipTimes) {
+        this.vipTimes = vipTimes;
+    }
+
+    public Integer getFreePracticeTimes() {
+        return freePracticeTimes;
+    }
+
+    public void setFreePracticeTimes(Integer freePracticeTimes) {
+        this.freePracticeTimes = freePracticeTimes;
+    }
+
+    public Integer getBuyPracticeTimes() {
+        return buyPracticeTimes;
+    }
+
+    public void setBuyPracticeTimes(Integer buyPracticeTimes) {
+        this.buyPracticeTimes = buyPracticeTimes;
+    }
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+
+    public String getOperatingTagStr() {
+        return operatingTagStr;
+    }
 
-	public Integer getOperatingTag() {
-		return operatingTag;
-	}
-
-	public void setOperatingTag(Integer operatingTag) {
-		this.operatingTag = operatingTag;
-	}
-
-	public Integer getVipTimes() {
-		return vipTimes;
-	}
-
-	public void setVipTimes(Integer vipTimes) {
-		this.vipTimes = vipTimes;
-	}
+    public void setOperatingTagStr(String operatingTagStr) {
+        this.operatingTagStr = operatingTagStr;
+    }
 
-	public Integer getFreePracticeTimes() {
-		return freePracticeTimes;
-	}
+    public String getVipTimesStr() {
+        return vipTimesStr;
+    }
 
-	public void setFreePracticeTimes(Integer freePracticeTimes) {
-		this.freePracticeTimes = freePracticeTimes;
-	}
+    public void setVipTimesStr(String vipTimesStr) {
+        this.vipTimesStr = vipTimesStr;
+    }
 
-	public Integer getBuyPracticeTimes() {
-		return buyPracticeTimes;
-	}
+    public String getFreePracticeTimesStr() {
+        return freePracticeTimesStr;
+    }
 
-	public void setBuyPracticeTimes(Integer buyPracticeTimes) {
-		this.buyPracticeTimes = buyPracticeTimes;
-	}
+    public void setFreePracticeTimesStr(String freePracticeTimesStr) {
+        this.freePracticeTimesStr = freePracticeTimesStr;
+    }
 
-	@Override
-	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
-	}
+    public String getBuyPracticeTimesStr() {
+        return buyPracticeTimesStr;
+    }
 
-	public String getOperatingTagStr() {
-		return operatingTagStr;
-	}
-
-	public void setOperatingTagStr(String operatingTagStr) {
-		this.operatingTagStr = operatingTagStr;
-	}
-
-	public String getVipTimesStr() {
-		return vipTimesStr;
-	}
-
-	public void setVipTimesStr(String vipTimesStr) {
-		this.vipTimesStr = vipTimesStr;
-	}
-
-	public String getFreePracticeTimesStr() {
-		return freePracticeTimesStr;
-	}
-
-	public void setFreePracticeTimesStr(String freePracticeTimesStr) {
-		this.freePracticeTimesStr = freePracticeTimesStr;
-	}
+    public void setBuyPracticeTimesStr(String buyPracticeTimesStr) {
+        this.buyPracticeTimesStr = buyPracticeTimesStr;
+    }
 
-	public String getBuyPracticeTimesStr() {
-		return buyPracticeTimesStr;
+	public Integer getStudentNum() {
+		return studentNum;
 	}
 
-	public void setBuyPracticeTimesStr(String buyPracticeTimesStr) {
-		this.buyPracticeTimesStr = buyPracticeTimesStr;
+	public void setStudentNum(Integer studentNum) {
+		this.studentNum = studentNum;
 	}
 }

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

@@ -71,6 +71,10 @@ public class StudentManageListDto {
     private String vipGroupName;
 
     private String vipGroupStatus;
+    
+    private String teacherName;
+    
+    private Integer teacherId;
 
     public YesOrNoEnum getServiceTag() {
         return serviceTag;
@@ -263,4 +267,20 @@ public class StudentManageListDto {
 	public void setIsActive(YesOrNoEnum isActive) {
 		this.isActive = isActive;
 	}
+
+	public String getTeacherName() {
+		return teacherName;
+	}
+
+	public void setTeacherName(String teacherName) {
+		this.teacherName = teacherName;
+	}
+
+	public Integer getTeacherId() {
+		return teacherId;
+	}
+
+	public void setTeacherId(Integer teacherId) {
+		this.teacherId = teacherId;
+	}
 }

+ 73 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentTeacherCourseDto.java

@@ -0,0 +1,73 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.enums.GroupType;
+
+import java.util.Date;
+
+/**
+ * @Author Joburgess
+ * @Date 2020/4/16
+ */
+public class StudentTeacherCourseDto {
+
+    private Integer studentId;
+
+    private Integer teacherId;
+
+    private GroupType groupType;
+
+    private String groupId;
+
+    private CourseSchedule.CourseScheduleType courseScheduleType;
+
+    private Date classesStartTime;
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public GroupType getGroupType() {
+        return groupType;
+    }
+
+    public void setGroupType(GroupType groupType) {
+        this.groupType = groupType;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public CourseSchedule.CourseScheduleType getCourseScheduleType() {
+        return courseScheduleType;
+    }
+
+    public void setCourseScheduleType(CourseSchedule.CourseScheduleType courseScheduleType) {
+        this.courseScheduleType = courseScheduleType;
+    }
+
+    public Date getClassesStartTime() {
+        return classesStartTime;
+    }
+
+    public void setClassesStartTime(Date classesStartTime) {
+        this.classesStartTime = classesStartTime;
+    }
+}

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherClassGroupDto.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.dal.dto;
 
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
+import com.ym.mec.biz.dal.enums.PracticeGroupType;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.Date;
@@ -89,6 +90,17 @@ public class TeacherClassGroupDto {
     @ApiModelProperty(value = "购买月数")
     private Integer buyMonths;
 
+    @ApiModelProperty(value = "网管课课程组类型")
+    private PracticeGroupType practiceGroupType;
+
+    public PracticeGroupType getPracticeGroupType() {
+        return practiceGroupType;
+    }
+
+    public void setPracticeGroupType(PracticeGroupType practiceGroupType) {
+        this.practiceGroupType = practiceGroupType;
+    }
+
     public Date getCourseStartDate() {
         return courseStartDate;
     }

+ 40 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherExercisesServiceDto.java

@@ -0,0 +1,40 @@
+package com.ym.mec.biz.dal.dto;
+
+/**
+ * @Author Joburgess
+ * @Date 2020/4/17
+ */
+public class TeacherExercisesServiceDto {
+
+    private Integer teacherId;
+
+    /** 预期训练次数 */
+    private Integer expectExercisesNum;
+
+    /** 实际训练次数 */
+    private Integer actualExercisesNum;
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Integer getExpectExercisesNum() {
+        return expectExercisesNum;
+    }
+
+    public void setExpectExercisesNum(Integer expectExercisesNum) {
+        this.expectExercisesNum = expectExercisesNum;
+    }
+
+    public Integer getActualExercisesNum() {
+        return actualExercisesNum;
+    }
+
+    public void setActualExercisesNum(Integer actualExercisesNum) {
+        this.actualExercisesNum = actualExercisesNum;
+    }
+}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java

@@ -34,7 +34,7 @@ public class CourseSchedule {
 
 		SINGLE("SINGLE", "单技课"), MIX("MIX", "合奏课"), HIGH("HIGH", "小班课"), VIP("VIP", "vip课"), DEMO("DEMO", "试听课"), COMPREHENSIVE("COMPREHENSIVE", "综合课"), PRACTICE(
 				"PRACTICE", "网管课"), ENLIGHTENMENT("ENLIGHTENMENT", "启蒙课"), TRAINING_SINGLE("TRAINING_SINGLE", "集训单技课"), TRAINING_MIX("TRAINING_MIX", "集训合奏课"), CLASSROOM(
-				"CLASSROOM", "课堂课"),COMM("COMM","对外课程");
+				"CLASSROOM", "课堂课"),COMM("COMM","对外课程"),TRIAL("TRIAL","试听课");
 
 		private String code;
 

+ 14 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/PracticeGroup.java

@@ -1,9 +1,11 @@
 package com.ym.mec.biz.dal.entity;
 
-import com.ym.mec.biz.dal.enums.GroupStatusEnum;
+import java.util.Date;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
-import java.util.Date;
+import com.ym.mec.biz.dal.enums.GroupStatusEnum;
+import com.ym.mec.biz.dal.enums.PracticeGroupType;
 
 /**
  * 对应数据库表(practice_group):
@@ -19,6 +21,8 @@ public class PracticeGroup {
 	/**  */
 	private Integer subjectId;
 	
+	private PracticeGroupType type;
+	
 	/**  */
 	private Integer userId;
 
@@ -149,6 +153,14 @@ public class PracticeGroup {
 		return this.name;
 	}
 			
+	public PracticeGroupType getType() {
+		return type;
+	}
+
+	public void setType(PracticeGroupType type) {
+		this.type = type;
+	}
+
 	public void setSubjectId(Integer subjectId){
 		this.subjectId = subjectId;
 	}

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

@@ -17,6 +17,8 @@ public class Student {
 
 	private Integer operatingTag;
 
+	private Integer operatingTempTag;
+
 	private Integer teacherId;
 	
 	/**  */
@@ -86,6 +88,14 @@ public class Student {
 		this.operatingTag = operatingTag;
 	}
 
+	public Integer getOperatingTempTag() {
+		return operatingTempTag;
+	}
+
+	public void setOperatingTempTag(Integer operatingTempTag) {
+		this.operatingTempTag = operatingTempTag;
+	}
+
 	public Integer getTeacherId() {
 		return teacherId;
 	}

+ 25 - 7
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java

@@ -1,16 +1,15 @@
 package com.ym.mec.biz.dal.entity;
 
-import io.swagger.annotations.ApiModelProperty;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.enums.JobNatureEnum;
 import com.ym.mec.biz.dal.enums.JobTypeEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
+import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
 
 /**
  * 对应数据库表(teacher):
@@ -116,6 +115,25 @@ public class Teacher extends SysUser {
 	
 	private String memo;
 
+	private BigDecimal operatingIndex;
+	private BigDecimal serviceIndex;
+
+	public BigDecimal getOperatingIndex() {
+		return operatingIndex;
+	}
+
+	public void setOperatingIndex(BigDecimal operatingIndex) {
+		this.operatingIndex = operatingIndex;
+	}
+
+	public BigDecimal getServiceIndex() {
+		return serviceIndex;
+	}
+
+	public void setServiceIndex(BigDecimal serviceIndex) {
+		this.serviceIndex = serviceIndex;
+	}
+
 	public Integer getLectureNum() {
 		return lectureNum;
 	}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultPracticeGroupSalary.java

@@ -22,7 +22,7 @@ public class TeacherDefaultPracticeGroupSalary {
 	private BigDecimal mainTeacherSalary = BigDecimal.ZERO;
 	
 	/**  */
-	private BigDecimal assistantTeacherSalary;
+	private BigDecimal assistantTeacherSalary = BigDecimal.ZERO;
 	
 	/**  */
 	private java.util.Date createTime;

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/PracticeGroupType.java

@@ -0,0 +1,18 @@
+package com.ym.mec.biz.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+public enum PracticeGroupType implements BaseEnum<String, PracticeGroupType> {
+	/** 免费 */
+	FREE,
+	/** 收费 */
+	CHARGE,
+	/** 试听 */
+	TRIAL;
+
+	@Override
+	public String getCode() {
+		return this.name();
+	}
+
+}

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

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.page;
 
+import com.ym.mec.biz.dal.enums.PracticeGroupType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -23,12 +24,17 @@ public class CourseReviewQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "是否免费 1-免费 0收费",required = false)
     private Integer isFree;
 
+    private PracticeGroupType practiceGroupType;
+
     @ApiModelProperty(value = "学生评价",required = false)
     private Integer studentReview;
 
     @ApiModelProperty(value = "是否评价 1-评价 0未评价",required = false)
     private Integer hasReview;
 
+    @ApiModelProperty(value = "是否布置作业")
+    private Integer assignHomework;
+
     @ApiModelProperty(value = "是否提价作业 1-提交 0未提交",required = false)
     private Integer hasHandHomework;
 
@@ -53,6 +59,22 @@ public class CourseReviewQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "作业是否回复",required = false)
     private Integer homeWorkReplied;
 
+    public PracticeGroupType getPracticeGroupType() {
+        return practiceGroupType;
+    }
+
+    public void setPracticeGroupType(PracticeGroupType practiceGroupType) {
+        this.practiceGroupType = practiceGroupType;
+    }
+
+    public Integer getAssignHomework() {
+        return assignHomework;
+    }
+
+    public void setAssignHomework(Integer assignHomework) {
+        this.assignHomework = assignHomework;
+    }
+
     public Integer getTeacherId() {
         return teacherId;
     }

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

@@ -12,6 +12,8 @@ public class PracticeGroupQueryInfo extends QueryInfo {
 
     private Integer teacherId;
 
+    private Integer studentId;
+
     private Long practiceId;
 
     private String month;
@@ -22,6 +24,10 @@ public class PracticeGroupQueryInfo extends QueryInfo {
 
     private Integer hasReport;
 
+    private String practiceGroupType;
+
+    private String groupStatus;
+
     private Integer educationalTeacherId;
 
     private Boolean hasEducationalTeacherId;
@@ -30,6 +36,30 @@ public class PracticeGroupQueryInfo extends QueryInfo {
 
     private boolean isExport = false;
 
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getPracticeGroupType() {
+        return practiceGroupType;
+    }
+
+    public void setPracticeGroupType(String practiceGroupType) {
+        this.practiceGroupType = practiceGroupType;
+    }
+
+    public String getGroupStatus() {
+        return groupStatus;
+    }
+
+    public void setGroupStatus(String groupStatus) {
+        this.groupStatus = groupStatus;
+    }
+
     public Integer getType() {
         return type;
     }

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

@@ -16,6 +16,8 @@ public class StudentExercisesSituationQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "周一日期")
     private java.util.Date monday;
 
+    private Integer teacherId;
+
     @ApiModelProperty(value = "周日日期")
     private java.util.Date sunday;
 
@@ -34,6 +36,14 @@ public class StudentExercisesSituationQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "及时训练评价次数是否达到预期")
     private Integer exercisesMessageTimelyNumIsAchieve;
 
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
     public String getOrganIdList() {
         return organIdList;
     }

+ 12 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentManageQueryInfo.java

@@ -1,13 +1,12 @@
 package com.ym.mec.biz.dal.page;
 
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.List;
+
 import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
 import com.ym.mec.common.page.QueryInfo;
 
-import java.util.List;
-
 /**
  * @Author Joburgess
  * @Date 2019/9/19
@@ -42,6 +41,8 @@ public class StudentManageQueryInfo extends QueryInfo {
     private Integer serviceTag;
 
     private Integer operatingTag;
+    
+    private Integer teacherId;
 
     public Integer getServiceTag() {
         return serviceTag;
@@ -138,4 +139,12 @@ public class StudentManageQueryInfo extends QueryInfo {
 	public void setIsActive(Boolean isActive) {
 		this.isActive = isActive;
 	}
+
+	public Integer getTeacherId() {
+		return teacherId;
+	}
+
+	public void setTeacherId(Integer teacherId) {
+		this.teacherId = teacherId;
+	}
 }

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

@@ -263,7 +263,6 @@ public interface PracticeGroupService extends BaseService<Long, PracticeGroup> {
 	 */
 	void pushStudyReport(Date expiredDate,String pushType);
 
-
 	/**
 	 * 获取陪练课列表
 	 * @param queryInfo

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

@@ -93,5 +93,19 @@ public interface StudentAttendanceService extends BaseService<Long, StudentAtten
 	 * 修复连堂课学生签到记录
 	 * @param month
 	 */
-    void repairStudentAttendance(Integer month);
+	void repairStudentAttendance(Integer month);
+
+	/**
+	 * 获取签到数据
+	 * @param courseId
+	 * @param userId
+	 */
+	StudentAttendance findByStatusAndCourseScheduleId(Long courseId, Integer userId);
+
+	/**
+	 * 清除当前学生签退信息
+	 * @param courseId
+	 * @param userId
+	 */
+	void cleanCourseStudentSignOut(Long courseId, Integer userId);
 }

+ 21 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java

@@ -1,14 +1,29 @@
 package com.ym.mec.biz.service;
 
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dto.*;
-import com.ym.mec.biz.dal.entity.StudentAttendance;
-import com.ym.mec.biz.dal.page.*;
-import com.ym.mec.common.page.PageInfo;
-
 import java.util.List;
 import java.util.Map;
 
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dto.ConditionDto;
+import com.ym.mec.biz.dal.dto.MusicGroupStudentSignDto;
+import com.ym.mec.biz.dal.dto.MusicGroupStudentsDto;
+import com.ym.mec.biz.dal.dto.Student4operating;
+import com.ym.mec.biz.dal.dto.StudentManageAccountBaseInfoDto;
+import com.ym.mec.biz.dal.dto.StudentManageBaseInfoOfMusicGroupDto;
+import com.ym.mec.biz.dal.dto.StudentManageListDto;
+import com.ym.mec.biz.dal.dto.StudentManageVipGroupClassDto;
+import com.ym.mec.biz.dal.dto.StudentManageVipGroupDto;
+import com.ym.mec.biz.dal.dto.StudentRegisterPerDto;
+import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageVipClassQueryInfo;
+import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
+import com.ym.mec.biz.dal.page.StudentSignQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
+import com.ym.mec.common.page.PageInfo;
+
 /**
  * @Author Joburgess
  * @Date 2019/9/19

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

@@ -18,5 +18,13 @@ public interface StudentService extends BaseService<Integer, Student> {
      * @return
      * @throws ParseException 
      */
-    boolean updateOperatingTag() throws ParseException;
+    boolean updateOperatingTempTag();
+
+    /**
+     * @describe 初始化教师编号
+     * @author Joburgess
+     * @date 2020/4/16
+     * @return void
+     */
+    void initTeacherId();
 }

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

@@ -104,4 +104,18 @@ public interface TeacherAttendanceService extends BaseService<Long, TeacherAtten
 	 * @return void
 	 */
 	void updateTeacherAttendance(TeacherAttendance teacherAttendance);
+
+	/**
+	 * 清空考勤
+	 * @param courseId
+	 */
+	void cleanCourseTeacherSignOut(Long courseId);
+
+	/**
+	 * 获取教师签到信息
+	 * @param courseId
+	 * @param teacherId
+	 * @return
+	 */
+	TeacherAttendance findByTeacherAttendanceInfo(Long courseId, Integer teacherId);
 }

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

@@ -1082,7 +1082,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                     }else {
                         teacherClassGroupDto.setStudyReportUrl(studyReportUrl + teacherClassGroupDto.getClassGroupId());
                     }
-                }else if(teacherClassGroupDto.getBuyMonths() == null && classGroupNoStartClassTimes.intValue()==0 && classGroupTeacherMap.get(teacherClassGroupDto.getClassGroupId().intValue()).equals(user.getId())){
+                }else if(PracticeGroupType.FREE.equals(teacherClassGroupDto.getPracticeGroupType()) && classGroupNoStartClassTimes.intValue()==0 && classGroupTeacherMap.get(teacherClassGroupDto.getClassGroupId().intValue()).equals(user.getId())){
                    String studyReportUrl = sysConfigDao.findConfigValue(SysConfigService.TEACHER_STUDY_REPORT_URL);
                    teacherClassGroupDto.setStudyReportUrl(studyReportUrl+teacherClassGroupDto.getClassGroupId());
                }

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

@@ -212,7 +212,7 @@ public class CourseReviewServiceImpl extends BaseServiceImpl<Integer, CourseSche
                 courseHomework.setMusicGroupId(courseSchedule.getMusicGroupId());
                 courseHomework.setGroupType(courseSchedule.getGroupType());
                 courseHomework.setClassGroupId(courseSchedule.getClassGroupId());
-                courseHomework.setExpiryDate(DateUtil.addDays(date, 7));
+                courseHomework.setExpiryDate(DateUtil.addDays(date, 3));
                 courseHomework.setExpectNum(CollectionUtils.isEmpty(courseScheduleStudentPayments) ? 0 : courseScheduleStudentPayments.size());
                 courseHomeworkService.insert(courseHomework);
             }
@@ -220,7 +220,7 @@ public class CourseReviewServiceImpl extends BaseServiceImpl<Integer, CourseSche
             if (!CollectionUtils.isEmpty(courseScheduleStudentPayments)) {
 //                    List<StudentCourseHomework> studentCourseHomeworks = new ArrayList<>();
                 Teacher teacher = teacherDao.get(courseScheduleReview.getTeacherId());
-                String dateStr = DateUtil.dateToString(DateUtil.addDays(date, 1), "MM月dd日");
+                String dateStr = DateUtil.dateToString(DateUtil.addDays(date, 3), "MM月dd日");
                 for (CourseScheduleStudentPayment courseScheduleStudentPayment : courseScheduleStudentPayments) {
                     StudentCourseHomework studentCourseHomework = new StudentCourseHomework();
                     if(Objects.isNull(existHomework)){

+ 69 - 51
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -47,6 +47,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import static com.ym.mec.biz.dal.enums.PracticeGroupType.*;
 import static com.ym.mec.biz.dal.enums.SignInStatusEnum.*;
 
 @Service
@@ -488,11 +489,20 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 						courseScheduleTeacherSalary.setTeacherRole(cgtm.getTeacherRole());
 						courseScheduleTeacherSalary.setUserId(cgtm.getUserId());
 						if (type == CourseScheduleType.PRACTICE) {
-							BigDecimal salary = teacherPracticeSalaryMap.get(cgtm.getUserId());
-							if (salary == null) {
-								throw new BizException("请设置老师陪练课课酬");
+							PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(classGroup.getMusicGroupId()));
+							if(practiceGroup == null){
+								throw new BizException("课程组不存在");
+							}else if (FREE.equals(practiceGroup.getType())){
+								SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+								BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+								courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
+							}else {
+								BigDecimal salary = teacherPracticeSalaryMap.get(cgtm.getUserId());
+								if (salary == null) {
+									throw new BizException("请设置老师陪练课课酬");
+								}
+								courseScheduleTeacherSalary.setExpectSalary(salary);
 							}
-							courseScheduleTeacherSalary.setExpectSalary(salary);
 						} else if (type == CourseScheduleType.VIP) {
 
 						} else {
@@ -1819,6 +1829,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         classGroupIds = new ArrayList<>(temp);
         Map<Integer, String> classIdSubjectNameMap = convertToMap(courseScheduleDao.findClassSubjects(classGroupIds));
         courseSchedules.forEach(courseSchedule -> {
+        	if(StringUtils.isNotBlank(courseSchedule.getName())){
+        		return;
+			}
             if (courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.MIX)) {
                 courseSchedule.setName(courseSchedule.getType().getMsg());
             } else {
@@ -2227,6 +2240,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
                     courseSchedule.setClassDate(courseStartTime);
                     courseSchedule.setStartClassTime(courseStartTime);
                     courseSchedule.setEndClassTime(courseEndTime);
+                    courseSchedule.setName(vipGroup.getName());
 
 					if (!DateUtil.isSameDay(courseSchedule.getStartClassTime(), courseSchedule.getEndClassTime())) {
 						throw new BizException("上课时间不允许跨天,请重新调整上课时间");
@@ -3710,17 +3724,20 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         if(teacherSalary != null && teacherSalary.getSettlementTime() != null){
             throw new BizException("调整失败: 课程已结算");
         }
+
         PracticeGroup practiceGroup = practiceGroupDao.get(Long.parseLong(oldCourseSchedule.getMusicGroupId()));
         String classDate = DateUtil.format(courseSchedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
         String startClassTime = DateUtil.format(courseSchedule.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
         Date startDateTime = DateUtil.stringToDate(classDate + " " + startClassTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
         Date endDateTime = DateUtil.addMinutes(startDateTime,practiceGroup.getSingleClassMinutes());
-        if(DateUtil.minutesBetween(startDateTime,practiceGroup.getCoursesStartDate()) > 0){
-            throw new BizException("调整失败: 调整时间不得早于开课时间");
-        }
-        if(DateUtil.minutesBetween(practiceGroup.getCoursesExpireDate(),endDateTime) > 0){
-            throw new BizException("调整失败: 截止时间超过课程有效期");
-        }
+		if(practiceGroup.getType() != TRIAL){
+			if(DateUtil.minutesBetween(startDateTime,practiceGroup.getCoursesStartDate()) > 0){
+				throw new BizException("调整失败: 调整时间不得早于开课时间");
+			}
+			if(DateUtil.minutesBetween(practiceGroup.getCoursesExpireDate(),endDateTime) > 0){
+				throw new BizException("调整失败: 截止时间超过课程有效期");
+			}
+		}
         if(DateUtil.daysBetween(DateUtil.stringToDate(DateUtil.format(startDateTime,DateUtil.DEFAULT_PATTERN),DateUtil.DEFAULT_PATTERN),
                 DateUtil.stringToDate(DateUtil.format(endDateTime,DateUtil.DEFAULT_PATTERN),DateUtil.DEFAULT_PATTERN)) > 0){
             throw new BizException("单节课时不允许跨天");
@@ -3812,26 +3829,26 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         courseScheduleDao.update(oldCourseSchedule);
 
         PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(oldCourseSchedule.getMusicGroupId()));
-
-        if(Objects.nonNull(practiceGroup.getBuyMonths())){
-            List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
-            if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
-                throw new BizException("请设置老师默认课酬");
-            }
-            courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
-        }else{
-			List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(courseScheduleId);
-			if(!CollectionUtils.isEmpty(courseScheduleTeacherSalaries)){
-                SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
-                BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());;
-                for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
-                    courseScheduleTeacherSalary.setUserId(teacherId);
-                    courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
-                }
-                courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
-            }
-        }
-
+		if(practiceGroup.getType() != TRIAL){
+			if(practiceGroup.getType() == FREE){
+				List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
+				if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
+					throw new BizException("请设置老师默认课酬");
+				}
+				courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
+			}else{
+				List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedule(courseScheduleId);
+				if(!CollectionUtils.isEmpty(courseScheduleTeacherSalaries)){
+					SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+					BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+					for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
+						courseScheduleTeacherSalary.setUserId(teacherId);
+						courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
+					}
+					courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
+				}
+			}
+		}
         teacherAttendanceDao.batchUpdateTeacher(courseScheduleIds,teacherId);
         courseScheduleModifyLogDao.insert(scheduleModifyLog);
 
@@ -3914,27 +3931,28 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
         checkNewCourseSchedules(courseSchedules,false);
         courseScheduleDao.batchUpdate(courseSchedules);
         Set<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toSet());
-
-        if(Objects.nonNull(practiceGroup.getBuyMonths())){
-            List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
-            if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
-                throw new BizException("请设置老师默认课酬");
-            }
-            courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
-        }else{
-            List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(practiceGroupId, GroupType.PRACTICE);
-            if(!CollectionUtils.isEmpty(groupNotStartCourses)){
-                SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
-                BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
-                List<Long> courseIds = groupNotStartCourses.stream().map(CourseSchedule::getId).collect(Collectors.toList());
-                List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseIds);
-                for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
-                    courseScheduleTeacherSalary.setUserId(teacherId);
-                    courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
-                }
-                courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
-            }
-        }
+		if(practiceGroup.getType() != TRIAL){
+			if(CHARGE == practiceGroup.getType()){
+				List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
+				if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
+					throw new BizException("请设置老师默认课酬");
+				}
+				courseScheduleTeacherSalaryDao.batchUpdateTeacher(courseScheduleIds,teacherId);
+			}else{
+				List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(practiceGroupId, GroupType.PRACTICE);
+				if(!CollectionUtils.isEmpty(groupNotStartCourses)){
+					SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+					BigDecimal teacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+					List<Long> courseIds = groupNotStartCourses.stream().map(CourseSchedule::getId).collect(Collectors.toList());
+					List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries = courseScheduleTeacherSalaryDao.findByCourseSchedules(courseIds);
+					for (CourseScheduleTeacherSalary courseScheduleTeacherSalary : courseScheduleTeacherSalaries) {
+						courseScheduleTeacherSalary.setUserId(teacherId);
+						courseScheduleTeacherSalary.setExpectSalary(teacherSalary);
+					}
+					courseScheduleTeacherSalaryDao.batchUpdate(courseScheduleTeacherSalaries);
+				}
+			}
+		}
         teacherAttendanceDao.batchUpdateTeacher(courseScheduleIds,teacherId);
         courseScheduleModifyLogDao.batchInsert(scheduleModifyLogs);
 

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -859,7 +859,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
             dataList = courseScheduleTeacherSalaryDao.findIsSettlementCourseSalarys(params);
             for (TeacherCourseSalaryDetail4WebDto teacherCourseSalaryDetail4WebDto : dataList) {
                 if(Objects.nonNull(teacherCourseSalaryDetail4WebDto.getReduceSalary())){
-                    teacherCourseSalaryDetail4WebDto.setFinalSalary(teacherCourseSalaryDetail4WebDto.getActualSalary().multiply(teacherCourseSalaryDetail4WebDto.getReduceSalary()));
+                    teacherCourseSalaryDetail4WebDto.setFinalSalary(teacherCourseSalaryDetail4WebDto.getActualSalary().subtract(teacherCourseSalaryDetail4WebDto.getReduceSalary()));
                 }else{
                     teacherCourseSalaryDetail4WebDto.setFinalSalary(teacherCourseSalaryDetail4WebDto.getActualSalary());
                 }
@@ -895,7 +895,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
         }else{
             result.put("confirmStatus",0);
         }
-        List<TeacherSalaryComplaints> teacherSalaryComplaintsWithMonth = teacherSalaryComplaintsDao.findTeacherSalaryComplaintsWithMonth(queryInfo4Web.getTeacherId(), queryInfo4Web.getMonth());
+        List<TeacherSalaryComplaints> teacherSalaryComplaintsWithMonth = teacherSalaryComplaintsDao.findTeacherSalaryComplaintsWithMonth(queryInfo4Web.getTeacherId(), queryInfo4Web.getMonth(), TeacherSalaryComplaintsStatusEnum.PENDING);
         if(CollectionUtils.isEmpty(teacherSalaryComplaintsWithMonth)){
             result.put("haveComplaints",0);
         }else{
@@ -957,5 +957,6 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
             return;
         }
         courseScheduleTeacherSalaryDao.updateTeacherSalaryConfirmStatusToComplied(teacherSalaryIds);
+        teacherSalaryComplaintsDao.updateComplaintStatusTuDoneWithMonth(month);
     }
 }

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/EduPracticeGroupServiceImpl.java

@@ -276,6 +276,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
         practiceGroupBuyParams.setSingleClassMinutes(practiceCourseMinutes);
         practiceGroupBuyParams.setGroupStatus(GroupStatusEnum.LOCK);
         practiceGroupBuyParams.setMemo(operatorInfo+",教务代买");
+        practiceGroupBuyParams.setType(PracticeGroupType.CHARGE);
         practiceGroupDao.insert(practiceGroupBuyParams);
 
         //创建班级信息
@@ -442,6 +443,7 @@ public class EduPracticeGroupServiceImpl implements EduPracticeGroupService{
 
                 sysUserCashAccountService.updateBalance(practiceGroupBuyParams.getStudentId(), studentPaymentOrder.getExpectAmount().negate(),PlatformCashAccountDetailTypeEnum.PAY_FEE,operatorInfo+",教务代买");
 
+                studentPaymentOrder.setPayTime(now);
                 this.orderCallback(studentPaymentOrder);
 
                 Map<String,Object> result=new HashMap<>();

+ 24 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesMessageServiceImpl.java

@@ -1,14 +1,12 @@
 package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.ExtracurricularExercisesDao;
-import com.ym.mec.biz.dal.dao.ExtracurricularExercisesMessageDao;
-import com.ym.mec.biz.dal.dao.ExtracurricularExercisesReplyDao;
-import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.StudentCourseHomeworkCommentDto;
 import com.ym.mec.biz.dal.entity.ExtracurricularExercises;
 import com.ym.mec.biz.dal.entity.ExtracurricularExercisesMessage;
 import com.ym.mec.biz.dal.entity.ExtracurricularExercisesReply;
+import com.ym.mec.biz.dal.entity.StudentExtracurricularExercisesSituation;
 import com.ym.mec.biz.dal.enums.ImSendTypeEnum;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.page.StudentCourseHomeworkReplyQueryInfo;
@@ -27,11 +25,16 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.*;
 
 @Service
 public class ExtracurricularExercisesMessageServiceImpl extends BaseServiceImpl<Long, ExtracurricularExercisesMessage> implements ExtracurricularExercisesMessageService {
-	
+
+	@Autowired
+	private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
 	@Autowired
 	private ExtracurricularExercisesMessageDao extracurricularExercisesMessageDao;
 	@Autowired
@@ -79,6 +82,22 @@ public class ExtracurricularExercisesMessageServiceImpl extends BaseServiceImpl<
 				}
 				if(change){
 					extracurricularExercisesReplyDao.update(extracurricularExercisesReply);
+					LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
+					LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
+					LocalDate createDateTime = LocalDateTime.ofInstant(extracurricularExercisesReply.getCreateTime().toInstant(), DateUtil.zoneId).toLocalDate();
+					LocalDate createMonday = createDateTime.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
+					if(createDateTime.isBefore(monDayDate)){
+						StudentExtracurricularExercisesSituation studentExercisesSituation = studentExtracurricularExercisesSituationDao.findStudentExercisesSituationsWithMonDay(createMonday.toString(), extracurricularExercisesReply.getUserId());
+						if(Objects.nonNull(studentExercisesSituation)){
+							if(new Integer(1).equals(extracurricularExercisesReply.getIsReplied())){
+								studentExercisesSituation.setExercisesMessageNum(1);
+							}
+							if(new Integer(1).equals(extracurricularExercisesReply.getIsRepliedTimely())){
+								studentExercisesSituation.setExercisesMessageTimelyNum(1);
+							}
+							studentExtracurricularExercisesSituationDao.update(studentExercisesSituation);
+						}
+					}
 				}
 			}
 

+ 23 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExtracurricularExercisesReplyServiceImpl.java

@@ -2,10 +2,7 @@ package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto;
-import com.ym.mec.biz.dal.dto.ExtraExerciseStudentsDto;
-import com.ym.mec.biz.dal.dto.Practice4ExercisesSituationDto;
-import com.ym.mec.biz.dal.dto.SimpleUserDto;
+import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
@@ -140,6 +137,18 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
 		existExtra.setSubmitTime(new Date());
 		extracurricularExercisesReplyDao.update(existExtra);
 
+		LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
+		LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
+		LocalDate createDateTime = LocalDateTime.ofInstant(existExtra.getCreateTime().toInstant(), DateUtil.zoneId).toLocalDate();
+		LocalDate createMonday = createDateTime.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
+		if(createDateTime.isBefore(monDayDate)){
+			StudentExtracurricularExercisesSituation studentExercisesSituation = studentExtracurricularExercisesSituationDao.findStudentExercisesSituationsWithMonDay(createMonday.toString(), existExtra.getUserId());
+			if(Objects.nonNull(studentExercisesSituation)){
+				studentExercisesSituation.setExercisesReplyNum(1);
+				studentExtracurricularExercisesSituationDao.update(studentExercisesSituation);
+			}
+		}
+
 		int submitStudentNum=extracurricularExercisesReplyDao.countIsSubmitStudents(existExtra.getExtracurricularExercisesId());
 		extracurricularExercises.setCompletedNum(submitStudentNum);
 		extracurricularExercisesDao.update(extracurricularExercises);
@@ -189,6 +198,13 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
 	@Transactional(rollbackFor = Exception.class)
 	public void exercisesSituationStatistics() {
 		LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
+		if(nowDate.getDayOfWeek()==DayOfWeek.MONDAY){
+			nowDate = nowDate.plusDays(-1);
+			int lastWeekTodayUpdateNum = studentExtracurricularExercisesSituationDao.findLastWeekTodayUpdateNum(nowDate.toString());
+			if(lastWeekTodayUpdateNum>0){
+				nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
+			}
+		}
 		LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
 		LocalDate sunDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
 		List<Practice4ExercisesSituationDto> noPracticeStudents = courseScheduleStudentPaymentDao.findNoPracticeStudentIdsOnWeek(monDayDate.toString(),sunDayDate.toString());
@@ -225,16 +241,14 @@ public class ExtracurricularExercisesReplyServiceImpl extends BaseServiceImpl<Lo
 			int exercisesMessageNum=0;
 			int exercisesMessageTimelyNum=0;
 			for (ExtracurricularExercisesReply studentExercise : studentExercises) {
-				if(Objects.isNull(studentExercise.getSubmitTime())
-					||Objects.isNull(studentExercise.getCreateTime())){
+				if(!new Integer(1).equals(studentExercise.getStatus())){
 					continue;
 				}
-				if(studentExercise.getSubmitTime().after(studentExercise.getCreateTime())){
+				if(!new Integer(1).equals(studentExercise.getIsReplied())){
 					continue;
 				}
 				exercisesMessageNum+=1;
-				int hours = DateUtil.hoursBetween(studentExercise.getSubmitTime(), studentExercise.getCreateTime());
-				if(hours<=12){
+				if(new Integer(1).equals(studentExercise.getIsRepliedTimely())){
 					exercisesMessageTimelyNum+=1;
 				}
 			}

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

@@ -282,7 +282,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
 
         OrderTypeEnum type = OrderTypeEnum.SPORADIC;
-        String receiver = "PER";
+        String receiver = "c419";
 
         Integer userId = sporadicPayDto.getUserId();
         String orderNo = idGeneratorService.generatorId("payment") + "";

+ 5 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -154,8 +154,11 @@ public class PayServiceImpl implements PayService {
                 company = "yaming";
             }
         }
-        if (receiver.equals("sdaya")) {
-            company = "sdaya";
+        Set<String> companies = new HashSet<>();
+        companies.add("sdaya");
+        companies.add("c419");
+        if (companies.contains(receiver)) {
+            company = receiver;
             receiver = null;
         }
 

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

@@ -1843,6 +1843,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         practiceGroup.setName(subject.getName() + "•" + sysUser.getUsername());
         practiceGroup.setSingleClassMinutes(practiceCourseMinutes);
         practiceGroup.setGroupStatus(GroupStatusEnum.NORMAL);
+        practiceGroup.setType(PracticeGroupType.FREE);
         practiceGroupDao.insert(practiceGroup);
 
         //创建班级信息
@@ -2813,6 +2814,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         practiceGroupBuyParams.setOrganId(sysUser.getOrganId());
         practiceGroupBuyParams.setSingleClassMinutes(practiceCourseMinutes);
         practiceGroupBuyParams.setGroupStatus(GroupStatusEnum.LOCK);
+        practiceGroupBuyParams.setType(PracticeGroupType.CHARGE);
         practiceGroupDao.insert(practiceGroupBuyParams);
 
         //创建班级信息
@@ -2979,6 +2981,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 
                 sysUserCashAccountService.updateBalance(practiceGroupBuyParams.getStudentId(), studentPaymentOrder.getExpectAmount().negate(),PlatformCashAccountDetailTypeEnum.PAY_FEE,"网管课购买");
 
+                studentPaymentOrder.setPayTime(now);
                 this.orderCallback(studentPaymentOrder);
 
                 Map<String,Object> result=new HashMap<>();
@@ -3345,6 +3348,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
 
                 sysUserCashAccountService.updateBalance(userId, newOrder.getExpectAmount().negate(),PlatformCashAccountDetailTypeEnum.PAY_FEE,"网管课购买");
 
+                newOrder.setPayTime(new Date());
                 this.orderCallback(newOrder);
 
                 Map<String,Object> result=new HashMap<>();
@@ -3421,7 +3425,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
         Map<String, Object> result=new HashMap<>();
         if(Objects.nonNull(groupId)){
             PracticeGroup practiceGroup = practiceGroupDao.get(groupId);
-            if(Objects.isNull(practiceGroup)||!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)||Objects.isNull(practiceGroup.getBuyMonths())){
+            if(Objects.isNull(practiceGroup)||!practiceGroup.getGroupStatus().equals(GroupStatusEnum.NORMAL)||PracticeGroupType.FREE.equals(practiceGroup.getType())){
                 result.put("existWaitPayOrder",0);
                 return result;
             }

+ 62 - 30
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java

@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
 
 @Service
 public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentAttendance>  implements StudentAttendanceService {
-	
+
 	@Autowired
 	private StudentAttendanceDao studentAttendanceDao;
 	@Autowired
@@ -265,8 +265,8 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 				case LEAVE:
 					result.put("numberOfLeavePeoples",studentStatusCount.getNumberOfStudent());
 					break;
-			default:
-				break;
+				default:
+					break;
 
 			}
 		});
@@ -297,18 +297,18 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public boolean leave(Integer userId, Long courseScheduleId, String remark) {
-		
+
 		CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId);
 		if(courseSchedule == null){
 			throw new BizException("课程编号异常");
 		}
-		
+
 		if(courseSchedule.getStatus() == CourseStatusEnum.OVER){
 			throw new BizException("课程已结束");
 		}
 
 		Date date = new Date();
-		
+
 		int hours = 4;
 		String str = sysConfigDao.findConfigValue(SysConfigService.ADVANCE_LEAVE_HOURS);
 		if (StringUtils.isNotBlank(str)) {
@@ -318,7 +318,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 		if(DateUtil.addHours(date, hours).after(courseSchedule.getStartClassTime())){
 			throw new BizException("开课{}小时之前才可以请假",hours);
 		}
-		
+
 		StudentAttendance studentAttendance  = studentAttendanceDao.findByStatusAndCourseScheduleId(userId,courseScheduleId.intValue());
 		if(Objects.isNull(studentAttendance)){
 			studentAttendance=new StudentAttendance();
@@ -338,7 +338,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 		}else{
 			studentAttendanceDao.insert(studentAttendance);
 		}
-		
+
 		ClassGroupStudentMapper classGroupStudentMapper = classGroupStudentMapperDao.query(courseSchedule.getClassGroupId(), userId);
 		if(Objects.isNull(classGroupStudentMapper)){
 			throw new BizException("您不在此课程对应班级上");
@@ -448,7 +448,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 	}
 
 	@Override
-	@Transactional(rollbackFor = Exception.class)
+	@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
 	public void addStudentAttendanceRecord(Integer courseScheduleId, Integer userId, StudentAttendanceStatusEnum statusEnum,SignStatusEnum signStatusEnum) {
 		CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId.longValue());
 		ClassGroup classGroup = classGroupDao.findByCourseSchedule(courseScheduleId);
@@ -463,11 +463,13 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 			studentAttendance.setMusicGroupId(classGroup.getMusicGroupId());
 			studentAttendance.setUserId(userId);
 			studentAttendance.setTeacherId(courseSchedule.getActualTeacherId());
+
 			studentAttendanceDao.insert(studentAttendance);
 		}else {
 			studentAttendance.setTeacherId(courseSchedule.getActualTeacherId());
 			studentAttendance.setUpdateTime(date);
 		}
+//		Date signInTime = studentAttendance.getSignInTime();
 		//没有签到信息才会生成
 		if(signStatusEnum == SignStatusEnum.SIGN_IN && studentAttendance.getSignInTime() == null){
 			//判断是否在签到时间段内(课程开始前20~结束前)
@@ -489,8 +491,6 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 				courseScheduleDao.update(courseSchedule);
 			}
 		}else if(signStatusEnum == SignStatusEnum.SIGN_OUT){
-			studentAttendance.setStatus(statusEnum);
-			studentAttendance.setSignOutTime(date);
 			String classDate = DateUtil.format(courseSchedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
 			String startClassTime = DateUtil.format(courseSchedule.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
 			String endClassTime = DateUtil.format(courseSchedule.getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
@@ -500,7 +500,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 			if(DateUtil.minutesBetween(classEndDateTime,date) >= 0){
 				String continueCourseTime = sysConfigDao.findConfigValue(SysConfigService.ONLINE_CONTINUE_COURSE_TIME);
 				if(StringUtils.isEmpty(continueCourseTime)){
-					continueCourseTime = "3";
+					continueCourseTime = "5";
 				}
 				List<CourseSchedule> courseSchedules = new ArrayList<>();
 				CourseSchedule cs = courseSchedule;
@@ -526,43 +526,65 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 						String courseClassDate;
 						String courseStartDateTime;
 						String courseEndDateTime;
-						for (CourseSchedule e:courseSchedules) {
-							//获取当前课程的单节课时长
-//							int signClassMinutes = courseScheduleDao.getSingleClassMinutes(e.getId());
-//							totalMinutes -= signClassMinutes;
-							//补充签到签退时间
-							courseClassDate = DateUtil.format(e.getClassDate(), DateUtil.DEFAULT_PATTERN);
-							courseStartDateTime = DateUtil.format(e.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
-							courseEndDateTime = DateUtil.format(e.getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
+						for (int i = 0; i < courseSchedules.size(); i++) {
+							courseClassDate = DateUtil.format(courseSchedules.get(i).getClassDate(), DateUtil.DEFAULT_PATTERN);
+							courseStartDateTime = DateUtil.format(courseSchedules.get(i).getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
+							courseEndDateTime = DateUtil.format(courseSchedules.get(i).getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
 							Date startDateTime = DateUtil.stringToDate(courseClassDate + " " + courseStartDateTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
 							Date endDateTime = DateUtil.stringToDate(courseClassDate + " " + courseEndDateTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
-							StudentAttendance byStatusAndCourseScheduleId = studentAttendanceDao.findByStatusAndCourseScheduleId(userId, e.getId().intValue());
+							StudentAttendance byStatusAndCourseScheduleId = studentAttendanceDao.findByStatusAndCourseScheduleId(userId, courseSchedules.get(i).getId().intValue());
+							Date signOutTime = date;
+							if(date.before(startDateTime)){
+								continue;
+							}
+							if(i < courseSchedules.size() - 1 && date.after(endDateTime)){
+								//不是最后一节连堂课,并且签退时间大于课程结束时间,签退时间等于课程结束时间
+								signOutTime = endDateTime;
+							}
 							if(byStatusAndCourseScheduleId != null){
-								byStatusAndCourseScheduleId.setSignOutTime(date);
+								if(byStatusAndCourseScheduleId.getSignOutTime() != null){
+									continue;
+								}
+								if(byStatusAndCourseScheduleId.getSignInTime() != null){
+									startDateTime = null;
+								}
+								byStatusAndCourseScheduleId.setSignInTime(startDateTime);
+								byStatusAndCourseScheduleId.setSignOutTime(signOutTime);
 								byStatusAndCourseScheduleId.setStatus(statusEnum);
 								byStatusAndCourseScheduleId.setUpdateTime(date);
 								studentAttendanceDao.update(byStatusAndCourseScheduleId);
 							}else {
 								byStatusAndCourseScheduleId = new StudentAttendance();
-								byStatusAndCourseScheduleId.setSignOutTime(endDateTime);
+								byStatusAndCourseScheduleId.setSignOutTime(signOutTime);
 								byStatusAndCourseScheduleId.setStatus(statusEnum);
 								byStatusAndCourseScheduleId.setSignInTime(startDateTime);
 								byStatusAndCourseScheduleId.setUpdateTime(date);
 								byStatusAndCourseScheduleId.setUserId(userId);
 								byStatusAndCourseScheduleId.setTeacherId(courseSchedule.getActualTeacherId());
-								byStatusAndCourseScheduleId.setClassGroupId(e.getClassGroupId());
-								byStatusAndCourseScheduleId.setCourseScheduleId(e.getId());
-								byStatusAndCourseScheduleId.setMusicGroupId(e.getMusicGroupId());
-								byStatusAndCourseScheduleId.setGroupType(e.getGroupType());
+								byStatusAndCourseScheduleId.setClassGroupId(courseSchedules.get(i).getClassGroupId());
+								byStatusAndCourseScheduleId.setCourseScheduleId(courseSchedules.get(i).getId());
+								byStatusAndCourseScheduleId.setMusicGroupId(courseSchedules.get(i).getMusicGroupId());
+								byStatusAndCourseScheduleId.setGroupType(courseSchedules.get(i).getGroupType());
 								byStatusAndCourseScheduleId.setCurrentClassTimes(classGroup.getCurrentClassTimes() + 1);
 								studentAttendanceDao.insert(byStatusAndCourseScheduleId);
 							}
-							if(!date.before(endDateTime)){
-								break;
+							if(studentAttendance.getSignOutTime() == null){
+								studentAttendance.setStatus(statusEnum);
+								studentAttendance.setSignOutTime(classEndDateTime);
 							}
 						}
 					}
+				}else {
+					studentAttendance.setStatus(statusEnum);
+					studentAttendance.setSignOutTime(date);
+				}
+				if(studentAttendance.getSignOutTime() == null){
+					studentAttendance.setStatus(statusEnum);
+					studentAttendance.setSignOutTime(date);
 				}
+			}else {
+				studentAttendance.setStatus(statusEnum);
+				studentAttendance.setSignOutTime(date);
 			}
 		}
 		studentAttendanceDao.update(studentAttendance);
@@ -595,7 +617,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 		//是否是连堂课
 		String continueCourseTime = sysConfigDao.findConfigValue(SysConfigService.ONLINE_CONTINUE_COURSE_TIME);
 		if(StringUtils.isEmpty(continueCourseTime)){
-			continueCourseTime = "10";
+			continueCourseTime = "5";
 		}
 		Date date = new Date();
 		for (CourseSchedule courseSchedule : courseScheduleList) {
@@ -664,4 +686,14 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 			}
 		}
 	}
+
+	@Override
+	public StudentAttendance findByStatusAndCourseScheduleId(Long courseId, Integer userId) {
+		return studentAttendanceDao.findByStatusAndCourseScheduleId(userId,courseId.intValue());
+	}
+
+	@Override
+	public void cleanCourseStudentSignOut(Long courseId, Integer userId) {
+		studentAttendanceDao.cleanCourseStudentSignOut(courseId,userId);
+	}
 }

+ 46 - 11
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -1,15 +1,54 @@
 package com.ym.mec.biz.service.impl;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
 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.CourseSchedule;
+import com.ym.mec.biz.dal.dao.ClassGroupDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.ym.mec.biz.dal.dao.MusicGroupDao;
+import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
+import com.ym.mec.biz.dal.dao.OrganizationDao;
+import com.ym.mec.biz.dal.dao.StudentDao;
+import com.ym.mec.biz.dal.dao.StudentManageDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
+import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
+import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
+import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.dao.VipGroupDao;
+import com.ym.mec.biz.dal.dto.ConditionDto;
+import com.ym.mec.biz.dal.dto.MusicGroupStudentSignDto;
+import com.ym.mec.biz.dal.dto.MusicGroupStudentsDto;
+import com.ym.mec.biz.dal.dto.Student4operating;
+import com.ym.mec.biz.dal.dto.StudentManageAccountBaseInfoDto;
+import com.ym.mec.biz.dal.dto.StudentManageBaseInfoOfMusicGroupDto;
+import com.ym.mec.biz.dal.dto.StudentManageCourseListDto;
+import com.ym.mec.biz.dal.dto.StudentManageListDto;
+import com.ym.mec.biz.dal.dto.StudentManageVipGroupClassDto;
+import com.ym.mec.biz.dal.dto.StudentManageVipGroupDto;
+import com.ym.mec.biz.dal.dto.StudentRegisterPerDto;
 import com.ym.mec.biz.dal.entity.Student;
 import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
-import com.ym.mec.biz.dal.page.*;
+import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageVipClassQueryInfo;
+import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
+import com.ym.mec.biz.dal.page.StudentSignQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
 import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.biz.service.StudentService;
 import com.ym.mec.common.entity.ImResult;
@@ -18,13 +57,6 @@ import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.util.collection.MapUtil;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.stream.Collectors;
 
 /**
  * @Author Joburgess
@@ -387,6 +419,7 @@ public class StudentManageServiceImpl implements StudentManageService {
         Student student = new Student(userId, studentRegistrationDao.getSubjectIds(userId));
         student.setOperatingTag(sysUser.getOperatingTag());
         student.setServiceTag(sysUser.getServiceTag());
+        student.setTeacherId(sysUser.getTeacherId());
         studentService.upSet(student);
         return userId;
     }
@@ -405,7 +438,9 @@ public class StudentManageServiceImpl implements StudentManageService {
         teacherDao.updateUser(sysUser);
         Student student = new Student(userId, studentRegistrationDao.getSubjectIds(userId));
         student.setOperatingTag(sysUser.getOperatingTag());
+    	student.setOperatingTempTag(0);
         student.setServiceTag(sysUser.getServiceTag());
+        student.setTeacherId(sysUser.getTeacherId());
         studentService.upSet(student);
         return userId;
     }

+ 74 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java

@@ -1,8 +1,7 @@
 package com.ym.mec.biz.service.impl;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -12,10 +11,13 @@ import java.util.stream.Collectors;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
 import com.ym.mec.biz.dal.dao.StudentDao;
 import com.ym.mec.biz.dal.dto.StudentCourseTimesDto;
+import com.ym.mec.biz.dal.dto.StudentTeacherCourseDto;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.Student;
 import com.ym.mec.biz.dal.page.StudentQueryInfo;
 import com.ym.mec.biz.service.StudentService;
@@ -71,26 +73,37 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 	}
 
 	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public boolean updateOperatingTag() throws ParseException {
-		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-		Date date = sdf.parse("2020-02-08");
-		List<StudentCourseTimesDto> studentCourseTimesDtoList = courseScheduleStudentPaymentDao.queryStudentCourseTimesOfOnline(date);
+	public boolean updateOperatingTempTag() {
+		List<StudentCourseTimesDto> studentCourseTimesDtoList = courseScheduleStudentPaymentDao.queryStudentNotStartCourseTimesOfOnline();
 		Map<Integer,StudentCourseTimesDto> map = studentCourseTimesDtoList.stream().collect(Collectors.toMap(StudentCourseTimesDto::getUserId, s -> s));
 		//查询服务指标为0的用户
-		List<Student> studentList = studentDao.queryByOperatingTag(0);
+		List<Student> unlabeledStudentList = studentDao.queryByOperatingTempTag(0);
 		
 		List<Student> updateStudentList = new ArrayList<Student>();
 		StudentCourseTimesDto dto = null;
-		for(Student s : studentList){
+		for(Student s : unlabeledStudentList){
+			if(s.getOperatingTag() == 1){
+				continue;
+			}
 			dto = map.get(s.getUserId());
 			if(dto != null){
-				if(dto.getTotalCourseTimes() != dto.getFreePracticeCourseTimes()){
+				if(dto.getTotalCourseTimes() > 0 && dto.getTotalCourseTimes() != dto.getFreePracticeCourseTimes()){
+					s.setOperatingTempTag(1);
 					s.setOperatingTag(1);
 					updateStudentList.add(s);
 				}
 			}
 		}
+
+		List<Student> labeledStudentList = studentDao.queryByOperatingTempTag(1);
+		for(Student s : labeledStudentList){
+			dto = map.get(s.getUserId());
+			if (dto == null || dto.getTotalCourseTimes() == dto.getFreePracticeCourseTimes()) {
+				s.setOperatingTempTag(0);
+				s.setOperatingTag(0);
+				updateStudentList.add(s);
+			}
+		}
 		
 		if(updateStudentList.size() > 0){
 			studentDao.batchUpdate(updateStudentList);
@@ -98,4 +111,55 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
 		
 		return true;
 	}
+
+	@Override
+	public void initTeacherId() {
+		List<StudentTeacherCourseDto> allStudentCourseInfo = courseScheduleStudentPaymentDao.findAllStudentCourseInfo();
+		Map<Integer, List<StudentTeacherCourseDto>> studentCoursesMap = allStudentCourseInfo.stream().collect(Collectors.groupingBy(StudentTeacherCourseDto::getStudentId));
+		List<Student> students=new ArrayList<>();
+		for (Map.Entry<Integer, List<StudentTeacherCourseDto>> studentCoursesEntry : studentCoursesMap.entrySet()) {
+			Map<CourseSchedule.CourseScheduleType, List<StudentTeacherCourseDto>> courseTypeCourseMap = studentCoursesEntry.getValue().stream().collect(Collectors.groupingBy(StudentTeacherCourseDto::getCourseScheduleType));
+			List<StudentTeacherCourseDto> practiceCourses = courseTypeCourseMap.get(CourseSchedule.CourseScheduleType.PRACTICE);
+			if (!CollectionUtils.isEmpty(practiceCourses)) {
+				practiceCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
+				Student student=new Student(studentCoursesEntry.getKey());
+				student.setTeacherId(practiceCourses.get(0).getTeacherId());
+				students.add(student);
+				continue;
+			}
+
+			List<StudentTeacherCourseDto> vipCourses = courseTypeCourseMap.get(CourseSchedule.CourseScheduleType.VIP);
+			if (!CollectionUtils.isEmpty(vipCourses)) {
+				Student student=new Student(studentCoursesEntry.getKey());
+				vipCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
+				student.setTeacherId(vipCourses.get(0).getTeacherId());
+				students.add(student);
+				continue;
+			}
+
+			List<StudentTeacherCourseDto> singleCourses = courseTypeCourseMap.get(CourseSchedule.CourseScheduleType.SINGLE);
+			if (!CollectionUtils.isEmpty(singleCourses)) {
+				Student student=new Student(studentCoursesEntry.getKey());
+				singleCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
+				student.setTeacherId(singleCourses.get(0).getTeacherId());
+				students.add(student);
+				continue;
+			}
+
+			List<StudentTeacherCourseDto> mixCourses = courseTypeCourseMap.get(CourseSchedule.CourseScheduleType.MIX);
+			if (!CollectionUtils.isEmpty(mixCourses)) {
+				Student student=new Student(studentCoursesEntry.getKey());
+				mixCourses.sort(Comparator.comparing(StudentTeacherCourseDto::getClassesStartTime).reversed());
+				student.setTeacherId(mixCourses.get(0).getTeacherId());
+				students.add(student);
+				continue;
+			}
+		}
+		if(!CollectionUtils.isEmpty(students)){
+			studentDao.batchUpdate(students);
+		}
+		students=null;
+		studentCoursesMap=null;
+		allStudentCourseInfo=null;
+	}
 }

+ 56 - 19
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -30,7 +30,7 @@ import java.util.*;
 
 @Service
 public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherAttendance>  implements TeacherAttendanceService {
-	
+
 	@Autowired
 	private TeacherAttendanceDao teacherAttendanceDao;
 	@Autowired
@@ -272,7 +272,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 		//签到
 		String continueCourseTime = sysConfigDao.findConfigValue(SysConfigService.ONLINE_CONTINUE_COURSE_TIME);
 		if(StringUtils.isEmpty(continueCourseTime)){
-			continueCourseTime = "10";
+			continueCourseTime = "5";
 		}
 		if(teacherAttendance.getSignInTime() == null && SignStatusEnum.SIGN_IN.equals(signStatus)){
 			YesOrNoEnum yesOrNoEnum = courseScheduleService.enableOnlyNormalAttendance(courseSchedule.getStartClassTime(),
@@ -309,14 +309,13 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 		//签退
 		if(SignStatusEnum.SIGN_OUT.equals(signStatus)){
 			if(DateUtil.minutesBetween(classEndDateTime,date) >= 0){
-				teacherAttendance.setSignOutStatus(YesOrNoEnum.YES);
 				List<CourseSchedule> courseSchedules = new ArrayList<>();
 				CourseSchedule cs = courseSchedule;
 				while (true){
 					//获取当前课程的所有连堂课列表
 					String courseClassDate = DateUtil.format(cs.getClassDate(), DateUtil.DEFAULT_PATTERN);
 					String courseEndDateTime = DateUtil.format(cs.getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
-//					Date endDateTime = DateUtil.stringToDate(courseClassDate + " " + courseEndDateTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
+//					Date toDate = DateUtil.stringToDate(courseClassDate + " " + courseEndDateTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
 					cs = courseScheduleDao.queryContinueCourse(cs,continueCourseTime,courseClassDate + " " + courseEndDateTime);
 					//存在连堂课
 					if(cs != null){
@@ -335,31 +334,58 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 						String courseClassDate;
 						String courseStartDateTime;
 						String courseEndDateTime;
-						for (CourseSchedule e:courseSchedules) {
-							//获取当前课程的单节课时长
-//							int signClassMinutes = courseScheduleDao.getSingleClassMinutes(e.getId());
-							courseClassDate = DateUtil.format(e.getClassDate(), DateUtil.DEFAULT_PATTERN);
-							courseStartDateTime = DateUtil.format(e.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
-							courseEndDateTime = DateUtil.format(e.getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
+						for (int i = 0; i < courseSchedules.size(); i++) {
+							courseClassDate = DateUtil.format(courseSchedules.get(i).getClassDate(), DateUtil.DEFAULT_PATTERN);
+							courseStartDateTime = DateUtil.format(courseSchedules.get(i).getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
+							courseEndDateTime = DateUtil.format(courseSchedules.get(i).getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
 							Date startDateTime = DateUtil.stringToDate(courseClassDate + " " + courseStartDateTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
 							Date endDateTime = DateUtil.stringToDate(courseClassDate + " " + courseEndDateTime, DateUtil.EXPANDED_DATE_TIME_FORMAT);
+							Date signOutTime = date;
+							if(date.before(startDateTime)){
+								continue;
+							}
+							if(i < courseSchedules.size() - 1 && date.after(endDateTime)){
+								//不是最后一节连堂课,并且签退时间大于课程结束时间,签退时间等于课程结束时间
+								signOutTime = endDateTime;
+							}
 							//如果签退时间大于课程结束时间
-							if(date.before(endDateTime)){
-								teacherAttendanceDao.cuntinueCourseSign(e.getId(),startDateTime,endDateTime,1);
+							//如果当前课程没有签退记录,那么正常更新
+							TeacherAttendance personalAttendance = teacherAttendanceDao.findByTeacherAttendanceInfo(userId.longValue(),courseSchedules.get(i).getId());
+							if(personalAttendance != null && personalAttendance.getSignOutStatus() == YesOrNoEnum.NO){
+								continue;
+							}
+							//如果当前课程有签到时间,那么只更新签退时间和状态
+							if(personalAttendance.getSignInTime() != null){
+								startDateTime = null;
+							}
+							if(personalAttendance.getSignOutTime() != null){
+								continue;
+							}
+							if(date.after(endDateTime)){
+								teacherAttendanceDao.cuntinueCourseSign(courseSchedules.get(i).getId(),startDateTime,signOutTime,1);
 							}else if (date.equals(endDateTime)){
-								teacherAttendanceDao.cuntinueCourseSign(e.getId(),startDateTime,endDateTime,1);
-								break;
+								teacherAttendanceDao.cuntinueCourseSign(courseSchedules.get(i).getId(),startDateTime,signOutTime,1);
 							}else {
-								teacherAttendanceDao.cuntinueCourseSign(e.getId(),startDateTime,endDateTime,0);
-								break;
+								teacherAttendanceDao.cuntinueCourseSign(courseSchedules.get(i).getId(),startDateTime,signOutTime,0);
+							}
+							if(teacherAttendance.getSignOutTime() == null){
+								teacherAttendance.setSignOutStatus(YesOrNoEnum.YES);
+								teacherAttendance.setSignOutTime(classEndDateTime);
 							}
 						}
 					}
+				}else {
+					teacherAttendance.setSignOutStatus(YesOrNoEnum.YES);
+					teacherAttendance.setSignOutTime(date);
+				}
+				if(teacherAttendance.getSignOutTime() == null){
+					teacherAttendance.setSignOutStatus(YesOrNoEnum.YES);
+					teacherAttendance.setSignOutTime(date);
 				}
 			}else {
 				teacherAttendance.setSignOutStatus(YesOrNoEnum.NO);
+				teacherAttendance.setSignOutTime(date);
 			}
-			teacherAttendance.setSignOutTime(date);
 			teacherAttendanceDao.update(teacherAttendance);
 		}
 	}
@@ -386,7 +412,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 
 	@Override
 	public boolean pushNoSignOutMessage() {
-		
+
 		Integer minutes = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE));;
 
 		List<Mapper> list = teacherAttendanceDao.queryNoSignOutListByOverMinutes(minutes);
@@ -395,7 +421,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 			Map<Integer, String> receivers = new HashMap<Integer, String>();
 			Integer userId = (Integer) mapper.getKey();
 			receivers.put(userId, userId + "");
-			
+
 			String key = "SignOut_" + userId + "_" + mapper.getCourseScheduleId();
 
 			if (!redisCache.exists(key)) {
@@ -492,4 +518,15 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 			teacherAttendanceDao.update(teacherAttendance);
 		}
 	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	public void cleanCourseTeacherSignOut(Long courseId) {
+		teacherAttendanceDao.cleanCourseTeacherSignOut(courseId);
+	}
+
+	@Override
+	public TeacherAttendance findByTeacherAttendanceInfo(Long courseId, Integer teacherId) {
+		return teacherAttendanceDao.findByTeacherAttendanceInfo(teacherId.longValue(),courseId);
+	}
 }

+ 13 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultPracticeGroupSalaryServiceImpl.java

@@ -46,6 +46,13 @@ public class TeacherDefaultPracticeGroupSalaryServiceImpl extends BaseServiceImp
 			Integer userId = teacherDefaultPracticeGroupSalaryList.get(0).getUserId();
 			BigDecimal salary = teacherDefaultPracticeGroupSalaryList.get(0).getMainTeacherSalary();
 			
+			//查询原课酬
+			List<TeacherDefaultPracticeGroupSalary> origSalaryList = teacherDefaultPracticeGroupSalaryDao.queryByUserId(userId);
+			TeacherDefaultPracticeGroupSalary origSalary = null;
+			if(origSalaryList.size() > 0){
+				origSalary = origSalaryList.get(0);
+			}
+			
 			//先清空
 			teacherDefaultPracticeGroupSalaryDao.deleteByUserId(userId);
 			//再批量新增
@@ -66,9 +73,12 @@ public class TeacherDefaultPracticeGroupSalaryServiceImpl extends BaseServiceImp
 					List<CourseScheduleTeacherSalary> list = new ArrayList<CourseScheduleTeacherSalary>();
 
 					for (CourseScheduleTeacherSalary ts : updateTeacherSalaryList) {
-						ts.setExpectSalary(salary);
-						ts.setUpdateTime(date);
-						list.add(ts);
+						if (origSalary != null && origSalary.getMainTeacherSalary().compareTo(ts.getExpectSalary()) == 0
+								&& origSalary.getMainTeacherSalary().compareTo(salary) != 0) {
+							ts.setExpectSalary(salary);
+							ts.setUpdateTime(date);
+							list.add(ts);
+						}
 					}
 					if (list.size() > 0) {
 						courseScheduleTeacherSalaryDao.batchUpdateTeacherExpectSalarys(list);

+ 31 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherDefaultVipGroupSalaryServiceImpl.java

@@ -17,19 +17,23 @@ import org.springframework.transaction.annotation.Transactional;
 
 import com.alibaba.fastjson.JSON;
 import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
+import com.ym.mec.biz.dal.dao.TeacherDao;
 import com.ym.mec.biz.dal.dao.TeacherDefaultVipGroupSalaryDao;
 import com.ym.mec.biz.dal.dao.VipGroupActivityDao;
 import com.ym.mec.biz.dal.dao.VipGroupDao;
 import com.ym.mec.biz.dal.dto.VipGroupSalarySettlementDto;
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
 import com.ym.mec.biz.dal.entity.CourseScheduleTeacherSalary;
+import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.biz.dal.entity.TeacherDefaultVipGroupSalary;
 import com.ym.mec.biz.dal.entity.VipGroup;
 import com.ym.mec.biz.dal.entity.VipGroupActivity;
+import com.ym.mec.biz.dal.enums.JobNatureEnum;
 import com.ym.mec.biz.dal.enums.SalarySettlementTypeEnum;
 import com.ym.mec.biz.dal.enums.TeachModeEnum;
 import com.ym.mec.biz.service.TeacherDefaultVipGroupSalaryService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 
 @Service
@@ -46,6 +50,9 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 
 	@Autowired
 	private VipGroupActivityDao vipGroupActivityDao;
+	
+	@Autowired
+	private TeacherDao teacherDao;
 
 	@Override
 	public BaseDAO<Long, TeacherDefaultVipGroupSalary> getDAO() {
@@ -69,15 +76,19 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 
 			TeacherDefaultVipGroupSalary salary = teacherDefaultVipGroupSalaries.get(0);
 			Integer userId = salary.getUserId();
+			Teacher teacher = teacherDao.get(userId);
+			if(teacher == null){
+				throw new BizException("老师信息在系统中找不到");
+			}
 			// 获取老师默认VIP课课酬
-			/*List<TeacherDefaultVipGroupSalary> origSalaryList = teacherDefaultVipGroupSalaryDao.queryByUserId(userId);
+			List<TeacherDefaultVipGroupSalary> origSalaryList = teacherDefaultVipGroupSalaryDao.queryByUserId(userId);
 
 			Map<Integer, TeacherDefaultVipGroupSalary> map = new HashMap<Integer, TeacherDefaultVipGroupSalary>();
 			if (origSalaryList != null && origSalaryList.size() > 0) {
 				for (TeacherDefaultVipGroupSalary ms : origSalaryList) {
 					map.put(ms.getVipGroupCategoryId(), ms);
 				}
-			}*/
+			}
 
 			Map<Integer, TeacherDefaultVipGroupSalary> salaryMap = new HashMap<Integer, TeacherDefaultVipGroupSalary>();
 			for (TeacherDefaultVipGroupSalary ms : teacherDefaultVipGroupSalaries) {
@@ -89,6 +100,9 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 						|| oldMS.getOnlineClassesSalary() == null || oldMS.getOnlineClassesSalary().doubleValue() != ms.getOnlineClassesSalary().doubleValue()) {
 					salaryMap.put(ms.getVipGroupCategoryId(), ms);
 				}*/
+				if(teacher.getJobNature() == JobNatureEnum.FULL_TIME){
+					ms.setOnlineClassesSalary(new BigDecimal(0));
+				}
 				salaryMap.put(ms.getVipGroupCategoryId(), ms);
 			}
 
@@ -140,14 +154,22 @@ public class TeacherDefaultVipGroupSalaryServiceImpl extends BaseServiceImpl<Lon
 							}
 
 							TeacherDefaultVipGroupSalary tdms = salaryMap.get(vipGroup.getVipGroupCategoryId());
-							if (tdms != null) {
-								if (vipGroupSalarySettlementDto.getOnlineSalarySettlement() != null && vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType() == SalarySettlementTypeEnum.TEACHER_DEFAULT
+							TeacherDefaultVipGroupSalary origTdms = map.get(vipGroup.getVipGroupCategoryId());
+							if (tdms != null && origTdms != null) {
+								if (vipGroupSalarySettlementDto.getOnlineSalarySettlement() != null
+										&& vipGroupSalarySettlementDto.getOnlineSalarySettlement().getSalarySettlementType() == SalarySettlementTypeEnum.TEACHER_DEFAULT
 										&& (ts.getCourseSchedule().getTeachMode() == TeachModeEnum.ONLINE)) {// 线上课
-
-									ts.setExpectSalary(tdms.getOnlineClassesSalary());
-									list.add(ts);
-								} else if (vipGroupSalarySettlementDto.getOfflineSalarySettlement() != null && vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType() == SalarySettlementTypeEnum.TEACHER_DEFAULT
-										&& ts.getCourseSchedule().getTeachMode() == TeachModeEnum.OFFLINE) {// 线下课
+									if (teacher.getJobNature() != JobNatureEnum.FULL_TIME
+											&& ts.getExpectSalary().compareTo(origTdms.getOnlineClassesSalary()) == 0
+											&& tdms.getOnlineClassesSalary().compareTo(origTdms.getOnlineClassesSalary()) != 0) {
+										ts.setExpectSalary(tdms.getOnlineClassesSalary());
+										list.add(ts);
+									}
+								} else if (vipGroupSalarySettlementDto.getOfflineSalarySettlement() != null
+										&& vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType() == SalarySettlementTypeEnum.TEACHER_DEFAULT
+										&& ts.getCourseSchedule().getTeachMode() == TeachModeEnum.OFFLINE
+										&& ts.getExpectSalary().compareTo(origTdms.getOfflineClassesSalary()) == 0
+										&& tdms.getOfflineClassesSalary().compareTo(origTdms.getOfflineClassesSalary()) != 0) {// 线下课
 									ts.setExpectSalary(tdms.getOfflineClassesSalary());
 									list.add(ts);
 								}

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

@@ -67,8 +67,7 @@ public class TeacherSalaryComplaintsServiceImpl extends BaseServiceImpl<Long, Te
 		Map<Integer, String> map = new HashMap<>(1);
 		map.put(salaryComplaints.getTeacherId(), salaryComplaints.getTeacherId().toString());
 		if (map != null && map.size() > 0) {
-			sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
-			String url = new StringBuffer(sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL)).append("/#/appealResult?id").append(salaryComplaints.getId()).toString();
+			String url = new StringBuffer("8?").append(sysConfigDao.findConfigValue(SysConfigService.TEACHER_BASE_URL)).append("/#/appealResult?id=").append(salaryComplaints.getId()).toString();
 			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.COURSE_SALARY_COMPLAINTS_RESULT, map, null, 0, url,
 					"TEACHER", DateUtil.format(salaryComplaints.getCreateTime(),DateUtil.DEFAULT_PATTERN),complaints.getStatusEnum().getMsg());
 		}

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

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.service.impl;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
 import com.ym.mec.biz.dal.dao.TeacherSalaryModifyLogDao;
 import com.ym.mec.biz.dal.entity.CourseScheduleTeacherSalary;
@@ -7,11 +9,14 @@ import com.ym.mec.biz.dal.entity.TeacherSalaryModifyLog;
 import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
 import com.ym.mec.biz.service.TeacherSalaryModifyLogService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
+
 @Service
 public class TeacherSalaryModifyLogServiceImpl extends BaseServiceImpl<Long, TeacherSalaryModifyLog>  implements TeacherSalaryModifyLogService {
 	
@@ -19,6 +24,8 @@ public class TeacherSalaryModifyLogServiceImpl extends BaseServiceImpl<Long, Tea
 	private TeacherSalaryModifyLogDao teacherSalaryModifyLogDao;
 	@Autowired
 	private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
+	@Autowired
+	private SysUserFeignService sysUserFeignService;
 
 	@Override
 	public BaseDAO<Long, TeacherSalaryModifyLog> getDAO() {
@@ -28,12 +35,17 @@ public class TeacherSalaryModifyLogServiceImpl extends BaseServiceImpl<Long, Tea
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	public Object add(TeacherSalaryModifyLog modifyLog) {
+		SysUser sysUser = sysUserFeignService.queryUserInfo();
+		if (sysUser == null) {
+			throw new BizException("用户信息获取失败");
+		}
 		//获取之前的课酬信息
 		CourseScheduleTeacherSalary salary = courseScheduleTeacherSalaryDao.queryByCourseScheduleIdAndUserId(modifyLog.getCourseScheduleId(), modifyLog.getTeacherId());
 		courseScheduleTeacherSalaryDao.updateSalary(modifyLog);
 		//修改教师课酬
 		modifyLog.setPreExpectSalary(salary.getActualSalary());
-		modifyLog.setPreReduceSalary(salary.getReduceSalary());
+		modifyLog.setPreReduceSalary(salary.getReduceSalary()==null? BigDecimal.ZERO:salary.getReduceSalary());
+		modifyLog.setOperatorId(sysUser.getId());
 		return teacherSalaryModifyLogDao.insert(modifyLog);
 	}
 }

+ 43 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -7,9 +7,11 @@ import com.ym.mec.auth.api.enums.YesOrNoEnum;
 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.GroupType;
 import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.TeacherService;
+import com.ym.mec.common.constant.CommonConstants;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImResult;
@@ -19,14 +21,17 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.util.collection.MapUtil;
+import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.idcard.IdcardValidator;
-
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -59,6 +64,10 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	private ImFeignService imFeignService;
 	@Autowired
 	private SysConfigDao configDao;
+	@Autowired
+	private StudentExtracurricularExercisesSituationDao studentExtracurricularExercisesSituationDao;
+	@Autowired
+	private StudentDao studentDao;
 
 
 	@Override
@@ -439,6 +448,17 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 
 			Set<Integer> organIds = rows.stream().map(e -> e.getTeacherOrganId()).collect(Collectors.toSet());
 			Map<Integer,String> organNames = MapUtil.convertMybatisMap(organizationDao.findOrganNameMapList(organIds));
+
+			LocalDate nowDate = LocalDateTime.now(DateUtil.zoneId).toLocalDate();
+			LocalDate monDayDate = nowDate.with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
+			List<TeacherExercisesServiceDto> teacherExercisesServiceSituations = studentExtracurricularExercisesSituationDao.findTeacherExercisesServiceSituations(monDayDate.toString(), new ArrayList<>(teachers));
+			Map<Integer, TeacherExercisesServiceDto> teacherServiceMap = teacherExercisesServiceSituations.stream().collect(Collectors.toMap(TeacherExercisesServiceDto::getTeacherId, t -> t));
+
+			Map<Integer,String> operatingStudentsNum = MapUtil.convertMybatisMap(studentDao.getTeacherOperatingStudentsNum(teacherIds));
+			Map<Integer,String> practiceStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(teacherIds, GroupType.PRACTICE));
+			Map<Integer,String> vipStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(teacherIds, GroupType.VIP));
+			Map<Integer,String> practiceAndVipStudentsNum = MapUtil.convertMybatisMap(studentDao.getPracticeAndVipNums(teacherIds));
+
 			rows.forEach(e->{
 //				e.setSubjectName(subjectDao.findBySubIds(e.getSubjectId()));
 				e.setOrganName(organNames.get(e.getTeacherOrganId()));
@@ -449,6 +469,27 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 				e.setVipNum(num == null?0:num);
 				Integer demoNum = demoNumMap.get(e.getId());
 				e.setDemoNum(demoNum == null?0:demoNum);
+
+				TeacherExercisesServiceDto teacherService = teacherServiceMap.get(e.getId());
+				if(Objects.nonNull(teacherService)){
+					BigDecimal serviceIndex = new BigDecimal(teacherService.getActualExercisesNum()).multiply(new BigDecimal(100)).divide(new BigDecimal(teacherService.getExpectExercisesNum()), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
+					e.setServiceIndex(serviceIndex);
+				}else{
+					e.setServiceIndex(BigDecimal.ZERO);
+				}
+				//运营指标
+				String studentNum = operatingStudentsNum.get(e.getId());
+				if(studentNum != null){
+					String practiceNum = practiceStudentsNum.get(e.getId()) ==null ? "0" : practiceStudentsNum.get(e.getId());
+					String vipNum = vipStudentsNum.get(e.getId()) ==null ? "0" : vipStudentsNum.get(e.getId());
+					String practiceAndVipNum = practiceAndVipStudentsNum.get(e.getId()) ==null ? "0" : practiceAndVipStudentsNum.get(e.getId());
+					int allNum = Integer.parseInt(practiceNum) + Integer.parseInt(vipNum) - Integer.parseInt(practiceAndVipNum);
+					BigDecimal operatingIndex = new BigDecimal(allNum).multiply(new BigDecimal(100)).divide(new BigDecimal(studentNum), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
+					e.setOperatingIndex(operatingIndex);
+				}else {
+					e.setOperatingIndex(BigDecimal.ZERO);
+				}
+
 			});
 		}
 		return pageInfo;
@@ -496,7 +537,7 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 				&& StringUtils.isNotBlank(teacher.getIdcardHandImg())) {
 			throw new BizException("已实名认证,不能重复操作");
 		}
-		
+
 		IdcardValidator validator = new IdcardValidator();
 		if (validator.isValidatedAllIdcard(idcardNo) == false) {
 			throw new BizException("身份证校验失败");

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

@@ -379,6 +379,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			courseSchedule.setStatus(CourseStatusEnum.NOT_START);
 		    courseSchedule.setType(CourseSchedule.CourseScheduleType.VIP);
 			courseSchedule.setClassGroupId(classGroup.getId());
+			courseSchedule.setName(vipGroupApplyBaseInfoDto.getName());
 		});
 		courseScheduleService.checkNewCourseSchedules(vipGroup.getCourseSchedules(),false);
 		vipGroupApplyBaseInfoDto.setCourseSchedulesJson(JSON.toJSONString(vipGroup.getCourseSchedules()));
@@ -651,12 +652,22 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		Map<String, Object> params = new HashMap<>();
 		MapUtil.populateMap(params, queryInfo);
 
-		List dataList = null;
+		List<VipGroupCourseSchduleRecordDto> dataList = null;
 		int count = vipGroupDao.countTeachingRecord(params);
 		if (count > 0) {
 			pageInfo.setTotal(count);
 			params.put("offset", pageInfo.getOffset());
 			dataList = vipGroupDao.findTeachingRecord(params);
+			List<Long> courseScheduleIds = dataList.stream().map(VipGroupCourseSchduleRecordDto::getId).collect(Collectors.toList());
+			List<Map<Integer, Integer>> maps = studentAttendanceDao.countStudentAttendancesByCoursesAndStatus(courseScheduleIds, StudentAttendanceStatusEnum.NORMAL);
+			if(!CollectionUtils.isEmpty(maps)){
+				Map<Long, Long> courseStudentNumMap= MapUtil.convertIntegerMap(maps);
+				for (VipGroupCourseSchduleRecordDto vipGroupCourseSchduleRecordDto : dataList) {
+					if(Objects.nonNull(courseStudentNumMap.get(vipGroupCourseSchduleRecordDto.getId()))){
+						vipGroupCourseSchduleRecordDto.setAttendanceNum(courseStudentNumMap.get(vipGroupCourseSchduleRecordDto.getId()).intValue());
+					}
+				}
+			}
 		}
 		if (count == 0) {
 			dataList = new ArrayList<>();
@@ -2341,6 +2352,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			courseSchedule.setClassGroupId(classGroup.getId());
 			courseSchedule.setGroupType(GroupType.VIP);
 			courseSchedule.setMusicGroupId(vipGroup.getId().toString());
+			courseSchedule.setName(vipGroup.getName());
 //			if (courseSchedule.getTeachMode().equals(TeachModeEnum.ONLINE)) {
 //				surplusCourseTotalPrice = surplusCourseTotalPrice.add(onlineCoursePrice);
 //			} else if (courseSchedule.getTeachMode().equals(TeachModeEnum.OFFLINE)) {

+ 4 - 2
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -498,6 +498,7 @@
         <result property="courseStartDate" column="courses_start_date_"/>
         <result property="classMode" column="class_mode_"/>
         <result property="buyMonths" column="buy_months_"/>
+        <result property="practiceGroupType" column="practice_group_type_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
     <select id="findTeacherMusicClassGroup" resultMap="TeacherClassGroupDto">
@@ -543,7 +544,8 @@
             pg.id_ music_group_id_,
             pg.name_ music_group_name_,
 						1 class_mode_,
-            pg.buy_months_
+            pg.buy_months_,
+            pg.type_ practice_group_type_
         FROM
             practice_group pg
             LEFT JOIN class_group cg ON pg.id_=cg.music_group_id_ AND cg.group_type_='PRACTICE'
@@ -822,7 +824,7 @@
         cg.current_class_times_,cg.total_class_times_,pg.single_class_minutes_,
         pg.id_ practice_id_,cg.type_,1 class_mode_,pg.courses_start_date_,
         pg.courses_expire_date_,
-        IF(pg.buy_months_ IS NULL,0,1) practice_type_
+        CASE pg.type_ WHEN 'FREE' THEN 0 WHEN 'CHARGE' THEN 1 END practice_type_
         FROM practice_group pg
         LEFT JOIN class_group cg ON cg.music_group_id_ = pg.id_
         LEFT JOIN sys_user su ON pg.user_id_ = su.id_

+ 16 - 15
mec-biz/src/main/resources/config/mybatis/CourseScheduleEvaluateMapper.xml

@@ -136,7 +136,7 @@
         FROM practice_group
         WHERE group_status_ != 'LOCK'
           AND group_status_ != 'CANCEL'
-          AND buy_months_ IS NULL
+          AND type_='FREE'
         GROUP BY organ_id_
     </select>
 
@@ -155,7 +155,7 @@
         SELECT pg.organ_id_, count(*) report_nums_
         FROM course_schedule_evaluate cse
                  LEFT JOIN practice_group pg on cse.music_group_id_ = pg.id_
-            AND pg.buy_months_ IS NULL
+            AND pg.type_='FREE'
             AND pg.group_status_ != 'LOCK'
             AND cse.status_ = 1
         GROUP BY pg.organ_id_
@@ -170,7 +170,7 @@
         WHERE cs.group_type_ = 'PRACTICE'
           AND cs.status_ != 'NOT_START'
           AND cs.del_flag_ = 0
-          AND pg.buy_months_ IS NULL
+          AND pg.type='FREE'
           AND pg.group_status_ != 'LOCK'
         GROUP BY cs.class_group_id_, pg.organ_id_
     </select>
@@ -323,7 +323,7 @@
                  LEFT JOIN student s ON s.user_id_ = pg.student_id_
         WHERE pg.group_status_ IN ('NORMAL', 'FINISH')
           AND s.operating_tag_ = 1
-          AND pg.buy_months_ IS NULL
+          AND pg.type_='FREE'
         GROUP BY pg.organ_id_
     </select>
 
@@ -368,18 +368,16 @@
     </select>
 
     <select id="getVipBuyNums" resultMap="practice4Organ">
-        SELECT vg.organ_id_, COUNT(DISTINCT cssp.user_id_) vip_num_
+        SELECT su.organ_id_,COUNT(DISTINCT cssp.user_id_) vip_num_
         FROM course_schedule_student_payment cssp
-        LEFT JOIN vip_group vg ON cssp.music_group_id_ = vg.id_ AND cssp.group_type_ = 'VIP'
-        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.teach_mode_ = 'ONLINE'
-        WHERE vg.id_ >= 1
-        AND cs.id_ >=1
-        AND CONCAT(cs.class_date_, ' ', cs.end_class_time_) >= #{classDate}
+        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cssp.group_type_='VIP'
+        left JOIN sys_user su ON su.id_=cssp.user_id_
+        WHERE CONCAT(cs.class_date_, ' ', cs.end_class_time_) >= #{classDate}
         <if test="endDate != null">
             <![CDATA[AND CONCAT(cs.class_date_, ' ', cs.end_class_time_) < #{endDate}]]>
         </if>
-        AND (cs.is_lock_ IS NULL OR cs.is_lock_=0)
-        GROUP BY vg.organ_id_
+        AND cs.teach_mode_ = 'ONLINE'
+        GROUP BY su.organ_id_
     </select>
 
     <select id="getPracticeBuyNums" resultMap="practice4Organ">
@@ -424,9 +422,12 @@
 
     <!-- 获取所有体验人数 -->
     <select id="getAllTryNums" resultMap="practice4Organ">
-        SELECT su.organ_id_, COUNT(s.user_id_) try_num_ FROM student s
-        LEFT JOIN sys_user su ON  su.id_ = s.user_id_
-            WHERE s.operating_tag_ =1 AND su.organ_id_ >0
+        SELECT su.organ_id_, COUNT(s.user_id_) try_num_
+        FROM student s
+                 LEFT JOIN sys_user su ON su.id_ = s.user_id_
+        WHERE s.operating_tag_ = 1
+          AND su.organ_id_ > 0
+          AND su.user_type_ LIKE '%STUDENT%'
         GROUP BY su.organ_id_
     </select>
 </mapper>

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

@@ -2472,7 +2472,7 @@
         WHERE cs.group_type_ = 'PRACTICE'
           AND cssp.user_id_ = #{userId}
           AND cssp.expect_price_ = 0
-          AND pg.buy_months_ IS NULL
+          AND pg.type_ = 'FREE'
     </select>
     <select id="findTeacherCoursesWithIncludeDateRange" resultMap="CourseSchedule" useCache="false" flushCache="true">
         SELECT cs.id_,
@@ -2541,8 +2541,6 @@
           AND TIMESTAMPDIFF(MINUTE, #{endDateTime}, CONCAT(cs.class_date_, ' ', cs.start_class_time_)) &lt;= #{continueCourseTime}
           AND cs.teacher_id_ = #{courseSchedule.teacherId}
           AND cs.class_group_id_ = #{courseSchedule.classGroupId}
-          AND ta.sign_in_time_ IS NULL
-          AND ta.sign_out_time_ IS NULL
         LIMIT 1
     </select>
     <select id="queryRepairContinueCourse" resultMap="CourseSchedule">

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

@@ -138,9 +138,11 @@
         <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="practice_group_type_" property="practiceGroupType"/>
         <result column="review_id_" property="reviewId"/>
         <result column="student_review_" property="studentReview"/>
         <result column="hand_homework_" property="handHomework"/>
+        <result column="assign_homework_" property="assignHomework"/>
         <result column="course_review_" property="courseReview"/>
         <result column="teacher_id" property="teacherId"/>
         <result column="start_class_time_" jdbcType="DATE" property="startClassTime"/>
@@ -185,11 +187,20 @@
                 AND pg.buy_months_ > 0
             </if>
             <if test='isFree !=null and isFree=="1"'>
-                AND pg.buy_months_ IS NULL
+                AND pg.type_='FREE'
+            </if>
+            <if test="practiceGroupType != null">
+                AND pg.type_=#{practiceGroupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
             <if test="studentReview !=null">
                 AND csc.score_ =#{studentReview}
             </if>
+            <if test="assignHomework != null and assignHomework == 1">
+                AND sch.id_>0
+            </if>
+            <if test="assignHomework != null and assignHomework ==0">
+                AND sch.id_ IS NULL
+            </if>
             <if test='hasReview !=null and hasReview=="1"'>
                 AND csr.id_ > 0
             </if>
@@ -239,7 +250,9 @@
         edu_teacher_name_,pg.buy_months_,csr.id_ review_id_, csc.score_ student_review_,
         csr.hand_homework_,csr.course_review_,pg.student_id_,csr.teaching_material_,csr.pronunciation_,csr.tempo_,
         csr.music_theory_,csr.song_,csr.memo_,csr.create_time_,csr.has_liaison_,csr.update_time_,sa.id_
-        attendance_id_,sch.is_replied_ home_work_replied_
+        attendance_id_,sch.is_replied_ home_work_replied_,
+        CASE WHEN sch.id_ IS NULL THEN 0 ELSE 1 END assign_homework_,
+        pg.type_ practice_group_type_
         FROM course_schedule cs
         LEFT JOIN practice_group pg ON cs.music_group_id_ = pg.id_ AND cs.group_type_='PRACTICE'
         LEFT JOIN sys_user su ON cs.actual_teacher_id_ = su.id_

+ 29 - 4
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -382,13 +382,38 @@
 		DELETE FROM course_schedule_student_payment WHERE music_group_id_=#{groupId} AND group_type_=#{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 	</delete>
 	
-	<select id="queryStudentCourseTimesOfOnline" resultMap="studentCourseTimesDto">
+	<select id="queryStudentNotStartCourseTimesOfOnline" resultMap="studentCourseTimesDto">
 		SELECT cssp.`user_id_`,count(*) totalTimes, 
-		sum(case when (pg.buy_months_ > 0) then 1 ELSE 0 END) practiceTmes,
-		sum(case when (pg.buy_months_ IS NULL AND cssp.`group_type_` = 'PRACTICE' ) then 1 ELSE 0 END) freePracticeTimes
+		sum(CASE type_ WHEN 'FREE' THEN 0 WHEN 'CHARGE' THEN 1 END) practiceTmes,
+		sum(case when (pg.type_='FREE' AND cssp.`group_type_` = 'PRACTICE' ) then 1 ELSE 0 END) freePracticeTimes
 		FROM course_schedule_student_payment cssp LEFT JOIN course_schedule cs on cssp.course_schedule_id_ = cs.id_
 		LEFT JOIN practice_group pg ON pg.id_ = cs.music_group_id_ AND cs.group_type_ = 'PRACTICE'
-		WHERE cs.`teach_mode_` = 'ONLINE' AND cs.`class_date_` &gt;= #{startDate}
+		WHERE cs.`teach_mode_` = 'ONLINE' AND cs.status_ = 'NOT_START'
 		GROUP BY cssp.`user_id_`
 	</select>
+
+	<resultMap id="StudentTeacherCourseDto" type="com.ym.mec.biz.dal.dto.StudentTeacherCourseDto">
+		<result property="studentId" column="student_id_"/>
+		<result property="teacherId" column="teacher_id_"/>
+		<result property="groupType" column="group_type_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+		<result property="groupId" column="group_id_"/>
+		<result property="courseScheduleType" column="course_schedule_type_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+		<result property="classesStartTime" column="classes_start_time_"/>
+	</resultMap>
+
+	<select id="findAllStudentCourseInfo" resultMap="StudentTeacherCourseDto">
+		SELECT
+			cssp.user_id_ student_id_,
+			cssp.group_type_ group_type_,
+			cssp.music_group_id_ group_id_,
+			cs.type_ course_schedule_type_,
+			CONCAT(cs.class_date_, ' ', cs.start_class_time_) classes_start_time_,
+			cgtm.user_id_ teacher_id_
+		FROM
+			student s
+			LEFT JOIN course_schedule_student_payment cssp ON s.user_id_=cssp.user_id_
+			LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+			LEFT JOIN class_group_teacher_mapper cgtm ON cssp.class_group_id_=cgtm.class_group_id_
+		WHERE cs.type_ IN ('PRACTICE', 'VIP', 'SINGLE', 'MIX') AND cgtm.teacher_role_='BISHOP';
+	</select>
 </mapper>

+ 23 - 10
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -445,12 +445,14 @@
 	</update>
 
     <update id="updateSalary" parameterType="com.ym.mec.biz.dal.entity.TeacherSalaryModifyLog">
-		UPDATE course_schedule_teacher_salary SET actual_salary_ = #{modifyLog.currentExpectSalary},reduce_salary = #{modifyLog.currentReduceSalary},update_time_ = NOW()
+		UPDATE course_schedule_teacher_salary SET actual_salary_ = #{modifyLog.currentExpectSalary},
+		reduce_salary = #{modifyLog.currentReduceSalary},update_time_ = NOW(),memo_ = #{modifyLog.memo}
 		WHERE course_schedule_id_ = #{modifyLog.courseScheduleId} AND user_id_ = #{modifyLog.teacherId}
 	</update>
 	<update id="updateTeacherSalaryConfirmStatus">
 		UPDATE course_schedule_teacher_salary SET confirm_status_=#{confirmStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-		WHERE id_ IN
+		WHERE group_type_!='COMM'
+		AND id_ IN
 		<foreach collection="ids" item="id" open="(" close=")" separator=",">
 			#{id}
 		</foreach>
@@ -458,6 +460,7 @@
 	<update id="updateTeacherSalaryConfirmStatusToComplied">
 		UPDATE course_schedule_teacher_salary SET confirm_status_=3
 		WHERE confirm_status_!=2
+        AND group_type_!='COMM'
 		AND id_ IN
 		<foreach collection="ids" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -746,7 +749,7 @@
 		<result property="signOutTime" column="sign_out_time_" />
 		<result property="expectSalary" column="expect_salary_" />
 		<result property="actualSalary" column="actual_salary_" />
-		<result property="reduceSalary" column="reduce_salary_" />
+		<result property="reduceSalary" column="reduce_salary" />
 		<result property="confirmStatus" column="confirm_status_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 		<result property="memo" column="memo_" />
 	</resultMap>
@@ -754,6 +757,7 @@
 	<sql id="queryCourseSalaryCondition">
 		<where>
 			(cs.del_flag_ IS NULL OR cs.del_flag_=0)
+            AND csts.group_type_!='COMM'
 			AND csts.settlement_time_ IS NOT NULL
 			<if test="teacherId!=null">
 				AND csts.user_id_=#{teacherId}
@@ -764,14 +768,20 @@
 			<if test="courseScheduleId!=null">
 				AND cs.id_=#{courseScheduleId}
 			</if>
-			<if test="signInStatus!=null">
+			<if test="signInStatus!=null and signInStatus==1">
 				AND ta.sign_in_status_=#{signInStatus}
 			</if>
-			<if test="signOutStatus!=null">
+            <if test="signInStatus!=null and signInStatus==0">
+                AND (ta.sign_in_status_=#{signInStatus} OR ta.sign_in_status_ IS NULL)
+            </if>
+			<if test="signOutStatus!=null and signOutStatus==1">
 				AND ta.sign_out_status_=#{signOutStatus}
 			</if>
+            <if test="signOutStatus!=null and signOutStatus==1">
+                AND (ta.sign_out_status_=#{signOutStatus} OR ta.sign_out_status_ IS NULL)
+            </if>
 			<if test="confirmStatus!=null">
-				AND csts.confirm_status_=#{confirmStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+				AND csts.confirm_status_=#{confirmStatus}
 			</if>
 			<if test="groupName!=null">
 				AND cs.name_ LIKE CONCAT('%', #{groupName}, '%')
@@ -817,7 +827,7 @@
 			LEFT JOIN sys_user su ON csts.user_id_=su.id_
 			LEFT JOIN organization o ON t.organ_id_=o.id_
 		<include refid="queryCourseSalaryCondition"/>
-		ORDER BY classes_start_time_ DESC
+		ORDER BY classes_start_time_,cs.id_ DESC
 		<include refid="global.limit"/>
 	</select>
 
@@ -882,6 +892,7 @@
 			LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
 		WHERE
 			( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
+			AND csts.group_type_!='COMM'
 			AND csts.settlement_time_ IS NOT NULL
 			<if test="teacherId!=null">
 				AND csts.user_id_ = #{teacherId}
@@ -895,9 +906,10 @@
         course_schedule_teacher_salary csts
         LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
         WHERE
-        ( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
-        AND csts.settlement_time_ IS NOT NULL
-        AND DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
+        	( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
+			AND csts.group_type_!='COMM'
+        	AND csts.settlement_time_ IS NOT NULL
+        	AND DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
     </select>
 
 	<select id="countOpenConfirmSalarysWithMonth" resultType="int">
@@ -908,6 +920,7 @@
 			LEFT JOIN course_schedule cs ON cs.id_ = csts.course_schedule_id_
 		WHERE
 			DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
+			AND csts.group_type_!='COMM'
 			AND csts.settlement_time_ IS NOT NULL
 			<if test="confirmStatus!=null">
 				AND csts.confirm_status_=#{confirmStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}

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

@@ -306,10 +306,10 @@
 			eer.user_id_,
 			eer.status_,
 			eer.submit_time_,
-			eem.create_time_
+			eer.is_replied_,
+			eer.is_replied_timely_
 		FROM
 			extracurricular_exercises_reply eer
-		LEFT JOIN extracurricular_exercises_message eem ON eer.id_=eem.extracurricular_exercises_reply_id_ AND eem.role_='TEACHER'
 		WHERE
 			DATE_FORMAT( eer.create_time_, '%Y-%m-%d' ) BETWEEN #{monday} AND #{sunday}
 			AND EXISTS (

+ 38 - 19
mec-biz/src/main/resources/config/mybatis/PracticeGroupMapper.xml

@@ -9,6 +9,8 @@
     <resultMap type="com.ym.mec.biz.dal.entity.PracticeGroup" id="PracticeGroup">
         <result column="id_" property="id"/>
         <result column="name_" property="name"/>
+        <result column="type_" property="type"
+                typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="subject_id_" property="subjectId"/>
         <result column="user_id_" property="userId"/>
         <result column="student_id_" property="studentId"/>
@@ -74,6 +76,9 @@
             <if test="groupStatus!=null">
                 group_status_=#{groupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
+            <if test="type!=null">
+                type_ =#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
             <if test="educationalTeacherId!=null">
                 educational_teacher_id_=#{educationalTeacherId},
             </if>
@@ -117,15 +122,15 @@
         </selectKey>
         -->
         INSERT INTO practice_group
-        (id_,name_,subject_id_,user_id_,student_id_,single_class_minutes_,organ_id_,courses_start_date_,courses_expire_date_,create_time_,update_time_,memo_,buy_months_,drill_times_on_week_,drill_times_json_,group_status_,be_renew_group_id_,educational_teacher_id_)
-        VALUES(#{id},#{name},#{subjectId},#{userId},#{studentId},#{singleClassMinutes},#{organId},#{coursesStartDate},#{coursesExpireDate},NOW(),NOW(),#{memo},#{buyMonths},#{drillTimesOnWeek},#{drillTimesJson},#{groupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{beRenewGroupId},#{educationalTeacherId})
+        (id_,name_,type_,subject_id_,user_id_,student_id_,single_class_minutes_,organ_id_,courses_start_date_,courses_expire_date_,create_time_,update_time_,memo_,buy_months_,drill_times_on_week_,drill_times_json_,group_status_,be_renew_group_id_,educational_teacher_id_)
+        VALUES(#{id},#{name},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subjectId},#{userId},#{studentId},#{singleClassMinutes},#{organId},#{coursesStartDate},#{coursesExpireDate},NOW(),NOW(),#{memo},#{buyMonths},#{drillTimesOnWeek},#{drillTimesJson},#{groupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{beRenewGroupId},#{educationalTeacherId})
     </insert>
 
     <select id="getUserFreePracticeGroup" resultMap="PracticeGroup">
         SELECT *
         FROM practice_group
         WHERE student_id_ = #{userId}
-          AND buy_months_ IS NULL
+          AND type_='FREE'
     </select>
 
     <!-- 分页查询 -->
@@ -150,7 +155,7 @@
         FROM practice_group
         WHERE student_id_ = #{userId}
           AND group_status_ = 'NORMAL'
-          AND buy_months_ IS NULL
+          AND type_='FREE'
           AND create_time_ > '2020-03-25'
     </select>
     <select id="countPracticeGroupByOrgan" resultType="java.lang.Integer">
@@ -175,7 +180,7 @@
         SELECT *
         FROM practice_group
         WHERE student_id_ = #{userId}
-          AND buy_months_ IS NOT NULL
+          AND type_='CHARGE'
         ORDER BY create_time_ DESC
         LIMIT 1;
     </select>
@@ -190,7 +195,7 @@
                  LEFT JOIN `subject` s ON pg.subject_id_ = s.id_
         WHERE student_id_ = #{userId}
           AND (pg.group_status_ = 'NORMAL' OR pg.group_status_ = 'LOCK')
-          AND pg.buy_months_ IS NOT NULL
+          AND pg.type_='CHARGE'
     </select>
 
     <select id="findUserBuyPracticeGroupsWithDate" resultMap="PracticeCourseDto">
@@ -204,7 +209,7 @@
         WHERE student_id_ = #{userId}
           AND courses_start_date_ = #{date}
           AND group_status_ = 'LOCK'
-          AND pg.buy_months_ IS NOT NULL
+          AND pg.type_='CHARGE'
     </select>
     <select id="findUserPracticeGroup" resultMap="PracticeGroup">
         SELECT *
@@ -228,7 +233,6 @@
 
     <sql id="practiceGroupQueryCondition">
         <where>
-            pg.group_status_ IN ('NORMAL', 'FINISH')
             <if test="hasEducationalTeacherId != null and hasEducationalTeacherId == true">
                 AND pg.educational_teacher_id_ IS NOT NULL
             </if>
@@ -238,9 +242,21 @@
             <if test="search!=null and search!=''">
                 AND (pg.name_ LIKE CONCAT('%',#{search},'%') OR pg.id_= #{search})
             </if>
-            <if test="teacherId!=null">
+            <if test="teacherId != null">
                 AND pg.user_id_=#{teacherId}
             </if>
+            <if test="studentId != null">
+                AND pg.student_id_ = #{studentId}
+            </if>
+            <if test="practiceGroupType !=null and practiceGroupType != ''">
+                AND pg.type_ = #{practiceGroupType}
+            </if>
+            <if test="groupStatus != null and groupStatus != ''">
+                AND pg.group_status_ = #{groupStatus}
+            </if>
+            <if test="groupStatus == null or groupStatus == ''">
+                AND pg.group_status_ IN ('NORMAL', 'FINISH')
+            </if>
             <if test="organId != null">
                 AND FIND_IN_SET(pg.organ_id_,#{organId})
             </if>
@@ -248,13 +264,16 @@
                 AND pg.educational_teacher_id_=#{educationalTeacherId}
             </if>
             <if test="type != null and type == 1">
-                AND pg.be_renew_group_id_ IS NULL AND pg.buy_months_ IS NOT NULL
+                AND pg.be_renew_group_id_ IS NULL AND pg.type_='CHARGE'
             </if>
             <if test="type != null and type == 0">
-                AND pg.be_renew_group_id_ IS NOT NULL AND pg.buy_months_ IS NOT NULL
+                AND pg.be_renew_group_id_ IS NOT NULL AND pg.type_='CHARGE'
             </if>
             <if test="type != null and type == 2">
-                AND pg.buy_months_ IS NULL
+                AND pg.type_='FREE'
+            </if>
+            <if test="practiceGroupType != null">
+                AND pg.type_=#{practiceGroupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
         </where>
     </sql>
@@ -306,10 +325,10 @@
                 AND pg.courses_expire_date_ >= #{month}
             </if>
             <if test='isFree !=null and isFree=="0"'>
-                AND pg.buy_months_ > 0
+                AND pg.type_='CHARGE'
             </if>
             <if test='isFree !=null and isFree=="1"'>
-                AND pg.buy_months_ IS NULL
+                AND pg.type_='FREE'
             </if>
             <if test='isOver !=null and isOver=="0"'>
                 <![CDATA[AND pg.group_status_ = 'NORMAL'
@@ -396,10 +415,10 @@
         LEFT JOIN (SELECT pg.`student_id_` ,max(concat(cs.`class_date_`,' ',cs.`end_class_time_` )) lastClassDate FROM
         `practice_group` pg
         LEFT JOIN `course_schedule` cs on cs.`music_group_id_` = pg.`id_` and cs.`group_type_` = 'PRACTICE'
-        WHERE pg.`buy_months_` IS NULL AND cs.`group_type_` = 'PRACTICE'
+        WHERE pg.type_='FREE' AND cs.`group_type_` = 'PRACTICE'
         GROUP BY pg.`student_id_` ) b on a.student_id_ = b.student_id_
         left join (SELECT pg.`student_id_` ,min(pg.`create_time_`) firstBuyTime
-        FROM `practice_group` pg WHERE pg.`buy_months_` IS NOT NULL AND pg.`group_status_` in ('NORMAL','FINISH') GROUP
+        FROM `practice_group` pg WHERE pg.type_='CHARGE' AND pg.`group_status_` in ('NORMAL','FINISH') GROUP
         BY pg.`student_id_` ) c
         on a.student_id_ = c.student_id_
         left join `sys_user` u on u.`id_` = a.student_id_
@@ -431,11 +450,11 @@
         LEFT JOIN (SELECT pg.`student_id_` ,max(concat(cs.`class_date_`,' ',cs.`end_class_time_` )) lastClassDate FROM
         `practice_group` pg
         LEFT JOIN `course_schedule` cs on cs.`music_group_id_` = pg.`id_`
-        WHERE pg.`buy_months_` IS NULL AND cs.`group_type_` = 'PRACTICE'
+        WHERE pg.type_='FREE' AND cs.`group_type_` = 'PRACTICE'
         GROUP BY pg.`student_id_` ) b on a.student_id_ = b.student_id_
         left join (SELECT pg.`student_id_` ,min(pg.`create_time_`) firstBuyTime
         FROM `practice_group` pg
-        WHERE pg.`buy_months_` IS NOT NULL AND pg.`group_status_` IN ('NORMAL','FINISH') GROUP
+        WHERE pg.type_='CHARGE' AND pg.`group_status_` IN ('NORMAL','FINISH') GROUP
         BY pg.`student_id_` ) c ON a.student_id_ = c.student_id_
         LEFT JOIN (SELECT GROUP_CONCAT(DISTINCT su.real_name_) teacher_name_,pg.student_id_,GROUP_CONCAT(DISTINCT suc.real_name_) course_group_teacher_
         FROM `practice_group` pg
@@ -484,7 +503,7 @@
         su.username_ student_name_,
         o.name_ organ_name_,
         MAX(pg.courses_expire_date_) expire_date_,
-        CASE WHEN MAX(pg.buy_months_) IS NULL THEN 0 ELSE 1 END buy_practice_
+        CASE WHEN type_='FREE' THEN 0 ELSE 1 END buy_practice_
         FROM practice_group pg
         LEFT JOIN organization o on o.id_ = pg.organ_id_
         LEFT JOIN sys_user su ON su.id_ = pg.student_id_

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

@@ -149,6 +149,11 @@
 	        where id_ = #{item.id}
 	    </foreach>      
 	</update>
+    <update id="cleanCourseStudentSignOut">
+        UPDATE student_attendance
+        SET sign_out_time_= NULL
+    	WHERE course_schedule_id_=#{courseId} AND user_id_ = #{userId}
+    </update>
 
     <!-- 根据主键删除一条记录 -->
     <delete id="delete">
@@ -396,7 +401,7 @@
             WHERE class_group_id_=#{classGroupId}
     </select>
     <select id="findByStatusAndCourseScheduleId" resultMap="StudentAttendance">
-        SELECT * FROM student_attendance sa WHERE course_schedule_id_ = #{courseScheduleId} AND user_id_ = #{userId} LIMIT 1 FOR UPDATE
+        SELECT * FROM student_attendance sa WHERE course_schedule_id_ = #{courseScheduleId} AND user_id_ = #{userId} LIMIT 1
     </select>
 
     <select id="queryNoSignStudentRecord" resultMap="StudentAttendance">
@@ -433,6 +438,21 @@
         GROUP BY
             course_schedule_id_
     </select>
+    <select id="countStudentAttendancesByCoursesAndStatus" resultType="java.util.Map">
+        SELECT
+        course_schedule_id_ AS 'key',
+        COUNT( id_ ) AS 'value'
+        FROM
+        student_attendance
+        WHERE
+        status_=#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+        AND course_schedule_id_ IN
+        <foreach collection="courseScheduleIds" item="courseScheduleId" open="(" close=")" separator=",">
+            #{courseScheduleId}
+        </foreach>
+        GROUP BY
+        course_schedule_id_
+    </select>
     <select id="countCourseLeaveStudentNumWithFourHoursAgo" resultType="java.util.Map">
         SELECT
             sa.course_schedule_id_ AS 'key',

+ 29 - 2
mec-biz/src/main/resources/config/mybatis/StudentExtracurricularExercisesSituationMapper.xml

@@ -139,8 +139,11 @@
 		WHERE
 			sees.monday_ &gt;= #{monday}
 			AND sees.sunday_ &lt;= #{sunday}
+			<if test="teacherId!=null">
+				AND sees.teacher_id_ = #{teacherId}
+			</if>
 			<if test="search!=null">
-				AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
+				AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 			<if test="organIdList != null">
 				AND FIND_IN_SET(stu.organ_id_,#{organIdList})
@@ -190,8 +193,11 @@
 			WHERE
 			sees.monday_ &gt;= #{monday}
 			AND sees.sunday_ &lt;= #{sunday}
+			<if test="teacherId!=null">
+				AND sees.teacher_id_ = #{teacherId}
+			</if>
 			<if test="search!=null">
-				AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%') OR tea.username_ LIKE CONCAT('%', #{search}, '%'))
+				AND (stu.id_=#{search} OR stu.username_ LIKE CONCAT('%', #{search}, '%'))
 			</if>
 			<if test="organIdList != null">
 				AND FIND_IN_SET(stu.organ_id_, #{organIdList})
@@ -233,4 +239,25 @@
 			#{id}
 		</foreach>
 	</select>
+    <select id="findTeacherExercisesServiceSituations" resultType="com.ym.mec.biz.dal.dto.TeacherExercisesServiceDto">
+		SELECT
+			teacher_id_ teacherId,
+			COUNT( exercises_reply_num_ ) expectExercisesNum,
+			COUNT( CASE WHEN actual_exercises_num_ = 1 THEN 1 ELSE NULL END ) actualExercisesNum
+		FROM
+			student_extracurricular_exercises_situation_
+		WHERE monday_ = #{monday}
+			AND teacher_id_ IN
+			<foreach collection="teacherIds" item="teacherId" open="(" close=")" separator=",">
+				#{teacherId}
+			</foreach>
+		GROUP BY
+			teacher_id_;
+    </select>
+    <select id="findLastWeekTodayUpdateNum" resultType="int">
+		SELECT COUNT(id_) FROM student_extracurricular_exercises_situation_ WHERE sunday_=#{sunday} AND DATE_FORMAT(update_time_,'%Y-%m-%d')=DATE_FORMAT(NOW(),'%Y-%m-%d')
+    </select>
+    <select id="findStudentExercisesSituationsWithMonDay" resultMap="StudentExtracurricularExercisesSituation">
+		SELECT * FROM student_extracurricular_exercises_situation_ WHERE monday_=#{monday} AND student_id_=#{studentId}
+	</select>
 </mapper>

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

@@ -114,10 +114,11 @@
         SELECT su.id_ user_id_,su.username_,su.gender_,su.phone_ parents_phone_,su.real_name_,
         su.birthdate_,su.nation_,su.organ_id_,
         CASE WHEN su.password_ IS NULL THEN 0 ELSE 1 END isActive_,
-        CASE WHEN pla.id_ IS NULL THEN 0 ELSE 1 END isMake_,st.service_tag_,st.operating_tag_
+        CASE WHEN pla.id_ IS NULL THEN 0 ELSE 1 END isMake_,st.service_tag_,st.operating_tag_,tu.real_name_ teacher_name_,st.teacher_id_
         FROM sys_user su
         LEFT JOIN practice_lesson_apply pla ON su.id_ = pla.user_id_
         LEFT JOIN student st ON st.user_id_ = su.id_
+        left join sys_user tu on tu.id_ = st.teacher_id_
         <include refid="findStudentsByOrganIdSql"/>
         ORDER BY su.create_time_ DESC
         <include refid="global.limit"/>
@@ -149,6 +150,9 @@
             <if test="serviceTag != null">
                 AND st.service_tag_ = #{serviceTag}
             </if>
+            <if test="teacherId != null">
+                AND st.teacher_id_ = #{teacherId}
+            </if>
             <if test="userIds != null">
                 AND su.id_ IN
                 <foreach collection="userIds" open="(" close=")" separator="," item="item">
@@ -605,6 +609,9 @@
         <if test="serviceTag != null">
             AND st.service_tag_ = #{serviceTag}
         </if>
+        <if test="teacherId != null">
+            AND st.teacher_id_ = #{teacherId}
+        </if>
     </sql>
     <select id="queryHasCourse" resultType="java.lang.Integer">
         SELECT su.id_ FROM sys_user su
@@ -745,6 +752,8 @@
         <result property="courseBalance" column="course_balance_"/>
         <result property="serviceTag" column="service_tag_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result property="operatingTag" column="operating_tag_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result property="teacherName" column="teacher_name_"/>
+        <result property="teacherId" column="teacher_id_"/>
     </resultMap>
     <select id="queryHasCourseStudent" resultMap="studentManageListDto">
         SELECT su.id_ user_id_,su.username_,su.gender_,GROUP_CONCAT(DISTINCT sr.parents_name_)parents_name_,

+ 313 - 237
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -5,242 +5,318 @@
 不要修改此文件。所有改动将在下次重新自动生成时丢失。
 -->
 <mapper namespace="com.ym.mec.biz.dal.dao.StudentDao">
-	
-	<resultMap type="com.ym.mec.biz.dal.entity.Student" id="Student">
-		<result column="user_id_" property="userId" />
-		<result column="subject_id_list_" property="subjectIdList" />
-		<result column="service_tag_" property="serviceTag" />
-		<result column="operating_tag_" property="operatingTag" />
-		<result column="create_time_" property="createTime" />
-		<result column="update_time_" property="updateTime" />
-	</resultMap>
-
-	<!-- 根据主键查询一条记录 -->
-	<select id="get" resultMap="Student">
-		SELECT * FROM student WHERE user_id_ = #{id}
-	</select>
-
-	<!-- 全查询 -->
-	<select id="findAll" resultMap="Student">
-		SELECT * FROM student
-	</select>
-
-	<select id="lockUser" resultType="int" useCache="false" flushCache="true">
-		SELECT id_ FROM sys_user WHERE id_=#{userId} FOR UPDATE
-	</select>
-	
-	<!-- 向数据库增加一条记录 -->
-	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Student" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO student (user_id_,subject_id_list_,
-		<if test="serviceTag != null">
-			service_tag_,
-		</if>
-		<if test="operatingTag != null">
-			operating_tag_,
-		</if>
-		create_time_,update_time_)
-		VALUES
-		(#{userId},#{subjectIdList},
-		<if test="serviceTag != null">
-			#{serviceTag},
-		</if>
-		<if test="operatingTag != null">
-			#{operatingTag},
-		</if>
-		NOW(),NOW())
-	</insert>
-	
-	<update id="update" parameterType="com.ym.mec.biz.dal.entity.Student">
-		UPDATE student
-		<set>
-			<if test="subjectIdList != null">
-				subject_id_list_ = #{subjectIdList},
-			</if>
-			<if test="serviceTag != null">
-				service_tag_ = #{serviceTag},
-			</if>
-			<if test="operatingTag != null">
-				operating_tag_ = #{operatingTag},
-			</if>
-			<if test="updateTime != null">
-				update_time_ = #{updateTime},
-			</if>
-			<if test="updateTime == null">
-				update_time_ = NOW()
-			</if>
-		</set>
-		WHERE user_id_ = #{userId}
-	</update>
-	
-	<!-- 分页查询 -->
-	<select id="queryPage" resultMap="Student" parameterType="map">
-		SELECT * FROM student <include refid="global.limit"/>
-	</select>
-	
-	<!-- 查询当前表的总记录数 -->
-	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM student
-	</select>
-	<select id="findStudents" resultMap="com.ym.mec.biz.dal.dao.TeacherDao.SysUser">
-		SELECT id_, username_, phone_,avatar_ FROM sys_user
-		<include refid="studentQueryCondition"/>
-		ORDER BY id_
-		<include refid="global.limit"/>
-	</select>
-	<select id="countStudents" resultType="int">
-		SELECT COUNT(id_) FROM sys_user
-		<include refid="studentQueryCondition"/>
-	</select>
-	<sql id="studentQueryCondition">
-		<where>
-			<if test="organIdList!=null">
-				organ_id_ IN
-				<foreach collection="organIdList" item="organId" open="(" close=")" separator=",">
-					#{organId}
-				</foreach>
-			</if>
-			<if test="search!=null">
-				AND (username_ LIKE CONCAT('%', #{search}, '%') OR phone_ LIKE CONCAT('%', #{search}, '%'))
-			</if>
-			AND FIND_IN_SET("STUDENT", user_type_)
-		</where>
-	</sql>
-	
-	<select id="queryByOperatingTag" resultMap="Student">
-		SELECT * FROM student WHERE operating_tag_ = #{operatingTag}
-	</select>
-	
-	<update id="batchUpdate" parameterType="java.util.List">
-    	<foreach collection="studentList" item="item" index="index" open="" close="" separator=";">
-			UPDATE student
-			<set>
-				<if test="item.subjectIdList != null">
-					subject_id_list_ = #{item.subjectIdList},
-				</if>
-				<if test="item.serviceTag != null">
-					service_tag_ = #{item.serviceTag},
-				</if>
-				<if test="item.operatingTag != null">
-					operating_tag_ = #{item.operatingTag},
-				</if>
-				<if test="item.updateTime != null">
-					update_time_ = #{item.updateTime},
-				</if>
-				<if test="item.updateTime == null">
-					update_time_ = NOW()
-				</if>
-			</set>
-			WHERE user_id_ = #{item.userId}
+
+    <resultMap type="com.ym.mec.biz.dal.entity.Student" id="Student">
+        <result column="user_id_" property="userId"/>
+        <result column="subject_id_list_" property="subjectIdList"/>
+        <result column="service_tag_" property="serviceTag"/>
+        <result column="operating_tag_" property="operatingTag"/>
+        <result column="operating_temp_tag_" property="operatingTempTag"/>
+        <result column="teacher_id_" property="teacherId"/>
+        <result column="create_time_" property="createTime"/>
+        <result column="update_time_" property="updateTime"/>
+    </resultMap>
+
+    <!-- 根据主键查询一条记录 -->
+    <select id="get" resultMap="Student">
+        SELECT *
+        FROM student
+        WHERE user_id_ = #{id}
+    </select>
+
+    <!-- 全查询 -->
+    <select id="findAll" resultMap="Student">
+        SELECT *
+        FROM student
+    </select>
+
+    <select id="lockUser" resultType="int" useCache="false" flushCache="true">
+        SELECT id_
+        FROM sys_user
+        WHERE id_ = #{userId} FOR
+        UPDATE
+    </select>
+
+    <!-- 向数据库增加一条记录 -->
+    <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.Student" useGeneratedKeys="true" keyColumn="id"
+            keyProperty="id">
+        INSERT INTO student (user_id_,subject_id_list_,
+        <if test="serviceTag != null">
+            service_tag_,
+        </if>
+        <if test="operatingTag != null">
+            operating_tag_,
+        </if>
+        <if test="operatingTempTag != null">
+            operating_temp_tag_,
+        </if>
+        teacher_id_,create_time_,update_time_)
+        VALUES
+        (#{userId},#{subjectIdList},
+        <if test="serviceTag != null">
+            #{serviceTag},
+        </if>
+        <if test="operatingTag != null">
+            #{operatingTag},
+        </if>
+        #{teacherId},NOW(),NOW())
+    </insert>
+
+    <update id="update" parameterType="com.ym.mec.biz.dal.entity.Student">
+        UPDATE student
+        <set>
+            <if test="subjectIdList != null">
+                subject_id_list_ = #{subjectIdList},
+            </if>
+            <if test="serviceTag != null">
+                service_tag_ = #{serviceTag},
+            </if>
+            <if test="operatingTag != null">
+                operating_tag_ = #{operatingTag},
+            </if>
+            <if test="operatingTempTag != null">
+                operating_temp_tag_ = #{operatingTempTag},
+            </if>
+            <if test="teacherId != null">
+                teacher_id_=#{teacherId},
+            </if>
+            <if test="updateTime != null">
+                update_time_ = #{updateTime},
+            </if>
+            <if test="updateTime == null">
+                update_time_ = NOW()
+            </if>
+        </set>
+        WHERE user_id_ = #{userId}
+    </update>
+
+    <!-- 分页查询 -->
+    <select id="queryPage" resultMap="Student" parameterType="map">
+        SELECT * FROM student
+        <include refid="global.limit"/>
+    </select>
+
+    <!-- 查询当前表的总记录数 -->
+    <select id="queryCount" resultType="int">
+        SELECT COUNT(*)
+        FROM student
+    </select>
+    <select id="findStudents" resultMap="com.ym.mec.biz.dal.dao.TeacherDao.SysUser">
+        SELECT id_, username_, phone_,avatar_ FROM sys_user
+        <include refid="studentQueryCondition"/>
+        ORDER BY id_
+        <include refid="global.limit"/>
+    </select>
+    <select id="countStudents" resultType="int">
+        SELECT COUNT(id_) FROM sys_user
+        <include refid="studentQueryCondition"/>
+    </select>
+    <sql id="studentQueryCondition">
+        <where>
+            <if test="organIdList!=null">
+                organ_id_ IN
+                <foreach collection="organIdList" item="organId" open="(" close=")" separator=",">
+                    #{organId}
+                </foreach>
+            </if>
+            <if test="search!=null">
+                AND (username_ LIKE CONCAT('%', #{search}, '%') OR phone_ LIKE CONCAT('%', #{search}, '%'))
+            </if>
+            AND FIND_IN_SET("STUDENT", user_type_)
+        </where>
+    </sql>
+
+    <select id="queryByOperatingTempTag" resultMap="Student">
+        SELECT *
+        FROM student
+        WHERE operating_temp_tag_ = #{operatingTempTag}
+    </select>
+
+    <update id="batchUpdate" parameterType="java.util.List">
+        <foreach collection="studentList" item="item" index="index" open="" close="" separator=";">
+            UPDATE student
+            <set>
+                <if test="item.subjectIdList != null">
+                    subject_id_list_ = #{item.subjectIdList},
+                </if>
+                <if test="item.serviceTag != null">
+                    service_tag_ = #{item.serviceTag},
+                </if>
+                <if test="item.operatingTag != null">
+                    operating_tag_ = #{item.operatingTag},
+                </if>
+                <if test="item.operatingTempTag != null">
+                    operating_temp_tag_ = #{item.operatingTempTag},
+                </if>
+                <if test="item.teacherId != null">
+                    teacher_id_=#{item.teacherId},
+                </if>
+                <if test="item.updateTime != null">
+                    update_time_ = #{item.updateTime},
+                </if>
+                <if test="item.updateTime == null">
+                    update_time_ = NOW()
+                </if>
+            </set>
+            WHERE user_id_ = #{item.userId}
         </foreach>
-	</update>
-
-	<resultMap id="student4operating" type="com.ym.mec.biz.dal.dto.Student4operating">
-		<result column="organ_name_" property="organName"/>
-		<result column="organ_id_" property="organId"/>
-		<result column="student_name_" property="studentName"/>
-		<result column="student_id_" property="studentId"/>
-		<result column="teacher_id_" property="teacherId"/>
-		<result column="teacher_name_" property="teacherName"/>
-		<result column="operating_tag_" property="operatingTag"/>
-		<result column="vip_times_" property="vipTimes"/>
-		<result column="free_practice_times_" property="freePracticeTimes"/>
-		<result column="buy_practice_times_" property="buyPracticeTimes"/>
-	</resultMap>
-
-	<select id="getOperatingStudents" resultMap="student4operating">
-		SELECT su.organ_id_,
-		o.name_ organ_name_,
-		su.username_   student_name_,
-		s.user_id_     student_id_,
-		tsu.id_        teacher_id_,
-		tsu.real_name_ teacher_name_,
-		s.operating_tag_,
-		a.vip_times_,
-		a.buy_practice_times_,
-		p.free_practice_times_
-		FROM student s
-		LEFT JOIN sys_user su ON s.user_id_ = su.id_
-		LEFT JOIN sys_user tsu ON tsu.id_ = s.teacher_id_
-		LEFT JOIN organization o ON o.id_ = su.organ_id_
-		LEFT JOIN (
-		SELECT s.user_id_,
-		SUM(case when (cs.group_type_ = 'VIP') then 1 ELSE 0 END) vip_times_,
-		SUM(case when (pg.buy_months_ > 0) then 1 ELSE 0 END)     buy_practice_times_
-		FROM student s
-		LEFT JOIN course_schedule_student_payment cssp ON cssp.user_id_ = s.user_id_
-		LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
-		LEFT JOIN practice_group pg ON pg.`id_` = cs.`music_group_id_` AND cs.`group_type_` = 'PRACTICE'
-		WHERE cs.status_ IN ('NOT_START','UNDERWAY')
-		GROUP BY s.user_id_
-		) a on a.user_id_ = s.user_id_
-		LEFT JOIN (
-		SELECT student_id_, count(id_) free_practice_times_
-		FROM practice_group
-		WHERE buy_months_ IS NULL
-		GROUP BY student_id_
-		) p ON p.student_id_ = s.user_id_
-		<include refid="student4OperatingQueryCondition"/>
-		ORDER BY s.user_id_
-		<include refid="global.limit"/>
-	</select>
-
-	<select id="countOperatingStudents" resultType="int">
-		SELECT COUNT(s.user_id_) FROM student s
-		LEFT JOIN sys_user su ON s.user_id_ = su.id_
-		LEFT JOIN sys_user tsu ON tsu.id_ = s.teacher_id_
-		LEFT JOIN (
-		SELECT s.user_id_,
-		SUM(case when (cs.group_type_ = 'VIP') then 1 ELSE 0 END) vip_times_,
-		SUM(case when (pg.buy_months_ > 0) then 1 ELSE 0 END)     buy_practice_times_
-		FROM student s
-		LEFT JOIN course_schedule_student_payment cssp ON cssp.user_id_ = s.user_id_
-		LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
-		LEFT JOIN practice_group pg ON pg.`id_` = cs.`music_group_id_` AND cs.`group_type_` = 'PRACTICE'
-		WHERE cs.status_ IN ('NOT_START','UNDERWAY')
-		GROUP BY s.user_id_
-		) a on a.user_id_ = s.user_id_
-		LEFT JOIN (
-		SELECT student_id_, count(id_) free_practice_times_
-		FROM practice_group
-		WHERE buy_months_ IS NULL
-		GROUP BY student_id_
-		) p ON p.student_id_ = s.user_id_
-
-		<include refid="student4OperatingQueryCondition"/>
-	</select>
-
-	<sql id="student4OperatingQueryCondition">
-		<where>
-			<if test="search != null and search != ''">
-				AND (su.phone_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.id_ LIKE CONCAT('%',#{search},'%'))
-			</if>
-			<if test="organId != null and organId != ''">
-				AND FIND_IN_SET(su.organ_id_,#{organId})
-			</if>
-			<if test="teacherId!=null">
-				AND s.teacher_id_ = #{teacherId}
-			</if>
-			<if test="operatingTag !=null">
-				AND s.operating_tag_ = #{operatingTag}
-			</if>
-			<if test='hasVip != null and hasVip=="1"'>
-				AND a.vip_times_ >=1
-			</if>
-			<if test='hasVip != null and hasVip=="0"'>
-				AND (a.vip_times_ =0 OR a.vip_times_ IS NULL)
-			</if>
-			<if test='HasFreePractice != null and HasFreePractice=="1"'>
-				AND p.free_practice_times_ >=1
-			</if>
-			<if test='HasFreePractice != null and HasFreePractice=="0"'>
-				AND (p.free_practice_times_ =0 OR p.free_practice_times_ IS NULL)
-			</if>
-			<if test='HasBuyPractice != null and HasBuyPractice=="1"'>
-				AND a.buy_practice_times_ >=1
-			</if>
-			<if test='HasBuyPractice != null and HasBuyPractice=="0"'>
-				AND (a.buy_practice_times_ =0 OR a.buy_practice_times_ IS NULL)
-			</if>
-		</where>
-	</sql>
+    </update>
+
+    <resultMap id="student4operating" type="com.ym.mec.biz.dal.dto.Student4operating">
+        <result column="organ_name_" property="organName"/>
+        <result column="organ_id_" property="organId"/>
+        <result column="student_name_" property="studentName"/>
+        <result column="student_id_" property="studentId"/>
+        <result column="teacher_id_" property="teacherId"/>
+        <result column="teacher_name_" property="teacherName"/>
+        <result column="operating_tag_" property="operatingTag"/>
+        <result column="vip_times_" property="vipTimes"/>
+        <result column="free_practice_times_" property="freePracticeTimes"/>
+        <result column="buy_practice_times_" property="buyPracticeTimes"/>
+        <result column="student_num_" property="studentNum"/>
+    </resultMap>
+
+    <select id="getOperatingStudents" resultMap="student4operating">
+        SELECT su.organ_id_,
+        o.name_ organ_name_,
+        su.username_ student_name_,
+        s.user_id_ student_id_,
+        tsu.id_ teacher_id_,
+        tsu.real_name_ teacher_name_,
+        s.operating_tag_,
+        a.vip_times_,
+        a.buy_practice_times_,
+        p.free_practice_times_
+        FROM student s
+        LEFT JOIN sys_user su ON s.user_id_ = su.id_
+        LEFT JOIN sys_user tsu ON tsu.id_ = s.teacher_id_
+        LEFT JOIN organization o ON o.id_ = su.organ_id_
+        LEFT JOIN (
+        SELECT cssp.user_id_,
+        SUM(case when (cs.group_type_ = 'VIP' AND cs.teach_mode_='ONLINE') then 1 ELSE 0 END) vip_times_,
+        SUM(case when (pg.type_='FREE') then 1 ELSE 0 END) buy_practice_times_
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
+        LEFT JOIN practice_group pg ON pg.`id_` = cs.`music_group_id_` AND cs.`group_type_` = 'PRACTICE'
+        WHERE cs.status_ IN ('NOT_START','UNDERWAY') AND (cs.is_lock_ IS NULL OR cs.is_lock_=0)
+        GROUP BY cssp.user_id_
+        ) a on a.user_id_ = s.user_id_
+        LEFT JOIN (
+        SELECT student_id_, count(id_) free_practice_times_
+        FROM practice_group
+        WHERE type_='FREE'
+        GROUP BY student_id_
+        ) p ON p.student_id_ = s.user_id_
+        <include refid="student4OperatingQueryCondition"/>
+        ORDER BY s.user_id_
+        <include refid="global.limit"/>
+    </select>
+
+    <select id="countOperatingStudents" resultType="int">
+        SELECT COUNT(s.user_id_) FROM student s
+        LEFT JOIN sys_user su ON s.user_id_ = su.id_
+        LEFT JOIN sys_user tsu ON tsu.id_ = s.teacher_id_
+        LEFT JOIN (
+        SELECT cssp.user_id_,
+        SUM(case when (cs.group_type_ = 'VIP' AND cs.teach_mode_='ONLINE') then 1 ELSE 0 END) vip_times_,
+        SUM(case when (pg.buy_months_ > 0) then 1 ELSE 0 END) buy_practice_times_
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
+        LEFT JOIN practice_group pg ON pg.`id_` = cs.`music_group_id_` AND cs.`group_type_` = 'PRACTICE'
+        WHERE cs.status_ IN ('NOT_START','UNDERWAY') AND (cs.is_lock_ IS NULL OR cs.is_lock_=0)
+        GROUP BY cssp.user_id_
+        ) a on a.user_id_ = s.user_id_
+        LEFT JOIN (
+        SELECT student_id_, count(id_) free_practice_times_
+        FROM practice_group
+        WHERE type_='FREE'
+        GROUP BY student_id_
+        ) p ON p.student_id_ = s.user_id_
+        <include refid="student4OperatingQueryCondition"/>
+    </select>
+
+    <sql id="student4OperatingQueryCondition">
+        <where>
+            su.user_type_ LIKE '%STUDENT%'
+            <if test="search != null and search != ''">
+                AND (su.phone_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.id_
+                LIKE CONCAT('%',#{search},'%'))
+            </if>
+            <if test="organId != null and organId != ''">
+                AND FIND_IN_SET(su.organ_id_,#{organId})
+            </if>
+            <if test="teacherId!=null">
+                AND s.teacher_id_ = #{teacherId}
+            </if>
+            <if test="operatingTag !=null">
+                AND s.operating_tag_ = #{operatingTag}
+            </if>
+            <if test='hasVip != null and hasVip=="1"'>
+                AND a.vip_times_ >=1
+            </if>
+            <if test='hasVip != null and hasVip=="0"'>
+                AND (a.vip_times_ =0 OR a.vip_times_ IS NULL)
+            </if>
+            <if test='hasFreePractice != null and hasFreePractice=="1"'>
+                AND p.free_practice_times_ >=1
+            </if>
+            <if test='hasFreePractice != null and hasFreePractice=="0"'>
+                AND (p.free_practice_times_ =0 OR p.free_practice_times_ IS NULL)
+            </if>
+            <if test='hasBuyPractice != null and hasBuyPractice=="1"'>
+                AND a.buy_practice_times_ >=1
+            </if>
+            <if test='hasBuyPractice != null and hasBuyPractice=="0"'>
+                AND (a.buy_practice_times_ =0 OR a.buy_practice_times_ IS NULL)
+            </if>
+        </where>
+    </sql>
+
+    <select id="getTeacherOperatingStudentsNum" resultType="java.util.Map">
+        select teacher_id_ 'key', count(*) 'value'
+        FROM student
+        WHERE FIND_IN_SET(teacher_id_, #{teacherIds})
+          AND operating_tag_ = 1
+        GROUP BY teacher_id_
+    </select>
+
+    <select id="getBuyNums" resultType="java.util.Map">
+        SELECT s.teacher_id_ 'key', COUNT(DISTINCT cssp.user_id_) 'value'
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.teach_mode_ = 'ONLINE'
+        LEFT JOIN student s ON s.user_id_ = cssp.user_id_
+        <if test="groupType != null and groupType==@com.ym.mec.biz.dal.enums.GroupType@PRACTICE">
+            LEFT JOIN practice_group pg ON cssp.music_group_id_ = pg.id_ AND cssp.group_type_ = 'PRACTICE'
+        </if>
+        WHERE FIND_IN_SET(s.teacher_id_, #{teacherIds})
+        AND cs.status_ IN ('NOT_START', 'UNDERWAY')
+        AND (cs.is_lock_ IS NULL OR cs.is_lock_ = 0)
+        <if test="groupType != null">
+            AND cs.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+        </if>
+        <if test="groupType != null and groupType==@com.ym.mec.biz.dal.enums.GroupType@PRACTICE">
+            AND pg.group_status_ IN ('NORMAL', 'FINISH')
+            AND pg.buy_months_ >= 1
+        </if>
+        GROUP BY s.teacher_id_
+    </select>
+    <select id="getPracticeAndVipNums" resultType="java.util.Map">
+        SELECT s.teacher_id_ 'key', COUNT(DISTINCT pg.student_id_) 'value'
+        FROM practice_group pg
+                 LEFT JOIN student s on s.user_id_ = pg.student_id_
+                 LEFT JOIN course_schedule_student_payment vcssp
+                           ON vcssp.user_id_ = pg.student_id_ AND vcssp.group_type_ = 'VIP'
+                 LEFT JOIN course_schedule_student_payment pcssp
+                           ON pcssp.user_id_ = pg.student_id_ AND pcssp.group_type_ = 'PRACTICE'
+                 LEFT JOIN course_schedule vcs ON vcs.id_ = vcssp.course_schedule_id_ AND vcs.teach_mode_ = 'ONLINE'
+                 LEFT JOIN course_schedule pcs ON pcs.id_ = pcssp.course_schedule_id_
+        WHERE FIND_IN_SET(s.teacher_id_, #{teacherIds})
+          AND pg.group_status_ IN ('NORMAL', 'FINISH')
+          AND vcs.status_ IN ('NOT_START', 'UNDERWAY')
+          AND pcs.status_ IN ('NOT_START', 'UNDERWAY')
+          AND (vcs.is_lock_ IS NULL OR vcs.is_lock_ = 0)
+          AND (pcs.is_lock_ IS NULL OR pcs.is_lock_ = 0)
+          AND pg.buy_months_ >= 1
+        GROUP BY s.teacher_id_
+    </select>
 </mapper>

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

@@ -373,7 +373,14 @@
     </update>
     <update id="cuntinueCourseSign">
         UPDATE teacher_attendance
-        SET sign_in_time_ = #{startDateTime},sign_in_status_ = 1,sign_out_status_ = #{status},sign_out_time_= #{endDateTime}
+        <set>
+            <if test="startDateTime != null">
+                sign_in_time_ = #{startDateTime},sign_in_status_ = 1,
+            </if>
+            <if test="endDateTime != null">
+                sign_out_status_ = #{status},sign_out_time_= #{endDateTime}
+            </if>
+        </set>
     	WHERE course_schedule_id_ = #{courseScheduleId}
     </update>
     <update id="batchUpdateTeacher">
@@ -384,6 +391,11 @@
             #{courseScheduleId}
         </foreach>
     </update>
+    <update id="cleanCourseTeacherSignOut">
+        UPDATE teacher_attendance
+        SET sign_out_status_ = NULL,sign_out_time_= NULL
+    	WHERE course_schedule_id_=#{courseId}
+    </update>
 
     <delete id="deleteByMusicGroupId" parameterType="map" >
 		DELETE ta FROM teacher_attendance ta LEFT JOIN course_schedule cs ON ta.course_schedule_id_ = cs.id_

+ 12 - 3
mec-biz/src/main/resources/config/mybatis/TeacherSalaryComplaintsMapper.xml

@@ -61,7 +61,13 @@
 		AND tsc.status_ = 'PENDING'
 	</update>
 
-	<!-- 根据主键查询一条记录 -->
+    <update id="updateComplaintStatusTuDoneWithMonth">
+		UPDATE teacher_salary_complaints tsc SET tsc.status_ = 'DONE'
+		WHERE tsc.salary_settlement_month_ = #{month}
+		AND tsc.status_ = 'PENDING'
+	</update>
+
+    <!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="TeacherSalaryComplaints">
 		SELECT * FROM teacher_salary_complaints WHERE id_ = #{id}
 	</select>
@@ -96,8 +102,8 @@
 			<if test="organId != null">
 				t.organ_id_ = #{organId}
 			</if>
-			<if test="salarySettlementMonth != null">
-				AND tsc.salary_settlement_month_ &lt;= #{salarySettlementMonth}
+			<if test="salarySettlementMonth != null and salarySettlementMonth != ''">
+				AND tsc.salary_settlement_month_ = #{salarySettlementMonth}
 			</if>
 			<if test="teacherId != null">
 				AND tsc.teacher_id_ = #{teacherId}
@@ -124,6 +130,9 @@
 	<select id="findTeacherSalaryComplaintsWithMonth" resultMap="TeacherSalaryComplaints">
 		SELECT * FROM teacher_salary_complaints tsc
 		WHERE tsc.teacher_id_ = #{teacherId} AND tsc.salary_settlement_month_ = #{month}
+		<if test="status!=null">
+			AND tsc.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+		</if>
 	</select>
 
 </mapper>

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

@@ -606,7 +606,7 @@
             CONCAT(cs.class_date_,' ',cs.end_class_time_) end_class_time_,
             cs.status_,
             cs.teach_mode_,
-            cs.student_num_,s.name_ school_name_,
+            s.name_ school_name_,
             csts.actual_salary_ IS NOT NULL is_salary_,
             cs.schoole_id_,
             IF(ta.sign_in_status_ IS NULL,3,ta.sign_in_status_) sign_in_status_,

+ 63 - 12
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -13,10 +13,10 @@ import com.ym.job.ScheduleManager;
 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.StudentDao;
 import com.ym.mec.biz.dal.dao.SysConfigDao;
 import com.ym.mec.biz.dal.dao.TeacherDao;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.entity.Teacher;
+import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.enums.SignStatusEnum;
 import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
@@ -39,6 +39,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
@@ -96,6 +97,9 @@ public class RoomServiceImpl implements RoomService {
     @Autowired
     private SysConfigDao sysConfigDao;
 
+    @Autowired
+    private StudentDao studentDao;
+
     @Value("${auth.sysconfig.tenantId}")
     private Integer lesseeOrganId;
 
@@ -114,7 +118,7 @@ public class RoomServiceImpl implements RoomService {
 
         String continueCourseTime = sysConfigDao.findConfigValue(SysConfigService.ONLINE_CONTINUE_COURSE_TIME);
         if(StringUtils.isEmpty(continueCourseTime)){
-            continueCourseTime = "3";
+            continueCourseTime = "5";
         }
         CourseSchedule schedule = courseSchedule;
         //如果当前课程是连堂课,那么获取第一节课的课程编号
@@ -238,35 +242,82 @@ public class RoomServiceImpl implements RoomService {
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
+    @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
     public void signIn(Long roomId) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
-        String userId = sysUser.getId().toString();
+        Integer userId = sysUser.getId();
         log.info("roomSignIn: roomId={}, userId={}", roomId, userId);
-        Teacher teacher = teacherDao.get(Integer.parseInt(userId));
+        Teacher teacher = teacherDao.get(userId);
+        studentDao.lockUser(userId);
         CourseSchedule courseSchedule = courseScheduleDao.get(roomId);
-
+        Date date = new Date();
         String continueCourseTime = sysConfigDao.findConfigValue(SysConfigService.ONLINE_CONTINUE_COURSE_TIME);
         if(StringUtils.isEmpty(continueCourseTime)){
-            continueCourseTime = "3";
+            continueCourseTime = "5";
         }
         CourseSchedule schedule = courseSchedule;
         //如果当前课程是连堂课,那么获取第一节课的课程编号
+        Long signInRoomId = null;
         while (true){
             String classDate = DateUtil.format(schedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
             String startClassTime = DateUtil.format(schedule.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
             schedule = courseScheduleDao.getLastCourse(schedule.getClassGroupId(),classDate + " " + startClassTime,schedule.getActualTeacherId(),continueCourseTime);
             if(schedule != null){
-                roomId = schedule.getId();
+                signInRoomId = schedule.getId();
             }else {
                 break;
             }
         }
+        if(signInRoomId == null){
+            signInRoomId = roomId;
+        }else {
+            String classDate = DateUtil.format(courseSchedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
+            String startClassTime = DateUtil.format(courseSchedule.getStartClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
+            //获取上一次课程
+            CourseSchedule lastCourse = courseScheduleDao.getLastCourse(courseSchedule.getClassGroupId(), classDate + " " + startClassTime, courseSchedule.getActualTeacherId(), continueCourseTime);
+            if(teacher != null && userId.equals(courseSchedule.getActualTeacherId())){
+                //获取当前课程的签退时间
+                TeacherAttendance teacherAttendance = teacherAttendanceService.findByTeacherAttendanceInfo(lastCourse.getId(),userId);
+                //如果上次课签退时间和当前签到时间间隔小于等于5分钟,清除上一次课程的教师签退记录
+                Date signOutTime = teacherAttendance.getSignOutTime();
+                log.info("teacherSignOutTime: signOutTime={}, date={}", signOutTime, date);
+                if(signOutTime != null && DateUtil.minutesBetween(signOutTime,date) <= Integer.parseInt(continueCourseTime)){
+                    teacherAttendanceService.cleanCourseTeacherSignOut(lastCourse.getId());
+                }else {
+                    //如果大于5分钟,不换课堂,对当前课程进行签到
+                    teacherAttendanceService.addTeacherAttendanceRecord(roomId.intValue(),userId, SignStatusEnum.SIGN_IN,true);
+                }
+            }else{
+                StudentAttendance statusAndCourseScheduleId = studentAttendanceService.findByStatusAndCourseScheduleId(lastCourse.getId(), userId);
+                Date signOutTime = statusAndCourseScheduleId.getSignOutTime();
+                log.info("studentSignOutTime: signOutTime={}, date={}", signOutTime, date);
+                if(signOutTime != null && DateUtil.minutesBetween(signOutTime,date) <= Integer.parseInt(continueCourseTime)){
+                    studentAttendanceService.cleanCourseStudentSignOut(lastCourse.getId(), userId);
+                }else {
+                    //如果大于5分钟,不换课堂,对当前课程进行签到
+                    studentAttendanceService.addStudentAttendanceRecord(signInRoomId.intValue(),userId, StudentAttendanceStatusEnum.NORMAL,SignStatusEnum.SIGN_IN);
+                }
+            }
+        }
+        //如果存在连堂课,并且跨课超过5分钟
+        log.info("signInRoomId: signInRoomId={}, userId={}", signInRoomId, userId);
         try {
-            if(teacher != null && teacher.getId().equals(courseSchedule.getActualTeacherId())){
-                teacherAttendanceService.addTeacherAttendanceRecord(roomId.intValue(),courseSchedule.getActualTeacherId(), SignStatusEnum.SIGN_IN,true);
+            String format = DateUtil.format(courseSchedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
+            String format1 = DateUtil.format(courseSchedule.getEndClassTime(), DateUtil.EXPANDED_TIME_FORMAT);
+            Date endDateTime = DateUtil.stringToDate(format + " " + format1, DateUtil.EXPANDED_DATE_TIME_FORMAT);
+            if(teacher != null && userId.equals(courseSchedule.getActualTeacherId())){
+                TeacherAttendance attendanceInfo = teacherAttendanceService.findByTeacherAttendanceInfo(roomId,userId);
+                //如果当前课程签退不为空,并且当前时间小于课程结束时间,那么清除签退时间
+                if(attendanceInfo != null && attendanceInfo.getSignOutTime() != null && date.before(endDateTime)){
+                    teacherAttendanceService.cleanCourseTeacherSignOut(roomId);
+                }
+                teacherAttendanceService.addTeacherAttendanceRecord(signInRoomId.intValue(),userId, SignStatusEnum.SIGN_IN,true);
             }else {
-                studentAttendanceService.addStudentAttendanceRecord(roomId.intValue(),Integer.parseInt(userId), StudentAttendanceStatusEnum.NORMAL,SignStatusEnum.SIGN_IN);
+                StudentAttendance studentAttendance = studentAttendanceService.findByStatusAndCourseScheduleId(roomId, userId);
+                if(studentAttendance != null && studentAttendance.getSignOutTime() != null && date.before(endDateTime)){
+                    studentAttendanceService.cleanCourseStudentSignOut(roomId, userId);
+                }
+                studentAttendanceService.addStudentAttendanceRecord(signInRoomId.intValue(),userId, StudentAttendanceStatusEnum.NORMAL,SignStatusEnum.SIGN_IN);
             }
         }catch (Exception e){
             e.printStackTrace();

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

@@ -1,9 +1,12 @@
 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.entity.TeacherSalaryComplaints;
 import com.ym.mec.biz.dal.page.TeacherSalaryModifyQueryInfo;
 import com.ym.mec.biz.service.TeacherSalaryComplaintsService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -19,10 +22,17 @@ public class TeacherSalaryComplaintsController extends BaseController {
 
     @Autowired
     private TeacherSalaryComplaintsService teacherSalaryComplaintsService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "申述列表")
     @RequestMapping("/queryPage")
-    public Object queryPage(QueryInfo queryInfo){
+    public Object queryPage(TeacherSalaryModifyQueryInfo queryInfo){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            throw new BizException("用户信息获取失败");
+        }
+        queryInfo.setTeacherId(sysUser.getId());
         return succeed(teacherSalaryComplaintsService.queryPage(queryInfo));
     }
 

+ 2 - 3
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleTeacherSalaryController.java

@@ -13,7 +13,6 @@ 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.common.exception.BizException;
-import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -77,11 +76,11 @@ public class CourseScheduleTeacherSalaryController extends BaseController {
 
         Map<String, Object> result=new HashMap<>();
         result.put("pageInfo", courseScheduleTeacherSalaryService.findIsSettlementCourseSalarys(queryInfo));
-        int i = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(DateUtil.dateToString(DateUtil.addMonths(new Date(), -1), "yyyy-MM"), TeacherSalaryConfirmStatus.UNCONFIRMED);
+        int i = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(queryInfo.getMonth(), TeacherSalaryConfirmStatus.UNCONFIRMED);
         if(i>0){
             result.put("isOpenConfirm", 1);
         }else{
-            int j = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(DateUtil.dateToString(DateUtil.addMonths(new Date(), -1), "yyyy-MM"), null);
+            int j = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(queryInfo.getMonth(), null);
             if(j<=0){
                 result.put("isOpenConfirm", 2);
             }else{

+ 49 - 11
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -78,6 +78,39 @@ public class ExportController extends BaseController {
     private ExtracurricularExercisesReplyService extracurricularExercisesReplyService;
     @Autowired
     private StudentExtracurricularExercisesSituationService studentExtracurricularExercisesSituationService;
+    @Autowired
+    private TeacherSalaryComplaintsService teacherSalaryComplaintsService;
+
+    @ApiOperation(value = "导出申述处理列表")
+    @PostMapping("export/teacherSalaryComplaints")
+    @PreAuthorize("@pcs.hasPermissions('export/teacherSalaryComplaints')")
+    public void exportTeacherSalaryComplaints(HttpServletResponse response, TeacherSalaryModifyQueryInfo queryInfo) throws IOException {
+        queryInfo.setRows(49999);
+        List<TeacherSalaryComplaints> rows = teacherSalaryComplaintsService.queryPage(queryInfo).getRows();
+        OutputStream outputStream = response.getOutputStream();
+        try {
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "老师ID", "老师姓名", "课酬归属时间", "申述提交时间", "状态",
+                    "申述处理者"}, new String[]{
+                    "organName", "teacherId", "realName", "salarySettlementMonth", "createTime", "statusEnum.msg",
+                    "operatorRealName"}, rows);
+            response.setContentType("application/octet-stream");
+            response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
+            response.flushBuffer();
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
 
     @ApiOperation(value = "网管课购买列表")
     @PostMapping("export/studentBuyPractice")
@@ -231,10 +264,10 @@ public class ExportController extends BaseController {
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "学员编号", "学员姓名", "性别", "家长姓名",
                     "家长联系电话", "是否激活", "是否有课", "是否预约网管课", "是否有网管课", "课程余额(元)",
-                    "所在乐团", "乐团所属声部", "所在乐团状态", "所在vip课", "所在VIP状态", "服务标签", "运营标签"}, new String[]{
+                    "所在乐团", "乐团所属声部", "所在乐团状态", "所在vip课", "所在VIP状态", "服务标签", "运营标签","指导老师"}, new String[]{
                     "organName", "userId", "username", "gender.description", "parentsName", "parentsPhone",
                     "isActive.msg", "hasCourse.msg", "isMake.msg", "hasPracticeCourse.msg", "courseBalance", "musicGroupName",
-                    "subjectName", "musicGroupStatus", "vipGroupName", "vipGroupStatus", "serviceTag.msg", "operatingTag.msg"}, rows);
+                    "subjectName", "musicGroupStatus", "vipGroupName", "vipGroupStatus", "serviceTag.msg", "operatingTag.msg","teacherName"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();
@@ -870,10 +903,15 @@ public class ExportController extends BaseController {
                 } else {
                     row.setAttendanceStr("否");
                 }
+                if(new Integer(1).equals(row.getAssignHomework())){
+                    row.setAssignHomeworkStr("是");
+                }else{
+                    row.setAssignHomeworkStr("否");
+                }
             }
 
-            String[] header = {"分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置作业)", "完成app双向沟通", "学员评分", "是否提交作业", "是否回复作业", "教务老师", "教务评价"};
-            String[] body = {"organName", "classDateStr", "studentId", "id", "attendanceStr", "courseName", "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "hasLiaison", "studentReview", "handHomeworkStr", "homeWorkReplied", "eduTeacherName", "courseReview"};
+            String[] header = {"分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置作业)", "完成app双向沟通", "学员评分", "是否布置作业", "是否提交作业", "是否回复作业", "教务老师", "教务评价"};
+            String[] body = {"organName", "classDateStr", "studentId", "id", "attendanceStr", "courseName", "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "hasLiaison", "studentReview", "assignHomeworkStr", "handHomeworkStr", "homeWorkReplied", "eduTeacherName", "courseReview"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupReviews.getRows());
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
@@ -1263,26 +1301,26 @@ public class ExportController extends BaseController {
                 row.setOperatingTagStr("否");
             }
             if(row.getVipTimes() != null && row.getVipTimes() >0){
-                row.setVipTimesStr("");
+                row.setVipTimesStr("");
             }else {
-                row.setVipTimesStr("");
+                row.setVipTimesStr("");
             }
             if(row.getFreePracticeTimes() != null && row.getFreePracticeTimes() >0){
-                row.setFreePracticeTimesStr("");
+                row.setFreePracticeTimesStr("");
             }else {
-                row.setFreePracticeTimesStr("");
+                row.setFreePracticeTimesStr("");
             }
             if(row.getBuyPracticeTimes() != null && row.getBuyPracticeTimes() >0){
-                row.setBuyPracticeTimesStr("");
+                row.setBuyPracticeTimesStr("");
             }else {
-                row.setBuyPracticeTimesStr("");
+                row.setBuyPracticeTimesStr("");
             }
         }
         OutputStream ouputStream = null;
         try {
 
             HSSFWorkbook workbook = POIUtil.exportExcel(
-                    new String[]{"分部", "学生", "学生编号", "指导老师","指导老师id", "运营指标", "VIP课", "免费网管课", "付费网管课"},
+                    new String[]{"分部", "学生", "学生编号", "指导老师","指导老师id", "参与运营指标", "有线上VIP课", "参与免费网管课", "付费网管课"},
                     new String[]{"organName", "studentName", "studentId", "teacherName","teacherId", "operatingTagStr", "vipTimesStr", "freePracticeTimesStr", "buyPracticeTimesStr"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");

+ 15 - 5
mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -6,11 +6,9 @@ import com.ym.mec.biz.dal.dao.EmployeeDao;
 import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import com.ym.mec.biz.dal.entity.Employee;
 import com.ym.mec.biz.dal.page.*;
-import com.ym.mec.biz.service.MusicGroupStudentFeeService;
-import com.ym.mec.biz.service.StudentCourseHomeworkService;
-import com.ym.mec.biz.service.StudentManageService;
-import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.biz.service.*;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.*;
@@ -25,7 +23,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.Arrays;
-import java.util.Date;
 import java.util.List;
 
 @Api(tags = "学生管理")
@@ -45,6 +42,8 @@ public class StudentManageController extends BaseController {
     private StudentCourseHomeworkService studentCourseHomeworkService;
     @Autowired
     private EmployeeDao employeeDao;
+    @Autowired
+    private StudentService studentService;
 
     private final Logger LOGGER = LoggerFactory.getLogger(this.getClass());
     @ApiOperation(value = "获取学生列表")
@@ -286,4 +285,15 @@ public class StudentManageController extends BaseController {
         }
         return succeed(studentManageService.getOperatingStudents(queryInfo));
     }
+
+    @ApiOperation(value = "初始化教师编号")
+    @GetMapping("/initTeacherId")
+    public HttpResponseResult initTeacherId(){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if (sysUser == null) {
+            return failed("用户信息获取失败");
+        }
+        studentService.initTeacherId();
+        return succeed();
+    }
 }

+ 20 - 6
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -1,15 +1,29 @@
 package com.ym.mec.web.controller;
 
-import com.ym.mec.biz.service.*;
-import com.ym.mec.common.controller.BaseController;
+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 java.text.ParseException;
-import java.util.Date;
+import com.ym.mec.biz.service.CourseHomeworkService;
+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.CourseScheduleTeacherSalaryService;
+import com.ym.mec.biz.service.CoursesGroupService;
+import com.ym.mec.biz.service.ExtracurricularExercisesReplyService;
+import com.ym.mec.biz.service.MusicGroupStudentFeeService;
+import com.ym.mec.biz.service.PracticeGroupService;
+import com.ym.mec.biz.service.StudentCourseHomeworkService;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.biz.service.StudentService;
+import com.ym.mec.biz.service.TeacherAttendanceService;
+import com.ym.mec.biz.service.TeacherCourseStatisticsService;
+import com.ym.mec.biz.service.TenantPaymentOrderService;
+import com.ym.mec.biz.service.VipGroupService;
+import com.ym.mec.common.controller.BaseController;
 
 @RequestMapping("task")
 @RestController
@@ -221,7 +235,7 @@ public class TaskController extends BaseController {
 
 	//更新学生运营指标
 	@GetMapping("/updateStudentOperatingTag")
-	public void updateStudentOperatingTag() throws ParseException{
-		studentService.updateOperatingTag();
+	public void updateStudentOperatingTag(){
+		studentService.updateOperatingTempTag();
 	}
 }