Pārlūkot izejas kodu

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

周箭河 5 gadi atpakaļ
vecāks
revīzija
0fc9e8bef7
30 mainītis faili ar 577 papildinājumiem un 101 dzēšanām
  1. 1 0
      cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml
  2. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  3. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupApplyBaseInfoDto.java
  4. 12 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupTeacherSalary.java
  5. 20 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleComplaints.java
  6. 103 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleStudentPayment.java
  7. 31 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleTeacherSalary.java
  8. 11 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/VipGroup.java
  9. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleStudentPaymentService.java
  10. 31 26
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  11. 25 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  12. 23 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleStudentPaymentServiceImpl.java
  13. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  14. 14 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupActivityServiceImpl.java
  15. 60 10
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  16. 10 0
      mec-biz/src/main/resources/config/mybatis/ClassGroupTeacherSalaryMapper.xml
  17. 9 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleComplaintsMapper.xml
  18. 84 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  19. 12 4
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  20. 7 6
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  21. 38 0
      mec-education/src/main/java/com/ym/mec/education/controller/UserController.java
  22. 4 0
      mec-education/src/main/java/com/ym/mec/education/req/HomeWorkReq.java
  23. 2 2
      mec-education/src/main/java/com/ym/mec/education/req/TeacherReq.java
  24. 2 0
      mec-education/src/main/java/com/ym/mec/education/resp/TeacherDailyScheduleResp.java
  25. 6 10
      mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java
  26. 6 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentAttendanceServiceImpl.java
  27. 6 0
      mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java
  28. 7 17
      mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherServiceImpl.java
  29. 6 0
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupActivityController.java
  30. 3 3
      mec-workflow/src/main/resources/flows/viprefund.snaker

+ 1 - 0
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -11,6 +11,7 @@
 		<result column="title_" property="title" />
 		<result column="content_" property="content" />
 		<result column="cover_image_" property="coverImage" />
+		<result column="link_url_" property="linkUrl"/>
 		<result column="type_" property="type"/>
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
 		<result column="create_time_" property="createTime" />

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

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

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupApplyBaseInfoDto.java

