Browse Source

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

yonge 5 years ago
parent
commit
43a157b89d
71 changed files with 1302 additions and 189 deletions
  1. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java
  2. 25 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseHomeworkDao.java
  3. 11 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  4. 7 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupStudentFeeDao.java
  5. 16 6
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SchoolDao.java
  6. 21 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentCourseHomeworkDao.java
  7. 15 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentManageDao.java
  8. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java
  9. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupClassGroupMapperDao.java
  10. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentAttendanceViewDto.java
  11. 108 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentDto.java
  12. 122 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherHomeworkListDto.java
  13. 12 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherPersonalAttendanceDto.java
  14. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentCourseHomework.java
  15. 12 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherLeaveRecord.java
  16. 9 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/DealStatusEnum.java
  17. 73 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPaymentOrderQueryInfo.java
  18. 22 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloseQueryInfo.java
  19. 0 20
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCourseQueryInfo.java
  20. 29 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherMusicGroupSalaryQueryInfo.java
  21. 51 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherPaymentRecordInfo.java
  22. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  23. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseHomeworkService.java
  24. 10 1
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java
  25. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SchoolService.java
  26. 8 6
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentAttendanceService.java
  27. 23 2
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentCourseHomeworkService.java
  28. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java
  29. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java
  30. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherAttendanceService.java
  31. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java
  32. 16 16
      mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupService.java
  33. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  34. 43 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseHomeworkServiceImpl.java
  35. 7 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  36. 1 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java
  37. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SchoolServiceImpl.java
  38. 22 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java
  39. 15 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkReplyServiceImpl.java
  40. 35 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkServiceImpl.java
  41. 24 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java
  42. 11 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  43. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java
  44. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  45. 19 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  46. 14 0
      mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml
  47. 49 0
      mec-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml
  48. 12 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  49. 4 1
      mec-biz/src/main/resources/config/mybatis/SchoolMapper.xml
  50. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml
  51. 25 3
      mec-biz/src/main/resources/config/mybatis/StudentCourseHomeworkMapper.xml
  52. 45 0
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  53. 28 3
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  54. 13 21
      mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml
  55. 15 2
      mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml
  56. 5 1
      mec-biz/src/main/resources/config/mybatis/TeacherLeaveRecordMapper.xml
  57. 4 0
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  58. 8 0
      mec-biz/src/main/resources/config/mybatis/VipGroupClassGroupMapperMapper.xml
  59. 1 1
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  60. 12 3
      mec-student/src/main/java/com/ym/mec/student/controller/StudentCourseHomeworkController.java
  61. 68 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseHomeworkController.java
  62. 11 6
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java
  63. 6 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java
  64. 16 10
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseHomeworkReplyController.java
  65. 1 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java
  66. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleController.java
  67. 12 13
      mec-web/src/main/java/com/ym/mec/web/controller/SchoolController.java
  68. 9 0
      mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java
  69. 29 0
      mec-web/src/main/java/com/ym/mec/web/controller/student/StudentPaymentOrderController.java
  70. 2 1
      mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherDefaultMusicGroupSalaryController.java
  71. 3 9
      mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherLeaveRecordController.java

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dao;
 
+import com.ym.mec.biz.dal.dto.StudentAttendanceViewDto;
 import com.ym.mec.biz.dal.dto.TeacherClassStudentDto;
 import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
 import com.ym.mec.common.dal.BaseDAO;
@@ -74,4 +75,13 @@ public interface ClassGroupStudentMapperDao extends BaseDAO<Long, ClassGroupStud
 	 * @return int
 	 */
 	int findClassStudentNum(Map<String,Object> params);
+
+	/**
+	 * @describe 获取点名列表
+	 * @author Joburgess
+	 * @date 2019/10/19
+	 * @param courseScheduleId: 课程编号
+	 * @return java.util.List<com.ym.mec.biz.dal.entity.StudentAttendance>
+	 */
+	List<StudentAttendanceViewDto> findStudentByCourse(Long courseScheduleId);
 }

+ 25 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseHomeworkDao.java

@@ -1,9 +1,33 @@
 package com.ym.mec.biz.dal.dao;
 
+import com.ym.mec.biz.dal.dto.TeacherHomeworkListDto;
 import com.ym.mec.biz.dal.entity.CourseHomework;
 import com.ym.mec.common.dal.BaseDAO;
 
+import java.util.List;
+import java.util.Map;
+
 public interface CourseHomeworkDao extends BaseDAO<Long, CourseHomework> {
 
-	
+    /**
+     * @describe 根据班级和老师获取对应作业列表
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param params: 参数
+     * @return java.util.List<com.ym.mec.biz.dal.dto.TeacherHomeworkListDto>
+     */
+    List<TeacherHomeworkListDto> findByClassGroupAndTeacher(Map<String,Object> params);
+    int countByClassGroupAndTeacher(Map<String,Object> params);
+
+    /**
+     * @describe 根据课程编号和教师编号查询记录
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param courseHomeworkId: 课程作业编号
+     * @param userId: 用户编号
+     * @return com.ym.mec.biz.dal.entity.CourseHomework
+     */
+    CourseHomework findByTeacherAndCourseHomewok(Long courseHomeworkId,
+                                                 Long userId);
+
 }

+ 11 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -315,8 +315,17 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
      * @describe 统计乐团下班级的排课数
      * @author Joburgess
      * @date 2019/10/18
-     * @param musicGroupId:
+     * @param musicGroupId: 乐团编号
      * @return java.util.List<java.util.Map<java.lang.Long,java.lang.Integer>>
      */
-    List<Map<Integer,Long>> countClassCourseNumByMusicGroup(Long musicGroupId);
+    List<Map<Integer,Long>> countClassCourseNumByMusicGroup(String musicGroupId);
+
+    /**
+     * @describe 根据课程计划获取对应课次
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param courseSchedules: 课程计划编号列表
+     * @return java.util.List<java.util.Map<java.lang.Integer,java.lang.Integer>>
+     */
+    List<Map<Integer,Integer>> findCourseScheduleCurrentTimes(List<Integer> courseSchedules);
 }

+ 7 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupStudentFeeDao.java

@@ -18,10 +18,13 @@ public interface MusicGroupStudentFeeDao extends BaseDAO<Long, MusicGroupStudent
 	MusicGroupStudentFee findByUser(@Param("userId") Integer userId, @Param("musicGroupId") String musicGroupId);
 
 	/**
-	 * @Author: Joburgess
-	 * @Date: 2019/9/29
-	 * 根据学生编号和乐团编号更新旷课次数
-	 * @param operate 0重置,1加1
+	 * @describe 根据学生编号和乐团编号更新旷课次数
+	 * @author Joburgess
+	 * @date 2019/10/19
+	 * @param userId: 用户编号
+	 * @param musicGroupId: 乐团编号
+	 * @param operate: 0重置,1加1
+	 * @return int
 	 */
 	int updateStudentAbsenteeismTimes(@Param("userId") Integer userId, @Param("musicGroupId") String musicGroupId, @Param("operate") Integer operate);
 

+ 16 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SchoolDao.java

@@ -1,14 +1,13 @@
 package com.ym.mec.biz.dal.dao;
 
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.ibatis.annotations.Param;
-
 import com.ym.mec.biz.dal.entity.School;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public interface SchoolDao extends BaseDAO<Integer, School> {
 
@@ -33,4 +32,15 @@ public interface SchoolDao extends BaseDAO<Integer, School> {
      * @return
      */
     List<School> findByUserId(Integer userId);
+
+    /**
+     * @describe 获取vip课教学点
+     * @author Joburgess
+     * @date 2019/10/19
+     * @param userId: 教师编号
+     * @return java.util.List<com.ym.mec.biz.dal.entity.School>
+     */
+    List<School> findVipSchoolByUserId(Integer userId);
+
+
 }

+ 21 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentCourseHomeworkDao.java

@@ -3,7 +3,6 @@ package com.ym.mec.biz.dal.dao;
 import com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
 import com.ym.mec.common.dal.BaseDAO;
-
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
@@ -41,5 +40,26 @@ public interface StudentCourseHomeworkDao extends BaseDAO<Long, StudentCourseHom
      */
     List<StudentCourseHomework> constructInitialStudentHomeworkRecords(@Param("courseScheduleID") Long courseScheduleID,
                                                                        @Param("courseHomeworkID") Long courseHomeworkID);
+
+    /**
+     * @describe 根据作业编号获取需要提交作业的学生
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param courseScheduleId: 作业编号
+     * @return java.util.List<com.ym.mec.biz.dal.entity.StudentCourseHomework>
+     */
+    List<StudentCourseHomework> findByCourseSchedule(@Param("courseScheduleId") Long courseScheduleId,
+                                                     @Param("userName") String userName);
+
+    /**
+     * @describe 根据作业编号和学生编号查询对应学生作业记录
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param courseHomeworkId: 作业编号
+     * @param userId: 用户编号
+     * @return com.ym.mec.biz.dal.entity.StudentCourseHomework
+     */
+    StudentCourseHomework findByStudentAndCourseHomewok(@Param("courseHomeworkId") Long courseHomeworkId,
+                                                        @Param("userId") Long userId);
 	
 }

+ 15 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentManageDao.java

@@ -2,6 +2,8 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.dto.*;
 
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -83,4 +85,17 @@ public interface StudentManageDao {
      */
     StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Integer userId);
 
+    /**
+     * 获取学员扣费记录列表
+     * @param params
+     * @return
+     */
+    List<StudentPaymentDto> queryStudentPayment(Map<String, Object> params);
+
+    /**
+     *  COUNT学员扣费记录列表
+     * @param params
+     * @return
+     */
+    int countStudentPayment(Map<String, Object> params);
 }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -81,4 +82,13 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @return java.util.List<com.ym.mec.biz.dal.dto.BasicUserDto>
      */
     List<BasicUserDto> findTeacherByMusicGroup(Long musicGroupId);
+
+
+    /**
+     * 获取教师未结算课酬综合
+     * @param teacherId
+     * @return
+     */
+    BigDecimal findTeacherNoPay(Integer teacherId);
+
 }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/VipGroupClassGroupMapperDao.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dao;
 
+import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.VipGroupClassGroupMapper;
 import com.ym.mec.common.dal.BaseDAO;
 
@@ -12,4 +13,13 @@ public interface VipGroupClassGroupMapperDao extends BaseDAO<Long, VipGroupClass
      */
 	VipGroupClassGroupMapper findByVipGroupId(Long vipGroupId);
 
