فهرست منبع

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
#	mec-web/src/main/java/com/ym/mec/web/controller/VipGroupDefaultClassesCycleController.java
Joburgess 5 سال پیش
والد
کامیت
f6fbf20956
41فایلهای تغییر یافته به همراه420 افزوده شده و 384 حذف شده
  1. 0 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  2. 0 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupSubjectGoodsGroupDao.java
  3. 1 19
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java
  4. 0 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicCardDto.java
  5. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/RegisterPayDto.java
  6. 6 18
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectGoodsGroup.java
  7. 0 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectPlan.java
  8. 0 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentAttendance.java
  9. 0 9
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupSubjectGoodsGroupService.java
  10. 0 8
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java
  11. 0 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  12. 0 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectGoodsGroupServiceImpl.java
  13. 10 22
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  14. 0 2
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  15. 1 2
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  16. 3 11
      mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectGoodsGroupMapper.xml
  17. 4 9
      mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectPlanMapper.xml
  18. 4 8
      mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml
  19. 12 14
      mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml
  20. 2 2
      mec-biz/src/main/resources/config/mybatis/SysUserCashAccountDetailMapper.xml
  21. 9 0
      mec-education/src/main/java/com/ym/mec/education/controller/StudentController.java
  22. 41 27
      mec-education/src/main/java/com/ym/mec/education/enums/TeachModeEnum.java
  23. 1 1
      mec-education/src/main/java/com/ym/mec/education/mapper/MusicGroupPaymentCalenderMapper.java
  24. 39 0
      mec-education/src/main/java/com/ym/mec/education/resp/StudentResp.java
  25. 12 0
      mec-education/src/main/java/com/ym/mec/education/service/ICourseScheduleService.java
  26. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/IMusicGroupPaymentCalenderService.java
  27. 135 19
      mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java
  28. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  29. 44 3
      mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java
  30. 1 1
      mec-student/src/main/java/com/ym/mec/student/config/ResourceServerConfig.java
  31. 4 62
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  32. 1 5
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupRegisterController.java
  33. 6 48
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java
  34. 0 4
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/payInfo.java
  35. 12 9
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupCategoryController.java
  36. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/VipGroupDefaultClassesCycleController.java
  37. 8 0
      mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/ProcessController.java
  38. 51 1
      mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/TaskController.java
  39. 5 5
      mec-workflow/src/main/resources/flows/leave.snaker
  40. 3 3
      mec-workflow/src/main/resources/flows/viprefund.snaker
  41. 0 5
      workflowy/src/main/java/org/snaker/engine/model/NodeModel.java

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

@@ -139,15 +139,6 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 
     /**
      * @Author: Joburgess
-     * @Date: 2019/10/8
-     * @params [musicGroupId]
-     * @return java.util.List<com.ym.mec.biz.dal.entity.CourseSchedule>
-     * @describe 根据乐团获取排课信息
-     */
-    List<CourseSchedule> findCourseScheduleByMusicGroup(@Param("musicGroupId") Long musicGroupId);
-
-    /**
-     * @Author: Joburgess
      * @Date: 2019/9/30
      * 获取学生上课记录
      */

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

@@ -11,7 +11,6 @@ public interface MusicGroupSubjectGoodsGroupDao extends BaseDAO<Long, MusicGroup
 
     /**
      * 批量保存
-     *
      * @param musicGroupSubjectGoodsGroups
      * @return
      */
@@ -19,17 +18,9 @@ public interface MusicGroupSubjectGoodsGroupDao extends BaseDAO<Long, MusicGroup
 
     /**
      * 获取建团申请,声部设置已确认数据
-     *
      * @param musicGroupId
      * @param subId
      * @return
      */
     List<MusicGroupSubjectGoodsGroup> findGoodsGroup(@Param("musicGroupId") Integer musicGroupId, @Param("subId") Integer subId);
-
-    /**
-     * 根据ids获取打包商品
-     *
-     * @return
-     */
-    List<MusicGroupSubjectGoodsGroup> findGoodsGroupByIds(@Param("ids") String ids);
 }

+ 1 - 19
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java

@@ -72,29 +72,11 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
      * @return
      */
     Integer updateByUserIdAndMusicGroupId(@Param("studentRegistration") StudentRegistration studentRegistration);
-
-
-    /**
-     * 查询手机是否已注册
-     *
-     * @param musicGroupId
-     * @param parentsPhone
-     * @return
-     */
-    StudentRegistration getByPhoneAndMusicGroupId(@Param("musicGroupId") Integer musicGroupId, @Param("parentsPhone") String parentsPhone);
-
-    /**
-     * 查询用户是否存在
-     * @param phone
-     * @return
-     */
-    Map getSysUserByPhone(String phone);
-
+    
     /**
      * 查询学生信息
      * @param userId
      * @return
      */
     StudentInfo queryStudentInfo(Integer userId);
-
 }

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

