Explorar el Código

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

zouxuan hace 5 años
padre
commit
0e410262f0
Se han modificado 78 ficheros con 1393 adiciones y 487 borrados
  1. 6 0
      mec-biz/pom.xml
  2. 1 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  3. 0 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupTeacherMapperDao.java
  4. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupStudentFeeDao.java
  5. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentAttendanceDao.java
  6. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupTeachersDto.java
  7. 0 13
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleDto.java
  8. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/HighClassGroupDto.java
  9. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicCardDto.java
  10. 40 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupRegRespDto.java
  11. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupSubjectGoodsAndInfoDto.java
  12. 5 5
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentVipGroupShowListDto.java
  13. 85 50
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseSchedule.java
  14. 283 230
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java
  15. 11 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultMusicGroupSalary.java
  16. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroup.java
  17. 8 6
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentDemoGroupQueryInfo.java
  18. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  19. 0 4
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupTeacherMapperService.java
  20. 10 4
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupSubjectPlanService.java
  21. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java
  22. 8 8
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  23. 0 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupTeacherMapperServiceImpl.java
  24. 22 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java
  25. 25 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java
  26. 35 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  27. 1 1
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  28. 10 5
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  29. 5 2
      mec-biz/src/main/resources/config/mybatis/DemoGroupMapper.xml
  30. 2 1
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  31. 10 0
      mec-biz/src/main/resources/config/mybatis/MusicGroupStudentFeeMapper.xml
  32. 15 1
      mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml
  33. 6 6
      mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml
  34. 6 2
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  35. 14 0
      mec-education/src/main/java/com/ym/mec/education/base/BaseResponse.java
  36. 1 1
      mec-education/src/main/java/com/ym/mec/education/controller/CourseScheduleController.java
  37. 21 2
      mec-education/src/main/java/com/ym/mec/education/controller/HomeWorkController.java
  38. 2 2
      mec-education/src/main/java/com/ym/mec/education/controller/StudentAttendanceController.java
  39. 56 0
      mec-education/src/main/java/com/ym/mec/education/controller/TeacherController.java
  40. 124 0
      mec-education/src/main/java/com/ym/mec/education/entity/MusicGroupQuit.java
  41. 49 8
      mec-education/src/main/java/com/ym/mec/education/entity/MusicGroupStudentFee.java
  42. 7 7
      mec-education/src/main/java/com/ym/mec/education/entity/VipGroup.java
  43. 13 0
      mec-education/src/main/java/com/ym/mec/education/mapper/MusicGroupQuitMapper.java
  44. 1 2
      mec-education/src/main/java/com/ym/mec/education/mapper/MusicGroupStudentFeeMapper.java
  45. 1 1
      mec-education/src/main/java/com/ym/mec/education/mapper/StudentCourseHomeworkReplyMapper.java
  46. 4 1
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupStudentFeeMapper.xml
  47. 21 0
      mec-education/src/main/java/com/ym/mec/education/req/HomeWorkDetailReq.java
  48. 4 0
      mec-education/src/main/java/com/ym/mec/education/req/HomeWorkReq.java
  49. 17 0
      mec-education/src/main/java/com/ym/mec/education/req/TeacherReq.java
  50. 1 4
      mec-education/src/main/java/com/ym/mec/education/resp/CourseScheduleResp.java
  51. 45 0
      mec-education/src/main/java/com/ym/mec/education/resp/HomeWrokDetailResp.java
  52. 1 0
      mec-education/src/main/java/com/ym/mec/education/resp/HomeWrokResp.java
  53. 43 0
      mec-education/src/main/java/com/ym/mec/education/resp/HomeworkReplyResp.java
  54. 1 1
      mec-education/src/main/java/com/ym/mec/education/resp/StudentAttendanceStatisticsResp.java
  55. 1 1
      mec-education/src/main/java/com/ym/mec/education/resp/StudentListResp.java
  56. 24 0
      mec-education/src/main/java/com/ym/mec/education/resp/TeacherResp.java
  57. 14 0
      mec-education/src/main/java/com/ym/mec/education/service/IMusicGroupQuitService.java
  58. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/IMusicGroupStudentFeeService.java
  59. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/IStudentCourseHomeworkReplyService.java
  60. 4 0
      mec-education/src/main/java/com/ym/mec/education/service/IStudentCourseHomeworkService.java
  61. 3 0
      mec-education/src/main/java/com/ym/mec/education/service/ITeacherService.java
  62. 19 12
      mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java
  63. 8 2
      mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java
  64. 18 0
      mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupQuitServiceImpl.java
  65. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupStudentFeeServiceImpl.java
  66. 15 2
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java
  67. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkReplyServiceImpl.java
  68. 59 4
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java
  69. 64 0
      mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherServiceImpl.java
  70. 3 5
      mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java
  71. 1 1
      mec-student/pom.xml
  72. 36 17
      mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java
  73. 1 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java
  74. 1 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseHomeworkReplyController.java
  75. 17 4
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java
  76. 1 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherVipGroupController.java
  77. 4 4
      mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java
  78. 24 25
      mec-web/src/test/java/com/ym/webApplicationTest.java

+ 6 - 0
mec-biz/pom.xml

@@ -34,5 +34,11 @@
 			<groupId>com.ym</groupId>
 			<groupId>com.ym</groupId>
 			<artifactId>mec-thirdparty</artifactId>
 			<artifactId>mec-thirdparty</artifactId>
 		</dependency>
 		</dependency>
+        <dependency>
+            <groupId>com.ym</groupId>
+            <artifactId>mec-auth-server</artifactId>
+            <version>1.0</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
     </dependencies>
 </project>
 </project>

+ 1 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -7,7 +7,6 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImUserModel;
 import com.ym.mec.common.entity.ImUserModel;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
-import org.springframework.security.core.parameters.P;
 
 
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
@@ -91,7 +90,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param musicGroupId
      * @param musicGroupId
      * @return
      * @return
      */
      */
-    List<ClassGroupTeachers> findClassGroupByMusicGroupId(@Param("musicGroupId") Integer musicGroupId);
+    List<ClassGroupTeachersDto> findClassGroupByMusicGroupId(@Param("musicGroupId") Integer musicGroupId);
 
 
     /**
     /**
      * 获取学生所购买课程列表
      * 获取学生所购买课程列表

+ 0 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupTeacherMapperDao.java

@@ -1,7 +1,5 @@
 package com.ym.mec.biz.dal.dao;
 package com.ym.mec.biz.dal.dao;
 
 
-import com.ym.mec.biz.dal.dto.ClassGroupTeachers;
-import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.dal.BaseDAO;
 
 

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

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

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentAttendanceDao.java

@@ -36,6 +36,13 @@ public interface StudentAttendanceDao extends BaseDAO<Long, StudentAttendance> {
 
 
     /**
     /**
      * @Author: Joburgess
      * @Author: Joburgess
+     * @Date: 2019/9/29
+     * 获取对应学生最后一次的签到记录
+     */
+    StudentAttendance getStudentLatestAttendanceInfo(StudentAttendance studentAttendance);
+
+    /**
+     * @Author: Joburgess
      * @Date: 2019/9/16
      * @Date: 2019/9/16
      * 获取学生个人上课签到记录
      * 获取学生个人上课签到记录
      */
      */

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupTeachers.java → mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ClassGroupTeachersDto.java

@@ -9,7 +9,7 @@ import java.util.List;
 /**
 /**
  * 班级老师
  * 班级老师
  */
  */
-public class ClassGroupTeachers extends ClassGroup {
+public class ClassGroupTeachersDto extends ClassGroup {
 
 
 	/** 班级老师 **/
 	/** 班级老师 **/
 	private List<ClassGroupTeacherMapper> classGroupTeacherMapperList;
 	private List<ClassGroupTeacherMapper> classGroupTeacherMapperList;

+ 0 - 13
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CourseScheduleDto.java

@@ -1,7 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 package com.ym.mec.biz.dal.dto;
 
 
 import com.ym.mec.biz.dal.entity.CourseSchedule;
 import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
@@ -50,10 +49,6 @@ public class CourseScheduleDto extends CourseSchedule {
         this.attendanceStatus = attendanceStatus;
         this.attendanceStatus = attendanceStatus;
     }
     }
 
 
-    /** 班级类型(普通班级、合奏班级) */
-    @ApiModelProperty(value = "班级类型(普通班级、合奏班级、提高课班级、VIP班级)",required = false)
-    private ClassGroupTypeEnum type;
-
     public String getTeacherName() {
     public String getTeacherName() {
         return teacherName;
         return teacherName;
     }
     }
@@ -69,12 +64,4 @@ public class CourseScheduleDto extends CourseSchedule {
     public void setClassGroupName(String classGroupName) {
     public void setClassGroupName(String classGroupName) {
         this.classGroupName = classGroupName;
         this.classGroupName = classGroupName;
     }
     }
-
-    public ClassGroupTypeEnum getType() {
-        return type;
-    }
-
-    public void setType(ClassGroupTypeEnum type) {
-        this.type = type;
-    }
 }
 }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/HighClassGroup.java → mec-biz/src/main/java/com/ym/mec/biz/dal/dto/HighClassGroupDto.java

@@ -9,9 +9,9 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroup;
 
 
 /**
 /**
- * 提
+ * 提
  */
  */