@@ -23,6 +23,28 @@ public class VipGroupApplyBaseInfoDto extends VipGroup {
     @ApiModelProperty(value = "预计招生人数",hidden = true)
     private Integer expectStudentNum;
 
+    @ApiModelProperty(value = "教师线上课课酬")
+    private BigDecimal onlineTeacherSalary;
+
+    @ApiModelProperty(value = "教师线下课课酬")
+    private BigDecimal offlineTeacherSalary;
+
+    public BigDecimal getOnlineTeacherSalary() {
+        return onlineTeacherSalary;
+    }
+
+    public void setOnlineTeacherSalary(BigDecimal onlineTeacherSalary) {
+        this.onlineTeacherSalary = onlineTeacherSalary;
+    }
+
+    public BigDecimal getOfflineTeacherSalary() {
+        return offlineTeacherSalary;
+    }
+
+    public void setOfflineTeacherSalary(BigDecimal offlineTeacherSalary) {
+        this.offlineTeacherSalary = offlineTeacherSalary;
+    }
+
     public Integer getAllCourseNum() {
         return allCourseNum;
     }

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ClassGroupTeacherSalary.java

@@ -1,10 +1,14 @@
 package com.ym.mec.biz.dal.entity;
 
+import java.math.BigDecimal;
+
 public class ClassGroupTeacherSalary extends ClassGroupTeacherMapper {
     /**
      * 课时长
      */
     private Integer duration;
+    
+    private BigDecimal onlineClassesSalary;
 
     public Integer getDuration() {
         return duration;
@@ -13,4 +17,12 @@ public class ClassGroupTeacherSalary extends ClassGroupTeacherMapper {
     public void setDuration(Integer duration) {
         this.duration = duration;
     }
+
+	public BigDecimal getOnlineClassesSalary() {
+		return onlineClassesSalary;
+	}
+
+	public void setOnlineClassesSalary(BigDecimal onlineClassesSalary) {
+		this.onlineClassesSalary = onlineClassesSalary;
+	}
 }

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleComplaints.java

@@ -36,6 +36,10 @@ public class CourseScheduleComplaints {
 	/**  */
 	private java.util.Date updateTime;
 	
+	private Double teacherLiabilityRatio;
+	
+	private Double studentLiabilityRatio;
+	
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -108,6 +112,22 @@ public class CourseScheduleComplaints {
 		return this.updateTime;
 	}
 			
+	public Double getStudentLiabilityRatio() {
+		return studentLiabilityRatio;
+	}
+
+	public void setStudentLiabilityRatio(Double studentLiabilityRatio) {
+		this.studentLiabilityRatio = studentLiabilityRatio;
+	}
+
+	public Double getTeacherLiabilityRatio() {
+		return teacherLiabilityRatio;
+	}
+
+	public void setTeacherLiabilityRatio(Double teacherLiabilityRatio) {
+		this.teacherLiabilityRatio = teacherLiabilityRatio;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 103 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleStudentPayment.java

@@ -0,0 +1,103 @@
+package com.ym.mec.biz.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(course_schedule_student_payment):
+ */
+public class CourseScheduleStudentPayment {
+
+	/**  */
+	private Long id;
+	
+	/**  */
+	private Long courseScheduleId;
+	
+	/**  */
+	private Integer userId;
+	
+	/** 预计价格 */
+	private java.math.BigDecimal expectPrice;
+	
+	/**  */
+	private java.math.BigDecimal actualPrice;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/** 结算时间 */
+	private java.util.Date settlementTime;
+	
+	public void setId(Long id){
+		this.id = id;
+	}
+	
+	public Long getId(){
+		return this.id;
+	}
+			
+	public void setCourseScheduleId(Long courseScheduleId){
+		this.courseScheduleId = courseScheduleId;
+	}
+	
+	public Long getCourseScheduleId(){
+		return this.courseScheduleId;
+	}
+			
+	public void setUserId(Integer userId){
+		this.userId = userId;
+	}
+	
+	public Integer getUserId(){
+		return this.userId;
+	}
+			
+	public void setExpectPrice(java.math.BigDecimal expectPrice){
+		this.expectPrice = expectPrice;
+	}
+	
+	public java.math.BigDecimal getExpectPrice(){
+		return this.expectPrice;
+	}
+			
+	public void setActualPrice(java.math.BigDecimal actualPrice){
+		this.actualPrice = actualPrice;
+	}
+	
+	public java.math.BigDecimal getActualPrice(){
+		return this.actualPrice;
+	}
+			
+	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 setSettlementTime(java.util.Date settlementTime){
+		this.settlementTime = settlementTime;
+	}
+	
+	public java.util.Date getSettlementTime(){
+		return this.settlementTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 31 - 9
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleTeacherSalary.java

@@ -19,8 +19,8 @@ public class CourseScheduleTeacherSalary {
 	/**  */
 	private Integer userId;
 	
-	/** 薪水 */
-	private long salary;
+	/** 预计薪水 */
+	private java.math.BigDecimal expectSalary;
 	
 	/**  */
 	private java.util.Date createTime;
@@ -29,7 +29,13 @@ public class CourseScheduleTeacherSalary {
 	private java.util.Date createUpdate;
 	
 	/** 补贴 */
-	private long subsidy;
+	private java.math.BigDecimal subsidy;
+	
+	/** 实际薪水 */
+	private java.math.BigDecimal actualSalary;
+	
+	/** 结算时间 */
+	private java.util.Date settlementTime;
 	
 	public void setId(Long id){
 		this.id = id;
@@ -63,12 +69,12 @@ public class CourseScheduleTeacherSalary {
 		return this.userId;
 	}
 			
-	public void setSalary(long salary){
-		this.salary = salary;
+	public void setExpectSalary(java.math.BigDecimal expectSalary){
+		this.expectSalary = expectSalary;
 	}
 	
-	public long getSalary(){
-		return this.salary;
+	public java.math.BigDecimal getExpectSalary(){
+		return this.expectSalary;
 	}
 			
 	public void setCreateTime(java.util.Date createTime){
@@ -87,14 +93,30 @@ public class CourseScheduleTeacherSalary {
 		return this.createUpdate;
 	}
 			
-	public void setSubsidy(long subsidy){
+	public void setSubsidy(java.math.BigDecimal subsidy){
 		this.subsidy = subsidy;
 	}
 	
-	public long getSubsidy(){
+	public java.math.BigDecimal getSubsidy(){
 		return this.subsidy;
 	}
 			
+	public void setActualSalary(java.math.BigDecimal actualSalary){
+		this.actualSalary = actualSalary;
+	}
+	
+	public java.math.BigDecimal getActualSalary(){
+		return this.actualSalary;
+	}
+			
+	public void setSettlementTime(java.util.Date settlementTime){
+		this.settlementTime = settlementTime;
+	}
+	
+	public java.util.Date getSettlementTime(){
+		return this.settlementTime;
+	}
+			
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -1,8 +1,8 @@
 package com.ym.mec.biz.dal.entity;
 
 import com.ym.mec.biz.dal.enums.AuditStatusEnum;
+import com.ym.mec.biz.dal.enums.TeachModeEnum;
 import com.ym.mec.biz.dal.enums.VipGroupStatusEnum;
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
@@ -93,16 +93,8 @@ public class VipGroup {
 	@ApiModelProperty(value = "当前课时")
 	private Integer currentClassTimes;
 
-	@ApiModelProperty(value = "是否已结算")
-	private YesOrNoEnum isSalary;
-
-	public YesOrNoEnum getIsSalary() {
-		return isSalary;
-	}
-
-	public void setIsSalary(YesOrNoEnum isSalary) {
-		this.isSalary = isSalary;
-	}
+	@ApiModelProperty(value = "赠送课时类型")
+	private TeachModeEnum giveTeachMode;
 
 	public String getUserName() {
 		return userName;
@@ -296,6 +288,14 @@ public class VipGroup {
 		this.organIdList = organIdList;
 	}
 
+	public TeachModeEnum getGiveTeachMode() {
+		return giveTeachMode;
+	}
+
+	public void setGiveTeachMode(TeachModeEnum giveTeachMode) {
+		this.giveTeachMode = giveTeachMode;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -0,0 +1,8 @@
+package com.ym.mec.biz.service;
+
+import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
+import com.ym.mec.common.service.BaseService;
+
+public interface CourseScheduleStudentPaymentService extends BaseService<Long, CourseScheduleStudentPayment> {
+
+}

+ 31 - 26
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java

@@ -1,39 +1,44 @@
 package com.ym.mec.biz.service;
 
-import com.ym.mec.auth.api.entity.SysUser;
+import java.util.List;
+
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.MusicCardDto;
 import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.common.service.BaseService;
 
-import java.util.List;
-
 public interface MusicGroupService extends BaseService<String, MusicGroup> {
-    /**
-     * 建团申请数据提交
-     * @param subFeeSettingDto
-     * @Author superzou
-     */
-    void createGroup(SubFeeSettingDto subFeeSettingDto,Integer userId);
+	/**
+	 * 建团申请数据提交
+	 * @param subFeeSettingDto
+	 * @Author superzou
+	 */
+	void createGroup(SubFeeSettingDto subFeeSettingDto, Integer userId);
+
+	/**
+	 * 获取学生所在乐团详情
+	 * @return
+	 */
+	List<MusicCardDto> queryUserMusicGroups(Integer userId);
 
-    /**
-     * 获取学生所在乐团详情
-     * @return
-     */
-    List<MusicCardDto> queryUserMusicGroups(Integer userId);
+	/**
+	 * 获取个人中心乐团数据
+	 * @param id
+	 * @return
+	 */
+	MusicCardDto queryPersonalMusicGroups(Integer id);
 
-    /**
-     * 获取个人中心乐团数据
-     * @param id
-     * @return
-     */
-    MusicCardDto queryPersonalMusicGroups(Integer id);
+	/**
+	 * 根据学员编号获取相关老师列表
+	 * @param studentId
+	 * @return
+	 */
+	List<BasicUserDto> findTeachersByStuId(Integer studentId);
 
-    /**
-     * 根据学员编号获取相关老师列表
-     * @param studentId
-     * @return
-     */
-    List<BasicUserDto> findTeachersByStuId(Integer studentId);
+	/**
+	 * 取消乐团
+	 * @param musicGroupId 乐团编号
+	 */
+	void cancelMusicGroup(String musicGroupId);
 }

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

@@ -52,6 +52,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 	@Override
 	public TeacherAttendanceDto getCurrentCourseDetail(Long courseID) {
+		if(Objects.isNull(courseID)){
+			throw new BizException("参数错误!");
+		}
 		TeacherAttendanceDto currentCourseDetail = courseScheduleDao.getCurrentCourseDetail(courseID);
 		currentCourseDetail.setCurrentTime(new Date());
 		currentCourseDetail.setTeacherAttendanceTimeGap(ParamEnum.TEACHER_ATTENDANCE_TIME_GAP);
@@ -60,6 +63,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 	@Override
 	public void batchAddCourseSchedule(List<CourseSchedule> courseSchedules) {
+		if(Objects.isNull(courseSchedules)&&courseSchedules.size()<=0){
+			throw new BizException("参数错误!");
+		}
 		checkCourseSchedule(courseSchedules);
         createCourseScheduleName(courseSchedules);
 		courseScheduleDao.batchAddCourseSchedules(courseSchedules);
@@ -67,6 +73,12 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 	@Override
 	public void batchUpdateCourseSchedule(List<CourseSchedule> courseSchedules, Long musicGroupID) {
+		if(Objects.isNull(courseSchedules)&&courseSchedules.size()<=0){
+			throw new BizException("请选择需要调整的课程!");
+		}
+		if(Objects.isNull(musicGroupID)){
+			throw new BizException("请指定乐团!");
+		}
 		checkCourseSchedule(courseSchedules);
         courseScheduleDao.deleteCourseSchedulesByMusicGroupID(musicGroupID);
         courseScheduleDao.batchAddCourseSchedules(courseSchedules);
@@ -74,30 +86,42 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 
 	@Override
 	public List<CourseScheduleDto> getCourseSchedulesWithDate(Date classDate) {
+		if(Objects.isNull(classDate)){
+			throw new BizException("请选择日期!");
+		}
 		return courseScheduleDao.getCourseSchedulesWithDate(classDate);
 	}
 
 	@Override
 	public List<Date> getCourseScheduleDateByMonth(Long musicGroupID, Date month) {
+		if(Objects.isNull(month)||Objects.isNull(musicGroupID)){
+			throw new BizException("请选择日期并指定乐团!");
+		}
 		return courseScheduleDao.getCourseScheduleDateByMonth(musicGroupID,month);
 	}
 
 	@Override
 	public List<Date> getCourseScheduleDateByStudent(Date month, Integer isAttend) {
 		SysUser user = sysUserFeignService.queryUserInfo();
+		if(null==user){
+			throw new BizException("请登录");
+		}
 		return courseScheduleDao.getStudentCourseScheduleDate(user.getId().longValue(),month,isAttend);
 	}
 
 	@Override
 	public List<Date> getCourseScheduleDateByTeacher(Date month) {
 		SysUser user = sysUserFeignService.queryUserInfo();
+		if(null==user){
+			throw new BizException("请登录");
+		}
 		return courseScheduleDao.getTeacherCourseScheduleDate(user.getId().longValue(),month);
 	}
 
 	@Override
 	public Map getStudentCourseSchedulesWithDate(Date classDate) {
 		if(Objects.isNull(classDate)){
-			throw new BizException("参数错误!");
+			throw new BizException("请选择上课日期!");
 		}
 
 		SysUser user = sysUserFeignService.queryUserInfo();

+ 23 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleStudentPaymentServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.biz.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment;
+import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+
+@Service
+public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Long, CourseScheduleStudentPayment>  implements CourseScheduleStudentPaymentService {
+	
+	@Autowired
+	private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
+
+	@Override
+	public BaseDAO<Long, CourseScheduleStudentPayment> getDAO() {
+		return courseScheduleStudentPaymentDao;
+	}
+	
+}

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

@@ -117,4 +117,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup>
 	public List<BasicUserDto> findTeachersByStuId(Integer studentId) {
 		return musicGroupDao.findTeachersByStuId(studentId);
 	}
+
+	@Override
+	public void cancelMusicGroup(String musicGroupId) {
+		
+	}
 }

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

@@ -6,11 +6,13 @@ import com.ym.mec.biz.dal.dto.VipGroupActivityAddDto;
 import com.ym.mec.biz.dal.entity.VipGroupActivity;
 import com.ym.mec.biz.service.VipGroupActivityService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Objects;
 
 @Service
 public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGroupActivity>  implements VipGroupActivityService {
@@ -25,18 +27,30 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
 
 	@Override
 	public void addVipGroupActivity(VipGroupActivityAddDto vipGroupActivityAddDto) {
+		if(Objects.isNull(vipGroupActivityAddDto.getOrganId())){
+			throw new BizException("请指定部门!");
+		}
 		vipGroupActivityAddDto.setSalarySettlementJson(JSON.toJSONString(vipGroupActivityAddDto.getVipGroupSalarySettlement()));
 		super.insert(vipGroupActivityAddDto);
 	}
 
 	@Override
 	public void updateVipGroupActivity(VipGroupActivityAddDto vipGroupActivityAddDto) {
+		if(Objects.isNull(vipGroupActivityAddDto.getId())){
+			throw new BizException("请指定活动编号!");
+		}
+		if(Objects.isNull(vipGroupActivityAddDto.getOrganId())){
+			throw new BizException("请指定部门!");
+		}
 		vipGroupActivityAddDto.setSalarySettlementJson(JSON.toJSONString(vipGroupActivityAddDto.getVipGroupSalarySettlement()));
 		super.update(vipGroupActivityAddDto);
 	}
 
 	@Override
 	public List<VipGroupActivity> findByVipGroupCategory(Long categoryId) {
+		if(Objects.isNull(categoryId)){
+			throw new BizException("请选择课程形态!");
+		}
 		return vipGroupActivityDao.findByCategory(categoryId);
 	}
 }

+ 60 - 10
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -24,10 +24,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
@@ -73,6 +70,10 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	@Override
 	public void createVipGroup(VipGroupApplyDto vipGroup) {
 
+		if (Objects.isNull(vipGroup.getVipGroupApplyBaseInfo().getUserId())){
+			throw new BizException("请选择指导老师");
+		}
+
 	    if(vipGroup.getCourseSchedules().size()!=vipGroup.getVipGroupApplyBaseInfo().getAllCourseNum()){
 	        throw new BizException("课时总数不匹配!");
         }
@@ -85,10 +86,20 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             throw new BizException("线上课课时数量安排有误!");
         }
 
+        //获取活动信息
         VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupApplyBaseInfo().getVipGroupActivityId().intValue());
+
+        //生成vip课信息
 		VipGroupApplyBaseInfoDto vipGroupApplyBaseInfoDto=vipGroup.getVipGroupApplyBaseInfo();
+		vipGroupApplyBaseInfoDto.setTotalPrice(countVipGroupPredictFee(vipGroupApplyBaseInfoDto,
+				vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice(),
+				vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice()));
 		vipGroupDao.insert(vipGroupApplyBaseInfoDto);
+
+		//获取vip课类型信息
 		VipGroupCategory vipGroupCategory = vipGroupCategoryDao.get(vipGroup.getVipGroupApplyBaseInfo().getVipGroupCategoryId().intValue());
+
+		//创建班级信息
 		ClassGroup classGroup=new ClassGroup();
 		classGroup.setExpectStudentNum(vipGroupCategory.getStudentNum());
 		classGroup.setName(vipGroupApplyBaseInfoDto.getName());
@@ -96,15 +107,27 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		classGroup.setType(ClassGroupTypeEnum.VIP);
 		classGroup.setDelFlag(YesOrNoEnum.NO);
 		classGroupDao.insert(classGroup);
+
+		//创建vip课班级关联记录
 		VipGroupClassGroupMapper vipGroupClassGroupMapper=new VipGroupClassGroupMapper();
 		vipGroupClassGroupMapper.setVipGroupId(vipGroupApplyBaseInfoDto.getId());
 		vipGroupClassGroupMapper.setClassGroupId(classGroup.getId());
 		vipGroupClassGroupMapperDao.insert(vipGroupClassGroupMapper);
+
+		//创建班级老师关联记录
 		ClassGroupTeacherMapper classGroupTeacherMapper=new ClassGroupTeacherMapper();
 		classGroupTeacherMapper.setTeacherRole(TeachTypeEnum.TEACHING);
 		classGroupTeacherMapper.setUserId(Integer.parseInt(vipGroupApplyBaseInfoDto.getTeacherId().toString()));
-		classGroupTeacherMapper.setSalary(vipGroupApplyBaseInfoDto.getSalary());
 		classGroupTeacherMapperDao.insert(classGroupTeacherMapper);
+
+		//创建班级与老师课酬记录
+		ClassGroupTeacherSalary classGroupTeacherSalary=new ClassGroupTeacherSalary();
+		classGroupTeacherSalary.setTeacherRole(TeachTypeEnum.TEACHING);
+		classGroupTeacherSalary.setUserId(Integer.parseInt(vipGroupApplyBaseInfoDto.getTeacherId().toString()));
+		classGroupTeacherSalary.setSalary(vipGroupApplyBaseInfoDto.getOfflineTeacherSalary());
+
+
+		//课程信息调整
 		vipGroup.getCourseSchedules().forEach(courseSchedule -> {
 		    if(courseSchedule.getEndClassTime().after(vipGroupActivity.getCoursesEndTime())
                 &&courseSchedule.getStartClassTime().before(vipGroupActivity.getCoursesStartTime())){
@@ -113,6 +136,13 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			courseSchedule.setClassGroupId(classGroup.getId());
 		});
 		courseScheduleService.batchAddCourseSchedule(vipGroup.getCourseSchedules());
+
+		//创建老师与学生费用相关记录
+		List<CourseScheduleTeacherSalary> courseScheduleTeacherSalaries=new ArrayList<>();
+		Map<TeachModeEnum, List<CourseSchedule>> courseScheduleGroupByTeachMode = vipGroup.getCourseSchedules().stream().collect(Collectors.groupingBy(CourseSchedule::getTeachMode));
+		vipGroup.getCourseSchedules().forEach(courseSchedule -> {
+			CourseScheduleTeacherSalary courseScheduleTeacherSalary=new CourseScheduleTeacherSalary();
+		});
 	}
 
 	@Override
@@ -329,11 +359,31 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
      * 计算VIP课程预计收费
      */
     private BigDecimal countVipGroupPredictFee(VipGroup vipGroup,BigDecimal onlineClassesUnitPrice,BigDecimal offlineClassesUnitPrice){
-        BigDecimal offlineClassNum=new BigDecimal(vipGroup.getOfflineClassesNum());
-        BigDecimal onlineClassNum=new BigDecimal(vipGroup.getOnlineClassesNum());
-        BigDecimal onlineVipGroupCharge = onlineClassesUnitPrice.multiply(onlineClassNum);
-        BigDecimal offlineVipGroupCharge = offlineClassesUnitPrice.multiply(offlineClassNum);
-        return onlineVipGroupCharge.add(offlineVipGroupCharge);
+		VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId().intValue());
+		if(Objects.isNull(vipGroup)){
+			throw new BizException("该课未指定活动方案");
+		}
+		BigDecimal offlineClassNum=new BigDecimal(vipGroup.getOfflineClassesNum());
+		BigDecimal onlineClassNum=new BigDecimal(vipGroup.getOnlineClassesNum());
+		BigDecimal onlineVipGroupCharge = onlineClassesUnitPrice.multiply(onlineClassNum);
+		BigDecimal offlineVipGroupCharge = offlineClassesUnitPrice.multiply(offlineClassNum);
+		BigDecimal totalPrice=null;
+		switch (vipGroupActivity.getType()){
+			case BASE_ACTIVITY:
+				totalPrice=onlineVipGroupCharge.add(offlineVipGroupCharge);
+				break;
+			case DISCOUNT:
+				BigDecimal discount=new BigDecimal(vipGroupActivity.getAttribute1());
+				totalPrice=onlineVipGroupCharge.add(offlineVipGroupCharge);
+				totalPrice=totalPrice.multiply(discount);
+				break;
+			case GIVE_CLASS:
+
+				break;
+			default:
+				throw new BizException("活动类型错误!");
+		}
+        return totalPrice;
     }
 
 	@Override

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

@@ -9,6 +9,7 @@
     <result column="user_id_" jdbcType="INTEGER" property="userId" />
     <result column="duration_" jdbcType="INTEGER" property="duration" />
     <result column="salary_" jdbcType="DECIMAL" property="salary" />
+    <result column="online_classes_salary_" jdbcType="DECIMAL" property="onlineClassesSalary" />
     <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
@@ -41,6 +42,9 @@
       <if test="salary != null">
         salary_,
       </if>
+      <if test="onlineClassesSalary != null">
+        online_classes_salary_,
+      </if>
       <if test="createTime != null">
         create_time_,
       </if>
@@ -67,6 +71,9 @@
       <if test="salary != null">
         #{salary,jdbcType=DECIMAL},
       </if>
+      <if test="onlineClassesSalary != null">
+        #{onlineClassesSalary,jdbcType=DECIMAL},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -97,6 +104,9 @@
       <if test="salary != null">
         salary_ = #{salary,jdbcType=DECIMAL},
       </if>
+      <if test="onlineClassesSalary != null">
+        online_classes_salary_ = #{onlineClassesSalary,jdbcType=DECIMAL},
+      </if>
       <if test="createTime != null">
         create_time_ = #{createTime,jdbcType=TIMESTAMP},
       </if>

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

@@ -14,6 +14,8 @@
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 		<result column="wf_process_id_" property="wfProcessId" />
 		<result column="wf_order_id_" property="wfOrderId" />
+		<result column="teacher_liability_ratio_" property="teacherLiabilityRatio" />
+		<result column="student_liability_ratio_" property="studentLiabilityRatio" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
 	</resultMap>
@@ -35,7 +37,7 @@
 		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 		</selectKey>
 		-->
-		INSERT INTO course_schedule_complaints (id_,user_id_,course_schedule_id_,reason_,status_,wf_process_id_,wf_order_id_,create_time_,update_time_) VALUES(#{id},#{userId},#{courseScheduleId},#{reason},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{wfProcessId},#{wfOrderId},now(),now())
+		INSERT INTO course_schedule_complaints (id_,user_id_,course_schedule_id_,reason_,status_,wf_process_id_,wf_order_id_,create_time_,update_time_,teacher_liability_ratio_,student_liability_ratio_) VALUES(#{id},#{userId},#{courseScheduleId},#{reason},#{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{wfProcessId},#{wfOrderId},now(),now(),#{teacherLiabilityRatio},#{studentLiabilityRatio})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -66,6 +68,12 @@
 			<if test="updateTime != null">
 			update_time_ = now(),
 			</if>
+			<if test="teacherLiabilityRatio != null">
+			teacher_liability_ratio_ = #{teacherLiabilityRatio},
+			</if>
+			<if test="studentLiabilityRatio != null">
+			student_liability_ratio_ = #{studentLiabilityRatio},
+			</if>
 		</set> WHERE id_ = #{id}
 	</update>
 	

+ 84 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao">
+	
+	<resultMap type="com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment" id="CourseScheduleStudentPayment">
+		<result column="id_" property="id" />
+		<result column="course_schedule_id_" property="courseScheduleId" />
+		<result column="user_id_" property="userId" />
+		<result column="expect_price_" property="expectPrice" />
+		<result column="actual_price_" property="actualPrice" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="settlement_time_" property="settlementTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="CourseScheduleStudentPayment" >
+		SELECT * FROM course_schedule_student_payment WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="CourseScheduleStudentPayment">
+		SELECT * FROM course_schedule_student_payment ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO course_schedule_student_payment (id_,course_schedule_id_,user_id_,expect_price_,actual_price_,create_time_,update_time_,settlement_time_) VALUES(#{id},#{courseScheduleId},#{userId},#{expectPrice},#{actualPrice},#{createTime},#{updateTime},#{settlementTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment">
+		UPDATE course_schedule_student_payment <set>
+<if test="userId != null">
+user_id_ = #{userId},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="courseScheduleId != null">
+course_schedule_id_ = #{courseScheduleId},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="settlementTime != null">
+settlement_time_ = #{settlementTime},
+</if>
+<if test="expectPrice != null">
+expect_price_ = #{expectPrice},
+</if>
+<if test="actualPrice != null">
+actual_price_ = #{actualPrice},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM course_schedule_student_payment WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="CourseScheduleStudentPayment" parameterType="map">
+		SELECT * FROM course_schedule_student_payment ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM course_schedule_student_payment
+	</select>
+</mapper>

+ 12 - 4
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -11,10 +11,12 @@
 		<result column="course_schedule_id_" property="courseScheduleId" />
 		<result column="teacher_role_" property="teacherRole" />
 		<result column="user_id_" property="userId" />
-		<result column="salary_" property="salary" />
+		<result column="expect_salary_" property="expectSalary" />
 		<result column="create_time_" property="createTime" />
 		<result column="create_update_" property="createUpdate" />
 		<result column="subsidy_" property="subsidy" />
+		<result column="actual_salary_" property="actualSalary" />
+		<result column="settlement_time_" property="settlementTime" />
 	</resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -34,7 +36,7 @@
 		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
 		</selectKey>
 		-->
-		INSERT INTO course_schedule_teacher_salary (id_,course_schedule_id_,teacher_role_,user_id_,salary_,create_time_,create_update_,subsidy_) VALUES(#{id},#{courseScheduleId},#{teacherRole},#{userId},#{salary},#{createTime},#{createUpdate},#{subsidy})
+		INSERT INTO course_schedule_teacher_salary (id_,course_schedule_id_,teacher_role_,user_id_,expect_salary_,create_time_,create_update_,subsidy_,actual_salary_,settlement_time_) VALUES(#{id},#{courseScheduleId},#{teacherRole},#{userId},#{expectSalary},#{createTime},#{createUpdate},#{subsidy},#{actualSalary},#{settlementTime})
 	</insert>
 	
 	<!-- 根据主键查询一条记录 -->
@@ -49,11 +51,14 @@ subsidy_ = #{subsidy},
 <if test="id != null">
 id_ = #{id},
 </if>
+<if test="expectSalary != null">
+expect_salary_ = #{expectSalary},
+</if>
 <if test="courseScheduleId != null">
 course_schedule_id_ = #{courseScheduleId},
 </if>
-<if test="salary != null">
-salary_ = #{salary},
+<if test="settlementTime != null">
+settlement_time_ = #{settlementTime},
 </if>
 <if test="teacherRole != null">
 teacher_role_ = #{teacherRole},
@@ -61,6 +66,9 @@ teacher_role_ = #{teacherRole},
 <if test="createUpdate != null">
 create_update_ = #{createUpdate},
 </if>
+<if test="actualSalary != null">
+actual_salary_ = #{actualSalary},
+</if>
 <if test="createTime != null">
 create_time_ = #{createTime},
 </if>

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

@@ -29,7 +29,7 @@
         <result column="student_num_" property="studentNum"/>
         <result column="total_class_times_" property="totalClassTimes"/>
         <result column="current_class_times_" property="currentClassTimes"/>
-        <result column="is_salary_" property="isSalary"/>
+        <result column="give_teach_mode_" property="giveTeachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
     <resultMap id="studentManageVipGroup" type="com.ym.mec.biz.dal.dto.StudentManageVipGroupDto" extends="VipGroup">
@@ -193,8 +193,8 @@
             <if test="totalPrice != null">
                 total_price_ = #{totalPrice},
             </if>
-            <if test="isSalary!=null">
-                is_salary_=#{isSalary}
+            <if test="giveTeachMode!=null">
+                give_teach_mode_=#{giveTeachMode}
             </if>
         </set>
         WHERE id_ = #{id}
@@ -395,7 +395,7 @@
         <result column="start_class_time_" property="startClassTime"/>
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="teach_mode_" property="teachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
-        <result column="is_salary_" property="isSalary" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="give_teach_mode_" property="giveTeachMode" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
     <sql id="teachingRecordQueryCondition">
@@ -419,10 +419,11 @@
             CONCAT(cs.class_date_,' ',cs.start_class_time_) start_class_time_,
             cs.status_,
             cs.teach_mode_,
-            cs.is_salary_
+            csts.actual_salary_ IS NOT NULL is_salary_
         FROM
             vip_group_class_group_mapper vgcgm
             LEFT JOIN course_schedule cs ON vgcgm.class_group_id_=cs.class_group_id_
+            LEFT JOIN course_schedule_teacher_salary csts ON cs.id_=csts.course_schedule_id_
         <include refid="teachingRecordQueryCondition"/>
         ORDER BY cs.id_
         <include refid="global.limit"/>
@@ -451,7 +452,7 @@
         FROM
             vip_group_class_group_mapper vgcgm
             LEFT JOIN course_schedule cs ON vgcgm.class_group_id_=cs.class_group_id_
-        WHERE vgcgm.vip_group_id_=#{vipGroupId} AND cs.is_salary_=1
+        WHERE vgcgm.vip_group_id_=#{vipGroupId} AND cs.give_teach_mode_=1
     </select>
     <select id="countComplaintsNum" resultType="java.lang.Integer">
         SELECT

+ 38 - 0
mec-education/src/main/java/com/ym/mec/education/controller/UserController.java

@@ -0,0 +1,38 @@
+package com.ym.mec.education.controller;
+
+import javax.annotation.Resource;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.education.base.BaseResponse;
+import com.ym.mec.education.service.ISubjectService;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+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;
+
+/**
+ * @program: mec
+ * @description: 声部
+ * @author: xw
+ * @create: 2019-10-01 11:25
+ */
+@RestController
+@RequestMapping("api/user")
+@Api(tags = "用户")
+public class UserController {
+
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @PostMapping("/detail")
+    @ApiOperation("个人明细")
+    public BaseResponse list() {
+        return BaseResponse.success(sysUserFeignService.queryUserInfo());
+    }
+}

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

@@ -18,4 +18,8 @@ public class HomeWorkReq extends BaseQuery {
     private String musicGroupId;
 
     private Long courseScheduleId;
+
+    private String workDate;
+
+    private String status;
 }

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

@@ -4,7 +4,7 @@ import com.ym.mec.education.base.BaseQuery;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.ToString;
-import java.util.Date;
+import java.time.LocalDate;
 
 /**
  * @version V1.0
@@ -21,5 +21,5 @@ public class TeacherReq extends BaseQuery {
     private Integer userId;
 
     @ApiModelProperty(value = "日程安排时间")
-    private Date date;
+    private LocalDate date;
 }

+ 2 - 0
mec-education/src/main/java/com/ym/mec/education/resp/TeacherDailyScheduleResp.java

@@ -31,4 +31,6 @@ public class TeacherDailyScheduleResp implements Serializable {
     private String classTime;
     @ApiModelProperty(value = "学校名称")
     private String schoolName;
+    @ApiModelProperty(value = "课程计划id")
+    private Long courseScheduleId;
 }

+ 6 - 10
mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -7,8 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
 import com.ym.mec.biz.dal.enums.JobTypeEnum;
 import com.ym.mec.common.enums.UserGenderEnum;
-import com.ym.mec.common.security.AuthUser;
-import com.ym.mec.common.security.SecurityUtils;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
@@ -24,7 +22,9 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
 /**
@@ -113,14 +113,10 @@ public class ClassGroupStudentMapperServiceImpl extends ServiceImpl<ClassGroupSt
 
     @Override
     public PageResponse getPageByTeacher(StudentReq studentReq) {
-        Teacher teacher;
-        //判断当前登录人角色
-        AuthUser user = SecurityUtils.getUser();
-        if(Objects.nonNull(user)) {
-            teacher = teacherService.getById(user.getUserId());
-        }else {
-            teacher = teacherService.getById(studentReq.getTeacherId());
+        if (Objects.isNull(studentReq.getTeacherId())) {
+            return PageResponse.errorParam();
         }
+        Teacher teacher = teacherService.getById(studentReq.getTeacherId());
         if (Objects.nonNull(teacher)) {
             //教学主管
             QueryWrapper<MusicGroup> musicGroupQueryWrapper = new QueryWrapper<>();

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

@@ -261,7 +261,12 @@ public class StudentAttendanceServiceImpl extends ServiceImpl<StudentAttendanceM
         PageResponse response = new PageResponse();
 
         IPage<StudentAttendance> page = new Page<StudentAttendance>(req.getPageNo(),req.getPageSize());
-        IPage<StudentAttendance> studentAttendanceIPage = this.page(page,new QueryWrapper<StudentAttendance>().eq("course_schedule_id_",req.getCourseScheduleId()));
+        QueryWrapper<StudentAttendance> queryWrapper = new QueryWrapper<StudentAttendance>();
+        queryWrapper.eq("course_schedule_id_",req.getCourseScheduleId());
+        if(req.getStatus() != null){
+            queryWrapper.eq("status_",req.getStatus());
+        }
+        IPage<StudentAttendance> studentAttendanceIPage = this.page(page,queryWrapper);
 
         List<CallStudentResp> callStudentResps = new ArrayList<>();
         List<StudentAttendance> studentAttendanceList = studentAttendanceIPage.getRecords();

+ 6 - 0
mec-education/src/main/java/com/ym/mec/education/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -16,6 +16,7 @@ import com.ym.mec.education.resp.HomeWrokDetailResp;
 import com.ym.mec.education.resp.HomeWrokResp;
 import com.ym.mec.education.resp.HomeworkReplyResp;
 import com.ym.mec.education.service.*;
+import com.ym.mec.education.utils.DateUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -162,6 +163,11 @@ public class StudentCourseHomeworkServiceImpl extends ServiceImpl<StudentCourseH
         PageResponse response = new PageResponse();
         IPage ipage = new Page(req.getPageNo() == null ? 1: req.getPageNo(),req.getPageSize() == null ? 10:req.getPageSize());
         QueryWrapper<CourseHomework> queryWrapper = new QueryWrapper<>();
+        if(req != null && req.getWorkDate() != null){
+            String strDateStr = req.getWorkDate() + " 00:00:00";
+            String endDateStr = req.getWorkDate() + " 23:59:59";
+            queryWrapper.between("create_time_",strDateStr,endDateStr);
+        }
         IPage<CourseHomework> courseScheduleIPage = courseHomeworkService.page(ipage,queryWrapper);
 
         List<CourseHomework> courseSchedules = courseScheduleIPage.getRecords();

+ 7 - 17
mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherServiceImpl.java

@@ -5,8 +5,6 @@ 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.google.common.collect.Lists;
-import com.ym.mec.common.security.AuthUser;
-import com.ym.mec.common.security.SecurityUtils;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
@@ -24,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
-
 import java.util.*;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.stream.Collectors;
@@ -320,29 +317,22 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> impl
 
     @Override
     public PageResponse dailySchedule(TeacherReq req) {
-        AuthUser user = SecurityUtils.getUser();
-        Optional<AuthUser> optional = Optional.ofNullable(user);
         Page<TeacherDailyScheduleResp> pageResult = new Page<>();
-        Integer userId;
-        if (optional.isPresent()) {
-            userId = optional.get().getUserId();
-        } else {
-            if (Objects.isNull(req.getUserId())) {
-                return PageResponse.errorParam();
-            }
-            userId = req.getUserId();
+        if (Objects.isNull(req.getUserId())) {
+            return PageResponse.errorParam();
         }
         List<TeacherDailyScheduleResp> list = Lists.newArrayList();
-        Page<CourseSchedule> courseSchedulePage = new Page<>(req.getPageNo(), req.getPageSize());
+        Page<CourseSchedule> courseSchedulePage = new Page<CourseSchedule>(req.getPageNo(), req.getPageSize());
         QueryWrapper<CourseSchedule> courseScheduleQueryWrapper = new QueryWrapper<>();
-        courseScheduleQueryWrapper.lambda().eq(CourseSchedule::getTeacherId, userId)
-            .eq(Objects.isNull(req.getDate()), CourseSchedule::getClassDate, req.getDate());
+        courseScheduleQueryWrapper.lambda().eq(CourseSchedule::getTeacherId, req.getUserId())
+        .eq(Objects.nonNull(req.getDate()), CourseSchedule::getClassDate, req.getDate());
         IPage<CourseSchedule> page = courseScheduleService.page(courseSchedulePage, courseScheduleQueryWrapper);
         BeanUtils.copyProperties(page, pageResult);
         if (!CollectionUtils.isEmpty(page.getRecords())) {
             page.getRecords().forEach(courseSchedule -> {
                 TeacherDailyScheduleResp teacherDailyScheduleResp = new TeacherDailyScheduleResp();
-                teacherDailyScheduleResp.setCourseName(courseSchedule.getName())
+                teacherDailyScheduleResp.setCourseScheduleId(courseSchedule.getId())
+                    .setCourseName(courseSchedule.getName())
                     .setCourseType(CourseSchedule.CourseScheduleType.getMsgByCode(courseSchedule.getType()));
                 if (Objects.nonNull(courseSchedule.getStartClassTime()) && Objects.nonNull(courseSchedule.getEndClassTime())) {
                     teacherDailyScheduleResp.setClassTime(DateUtil.time2String(courseSchedule.getStartClassTime()) + "-" +

+ 6 - 0
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupActivityController.java

@@ -4,11 +4,14 @@ import com.ym.mec.biz.dal.dto.VipGroupActivityAddDto;
 import com.ym.mec.biz.dal.page.VipGroupActivityQueryInfo;
 import com.ym.mec.biz.service.VipGroupActivityService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.exception.BizException;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Objects;
+
 /**
  * @Author Joburgess
  * @Date 2019/10/1
@@ -45,6 +48,9 @@ public class VipGroupActivityController extends BaseController {
     @ApiOperation(value = "删除活动方案")
     @PostMapping("/delete")
     public Object delete(Long id){
+        if(Objects.isNull(id)){
+            throw new BizException("请指定活动编号!");
+        }
         vipGroupActivityService.delete(id.intValue());
         return succeed();
     }

+ 3 - 3
mec-workflow/src/main/resources/flows/viprefund.snaker

@@ -4,13 +4,13 @@
 <transition g="" name="transition1" offset="0,0" to="apply"/>
 </start>
 <end displayName="end1" layout="785,160,-1,-1" name="end1"/>
-<task assignee="${student}" autoExecute="Y" displayName="学生申请" layout="280,158,-1,-1" name="apply" performType="ANY" taskType="Major">
+<task assignee="student" autoExecute="Y" displayName="学生申请" layout="280,158,-1,-1" name="apply" performType="ANY" taskType="Major">
 <transition g="" name="transition2" offset="0,0" to="task1"/>
 </task>
-<task assignee="${eduTeacher}" autoExecute="Y" displayName="教务老师审批" layout="425,157,-1,-1" name="task1" performType="ANY" taskType="Major">
+<task assignee="eduTeacher" autoExecute="Y" displayName="教务老师审批" layout="425,157,-1,-1" name="task1" performType="ANY" taskType="Major">
 <transition g="" name="transition3" offset="0,0" to="task2"/>
 </task>
-<task assignee="${deptManager}" autoExecute="Y" displayName="分部经理审批" layout="598,158,-1,-1" name="task2" performType="ANY" taskType="Major">
+<task assignee="deptManager" autoExecute="Y" displayName="分部经理审批" layout="598,158,-1,-1" name="task2" performType="ANY" taskType="Major">
 <transition g="" name="transition4" offset="0,0" to="end1"/>
 </task>
 </process>