@@ -16,9 +16,6 @@ public class MusicCardDto {
     @ApiModelProperty(value = "乐团名称",required = true)
     private String musicGroupName;
 
-    @ApiModelProperty(value = "科目编号",required = false)
-    private Long subjectId;
-
     @ApiModelProperty(value = "科目名称",required = true)
     private String subjectName;
 
@@ -37,14 +34,6 @@ public class MusicCardDto {
     @ApiModelProperty(value = "vip课数量",required = true)
     private Integer vipClassNum;
 
-    public Long getSubjectId() {
-        return subjectId;
-    }
-
-    public void setSubjectId(Long subjectId) {
-        this.subjectId = subjectId;
-    }
-
     public String getMusicGroupId() {
         return musicGroupId;
     }

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/RegisterPayDto.java

@@ -19,11 +19,11 @@ public class RegisterPayDto {
         this.registerId = registerId;
     }
 
-    public String getGoodsGroupIds() {
+    public String getGoodsGroupId() {
         return goodsGroupIds;
     }
 
-    public void setGoodsGroupIds(String goodsGroupIds) {
+    public void setGoodsGroupId(String goodsGroupIds) {
         this.goodsGroupIds = goodsGroupIds;
     }
 

+ 6 - 18
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupSubjectGoodsGroup.java

@@ -41,11 +41,7 @@ public class MusicGroupSubjectGoodsGroup {
 	private List<String> goodsName;
 
 	private List<Goods> goodsList;
-
-	//团购减免课程费用
-	private BigDecimal remissionCourseFee;
-
-
+	
 	/**  */
 	private java.util.Date createTime;
 	
@@ -136,6 +132,11 @@ public class MusicGroupSubjectGoodsGroup {
 		this.price = price;
 	}
 
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
 	public List<Goods> getGoodsList() {
 		return goodsList;
 	}
@@ -143,17 +144,4 @@ public class MusicGroupSubjectGoodsGroup {
 	public void setGoodsList(List<Goods> goodsList) {
 		this.goodsList = goodsList;
 	}
-
-	public BigDecimal getRemissionCourseFee() {
-		return remissionCourseFee;
-	}
-
-	public void setRemissionCourseFee(BigDecimal remissionCourseFee) {
-		this.remissionCourseFee = remissionCourseFee;
-	}
-
-	@Override
-	public String toString() {
-		return ToStringBuilder.reflectionToString(this);
-	}
 }

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

@@ -52,9 +52,6 @@ public class MusicGroupSubjectPlan {
 	@ApiModelProperty(value = "保证金(只有租赁才有)",required = false)
 	private BigDecimal depositFee;
 	
-	@ApiModelProperty(value = "已缴费学生数",required = false)
-	private Integer paidStudentNum;
-	
 	/**  */
 	private java.util.Date createTime;
 	
@@ -157,14 +154,6 @@ public class MusicGroupSubjectPlan {
 		this.noClassStudentNum = noClassStudentNum;
 	}
 			
-	public Integer getPaidStudentNum() {
-		return paidStudentNum;
-	}
-
-	public void setPaidStudentNum(Integer paidStudentNum) {
-		this.paidStudentNum = paidStudentNum;
-	}
-
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -45,9 +45,6 @@ public class StudentAttendance {
 	@ApiModelProperty(value = "如果是请假状态,此字段就指请假原因",required = false)
 	private String remark;
 	
-	@ApiModelProperty(value = "当前课次",required = false)
-	private Integer currentClassTimes;
-	
 	public void setId(Long id){
 		this.id = id;
 	}
@@ -120,14 +117,6 @@ public class StudentAttendance {
 		return this.remark;
 	}
 			
-	public Integer getCurrentClassTimes() {
-		return currentClassTimes;
-	}
-
-	public void setCurrentClassTimes(Integer currentClassTimes) {
-		this.currentClassTimes = currentClassTimes;
-	}
-
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

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

@@ -2,7 +2,6 @@ package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup;
 import com.ym.mec.common.service.BaseService;
-import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -16,12 +15,4 @@ public interface MusicGroupSubjectGoodsGroupService extends BaseService<Long, Mu
      */
     List<MusicGroupSubjectGoodsGroup> findGoodsGroup(Integer musicGroupId, Integer subId);
 
-
-    /**
-     * 根据ids获取打包商品
-     *
-     * @return
-     */
-    List<MusicGroupSubjectGoodsGroup> findGoodsGroupByIds(String ids);
-
 }

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

@@ -79,12 +79,4 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
      */
     StudentInfo queryStudentInfo(Integer userId);
 
-    /**
-     * 查询手机是否已注册
-     * @param musicGroupId
-     * @param parentsPhone
-     * @return
-     */
-    StudentRegistration getByPhoneAndMusicGroupId(Integer musicGroupId,  String parentsPhone);
-
 }

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

@@ -6,7 +6,6 @@ import com.ym.mec.biz.dal.dto.MusicCardDto;
 import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupMember;
@@ -49,10 +48,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup>
 	@Transactional(rollbackFor = Exception.class)
 	public void createGroup(SubFeeSettingDto subFeeSettingDto,Integer userId) {
 		MusicGroup musicGroup = subFeeSettingDto.getMusicGroup();
-
-		//创建时社团状态默认未报名中
-		musicGroup.setStatus(MusicGroupStatusEnum.APPLY);
-
 		List<MusicGroupPaymentEntities> musicGroupPaymentEntities = subFeeSettingDto.getMusicGroupPaymentEntities();
 		List<MusicGroupSubjectGoodsGroup> musicGroupSubjectGoodsGroups = subFeeSettingDto.getMusicGroupSubjectGoodsGroups();
 		List<MusicGroupSubjectPlan> musicGroupSubjectPlans = subFeeSettingDto.getMusicGroupSubjectPlans();

+ 0 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectGoodsGroupServiceImpl.java

@@ -26,10 +26,4 @@ public class MusicGroupSubjectGoodsGroupServiceImpl extends BaseServiceImpl<Long
     public List<MusicGroupSubjectGoodsGroup> findGoodsGroup(Integer musicGroupId, Integer subId) {
         return musicGroupSubjectGoodsGroupDao.findGoodsGroup(musicGroupId, subId);
     }
-
-    @Override
-    public List<MusicGroupSubjectGoodsGroup> findGoodsGroupByIds(String ids) {
-
-	    return musicGroupSubjectGoodsGroupDao.findGoodsGroupByIds(ids);
-    }
 }

+ 10 - 22
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -8,8 +8,6 @@ import java.util.Map;
 
 import javax.annotation.Resource;
 
-import com.ym.mec.biz.dal.dao.TeacherDao;
-import com.ym.mec.biz.dal.entity.Teacher;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -37,7 +35,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
     @Resource
     private StudentRegistrationDao studentRegistrationDao;
     @Autowired
-    private TeacherDao teacherDao;
+    private SysUserFeignService sysUserFeignService;
 
     @Override
     public BaseDAO<Long, StudentRegistration> getDAO() {
@@ -105,10 +103,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
     @Transactional(rollbackFor = Exception.class)
     public StudentRegistration addStudent(StudentRegistration studentRegistration) {
         Date date = new Date();
-        int userId = 0;
-        Map hasUser = studentRegistrationDao.getSysUserByPhone(studentRegistration.getParentsPhone());
-        if (hasUser == null) {
-            SysUser sysUser = new SysUser();
+        SysUser sysUser = sysUserFeignService.queryUserByMobile(studentRegistration.getParentsPhone());
+        if (sysUser == null) {
+            sysUser = new SysUser();
             sysUser.setPhone(studentRegistration.getParentsPhone());
             sysUser.setCreateTime(date);
             sysUser.setUpdateTime(date);
@@ -119,24 +116,15 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             sysUser.setOrganId(studentRegistration.getOrganId());
             sysUser.setRealName(studentRegistration.getName());
             sysUser.setIdCardNo(studentRegistration.getIdCardNo());
-            teacherDao.addSysUser(sysUser);
-            userId = sysUser.getId();
-        } else {
-            userId = (int) hasUser.get("id_");
+            sysUserFeignService.addUser(sysUser);
         }
-        studentRegistration.setUserId(userId);
+        studentRegistration.setUserId(sysUser.getId());
         studentRegistrationDao.insert(studentRegistration);
         return studentRegistration;
     }
 
-
-    @Override
-    public StudentRegistration getByPhoneAndMusicGroupId(Integer musicGroupId, String parentsPhone) {
-        return studentRegistrationDao.getByPhoneAndMusicGroupId(musicGroupId, parentsPhone);
-    }
-
-    @Override
-    public StudentInfo queryStudentInfo(Integer userId) {
-        return studentRegistrationDao.queryStudentInfo(userId);
-    }
+	@Override
+	public StudentInfo queryStudentInfo(Integer userId) {
+		return studentRegistrationDao.queryStudentInfo(userId);
+	}
 }

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

@@ -30,7 +30,6 @@
         <result column="school_name_" property="schoolName"/>
         <result column="attendance_status_" property="attendanceStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="seal_class_id_" property="sealClassId"/>
-        <result column="paran_value_" property="vipAppealDaysRange"/>
     </resultMap>
 
     <resultMap type="com.ym.mec.biz.dal.entity.StudentCourseScheduleRecordDto" id="studentCourseScheduleRecord">
@@ -257,7 +256,6 @@
             LEFT JOIN class_group cg ON cs.class_group_id_ = cg.id_
             LEFT JOIN class_group_student_mapper cgsm ON cgsm.class_group_id_ = cs.class_group_id_
 	        LEFT JOIN student_attendance sa ON cs.id_=sa.course_schedule_id_ AND sa.user_id_=#{studentId}
-			LEFT JOIN sys_config sc ON sc.param_name_="vip_appeal_days_range"
         WHERE
             cs.class_date_ = DATE_FORMAT(#{classDate},'%Y%m%d')
             AND cgsm.user_id_ = #{studentId}

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

@@ -139,7 +139,6 @@
 	<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="subject_id_" property="subjectId"/>
 		<result column="subject_name_" property="subjectName" />
 		<result column="current_class_" property="currentClass" />
 		<result column="current_grade_" property="currentGrade" />
@@ -152,7 +151,7 @@
 
     <select id="queryUserMusicGroups" resultMap="queryUserMusicGroupsMap">
 		SELECT sr.id_ register_id_,sr.name_ user_name_,sr.current_class_,sr.current_grade_,
-		sr.payment_status_,mg.name_ music_group_name_,s.id_ subject_id_,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
 		LEFT JOIN music_group mg ON sr.music_group_id_ = mg.id_
 		LEFT JOIN `subject` s ON sr.actual_subject_id_ = s.id_

+ 3 - 11
mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectGoodsGroupMapper.xml

@@ -14,7 +14,6 @@
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
         <result column="price_" property="price"/>
-        <result column="remission_course_fee_" property="remissionCourseFee"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -96,20 +95,13 @@
         FROM music_group_subject_goods_group
     </select>
 
-    <resultMap type="com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup" extends="MusicGroupSubjectGoodsGroup"
-               id="findGoodsGroupMap">
-        <collection property="goodsList" resultMap="com.ym.mec.biz.dal.dao.GoodsDao.Goods" columnPrefix="g_"/>
+    <resultMap type="com.ym.mec.biz.dal.entity.MusicGroupSubjectGoodsGroup" extends="MusicGroupSubjectGoodsGroup" id="findGoodsGroupMap">
+        <collection property="goodsList" resultMap="com.ym.mec.biz.dal.dao.GoodsDao.Goods" columnPrefix="g_" />
     </resultMap>
     <select id="findGoodsGroup" resultMap="findGoodsGroupMap">
-        SELECT mgs.*, g.id_ g_id_,g.name_ g_name_,g.image_ g_image_,g.brief_ g_brief_, g.group_purchase_price_ g_group_purchase_price_,g.market_price_ g_market_price_,g.complement_goods_id_list_
-        g_complement_goods_id_list_
+        SELECT mgs.*, g.id_ g_id_,g.name_ g_name_,g.market_price_  g_market_price_,g.complement_goods_id_list_ g_complement_goods_id_list_
         FROM music_group_subject_goods_group mgs,goods g
         WHERE FIND_IN_SET (g.id_ ,mgs.goods_id_list_)
         AND mgs.music_group_id_ = #{musicGroupId} AND mgs.subject_id_ = #{subId}
     </select>
-
-    <!-- 根据ids获取对应分组商品 -->
-    <select id="findGoodsGroupByIds" resultMap="MusicGroupSubjectGoodsGroup">
-        SELECT * FROM music_group_subject_goods_group WHERE FIND_IN_SET(id_,#{ids})
-    </select>
 </mapper>

+ 4 - 9
mec-biz/src/main/resources/config/mybatis/MusicGroupSubjectPlanMapper.xml

@@ -10,10 +10,8 @@
         <result column="id_" property="id"/>
         <result column="music_group_id_" property="musicGroupId"/>
         <result column="subject_id_" property="subjectId"/>
-        <result column="subject_name_" property="subName"/>
         <result column="expected_student_num_" property="expectedStudentNum"/>
         <result column="apply_student_num_" property="applyStudentNum"/>
-        <result column="paid_student_num_" property="paidStudentNum"/>
         <result column="fee_" property="fee"/>
         <result column="kit_group_purchase_type_" property="kitGroupPurchaseType"
                 typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
@@ -38,8 +36,8 @@
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
         INSERT INTO music_group_subject_plan
-        (id_,music_group_id_,subject_id_,expected_student_num_,apply_student_num_,fee_,kit_group_purchase_type_,deposit_fee_,create_time_,update_time_,paid_student_num_)
-        VALUES(#{id},#{musicGroupId},#{subjectId},#{expectedStudentNum},#{applyStudentNum},#{fee},#{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{depositFee},now(),now(),paidStudentNum)
+        (id_,music_group_id_,subject_id_,expected_student_num_,apply_student_num_,fee_,kit_group_purchase_type_,deposit_fee_,create_time_,update_time_)
+        VALUES(#{id},#{musicGroupId},#{subjectId},#{expectedStudentNum},#{applyStudentNum},#{fee},#{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{depositFee},now(),now())
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -52,9 +50,6 @@
             <if test="applyStudentNum != null">
                 apply_student_num_ = #{applyStudentNum},
             </if>
-            <if test="paidStudentNum != null">
-                paid_student_num_ = #{paidStudentNum},
-            </if>
             <if test="fee != null">
                 fee_ = #{fee},
             </if>
@@ -97,13 +92,13 @@
 
     <!-- 查询乐团科目计划表 -->
     <select id="getMusicSubjectClassPlan" resultMap="MusicGroupSubjectPlan">
-        SELECT sp.*, sb.name_ subject_name_
+        SELECT sp.*, sb.name_
         FROM music_group_subject_plan sp
         LEFT JOIN subject sb ON sb.id_ = sp.subject_id_
         WHERE sp.music_group_id_=#{musicGroupId}
     </select>
     <select id="getMusicOneSubjectClassPlan" resultMap="MusicGroupSubjectPlan">
-        SELECT sp.*, sb.name_ subject_name_
+        SELECT sp.*, sb.name_
         FROM music_group_subject_plan sp
         LEFT JOIN subject sb ON sb.id_ = sp.subject_id_
         WHERE sp.music_group_id_=#{musicGroupId} AND sp.subject_id_=#{subjectId}

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

@@ -16,7 +16,6 @@
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="create_time_" property="createTime"/>
         <result column="remark_" property="remark"/>
-        <result column="current_class_times_" property="currentClassTimes"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -38,15 +37,15 @@
         </selectKey>
         -->
         INSERT INTO student_attendance
-        (id_,music_group_id_,class_group_id_,course_schedule_id_,user_id_,teacher_id_,status_,create_time_,remark_,current_class_times_)
-        VALUES(#{id},#{musicGroupId},#{classGroupId},#{courseScheduleId},#{userId},#{teacherId},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{remark},#{currentClassTimes})
+        (id_,music_group_id_,class_group_id_,course_schedule_id_,user_id_,teacher_id_,status_,create_time_,remark_)
+        VALUES(#{id},#{musicGroupId},#{classGroupId},#{courseScheduleId},#{userId},#{teacherId},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{remark})
     </insert>
 
     <insert id="addStudentAttendances" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
-      INSERT INTO student_attendance ( music_group_id_, class_group_id_, course_schedule_id_, user_id_, teacher_id_, status_, create_time_, remark_ ,current_class_times_)
+      INSERT INTO student_attendance ( music_group_id_, class_group_id_, course_schedule_id_, user_id_, teacher_id_, status_, create_time_, remark_ )
       VALUES
 	  <foreach collection="list" item="studentAttendance" separator=",">
-          (#{studentAttendance.musicGroupId},#{studentAttendance.classGroupId},#{studentAttendance.courseScheduleId},#{studentAttendance.userId},#{studentAttendance.teacherId},#{studentAttendance.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{studentAttendance.remark},#{studentAttendance.currentClassTimes})
+          (#{studentAttendance.musicGroupId},#{studentAttendance.classGroupId},#{studentAttendance.courseScheduleId},#{studentAttendance.userId},#{studentAttendance.teacherId},#{studentAttendance.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),#{studentAttendance.remark})
       </foreach>
     </insert>
 
@@ -63,9 +62,6 @@
             <if test="remark != null">
                 remark_ = #{remark},
             </if>
-            <if test="currentClassTimes != null">
-                current_class_times_ = #{currentClassTimes},
-            </if>
             <if test="classGroupId != null">
                 class_group_id_ = #{classGroupId},
             </if>

+ 12 - 14
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -28,6 +28,8 @@
         <result column="parents_company_" property="parentsCompany"/>
         <result column="payment_status_" property="paymentStatus"
                 typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="last_payment_date_" property="lastPaymentDate"/>
+        <result column="next_payment_date_" property="nextPaymentDate"/>
     </resultMap>
     
     <resultMap type="com.ym.mec.biz.dal.dto.StudentInfo" id="StudentInfo">
@@ -75,9 +77,9 @@
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentRegistration" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
         INSERT INTO student_registration
-        (parents_phone_,id_,user_id_,name_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,actual_subject_id_)
+        (parents_phone_,id_,user_id_,name_,music_group_id_,current_grade_,current_class_,subject_id_,is_allow_adjust_,kit_purchase_method_,remark_,create_time_,update_time_,parents_name_,parents_company_,payment_status_,last_payment_date_,next_payment_date_,actual_subject_id_)
         VALUES(#{parentsPhone},#{id},#{userId},#{name},#{musicGroupId},#{currentGrade},#{currentClass},#{subjectId},#{isAllowAdjust,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{kitPurchaseMethod,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-        #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{subjectId})
+        #{remark},now(),now(),#{parentsName},#{parentsCompany},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{lastPaymentDate},#{nextPaymentDate},#{subjectId})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -90,9 +92,15 @@
             <if test="subjectId != null">
                 subject_id_ = #{subjectId},
             </if>
+            <if test="nextPaymentDate != null">
+                next_payment_date_ = #{nextPaymentDate},
+            </if>
             <if test="currentGrade != null">
                 current_grade_ = #{currentGrade},
             </if>
+            <if test="lastPaymentDate != null">
+                last_payment_date_ = #{lastPaymentDate},
+            </if>
             <if test="currentClass != null">
                 current_class_ = #{currentClass},
             </if>
@@ -192,7 +200,7 @@
         <result column="subject_name_" property="subjectName"/>
         <result column="username_" property="studentName"/>
         <result column="actual_subject_name_" property="actualSubjectName"/>
-        <result column="payment_status_" property="paymentStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="payment_status_" property="paymentStatus"/>
         <result column="gender_" property="gender" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
     <select id="queryStudentDetailPage" resultMap="studentApplyDetail">
@@ -238,18 +246,8 @@
     </select>
 
     <update id="updateByUserIdAndMusicGroupId" parameterType="com.ym.mec.biz.dal.entity.StudentRegistration">
-        UPDATE student_registration SET class_group_id_ = #{classGroupId} WHERE user_id_ = #{userId} AND music_group_id_
-        = #{musicGroupId}
+        UPDATE student_registration SET class_group_id_ = #{classGroupId} WHERE user_id_ = #{userId} AND music_group_id_ = #{musicGroupId}
     </update>
-
-    <!-- 根据乐团编号和手机号查询注册乐团注册信息-->
-    <select id="getByPhoneAndMusicGroupId" resultMap="StudentRegistration">
-        SELECT * FROM student_registration WHERE music_group_id_=#{musicGroupId} AND parents_phone_ = #{parentsPhone}
-    </select>
-
-    <select id="getSysUserByPhone" resultType="map">
-        SELECT * FROM sys_user WHERE phone_ = #{phone}
-    </select>
     
     <select id="queryStudentInfo" resultMap="StudentInfo">
         SELECT u.*,sr.name_,sr.current_class_,sr.current_grade_,sr.actual_subject_id_ FROM sys_user u left join student_registration  sr on u.id_ = sr.user_id_ where u.id_ = #{userId} order by sr.create_time_ desc limit 0,1

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

@@ -19,7 +19,7 @@
         <result column="comment_" property="comment"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
-        <result column="attribute1_" property="attribute"/>
+        <result column="attribute_" property="attribute"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -41,7 +41,7 @@
         </selectKey>
         -->
         INSERT INTO sys_user_cash_account_detail
-        (user_id_,trans_no_,type_,amount_,balance_,description_,comment_,create_time_,update_time_,attribute1_)
+        (user_id_,trans_no_,type_,amount_,balance_,description_,comment_,create_time_,update_time_,attribute_)
         VALUES(#{userId},#{transNo},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{amount},#{balance},#{description},#{comment},now(),now(),#{attribute})
     </insert>
 

+ 9 - 0
mec-education/src/main/java/com/ym/mec/education/controller/StudentController.java

@@ -5,6 +5,7 @@ import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.req.StudentReq;
 import com.ym.mec.education.service.IClassGroupStudentMapperService;
+import com.ym.mec.education.service.ICourseScheduleService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -28,6 +29,8 @@ public class StudentController {
 
     @Autowired
     private IClassGroupStudentMapperService groupStudentMapperService;
+    @Autowired
+    private ICourseScheduleService courseScheduleService;
 
     @PostMapping("/list")
     @ApiOperation("学员名单列表")
@@ -47,4 +50,10 @@ public class StudentController {
         return groupStudentMapperService.getInfo(studentReq);
     }
 
+    @PostMapping("/course")
+    @ApiOperation("根据学员id查询进行中的课程计划和历史课程计划")
+    public BaseResponse courseInfo(@RequestBody StudentReq studentReq) {
+        return courseScheduleService.getCourseScheduleByStudent(studentReq);
+    }
+
 }

+ 41 - 27
mec-education/src/main/java/com/ym/mec/education/enums/TeachModeEnum.java

@@ -1,33 +1,47 @@
 package com.ym.mec.education.enums;
 
 import com.ym.mec.common.enums.BaseEnum;
+import java.util.Arrays;
 
 public enum TeachModeEnum implements BaseEnum<String, TeachModeEnum> {
-	ONLINE("ONLINE", "线上"), OFFLINE("OFFLINE", "线下");
-
-	private String code;
-
-	private String msg;
-
-	TeachModeEnum(String code, String msg) {
-		this.code = code;
-		this.msg = msg;
-	}
-
-	public void setCode(String code) {
-		this.code = code;
-	}
-
-	public String getMsg() {
-		return msg;
-	}
-
-	public void setMsg(String msg) {
-		this.msg = msg;
-	}
-
-	@Override
-	public String getCode() {
-		return this.code;
-	}
+    ONLINE("ONLINE", "线上"), OFFLINE("OFFLINE", "线下");
+
+    private String code;
+
+    private String msg;
+
+    TeachModeEnum(String code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    @Override
+    public String getCode() {
+        return this.code;
+    }
+
+    /**
+     * 根据枚举值获取枚举信息
+     *
+     * @param code 枚举值
+     * @return 枚举信息
+     */
+    public static String getMsgByCode(String code) {
+        return Arrays.stream(TeachModeEnum.values())
+            .filter(TeachModeEnum -> TeachModeEnum.getCode().equals(code))
+            .findFirst()
+            .map(TeachModeEnum::getMsg).orElse(null);
+    }
 }

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

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

+ 39 - 0
mec-education/src/main/java/com/ym/mec/education/resp/StudentResp.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.experimental.Accessors;
+
 import java.io.Serializable;
 import java.util.List;
 
@@ -32,4 +33,42 @@ public class StudentResp implements Serializable {
     private String parentsPhone;
     @ApiModelProperty(value = "备注")
     private String remark;
+    @ApiModelProperty(value = "进行中课程计划")
+    private List<StudentCourseSchedule> inProgressCourseSchedule;
+    @ApiModelProperty(value = "已完成课程计划")
+    private List<StudentCourseSchedule> completedCourseSchedule;
+
+    @Data
+    @ApiModel(value = "课程计划")
+    @Accessors(chain = true)
+    public static class StudentCourseSchedule {
+        @ApiModelProperty(value = "乐团名称")
+        private String musicGroupName;
+        @ApiModelProperty(value = "乐团id", example = "1")
+        private Integer musicGroupId;
+        @ApiModelProperty(value = "课程日期", example = "9月19日")
+        private String classDate;
+        @ApiModelProperty(value = "课程星期", example = "星期一")
+        private String classWeek;
+        @ApiModelProperty(value = "课程时间", example = "12:00-17:00")
+        private String classTime;
+        @ApiModelProperty(value = "缴费状态,已缴费,待续费,已续费", example = "已续费")
+        private String renewStatus;
+        @ApiModelProperty(value = "学校经纬度", example = "118.800454,32.083998")
+        private String schoolLongitudeLatitude;
+        @ApiModelProperty(value = "课程类别 1 乐团 2 vip", example = "1")
+        private Integer courseType;
+        @ApiModelProperty(value = "讲课老师", example = "张老师")
+        private String teacher;
+        @ApiModelProperty(value = "教学形式 线上 线下", example = "线上")
+        private String teachMode;
+        @ApiModelProperty(value = "课程总数", example = "60分钟/次,共30节")
+        private String totalClassTimes;
+        @ApiModelProperty(value = "上课学生")
+        private List<String> studentList;
+    }
+
+    public static StudentCourseSchedule getStudentCourseSchedule() {
+        return new StudentCourseSchedule();
+    }
 }

+ 12 - 0
mec-education/src/main/java/com/ym/mec/education/service/ICourseScheduleService.java

@@ -6,6 +6,7 @@ import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.CourseSchedule;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.req.CourseScheduleReq;
+import com.ym.mec.education.req.StudentReq;
 
 /**
  * <p>
@@ -19,6 +20,7 @@ public interface ICourseScheduleService extends IService<CourseSchedule> {
 
     /**
      * 根据参数分页查询课程计划列表
+     *
      * @param classGroupReq
      * @return
      */
@@ -26,6 +28,7 @@ public interface ICourseScheduleService extends IService<CourseSchedule> {
 
     /**
      * 根据课程计划id获取课程计划详情
+     *
      * @param courseScheduleReq
      * @return
      */
@@ -33,11 +36,20 @@ public interface ICourseScheduleService extends IService<CourseSchedule> {
 
     /**
      * 历史考勤统计-头信息
+     *
      * @param classGroupReq
      * @return
      */
     BaseResponse getStatisticsInfo(ClassGroupReq classGroupReq);
 
+    /**
+     * 根据学生id查询进行中和已完成的课程计划
+     *
+     * @param studentReq
+     * @return
+     */
+    BaseResponse getCourseScheduleByStudent(StudentReq studentReq);
+
 
     /**
      * 根据课程计划id获取课程计划详情

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

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

+ 135 - 19
mec-education/src/main/java/com/ym/mec/education/service/impl/CourseScheduleServiceImpl.java

@@ -8,13 +8,17 @@ import com.google.common.collect.Lists;
 import com.ym.mec.education.base.BaseResponse;
 import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.*;
+import com.ym.mec.education.enums.CourseStatusEnum;
 import com.ym.mec.education.enums.StudentAttendanceStatusEnum;
+import com.ym.mec.education.enums.TeachModeEnum;
 import com.ym.mec.education.enums.TeachTypeEnum;
 import com.ym.mec.education.mapper.CourseScheduleMapper;
 import com.ym.mec.education.req.ClassGroupReq;
 import com.ym.mec.education.req.CourseScheduleReq;
+import com.ym.mec.education.req.StudentReq;
 import com.ym.mec.education.resp.CourseInfoResp;
 import com.ym.mec.education.resp.CourseScheduleResp;
+import com.ym.mec.education.resp.StudentResp;
 import com.ym.mec.education.service.*;
 import com.ym.mec.education.utils.DateUtil;
 import org.apache.commons.lang3.StringUtils;
@@ -22,11 +26,7 @@ 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.Date;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -52,12 +52,16 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
     private IStudentAttendanceService studentAttendanceService;
     @Autowired
     private IMusicGroupQuitService musicGroupQuitService;
-
+    @Autowired
+    private IClassGroupStudentMapperService classGroupStudentMapperService;
+    @Autowired
+    private IClassGroupService classGroupService;
     @Autowired
     private IMusicGroupService musicGroupService;
-
     @Autowired
     private ISchoolService schoolService;
+    @Autowired
+    private IMusicGroupStudentFeeService studentFeeService;
 
     @Override
     public PageResponse getPage(ClassGroupReq classGroupReq) {
@@ -77,11 +81,11 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
             courseScheduleResp.setId(item.getId());
             if (Objects.nonNull(item.getClassDate())) {
                 courseScheduleResp.setClassDate(DateUtil.date2String(item.getClassDate())
-                        + " " + DateUtil.date2Week(item.getClassDate()));
+                    + " " + DateUtil.date2Week(item.getClassDate()));
             }
             if (Objects.nonNull(item.getStartClassTime()) && Objects.nonNull(item.getEndClassTime())) {
                 courseScheduleResp.setClassTime(DateUtil.time2String(item.getStartClassTime()) + "-" +
-                        DateUtil.time2String(item.getEndClassTime()));
+                    DateUtil.time2String(item.getEndClassTime()));
             }
             if (StringUtils.isNotBlank(classGroup.getSubjectIdList())) {
                 List<String> subjectNameList = subjectService.getSubjectList(classGroup.getSubjectIdList()).stream().map(Subject::getName).collect(Collectors.toList());
@@ -91,8 +95,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
             }
             QueryWrapper<ClassGroupTeacherMapper> classGroupTeacherMapperQueryWrapper = new QueryWrapper<>();
             classGroupTeacherMapperQueryWrapper.lambda().eq(ClassGroupTeacherMapper::getClassGroupId, item.getClassGroupId())
-                    .eq(ClassGroupTeacherMapper::getTeacherRole, TeachTypeEnum.BISHOP.getCode())
-                    .eq(ClassGroupTeacherMapper::getUserId, item.getTeacherId());
+                .eq(ClassGroupTeacherMapper::getTeacherRole, TeachTypeEnum.BISHOP.getCode())
+                .eq(ClassGroupTeacherMapper::getUserId, item.getTeacherId());
             ClassGroupTeacherMapper classGroupTeacherMapper = classGroupTeacherMapperService.getOne(classGroupTeacherMapperQueryWrapper);
             if (Objects.nonNull(classGroupTeacherMapper)) {
                 SysUser sysUser = sysUserService.getById(classGroupTeacherMapper.getUserId());
@@ -116,24 +120,24 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
         if (Objects.nonNull(courseSchedule)) {
             if (Objects.nonNull(courseSchedule.getClassDate())) {
                 courseScheduleResp.setClassDate(DateUtil.date2String(courseSchedule.getClassDate()) + "(" +
-                        DateUtil.date2Week(courseSchedule.getClassDate()) + ")");
+                    DateUtil.date2Week(courseSchedule.getClassDate()) + ")");
             }
             if (Objects.nonNull(courseSchedule.getStartClassTime()) &&
-                    Objects.nonNull(courseSchedule.getEndClassTime())) {
+                Objects.nonNull(courseSchedule.getEndClassTime())) {
                 courseScheduleResp.setClassTime(DateUtil.time2String(courseSchedule.getStartClassTime()) + "-" +
-                        DateUtil.time2String(courseSchedule.getEndClassTime()));
+                    DateUtil.time2String(courseSchedule.getEndClassTime()));
             }
             if (Objects.nonNull(courseSchedule.getTeacherId())) {
                 Optional.of(sysUserService.getById(courseSchedule.getTeacherId())).
-                        ifPresent(sysUser -> courseScheduleResp.setTeacher(sysUser.getRealName()));
+                    ifPresent(sysUser -> courseScheduleResp.setTeacher(sysUser.getRealName()));
             }
             QueryWrapper<StudentAttendance> studentAttendanceQueryWrapper = new QueryWrapper<>();
             studentAttendanceQueryWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId())
-                    .orderByDesc(true, StudentAttendance::getCreateTime);
+                .orderByDesc(true, StudentAttendance::getCreateTime);
             List<StudentAttendance> studentAttendanceList = studentAttendanceService.list(studentAttendanceQueryWrapper);
             if (!CollectionUtils.isEmpty(studentAttendanceList)) {
                 studentAttendanceList.stream().findFirst().ifPresent(studentAttendance ->
-                        courseScheduleResp.setLastCommitDate(DateUtil.date2String(studentAttendance.getCreateTime(), DateUtil.DATE_FORMAT_HOUR)));
+                    courseScheduleResp.setLastCommitDate(DateUtil.date2String(studentAttendance.getCreateTime(), DateUtil.DATE_FORMAT_HOUR)));
             }
             QueryWrapper<StudentAttendance> leaveWrapper = new QueryWrapper<>();
             QueryWrapper<StudentAttendance> normalWrapper = new QueryWrapper<>();
@@ -141,11 +145,11 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
             Integer totalCount = count();
             //请假
             leaveWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId())
-                    .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.LEAVE.getCode());
+                .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.LEAVE.getCode());
             Integer leaveCount = studentAttendanceService.count(leaveWrapper);
             //正常
             normalWrapper.lambda().eq(true, StudentAttendance::getCourseScheduleId, courseSchedule.getId())
-                    .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.NORMAL.getCode());
+                .eq(true, StudentAttendance::getStatus, StudentAttendanceStatusEnum.NORMAL.getCode());
             Integer normalCount = studentAttendanceService.count(normalWrapper);
             courseScheduleResp.setLeaveNum(leaveCount);
             if (totalCount != 0) {
@@ -181,6 +185,118 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleMapper,
     }
 
     @Override
+    public BaseResponse getCourseScheduleByStudent(StudentReq studentReq) {
+        if (Objects.isNull(studentReq.getStudentId())) {
+            return BaseResponse.errorParam();
+        }
+        StudentResp studentResp = new StudentResp();
+        QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
+        classGroupStudentMapperQueryWrapper.lambda().eq(ClassGroupStudentMapper::getUserId, studentReq.getStudentId());
+        List<ClassGroupStudentMapper> classGroupStudentMapperList = classGroupStudentMapperService.list(classGroupStudentMapperQueryWrapper);
+        if (!CollectionUtils.isEmpty(classGroupStudentMapperList)) {
+            classGroupStudentMapperList.forEach(classGroupStudentMapper -> {
+                ClassGroup classGroup = classGroupService.getById(classGroupStudentMapper.getClassGroupId());
+                if (Objects.nonNull(classGroup)) {
+                    QueryWrapper<CourseSchedule> courseScheduleQueryWrapper = new QueryWrapper<>();
+                    courseScheduleQueryWrapper.lambda().eq(CourseSchedule::getClassGroupId, classGroup.getId())
+                        .in(CourseSchedule::getStatus, CourseStatusEnum.UNDERWAY.getCode(), CourseStatusEnum.OVER.getCode());
+                    List<CourseSchedule> courseScheduleList = list(courseScheduleQueryWrapper);
+                    //进行中的课程计划
+                    if (!CollectionUtils.isEmpty(courseScheduleList)) {
+                        List<StudentResp.StudentCourseSchedule> inProgressCourseSchedule = getCourseSchduleList(courseScheduleList.stream().filter(courseSchedule ->
+                            courseSchedule.getStatus().equals(CourseStatusEnum.UNDERWAY.getCode())).collect(Collectors.toList()), classGroup, studentReq);
+                        studentResp.setInProgressCourseSchedule(inProgressCourseSchedule);
+                        //已完成的课程计划
+                        List<StudentResp.StudentCourseSchedule> completedCourseSchedule = getCourseSchduleList(courseScheduleList.stream().filter(courseSchedule ->
+                            courseSchedule.getStatus().equals(CourseStatusEnum.OVER.getCode())).collect(Collectors.toList()), classGroup, studentReq);
+                        studentResp.setCompletedCourseSchedule(completedCourseSchedule);
+                    }
+                }
+            });
+        }
+        return BaseResponse.success(studentResp);
+    }
+
+    /**
+     * 获取
+     *
+     * @param courseScheduleList
+     * @param classGroup
+     * @return
+     */
+    private List<StudentResp.StudentCourseSchedule> getCourseSchduleList(List<CourseSchedule> courseScheduleList, ClassGroup classGroup, StudentReq studentReq) {
+        if (!CollectionUtils.isEmpty(courseScheduleList)) {
+            List<StudentResp.StudentCourseSchedule> studentCourseScheduleList = Lists.newArrayList();
+            courseScheduleList.forEach(courseSchedule -> {
+                StudentResp.StudentCourseSchedule studentCourseSchedule = StudentResp.getStudentCourseSchedule();
+                QueryWrapper<MusicGroupStudentFee> studentFeeQueryWrapper = new QueryWrapper<>();
+                studentFeeQueryWrapper.lambda().eq(MusicGroupStudentFee::getMusicGroupId, classGroup.getMusicGroupId())
+                    .eq(MusicGroupStudentFee::getUserId, studentReq.getStudentId());
+                MusicGroupStudentFee musicGroupStudentFee = studentFeeService.getOne(studentFeeQueryWrapper);
+                MusicGroup musicGroup = musicGroupService.getById(classGroup.getMusicGroupId());
+                Optional.ofNullable(musicGroup).ifPresent(musicGroupParam -> {
+                    studentCourseSchedule.setMusicGroupName(musicGroupParam.getName());
+                    studentCourseSchedule.setMusicGroupId(classGroup.getMusicGroupId());
+                    School school = schoolService.getById(musicGroup.getSchoolId());
+                    Optional.ofNullable(school).ifPresent(value -> studentCourseSchedule.
+                        setSchoolLongitudeLatitude(value.getLongitudeLatitude()));
+                });
+                Optional.ofNullable(courseSchedule.getClassDate()).ifPresent(classDate ->
+                    studentCourseSchedule.setClassDate(DateUtil.date2String(courseSchedule.getClassDate()))
+                        .setClassWeek(DateUtil.date2Week2(courseSchedule.getClassDate())));
+                if (Objects.nonNull(courseSchedule.getStartClassTime()) && Objects.nonNull(courseSchedule.getEndClassTime())) {
+                    studentCourseSchedule.setClassTime(DateUtil.time2String(courseSchedule.getStartClassTime()) + "-"
+                        + DateUtil.time2String(courseSchedule.getEndClassTime()))
+                        .setTotalClassTimes(DateUtil.timeDifference(courseSchedule.getStartClassTime(), courseSchedule.getEndClassTime()) + "分钟/次,共" +
+                            classGroup.getTotalClassTimes() + "节");
+                }
+                QueryWrapper<MusicGroupPaymentCalender> paymentCalenderQueryWrapper = new QueryWrapper<>();
+                paymentCalenderQueryWrapper.lambda().eq(MusicGroupPaymentCalender::getMusicGroupId, musicGroup.getId());
+                //乐团课(单技课,合奏课,综合课,小班)
+                if (CourseSchedule.CourseScheduleType.SINGLE.getCode().equals(courseSchedule.getType()) ||
+                    CourseSchedule.CourseScheduleType.MIX.getCode().equals(courseSchedule.getType()) ||
+                    CourseSchedule.CourseScheduleType.COMPREHENSIVE.getCode().equals(courseSchedule.getType()) ||
+                    CourseSchedule.CourseScheduleType.HIGH.getCode().equals(courseSchedule.getType())) {
+                    studentCourseSchedule.setCourseType(1);
+                    //续费状态
+                    if (Objects.nonNull(musicGroupStudentFee)) {
+                        studentCourseSchedule.setRenewStatus("已缴费");
+                    }
+                } else if (CourseSchedule.CourseScheduleType.VIP.getCode().equals(courseSchedule.getType())) {
+                    studentCourseSchedule.setCourseType(2);
+                    if (Objects.isNull(musicGroupStudentFee.getNextPaymentDate())){
+                        studentCourseSchedule.setRenewStatus("未续费");
+                    }else {
+                        studentCourseSchedule.setRenewStatus("已续费");
+                    }
+                    SysUser teacher = sysUserService.getById(courseSchedule.getTeacherId());
+                    if (Objects.nonNull(teacher)) {
+                        //讲课老师
+                        studentCourseSchedule.setTeacher(teacher.getRealName());
+                    }
+                    //教学形式
+                    studentCourseSchedule.setTeachMode(TeachModeEnum.getMsgByCode(courseSchedule.getTeachMode()));
+                    //上课学生
+                    QueryWrapper<ClassGroupStudentMapper> classGroupStudentMapperQueryWrapper = new QueryWrapper<>();
+                    classGroupStudentMapperQueryWrapper.lambda().eq(ClassGroupStudentMapper::getClassGroupId, courseSchedule.getClassGroupId());
+                    List<ClassGroupStudentMapper> groupStudentMapperList = classGroupStudentMapperService.list(classGroupStudentMapperQueryWrapper);
+                    if (!CollectionUtils.isEmpty(groupStudentMapperList)) {
+                        QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
+                        sysUserQueryWrapper.lambda().in(SysUser::getId, groupStudentMapperList.stream().map(ClassGroupStudentMapper::getUserId).collect(Collectors.toList()));
+                        List<SysUser> sysUserList = sysUserService.list(sysUserQueryWrapper);
+                        if (!CollectionUtils.isEmpty(sysUserList)) {
+                            studentCourseSchedule.setStudentList(sysUserList.stream().map(SysUser::getRealName).collect(Collectors.toList()));
+                        }
+                    }
+                }
+                studentCourseScheduleList.add(studentCourseSchedule);
+            });
+            return studentCourseScheduleList;
+        }
+        return Collections.emptyList();
+    }
+
+    @Override
     public BaseResponse courseInfo(CourseScheduleReq courseScheduleReq) {
 
 

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

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

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

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
 import java.sql.Time;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
+import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
 import java.util.Calendar;
 import java.util.Date;
@@ -55,6 +56,21 @@ public class DateUtil {
         return format;
     }
 
+    /**
+     * 返回分钟差
+     *
+     * @param time1
+     * @param time2
+     * @return
+     */
+    public static Integer timeDifference(Time time1, Time time2) {
+        LocalTime localTime1 = time1.toLocalTime();
+        LocalTime localTime2 = time2.toLocalTime();
+        Integer hour = localTime2.getHour() - localTime1.getHour();
+        Integer minute = localTime2.getMinute() - localTime1.getMinute();
+        return hour * 60 + minute;
+    }
+
     public static String date2Week(Date date) {
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(date);
@@ -79,8 +95,33 @@ public class DateUtil {
         }
     }
 
+    public static String date2Week2(Date date) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        int i = calendar.get(Calendar.DAY_OF_WEEK);
+        switch (i) {
+            case 1:
+                return "周日";
+            case 2:
+                return "周一";
+            case 3:
+                return "周二";
+            case 4:
+                return "周三";
+            case 5:
+                return "周四";
+            case 6:
+                return "周五";
+            case 7:
+                return "周六";
+            default:
+                return "";
+        }
+    }
+
     /**
      * 获取下个月的第一天
+     *
      * @param date
      * @return
      */
@@ -97,12 +138,12 @@ public class DateUtil {
     }
 
 
-    public static Integer subMin(Date startTime,Date endTime){
+    public static Integer subMin(Date startTime, Date endTime) {
 
-        if(startTime != null && endTime != null){
+        if (startTime != null && endTime != null) {
             long from = startTime.getTime();
             long to = endTime.getTime();
-            Integer hours = (int) ((to - from)/(1000 * 60 * 60));
+            Integer hours = (int) ((to - from) / (1000 * 60 * 60));
 
             return hours;
         }

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/config/ResourceServerConfig.java

@@ -22,7 +22,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
 
 	@Override
 	public void configure(HttpSecurity http) throws Exception {
-		http.csrf().disable().authorizeRequests().antMatchers("/v2/api-docs", "/register/getMusicGroupRegInfo","/register/add").permitAll().anyRequest().authenticated().and().httpBasic();
+		http.csrf().disable().authorizeRequests().antMatchers("/v2/api-docs", "/register/findSubByMusicGroupId","/register/findGoodsGroups").permitAll().anyRequest().authenticated().and().httpBasic();
 	}
 
 	@Override

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

@@ -4,13 +4,8 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
 import com.ym.mec.biz.dal.dto.RegisterPayDto;
-import com.ym.mec.biz.dal.entity.Goods;
-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.enums.GoodsType;
-import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
-import com.ym.mec.biz.service.*;
+import com.ym.mec.biz.service.MusicGroupService;
+import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
@@ -19,16 +14,12 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.annotation.Resource;
 import javax.xml.soap.Name;
-import java.math.BigDecimal;
 import java.util.Date;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 
 @RequestMapping("musicGroup")
@@ -36,18 +27,12 @@ import java.util.Map;
 @RestController
 public class MusicGroupController extends BaseController {
 
-    @Resource
+    @Autowired
     private SysUserFeignService sysUserFeignService;
     @Autowired
     private MusicGroupService musicGroupService;
     @Autowired
     private MusicGroupSubjectPlanService musicGroupSubjectPlanService;
-    @Autowired
-    private StudentRegistrationService studentRegistrationService;
-    @Autowired
-    private MusicGroupSubjectGoodsGroupService musicGroupSubjectGoodsGroupService;
-    @Autowired
-    private GoodsService goodsService;
 
     @ApiOperation("获取学生所在乐团列表")
     @GetMapping(value = "/queryUserMusicGroups")
@@ -93,50 +78,7 @@ public class MusicGroupController extends BaseController {
     @ApiOperation(value = "乐团报名支付")
     @GetMapping("/pay")
     @ApiImplicitParams({@ApiImplicitParam(name = "registerPayDto", value = "支付信息", required = true, dataType = "Integer")})
-    public HttpResponseResult pay(@RequestBody RegisterPayDto registerPayDto) {
-        SysUser sysUser = sysUserFeignService.queryUserInfo();
-        StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
-        if (!studentRegistration.getUserId().equals(sysUser.getId())) {
-            return failed("报名信息有误,请核查");
-        }
-
-        BigDecimal amount = registerPayDto.getAmount();
-
-        BigDecimal orderAmount = new BigDecimal("0");
-
-        //获取课程价格
-        MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId());
-        orderAmount.add(musicOneSubjectClassPlan.getFee());
-
-
-        //乐器及打包辅件
-        if (registerPayDto.getGoodsGroupIds() != null) {
-            List<MusicGroupSubjectGoodsGroup> goodsGroups = musicGroupSubjectGoodsGroupService.findGoodsGroupByIds(registerPayDto.getGoodsGroupIds());
-            goodsGroups.forEach(goodsGroup -> {
-                //辅件价格
-                if (goodsGroup.getType().equals(GoodsType.ACCESSORIES)) {
-                    orderAmount.add(goodsGroup.getPrice());
-                    return;
-                }
-                if (musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)) {//租赁
-                    orderAmount.add(musicOneSubjectClassPlan.getDepositFee());
-                } else if (musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.GROUP)) {//团购
-                    orderAmount.add(goodsGroup.getPrice()).subtract(goodsGroup.getRemissionCourseFee());
-                }
-            });
-        }
-
-        //单独辅件
-        if (registerPayDto.getGoodsIds() != null) {
-            List<Goods> goodsList = goodsService.findGoodsByIds(registerPayDto.getGoodsIds());
-            goodsList.forEach(goods -> {
-                orderAmount.add(goods.getGroupPurchasePrice());
-            });
-        }
-        if (amount.compareTo(orderAmount) != 0) {
-            return failed("商品价格不符");
-        }
-
+    public HttpResponseResult pay(RegisterPayDto registerPayDto) {
         Map<String, Object> rqMap = new LinkedHashMap<String, Object>();
         rqMap.put("merNo", "07654478");
         rqMap.put("version", "v1");

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

@@ -42,12 +42,8 @@ public class MusicGroupRegisterController extends BaseController {
 
     @ApiOperation(value = "新增学生报名信息")
     @PostMapping("/add")
-    public Object add(@RequestBody StudentRegistration studentRegistration) {
+    public Object add(StudentRegistration studentRegistration) {
         MusicGroup musicGroup = musicGroupService.get(studentRegistration.getMusicGroupId().toString());
-        StudentRegistration register = studentRegistrationService.getByPhoneAndMusicGroupId(studentRegistration.getMusicGroupId(), studentRegistration.getParentsPhone());
-        if (register != null) {
-            return failed("该乐团您已注册,请勿重复注册");
-        }
         studentRegistration.setOrganId(musicGroup.getOrganId());
         return succeed(studentRegistrationService.addStudent(studentRegistration));
     }

+ 6 - 48
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/YqPayUtil.java

@@ -2,8 +2,8 @@ package com.ym.mec.thirdparty.yqpay;
 
 import com.alibaba.fastjson.JSON;
 
-import java.math.BigDecimal;
-import java.util.*;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class YqPayUtil {
 
@@ -31,6 +31,10 @@ public class YqPayUtil {
         this.requestMap = rqMap;
     }
 
+    public Map<String, Object> getRequestMap() {
+        return this.requestMap;
+    }
+
     //验签
     public static boolean verify(Map<String, Object> rsMap) {
         String sign = (String) rsMap.get("sign");
@@ -43,50 +47,4 @@ public class YqPayUtil {
         }
     }
 
-    /**
-     * 返回订单提交数据
-     * @param amount 金额
-     * @param orderNo 订单编号
-     * @param notifyUrl 异步通知地址
-     * @param returnUrl 支付返回地址
-     * @param orderSubject 订单标题
-     * @param orderBody 订单内容
-     * @return
-     * @throws Exception
-     */
-    public Map getPayMap(BigDecimal amount,String orderNo,String notifyUrl,String returnUrl,String orderSubject,String orderBody) throws Exception {
-
-//        String notifyUrl = ""; //异步通知地址
-//        String returnUrl = ""; //还回地址
-//        String orderBody = "大雅乐盟培训课程";//订单内容
-//        String orderSubject = "培训订单";//订单标题
-//        String orderNo = "2019121263844";//订单编号
-//        BigDecimal amount = new BigDecimal("654369"); //订单金额
-
-        String payUrl = "https://qyfapi.95epay.com/api/api/hPay/toPayHtml";//支付提交地址
-        String payChannels = "{\"weChatPay\":true,\"weChatPayMobile\":false,\"aliPay\":true,\"fastpayXy\":true,\"aliPayMobile\":false,\"balancePay\":false}";//支付方式配置
-
-        List<Map> tempRoutingList = new ArrayList();
-//        Map<String, Object> routingList = new HashMap<>();
-//        routingList.put("routingMerNo", routingAccount.getSellerNo());//分佣账户
-//        routingList.put("routingFee", order.getAmount().subtract((order.getAmount().multiply(new BigDecimal(0.28)).divide(new BigDecimal(100))).setScale(2, BigDecimal.ROUND_HALF_UP))); //分佣金额
-//        tempRoutingList.add(routingList);
-
-        Map<String, Object> resultMap = new LinkedHashMap<String, Object>();
-        resultMap.put("sellerNo", "0021677"); //收款商户号
-        resultMap.put("payChannels", payChannels); //支付方式
-        resultMap.put("orderBody", orderBody); //订单信息
-        resultMap.put("payAmount", amount); //支付金额
-        resultMap.put("apiPayType", "1"); //*API支付类型1-即时支付,2-担保支付,3-预授权支付*/
-        resultMap.put("tradeType", "0"); //*交易类型1—充值,0—收款*
-        resultMap.put("merMerOrderNo", orderNo); //商户订单号
-        resultMap.put("orderSubject", orderSubject); //订单标题
-        resultMap.put("returnUrl", returnUrl); //前台页面地址
-        resultMap.put("tempRoutingList", JSON.toJSONString(tempRoutingList));//分账设置
-        Map rqMap = new YqPayUtil(notifyUrl, resultMap).requestMap;
-        rqMap.put("host", payUrl);
-        return rqMap;
-    }
-
-
 }

+ 0 - 4
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/yqpay/payInfo.java

@@ -1,4 +0,0 @@
-package com.ym.mec.thirdparty.yqpay;
-
-public class payInfo {
-}

+ 12 - 9
mec-web/src/main/java/com/ym/mec/web/controller/VipGroupCategoryController.java

@@ -1,17 +1,20 @@
 package com.ym.mec.web.controller;
 
-import com.ym.mec.biz.dal.entity.VipGroupCategory;
-import com.ym.mec.biz.service.VipGroupCategoryService;
-import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+
+import java.util.Date;
+
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.Date;
+import com.ym.mec.biz.dal.entity.VipGroupCategory;
+import com.ym.mec.biz.service.VipGroupCategoryService;
+import com.ym.mec.common.controller.BaseController;
 
 @Api(tags = "vip课类别")
 @RequestMapping("vipGroupCategory")
@@ -22,19 +25,19 @@ public class VipGroupCategoryController extends BaseController {
 	private VipGroupCategoryService vipGroupCategoryService;
 
 	@ApiOperation("单查询")
-	@GetMapping(value = "/query")
+	@GetMapping(value = "/query", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	public Object query(int id) {
 		return succeed(vipGroupCategoryService.get(id));
 	}
 
 	@ApiOperation("全查询")
-	@GetMapping(value = "/queryAll")
+	@GetMapping(value = "/queryAll", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	public Object queryAll() {
 		return succeed(vipGroupCategoryService.findAll(null));
 	}
 
 	@ApiOperation("新增")
-	@PostMapping(value = "/add")
+	@PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	public Object add(VipGroupCategory vipGroupCategory) {
 		Date date = new Date();
 		vipGroupCategory.setCreateTime(date);
@@ -45,7 +48,7 @@ public class VipGroupCategoryController extends BaseController {
 	}
 
 	@ApiOperation("修改")
-	@PostMapping(value = "/update")
+	@PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	public Object update(VipGroupCategory vipGroupCategory) {
 		Date date = new Date();
 		vipGroupCategory.setUpdateTime(date);
@@ -54,7 +57,7 @@ public class VipGroupCategoryController extends BaseController {
 	}
 
 	@ApiOperation("删除")
-	@PostMapping(value = "/delete")
+	@PostMapping(value = "/delete", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 	public Object delete(int id) {
 		VipGroupCategory vipGroupCategory = vipGroupCategoryService.get(id);
 		Date date = new Date();

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

@@ -6,11 +6,11 @@ import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
-
 import java.util.Date;
 
 @Api(tags = "vip课默认排课周期")

+ 8 - 0
mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/ProcessController.java

@@ -16,19 +16,27 @@ package com.ym.mec.workfow.controller.flow;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
 import org.snaker.engine.SnakerEngine;
 import org.snaker.engine.access.Page;
 import org.snaker.engine.access.QueryFilter;
+import org.snaker.engine.entity.HistoryTask;
 import org.snaker.engine.entity.Process;
+import org.snaker.engine.entity.Task;
+import org.snaker.engine.helper.AssertHelper;
 import org.snaker.engine.helper.StringHelper;
+import org.snaker.engine.model.ProcessModel;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 

+ 51 - 1
mec-workflow/src/main/java/com/ym/mec/workfow/controller/flow/TaskController.java

@@ -9,6 +9,7 @@ import org.apache.commons.lang.StringUtils;
 import org.snaker.engine.SnakerEngine;
 import org.snaker.engine.access.Page;
 import org.snaker.engine.access.QueryFilter;
+import org.snaker.engine.core.AccessService;
 import org.snaker.engine.entity.HistoryOrder;
 import org.snaker.engine.entity.Task;
 import org.snaker.engine.entity.WorkItem;
@@ -39,7 +40,7 @@ public class TaskController extends BaseController {
 	@Autowired
 	private SysUserFeignService SysUserFeignService;
 
-	@GetMapping(value = "queryWaitList")
+	@GetMapping(value = "home")
 	public Object homeTaskList() {
 
 		SysUser user = SysUserFeignService.queryUserInfo();
@@ -70,6 +71,19 @@ public class TaskController extends BaseController {
 		return succeed(model);
 	}
 
+	/**
+	 * 根据当前用户查询待办任务列表
+	 * @param model
+	 * @return
+	 */
+	@GetMapping(value = "queryWaitList")
+	public Object queryWaitList(Page<WorkItem> page) {
+		SysUser user = SysUserFeignService.queryUserInfo();
+
+		snakerEngine.query().getWorkItems(page, new QueryFilter().setOperator(user.getUsername()));
+		return succeed(page);
+	}
+
 	@PostMapping(value = "actor/add")
 	public Object addTaskActor(String orderId, String taskName, String operator) {
 		List<Task> tasks = snakerEngine.query().getActiveTasks(new QueryFilter().setOrderId(orderId));
@@ -105,6 +119,42 @@ public class TaskController extends BaseController {
 	}
 
 	/**
+	 * 活动任务查询列表
+	 * @param model
+	 * @return
+	 */
+	@GetMapping(value = "active/more")
+	public Object activeTaskList(Page<WorkItem> page, Integer taskType) {
+		SysUser user = SysUserFeignService.queryUserInfo();
+
+		List<String> list = new ArrayList<String>();
+		list.add(user.getUsername());
+
+		String[] assignees = new String[list.size()];
+		list.toArray(assignees);
+		snakerEngine.query().getWorkItems(page, new QueryFilter().setOperators(assignees).setTaskType(taskType));
+		return succeed(page);
+	}
+
+	/**
+	 * 活动任务查询列表
+	 * @param model
+	 * @return
+	 */
+	@GetMapping(value = "active/ccmore")
+	public Object activeCCList(Page<HistoryOrder> page) {
+		SysUser user = SysUserFeignService.queryUserInfo();
+
+		List<String> list = new ArrayList<String>();
+		list.add(user.getUsername());
+
+		String[] assignees = new String[list.size()];
+		list.toArray(assignees);
+		snakerEngine.query().getCCWorks(page, new QueryFilter().setOperators(assignees).setState(AccessService.STATE_ACTIVE));
+		return succeed(page);
+	}
+
+	/**
 	 * 活动任务的驳回
 	 * @param model
 	 * @param taskId

+ 5 - 5
mec-workflow/src/main/resources/flows/leave.snaker

@@ -4,17 +4,17 @@
 <transition g="" name="transition1" offset="0,0" to="apply"/>
 </start>
 <end displayName="end1" layout="570,124,-1,-1" name="end1"/>
-<task assignee="applyer" displayName="请假申请" layout="117,122,-1,-1" name="apply" performType="ANY">
+<task assignee="${applyer}" displayName="请假申请" layout="117,122,-1,-1" name="apply" performType="ANY">
 <transition g="" name="transition2" offset="0,0" to="approveDept"/>
 </task>
-<task assignee="deptManager" displayName="部门经理审批" layout="272,122,-1,-1" name="approveDept" performType="ANY">
+<task assignee="${deptManager}" displayName="部门经理审批" layout="272,122,-1,-1" name="approveDept" performType="ANY">
 <transition g="" name="transition3" offset="0,0" to="decision1"/>
 </task>
 <decision displayName="decision1" layout="426,124,-1,-1" name="decision1">
-<transition displayName="&lt;=5天" expr="#days &lt;= 5" g="" name="transition4" offset="0,0" to="end1"/>
-<transition displayName="&gt;5天" expr="#days &gt; 5" g="" name="transition5" offset="0,0" to="approveBoss"/>
+<transition displayName="&lt;=5天" expr="${days &lt;= 5}" g="" name="transition4" offset="0,0" to="end1"/>
+<transition displayName="&gt;5天" expr="${days &gt; 5}" g="" name="transition5" offset="0,0" to="approveBoss"/>
 </decision>
-<task assignee="boss" displayName="总经理审批" layout="404,231,-1,-1" name="approveBoss" performType="ANY">
+<task assignee="${boss}" displayName="总经理审批" layout="404,231,-1,-1" name="approveBoss" performType="ANY">
 <transition g="" name="transition6" offset="0,0" to="end1"/>
 </task>
 </process>

+ 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>

+ 0 - 5
workflowy/src/main/java/org/snaker/engine/model/NodeModel.java

@@ -26,8 +26,6 @@ import org.snaker.engine.core.Execution;
 import org.snaker.engine.helper.ClassHelper;
 import org.snaker.engine.helper.StringHelper;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
 /**
  * 节点元素(存在输入输出的变迁)
  * @author yuqs
@@ -42,12 +40,10 @@ public abstract class NodeModel extends BaseModel implements Action {
 	/**
 	 * 输入变迁集合
 	 */
-	@JsonIgnore
 	private List<TransitionModel> inputs = new ArrayList<TransitionModel>();
 	/**
 	 * 输出变迁集合
 	 */
-	@JsonIgnore
 	private List<TransitionModel> outputs = new ArrayList<TransitionModel>();
 	/**
 	 * layout
@@ -141,7 +137,6 @@ public abstract class NodeModel extends BaseModel implements Action {
 		return result;
 	}
 
-	@JsonIgnore
     public <T> List<T> getNextModels(Class<T> clazz) {
         List<T> models = new ArrayList<T>();
         for(TransitionModel tm : this.getOutputs()) {