-public class HighClassGroup extends ClassGroup {
+public class HighClassGroupDto extends ClassGroup {
 
 
 	@ApiModelProperty(value = "教师user_id",required = true)
 	@ApiModelProperty(value = "教师user_id",required = true)
 	private Integer userId;
 	private Integer userId;

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

@@ -4,6 +4,8 @@ import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
 public class MusicCardDto {
 public class MusicCardDto {
+    @ApiModelProperty(value = "报名id",required = true)
+    private String registerId;
 
 
     @ApiModelProperty(value = "用户姓名",required = true)
     @ApiModelProperty(value = "用户姓名",required = true)
     private String userName;
     private String userName;
@@ -103,4 +105,12 @@ public class MusicCardDto {
     public void setPaymentStatus(YesOrNoEnum paymentStatus) {
     public void setPaymentStatus(YesOrNoEnum paymentStatus) {
         this.paymentStatus = paymentStatus;
         this.paymentStatus = paymentStatus;
     }
     }
+
+    public String getRegisterId() {
+        return registerId;
+    }
+
+    public void setRegisterId(String registerId) {
+        this.registerId = registerId;
+    }
 }
 }

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

@@ -0,0 +1,40 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.entity.Subject;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import java.util.List;
+
+/**
+ * 乐团报名,乐团基本信息
+ */
+public class MusicGroupRegRespDto {
+
+    //乐团名称
+    private String musicGroupName;
+
+    //乐团声部信息
+    private List<Subject> subjectList;
+
+
+    public String getMusicGroupName() {
+        return musicGroupName;
+    }
+
+    public void setMusicGroupName(String musicGroupName) {
+        this.musicGroupName = musicGroupName;
+    }
+
+    public List<Subject> getSubjectList() {
+        return subjectList;
+    }
+
+    public void setSubjectList(List<Subject> subjectList) {
+        this.subjectList = subjectList;
+    }
+
+    @Override
+    public String toString() {
+        return ToStringBuilder.reflectionToString(this);
+    }
+}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupSubjectGoodsAndInfo.java → mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupSubjectGoodsAndInfoDto.java

@@ -9,7 +9,7 @@ import java.util.Map;
 /**
 /**
  * 乐团报名缴费相关信息
  * 乐团报名缴费相关信息
  */
  */
-public class MusicGroupSubjectGoodsAndInfo {
+public class MusicGroupSubjectGoodsAndInfoDto {
 
 
     //课程信息
     //课程信息
     private Map CourseScheduleInfo;
     private Map CourseScheduleInfo;

+ 5 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentVipGroupShowListDto.java

@@ -30,7 +30,7 @@ public class StudentVipGroupShowListDto {
     private Integer offlineClassesNum;
     private Integer offlineClassesNum;
 
 
     @ApiModelProperty(value = "学生购买价格",required = false)
     @ApiModelProperty(value = "学生购买价格",required = false)
-    private BigDecimal price;
+    private BigDecimal unitPrice;
 
 
     @ApiModelProperty(value = "预计招生人数",hidden = true)
     @ApiModelProperty(value = "预计招生人数",hidden = true)
     private Integer expectStudentNum;
     private Integer expectStudentNum;
@@ -111,12 +111,12 @@ public class StudentVipGroupShowListDto {
         this.offlineClassesNum = offlineClassesNum;
         this.offlineClassesNum = offlineClassesNum;
     }
     }
 
 
-    public BigDecimal getPrice() {
-        return price;
+    public BigDecimal getUnitPrice() {
+        return unitPrice;
     }
     }
 
 
-    public void setPrice(BigDecimal price) {
-        this.price = price;
+    public void setUnitPrice(BigDecimal unitPrice) {
+        this.unitPrice = unitPrice;
     }
     }
 
 
     public Integer getExpectStudentNum() {
     public Integer getExpectStudentNum() {

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

@@ -1,77 +1,104 @@
 package com.ym.mec.biz.dal.entity;
 package com.ym.mec.biz.dal.entity;
 
 
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.ym.mec.biz.dal.enums.CourseStatusEnum;
-import com.ym.mec.biz.dal.enums.TeachModeEnum;
-
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.ym.mec.biz.dal.enums.CourseStatusEnum;
+import com.ym.mec.biz.dal.enums.TeachModeEnum;
+import com.ym.mec.common.enums.BaseEnum;
+
 /**
 /**
  * 对应数据库表(course_schedule):
  * 对应数据库表(course_schedule):
  */
  */
 @JsonInclude(JsonInclude.Include.NON_NULL)
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class CourseSchedule {
 public class CourseSchedule {
 
 
+	public enum CourseScheduleType implements BaseEnum<String, CourseScheduleType> {
+
+		SINGLE("SINGLE", "单技课"), MIX("MIX", "合奏课"), HIGH("HIGH", "小班课"), VIP("VIP", "vip课"), DEMO("demo", "试听课"), COMPREHENSIVE("comprehensive", "综合课"), PRACTICE(
+				"PRACTICE", "练习课"), ENLIGHTENMENT("ENLIGHTENMENT", "启蒙课"), TRAINING("TRAINING", "集训课");
+
+		private String code;
+
+		private String msg;
+
+		CourseScheduleType(String code, String msg) {
+			this.code = code;
+			this.msg = msg;
+		}
+
+		@Override
+		public String getCode() {
+			return code;
+		}
+
+		public String getMsg() {
+			return msg;
+		}
+	}
+
 	/**  */
 	/**  */
 	private Long id;
 	private Long id;
-	
+
 	/** 班级编号 */
 	/** 班级编号 */
-	@ApiModelProperty(value = "班级编号",required = false)
+	@ApiModelProperty(value = "班级编号", required = false)
 	private Integer classGroupId;
 	private Integer classGroupId;
-	
+
 	/** 课程状态 */
 	/** 课程状态 */
-	@ApiModelProperty(value = "课程状态  NOT_START未开始,SIGN_IN已签到,SIGN_OUT已签退",required = false)
+	@ApiModelProperty(value = "课程状态  NOT_START未开始,SIGN_IN已签到,SIGN_OUT已签退", required = false)
 	private CourseStatusEnum status;
 	private CourseStatusEnum status;
-	
+
 	/** 补贴 */
 	/** 补贴 */
-	@ApiModelProperty(value = "补贴",required = false)
+	@ApiModelProperty(value = "补贴", required = false)
 	private long subsidy;
 	private long subsidy;
-	
+
 	/** 上课日期 */
 	/** 上课日期 */
-	@ApiModelProperty(value = "上课日期",required = false)
+	@ApiModelProperty(value = "上课日期", required = false)
 	private java.util.Date classDate;
 	private java.util.Date classDate;
-	
+
 	/** 上课时间 */
 	/** 上课时间 */
-	@ApiModelProperty(value = "上课时间",required = false)
+	@ApiModelProperty(value = "上课时间", required = false)
 	private java.util.Date startClassTime;
 	private java.util.Date startClassTime;
-	
+
 	/** 结束时间 */
 	/** 结束时间 */
-	@ApiModelProperty(value = "结束时间",required = false)
+	@ApiModelProperty(value = "结束时间", required = false)
 	private java.util.Date endClassTime;
 	private java.util.Date endClassTime;
-	
+
 	/** 上课教师 */
 	/** 上课教师 */
-	@ApiModelProperty(value = "上课教师",required = false)
+	@ApiModelProperty(value = "上课教师", required = false)
 	private Long teacherId;
 	private Long teacherId;
-	
+
 	/** 实际上课教师 */
 	/** 实际上课教师 */
-	@ApiModelProperty(value = "实际上课教师",required = false)
+	@ApiModelProperty(value = "实际上课教师", required = false)
 	private Long actualTeacherId;
 	private Long actualTeacherId;
-	
+
 	/**  */
 	/**  */
 	private java.util.Date createTime;
 	private java.util.Date createTime;
-	
+
 	/**  */
 	/**  */
 	private java.util.Date updateTime;
 	private java.util.Date updateTime;
 
 
 	private TeachModeEnum teachMode;
 	private TeachModeEnum teachMode;
 
 
 	private boolean complaintStatus;
 	private boolean complaintStatus;
+	
+	private CourseScheduleType type;
 
 
 	public void setId(Long id) {
 	public void setId(Long id) {
 		this.id = id;
 		this.id = id;
 	}
 	}
-	
-	public Long getId(){
+
+	public Long getId() {
 		return this.id;
 		return this.id;
 	}
 	}
-			
-	public void setClassGroupId(Integer classGroupId){
+
+	public void setClassGroupId(Integer classGroupId) {
 		this.classGroupId = classGroupId;
 		this.classGroupId = classGroupId;
 	}
 	}
-	
-	public Integer getClassGroupId(){
+
+	public Integer getClassGroupId() {
 		return this.classGroupId;
 		return this.classGroupId;
 	}
 	}
 
 
@@ -83,35 +110,35 @@ public class CourseSchedule {
 		this.status = status;
 		this.status = status;
 	}
 	}
 
 
-	public void setSubsidy(long subsidy){
+	public void setSubsidy(long subsidy) {
 		this.subsidy = subsidy;
 		this.subsidy = subsidy;
 	}
 	}
-	
-	public long getSubsidy(){
+
+	public long getSubsidy() {
 		return this.subsidy;
 		return this.subsidy;
 	}
 	}
-			
-	public void setClassDate(java.util.Date classDate){
+
+	public void setClassDate(java.util.Date classDate) {
 		this.classDate = classDate;
 		this.classDate = classDate;
 	}
 	}
-	
-	public java.util.Date getClassDate(){
+
+	public java.util.Date getClassDate() {
 		return this.classDate;
 		return this.classDate;
 	}
 	}
-			
-	public void setStartClassTime(java.util.Date startClassTime){
+
+	public void setStartClassTime(java.util.Date startClassTime) {
 		this.startClassTime = startClassTime;
 		this.startClassTime = startClassTime;
 	}
 	}
-	
-	public java.util.Date getStartClassTime(){
+
+	public java.util.Date getStartClassTime() {
 		return this.startClassTime;
 		return this.startClassTime;
 	}
 	}
-			
-	public void setEndClassTime(java.util.Date endClassTime){
+
+	public void setEndClassTime(java.util.Date endClassTime) {
 		this.endClassTime = endClassTime;
 		this.endClassTime = endClassTime;
 	}
 	}
-	
-	public java.util.Date getEndClassTime(){
+
+	public java.util.Date getEndClassTime() {
 		return this.endClassTime;
 		return this.endClassTime;
 	}
 	}
 
 
@@ -131,19 +158,19 @@ public class CourseSchedule {
 		this.actualTeacherId = actualTeacherId;
 		this.actualTeacherId = actualTeacherId;
 	}
 	}
 
 
-	public void setCreateTime(java.util.Date createTime){
+	public void setCreateTime(java.util.Date createTime) {
 		this.createTime = createTime;
 		this.createTime = createTime;
 	}
 	}
-	
-	public java.util.Date getCreateTime(){
+
+	public java.util.Date getCreateTime() {
 		return this.createTime;
 		return this.createTime;
 	}
 	}
-			
-	public void setUpdateTime(java.util.Date updateTime){
+
+	public void setUpdateTime(java.util.Date updateTime) {
 		this.updateTime = updateTime;
 		this.updateTime = updateTime;
 	}
 	}
-	
-	public java.util.Date getUpdateTime(){
+
+	public java.util.Date getUpdateTime() {
 		return this.updateTime;
 		return this.updateTime;
 	}
 	}
 
 
@@ -163,6 +190,14 @@ public class CourseSchedule {
 		this.complaintStatus = complaintStatus;
 		this.complaintStatus = complaintStatus;
 	}
 	}
 
 
+	public CourseScheduleType getType() {
+		return type;
+	}
+
+	public void setType(CourseScheduleType type) {
+		this.type = type;
+	}
+
 	@Override
 	@Override
 	public String toString() {
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);
 		return ToStringBuilder.reflectionToString(this);

+ 283 - 230
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java

@@ -12,262 +12,315 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
  */
  */
 public class StudentRegistration {
 public class StudentRegistration {
 
 
-	/**  */
-	private Long id;
+    /**
+     *
+     */
+    @ApiModelProperty(value = "报名id", hidden = true)
+    private Long id;
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "机构id", hidden = true)
+    private Integer organId;
+    /**
+     *
+     */
+    @ApiModelProperty(value = "学生编号", hidden = true)
+    private Integer userId;
+
+    @ApiModelProperty(value = "学生姓名", required = true)
+    private String name;
+
+    @ApiModelProperty(value = "性别(0,女  1,男", required = true)
+    private Integer gender;
+
+    @ApiModelProperty(value = "身份证号", required = true)
+    private String idCardNo;
+
+    /**
+     * 所属乐团(对应 music_group 表id)
+     */
+    @ApiModelProperty(value = "所属乐团(对应 music_group 表id)", required = true)
+    private Integer musicGroupId;
+
+    /**
+     * 当前所在年级
+     */
+    @ApiModelProperty(value = "当前所在年级", required = true)
+    private String currentGrade;
+
+    /**
+     * 当前所在班级
+     */
+    @ApiModelProperty(value = "当前所在班级", required = true)
+    private String currentClass;
+
+    /**
+     * 报名科目
+     */
+    @ApiModelProperty(value = "报名科目", required = true)
+    private Integer subjectId;
+
+    /**
+     * 报名科目
+     */
+    @ApiModelProperty(value = "实际科目", hidden = true)
+    private Integer actualSubjectId;
+
+    /**
+     * 是否允许调剂
+     */
+    @ApiModelProperty(value = "是否允许调剂", required = true)
+    private YesOrNoEnum isAllowAdjust;
+
+    /**
+     * 器材购买方式(团购、自备)
+     */
+    @ApiModelProperty(value = "器材购买方式(GROUP:团购,OWNED:自备)", required = true)
+    private KitPurchaseMethodEnum kitPurchaseMethod;
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "备注", hidden = false)
+    private String remark;
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "添加时间", hidden = true)
+    private java.util.Date createTime;
+
+    /**
+     *
+     */
+    @ApiModelProperty(value = "更新时间", hidden = true)
+    private java.util.Date updateTime;
+
+    /**
+     * 家长姓名
+     */
+    @ApiModelProperty(value = "家长姓名", required = true)
+    private String parentsName;
+
+    /**
+     * 家长姓名
+     */
+    @ApiModelProperty(value = "家长电话", required = true)
+    private String parentsPhone;
+
+    /**
+     * 家长单位
+     */
+    @ApiModelProperty(value = "家长单位", required = false)
+    private String parentsCompany;
+
+    /**
+     * 缴费状态(1-已缴费 0-未交费)
+     */
+    @ApiModelProperty(value = "缴费状态(1-已缴费 0-未交费)", hidden = true)
+    private YesOrNoEnum paymentStatus;
+
+    @ApiModelProperty(value = "班级id", hidden = true)
+    private Integer ClassGroupId;
+
+    /**
+     * 最后缴费日期
+     */
+    @ApiModelProperty(value = "最后缴费日期", hidden = true)
+    private java.util.Date lastPaymentDate;
+
+    /**
+     * 预计下次缴费日期
+     */
+    @ApiModelProperty(value = "预计下次缴费日期", hidden = true)
+    private java.util.Date nextPaymentDate;
+
+    public Integer getActualSubjectId() {
+        return actualSubjectId;
+    }
+
+    public void setActualSubjectId(Integer actualSubjectId) {
+        this.actualSubjectId = actualSubjectId;
+    }
+
+    public String getParentsPhone() {
+        return parentsPhone;
+    }
+
+    public void setParentsPhone(String parentsPhone) {
+        this.parentsPhone = parentsPhone;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return this.id;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getUserId() {
+        return this.userId;
+    }
+
+    public void setMusicGroupId(Integer musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public Integer getMusicGroupId() {
+        return this.musicGroupId;
+    }
+
+    public void setCurrentGrade(String currentGrade) {
+        this.currentGrade = currentGrade;
+    }
+
+    public String getCurrentGrade() {
+        return this.currentGrade;
+    }
+
+    public void setCurrentClass(String currentClass) {
+        this.currentClass = currentClass;
+    }
+
+    public String getCurrentClass() {
+        return this.currentClass;
+    }
+
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Integer getSubjectId() {
+        return this.subjectId;
+    }
+
+    public YesOrNoEnum getIsAllowAdjust() {
+        return isAllowAdjust;
+    }
+
+    public void setIsAllowAdjust(YesOrNoEnum isAllowAdjust) {
+        this.isAllowAdjust = isAllowAdjust;
+    }
+
+    public void setPaymentStatus(YesOrNoEnum paymentStatus) {
+        this.paymentStatus = paymentStatus;
+    }
+
+    public KitPurchaseMethodEnum getKitPurchaseMethod() {
+        return kitPurchaseMethod;
+    }
+
+    public void setKitPurchaseMethod(KitPurchaseMethodEnum kitPurchaseMethod) {
+        this.kitPurchaseMethod = kitPurchaseMethod;
+    }
 
 
-	/**  */
-	@ApiModelProperty(value = "学生编号",required = false)
-	private Integer userId;
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
 
 
-	@ApiModelProperty(value = "学生姓名",required = true)
-	private String name;
+    public String getRemark() {
+        return this.remark;
+    }
 
 
-	@ApiModelProperty(value = "性别(0,女  1,男",required = true)
-	private String gender;
+    public void setCreateTime(java.util.Date createTime) {
+        this.createTime = createTime;
+    }
 
 
-	@ApiModelProperty(value = "身份证号",required = true)
-	private String idCardNo;
+    public java.util.Date getCreateTime() {
+        return this.createTime;
+    }
 
 
-	/** 所属乐团(对应 music_group 表id) */
-	@ApiModelProperty(value = "所属乐团(对应 music_group 表id)",required = false)
-	private Integer musicGroupId;
+    public void setUpdateTime(java.util.Date updateTime) {
+        this.updateTime = updateTime;
+    }
 
 
-	/** 当前所在年级 */
-	@ApiModelProperty(value = "当前所在年级",required = false)
-	private String currentGrade;
+    public java.util.Date getUpdateTime() {
+        return this.updateTime;
+    }
 
 
-	/** 当前所在班级 */
-	@ApiModelProperty(value = "当前所在班级",required = false)
-	private String currentClass;
+    public void setParentsName(String parentsName) {
+        this.parentsName = parentsName;
+    }
 
 
-	/** 报名科目 */
-	@ApiModelProperty(value = "报名科目",required = true)
-	private Integer subjectId;
+    public String getParentsName() {
+        return this.parentsName;
+    }
 
 
-	/** 报名科目 */
-	@ApiModelProperty(value = "实际科目",hidden = true)
-	private Integer actualSubjectId;
+    public void setParentsCompany(String parentsCompany) {
+        this.parentsCompany = parentsCompany;
+    }
 
 
-	/** 是否允许调剂 */
-	@ApiModelProperty(value = "是否允许调剂",required = false)
-	private YesOrNoEnum isAllowAdjust;
+    public String getParentsCompany() {
+        return this.parentsCompany;
+    }
 
 
-	/** 器材购买方式(团购、自备) */
-	@ApiModelProperty(value = "器材购买方式(团购、自备)",required = false)
-	private KitPurchaseMethodEnum kitPurchaseMethod;
+    public YesOrNoEnum getPaymentStatus() {
+        return paymentStatus;
+    }
 
 
-	/**  */
-	@ApiModelProperty(value = "备注",required = false)
-	private String remark;
+    public void setLastPaymentDate(java.util.Date lastPaymentDate) {
+        this.lastPaymentDate = lastPaymentDate;
+    }
 
 
-	/**  */
-	private java.util.Date createTime;
+    public java.util.Date getLastPaymentDate() {
+        return this.lastPaymentDate;
+    }
 
 
-	/**  */
-	private java.util.Date updateTime;
+    public void setNextPaymentDate(java.util.Date nextPaymentDate) {
+        this.nextPaymentDate = nextPaymentDate;
+    }
 
 
-	/** 家长姓名 */
-	@ApiModelProperty(value = "家长姓名",required = false)
-	private String parentsName;
+    public java.util.Date getNextPaymentDate() {
+        return this.nextPaymentDate;
+    }
 
 
-	/** 家长姓名 */
-	@ApiModelProperty(value = "家长电话",required = false)
-	private String parentsPhone;
+    public Integer getClassGroupId() {
+        return ClassGroupId;
+    }
 
 
-	/** 家长单位 */
-	@ApiModelProperty(value = "家长单位",required = false)
-	private String parentsCompany;
+    public void setClassGroupId(Integer classGroupId) {
+        ClassGroupId = classGroupId;
+    }
 
 
-	/** 缴费状态(1-已缴费 0-未交费) */
-	@ApiModelProperty(value = "缴费状态(1-已缴费 0-未交费)",required = false)
-	private YesOrNoEnum paymentStatus;
+    public String getName() {
+        return name;
+    }
 
 
-	@ApiModelProperty(value = "班级id",hidden = true)
-	private Integer ClassGroupId;
+    public void setName(String name) {
+        this.name = name;
+    }
 
 
-	/** 最后缴费日期 */
-	@ApiModelProperty(value = "最后缴费日期",required = false)
-	private java.util.Date lastPaymentDate;
+    public String getIdCardNo() {
+        return idCardNo;
+    }
 
 
-	/** 预计下次缴费日期 */
-	@ApiModelProperty(value = "预计下次缴费日期",required = false)
-	private java.util.Date nextPaymentDate;
+    public void setIdCardNo(String idCardNo) {
+        this.idCardNo = idCardNo;
+    }
 
 
-	public Integer getActualSubjectId() {
-		return actualSubjectId;
-	}
-
-	public void setActualSubjectId(Integer actualSubjectId) {
-		this.actualSubjectId = actualSubjectId;
-	}
-
-	public String getParentsPhone() {
-		return parentsPhone;
-	}
-
-	public void setParentsPhone(String parentsPhone) {
-		this.parentsPhone = parentsPhone;
-	}
-
-	public void setId(Long id){
-		this.id = id;
-	}
-
-	public Long getId(){
-		return this.id;
-	}
-
-	public void setUserId(Integer userId){
-		this.userId = userId;
-	}
-
-	public Integer getUserId(){
-		return this.userId;
-	}
-
-	public void setMusicGroupId(Integer musicGroupId){
-		this.musicGroupId = musicGroupId;
-	}
-
-	public Integer getMusicGroupId(){
-		return this.musicGroupId;
-	}
-
-	public void setCurrentGrade(String currentGrade){
-		this.currentGrade = currentGrade;
-	}
+    public Integer getGender() {
+        return gender;
+    }
 
 
-	public String getCurrentGrade(){
-		return this.currentGrade;
-	}
-
-	public void setCurrentClass(String currentClass){
-		this.currentClass = currentClass;
-	}
+    public void setGender(Integer gender) {
+        this.gender = gender;
+    }
 
 
-	public String getCurrentClass(){
-		return this.currentClass;
-	}
-
-	public void setSubjectId(Integer subjectId){
-		this.subjectId = subjectId;
-	}
 
 
-	public Integer getSubjectId(){
-		return this.subjectId;
-	}
-
-	public YesOrNoEnum getIsAllowAdjust() {
-		return isAllowAdjust;
-	}
-
-	public void setIsAllowAdjust(YesOrNoEnum isAllowAdjust) {
-		this.isAllowAdjust = isAllowAdjust;
-	}
-
-	public void setPaymentStatus(YesOrNoEnum paymentStatus) {
-		this.paymentStatus = paymentStatus;
-	}
-
-	public KitPurchaseMethodEnum getKitPurchaseMethod() {
-		return kitPurchaseMethod;
-	}
-
-	public void setKitPurchaseMethod(KitPurchaseMethodEnum kitPurchaseMethod) {
-		this.kitPurchaseMethod = kitPurchaseMethod;
-	}
-
-	public void setRemark(String remark){
-		this.remark = remark;
-	}
-
-	public String getRemark(){
-		return this.remark;
-	}
+    public Integer getOrganId() {
+        return organId;
+    }
 
 
-	public void setCreateTime(java.util.Date createTime){
-		this.createTime = createTime;
-	}
-
-	public java.util.Date getCreateTime(){
-		return this.createTime;
-	}
-
-	public void setUpdateTime(java.util.Date updateTime){
-		this.updateTime = updateTime;
-	}
-
-	public java.util.Date getUpdateTime(){
-		return this.updateTime;
-	}
-
-	public void setParentsName(String parentsName){
-		this.parentsName = parentsName;
-	}
-
-	public String getParentsName(){
-		return this.parentsName;
-	}
-
-	public void setParentsCompany(String parentsCompany){
-		this.parentsCompany = parentsCompany;
-	}
-
-	public String getParentsCompany(){
-		return this.parentsCompany;
-	}
-
-	public YesOrNoEnum getPaymentStatus() {
-		return paymentStatus;
-	}
-
-	public void setLastPaymentDate(java.util.Date lastPaymentDate){
-		this.lastPaymentDate = lastPaymentDate;
-	}
-
-	public java.util.Date getLastPaymentDate(){
-		return this.lastPaymentDate;
-	}
-
-	public void setNextPaymentDate(java.util.Date nextPaymentDate){
-		this.nextPaymentDate = nextPaymentDate;
-	}
-
-	public java.util.Date getNextPaymentDate(){
-		return this.nextPaymentDate;
-	}
-
-	public Integer getClassGroupId() {
-		return ClassGroupId;
-	}
-
-	public void setClassGroupId(Integer classGroupId) {
-		ClassGroupId = classGroupId;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getIdCardNo() {
-		return idCardNo;
-	}
-
-	public void setIdCardNo(String idCardNo) {
-		this.idCardNo = idCardNo;
-	}
-
-	public String getGender() {
-		return gender;
-	}
-
-	public void setGender(String gender) {
-		this.gender = gender;
-	}
+    public void setOrganId(Integer organId) {
+        this.organId = organId;
+    }
 
 
 	@Override
 	@Override
 	public String toString() {
 	public String toString() {

+ 11 - 11
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultMusicGroupSalary.java

@@ -1,13 +1,13 @@
 package com.ym.mec.biz.dal.entity;
 package com.ym.mec.biz.dal.entity;
 
 
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
-
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
+import java.math.BigDecimal;
+
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 
-import java.math.BigDecimal;
+import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 
 
 /**
 /**
  * 对应数据库表(teacher_default_music_group_salary):
  * 对应数据库表(teacher_default_music_group_salary):
@@ -21,9 +21,9 @@ public class TeacherDefaultMusicGroupSalary {
 	@ApiModelProperty(value = "教师编号",required = false)
 	@ApiModelProperty(value = "教师编号",required = false)
 	private Integer userId;
 	private Integer userId;
 	
 	
-	/** 班级类型(参照 class_group表的type_字段) */
-	@ApiModelProperty(value = "班级类型",required = false)
-	private ClassGroupTypeEnum classGroupType;
+	/** 班级类型(参照 course_schedule表的type_字段) */
+	@ApiModelProperty(value = "课程类型",required = false)
+	private CourseScheduleType courseScheduleType;
 	
 	
 	/**  */
 	/**  */
 	@ApiModelProperty(value = "专业技能",required = false)
 	@ApiModelProperty(value = "专业技能",required = false)
@@ -70,12 +70,12 @@ public class TeacherDefaultMusicGroupSalary {
 		return this.userId;
 		return this.userId;
 	}
 	}
 
 
-	public ClassGroupTypeEnum getClassGroupType() {
-		return classGroupType;
+	public CourseScheduleType getCourseScheduleType() {
+		return courseScheduleType;
 	}
 	}
 
 
-	public void setClassGroupType(ClassGroupTypeEnum classGroupType) {
-		this.classGroupType = classGroupType;
+	public void setCourseScheduleType(CourseScheduleType courseScheduleType) {
+		this.courseScheduleType = courseScheduleType;
 	}
 	}
 
 
 	public void setSubjectId(Integer subjectId){
 	public void setSubjectId(Integer subjectId){

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

@@ -65,6 +65,9 @@ public class VipGroup {
 
 
 	@ApiModelProperty(value = "课程类型ID",required = false)
 	@ApiModelProperty(value = "课程类型ID",required = false)
 	private Long vipGroupCategoryId;
 	private Long vipGroupCategoryId;
+	
+	@ApiModelProperty(value = "所属分部列表",required = false)
+	private String organIdList;
 
 
 	public AuditStatusEnum getAuditStatus() {
 	public AuditStatusEnum getAuditStatus() {
 		return auditStatus;
 		return auditStatus;
@@ -186,6 +189,14 @@ public class VipGroup {
 		this.registrationStartTime = registrationStartTime;
 		this.registrationStartTime = registrationStartTime;
 	}
 	}
 
 
+	public String getOrganIdList() {
+		return organIdList;
+	}
+
+	public void setOrganIdList(String organIdList) {
+		this.organIdList = organIdList;
+	}
+
 	@Override
 	@Override
 	public String toString() {
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);
 		return ToStringBuilder.reflectionToString(this);

+ 8 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentDemoGroupQueryInfo.java

@@ -3,6 +3,8 @@ package com.ym.mec.biz.dal.page;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
+import java.util.Date;
+
 /**
 /**
  * @Author Joburgess
  * @Author Joburgess
  * @Date 2019/9/25
  * @Date 2019/9/25
@@ -13,10 +15,10 @@ public class StudentDemoGroupQueryInfo extends QueryInfo {
     private String subjectIds;
     private String subjectIds;
 
 
     @ApiModelProperty(value = "开始时间",required = false)
     @ApiModelProperty(value = "开始时间",required = false)
-    private String startTime;
+    private Date startTime;
 
 
     @ApiModelProperty(value = "结束时间",required = false)
     @ApiModelProperty(value = "结束时间",required = false)
-    private String endTime;
+    private Date endTime;
 
 
     public String getSubjectIds() {
     public String getSubjectIds() {
         return subjectIds;
         return subjectIds;
@@ -26,19 +28,19 @@ public class StudentDemoGroupQueryInfo extends QueryInfo {
         this.subjectIds = subjectIds;
         this.subjectIds = subjectIds;
     }
     }
 
 
-    public String getStartTime() {
+    public Date getStartTime() {
         return startTime;
         return startTime;
     }
     }
 
 
-    public void setStartTime(String startTime) {
+    public void setStartTime(Date startTime) {
         this.startTime = startTime;
         this.startTime = startTime;
     }
     }
 
 
-    public String getEndTime() {
+    public Date getEndTime() {
         return endTime;
         return endTime;
     }
     }
 
 
-    public void setEndTime(String endTime) {
+    public void setEndTime(Date endTime) {
         this.endTime = endTime;
         this.endTime = endTime;
     }
     }
 }
 }

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

@@ -79,7 +79,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return
      * @return
      * @throws Exception
      * @throws Exception
      */
      */
-    List<HighClassGroup> addHighClassGroup(List<HighClassGroup> highClassGroupList) throws Exception;
+    List<HighClassGroupDto> addHighClassGroup(List<HighClassGroupDto> highClassGroupList) throws Exception;
 
 
     /**
     /**
      * 获取老师乐团课程信息列表
      * 获取老师乐团课程信息列表
@@ -104,7 +104,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @param musicGroupId
      * @return
      * @return
      */
      */
-    List<ClassGroupTeachers> getClassGroupAndTeachers(Integer musicGroupId);
+    List<ClassGroupTeachersDto> getClassGroupAndTeachers(Integer musicGroupId);
 
 
     /**
     /**
      * 获取乐团班级老师课酬
      * 获取乐团班级老师课酬
@@ -112,7 +112,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @param musicGroupId
      * @return
      * @return
      */
      */
-    List<ClassGroupTeachers> getClassGroupAndTeacherSalary(Integer musicGroupId);
+    List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(Integer musicGroupId);
 
 
 
 
     /**
     /**

+ 0 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupTeacherMapperService.java

@@ -1,12 +1,8 @@
 package com.ym.mec.biz.service;
 package com.ym.mec.biz.service;
 
 
-import com.ym.mec.biz.dal.dto.ClassGroupTeachers;
-import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.common.service.BaseService;
 import com.ym.mec.common.service.BaseService;
 
 
-import org.apache.ibatis.annotations.Param;
-
 import java.util.List;
 import java.util.List;
 
 
 public interface ClassGroupTeacherMapperService extends BaseService<Long, ClassGroupTeacherMapper> {
 public interface ClassGroupTeacherMapperService extends BaseService<Long, ClassGroupTeacherMapper> {

+ 10 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupSubjectPlanService.java

@@ -1,11 +1,10 @@
 package com.ym.mec.biz.service;
 package com.ym.mec.biz.service;
 
 
-import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfo;
+import com.ym.mec.biz.dal.dto.MusicGroupRegRespDto;
+import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
 import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
 import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
 import com.ym.mec.common.service.BaseService;
 import com.ym.mec.common.service.BaseService;
 
 
-import org.apache.ibatis.annotations.Param;
-
 import java.util.List;
 import java.util.List;
 
 
 public interface MusicGroupSubjectPlanService extends BaseService<Integer, MusicGroupSubjectPlan> {
 public interface MusicGroupSubjectPlanService extends BaseService<Integer, MusicGroupSubjectPlan> {
@@ -34,6 +33,13 @@ public interface MusicGroupSubjectPlanService extends BaseService<Integer, Music
      * @param subjectId
      * @param subjectId
      * @return
      * @return
      */
      */
-    MusicGroupSubjectGoodsAndInfo getSubjectGoodsAndInfo(Integer musicGroupId, Integer subjectId);
+    MusicGroupSubjectGoodsAndInfoDto getSubjectGoodsAndInfo(Integer musicGroupId, Integer subjectId);
+
+    /**
+     * 乐团报名基本信息
+     * @param musicGroupId
+     * @return
+     */
+    MusicGroupRegRespDto getMusicGroupRegInfo(Integer musicGroupId);
 
 
 }
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java

@@ -68,4 +68,11 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
      */
      */
     Integer updateByUserIdAndMusicGroupId(StudentRegistration studentRegistration);
     Integer updateByUserIdAndMusicGroupId(StudentRegistration studentRegistration);
 
 
+    /**
+     * 添加学生报名信息
+     * @param studentRegistration
+     * @return
+     */
+    StudentRegistration addStudent(StudentRegistration studentRegistration);
+
 }
 }

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

@@ -165,8 +165,8 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
 
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
-    public List<HighClassGroup> addHighClassGroup(List<HighClassGroup> highClassGroupList) throws Exception {
-        for (HighClassGroup highClassGroup : highClassGroupList) {
+    public List<HighClassGroupDto> addHighClassGroup(List<HighClassGroupDto> highClassGroupList) throws Exception {
+        for (HighClassGroupDto highClassGroup : highClassGroupList) {
             //1、插入班级信息
             //1、插入班级信息
             Date date;
             Date date;
             date = new Date();
             date = new Date();
@@ -255,12 +255,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
     }
 
 
     @Override
     @Override
-    public List<ClassGroupTeachers> getClassGroupAndTeachers(Integer musicGroupId) {
-        List<ClassGroupTeachers> classGroupAndTeachersList = classGroupDao.findClassGroupByMusicGroupId(musicGroupId);
+    public List<ClassGroupTeachersDto> getClassGroupAndTeachers(Integer musicGroupId) {
+        List<ClassGroupTeachersDto> classGroupAndTeachersList = classGroupDao.findClassGroupByMusicGroupId(musicGroupId);
 
 
         List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupTeacherMapperService.findClassGroupTeachers(classGroupAndTeachersList);
         List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupTeacherMapperService.findClassGroupTeachers(classGroupAndTeachersList);
 
 
-        for (ClassGroupTeachers classGroupAndTeachers : classGroupAndTeachersList) {
+        for (ClassGroupTeachersDto classGroupAndTeachers : classGroupAndTeachersList) {
             List<ClassGroupTeacherMapper> oneClassGroupTeacherMapperList = new ArrayList<>();
             List<ClassGroupTeacherMapper> oneClassGroupTeacherMapperList = new ArrayList<>();
             for (ClassGroupTeacherMapper classGroupTeacherMapper : classGroupTeacherMapperList) {
             for (ClassGroupTeacherMapper classGroupTeacherMapper : classGroupTeacherMapperList) {
                 if (classGroupTeacherMapper.getClassGroupId().equals(classGroupAndTeachers.getId())) {
                 if (classGroupTeacherMapper.getClassGroupId().equals(classGroupAndTeachers.getId())) {
@@ -273,9 +273,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
     }
 
 
     @Override
     @Override
-    public List<ClassGroupTeachers> getClassGroupAndTeacherSalary(Integer musicGroupId) {
+    public List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(Integer musicGroupId) {
         //乐团班级及班级老师
         //乐团班级及班级老师
-        List<ClassGroupTeachers> classGroupAndTeachers = getClassGroupAndTeachers(musicGroupId);
+        List<ClassGroupTeachersDto> classGroupAndTeachers = getClassGroupAndTeachers(musicGroupId);
         //乐团的课程计划
         //乐团的课程计划
         List<CourseSchedule> classGroupCourseSchedules = courseScheduleService.findClassGroupCourseSchedules(classGroupAndTeachers);
         List<CourseSchedule> classGroupCourseSchedules = courseScheduleService.findClassGroupCourseSchedules(classGroupAndTeachers);
 
 
@@ -284,7 +284,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
 
 
         //基础课时
         //基础课时
         BigDecimal baseDuration = new BigDecimal("30");
         BigDecimal baseDuration = new BigDecimal("30");
-        for (ClassGroupTeachers classGroupAndTeacher : classGroupAndTeachers) {
+        for (ClassGroupTeachersDto classGroupAndTeacher : classGroupAndTeachers) {
 
 
             Set<Long> courseScheduleDurationSet = new HashSet<>();
             Set<Long> courseScheduleDurationSet = new HashSet<>();
             for (CourseSchedule classGroupCourseSchedule : classGroupCourseSchedules) {
             for (CourseSchedule classGroupCourseSchedule : classGroupCourseSchedules) {

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

@@ -1,7 +1,5 @@
 package com.ym.mec.biz.service.impl;
 package com.ym.mec.biz.service.impl;
 
 
-import com.ym.mec.biz.dal.dto.ClassGroupTeachers;
-import com.ym.mec.biz.dal.entity.ClassGroup;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 

+ 22 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java

@@ -1,22 +1,18 @@
 package com.ym.mec.biz.service.impl;
 package com.ym.mec.biz.service.impl;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
-import com.ym.mec.biz.dal.dao.MusicGroupDao;
-import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfo;
-import com.ym.mec.biz.dal.entity.MusicGroup;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
+import com.ym.mec.biz.dal.dto.MusicGroupRegRespDto;
+import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
+import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.GoodsType;
 import com.ym.mec.biz.dal.enums.GoodsType;
 import com.ym.mec.biz.service.*;
 import com.ym.mec.biz.service.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import com.ym.mec.biz.dal.dao.MusicGroupSubjectPlanDao;
 import com.ym.mec.biz.dal.dao.MusicGroupSubjectPlanDao;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
-import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 
 
-import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
@@ -38,6 +34,9 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     @Autowired
     @Autowired
     private MusicGroupService musicGroupService;
     private MusicGroupService musicGroupService;
 
 
+    @Autowired
+    private SubjectService subjectService;
+
     @Override
     @Override
     public BaseDAO<Integer, MusicGroupSubjectPlan> getDAO() {
     public BaseDAO<Integer, MusicGroupSubjectPlan> getDAO() {
         return musicGroupSubjectPlanDao;
         return musicGroupSubjectPlanDao;
@@ -59,7 +58,7 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     }
     }
 
 
     @Override
     @Override
-    public MusicGroupSubjectGoodsAndInfo getSubjectGoodsAndInfo(Integer musicGroupId, Integer subjectId) {
+    public MusicGroupSubjectGoodsAndInfoDto getSubjectGoodsAndInfo(Integer musicGroupId, Integer subjectId) {
         MusicGroup musicGroup = musicGroupService.get(musicGroupId.toString());
         MusicGroup musicGroup = musicGroupService.get(musicGroupId.toString());
 
 
         //课程形态
         //课程形态
@@ -77,10 +76,24 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
                 });
                 });
             }
             }
         });
         });
-        MusicGroupSubjectGoodsAndInfo musicGroupSubjectGoodsAndInfo = new MusicGroupSubjectGoodsAndInfo();
+        MusicGroupSubjectGoodsAndInfoDto musicGroupSubjectGoodsAndInfo = new MusicGroupSubjectGoodsAndInfoDto();
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectPlan(musicOneSubjectClassPlan);
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectPlan(musicOneSubjectClassPlan);
         musicGroupSubjectGoodsAndInfo.setCourseScheduleInfo(courseForm);
         musicGroupSubjectGoodsAndInfo.setCourseScheduleInfo(courseForm);
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectGoodsGroupList(goodsGroups);
         musicGroupSubjectGoodsAndInfo.setMusicGroupSubjectGoodsGroupList(goodsGroups);
         return musicGroupSubjectGoodsAndInfo;
         return musicGroupSubjectGoodsAndInfo;
     }
     }
+
+    @Override
+    public MusicGroupRegRespDto getMusicGroupRegInfo(Integer musicGroupId) {
+        MusicGroupRegRespDto musicGroupRegResp = new MusicGroupRegRespDto();
+
+        //乐团信息
+        MusicGroup musicGroup = musicGroupService.get(musicGroupId.toString());
+        musicGroupRegResp.setMusicGroupName(musicGroup.getName());
+        //声部信息
+        List<Subject> subjectList = subjectService.findSubByMusicGroupId(musicGroupId);
+        musicGroupRegResp.setSubjectList(subjectList);
+
+        return musicGroupRegResp;
+    }
 }
 }

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

@@ -1,10 +1,12 @@
 package com.ym.mec.biz.service.impl;
 package com.ym.mec.biz.service.impl;
 
 
+import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
 import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
 import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
 import com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto;
 import com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto;
 import com.ym.mec.biz.dal.dto.StudentStatusCountUtilEntity;
 import com.ym.mec.biz.dal.dto.StudentStatusCountUtilEntity;
 import com.ym.mec.biz.dal.entity.StudentAttendance;
 import com.ym.mec.biz.dal.entity.StudentAttendance;
 import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
 import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
 import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.dal.BaseDAO;
@@ -12,7 +14,6 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.collection.MapUtil;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
@@ -26,6 +27,8 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 	
 	
 	@Autowired
 	@Autowired
 	private StudentAttendanceDao studentAttendanceDao;
 	private StudentAttendanceDao studentAttendanceDao;
+	@Autowired
+	private MusicGroupStudentFeeDao studentFeeDao;
 
 
 	@Override
 	@Override
 	public BaseDAO<Long, StudentAttendance> getDAO() {
 	public BaseDAO<Long, StudentAttendance> getDAO() {
@@ -35,8 +38,28 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 	@Override
 	@Override
 	public void addStudentAttendances(List<StudentAttendance> studentAttendances) {
 	public void addStudentAttendances(List<StudentAttendance> studentAttendances) {
 		studentAttendances.forEach(studentAttendance -> {
 		studentAttendances.forEach(studentAttendance -> {
+			StudentAttendance studentAttendanceInfo = studentAttendanceDao.getStudentAttendanceInfo(studentAttendance);
 			if (studentAttendance.getStatus() != StudentAttendanceStatusEnum.DROP_OUT) {
 			if (studentAttendance.getStatus() != StudentAttendanceStatusEnum.DROP_OUT) {
-				studentAttendanceDao.insert(studentAttendanceDao.getStudentAttendanceInfo(studentAttendance));
+				//判断是否为连续旷课
+				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())){
+						studentFeeDao.updateStudentAbsenteeismTimes(studentAttendanceInfo.getUserId(),
+								studentAttendanceInfo.getMusicGroupId(),
+								YesOrNoEnum.YES.getCode());
+					}
+				}else{
+					studentFeeDao.updateStudentAbsenteeismTimes(studentAttendanceInfo.getUserId(),
+							studentAttendanceInfo.getMusicGroupId(),
+							YesOrNoEnum.NO.getCode());
+				}
+				studentAttendanceDao.insert(studentAttendanceInfo);
+			}else{
+				studentFeeDao.updateStudentAbsenteeismTimes(studentAttendanceInfo.getUserId(),
+						studentAttendanceInfo.getMusicGroupId(),
+						YesOrNoEnum.NO.getCode());
 			}
 			}
 		});
 		});
 	}
 	}

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

@@ -1,5 +1,11 @@
 package com.ym.mec.biz.service.impl;
 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.auth.api.enums.SysUserType;
+import com.ym.mec.auth.api.enums.UserLockFlag;
+import com.ym.mec.auth.service.SysUserService;
+import com.ym.mec.biz.dal.dao.StudentRechargeDao;
 import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
 import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
 import com.ym.mec.biz.dal.dto.StudentFeeDto;
 import com.ym.mec.biz.dal.dto.StudentFeeDto;
@@ -14,7 +20,9 @@ import com.ym.mec.util.collection.MapUtil;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 
+import javax.annotation.Resource;
 import java.util.*;
 import java.util.*;
 
 
 @Service
 @Service
@@ -22,6 +30,8 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 
 
     @Autowired
     @Autowired
     private StudentRegistrationDao studentRegistrationDao;
     private StudentRegistrationDao studentRegistrationDao;
+    @Resource
+    private SysUserFeignService sysUserFeignService;
 
 
     @Override
     @Override
     public BaseDAO<Long, StudentRegistration> getDAO() {
     public BaseDAO<Long, StudentRegistration> getDAO() {
@@ -77,11 +87,35 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 
 
     @Override
     @Override
     public Integer getNoClassStuCountBySubjectId(Integer musicGroupId, Integer actualSubjectId) {
     public Integer getNoClassStuCountBySubjectId(Integer musicGroupId, Integer actualSubjectId) {
-        return studentRegistrationDao.getNoClassStuCountBySubjectId(musicGroupId,actualSubjectId);
+        return studentRegistrationDao.getNoClassStuCountBySubjectId(musicGroupId, actualSubjectId);
     }
     }
 
 
     @Override
     @Override
     public Integer updateByUserIdAndMusicGroupId(StudentRegistration studentRegistration) {
     public Integer updateByUserIdAndMusicGroupId(StudentRegistration studentRegistration) {
         return studentRegistrationDao.updateByUserIdAndMusicGroupId(studentRegistration);
         return studentRegistrationDao.updateByUserIdAndMusicGroupId(studentRegistration);
     }
     }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public StudentRegistration addStudent(StudentRegistration studentRegistration) {
+        Date date = new Date();
+        SysUser sysUser = sysUserFeignService.getUserByMobile(studentRegistration.getParentsPhone());
+        if (sysUser == null) {
+            sysUser = new SysUser();
+            sysUser.setPhone(studentRegistration.getParentsPhone());
+            sysUser.setCreateTime(date);
+            sysUser.setUpdateTime(date);
+            sysUser.setLockFlag(UserLockFlag.NOACTIVATED);
+            sysUser.setDelFlag(com.ym.mec.auth.api.enums.YesOrNoEnum.NO);
+            sysUser.setUserType(SysUserType.STUDENT);
+            sysUser.setGender(studentRegistration.getGender());
+            sysUser.setOrganId(studentRegistration.getOrganId());
+            sysUser.setRealName(studentRegistration.getName());
+            sysUser.setIdCardNo(studentRegistration.getIdCardNo());
+            sysUserFeignService.addUser(sysUser);
+        }
+        studentRegistration.setUserId(sysUser.getId());
+        studentRegistrationDao.insert(studentRegistration);
+        return studentRegistration;
+    }
 }
 }

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

@@ -238,7 +238,7 @@
     </select>
     </select>
 
 
 
 
-    <resultMap type="com.ym.mec.biz.dal.dto.ClassGroupTeachers" id="ClassGroupTeachers">
+    <resultMap type="com.ym.mec.biz.dal.dto.ClassGroupTeachersDto" id="ClassGroupTeachers">
         <result column="id_" property="id"/>
         <result column="id_" property="id"/>
         <result column="music_group_id_" property="musicGroupId"/>
         <result column="music_group_id_" property="musicGroupId"/>
         <result column="subject_id_list_" property="subjectIdList"/>
         <result column="subject_id_list_" property="subjectIdList"/>

+ 10 - 5
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -19,6 +19,7 @@
         <result column="create_time_" property="createTime"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
         <result column="update_time_" property="updateTime"/>
         <result column="teach_mode_" property="teachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="teach_mode_" property="teachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="complaint_status_" property="complaintStatus"/>
         <result column="complaint_status_" property="complaintStatus"/>
     </resultMap>
     </resultMap>
 
 
@@ -50,16 +51,16 @@
         </selectKey>
         </selectKey>
         -->
         -->
         INSERT INTO course_schedule
         INSERT INTO course_schedule
-        (id_,class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,teacher_id_,actual_teacher_id_,create_time_,update_time_)
-        VALUES(#{id},#{classGroupId},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subsidy},#{classDate},#{startClassTime},#{endClassTime},#{teacherId},#{actualTeacherId},now(),now())
+        (id_,class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,teacher_id_,actual_teacher_id_,create_time_,update_time_,type_)
+        VALUES(#{id},#{classGroupId},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subsidy},#{classDate},#{startClassTime},#{endClassTime},#{teacherId},#{actualTeacherId},now(),now(),#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
     </insert>
     </insert>
 
 
     <insert id="batchAddCourseSchedules" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
     <insert id="batchAddCourseSchedules" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
         INSERT INTO course_schedule
         INSERT INTO course_schedule
-        (class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,teacher_id_,actual_teacher_id_,create_time_,update_time_)
+        (class_group_id_,status_,subsidy_,class_date_,start_class_time_,end_class_time_,teacher_id_,actual_teacher_id_,create_time_,update_time_,type_)
         VALUE
         VALUE
         <foreach collection="list" item="course" separator=",">
         <foreach collection="list" item="course" separator=",">
-            (#{course.classGroupId},#{course.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{course.subsidy},#{course.classDate},#{course.startClassTime},#{course.endClassTime},#{course.teacherId},#{course.actualTeacherId},now(),now())
+            (#{course.classGroupId},#{course.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{course.subsidy},#{course.classDate},#{course.startClassTime},#{course.endClassTime},#{course.teacherId},#{course.actualTeacherId},now(),now(),#{course.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
         </foreach>
         </foreach>
     </insert>
     </insert>
 
 
@@ -76,6 +77,9 @@
             <if test="status != null">
             <if test="status != null">
                 status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
             </if>
+            <if test="type != null">
+                type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            </if>
             <if test="actualTeacherId != null">
             <if test="actualTeacherId != null">
                 actual_teacher_id_ = #{actualTeacherId},
                 actual_teacher_id_ = #{actualTeacherId},
             </if>
             </if>
@@ -378,7 +382,8 @@
         SELECT
         SELECT
         cs.class_date_
         cs.class_date_
         FROM
         FROM
-        course_schedule cs ON cgsm.class_group_id_ = cs.class_group_id_
+        class_group_student_mapper cgsm
+        LEFT JOIN course_schedule cs ON cgsm.class_group_id_ = cs.class_group_id_
         WHERE
         WHERE
         cs.teacher_id_ = #{teacherId}
         cs.teacher_id_ = #{teacherId}
         <if test="month==null">
         <if test="month==null">

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

@@ -140,8 +140,11 @@ create_time_ = #{createTime},
 			<if test="subjectIds!=null and subjectIds!=''">
 			<if test="subjectIds!=null and subjectIds!=''">
 				AND FIND_IN_SET(dg.subject_id_,#{subjectIds})
 				AND FIND_IN_SET(dg.subject_id_,#{subjectIds})
 			</if>
 			</if>
-			<if test="startTimes!=null and startTimes!=''">
-				AND FIND_IN_SET(dgcp.courses_start_time_,#{startTimes})
+			<if test="startTime!=null and endTime==null">
+				AND dgcp.courses_start_time_=#{startTime}
+			</if>
+			<if test="startTime!=null and endTime!=null">
+				AND dgcp.courses_start_time_&gt;=#{startTime} AND dgcp.courses_start_time_ &lt;= #{endTime}
 			</if>
 			</if>
 		</where>
 		</where>
 	</sql>
 	</sql>

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

@@ -133,6 +133,7 @@
 	</select>
 	</select>
 
 
 	<resultMap type="com.ym.mec.biz.dal.dto.MusicCardDto" id="queryUserMusicGroupsMap">
 	<resultMap type="com.ym.mec.biz.dal.dto.MusicCardDto" id="queryUserMusicGroupsMap">
+		<result column="register_id_" property="registerId" />
 		<result column="user_name_" property="userName" />
 		<result column="user_name_" property="userName" />
 		<result column="subject_name_" property="subjectName" />
 		<result column="subject_name_" property="subjectName" />
 		<result column="current_class_" property="currentClass" />
 		<result column="current_class_" property="currentClass" />
@@ -145,7 +146,7 @@
 	</resultMap>
 	</resultMap>
 
 
     <select id="queryUserMusicGroups" resultMap="queryUserMusicGroupsMap">
     <select id="queryUserMusicGroups" resultMap="queryUserMusicGroupsMap">
-		SELECT sr.name_ user_name_,sr.current_class_,sr.current_grade_,
+		SELECT sr.id_ register_id_,sr.name_ user_name_,sr.current_class_,sr.current_grade_,
 		sr.payment_status_,mg.name_ music_group_name_,s.name_ subject_name_,mg.id_ music_group_id_
 		sr.payment_status_,mg.name_ music_group_name_,s.name_ subject_name_,mg.id_ music_group_id_
 		FROM student_registration sr
 		FROM student_registration sr
 		LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
 		LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_

+ 10 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupStudentFeeMapper.xml

@@ -63,6 +63,16 @@
         </set>
         </set>
         WHERE id_ = #{id}
         WHERE id_ = #{id}
     </update>
     </update>
+    <update id="updateStudentAbsenteeismTimes">
+        update music_group_student_fee_
+        <if test="operate==0">
+            set continuous_absenteeism_times_=0
+        </if>
+        <if test="operate==1">
+            set continuous_absenteeism_times_=continuous_absenteeism_times_+1
+        </if>
+        WHERE music_group_id_ = #{musicGroupId} AND user_id_ = #{userId}
+    </update>
 
 
     <!-- 根据主键删除一条记录 -->
     <!-- 根据主键删除一条记录 -->
     <delete id="delete">
     <delete id="delete">

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

@@ -151,8 +151,22 @@
             LEFT JOIN class_group cg ON cg.id_ = cgsm.class_group_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 music_group mg ON cg.music_group_id_ = mg.id_
             LEFT JOIN `subject` s ON cg.subject_id_ = s.id_
             LEFT JOIN `subject` s ON cg.subject_id_ = s.id_
+            LEFT JOIN course_schedule cs ON cg.id_=cs.class_group_id_
         WHERE
         WHERE
-            su.id_=#{userId}
+            su.id_=#{userId} AND cs.id_=#{courseScheduleId}
+    </select>
+
+    <select id="getStudentLatestAttendanceInfo" resultType="com.ym.mec.biz.dal.entity.StudentAttendance" resultMap="StudentAttendance">
+        SELECT
+            *
+        FROM
+            student_attendance sa
+        WHERE
+            sa.music_group_id_ = #{musicGroupId}
+            AND sa.user_id_ = #{userId}
+        ORDER BY
+            sa.create_time_ DESC
+            LIMIT 1
     </select>
     </select>
 
 
     <resultMap id="studentPersonalAttendance" type="com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto">
     <resultMap id="studentPersonalAttendance" type="com.ym.mec.biz.dal.dto.StudentPersonalAttendanceDto">

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

@@ -7,7 +7,7 @@
 		id="TeacherDefaultMusicGroupSalary">
 		id="TeacherDefaultMusicGroupSalary">
 		<result column="id_" property="id" />
 		<result column="id_" property="id" />
 		<result column="user_id_" property="userId" />
 		<result column="user_id_" property="userId" />
-		<result column="class_group_type_" property="classGroupType" />
+		<result column="course_schedule_type_" property="courseScheduleType" />
 		<result column="subject_id_" property="subjectId" />
 		<result column="subject_id_" property="subjectId" />
 		<result column="main_teacher_salary_" property="mainTeacherSalary" />
 		<result column="main_teacher_salary_" property="mainTeacherSalary" />
 		<result column="assistant_teacher_salary_" property="assistantTeacherSalary" />
 		<result column="assistant_teacher_salary_" property="assistantTeacherSalary" />
@@ -33,8 +33,8 @@
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 			AS ID FROM DUAL </selectKey> -->
 			AS ID FROM DUAL </selectKey> -->
 		INSERT INTO teacher_default_music_group_salary
 		INSERT INTO teacher_default_music_group_salary
-		(id_,user_id_,class_group_type_,subject_id_,main_teacher_salary_,assistant_teacher_salary_,create_time_,update_time_)
-		VALUES(#{id},#{userId},#{classGroupType},#{subjectId},#{mainTeacherSalary},#{assistantTeacherSalary},now(),now())
+		(id_,user_id_,course_schedule_type_,subject_id_,main_teacher_salary_,assistant_teacher_salary_,create_time_,update_time_)
+		VALUES(#{id},#{userId},#{courseScheduleType},#{subjectId},#{mainTeacherSalary},#{assistantTeacherSalary},now(),now())
 	</insert>
 	</insert>
 
 
 	<!-- 根据主键查询一条记录 -->
 	<!-- 根据主键查询一条记录 -->
@@ -51,8 +51,8 @@
 			<if test="updateTime != null">
 			<if test="updateTime != null">
 				update_time_ = #{updateTime},
 				update_time_ = #{updateTime},
 			</if>
 			</if>
-			<if test="classGroupType != null">
-				class_group_type_ = #{classGroupType},
+			<if test="courseScheduleType != null">
+				course_schedule_type_ = #{courseScheduleType},
 			</if>
 			</if>
 			<if test="mainTeacherSalary != null">
 			<if test="mainTeacherSalary != null">
 				main_teacher_salary_ = #{mainTeacherSalary},
 				main_teacher_salary_ = #{mainTeacherSalary},
@@ -85,6 +85,6 @@
 
 
 	<!-- 根据user_id 获取老师的默认薪酬 -->
 	<!-- 根据user_id 获取老师的默认薪酬 -->
 	<select id="getTeacherSalaryByUserIdAndType" resultMap="TeacherDefaultMusicGroupSalary">
 	<select id="getTeacherSalaryByUserIdAndType" resultMap="TeacherDefaultMusicGroupSalary">
-		SELECT * FROM teacher_default_music_group_salary WHERE user_id_=#{userId} AND class_group_type_ = #{classGroupType}
+		SELECT * FROM teacher_default_music_group_salary WHERE user_id_=#{userId} AND course_schedule_type_ = #{courseScheduleType}
 	</select>
 	</select>
 </mapper>
 </mapper>

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

@@ -20,6 +20,7 @@
         <result column="offline_classes_num_" property="offlineClassesNum"/>
         <result column="offline_classes_num_" property="offlineClassesNum"/>
         <result column="audit_status_" property="auditStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="audit_status_" property="auditStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="unit_price_" property="unitPrice"/>
         <result column="unit_price_" property="unitPrice"/>
+        <result column="organ_id_list_" property="organIdList"/>
     </resultMap>
     </resultMap>
 
 
     <resultMap id="studentManageVipGroup" type="com.ym.mec.biz.dal.dto.StudentManageVipGroupDto" extends="VipGroup">
     <resultMap id="studentManageVipGroup" type="com.ym.mec.biz.dal.dto.StudentManageVipGroupDto" extends="VipGroup">
@@ -85,8 +86,8 @@
         </selectKey>
         </selectKey>
         -->
         -->
         INSERT INTO vip_group
         INSERT INTO vip_group
-        (id_,user_id_,single_class_minutes_,payment_expire_date_,courses_expire_date_,create_time_,update_time_,teacher_school_id_,online_classes_num_,offline_classes_num_,registration_start_time_,unit_price_)
-        VALUES(#{id},#{userId},#{singleClassMinutes},#{paymentExpireDate},#{coursesExpireDate},now(),now(),#{teacherSchoolId},#{onlineClassesNum},#{offlineClassesNum},#{registrationStartTime},#{unitPrice})
+        (id_,user_id_,single_class_minutes_,payment_expire_date_,courses_expire_date_,create_time_,update_time_,teacher_school_id_,online_classes_num_,offline_classes_num_,registration_start_time_,unit_price_,organ_id_list_)
+        VALUES(#{id},#{userId},#{singleClassMinutes},#{paymentExpireDate},#{coursesExpireDate},now(),now(),#{teacherSchoolId},#{onlineClassesNum},#{offlineClassesNum},#{registrationStartTime},#{unitPrice},#{organIdList})
     </insert>
     </insert>
 
 
     <!-- 根据主键查询一条记录 -->
     <!-- 根据主键查询一条记录 -->
@@ -123,6 +124,9 @@
             <if test="unitPrice!=null">
             <if test="unitPrice!=null">
                 unit_price_=#{unitPrice}
                 unit_price_=#{unitPrice}
             </if>
             </if>
+            <if test="organIdList!=null">
+                organ_id_list_=#{organIdList}
+            </if>
             <if test="auditStatus != null">
             <if test="auditStatus != null">
                 audit_status_ = #{auditStatus,typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"},
                 audit_status_ = #{auditStatus,typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"},
             </if>
             </if>

+ 14 - 0
mec-education/src/main/java/com/ym/mec/education/base/BaseResponse.java

@@ -38,10 +38,24 @@ public class BaseResponse<T> extends Response implements Serializable {
         return baseResponse;
         return baseResponse;
     }
     }
 
 
+    public static BaseResponse failParams() {
+        BaseResponse baseResponse = new BaseResponse<>();
+        baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
+        baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
+        return baseResponse;
+    }
+
+
     public static BaseResponse errorParam(){
     public static BaseResponse errorParam(){
         BaseResponse baseResponse = new BaseResponse();
         BaseResponse baseResponse = new BaseResponse();
         baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
         baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
         baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
         baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
         return baseResponse;
         return baseResponse;
     }
     }
+    public static BaseResponse noDataExists() {
+        BaseResponse baseResponse = new BaseResponse<>();
+        baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
+        baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
+        return baseResponse;
+    }
 }
 }

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

@@ -40,7 +40,7 @@ public class CourseScheduleController {
     }
     }
 
 
     @PostMapping("/info")
     @PostMapping("/info")
-    @ApiOperation("课程计划详情")
+    @ApiOperation("点名详情-头信息")
     public BaseResponse<CourseScheduleResp> getInfo(@RequestBody CourseScheduleReq courseScheduleReq) {
     public BaseResponse<CourseScheduleResp> getInfo(@RequestBody CourseScheduleReq courseScheduleReq) {
         return courseScheduleService.getInfo(courseScheduleReq);
         return courseScheduleService.getInfo(courseScheduleReq);
     }
     }

+ 21 - 2
mec-education/src/main/java/com/ym/mec/education/controller/HomeWorkController.java

@@ -8,6 +8,8 @@ import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.StudentCourseHomework;
 import com.ym.mec.education.entity.StudentCourseHomework;
 import com.ym.mec.education.entity.SysUser;
 import com.ym.mec.education.entity.SysUser;
+import com.ym.mec.education.enums.ReturnCodeEnum;
+import com.ym.mec.education.req.HomeWorkDetailReq;
 import com.ym.mec.education.req.HomeWorkReq;
 import com.ym.mec.education.req.HomeWorkReq;
 import com.ym.mec.education.req.MusicGroupReq;
 import com.ym.mec.education.req.MusicGroupReq;
 import com.ym.mec.education.resp.HomeWrokResp;
 import com.ym.mec.education.resp.HomeWrokResp;
@@ -17,6 +19,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
+import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -43,8 +46,6 @@ public class HomeWorkController {
     @Autowired
     @Autowired
     private IStudentCourseHomeworkService studentCourseHomeworkService;
     private IStudentCourseHomeworkService studentCourseHomeworkService;
 
 
-    @Autowired
-    private ISysUserService sysUserService;
     /**
     /**
      * 服务降级处理
      * 服务降级处理
      *
      *
@@ -57,6 +58,7 @@ public class HomeWorkController {
         return response;
         return response;
     }
     }
 
 
+
     /**
     /**
      *
      *
      * @param req
      * @param req
@@ -67,4 +69,21 @@ public class HomeWorkController {
 
 
         return studentCourseHomeworkService.workList(req);
         return studentCourseHomeworkService.workList(req);
     }
     }
+
+
+    /**
+     *
+     * @param req
+     * @return
+     */
+    @PostMapping(value = "/workDetail")
+    public BaseResponse workDetail(@RequestBody HomeWorkDetailReq req) {
+        BaseResponse baseResponse = new BaseResponse();
+        if(req == null || req.getMusicGroupId() == null || req.getClassGroupId() == null || req.getWorkId() == null){
+            baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
+            baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
+            return baseResponse;
+        }
+        return studentCourseHomeworkService.getHomeWorkDetail(req);
+    }
 }
 }

+ 2 - 2
mec-education/src/main/java/com/ym/mec/education/controller/StudentAttendanceController.java

@@ -35,13 +35,13 @@ public class StudentAttendanceController {
     }
     }
 
 
     @PostMapping("/listByCourse")
     @PostMapping("/listByCourse")
-    @ApiOperation("根据课程计划查询考勤列表")
+    @ApiOperation("点名详情-考勤列表")
     public PageResponse listByCourse(@RequestBody CourseScheduleReq courseScheduleReq) {
     public PageResponse listByCourse(@RequestBody CourseScheduleReq courseScheduleReq) {
         return studentAttendanceService.getPageByCourse(courseScheduleReq);
         return studentAttendanceService.getPageByCourse(courseScheduleReq);
     }
     }
 
 
     @PostMapping("/statisticsList")
     @PostMapping("/statisticsList")
-    @ApiOperation("根据课程计划查询考勤统计列表")
+    @ApiOperation("历史考勤统计-考勤列表")
     public PageResponse statisticsList(@RequestBody CourseScheduleReq courseScheduleReq) {
     public PageResponse statisticsList(@RequestBody CourseScheduleReq courseScheduleReq) {
         return studentAttendanceService.statisticsList(courseScheduleReq);
         return studentAttendanceService.statisticsList(courseScheduleReq);
     }
     }

+ 56 - 0
mec-education/src/main/java/com/ym/mec/education/controller/TeacherController.java

@@ -0,0 +1,56 @@
+package com.ym.mec.education.controller;
+
+import com.ym.mec.education.base.BaseResponse;
+import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.req.HomeWorkReq;
+import com.ym.mec.education.req.TeacherReq;
+import com.ym.mec.education.service.ITeacherService;
+import io.swagger.annotations.Api;
+import lombok.extern.slf4j.Slf4j;
+import net.bytebuddy.asm.Advice;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author : chengp
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月29日 9:54
+ */
+
+@RestController
+@RequestMapping("api/teacher")
+@Api(tags = "老师列表")
+@Slf4j
+public class TeacherController {
+
+    @Autowired
+    private ITeacherService teacherService;
+
+    /**
+     * 服务降级处理
+     *
+     * @return
+     */
+    private BaseResponse defaultFallback() {
+        BaseResponse response = new BaseResponse();
+        response.setReturnCode(500);
+        response.setMessage("太拥挤了, 请稍后再试!");
+        return response;
+    }
+
+
+    /**
+     *
+     * @param req
+     * @return
+     */
+    @PostMapping(value = "/workList")
+    public PageResponse workList(@RequestBody TeacherReq req) {
+
+        return teacherService.teacherList(req);
+    }
+}

+ 124 - 0
mec-education/src/main/java/com/ym/mec/education/entity/MusicGroupQuit.java

@@ -0,0 +1,124 @@
+package com.ym.mec.education.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.util.Date;
+
+/**
+ * @program: mec
+ * @description: 退团
+ * @author: xw
+ * @create: 2019-09-29 12:52
+ */
+public class MusicGroupQuit extends Model<MusicGroupQuit> {
+
+    @TableId(value = "id_", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 学生id
+     */
+    @TableField("user_id_")
+    private Integer userId;
+
+    /**
+     * 乐团编号
+     */
+    @TableField("music_group_id_")
+    private Integer musicGroupId;
+
+    /**
+     * 加入时间
+     */
+    @TableField("join_date_")
+    private Date joinDate;
+
+    /**
+     * 退出时间
+     */
+    @TableField("quit_date_")
+    private Date quitDate;
+
+    /**
+     * 创建时间
+     */
+    @TableField("create_time_")
+    private Date createTime;
+
+    /**
+     * 原因
+     */
+    @TableField("reason_")
+    private String reason;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(Integer musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public Date getJoinDate() {
+        return joinDate;
+    }
+
+    public void setJoinDate(Date joinDate) {
+        this.joinDate = joinDate;
+    }
+
+    public Date getQuitDate() {
+        return quitDate;
+    }
+
+    public void setQuitDate(Date quitDate) {
+        this.quitDate = quitDate;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    @Override
+    public String toString() {
+        return "MusicGroupQuit{" +
+                "id=" + id +
+                ", userId=" + userId +
+                ", musicGroupId=" + musicGroupId +
+                ", joinDate=" + joinDate +
+                ", quitDate=" + quitDate +
+                ", createTime=" + createTime +
+                ", reason='" + reason + '\'' +
+                '}';
+    }
+}

+ 49 - 8
mec-education/src/main/java/com/ym/mec/education/entity/MusicGroupStudentFee.java

@@ -37,7 +37,21 @@ public class MusicGroupStudentFee extends Model<MusicGroupStudentFee> {
     private Date createTime;
     private Date createTime;
     @TableField("update_time_")
     @TableField("update_time_")
     private Date updateTime;
     private Date updateTime;
-
+    /**
+     * 下次缴费日期
+     */
+    @TableField("next_payment_date_")
+    private Date nextPaymentDate;
+    /**
+     * 最近已缴费时间
+     */
+    @TableField("latest_paid_time_")
+    private Date latestPaidTime;
+    /**
+     * 连续旷课次数
+     */
+    @TableField("continuous_absenteeism_times_")
+    private Integer continuousAbsenteeismTimes;
 
 
     public Long getId() {
     public Long getId() {
         return id;
         return id;
@@ -93,6 +107,30 @@ public class MusicGroupStudentFee extends Model<MusicGroupStudentFee> {
         return this;
         return this;
     }
     }
 
 
+    public Date getNextPaymentDate() {
+        return nextPaymentDate;
+    }
+
+    public void setNextPaymentDate(Date nextPaymentDate) {
+        this.nextPaymentDate = nextPaymentDate;
+    }
+
+    public Date getLatestPaidTime() {
+        return latestPaidTime;
+    }
+
+    public void setLatestPaidTime(Date latestPaidTime) {
+        this.latestPaidTime = latestPaidTime;
+    }
+
+    public Integer getContinuousAbsenteeismTimes() {
+        return continuousAbsenteeismTimes;
+    }
+
+    public void setContinuousAbsenteeismTimes(Integer continuousAbsenteeismTimes) {
+        this.continuousAbsenteeismTimes = continuousAbsenteeismTimes;
+    }
+
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {
         return this.id;
         return this.id;
@@ -101,12 +139,15 @@ public class MusicGroupStudentFee extends Model<MusicGroupStudentFee> {
     @Override
     @Override
     public String toString() {
     public String toString() {
         return "MusicGroupStudentFee{" +
         return "MusicGroupStudentFee{" +
-        ", id=" + id +
-        ", musicGroupId=" + musicGroupId +
-        ", userId=" + userId +
-        ", courseFee=" + courseFee +
-        ", createTime=" + createTime +
-        ", updateTime=" + updateTime +
-        "}";
+                "id=" + id +
+                ", musicGroupId=" + musicGroupId +
+                ", userId=" + userId +
+                ", courseFee=" + courseFee +
+                ", createTime=" + createTime +
+                ", updateTime=" + updateTime +
+                ", nextPaymentDate=" + nextPaymentDate +
+                ", latestPaidTime=" + latestPaidTime +
+                ", continuousAbsenteeismTimes=" + continuousAbsenteeismTimes +
+                '}';
     }
     }
 }
 }

+ 7 - 7
mec-education/src/main/java/com/ym/mec/education/entity/VipGroup.java

@@ -75,8 +75,8 @@ public class VipGroup extends Model<VipGroup> {
     /**
     /**
      * 价格
      * 价格
      */
      */
-    @TableField("price_")
-    private BigDecimal price;
+    @TableField("unit_price_")
+    private BigDecimal unitPrice;
     /**
     /**
      * 审核状态
      * 审核状态
      */
      */
@@ -206,12 +206,12 @@ public class VipGroup extends Model<VipGroup> {
         return this;
         return this;
     }
     }
 
 
-    public BigDecimal getPrice() {
-        return price;
+    public BigDecimal getUnitPrice() {
+        return unitPrice;
     }
     }
 
 
-    public VipGroup setPrice(BigDecimal price) {
-        this.price = price;
+    public VipGroup setUnitPrice(BigDecimal unitPrice) {
+        this.unitPrice = unitPrice;
         return this;
         return this;
     }
     }
 
 
@@ -254,7 +254,7 @@ public class VipGroup extends Model<VipGroup> {
         ", registrationStartTime=" + registrationStartTime +
         ", registrationStartTime=" + registrationStartTime +
         ", name=" + name +
         ", name=" + name +
         ", vipGroupCategoryId=" + vipGroupCategoryId +
         ", vipGroupCategoryId=" + vipGroupCategoryId +
-        ", price=" + price +
+        ", unitPrice=" + unitPrice +
         ", auditStatus=" + auditStatus +
         ", auditStatus=" + auditStatus +
         ", organIdList=" + organIdList +
         ", organIdList=" + organIdList +
         "}";
         "}";

+ 13 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/MusicGroupQuitMapper.java

@@ -0,0 +1,13 @@
+package com.ym.mec.education.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ym.mec.education.entity.MusicGroupQuit;
+
+/**
+ * @program: mec
+ * @description: 退团mapper
+ * @author: xw
+ * @create: 2019-09-29 13:02
+ */
+public interface MusicGroupQuitMapper extends BaseMapper<MusicGroupQuit> {
+}

+ 1 - 2
mec-education/src/main/java/com/ym/mec/education/mapper/MusicGroupStudentFeeMapper.java

@@ -1,8 +1,7 @@
 package com.ym.mec.education.mapper;
 package com.ym.mec.education.mapper;
 
 
 import com.ym.mec.education.entity.MusicGroupStudentFee;
 import com.ym.mec.education.entity.MusicGroupStudentFee;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
-
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 /**
 /**
  * <p>
  * <p>
  * 乐团学生费用表 Mapper 接口
  * 乐团学生费用表 Mapper 接口

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/StudentCourseHomeworkReplyMapper.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.mapper;
 package com.ym.mec.education.mapper;
 
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ym.mec.education.entity.StudentCourseHomeworkReply;
 import com.ym.mec.education.entity.StudentCourseHomeworkReply;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
 
 
 /**
 /**
  * <p>
  * <p>

+ 4 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupStudentFeeMapper.xml

@@ -10,11 +10,14 @@
         <result column="course_fee_" property="courseFee" />
         <result column="course_fee_" property="courseFee" />
         <result column="create_time_" property="createTime" />
         <result column="create_time_" property="createTime" />
         <result column="update_time_" property="updateTime" />
         <result column="update_time_" property="updateTime" />
+        <result column="next_payment_date_" property="nextPaymentDate" />
+        <result column="latest_paid_time_" property="latestPaidTime" />
+        <result column="continuous_absenteeism_times_" property="continuousAbsenteeismTimes" />
     </resultMap>
     </resultMap>
 
 
     <!-- 通用查询结果列 -->
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
     <sql id="Base_Column_List">
-        id_, music_group_id_, user_id_, course_fee_, create_time_, update_time_
+        id_, music_group_id_, user_id_, course_fee_, create_time_, update_time_, next_payment_date_, latest_paid_time_, continuous_absenteeism_times_
     </sql>
     </sql>
 
 
 </mapper>
 </mapper>

+ 21 - 0
mec-education/src/main/java/com/ym/mec/education/req/HomeWorkDetailReq.java

@@ -0,0 +1,21 @@
+package com.ym.mec.education.req;
+
+import com.ym.mec.education.base.BaseQuery;
+import lombok.Data;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月25日 20:59
+ */
+@Data
+public class HomeWorkDetailReq extends BaseQuery {
+
+
+    private Integer workId;
+    private String  classGroupId;
+
+    private String musicGroupId;
+
+    private String userId;
+}

+ 4 - 0
mec-education/src/main/java/com/ym/mec/education/req/HomeWorkReq.java

@@ -12,4 +12,8 @@ import lombok.Data;
 public class HomeWorkReq extends BaseQuery {
 public class HomeWorkReq extends BaseQuery {
 
 
     private String name;
     private String name;
+
+    private String  classGroupId;
+
+    private String musicGroupId;
 }
 }

+ 17 - 0
mec-education/src/main/java/com/ym/mec/education/req/TeacherReq.java

@@ -0,0 +1,17 @@
+package com.ym.mec.education.req;
+
+import com.ym.mec.education.base.BaseQuery;
+import lombok.Data;
+import lombok.ToString;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月29日 10:02
+ */
+@Data
+@ToString
+public class TeacherReq extends BaseQuery {
+
+    private String name;
+}

+ 1 - 4
mec-education/src/main/java/com/ym/mec/education/resp/CourseScheduleResp.java

@@ -5,9 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
 import lombok.ToString;
 import lombok.ToString;
 import lombok.experimental.Accessors;
 import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
 import java.io.Serializable;
 import java.io.Serializable;
-import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -35,8 +33,7 @@ public class CourseScheduleResp implements Serializable {
     private String teacher;
     private String teacher;
 
 
     @ApiModelProperty(value = "最后提交时间")
     @ApiModelProperty(value = "最后提交时间")
-    @DateTimeFormat(pattern = "MM-dd HH:mm")
-    private Date lastCommitDate;
+    private String lastCommitDate;
 
 
     @ApiModelProperty(value = "到课比")
     @ApiModelProperty(value = "到课比")
     private String attendanceRate;
     private String attendanceRate;

+ 45 - 0
mec-education/src/main/java/com/ym/mec/education/resp/HomeWrokDetailResp.java

@@ -0,0 +1,45 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月26日 17:44
+ */
+
+@Data
+@ToString
+public class HomeWrokDetailResp implements Serializable {
+
+    private String name;
+
+    /**
+     * 图像
+     */
+    private String avatar;
+
+    private Integer userId;
+
+    private Integer classGroupId;
+
+    private String isReplied;
+
+    private String status;
+
+    private String remark;
+
+    private Integer score;
+
+    private String attachments;
+
+    private String groupName;
+
+    private String className;
+
+    private List<HomeworkReplyResp> HomeworkReplyList;
+}

+ 1 - 0
mec-education/src/main/java/com/ym/mec/education/resp/HomeWrokResp.java

@@ -36,4 +36,5 @@ public class HomeWrokResp implements Serializable {
     private Integer score;
     private Integer score;
 
 
     private String attachments;
     private String attachments;
+
 }
 }

+ 43 - 0
mec-education/src/main/java/com/ym/mec/education/resp/HomeworkReplyResp.java

@@ -0,0 +1,43 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author : chengp
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月28日 14:11
+ */
+@Data
+@ToString
+public class HomeworkReplyResp implements Serializable {
+
+
+    private Long id;
+    /**
+     * 作业编号
+     */
+    private Long studentCourseHomeworkId;
+    /**
+     * 留言人编号
+     */
+    private Integer userId;
+    /**
+     * 留言内容
+     */
+    private String content;
+
+
+    private Date createTime;
+    /**
+     * 父级编号
+     */
+    private Long parentId;
+
+    private String name;
+    private String avatar;
+}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/resp/StudentAttendanceStatisticsResp.java

@@ -22,7 +22,7 @@ public class StudentAttendanceStatisticsResp implements Serializable {
     private String studentName;
     private String studentName;
 
 
     @ApiModelProperty(value = "是否连续旷课")
     @ApiModelProperty(value = "是否连续旷课")
-    private boolean isTruant;
+    private boolean isTruant = false;
 
 
     @ApiModelProperty(value = "声部名称")
     @ApiModelProperty(value = "声部名称")
     private List<String> subjectName;
     private List<String> subjectName;

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/resp/StudentListResp.java

@@ -20,6 +20,6 @@ public class StudentListResp implements Serializable {
     @ApiModelProperty(value = "学员名称",required = true)
     @ApiModelProperty(value = "学员名称",required = true)
     private String studentName;
     private String studentName;
 
 
-    @ApiModelProperty(value = "学员迟到情况",required = true)
+    @ApiModelProperty(value = "学员连续迟到情况",required = true)
     private String studentAttendance;
     private String studentAttendance;
 }
 }

+ 24 - 0
mec-education/src/main/java/com/ym/mec/education/resp/TeacherResp.java

@@ -0,0 +1,24 @@
+package com.ym.mec.education.resp;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * @version V1.0
+ * @Description: TODO
+ * @date Date : 2019年09月29日 13:45
+ */
+@Data
+@ToString
+public class TeacherResp {
+
+    private String userId;
+
+    private String name;
+
+    private List<String> subjectName;
+
+    private List<String> className;
+}

+ 14 - 0
mec-education/src/main/java/com/ym/mec/education/service/IMusicGroupQuitService.java

@@ -0,0 +1,14 @@
+package com.ym.mec.education.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.entity.MusicGroupQuit;
+
+/**
+ * @program: mec
+ * @description: 退团
+ * @author: xw
+ * @create: 2019-09-29 12:52
+ */
+public interface IMusicGroupQuitService extends IService<MusicGroupQuit> {
+
+}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/IMusicGroupStudentFeeService.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.service;
 package com.ym.mec.education.service;
 
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.entity.MusicGroupStudentFee;
 import com.ym.mec.education.entity.MusicGroupStudentFee;
-import com.baomidou.mybatisplus.service.IService;
 
 
 /**
 /**
  * <p>
  * <p>

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/IStudentCourseHomeworkReplyService.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.service;
 package com.ym.mec.education.service;
 
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.entity.StudentCourseHomeworkReply;
 import com.ym.mec.education.entity.StudentCourseHomeworkReply;
-import com.baomidou.mybatisplus.service.IService;
 
 
 /**
 /**
  * <p>
  * <p>

+ 4 - 0
mec-education/src/main/java/com/ym/mec/education/service/IStudentCourseHomeworkService.java

@@ -1,8 +1,10 @@
 package com.ym.mec.education.service;
 package com.ym.mec.education.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.StudentCourseHomework;
 import com.ym.mec.education.entity.StudentCourseHomework;
+import com.ym.mec.education.req.HomeWorkDetailReq;
 import com.ym.mec.education.req.HomeWorkReq;
 import com.ym.mec.education.req.HomeWorkReq;
 
 
 /**
 /**
@@ -16,4 +18,6 @@ import com.ym.mec.education.req.HomeWorkReq;
 public interface IStudentCourseHomeworkService extends IService<StudentCourseHomework> {
 public interface IStudentCourseHomeworkService extends IService<StudentCourseHomework> {
 
 
     PageResponse workList(HomeWorkReq req);
     PageResponse workList(HomeWorkReq req);
+
+    BaseResponse getHomeWorkDetail(HomeWorkDetailReq req);
 }
 }

+ 3 - 0
mec-education/src/main/java/com/ym/mec/education/service/ITeacherService.java

@@ -1,7 +1,9 @@
 package com.ym.mec.education.service;
 package com.ym.mec.education.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.Teacher;
 import com.ym.mec.education.entity.Teacher;
+import com.ym.mec.education.req.TeacherReq;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -13,4 +15,5 @@ import com.ym.mec.education.entity.Teacher;
  */
  */
 public interface ITeacherService extends IService<Teacher> {
 public interface ITeacherService extends IService<Teacher> {
 
 
+    PageResponse teacherList(TeacherReq req);
 }
 }

+ 19 - 12
mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -6,22 +6,24 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Lists;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.entity.ClassGroup;
 import com.ym.mec.education.entity.ClassGroupStudentMapper;
 import com.ym.mec.education.entity.ClassGroupStudentMapper;
-import com.ym.mec.education.entity.StudentAttendance;
+import com.ym.mec.education.entity.MusicGroupStudentFee;
 import com.ym.mec.education.entity.SysUser;
 import com.ym.mec.education.entity.SysUser;
-import com.ym.mec.education.enums.StudentAttendanceStatusEnum;
 import com.ym.mec.education.mapper.ClassGroupStudentMapperMapper;
 import com.ym.mec.education.mapper.ClassGroupStudentMapperMapper;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.resp.ClassStudentResp;
 import com.ym.mec.education.resp.ClassStudentResp;
 import com.ym.mec.education.resp.StudentListResp;
 import com.ym.mec.education.resp.StudentListResp;
+import com.ym.mec.education.service.IClassGroupService;
 import com.ym.mec.education.service.IClassGroupStudentMapperService;
 import com.ym.mec.education.service.IClassGroupStudentMapperService;
-import com.ym.mec.education.service.IStudentAttendanceService;
+import com.ym.mec.education.service.IMusicGroupStudentFeeService;
 import com.ym.mec.education.service.ISysUserService;
 import com.ym.mec.education.service.ISysUserService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
+import java.util.Optional;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -35,9 +37,11 @@ import java.util.Objects;
 public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupStudentMapperMapper, ClassGroupStudentMapper> implements IClassGroupStudentMapperService {
 public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupStudentMapperMapper, ClassGroupStudentMapper> implements IClassGroupStudentMapperService {
 
 
     @Autowired
     @Autowired
-    private IStudentAttendanceService studentAttendanceService;
-    @Autowired
     private ISysUserService sysUserService;
     private ISysUserService sysUserService;
+    @Autowired
+    private IClassGroupService classGroupService;
+    @Autowired
+    private IMusicGroupStudentFeeService musicGroupStudentFeeService;
 
 
 
 
     @Override
     @Override
@@ -45,6 +49,7 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
         if (Objects.isNull(classGroupReq.getGroupId())) {
         if (Objects.isNull(classGroupReq.getGroupId())) {
             return PageResponse.errorParam();
             return PageResponse.errorParam();
         }
         }
+        ClassGroup classGroup = classGroupService.getById(classGroupReq.getGroupId());
         Page<ClassGroupStudentMapper> classGroupStudentMapperPage = new Page<ClassGroupStudentMapper>(classGroupReq.getPageNo(), classGroupReq.getPageSize());
         Page<ClassGroupStudentMapper> classGroupStudentMapperPage = new Page<ClassGroupStudentMapper>(classGroupReq.getPageNo(), classGroupReq.getPageSize());
         QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
         QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
         classGroupStudentMapperQueryWrapper.lambda().eq(true, ClassGroupStudentMapper::getClassGroupId, classGroupReq.getGroupId());
         classGroupStudentMapperQueryWrapper.lambda().eq(true, ClassGroupStudentMapper::getClassGroupId, classGroupReq.getGroupId());
@@ -53,15 +58,17 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
         BeanUtils.copyProperties(page, studentListRespPage);
         BeanUtils.copyProperties(page, studentListRespPage);
         List<StudentListResp> list = Lists.newArrayList();
         List<StudentListResp> list = Lists.newArrayList();
         page.getRecords().forEach(item -> {
         page.getRecords().forEach(item -> {
-            QueryWrapper<StudentAttendance> queryWrapper = new QueryWrapper<>();
-            //请假 旷课正常上课次数
-            queryWrapper.lambda().eq(true, StudentAttendance::getUserId, item.getUserId())
-                    .in(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.TRUANT.getCode(),
-                            StudentAttendanceStatusEnum.LEAVE.getCode());
-            int count = studentAttendanceService.count(queryWrapper);
             SysUser sysUser = sysUserService.getById(item.getUserId());
             SysUser sysUser = sysUserService.getById(item.getUserId());
             StudentListResp studentRegistrationResp = new StudentListResp()
             StudentListResp studentRegistrationResp = new StudentListResp()
-                    .setStudentName(sysUser.getRealName()).setStudentAttendance("连续缺到" + count + "次");
+                    .setStudentName(sysUser.getRealName());
+            if (Objects.nonNull(classGroup) && Objects.nonNull(classGroup.getMusicGroupId())) {
+                QueryWrapper<MusicGroupStudentFee> musicGroupStudentFeeQueryWrapper = new QueryWrapper<MusicGroupStudentFee>();
+                musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
+                        .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
+                MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
+                Optional.of(musicGroupStudentFee).ifPresent(groupStudentFee -> studentRegistrationResp.
+                        setStudentAttendance("连续缺到" + groupStudentFee.getContinuousAbsenteeismTimes() + "次"));
+            }
             list.add(studentRegistrationResp);
             list.add(studentRegistrationResp);
         });
         });
         studentListRespPage.setRecords(list);
         studentListRespPage.setRecords(list);

+ 8 - 2
mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java

@@ -46,6 +46,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
     private ISubjectService subjectService;
     private ISubjectService subjectService;
     @Autowired
     @Autowired
     private IStudentAttendanceService studentAttendanceService;
     private IStudentAttendanceService studentAttendanceService;
+    @Autowired
+    private IMusicGroupQuitService musicGroupQuitService;
 
 
     @Override
     @Override
     public PageResponse getPage(ClassGroupReq classGroupReq) {
     public PageResponse getPage(ClassGroupReq classGroupReq) {
@@ -119,7 +121,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
             List<StudentAttendance> studentAttendanceList = studentAttendanceService.list(studentAttendanceQueryWrapper);
             List<StudentAttendance> studentAttendanceList = studentAttendanceService.list(studentAttendanceQueryWrapper);
             if (!CollectionUtils.isEmpty(studentAttendanceList)) {
             if (!CollectionUtils.isEmpty(studentAttendanceList)) {
                 studentAttendanceList.stream().findFirst().ifPresent(studentAttendance ->
                 studentAttendanceList.stream().findFirst().ifPresent(studentAttendance ->
-                        courseScheduleResp.setLastCommitDate(studentAttendance.getCreateTime()));
+                        courseScheduleResp.setLastCommitDate(DateUtil.date2String(studentAttendance.getCreateTime(), DateUtil.DATE_FORMAT_HOUR)));
             }
             }
             QueryWrapper<StudentAttendance> leaveWrapper = new QueryWrapper<>();
             QueryWrapper<StudentAttendance> leaveWrapper = new QueryWrapper<>();
             QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
             QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
@@ -158,7 +160,11 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
                     courseScheduleResp.setStudentNum(classGroup.getStudentNum());
                     courseScheduleResp.setStudentNum(classGroup.getStudentNum());
                 }
                 }
             }
             }
-            //TODO 暂缺退团人数
+            //退团人数
+            QueryWrapper<MusicGroupQuit> musicGroupQuitQueryWrapper = new QueryWrapper<>();
+            musicGroupQuitQueryWrapper.lambda().eq(true, MusicGroupQuit::getMusicGroupId, classGroup.getMusicGroupId());
+            int leagueNum = musicGroupQuitService.count(musicGroupQuitQueryWrapper);
+            courseScheduleResp.setLeagueNum(leagueNum);
         }
         }
         return BaseResponse.success(courseScheduleResp);
         return BaseResponse.success(courseScheduleResp);
     }
     }

+ 18 - 0
mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupQuitServiceImpl.java

@@ -0,0 +1,18 @@
+package com.ym.mec.education.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ym.mec.education.entity.MusicGroupQuit;
+import com.ym.mec.education.mapper.MusicGroupQuitMapper;
+import com.ym.mec.education.service.IMusicGroupQuitService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @program: mec
+ * @description: 退团实现类
+ * @author: xw
+ * @create: 2019-09-29 12:52
+ */
+@Service("IMusicGroupQuitService")
+public class MusicGroupQuitServiceImpl extends ServiceImpl<MusicGroupQuitMapper, MusicGroupQuit> implements IMusicGroupQuitService {
+
+}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupStudentFeeServiceImpl.java

@@ -1,9 +1,9 @@
 package com.ym.mec.education.service.impl;
 package com.ym.mec.education.service.impl;
 
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.education.entity.MusicGroupStudentFee;
 import com.ym.mec.education.entity.MusicGroupStudentFee;
 import com.ym.mec.education.mapper.MusicGroupStudentFeeMapper;
 import com.ym.mec.education.mapper.MusicGroupStudentFeeMapper;
 import com.ym.mec.education.service.IMusicGroupStudentFeeService;
 import com.ym.mec.education.service.IMusicGroupStudentFeeService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 /**
 /**

+ 15 - 2
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java

@@ -21,8 +21,10 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
+
 import java.util.List;
 import java.util.List;
 import java.util.Objects;
 import java.util.Objects;
+import java.util.Optional;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -45,10 +47,12 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
     private ISysUserService userService;
     private ISysUserService userService;
     @Autowired
     @Autowired
     private IClassGroupStudentMapperService classGroupStudentMapperService;
     private IClassGroupStudentMapperService classGroupStudentMapperService;
+    @Autowired
+    private IMusicGroupStudentFeeService musicGroupStudentFeeService;
 
 
     @Override
     @Override
     public PageResponse getPage(ClassGroupReq classGroupReq) {
     public PageResponse getPage(ClassGroupReq classGroupReq) {
-        if (Objects.isNull(classGroupReq.getGroupId())){
+        if (Objects.isNull(classGroupReq.getGroupId())) {
             return PageResponse.errorParam();
             return PageResponse.errorParam();
         }
         }
         Page<StudentAttendance> pageParam = new Page(classGroupReq.getPageNo(), classGroupReq.getPageSize());
         Page<StudentAttendance> pageParam = new Page(classGroupReq.getPageNo(), classGroupReq.getPageSize());
@@ -153,7 +157,16 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
                             resp.setStudentName(user.getRealName());
                             resp.setStudentName(user.getRealName());
                         }
                         }
                         resp.setSubjectName(subjectNameList);
                         resp.setSubjectName(subjectNameList);
-                        //TODO 暂时缺少是否连续旷课
+                        //是否连续旷课
+                        QueryWrapper<MusicGroupStudentFee> musicGroupStudentFeeQueryWrapper = new QueryWrapper<MusicGroupStudentFee>();
+                        musicGroupStudentFeeQueryWrapper.lambda().eq(true, MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
+                                .eq(true, MusicGroupStudentFee::getUserId, item.getUserId());
+                        MusicGroupStudentFee musicGroupStudentFee = musicGroupStudentFeeService.getOne(musicGroupStudentFeeQueryWrapper);
+                        if (Objects.nonNull(musicGroupStudentFee) && Objects.nonNull(musicGroupStudentFee.getContinuousAbsenteeismTimes())) {
+                            if (musicGroupStudentFee.getContinuousAbsenteeismTimes() > 1) {
+                                resp.setTruant(true);
+                            }
+                        }
                         //到课天数
                         //到课天数
                         QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
                         QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
                         normalWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())
                         normalWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseScheduleReq.getCourseScheduleId())

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkReplyServiceImpl.java

@@ -1,9 +1,9 @@
 package com.ym.mec.education.service.impl;
 package com.ym.mec.education.service.impl;
 
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.education.entity.StudentCourseHomeworkReply;
 import com.ym.mec.education.entity.StudentCourseHomeworkReply;
 import com.ym.mec.education.mapper.StudentCourseHomeworkReplyMapper;
 import com.ym.mec.education.mapper.StudentCourseHomeworkReplyMapper;
 import com.ym.mec.education.service.IStudentCourseHomeworkReplyService;
 import com.ym.mec.education.service.IStudentCourseHomeworkReplyService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 /**
 /**

+ 59 - 4
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -4,15 +4,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.base.PageResponse;
-import com.ym.mec.education.entity.StudentCourseHomework;
-import com.ym.mec.education.entity.SysUser;
+import com.ym.mec.education.entity.*;
 import com.ym.mec.education.enums.ReturnCodeEnum;
 import com.ym.mec.education.enums.ReturnCodeEnum;
 import com.ym.mec.education.mapper.StudentCourseHomeworkMapper;
 import com.ym.mec.education.mapper.StudentCourseHomeworkMapper;
+import com.ym.mec.education.req.HomeWorkDetailReq;
 import com.ym.mec.education.req.HomeWorkReq;
 import com.ym.mec.education.req.HomeWorkReq;
+import com.ym.mec.education.resp.HomeWrokDetailResp;
 import com.ym.mec.education.resp.HomeWrokResp;
 import com.ym.mec.education.resp.HomeWrokResp;
-import com.ym.mec.education.service.IStudentCourseHomeworkService;
-import com.ym.mec.education.service.ISysUserService;
+import com.ym.mec.education.resp.HomeworkReplyResp;
+import com.ym.mec.education.service.*;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -38,7 +40,14 @@ public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseH
     @Autowired
     @Autowired
     private ISysUserService sysUserService;
     private ISysUserService sysUserService;
 
 
+    @Autowired
+    private IClassGroupService classGroupService;
+
+    @Autowired
+    private IMusicGroupService musicGroupService;
 
 
+    @Autowired
+    private IStudentCourseHomeworkReplyService studentCourseHomeworkReplyService;
 
 
     @Override
     @Override
     public PageResponse workList(HomeWorkReq req) {
     public PageResponse workList(HomeWorkReq req) {
@@ -87,4 +96,50 @@ public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseH
         response.setTotal(Math.toIntExact(homeworkIPage.getTotal()));
         response.setTotal(Math.toIntExact(homeworkIPage.getTotal()));
         return response;
         return response;
     }
     }
+
+    /**
+     * 查询作业详情
+     * @param req
+     * @return
+     */
+    @Override
+    public BaseResponse getHomeWorkDetail(HomeWorkDetailReq req) {
+
+        HomeWrokDetailResp resp = new HomeWrokDetailResp();
+        MusicGroup musicGroup = musicGroupService.getById(req.getMusicGroupId());
+        if(musicGroup == null){
+            return  BaseResponse.noDataExists();
+        }
+        ClassGroup classGroup =  classGroupService.getById(req.getClassGroupId());
+        if(classGroup == null){
+            return  BaseResponse.noDataExists();
+        }
+        StudentCourseHomework homework = this.getById(req.getWorkId());
+        if(homework == null){
+            return  BaseResponse.noDataExists();
+        }
+        BeanUtils.copyProperties(homework,resp);
+        resp.setGroupName(musicGroup.getName());
+        resp.setClassName(classGroup.getName());
+
+        //回复留言
+        QueryWrapper<StudentCourseHomeworkReply> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("student_course_homework_id_",req.getWorkId());
+        List<StudentCourseHomeworkReply> replyList = studentCourseHomeworkReplyService.list(queryWrapper);
+        List<HomeworkReplyResp> replyResps = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(replyList)){
+            replyList.forEach(r ->{
+                HomeworkReplyResp replyResp = new HomeworkReplyResp();
+                BeanUtils.copyProperties(r,replyResp);
+                SysUser sysUser = sysUserService.getById(r.getUserId());
+                if(sysUser != null){
+                    replyResp.setName(sysUser.getRealName());
+                    replyResp.setAvatar(sysUser.getAvatar());
+                }
+                replyResps.add(replyResp);
+            });
+            resp.setHomeworkReplyList(replyResps);
+        }
+        return BaseResponse.success(resp);
+    }
 }
 }

+ 64 - 0
mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherServiceImpl.java

@@ -1,10 +1,28 @@
 package com.ym.mec.education.service.impl;
 package com.ym.mec.education.service.impl;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.entity.Subject;
+import com.ym.mec.education.entity.SysUser;
 import com.ym.mec.education.entity.Teacher;
 import com.ym.mec.education.entity.Teacher;
 import com.ym.mec.education.mapper.TeacherMapper;
 import com.ym.mec.education.mapper.TeacherMapper;
+import com.ym.mec.education.req.TeacherReq;
+import com.ym.mec.education.resp.TeacherResp;
+import com.ym.mec.education.service.ISubjectService;
+import com.ym.mec.education.service.ISysUserService;
 import com.ym.mec.education.service.ITeacherService;
 import com.ym.mec.education.service.ITeacherService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
 
 
 /**
 /**
  * <p>
  * <p>
@@ -17,4 +35,50 @@ import org.springframework.stereotype.Service;
 @Service("ITeacherService")
 @Service("ITeacherService")
 public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements ITeacherService {
 public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements ITeacherService {
 
 
+    @Autowired
+    private ISysUserService sysUserService;
+
+    @Autowired
+    private ISubjectService subjectService;
+
+    @Override
+    public PageResponse teacherList(TeacherReq req) {
+        PageResponse response = new PageResponse();
+        QueryWrapper<SysUser> userQueryWrapper = new QueryWrapper<>();
+        List<SysUser> userList = null;
+        if(req != null && StringUtils.isEmpty(req.getName())){
+            userQueryWrapper.like("real_name_",req.getName());
+            userList = sysUserService.list(userQueryWrapper);
+        }
+        QueryWrapper<Teacher> queryWrapper = new QueryWrapper<>();
+        List<Integer> userIds = null;
+        if(!CollectionUtils.isEmpty(userList)){
+            userIds = userList.stream().map(SysUser::getId).collect(Collectors.toList());
+            queryWrapper.in("id_",userIds);
+        }
+
+
+        IPage<Teacher> page = new Page(req.getPageNo() == null ? 1 : req.getPageNo(),req.getPageSize() == null ? 10 : req.getPageSize());
+        IPage<Teacher> teacherIPage = this.page(page,queryWrapper);
+
+        List<Teacher> teacherList = teacherIPage.getRecords();
+        List<TeacherResp> teacherRespList = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(teacherList)){
+            teacherList.forEach(e ->{
+                TeacherResp teacherResp = new TeacherResp();
+                String ids[] = e.getSubjectId().split(",");
+                List<String> stringB = Arrays.asList(ids);
+                QueryWrapper<Subject> queryWrapperSub = new QueryWrapper<>();
+                queryWrapperSub.in("id_", stringB);
+                List<Subject> subjectList = subjectService.list(queryWrapperSub);
+                if (!CollectionUtils.isEmpty(subjectList)) {
+                    List<String> subName = subjectList.stream().map(Subject::getName).collect(Collectors.toList());
+                }
+
+            });
+
+        }
+
+        return null;
+    }
 }
 }

+ 3 - 5
mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java

@@ -19,14 +19,12 @@ public class DateUtil {
     private static final String DATE_FORMAT_CHINESE = "MM月dd日";
     private static final String DATE_FORMAT_CHINESE = "MM月dd日";
     private static final String TIME_FORMAT = "HH:mm";
     private static final String TIME_FORMAT = "HH:mm";
     public static final String DATE_FORMAT = "MM-dd";
     public static final String DATE_FORMAT = "MM-dd";
+    public static final String DATE_FORMAT_HOUR = "MM-dd HH:mm";
     private static ThreadLocal<DateFormat> threadLocal = new ThreadLocal<DateFormat>();
     private static ThreadLocal<DateFormat> threadLocal = new ThreadLocal<DateFormat>();
 
 
     public static DateFormat getDateFormat(String dateFormat) {
     public static DateFormat getDateFormat(String dateFormat) {
-        DateFormat df = threadLocal.get();
-        if (df == null) {
-            df = new SimpleDateFormat(dateFormat);
-            threadLocal.set(df);
-        }
+        DateFormat df = new SimpleDateFormat(dateFormat);
+        threadLocal.set(df);
         return df;
         return df;
     }
     }
 
 

+ 1 - 1
mec-student/pom.xml

@@ -50,7 +50,7 @@
 			<groupId>com.ym</groupId>
 			<groupId>com.ym</groupId>
 			<artifactId>mec-biz</artifactId>
 			<artifactId>mec-biz</artifactId>
 		</dependency>
 		</dependency>
-	</dependencies>
+    </dependencies>
 	<build>
 	<build>
 		<plugins>
 		<plugins>
 			<plugin>
 			<plugin>

+ 36 - 17
mec-student/src/main/java/com/ym/mec/student/controller/RegisterController.java

@@ -2,16 +2,14 @@ package com.ym.mec.student.controller;
 
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfo;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
-import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
-import com.ym.mec.biz.dal.entity.StudentRegistration;
-import com.ym.mec.biz.dal.entity.Subject;
-import com.ym.mec.biz.service.MusicGroupSubjectGoodsGroupService;
+import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
+import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
 import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiImplicitParams;
@@ -20,7 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
-import java.util.List;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 
 @RequestMapping("register")
 @RequestMapping("register")
 @Api(tags = "乐团注册")
 @Api(tags = "乐团注册")
@@ -35,30 +35,49 @@ public class RegisterController extends BaseController {
     private MusicGroupSubjectPlanService musicGroupSubjectPlanService;
     private MusicGroupSubjectPlanService musicGroupSubjectPlanService;
     @Resource
     @Resource
     private SysUserFeignService sysUserFeignService;
     private SysUserFeignService sysUserFeignService;
+    @Autowired
+    private MusicGroupService musicGroupService;
 
 
 
 
     @ApiOperation(value = "新增学生报名信息")
     @ApiOperation(value = "新增学生报名信息")
     @PostMapping("/add")
     @PostMapping("/add")
     public Object add(StudentRegistration studentRegistration) {
     public Object add(StudentRegistration studentRegistration) {
-        studentRegistrationService.insert(studentRegistration);
-        return succeed(studentRegistration);
+        MusicGroup musicGroup = musicGroupService.get(studentRegistration.getMusicGroupId().toString());
+        studentRegistration.setOrganId(musicGroup.getOrganId());
+        return succeed(studentRegistrationService.addStudent(studentRegistration));
     }
     }
 
 
-    @ApiOperation(value = "通过乐团编号获取声部列表")
-    @GetMapping("/findSubByMusicGroupId")
+    @ApiOperation(value = "获取乐团报名所需信息")
+    @GetMapping("/getMusicGroupRegInfo")
     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
-    public Object findSubByMusicGroupId(Integer musicGroupId) {
-        return succeed(subjectService.findSubByMusicGroupId(musicGroupId));
+    public HttpResponseResult getMusicGroupRegInfo(Integer musicGroupId) {
+        return succeed(musicGroupSubjectPlanService.getMusicGroupRegInfo(musicGroupId));
     }
     }
 
 
 
 
-    @ApiOperation(value = "获取乐团声部乐器和辅件")
-    @GetMapping("/findGoodsGroups")
+    @ApiOperation(value = "获取乐团声部费用信息及乐器和辅件")
+    @GetMapping("/getSubjectGoodsAndInfo")
     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
-    public Object findGoodsGroups(Integer musicGroupId) {
+    public HttpResponseResult getSubjectGoodsAndInfo(Integer musicGroupId) {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         SysUser sysUser = sysUserFeignService.queryUserInfo();
-        MusicGroupSubjectGoodsAndInfo subjectGoodsAndInfo = musicGroupSubjectPlanService.getSubjectGoodsAndInfo(musicGroupId, 1);
+        MusicGroupSubjectGoodsAndInfoDto subjectGoodsAndInfo = musicGroupSubjectPlanService.getSubjectGoodsAndInfo(musicGroupId, 1);
         return succeed(subjectGoodsAndInfo);
         return succeed(subjectGoodsAndInfo);
     }
     }
 
 
+    @ApiOperation(value = "乐团报名支付")
+    @GetMapping("/pay")
+    @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
+    public HttpResponseResult Pay(StudentPaymentOrder studentPaymentOrder) {
+        Map<String, Object> rqMap = new LinkedHashMap<String, Object>();
+        rqMap.put("merNo", "07654478");
+        rqMap.put("version", "v1");
+        rqMap.put("notifyUrl", "https://notify.cpm");
+        rqMap.put("timestamp", new Date().getTime());
+        rqMap.put("apiContent", "ap");
+        rqMap.put("signType", "signType");
+        rqMap.put("sign", "sign");
+        rqMap.put("payUrl", "http://pay.url");
+        return succeed(rqMap);
+    }
+
 }
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherAttendanceController.java → mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java

@@ -1,4 +1,4 @@
-package com.ym.mec.web.controller.teacher;
+package com.ym.mec.teacher.controller;
 
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherCourseHomeworkReplyController.java → mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseHomeworkReplyController.java

@@ -1,4 +1,4 @@
-package com.ym.mec.web.controller.teacher;
+package com.ym.mec.teacher.controller;
 
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;

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

@@ -1,15 +1,14 @@
 package com.ym.mec.teacher.controller;
 package com.ym.mec.teacher.controller;
 
 
+import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
 import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 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.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import java.util.Date;
 import java.util.Date;
 
 
@@ -24,6 +23,8 @@ public class TeacherCourseScheduleController extends BaseController {
 
 
     @Autowired
     @Autowired
     private CourseScheduleService scheduleService;
     private CourseScheduleService scheduleService;
+    @Autowired
+    private StudentAttendanceService studentAttendanceService;
 
 
     @ApiOperation(value = "根据月份获取乐团在该月有课的日期")
     @ApiOperation(value = "根据月份获取乐团在该月有课的日期")
     @GetMapping("/getCourseScheduleDateByMonth")
     @GetMapping("/getCourseScheduleDateByMonth")
@@ -37,4 +38,16 @@ public class TeacherCourseScheduleController extends BaseController {
         return succeed(scheduleService.getTeacherCourseSchedulesWithDate(date));
         return succeed(scheduleService.getTeacherCourseSchedulesWithDate(date));
     }
     }
 
 
+    @ApiOperation(value = "根据课程ID查询正在或即将开始的课程")
+    @GetMapping("/getCurrentCourseDetail/{courseID}")
+    public Object getCurrentCourseDetail(@ApiParam(value = "课程ID", required = true) @PathVariable("courseID") Long courseID){
+        return succeed(scheduleService.getCurrentCourseDetail(courseID));
+    }
+
+    @ApiOperation(value = "根据班级ID获取当前课程的学生")
+    @GetMapping("/getCurrentCourseStudents")
+    public Object getCurrentCourseStudents(@RequestBody StudentAttendanceQueryInfo queryInfo){
+        return succeed(studentAttendanceService.getCurrentCourseStudents(queryInfo));
+    }
+
 }
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherVipGroupController.java → mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherVipGroupController.java

@@ -1,4 +1,4 @@
-package com.ym.mec.web.controller.teacher;
+package com.ym.mec.teacher.controller;
 
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;

+ 4 - 4
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java

@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
-import com.ym.mec.biz.dal.dto.HighClassGroup;
+import com.ym.mec.biz.dal.dto.HighClassGroupDto;
 import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.ClassGroupService;
@@ -51,11 +51,11 @@ public class ClassGroupController extends BaseController {
 
 
     @ApiOperation(value = "新增提高班")
     @ApiOperation(value = "新增提高班")
     @PostMapping("/addHighClass")
     @PostMapping("/addHighClass")
-    public Object addHighClass(@ApiParam(value = "乐团提高班json", required = true) @RequestParam List<HighClassGroup> HighClassGroupList) throws Exception {
-        if (HighClassGroupList.size() <= 0) {
+    public Object addHighClass(@ApiParam(value = "乐团提高班json", required = true) @RequestParam List<HighClassGroupDto> highClassGroupDtoList) throws Exception {
+        if (highClassGroupDtoList.size() <= 0) {
             return failed("参数不合法");
             return failed("参数不合法");
         }
         }
-        return succeed(classGroupService.addHighClassGroup(HighClassGroupList));
+        return succeed(classGroupService.addHighClassGroup(highClassGroupDtoList));
     }
     }
 
 
     @ApiOperation(value = "删除班级")
     @ApiOperation(value = "删除班级")

+ 24 - 25
mec-web/src/test/java/com/ym/webApplicationTest.java

@@ -1,40 +1,31 @@
 package com.ym;
 package com.ym;
 
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-
-import com.ym.mec.biz.dal.dao.VipGroupDao;
+import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.dto.CourseScheduleDto;
 import com.ym.mec.biz.dal.dto.StudentVipGroupDetailDto;
 import com.ym.mec.biz.dal.dto.StudentVipGroupDetailDto;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.entity.StudentAttendance;
+import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
+import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.common.security.SecurityUtils;
+import com.ym.mec.web.WebApplication;
 import junit.framework.TestCase;
 import junit.framework.TestCase;
-
 import org.junit.Test;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
 import org.springframework.test.context.junit4.SpringRunner;
 import org.springframework.test.context.junit4.SpringRunner;
 import org.springframework.util.MultiValueMap;
 import org.springframework.util.MultiValueMap;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.client.RestTemplate;
 
 
-import com.ym.mec.biz.dal.dao.ClassGroupDao;
-import com.ym.mec.biz.dal.dao.CourseScheduleDao;
-import com.ym.mec.biz.dal.dao.StudentAttendanceDao;
-import com.ym.mec.biz.dal.dto.CourseScheduleDto;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.entity.StudentAttendance;
-import com.ym.mec.biz.dal.enums.StudentAttendanceStatusEnum;
-import com.ym.mec.biz.service.CourseScheduleService;
-import com.ym.mec.common.security.SecurityUtils;
-import com.ym.mec.web.WebApplication;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 
 /**
 /**
  * Unit test for simple App.
  * Unit test for simple App.
@@ -62,6 +53,8 @@ public class webApplicationTest
 
 
     @Autowired
     @Autowired
     private VipGroupDao vipGroupDao;
     private VipGroupDao vipGroupDao;
+    @Autowired
+    private MusicGroupStudentFeeDao studentFeeDao;
 
 
     @Test
     @Test
     public void test(){
     public void test(){
@@ -148,4 +141,10 @@ public class webApplicationTest
         System.out.println(vipGroupDetail.getAvatar());
         System.out.println(vipGroupDetail.getAvatar());
     }
     }
 
 
+    @Test
+    public void test7(){
+        int i = studentFeeDao.updateStudentAbsenteeismTimes(1, 1, 0);
+        System.out.println(i);
+    }
+
 }
 }