+	/**
+	 * @describe 更据vip课获取关联的班级
+	 * @author Joburgess
+	 * @date 2019/10/20
+	 * @param vipGroupId: vip课编号
+	 * @return com.ym.mec.biz.dal.entity.ClassGroup
+	 */
+	ClassGroup findClassGroupByVipGroup(Long vipGroupId);
+
 }

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

@@ -29,9 +29,20 @@ public class StudentAttendanceViewDto {
     @ApiModelProperty(value = "学生姓名",required = false)
     private String userName;
 
+    @ApiModelProperty(value = "学生头像")
+    private String avatar;
+
     @ApiModelProperty(value = "学生在学状态",required = false)
     private StudentAttendanceStatusEnum status;
 
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
     public StudentAttendanceStatusEnum getStatus() {
         return status;
     }

+ 108 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentDto.java

@@ -0,0 +1,108 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class StudentPaymentDto extends QueryInfo {
+
+    @ApiModelProperty(value = "上课日期",required = true)
+    private String classDate;
+
+    @ApiModelProperty(value = "上课时间",required = true)
+    private String startClassTime;
+
+    @ApiModelProperty(value = "课程类型",required = true)
+    private String classGroupType;
+
+    @ApiModelProperty(value = "班级名称",required = true)
+    private String classGroupName;
+
+    @ApiModelProperty(value = "当前课次",required = true)
+    private Integer currentClassTimes;
+
+    @ApiModelProperty(value = "总课次",required = true)
+    private Integer totalClassTimes;
+
+    @ApiModelProperty(value = "考勤状态",required = true)
+    private String status;
+
+    @ApiModelProperty(value = "预计费用",required = true)
+    private BigDecimal expectPrice;
+
+    @ApiModelProperty(value = "实际费用",required = true)
+    private BigDecimal actualPrice;
+
+    public String getClassDate() {
+        return classDate;
+    }
+
+    public void setClassDate(String classDate) {
+        this.classDate = classDate;
+    }
+
+    public String getStartClassTime() {
+        return startClassTime;
+    }
+
+    public void setStartClassTime(String startClassTime) {
+        this.startClassTime = startClassTime;
+    }
+
+    public String getClassGroupType() {
+        return classGroupType;
+    }
+
+    public void setClassGroupType(String classGroupType) {
+        this.classGroupType = classGroupType;
+    }
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
+    public Integer getCurrentClassTimes() {
+        return currentClassTimes;
+    }
+
+    public void setCurrentClassTimes(Integer currentClassTimes) {
+        this.currentClassTimes = currentClassTimes;
+    }
+
+    public Integer getTotalClassTimes() {
+        return totalClassTimes;
+    }
+
+    public void setTotalClassTimes(Integer totalClassTimes) {
+        this.totalClassTimes = totalClassTimes;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public BigDecimal getExpectPrice() {
+        return expectPrice;
+    }
+
+    public void setExpectPrice(BigDecimal expectPrice) {
+        this.expectPrice = expectPrice;
+    }
+
+    public BigDecimal getActualPrice() {
+        return actualPrice;
+    }
+
+    public void setActualPrice(BigDecimal actualPrice) {
+        this.actualPrice = actualPrice;
+    }
+}

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

@@ -0,0 +1,122 @@
+package com.ym.mec.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/10/20
+ */
+public class TeacherHomeworkListDto {
+
+    @ApiModelProperty(value = "作业编号")
+    private Integer courseScheduleId;
+
+    @ApiModelProperty(value = "作业内容")
+    private String content;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "预计完成人数")
+    private Integer expectNum;
+
+    @ApiModelProperty(value = "实际完成人数")
+    private Integer completedNum;
+
+    @ApiModelProperty(value = "课程名称")
+    private String courseScheduleName;
+
+    @ApiModelProperty(value = "总课时")
+    private Integer totalClassTimes;
+
+    @ApiModelProperty(value = "当前课时")
+    private Integer currentClassTimes;
+
+    @ApiModelProperty(value = "乐团编号")
+    private String musicGroupId;
+
+    @ApiModelProperty(value = "乐团名称")
+    private String musicGroupName;
+
+    public Integer getCourseScheduleId() {
+        return courseScheduleId;
+    }
+
+    public void setCourseScheduleId(Integer courseScheduleId) {
+        this.courseScheduleId = courseScheduleId;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getExpectNum() {
+        return expectNum;
+    }
+
+    public void setExpectNum(Integer expectNum) {
+        this.expectNum = expectNum;
+    }
+
+    public Integer getCompletedNum() {
+        return completedNum;
+    }
+
+    public void setCompletedNum(Integer completedNum) {
+        this.completedNum = completedNum;
+    }
+
+    public String getCourseScheduleName() {
+        return courseScheduleName;
+    }
+
+    public void setCourseScheduleName(String courseScheduleName) {
+        this.courseScheduleName = courseScheduleName;
+    }
+
+    public Integer getTotalClassTimes() {
+        return totalClassTimes;
+    }
+
+    public void setTotalClassTimes(Integer totalClassTimes) {
+        this.totalClassTimes = totalClassTimes;
+    }
+
+    public Integer getCurrentClassTimes() {
+        return currentClassTimes;
+    }
+
+    public void setCurrentClassTimes(Integer currentClassTimes) {
+        this.currentClassTimes = currentClassTimes;
+    }
+
+    public String getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public String getMusicGroupName() {
+        return musicGroupName;
+    }
+
+    public void setMusicGroupName(String musicGroupName) {
+        this.musicGroupName = musicGroupName;
+    }
+}

+ 12 - 11
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherPersonalAttendanceDto.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.ym.mec.biz.dal.entity.CourseSchedule;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.Date;
@@ -15,49 +16,49 @@ public class TeacherPersonalAttendanceDto {
 
     /** 上课日期 */
     @ApiModelProperty(value = "上课日期",required = false)
-    private java.util.Date classDate;
+    private String classDate;
 
     /** 上课时间 */
     @ApiModelProperty(value = "上课时间",required = false)
-    private java.util.Date startClassTime;
+    private String startClassTime;
 
     /** 班级类型(普通班级、合奏班级) */
-    @ApiModelProperty(value = "班级类型(普通班级、合奏班级、提高课班级、VIP班级)",required = false)
-    private ClassGroupTypeEnum type;
+    @ApiModelProperty(value = "课程类型",required = false)
+    private CourseSchedule.CourseScheduleType type;
 
     /** 班级名称 */
     @ApiModelProperty(value = "班级名称",required = false)
     private String name;
 
     /** 状态(正常签到,异常签到) */
-    @ApiModelProperty(value = "状态(1正常签到,0异常签到,2正常签退) ",required = false)
+    @ApiModelProperty(value = "状态(1正常签到,0异常签到) ",required = false)
     private YesOrNoEnum status;
 
     /** 备注 */
     @ApiModelProperty(value = "备注",required = false)
     private String remark;
 
-    public Date getClassDate() {
+    public String getClassDate() {
         return classDate;
     }
 
-    public void setClassDate(Date classDate) {
+    public void setClassDate(String classDate) {
         this.classDate = classDate;
     }
 
-    public Date getStartClassTime() {
+    public String getStartClassTime() {
         return startClassTime;
     }
 
-    public void setStartClassTime(Date startClassTime) {
+    public void setStartClassTime(String startClassTime) {
         this.startClassTime = startClassTime;
     }
 
-    public ClassGroupTypeEnum getType() {
+    public CourseSchedule.CourseScheduleType getType() {
         return type;
     }
 
-    public void setType(ClassGroupTypeEnum type) {
+    public void setType(CourseSchedule.CourseScheduleType type) {
         this.type = type;
     }
 

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentCourseHomework.java

@@ -16,6 +16,9 @@ public class StudentCourseHomework {
 
 	@ApiModelProperty(value = "学生ID",required = false)
 	private Long userId;
+
+	@ApiModelProperty(value = "用户名")
+	private String userName;
 	
 	/**  */
 	private Long courseHomeworkId;
@@ -41,6 +44,25 @@ public class StudentCourseHomework {
 	@ApiModelProperty(value = "是否已经回复",required = false)
 	private YesOrNoEnum isReplied;
 
+	@ApiModelProperty(value = "是否已查看")
+	private YesOrNoEnum isView;
+
+	public String getUserName() {
+		return userName;
+	}
+
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+
+	public YesOrNoEnum getIsView() {
+		return isView;
+	}
+
+	public void setIsView(YesOrNoEnum isView) {
+		this.isView = isView;
+	}
+
 	public YesOrNoEnum getIsReplied() {
 		return isReplied;
 	}

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

@@ -20,6 +20,9 @@ public class TeacherLeaveRecord {
 	
 	/** 请假类型 */
 	private Integer leaveCategoryId;
+
+	/** 请假类型名称 */
+	private String leaveCategoryName;
 	
 	/** 请假状态(审批中、拒绝、通过) */
 	private AuditStatusEnum status;
@@ -47,7 +50,15 @@ public class TeacherLeaveRecord {
 	
 	/** 流程实例 */
 	private String wfOrderId;
-	
+
+	public String getLeaveCategoryName() {
+		return leaveCategoryName;
+	}
+
+	public void setLeaveCategoryName(String leaveCategoryName) {
+		this.leaveCategoryName = leaveCategoryName;
+	}
+
 	public void setId(Long id){
 		this.id = id;
 	}

+ 9 - 9
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/DealStatusEnum.java

@@ -5,22 +5,22 @@ import com.ym.mec.common.enums.BaseEnum;
 /**
  * '交易状态(1,交易中;2,成功交易;3,交易失败,4交易关闭;)',
  */
-public enum DealStatusEnum implements BaseEnum<Integer, DealStatusEnum> {
-	ING(1, "交易中"),
-	SUCCESS(2, "成功交易"),
-	FAilED(3, "交易失败"),
-	CLOSE(4, "交易关闭");
+public enum DealStatusEnum implements BaseEnum<String, DealStatusEnum> {
+	ING("ING", "交易中"),
+	SUCCESS("SUCCESS", "成功交易"),
+	FAilED("FAilED", "交易失败"),
+	CLOSE("CLOSE", "交易关闭");
 
-	private Integer code;
+	private String code;
 
 	private String msg;
 
-	DealStatusEnum(Integer code, String msg) {
+	DealStatusEnum(String code, String msg) {
 		this.code = code;
 		this.msg = msg;
 	}
 
-	public void setCode(Integer code) {
+	public void setCode(String code) {
 		this.code = code;
 	}
 
@@ -33,7 +33,7 @@ public enum DealStatusEnum implements BaseEnum<Integer, DealStatusEnum> {
 	}
 
 	@Override
-	public Integer getCode() {
+	public String getCode() {
 		return this.code;
 	}
 }

+ 73 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPaymentOrderQueryInfo.java

@@ -0,0 +1,73 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class StudentPaymentOrderQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "开始时间",required = false)
+    private String orderStartDate;
+
+    @ApiModelProperty(value = "截止时间",required = false)
+    private String orderEndDate;
+
+    @ApiModelProperty(value = "交易类型",required = false)
+    private String paymentType;
+
+    @ApiModelProperty(value = "交易类型",required = false)
+    private String remark;
+
+    @ApiModelProperty(value = "学生编号",required = false)
+    private Integer studentId;
+
+    @ApiModelProperty(value = "交易状态",required = false)
+    private String paymentStatus;
+
+    public String getOrderStartDate() {
+        return orderStartDate;
+    }
+
+    public void setOrderStartDate(String orderStartDate) {
+        this.orderStartDate = orderStartDate;
+    }
+
+    public String getOrderEndDate() {
+        return orderEndDate;
+    }
+
+    public void setOrderEndDate(String orderEndDate) {
+        this.orderEndDate = orderEndDate;
+    }
+
+    public String getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(String paymentType) {
+        this.paymentType = paymentType;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getPaymentStatus() {
+        return paymentStatus;
+    }
+
+    public void setPaymentStatus(String paymentStatus) {
+        this.paymentStatus = paymentStatus;
+    }
+}

+ 22 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloseQueryInfo.java

@@ -1,8 +1,5 @@
 package com.ym.mec.biz.dal.page;
 
-import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.enums.TeachTypeEnum;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -22,6 +19,28 @@ public class TeacherCloseQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "课程类型")
     private String courseScheduleType;
 
+    @ApiModelProperty(value = "课程名称")
+    private String classGroupName;
+
+    @ApiModelProperty(value = "签到状态")
+    private String signInStatus;
+
+    public String getSignInStatus() {
+        return signInStatus;
+    }
+
+    public void setSignInStatus(String signInStatus) {
+        this.signInStatus = signInStatus;
+    }
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
     public String getCourseStartDate() {
         return courseStartDate;
     }

+ 0 - 20
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCourseQueryInfo.java

@@ -1,20 +0,0 @@
-package com.ym.mec.biz.dal.page;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.common.page.QueryInfo;
-
-public class TeacherCourseQueryInfo extends QueryInfo {
-
-    @ApiModelProperty(value = "课程类型")
-    private ClassGroupTypeEnum type;
-
-    public ClassGroupTypeEnum getType() {
-        return type;
-    }
-
-    public void setType(ClassGroupTypeEnum type) {
-        this.type = type;
-    }
-}

+ 29 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherMusicGroupSalaryQueryInfo.java

@@ -0,0 +1,29 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class TeacherMusicGroupSalaryQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "教师编号",required = false)
+    private Integer teacherId;
+
+    @ApiModelProperty(value = "结算方式",required = false)
+    private String settlementType;
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getSettlementType() {
+        return settlementType;
+    }
+
+    public void setSettlementType(String settlementType) {
+        this.settlementType = settlementType;
+    }
+}

+ 51 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherPaymentRecordInfo.java

@@ -0,0 +1,51 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class TeacherPaymentRecordInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "课程类型",required = false)
+    private String classGroupType;
+
+    @ApiModelProperty(value = "课程名称",required = false)
+    private String classGroupName;
+
+    @ApiModelProperty(value = "考勤状态",required = false)
+    private String attendanceStatus;
+
+    @ApiModelProperty(value = "学生编号",required = false)
+    private Integer studentId;
+
+    public String getClassGroupType() {
+        return classGroupType;
+    }
+
+    public void setClassGroupType(String classGroupType) {
+        this.classGroupType = classGroupType;
+    }
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
+    public String getAttendanceStatus() {
+        return attendanceStatus;
+    }
+
+    public void setAttendanceStatus(String attendanceStatus) {
+        this.attendanceStatus = attendanceStatus;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+}

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -228,4 +228,13 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return org.snaker.engine.access.Page
      */
     PageInfo findTeacherClassStudents(CourseScheduleQueryInfo queryInfo);
+
+    /**
+     * @describe 根据班级获取点名列表
+     * @author Joburgess
+     * @date 2019/10/19
+     * @param courseScheduleId:
+     * @return java.util.List<com.ym.mec.biz.dal.dto.StudentAttendanceViewDto>
+     */
+    List<StudentAttendanceViewDto> findAttendanceStudentByCourse(Long courseScheduleId);
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseHomeworkService.java

@@ -1,8 +1,19 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.entity.CourseHomework;
+import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface CourseHomeworkService extends BaseService<Long, CourseHomework> {
 
+    /**
+     * @describe 根据班级获取教师布置的作业
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param queryInfo:
+     * @return com.ym.mec.common.page.PageInfo
+     */
+    PageInfo findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo);
+
 }

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

@@ -191,5 +191,14 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	 * @param musicGroupId: 乐团编号
 	 * @return void
 	 */
-	void checkMusicGroupClassCourse(Long musicGroupId);
+	void checkMusicGroupClassCourse(String musicGroupId);
+
+	/**
+	 * @describe 根据课程计划编号获取当前课次
+	 * @author Joburgess
+	 * @date 2019/10/20
+	 * @param courseSchedules:
+	 * @return java.util.Map<java.lang.Integer,java.lang.Integer>
+	 */
+	Map<Integer,Integer> findCourseScheduleCurrentTimes(List<Integer> courseSchedules);
 }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SchoolService.java

@@ -14,4 +14,13 @@ public interface SchoolService extends BaseService<Integer, School> {
      * @return
      */
     List<School> queryByOrganId(Integer organId, YesOrNoEnum delFlag);
+
+    /**
+     * @describe 获取教师vip课教学点
+     * @author Joburgess
+     * @date 2019/10/19
+     * @param teacherId:
+     * @return java.util.List<com.ym.mec.biz.dal.entity.School>
+     */
+    List<School> findVipSchoolByTeacher(Integer teacherId);
 }

+ 8 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/StudentAttendanceService.java

@@ -1,14 +1,14 @@
 package com.ym.mec.biz.service;
 
-import java.util.List;
-import java.util.Map;
-
 import com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto;
 import com.ym.mec.biz.dal.entity.StudentAttendance;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
 
+import java.util.List;
+import java.util.Map;
+
 public interface StudentAttendanceService extends BaseService<Long, StudentAttendance> {
 
 	/**
@@ -19,9 +19,11 @@ public interface StudentAttendanceService extends BaseService<Long, StudentAtten
 	void addStudentAttendances(List<StudentAttendance> studentAttendances);
 
 	/**
-	 * @Author: Joburgess
-	 * @Date: 2019/9/16
-	 * 获取当前课程的学生
+	 * @describe 获取当前课程的学生
+	 * @author Joburgess
+	 * @date 2019/10/19
+	 * @param queryInfo: 查询参数
+	 * @return java.util.Map<java.lang.String,java.lang.Object>
 	 */
 	Map<String, Object> getCurrentCourseStudents(QueryInfo queryInfo);
 

+ 23 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/StudentCourseHomeworkService.java

@@ -4,7 +4,7 @@ import com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
 import com.ym.mec.common.service.BaseService;
 
-import java.io.IOException;
+import java.util.List;
 
 public interface StudentCourseHomeworkService extends BaseService<Long, StudentCourseHomework> {
 
@@ -13,6 +13,27 @@ public interface StudentCourseHomeworkService extends BaseService<Long, StudentC
      * @Date: 2019/9/18
      * 获取学生作业界面详细信息
      */
-    CourseHomeworkStudentDetailDto findCourseHomeworkStudentDetail(Long courseScheduleID) throws IOException;
+    CourseHomeworkStudentDetailDto findCourseHomeworkStudentDetail(Long courseScheduleID,Long userId);
+
+    /**
+     * @describe 根据课程获取可交作业的学生
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param courseSchedule: 课程计划编号
+     * @param userName: 用户名
+     * @return java.util.List<com.ym.mec.biz.dal.entity.StudentCourseHomework>
+     */
+    List<StudentCourseHomework> findStudentCourseHomeworkByCourse(Long courseSchedule,String userName);
+
+    /**
+     * @describe 跟新学生作业回复状态
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param teacherId: 教师编号
+     * @param courseScheduelId: 课程计划编号
+     * @param studentId: 学生编号
+     * @return boolean
+     */
+    boolean updateReplyStatus(Long teacherId,Long courseHomeworkId,Long studentId);
 
 }

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

@@ -4,7 +4,9 @@ import com.ym.mec.biz.dal.dto.*;
 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.TeacherPaymentRecordInfo;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 
 import java.util.List;
 
@@ -63,4 +65,10 @@ public interface StudentManageService {
      */
     StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Integer userID);
 
+    /**
+     * 获取学员扣费记录列表
+     * @param queryInfo
+     * @return
+     */
+    PageInfo queryStudentPayment(TeacherPaymentRecordInfo queryInfo);
 }

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

@@ -6,6 +6,9 @@ import com.ym.mec.biz.dal.entity.Goods;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
+import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface StudentPaymentOrderService extends BaseService<Long, StudentPaymentOrder> {
@@ -40,4 +43,11 @@ public interface StudentPaymentOrderService extends BaseService<Long, StudentPay
 	 * @return
 	 */
 	int findPayOrderNum();
+
+	/**
+	 * 获取学员的缴费订单
+	 * @param queryInfo
+	 * @return
+	 */
+    PageInfo queryOrderPage(StudentPaymentOrderQueryInfo queryInfo);
 }

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

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service;
 import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
 import com.ym.mec.biz.dal.entity.TeacherAttendance;
 import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
@@ -21,7 +22,7 @@ public interface TeacherAttendanceService extends BaseService<Long, TeacherAtten
 	 * 获取教师个人的签到记录
 	 * @return
 	 */
-	PageInfo getTeacherPersonalAttendances(TeacherAttendanceQueryInfo queryInfo);
+	PageInfo getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo);
 
 	/**
 	 * 推送未签退消息提醒

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java

@@ -10,6 +10,7 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 public interface TeacherService extends BaseService<Integer, Teacher> {
@@ -92,4 +93,12 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
      * @return java.util.List<com.ym.mec.biz.dal.dto.BasicUserDto>
      */
     List<BasicUserDto> queryMusicGroupTeacher(Long musicGroupId);
+
+
+    /**
+     * 获取老师未结算课酬总额
+     * @param teacherId
+     * @return
+     */
+    BigDecimal findTeacherNoPay(Integer teacherId);
 }

+ 16 - 16
mec-biz/src/main/java/com/ym/mec/biz/service/VipGroupService.java

@@ -1,27 +1,17 @@
 package com.ym.mec.biz.service;
 
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-
-import com.ym.mec.biz.dal.dto.StudentVipGroupDetailDto;
-import com.ym.mec.biz.dal.dto.TeachingRecordBaseInfo;
-import com.ym.mec.biz.dal.dto.VipGroupApplyDto;
-import com.ym.mec.biz.dal.dto.VipGroupBuyParamsDto;
-import com.ym.mec.biz.dal.dto.VipGroupCostCountDto;
-import com.ym.mec.biz.dal.dto.VipGroupCostCountParamsDto;
-import com.ym.mec.biz.dal.dto.VipGroupManageDetailDto;
+import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.School;
 import com.ym.mec.biz.dal.entity.StudentApplyRefunds;
 import com.ym.mec.biz.dal.entity.VipGroup;
-import com.ym.mec.biz.dal.page.StudentVipGroupQueryInfo;
-import com.ym.mec.biz.dal.page.VipGroupAttendanceQueryInfo;
-import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
-import com.ym.mec.biz.dal.page.VipGroupSalaryQueryInfo;
-import com.ym.mec.biz.dal.page.VipGroupTeachingRecordQueryInfo;
+import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
 public interface VipGroupService extends BaseService<Long, VipGroup> {
 
     /**
@@ -124,6 +114,16 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
     VipGroupCostCountDto vipGroupCostCount(VipGroupCostCountParamsDto vipGroupCostCountParamsDto);
 
     /**
+     * @describe 更新vip课班级人数及状态
+     * @author Joburgess
+     * @date 2019/10/20
+     * @param vipGroupId:
+     * @param num:
+     * @return void
+     */
+    void updateVipGroupStudentNumAndStatus(Long vipGroupId,Integer num);
+
+    /**
      * @Author: Joburgess
      * @Date: 2019/10/3
      * @params [vipGroupBuyParams]

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

@@ -662,4 +662,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         pageInfo.setRows(dataList);
         return pageInfo;
     }
+
+    @Override
+    public List<StudentAttendanceViewDto> findAttendanceStudentByCourse(Long courseScheduleId) {
+        if(Objects.isNull(courseScheduleId)){
+            throw new BizException("请指定课程编号");
+        }
+        return classGroupStudentMapperDao.findStudentByCourse(courseScheduleId);
+    }
 }

+ 43 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseHomeworkServiceImpl.java

@@ -1,23 +1,62 @@
 package com.ym.mec.biz.service.impl;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
+import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.biz.dal.dao.CourseHomeworkDao;
+import com.ym.mec.biz.dal.dto.TeacherHomeworkListDto;
 import com.ym.mec.biz.dal.entity.CourseHomework;
+import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
 import com.ym.mec.biz.service.CourseHomeworkService;
+import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.util.collection.MapUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomework>  implements CourseHomeworkService {
 	
 	@Autowired
 	private CourseHomeworkDao courseHomeworkDao;
+	@Autowired
+	private CourseScheduleService courseScheduleService;
+	@Autowired
+	private SysUserFeignService sysUserFeignService;
 
 	@Override
 	public BaseDAO<Long, CourseHomework> getDAO() {
 		return courseHomeworkDao;
 	}
-	
+
+	@Override
+	public PageInfo findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo) {
+		if(Objects.isNull(queryInfo.getClassGroupId())){
+			throw new BizException("请指定班级");
+		}
+		PageInfo<TeacherHomeworkListDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+		Map<String, Object> params = new HashMap<>();
+		MapUtil.populateMap(params, queryInfo);
+		List<TeacherHomeworkListDto> dataList = null;
+		int count = courseHomeworkDao.countByClassGroupAndTeacher(params);
+		if (count > 0) {
+			pageInfo.setTotal(count);
+			params.put("offset", pageInfo.getOffset());
+			dataList = courseHomeworkDao.findByClassGroupAndTeacher(params);
+			List<Integer> courseScheduleIds = dataList.stream().map(TeacherHomeworkListDto::getCourseScheduleId).collect(Collectors.toList());
+			Map<Integer, Integer> courseScheduleCurrentTimes = courseScheduleService.findCourseScheduleCurrentTimes(courseScheduleIds);
+			dataList.forEach(teacherHomeworkListDto -> {
+				teacherHomeworkListDto.setCurrentClassTimes(courseScheduleCurrentTimes.get(teacherHomeworkListDto.getCourseScheduleId()));
+			});
+		}
+		if (count == 0) {
+			dataList = new ArrayList<>();
+		}
+		pageInfo.setRows(dataList);
+		return pageInfo;
+	}
 }

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

@@ -589,7 +589,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	}
 
 	@Override
-	public void checkMusicGroupClassCourse(Long musicGroupId) {
+	public void checkMusicGroupClassCourse(String musicGroupId) {
 		if(Objects.isNull(musicGroupId)){
 			throw new BizException("请指定乐团");
 		}
@@ -601,4 +601,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 			}
 		}
 	}
+
+	@Override
+	public Map<Integer, Integer> findCourseScheduleCurrentTimes(List<Integer> courseSchedules) {
+		List<Map<Integer, Integer>> courseScheduleCurrentTimes = courseScheduleDao.findCourseScheduleCurrentTimes(courseSchedules);
+		return MapUtil.convertMybatisMap(courseScheduleCurrentTimes);
+	}
 }

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

@@ -245,7 +245,6 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 
 			userCashAccountDetails.add(teacherCashAccountDetail);
 
-
 			//根据学生进行投诉分组
 			Map<Integer, List<CourseScheduleComplaints>> complainsGroupByStudent = courseStudentComplaints.stream().collect(Collectors.groupingBy(CourseScheduleComplaints::getUserId));
 
@@ -277,7 +276,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
 				sysUserCashAccountService.updateBalance(studentPayment.getUserId(),returnPrice);
 				SysUserCashAccount studentCashAccount = sysUserCashAccountService.get(studentPayment.getUserId().intValue());
 				SysUserCashAccountDetail studentAccountDetail=new SysUserCashAccountDetail();
-//				studentAccountDetail.setTransNo(studentPayment.getT());
+//				studentAccountDetail.setTransNo(studentPayment.get());
 				studentAccountDetail.setUserId(studentPayment.getUserId());
 				studentAccountDetail.setType(PlatformCashAccountDetailTypeEnum.REFUNDS);
 				studentAccountDetail.setStatus(DealStatusEnum.SUCCESS);

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

@@ -27,4 +27,9 @@ public class SchoolServiceImpl extends BaseServiceImpl<Integer, School>  impleme
 	public List<School> queryByOrganId(Integer organId, YesOrNoEnum delFlag) {
 		return schoolDao.queryByOrganId(organId,delFlag);
 	}
+
+	@Override
+	public List<School> findVipSchoolByTeacher(Integer teacherId) {
+		return schoolDao.findVipSchoolByUserId(teacherId);
+	}
 }

+ 22 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java

@@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentAttendance>  implements StudentAttendanceService {
@@ -48,11 +49,17 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
 	public void addStudentAttendances(List<StudentAttendance> studentAttendances) {
 		if(CollectionUtils.isEmpty(studentAttendances)){
 			throw new BizException("无点名信息");
 		}
-		int classTimes=courseScheduleDao.countClassTimes(studentAttendances.get(0).getClassGroupId().longValue());
+		Long courseScheduleId=studentAttendances.get(0).getCourseScheduleId();
+		CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId);
+		if(Objects.isNull(courseSchedule)){
+			throw new BizException("请指定课程");
+		}
+		int classTimes=courseScheduleDao.countClassTimes(courseSchedule.getClassGroupId().longValue());
 		studentAttendances.forEach(studentAttendance -> {
 			studentAttendance.setCurrentClassTimes(classTimes);
 			StudentAttendance studentAttendanceInfo = studentAttendanceDao.getStudentAttendanceInfo(studentAttendance);
@@ -61,8 +68,14 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 				if(StudentAttendanceStatusEnum.TRUANT.equals(studentAttendance.getStatus())
 						||StudentAttendanceStatusEnum.LEAVE.equals(studentAttendance.getStatus())){
 					StudentAttendance studentLatestAttendanceInfo = studentAttendanceDao.getStudentLatestAttendanceInfo(studentAttendanceInfo);
-					if(StudentAttendanceStatusEnum.TRUANT.equals(studentLatestAttendanceInfo.getStatus())
-							||StudentAttendanceStatusEnum.LEAVE.equals(studentLatestAttendanceInfo.getStatus())){
+					if(Objects.nonNull(studentAttendanceInfo)){
+						if(StudentAttendanceStatusEnum.TRUANT.equals(studentLatestAttendanceInfo.getStatus())
+								||StudentAttendanceStatusEnum.LEAVE.equals(studentLatestAttendanceInfo.getStatus())){
+							studentFeeDao.updateStudentAbsenteeismTimes(studentAttendanceInfo.getUserId(),
+									studentAttendanceInfo.getMusicGroupId(),
+									YesOrNoEnum.YES.getCode());
+						}
+					}else{
 						studentFeeDao.updateStudentAbsenteeismTimes(studentAttendanceInfo.getUserId(),
 								studentAttendanceInfo.getMusicGroupId(),
 								YesOrNoEnum.YES.getCode());
@@ -79,6 +92,12 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 						YesOrNoEnum.NO.getCode());
 			}
 		});
+		Map<StudentAttendanceStatusEnum, List<StudentAttendance>> studentAttendanceGroupByStatus = studentAttendances.stream().collect(Collectors.groupingBy(StudentAttendance::getStatus));
+		Integer studentNum=studentAttendanceGroupByStatus.get(StudentAttendanceStatusEnum.NORMAL).size();
+		Integer leaveStudentNum=studentAttendanceGroupByStatus.get(StudentAttendanceStatusEnum.LEAVE).size();
+		courseSchedule.setStudentNum(studentNum==null?0:studentNum);
+		courseSchedule.setLeaveStudentNum(leaveStudentNum==null?0:leaveStudentNum);
+		courseScheduleDao.update(courseSchedule);
 	}
 
 	@Override

+ 15 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkReplyServiceImpl.java

@@ -1,29 +1,33 @@
 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.StudentCourseHomeworkReplyDao;
 import com.ym.mec.biz.dal.dto.StudentCourseHomeworkCommentDto;
+import com.ym.mec.biz.dal.entity.StudentCourseHomework;
 import com.ym.mec.biz.dal.entity.StudentCourseHomeworkReply;
 import com.ym.mec.biz.dal.page.StudentCourseHomeworkReplyQueryInfo;
 import com.ym.mec.biz.service.StudentCourseHomeworkReplyService;
+import com.ym.mec.biz.service.StudentCourseHomeworkService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 
 @Service
 public class StudentCourseHomeworkReplyServiceImpl extends BaseServiceImpl<Long, StudentCourseHomeworkReply> implements StudentCourseHomeworkReplyService {
 	
 	@Autowired
 	private StudentCourseHomeworkReplyDao studentCourseHomeworkReplyDao;
-
+	@Autowired
+	private StudentCourseHomeworkService studentCourseHomeworkService;
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
 
@@ -33,9 +37,15 @@ public class StudentCourseHomeworkReplyServiceImpl extends BaseServiceImpl<Long,
 	}
 
 	@Override
+	@Transactional(rollbackFor = Exception.class)
 	public long insert(StudentCourseHomeworkReply bean) {
-		SysUser user = sysUserFeignService.queryUserInfo();
-		bean.setUserId(user.getId());
+		StudentCourseHomework studentCourseHomework = studentCourseHomeworkService.get(bean.getStudentCourseHomeworkId());
+		if(Objects.isNull(studentCourseHomework)){
+			throw new BizException("请指定需要回复的作业");
+		}
+		studentCourseHomeworkService.updateReplyStatus(bean.getUserId().longValue(),
+				studentCourseHomework.getCourseHomeworkId(),
+				studentCourseHomework.getUserId());
 		return super.insert(bean);
 	}
 

+ 35 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -2,23 +2,26 @@ 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.CourseHomeworkDao;
 import com.ym.mec.biz.dal.dao.StudentCourseHomeworkDao;
 import com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto;
 import com.ym.mec.biz.dal.entity.CourseHomework;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
 import com.ym.mec.biz.service.CourseHomeworkService;
 import com.ym.mec.biz.service.StudentCourseHomeworkService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.io.IOException;
+import java.util.List;
+import java.util.Objects;
 
 @Service
 public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, StudentCourseHomework>  implements StudentCourseHomeworkService {
@@ -27,6 +30,8 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
 	private StudentCourseHomeworkDao studentCourseHomeworkDao;
 	@Autowired
 	private CourseHomeworkService courseHomeworkService;
+	@Autowired
+	private CourseHomeworkDao courseHomeworkDao;
 
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
@@ -43,6 +48,7 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
 	public long insert(StudentCourseHomework bean) {
 		SysUser user = sysUserFeignService.queryUserInfo();
 		bean.setUserId(Long.valueOf(user.getId()));
+		bean.setStatus(YesOrNoEnum.YES);
 		long insert = super.insert(bean);
 
 		CourseHomework courseHomework=new CourseHomework();
@@ -53,9 +59,25 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
 	}
 
 	@Override
-	public CourseHomeworkStudentDetailDto findCourseHomeworkStudentDetail(Long courseScheduleID) throws IOException {
-		SysUser user = sysUserFeignService.queryUserInfo();
-		return studentCourseHomeworkDao.findCourseHomeworkStudentDetail(courseScheduleID,Long.valueOf(user.getId()));
+	public CourseHomeworkStudentDetailDto findCourseHomeworkStudentDetail(Long courseScheduleID,Long userId){
+		return studentCourseHomeworkDao.findCourseHomeworkStudentDetail(courseScheduleID,userId);
+	}
+
+	@Override
+	public boolean updateReplyStatus(Long teacherId, Long courseHomeworkId, Long studentId) {
+		StudentCourseHomework byStudentAndCourseHomewok = studentCourseHomeworkDao.findByStudentAndCourseHomewok(courseHomeworkId, studentId);
+		if(Objects.isNull(byStudentAndCourseHomewok)){
+			throw new BizException("作业记录不存在");
+		}
+		if(byStudentAndCourseHomewok.getIsReplied()==YesOrNoEnum.YES){
+			return true;
+		}
+		CourseHomework byTeacherAndCourseHomewok = courseHomeworkDao.findByTeacherAndCourseHomewok(courseHomeworkId, teacherId);
+		if(Objects.nonNull(byTeacherAndCourseHomewok)){
+			byStudentAndCourseHomewok.setIsView(YesOrNoEnum.YES);
+			studentCourseHomeworkDao.update(byStudentAndCourseHomewok);
+		}
+		return true;
 	}
 
 	@Override
@@ -65,4 +87,12 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
 		courseHomeworkQueryInfo.setUserId(Long.valueOf(user.getId()));
 		return super.queryPage(queryInfo);
 	}
+
+	@Override
+	public List<StudentCourseHomework> findStudentCourseHomeworkByCourse(Long courseSchedule, String userName) {
+		if(Objects.isNull(courseSchedule)){
+			throw new BizException("请指定课程");
+		}
+		return studentCourseHomeworkDao.findByCourseSchedule(courseSchedule,userName);
+	}
 }

+ 24 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -2,6 +2,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.CourseScheduleStudentPaymentDao;
 import com.ym.mec.biz.dal.dao.StudentManageDao;
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.dao.VipGroupDao;
@@ -9,8 +10,11 @@ import com.ym.mec.biz.dal.dto.*;
 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.TeacherPaymentRecordInfo;
+import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
 import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.util.collection.MapUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -124,4 +128,24 @@ public class StudentManageServiceImpl implements StudentManageService {
     public StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Integer userId) {
         return studentManageDao.getStudentAccountBaseInfo(userId);
     }
+
+    @Override
+    public PageInfo queryStudentPayment(TeacherPaymentRecordInfo queryInfo) {
+        PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<String, Object>();
+        MapUtil.populateMap(params, queryInfo);
+
+        List dataList = null;
+        int count = studentManageDao.countStudentPayment(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            dataList = studentManageDao.queryStudentPayment(params);
+        }
+        if (count == 0) {
+            dataList = new ArrayList<>();
+        }
+        pageInfo.setRows(dataList);
+        return pageInfo;
+    }
 }

+ 11 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -1,18 +1,19 @@
 package com.ym.mec.biz.service.impl;
 
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.entity.Goods;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
+import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 @Service
 public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, StudentPaymentOrder> implements StudentPaymentOrderService {
@@ -45,4 +46,9 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         return studentPaymentOrderDao.findPayOrderNum();
     }
 
+    @Override
+    public PageInfo queryOrderPage(StudentPaymentOrderQueryInfo queryInfo) {
+        return queryPage(queryInfo);
+    }
+
 }

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

@@ -12,6 +12,7 @@ import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.enums.SignStatusEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.service.CourseHomeworkService;
 import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.SysConfigService;
@@ -171,7 +172,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	}
 
 	@Override
-	public PageInfo getTeacherPersonalAttendances(TeacherAttendanceQueryInfo queryInfo) {
+	public PageInfo getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo) {
 		PageInfo<TeacherPersonalAttendanceDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 		Map<String, Object> params = new HashMap<String, Object>();
 		MapUtil.populateMap(params, queryInfo);

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

@@ -181,6 +181,11 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	}
 
 	@Override
+	public BigDecimal findTeacherNoPay(Integer teacherId) {
+		return teacherDao.findTeacherNoPay(teacherId);
+	}
+
+	@Override
 	public List<BasicUserDto> queryMusicGroupTeacher(Long musicGroupId) {
 		if(Objects.isNull(musicGroupId)){
 			throw new BizException("请指定乐团");

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

@@ -492,6 +492,24 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         return results;
     }
 
+	@Override
+	public void updateVipGroupStudentNumAndStatus(Long vipGroupId, Integer num) {
+		VipGroup vipGroup = vipGroupDao.get(vipGroupId);
+		if(Objects.isNull(vipGroup)){
+			throw new BizException("指定的vip课程不存在");
+		}
+		ClassGroup classGroup=vipGroupClassGroupMapperDao.findClassGroupByVipGroup(vipGroupId);
+		if(Objects.isNull(classGroup)){
+			throw new BizException("未找到关联班级");
+		}
+		classGroup.setStudentNum(classGroup.getStudentNum()+num);
+		if(classGroup.getStudentNum().equals(classGroup.getExpectStudentNum())){
+			vipGroup.setStatus(VipGroupStatusEnum.FINISH);
+			vipGroupDao.update(vipGroup);
+		}
+		classGroupDao.update(classGroup);
+	}
+
 	@Transactional(rollbackFor = Exception.class)
 	@Override
 	public Map buyVipGroup(VipGroupBuyParamsDto vipGroupBuyParams) throws Exception {
@@ -535,7 +553,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		studentVipGroupPaymentDao.insert(studentVipGroupPayment);
 
 		//更新班级人数,如果订单支付失败则减少
-		classGroupService.updateClassStudentNum(vipGroupClassGroupMapper.getClassGroupId().longValue(),1);
+		updateVipGroupStudentNumAndStatus(vipGroup.getId(),1);
 
 		//生成回调地址
 		Map payMap = payService.getPayMap(

+ 14 - 0
mec-biz/src/main/resources/config/mybatis/ClassGroupStudentMapperMapper.xml

@@ -119,6 +119,20 @@
         WHERE
             cgsm.class_group_id_ = #{classGroupId}
     </select>
+    <select id="findStudentByCourse" resultMap="com.ym.mec.biz.dal.dao.StudentAttendanceDao.studentAttendanceViewUtilEntity">
+        SELECT
+            su.id_ student_id_,
+            su.username_,
+            su.avatar_,
+            sa.status_
+        FROM
+            course_schedule_student_payment cssp
+            LEFT JOIN sys_user su ON cssp.user_id_ = su.id_
+            LEFT JOIN student_attendance sa ON cssp.course_schedule_id_ = sa.course_schedule_id_
+            AND cssp.user_id_ = sa.user_id_
+        WHERE
+            cssp.course_schedule_id_ =#{courseScheduleId}
+    </select>
 
     <delete id="deleteStudentByMusicGroupId" parameterType="map">
         DELETE FROM class_group_student_mapper WHERE class_group_id_ in (select id_ from class_group where music_group_id_ = #{musicGroupId}) and user_id_ = #{userId}

+ 49 - 0
mec-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml

@@ -144,4 +144,53 @@
 	<select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM course_homework
 	</select>
+
+	<resultMap id="teacherHomeworkListDto" type="com.ym.mec.biz.dal.dto.TeacherHomeworkListDto">
+		<result property="courseScheduleId" column="course_homework_id_"/>
+		<result property="content" column="content_"/>
+		<result property="expectNum" column="expect_num_"/>
+		<result property="completedNum" column="completed_num_"/>
+		<result property="courseScheduleName" column="course_schedule_name_"/>
+		<result property="totalClassTimes" column="total_class_times_"/>
+		<result property="currentClassTimes" column="current_class_times"/>
+		<result property="musicGroupId" column="music_group_id_"/>
+		<result property="musicGroupName" column="music_group_name_"/>
+		<result property="createTime" column="create_time_"/>
+	</resultMap>
+
+	<select id="findByClassGroupAndTeacher">
+		SELECT
+			ch.id_ course_homework_id_,
+			ch.content_,
+			ch.create_time_,
+			ch.expect_num_,
+			ch.completed_num_,
+			cs.name_ course_schedule_name_,
+			cg.total_class_times_,
+			cg.music_group_id_,
+			mg.name_ music_group_name_
+		FROM
+			course_homework ch
+			LEFT JOIN course_schedule cs ON ch.course_schedule_id_=cs.id_
+			LEFT JOIN course_schedule_teacher_salary csts ON ch.course_schedule_id_=csts.course_schedule_id_
+			LEFT JOIN class_group cg ON ch.class_group_id_=cg.id_
+			LEFT JOIN music_group mg ON cg.music_group_id_=mg.id_
+			WHERE csts.user_id_=#{userId} AND ch.class_group_id_=#{classGroupId}
+	</select>
+	<select id="countByClassGroupAndTeacher" resultType="int">
+		SELECT
+			COUNT(*)
+		FROM
+			course_homework ch
+			LEFT JOIN course_schedule_teacher_salary csts ON ch.course_schedule_id_=csts.course_schedule_id_
+			WHERE csts.user_id_=#{userId} AND ch.class_group_id_=#{classGroupId}
+	</select>
+	<select id="findByTeacherAndCourseHomewok" resultMap="CourseHomework">
+		SELECT
+			ch.*
+		FROM
+			course_homework ch
+			LEFT JOIN course_schedule_teacher_salary csts ON ch.course_schedule_id_=csts.course_schedule_id_
+			WHERE ch.id_=#{courseHomeworkId} AND csts.user_id_=#{userId}
+	</select>
 </mapper>

+ 12 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -859,4 +859,16 @@
             WHERE music_group_id_ = #{musicGroupId}
             GROUP BY cg.id_
     </select>
+    <select id="findCourseScheduleCurrentTimes" resultType="java.util.Map">
+        SELECT
+            course_schedule_id_ AS 'key',
+            MAX(current_class_times_) AS 'value'
+        FROM
+            student_attendance sa
+            WHERE sa.course_schedule_id_ IN
+            <foreach collection="list" item="id" open="(" close=")" separator=",">
+                #{id}
+            </foreach>
+        GROUP BY course_schedule_id_
+    </select>
 </mapper>

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

@@ -122,6 +122,9 @@
     </select>
     
     <select id="findByUserId" resultMap="School">
-        select id_ * from school where del_flag_ = 0 and user_id_ = #{userId}
+        select * from school where del_flag_ = 0 and user_id_ = #{userId}
+    </select>
+    <select id="findVipSchoolByUserId" resultMap="School">
+        select * from school where del_flag_ = 0 and (user_id_ = #{userId} OR user_id_ IS NULL)
     </select>
 </mapper>

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

@@ -94,6 +94,7 @@
         <result property="musicGroupId" column="music_group_id_"/>
         <result property="subjectId" column="subject_id_"/>
         <result property="subjectName" column="subject_name_"/>
+        <result property="avatar" column="avatar_"/>
         <result property="status" column="status_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
@@ -163,7 +164,6 @@
             LEFT JOIN class_group_student_mapper cgsm ON cgsm.user_id_ = su.id_
             LEFT JOIN class_group cg ON cg.id_ = cgsm.class_group_id_
             LEFT JOIN music_group mg ON cg.music_group_id_ = mg.id_
-            LEFT JOIN `subject` s ON cg.subject_id_ = s.id_
             LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_
         WHERE
             su.id_=#{userId} AND cs.id_=#{courseScheduleId}

+ 25 - 3
mec-biz/src/main/resources/config/mybatis/StudentCourseHomeworkMapper.xml

@@ -9,6 +9,7 @@
 	<resultMap type="com.ym.mec.biz.dal.entity.StudentCourseHomework" id="StudentCourseHomework">
 		<result column="id_" property="id" />
 		<result column="user_id_" property="userId"/>
+		<result column="username_" property="userName"/>
 		<result column="course_homework_id_" property="courseHomeworkId" />
 		<result column="attachments_" property="attachments" />
 		<result column="score_" property="score" />
@@ -17,6 +18,7 @@
 		<result column="remark_" property="remark" />
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 		<result column="is_replied_" property="isReplied" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+		<result column="is_view_" property="isView" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 	</resultMap>
 
 	<resultMap type="com.ym.mec.biz.dal.dto.CourseHomeworkStudentDetailDto" id="CourseHomeworkStudentDetailDto">
@@ -50,14 +52,14 @@
 		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 		</selectKey>
 		-->
-		INSERT INTO student_course_homework (id_,user_id_,course_homework_id_,attachments_,score_,create_time_,update_time_,remark_,status_,is_replied_) VALUES(#{id},#{userId},#{courseHomeworkId},#{attachments},#{score},now(),now(),#{remark},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isReplied,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
+		INSERT INTO student_course_homework (id_,user_id_,course_homework_id_,attachments_,score_,create_time_,update_time_,remark_,status_,is_replied_,is_view_) VALUES(#{id},#{userId},#{courseHomeworkId},#{attachments},#{score},now(),now(),#{remark},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isReplied,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{isView,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
 	</insert>
 
 	<insert id="batchInsertStudentCourseHomeworkRecord" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id_">
-		INSERT INTO student_course_homework (user_id_,course_homework_id_,attachments_,score_,create_time_,update_time_,remark_,status_,is_replied_)
+		INSERT INTO student_course_homework (user_id_,course_homework_id_,attachments_,score_,create_time_,update_time_,remark_,status_,is_replied_,is_view_)
 		VALUE
 		<foreach collection="list" item="homework" separator=",">
-			(#{homework.userId},#{homework.courseHomeworkId},#{homework.attachments},#{homework.score},now(),now(),#{homework.remark},#{homework.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{homework.isReplied,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
+			(#{homework.userId},#{homework.courseHomeworkId},#{homework.attachments},#{homework.score},now(),now(),#{homework.remark},#{homework.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{homework.isReplied,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{homework.isView,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
 		</foreach>
 	</insert>
 
@@ -92,6 +94,9 @@
 			<if test="isReplied != null">
 				is_replied_ = #{isReplied,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 			</if>
+			<if test="isView != null">
+				is_view_ = #{isView,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+			</if>
 		</set> WHERE id_ = #{id}
 	</update>
 	
@@ -205,4 +210,21 @@
 			sa.course_schedule_id_ = #{courseScheduleID}
 			AND status_ = "NORMAL"
 	</select>
+	<select id="findByCourseSchedule" resultMap="StudentCourseHomework">
+		SELECT
+			sch.*,
+			su.username_
+		FROM
+			student_course_homework sch
+			LEFT JOIN sys_user su ON sch.user_id_=su.id_
+			<where>
+				sch.course_homework_id_=#{courseScheduleId}
+				<if test="userName!=null and userName!=''">
+					AND su.username_ LIKE CONCAT('%',#{userName},'%')
+				</if>
+			</where>
+	</select>
+	<select id="findByStudentAndCourseHomewok" resultMap="StudentCourseHomework">
+		SELECT * FROM student_course_homework WHERE user_id_=#{userId} AND course_homework_id_=#{courseHomeworkId}
+	</select>
 </mapper>

+ 45 - 0
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -242,4 +242,49 @@
             suca.user_id_ =#{userId}
     </select>
 
+    <resultMap id="StudentPaymentDto" type="com.ym.mec.biz.dal.dto.StudentPaymentDto">
+        <result property="classDate" column="class_date_"/>
+        <result property="startClassTime" column="start_class_time_"/>
+        <result property="classGroupType" column="class_group_type_"/>
+        <result property="classGroupName" column="class_group_name_"/>
+        <result property="currentClassTimes" column="current_class_times_"/>
+        <result property="totalClassTimes" column="total_class_times_"/>
+        <result property="status" column="status_"/>
+        <result property="expectPrice" column="expect_price_"/>
+        <result property="actualPrice" column="actual_price_"/>
+    </resultMap>
+    <select id="queryStudentPayment" resultMap="StudentPaymentDto">
+        SELECT cs.class_date_,cs.start_class_time_,cs.type_ class_group_type_ ,cs.name_ class_group_name_,
+        cg.total_class_times_,sa.current_class_times_,sa.status_,cssp.expect_price_,cssp.actual_price_
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+        LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_
+        LEFT JOIN class_group cg ON cg.id_ = sa.class_group_id_
+        <include refid="studentPaymentSql"/>
+        <include refid="global.limit"/>
+    </select>
+    <sql id="studentPaymentSql">
+        <where>
+            <if test="classGroupType != null">
+                AND cs.type_ = #{classGroupType}
+            </if>
+            <if test="classGroupName != null">
+                AND cs.name_ = #{classGroupName}
+            </if>
+            <if test="attendanceStatus != null">
+                AND sa.status_ = #{attendanceStatus}
+            </if>
+            <if test="studentId != null">
+                AND cssp.user_id_ = #{studentId}
+            </if>
+        </where>
+    </sql>
+    <select id="countStudentPayment" resultType="java.lang.Integer">
+        SELECT COUNT(cssp.id_)
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+        LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_
+        <include refid="studentPaymentSql"/>
+    </select>
+
 </mapper>

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

@@ -140,16 +140,41 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="StudentPaymentOrder" parameterType="map">
-        SELECT * FROM student_payment_order ORDER BY id_
+        SELECT * FROM student_payment_order spo
+        <include refid="queryPaymentOrder"/>
+        ORDER BY spo.id_
         <include refid="global.limit"/>
     </select>
 
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
-        SELECT COUNT(*)
-        FROM student_payment_order
+        SELECT COUNT(spo.id_) FROM student_payment_order spo
+        <include refid="queryPaymentOrder"/>
     </select>
 
+    <sql id="queryPaymentOrder">
+        <where>
+            <if test="orderStartDate != null">
+                AND spo.pay_time_ &gt;= #{orderStartDate}
+            </if>
+            <if test="orderEndDate != null">
+                AND spo.pay_time_ &lt;= #{orderEndDate}
+            </if>
+            <if test="paymentType != null">
+                AND spo.type_ = #{paymentType}
+            </if>
+            <if test="remark != null">
+                AND spo.memo_ LIKE CONCAT('%',#{remark},'%')
+            </if>
+            <if test="studentId != null">
+                AND spo.user_id_ = #{studentId}
+            </if>
+            <if test="paymentStatus != null">
+                AND spo.status_ = #{paymentStatus}
+            </if>
+        </where>
+    </sql>
+
     <select id="queryApplyGoodsList" resultMap="Goods" parameterType="map">
         select g.* from goods g where g.id_ in (SELECT spod.goods_id_list_ FROM student_payment_order spo left join
         student_payment_order_detail spod on spo.id_ = spod.payment_order_id_ where spo.music_group_id_ =

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

@@ -97,6 +97,7 @@
     <resultMap id="teacherPersonalAttendance" type="com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto">
         <result column="class_date_" property="classDate"/>
         <result column="start_class_time_" property="startClassTime"/>
+        <result column="class_date_" property="classDate"/>
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="name_" property="name"/>
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
@@ -108,48 +109,39 @@
             <if test="teacherId != null">
                 and ta.teacher_id_ = #{teacherId}
             </if>
-            <if test="musicGroupId != null">
-                and ta.music_group_id_ = #{musicGroupId}
+            <if test="courseStartDate != null">
+                and cs.class_date_ &gt;= #{courseStartDate}
             </if>
-            <if test="classGroupId != null">
-                and ta.class_group_id_ = #{classGroupId}
+            <if test="courseEndDate != null">
+                and cs.class_date_ &lt;= #{courseEndDate}
             </if>
-            <if test="attendanceStatus != null">
-                and ta.sign_in_status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            <if test="signInStatus != null">
+                and ta.sign_in_status_ = #{signInStatus}
             </if>
-            <if test="classGroupType != null">
-                and cg.type_ = #{classGroupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            <if test="courseScheduleType != null">
+                and cs.type_ = #{courseScheduleType}
             </if>
             <if test="classGroupName != null">
-                and cg.name_ like CONCAT('%',#{classGroupName},'%')
+                and cs.name_ like CONCAT('%',#{classGroupName},'%')
             </if>
         </where>
     </sql>
 
     <select id="getTeacherPersonalAttendances" parameterType="map" resultMap="teacherPersonalAttendance">
         SELECT
-            cs.class_date_,
-            cs.start_class_time_,
-            cg.name_,
-            cg.type_,
-            ta.sign_in_status_ status_,
-            ta.remark_
+            cs.class_date_,cs.start_class_time_,cs.name_,cs.type_,
+            ta.sign_in_status_ status_,ta.remark_
         FROM
             teacher_attendance ta
         LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
-        LEFT JOIN class_group cg ON ta.class_group_id_=cg.id_
         <include refid="queryCondition"/>
         ORDER BY class_date_ DESC
         <include refid="global.limit"/>
     </select>
 
     <select id="getTeacherPersonalAttendancesCount" resultType="int">
-        SELECT
-            count(ta.id_)
-        FROM
-          teacher_attendance ta
+        SELECT count(ta.id_) FROM teacher_attendance ta
         LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
-        LEFT JOIN class_group cg ON ta.class_group_id_=cg.id_
         <include refid="queryCondition"/>
     </select>
 

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

@@ -79,13 +79,26 @@
 
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="TeacherDefaultMusicGroupSalary" parameterType="map">
-		SELECT * FROM teacher_default_music_group_salary ORDER BY id_
+		SELECT * FROM teacher_default_music_group_salary tdmgs
+		<include refid="querySalary"/>
+		ORDER BY tdmgs.id_
 		<include refid="global.limit"/>
 	</select>
+	<sql id="querySalary">
+		<where>
+			<if test="teacherId != null">
+				AND tdmgs.user_id_ = #{teacherId}
+			</if>
+			<if test="settlementType != null">
+				AND tdmgs.settlement_type_ = #{settlementType}
+			</if>
+		</where>
+	</sql>
 
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM teacher_default_music_group_salary
+		SELECT COUNT(id_) FROM teacher_default_music_group_salary tdmgs
+		<include refid="querySalary"/>
 	</select>
 
 	<!-- 根据user_id 获取老师的默认薪酬 -->

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

@@ -9,6 +9,7 @@
 		<result column="user_id_" property="userId" />
 		<result column="days_" property="days" />
 		<result column="leave_category_id_" property="leaveCategoryId" />
+		<result column="leave_category_name_" property="leaveCategoryName" />
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
 		<result column="remark_" property="remark" />
 		<result column="create_time_" property="createTime" />
@@ -97,7 +98,10 @@
 
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="TeacherLeaveRecord" parameterType="map">
-		SELECT * FROM teacher_leave_record tlr
+		SELECT tlr.create_time_,tlr.start_time_,tlr.end_time_,tlr.remark_,tlr.id_,
+		lc.name_ leave_category_name_,lc.id_ leave_category_id_
+		FROM teacher_leave_record tlr
+		LEFT JOIN leave_category lc ON tlr.leave_category_id_ = lc.id_
 		<include refid="queryLeavePage"/>
 		ORDER BY tlr.id_
 		<include refid="global.limit" />

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

@@ -294,6 +294,10 @@
         <include refid="global.limit"/>
     </select>
 
+    <select id="findTeacherNoPay" resultType="decimal">
+        SELECT SUM(expect_salary_) FROM course_schedule_teacher_salary csts WHERE settlement_time_ IS NULL AND user_id_ = #{teacherId}
+    </select>
+
     <select id="findTeacherByMusicGroup" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
         SELECT
             su.id_ user_id_,

+ 8 - 0
mec-biz/src/main/resources/config/mybatis/VipGroupClassGroupMapperMapper.xml

@@ -70,4 +70,12 @@
     <select id="findByVipGroupId" resultMap="VipGroupClassGroupMapper">
         SELECT * FROM vip_group_class_group_mapper WHERE vip_group_id_=#{vipGroupId}
     </select>
+    <select id="findClassGroupByVipGroup" resultMap="com.ym.mec.biz.dal.dao.ClassGroupDao.ClassGroup">
+        SELECT
+            cg.*
+        FROM
+            vip_group_class_group_mapper vgcgm
+            LEFT JOIN class_group cg ON vgcgm.class_group_id_=cg.id_
+            WHERE vgcgm.vip_group_id_=#{vipGroupId}
+    </select>
 </mapper>

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

@@ -571,7 +571,7 @@
         LEFT JOIN vip_group_class_group_mapper vgcgm ON vg.id_ = vgcgm.vip_group_id_
         LEFT JOIN class_group cg ON cg.id_ = vgcgm.class_group_id_
         LEFT JOIN course_schedule cs ON cs.class_group_id_ = cg.id_
-        WHERE cs.actual_teacher_id_ = 6 AND cs.type_ = 'VIP' AND cg.del_flag_ = 0
+        WHERE cs.actual_teacher_id_ = #{teacherId} AND cs.type_ = 'VIP' AND cg.del_flag_ = 0
     </select>
 
     <resultMap type="com.ym.mec.biz.dal.dto.TeacherVipClassInfoDto" id="getTeacherVipClassMap">

+ 12 - 3
mec-student/src/main/java/com/ym/mec/student/controller/StudentCourseHomeworkController.java

@@ -1,5 +1,7 @@
 package com.ym.mec.student.controller;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
@@ -8,10 +10,11 @@ import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 
-import java.io.IOException;
+import java.util.Objects;
 
 /**
  * @Author Joburgess
@@ -24,6 +27,8 @@ public class StudentCourseHomeworkController extends BaseController {
 
     @Autowired
     private StudentCourseHomeworkService studentCourseHomeworkService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "提交作业")
     @PostMapping(value = "/add",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@@ -44,8 +49,12 @@ public class StudentCourseHomeworkController extends BaseController {
 
     @ApiOperation(value = "获取学生作业界面详细信息")
     @GetMapping(value = "/findCourseHomeworkStudentDetail")
-    public Object findCourseHomeworkStudentDetail(Long courseScheduleID) throws IOException {
-        return succeed(studentCourseHomeworkService.findCourseHomeworkStudentDetail(courseScheduleID));
+    public Object findCourseHomeworkStudentDetail(Long courseScheduleID) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if(Objects.isNull(user)){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+        return succeed(studentCourseHomeworkService.findCourseHomeworkStudentDetail(courseScheduleID,user.getId().longValue()));
     }
 
     @ApiOperation(value = "分页查询作业列表")

+ 68 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/CourseHomeworkController.java

@@ -0,0 +1,68 @@
+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.dto.CourseHomeworkStudentDetailDto;
+import com.ym.mec.biz.dal.entity.StudentCourseHomework;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
+import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
+import com.ym.mec.biz.service.CourseHomeworkService;
+import com.ym.mec.biz.service.StudentCourseHomeworkService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Objects;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/10/20
+ */
+@Api(tags = "作业服务")
+@RequestMapping("courseHomework")
+@RestController
+public class CourseHomeworkController extends BaseController {
+
+    @Autowired
+    private CourseHomeworkService courseScheduleService;
+    @Autowired
+    private StudentCourseHomeworkService studentCourseHomeworkService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @ApiOperation(value = "根据班级获取教师布置的作业")
+    @GetMapping("/findTeacherCourseHomeworkByClassGroup")
+    public Object findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(Objects.isNull(sysUser)){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+        queryInfo.setUserId(sysUser.getId().longValue());
+        return succeed(courseScheduleService.findTeacherCourseHomeworkByClassGroup(queryInfo));
+    }
+
+    @ApiOperation(value = "根据课程计划获取需要交作业的学生")
+    @GetMapping("/findCourseStudents")
+    public Object findCourseStudents(Long courseScheduleId,String userName){
+        return succeed(studentCourseHomeworkService.findStudentCourseHomeworkByCourse(courseScheduleId,userName));
+    }
+
+    @ApiOperation(value = "获取学生作业界面详细信息")
+    @GetMapping(value = "/findCourseHomeworkStudentDetail")
+    public Object findCourseHomeworkStudentDetail(Long courseScheduleID,Long userId){
+        CourseHomeworkStudentDetailDto courseHomeworkStudentDetail = studentCourseHomeworkService.findCourseHomeworkStudentDetail(courseScheduleID, userId);
+        if(Objects.nonNull(courseHomeworkStudentDetail)){
+            StudentCourseHomework studentCourseHomework=new StudentCourseHomework();
+            studentCourseHomework.setId(courseHomeworkStudentDetail.getCourseHomeworkId());
+            studentCourseHomework.setIsView(YesOrNoEnum.YES);
+            studentCourseHomeworkService.update(studentCourseHomework);
+        }
+        return succeed(courseHomeworkStudentDetail);
+    }
+
+}

+ 11 - 6
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java

@@ -2,8 +2,10 @@ package com.ym.mec.teacher.controller;
 
 import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
 import com.ym.mec.biz.dal.entity.StudentAttendance;
-import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
+import com.ym.mec.biz.service.ClassGroupService;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
+import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.biz.service.TeacherAttendanceService;
 import com.ym.mec.common.controller.BaseController;
@@ -25,6 +27,9 @@ public class TeacherAttendanceController extends BaseController {
     @Autowired
     private StudentAttendanceService studentAttendanceService;
 
+    @Autowired
+    private ClassGroupService classGroupService;
+
     @ApiOperation(value = "新增教师签到")
     @PostMapping("/add")
     public Object add(@RequestBody TeacherSignOutDto teacherSignOutDto) {
@@ -37,16 +42,16 @@ public class TeacherAttendanceController extends BaseController {
         return succeed(teacherAttendanceService.queryPage(queryInfo));
     }
 
-    @ApiOperation(value = "查询教师签到记录")
+    @ApiOperation(value = "查询教师签到(上课)记录")
     @GetMapping("/getTeacherPersonalAttendances")
-    public Object getTeacherPersonalAttendances(TeacherAttendanceQueryInfo queryInfo){
-        return teacherAttendanceService.getTeacherPersonalAttendances(queryInfo);
+    public Object getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo){
+        return succeed(teacherAttendanceService.getTeacherPersonalAttendances(queryInfo));
     }
 
     @ApiOperation(value = "根据班级ID获取当前课程的学生")
     @GetMapping("/getCurrentCourseStudents")
-    public Object getCurrentCourseStudents(@RequestBody StudentAttendanceQueryInfo queryInfo){
-        return succeed(studentAttendanceService.getCurrentCourseStudents(queryInfo));
+    public Object getCurrentCourseStudents(Long courseScheduleId){
+        return succeed(classGroupService.findAttendanceStudentByCourse(courseScheduleId));
     }
 
     @ApiOperation(value = "点名")

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

@@ -3,7 +3,6 @@ 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.Teacher;
-import com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherQueryInfo;
 import com.ym.mec.biz.dal.page.VipClassQueryInfo;
@@ -113,4 +112,10 @@ public class TeacherController extends BaseController {
     public Object queryCloses(TeacherCloseQueryInfo queryInfo){
         return succeed(teacherService.queryCloses(queryInfo));
     }
+
+    @ApiOperation(value = "获取教师上课课酬未结算总额")
+    @GetMapping("/sumTeacherNoPay")
+    public Object findTeacherNoPay(Integer teacherId){
+        return succeed(teacherService.findTeacherNoPay(teacherId));
+    }
 }

+ 16 - 10
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseHomeworkReplyController.java

@@ -1,20 +1,19 @@
 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.StudentCourseHomeworkReply;
+import com.ym.mec.biz.dal.page.StudentCourseHomeworkReplyQueryInfo;
+import com.ym.mec.biz.service.StudentCourseHomeworkReplyService;
+import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
 
-import com.ym.mec.biz.dal.entity.StudentCourseHomeworkReply;
-import com.ym.mec.biz.dal.page.StudentCourseHomeworkReplyQueryInfo;
-import com.ym.mec.biz.service.StudentCourseHomeworkReplyService;
-import com.ym.mec.common.controller.BaseController;
+import java.util.Objects;
 
 /**
  * @Author Joburgess
@@ -27,10 +26,17 @@ public class TeacherCourseHomeworkReplyController extends BaseController {
 
     @Autowired
     private StudentCourseHomeworkReplyService studentCourseHomeworkReplyService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "新增回复")
     @PostMapping("/add")
     public Object add(StudentCourseHomeworkReply studentCourseHomeworkReply) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if(Objects.isNull(user)){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+        studentCourseHomeworkReply.setUserId(user.getId());
         studentCourseHomeworkReplyService.insert(studentCourseHomeworkReply);
         return succeed();
     }

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

@@ -69,7 +69,7 @@ public class TeacherCourseScheduleController extends BaseController {
         return succeed(scheduleService.queryTeacherClassCourseSchedule(queryInfo));
     }
 
-    @ApiOperation(value = "根据班级ID获取当前课程的学生列表")
+    @ApiOperation(value = "根据课程获取当前课程的学生列表")
     @GetMapping("/getCurrentCourseStudents")
     public Object getCurrentCourseStudents(StudentAttendanceQueryInfo queryInfo){
         if(Objects.isNull(queryInfo.getClassGroupId())){

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

@@ -149,7 +149,7 @@ public class CourseScheduleController extends BaseController {
     @ApiOperation(value = "检测乐团下所有的班级是否都已排课")
     @PostMapping(value = "/checkMusicGroupClassCourse")
     @PreAuthorize("@pcs.hasPermissions('courseSchedule/checkMusicGroupClassCourse')")
-    public Object checkMusicGroupClassCourse(Long musicGroupId){
+    public Object checkMusicGroupClassCourse(String musicGroupId){
         scheduleService.checkMusicGroupClassCourse(musicGroupId);
         return succeed();
     }

+ 12 - 13
mec-web/src/main/java/com/ym/mec/web/controller/SchoolController.java

@@ -1,24 +1,17 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.entity.School;
+import com.ym.mec.biz.dal.page.SchoolQueryInfo;
+import com.ym.mec.biz.service.SchoolService;
+import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-
-import java.util.Date;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
-import com.ym.mec.biz.dal.entity.School;
-import com.ym.mec.biz.dal.page.SchoolQueryInfo;
-import com.ym.mec.biz.service.SchoolService;
-import com.ym.mec.common.controller.BaseController;
+import java.util.Date;
 
 @RequestMapping("school")
 @Api(tags = "学校(教学点)服务")
@@ -73,4 +66,10 @@ public class SchoolController extends BaseController {
     public Object queryByOrganId(@RequestParam Integer organId){
         return succeed(schoolService.queryByOrganId(organId,null));
     }
+
+    @ApiOperation(value = "获取教师vip课教学点")
+    @GetMapping("/findVipSchoolByTeacher")
+    public Object findVipSchoolByTeacher(@ApiParam(value = "教师编号", required = true) Integer userId){
+        return succeed(schoolService.get(userId));
+    }
 }

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -1,5 +1,7 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
+import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -77,4 +79,11 @@ public class StudentManageController extends BaseController {
         return succeed(studentManageService.getStudentAccountBaseInfo(userId));
     }
 
+    @ApiOperation(value = "获取学员扣费记录列表")
+    @GetMapping("/queryStudentPayment")
+    @PreAuthorize("@pcs.hasPermissions('studentManage/queryStudentPayment')")
+    public Object queryStudentPayment(TeacherPaymentRecordInfo queryInfo){
+        return succeed(studentManageService.queryStudentPayment(queryInfo));
+    }
+
 }

+ 29 - 0
mec-web/src/main/java/com/ym/mec/web/controller/student/StudentPaymentOrderController.java

@@ -0,0 +1,29 @@
+package com.ym.mec.web.controller.student;
+
+import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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;
+
+@RequestMapping("studentPaymentOrder")
+@Api(tags = "学生缴费订单服务")
+@RestController
+public class StudentPaymentOrderController extends BaseController {
+
+    @Autowired
+    private StudentPaymentOrderService studentPaymentOrderService;
+
+    @ApiOperation(value = "获取学员订单列表")
+    @GetMapping("/queryOrderPage")
+    public Object queryOrderPage(StudentPaymentOrderQueryInfo queryInfo){
+        studentPaymentOrderService.queryOrderPage(queryInfo);
+        return succeed();
+    }
+
+}

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

@@ -1,5 +1,6 @@
 package com.ym.mec.web.controller.teacher;
 
+import com.ym.mec.biz.dal.page.TeacherMusicGroupSalaryQueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
@@ -34,7 +35,7 @@ public class TeacherDefaultMusicGroupSalaryController extends BaseController {
 
     @ApiOperation(value = "分页查询教师薪酬")
     @GetMapping("/queryPage")
-    public Object queryPage(QueryInfo queryInfo) {
+    public Object queryPage(TeacherMusicGroupSalaryQueryInfo queryInfo) {
         return succeed(teacherDefaultMusicGroupSalaryService.queryPage(queryInfo));
     }
 }

+ 3 - 9
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherLeaveRecordController.java

@@ -1,22 +1,17 @@
 package com.ym.mec.web.controller.teacher;
 
 import com.ym.mec.biz.dal.dto.TeacherLeaveRecordDto;
+import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
+import com.ym.mec.biz.service.TeacherLeaveRecordService;
+import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
-import com.ym.mec.biz.service.TeacherLeaveRecordService;
-import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.page.QueryInfo;
-
 @RequestMapping("teacherLeaveRecord")
 @Api(tags = "教师请假记录服务")
 @RestController
@@ -37,5 +32,4 @@ public class TeacherLeaveRecordController extends BaseController {
     public Object queryPage(TeacherLeaveRecordDto queryInfo){
         return succeed(teacherLeaveRecordService.queryPage(queryInfo));
     }
-
 }