zouxuan před 5 roky
rodič
revize
bbd90b34bc
41 změnil soubory, kde provedl 575 přidání a 159 odebrání
  1. 12 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ChargeTypeDao.java
  2. 11 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  3. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupTeacherSalaryDao.java
  4. 12 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/GoodsCategoryDao.java
  5. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupDao.java
  6. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupSubjectPlanDao.java
  7. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SchoolDao.java
  8. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java
  9. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java
  10. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java
  11. 174 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupsDto.java
  12. 56 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java
  13. 13 6
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java
  14. 1 3
      mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupTeacherSalaryService.java
  15. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/GoodsCategoryService.java
  16. 11 4
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java
  17. 2 3
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupSubjectPlanService.java
  18. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentRegistrationService.java
  19. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java
  20. 11 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  21. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupTeacherSalaryServiceImpl.java
  22. 30 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsCategoryServiceImpl.java
  23. 111 74
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  24. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java
  25. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java
  26. 5 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java
  27. 6 0
      mec-biz/src/main/resources/config/mybatis/ChargeTypeMapper.xml
  28. 8 0
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  29. 1 1
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  30. 4 0
      mec-biz/src/main/resources/config/mybatis/GoodsCategoryMapper.xml
  31. 9 1
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  32. 6 0
      mec-biz/src/main/resources/config/mybatis/SchoolMapper.xml
  33. 4 2
      mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml
  34. 7 3
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  35. 2 2
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupRegisterController.java
  36. 12 6
      mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupController.java
  37. 7 14
      mec-web/src/main/java/com/ym/mec/web/controller/GoodsCategoryController.java
  38. 2 3
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupController.java
  39. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/MusicGroupSubjectPlanController.java
  40. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/StudentRegistrationController.java
  41. 4 4
      mec-web/src/main/java/com/ym/mec/web/controller/SubjectController.java

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

@@ -2,8 +2,19 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.entity.ChargeType;
 import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public interface ChargeTypeDao extends BaseDAO<Integer, ChargeType> {
 
-	
+
+    /**
+     * 根据收费类型编号列表获取收费类型名称map
+     * @param chargeTypeIds
+     * @return
+     */
+    List<Map<Integer, String>> queryNameByIds(@Param("chargeTypeIds") Set<Integer> chargeTypeIds);
 }

+ 11 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -28,7 +28,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      *
      * @return
      */
-    List<ClassGroup> findAllMixClassGroup(@Param("musicGroupId") Integer musicGroupId);
+    List<ClassGroup> findAllMixClassGroup(@Param("musicGroupId") String musicGroupId);
 
     /**
      * @return java.util.List<com.ym.mec.biz.dal.entity.ClassGroup>
@@ -37,7 +37,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @params [musicGroupId]
      * @describe 获取所有班级
      */
-    List<ClassGroup> findAllClassGroupByMusicGroup(@Param("musicGroupId") Long musicGroupId);
+    List<ClassGroup> findAllClassGroupByMusicGroup(@Param("musicGroupId") String musicGroupId);
 
     /**
      * 根据合奏班ID查询该合奏班下的子班级
@@ -53,7 +53,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroup> findAllNormalClassGroupByMusicGroupId(@Param("musicGroupId") int musicGroupId);
+    List<ClassGroup> findAllNormalClassGroupByMusicGroupId(@Param("musicGroupId") String musicGroupId);
 
     /**
      * 查询合奏班包含子班的名字信息
@@ -101,7 +101,7 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeachersDto> findClassGroupByMusicGroupId(@Param("musicGroupId") Integer musicGroupId);
+    List<ClassGroupTeachersDto> findClassGroupByMusicGroupId(@Param("musicGroupId") String musicGroupId);
 
     /**
      * 获取学生所购买课程列表
@@ -191,4 +191,11 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @return
      */
     List<ImGroupModel> queryTeacherGroups(@Param("userId") Integer userId, @Param("search") String search);
+
+    /**
+     * 获取未分配合奏的单技班列表
+     * @param musicGroupId
+     * @return
+     */
+    List<ClassGroup> findNoClassSubjects(String musicGroupId);
 }

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

@@ -14,5 +14,5 @@ public interface ClassGroupTeacherSalaryDao extends BaseDAO<Long, ClassGroupTeac
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeacherSalary> findByMusicGroupId(@Param("musicGroupId") int musicGroupId);
+    List<ClassGroupTeacherSalary> findByMusicGroupId(@Param("musicGroupId") String musicGroupId);
 }

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

@@ -1,9 +1,20 @@
 package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.entity.GoodsCategory;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.dal.BaseDAO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 public interface GoodsCategoryDao extends BaseDAO<Integer, GoodsCategory> {
 
-	
+
+    /**
+     * 根据父级编号获取子列表
+     * @param parentId
+     * @param yesOrNoEnum
+     * @return
+     */
+    List<GoodsCategory> findByParentId(@Param("parentId") Integer parentId, @Param("delFlag") YesOrNoEnum yesOrNoEnum);
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupDao.java

@@ -10,6 +10,7 @@ import com.ym.mec.common.entity.ImUserModel;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 public interface MusicGroupDao extends BaseDAO<String, MusicGroup> {
@@ -87,4 +88,11 @@ public interface MusicGroupDao extends BaseDAO<String, MusicGroup> {
      * @return
      */
     Set<Integer> queryTeacherIds(String id);
+
+    /**
+     * 根据乐团编号列表获取乐团在读人数map
+     * @param musicGroupIds
+     * @return
+     */
+    List<Map<String, Long>> countPayNum(@Param("musicGroupIds") Set<String> musicGroupIds);
 }

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

@@ -14,7 +14,7 @@ public interface MusicGroupSubjectPlanDao extends BaseDAO<Integer, MusicGroupSub
      * @param musicGroupId
      * @return
      */
-    List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(@Param("musicGroupId") int musicGroupId);
+    List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(@Param("musicGroupId") String musicGroupId);
 
 
     /**

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

@@ -6,7 +6,10 @@ import com.ym.mec.common.dal.BaseDAO;
 
 import org.apache.ibatis.annotations.Param;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public interface SchoolDao extends BaseDAO<Integer, School> {
 
@@ -17,4 +20,11 @@ public interface SchoolDao extends BaseDAO<Integer, School> {
      * @return
      */
     List<School> queryByOrganId(@Param("organId") Integer organId, @Param("delFlag") YesOrNoEnum delFlag);
+
+    /**
+     * 根据学校编号列表获取学校名称map
+     * @param schoolIds
+     * @return
+     */
+    List<Map<Integer, String>> queryNameByIds(@Param("schoolIds") Set<Integer> schoolIds);
 }

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

@@ -37,7 +37,7 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
 	 * @param subjectId
 	 * @return
 	 */
-	Integer countPayNum(@Param("musicGroupId") Integer musicGroupId, @Param("subjectId") Integer subjectId);
+	Integer countPayNum(@Param("musicGroupId") String musicGroupId, @Param("subjectId") Integer subjectId);
 
 	/**
 	 * 学生报名缴费金额详情
@@ -55,7 +55,7 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
 	 * @param actualSubjectId 科目id
 	 * @return
 	 */
-	List<StudentRegistration> getNoClassStuBySubjectId(@Param("musicGroupId") Integer musicGroupId, @Param("actualSubjectId") Integer actualSubjectId);
+	List<StudentRegistration> getNoClassStuBySubjectId(@Param("musicGroupId") String musicGroupId, @Param("actualSubjectId") Integer actualSubjectId);
 
 	/**
 	 * 获取乐团声部未分配学生数
@@ -64,7 +64,7 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
 	 * @param actualSubjectId
 	 * @return
 	 */
-	Integer getNoClassStuCountBySubjectId(@Param("musicGroupId") Integer musicGroupId, @Param("actualSubjectId") Integer actualSubjectId);
+	Integer getNoClassStuCountBySubjectId(@Param("musicGroupId") String musicGroupId, @Param("actualSubjectId") Integer actualSubjectId);
 
 	/**
 	 * 根据乐团id和user_id 更新

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

@@ -18,7 +18,7 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
      * @param musicGroupId
      * @return
      */
-    List<Subject> findSubByMusicGroupId(Integer musicGroupId);
+    List<Subject> findSubByMusicGroupId(String musicGroupId);
 
     /**
      * 通过乐团收费方式,获取默认的声部列表
@@ -53,7 +53,7 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
      * @param musicGroupId
      * @return
      */
-    List<SubjectApplyDetailDto> findSubApplyDetail(Integer musicGroupId);
+    List<SubjectApplyDetailDto> findSubApplyDetail(String musicGroupId);
 
     /**
      * 根据声部id字符串查询

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

@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 public interface TeacherDao extends BaseDAO<Integer, Teacher> {
 
@@ -40,4 +41,11 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @return
      */
     List<BasicUserDto> queryGroupStudents(@Param("teacherId") Integer teacherId, @Param("search") String search);
+
+    /**
+     * 根据用户编号列表获取用户名称
+     * @param userIds
+     * @return
+     */
+    List<Map<Integer, String>> queryNameByIds(@Param("userIds") Set<Integer> userIds);
 }

+ 174 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupsDto.java

@@ -0,0 +1,174 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+public class MusicGroupsDto {
+
+    @ApiModelProperty(value = "乐团编号",required = true)
+    private String musicGroupId;
+
+    @ApiModelProperty(value = "乐团名称",required = true)
+    private String musicGroupName;
+
+    @ApiModelProperty(value = "学校名称",required = true)
+    private String schoolName;
+
+    @ApiModelProperty(value = "学校编号",required = true)
+    private Integer schoolId;
+
+    @ApiModelProperty(value = "乐团状态",required = true)
+    private MusicGroupStatusEnum musicGroupStatus;
+
+    @ApiModelProperty(value = "收费类型编号",required = true)
+    private Integer chargeTypeId;
+
+    @ApiModelProperty(value = "收费类型名称",required = true)
+    private String chargeTypeName;
+
+    @ApiModelProperty(value = "教务老师编号",required = true)
+    private String educationalTeacherId;
+
+    @ApiModelProperty(value = "教务老师名称",required = true)
+    private String educationalTeacherName;
+
+    @ApiModelProperty(value = "教学主管编号",required = true)
+    private String teamTeacherId;
+
+    @ApiModelProperty(value = "教学主管名称",required = true)
+    private String teamTeacherName;
+
+    @ApiModelProperty(value = "申请时间",required = true)
+    private Date createTime;
+
+    @ApiModelProperty(value = "成团时间",required = true)
+    private Date billStartDate;
+
+    @ApiModelProperty(value = "成团人数",required = true)
+    private Integer billStartNum;
+
+    @ApiModelProperty(value = "在读人数",required = true)
+    private Integer payNum;
+
+    public String getEducationalTeacherId() {
+        return educationalTeacherId;
+    }
+
+    public void setEducationalTeacherId(String educationalTeacherId) {
+        this.educationalTeacherId = educationalTeacherId;
+    }
+
+    public String getTeamTeacherId() {
+        return teamTeacherId;
+    }
+
+    public void setTeamTeacherId(String teamTeacherId) {
+        this.teamTeacherId = teamTeacherId;
+    }
+
+    public String getMusicGroupId() {
+        return musicGroupId;
+    }
+
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
+    public String getMusicGroupName() {
+        return musicGroupName;
+    }
+
+    public void setMusicGroupName(String musicGroupName) {
+        this.musicGroupName = musicGroupName;
+    }
+
+    public String getSchoolName() {
+        return schoolName;
+    }
+
+    public void setSchoolName(String schoolName) {
+        this.schoolName = schoolName;
+    }
+
+    public Integer getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Integer schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public MusicGroupStatusEnum getMusicGroupStatus() {
+        return musicGroupStatus;
+    }
+
+    public void setMusicGroupStatus(MusicGroupStatusEnum musicGroupStatus) {
+        this.musicGroupStatus = musicGroupStatus;
+    }
+
+    public Integer getChargeTypeId() {
+        return chargeTypeId;
+    }
+
+    public void setChargeTypeId(Integer chargeTypeId) {
+        this.chargeTypeId = chargeTypeId;
+    }
+
+    public String getChargeTypeName() {
+        return chargeTypeName;
+    }
+
+    public void setChargeTypeName(String chargeTypeName) {
+        this.chargeTypeName = chargeTypeName;
+    }
+
+    public String getEducationalTeacherName() {
+        return educationalTeacherName;
+    }
+
+    public void setEducationalTeacherName(String educationalTeacherName) {
+        this.educationalTeacherName = educationalTeacherName;
+    }
+
+    public String getTeamTeacherName() {
+        return teamTeacherName;
+    }
+
+    public void setTeamTeacherName(String teamTeacherName) {
+        this.teamTeacherName = teamTeacherName;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getBillStartDate() {
+        return billStartDate;
+    }
+
+    public void setBillStartDate(Date billStartDate) {
+        this.billStartDate = billStartDate;
+    }
+
+    public Integer getBillStartNum() {
+        return billStartNum;
+    }
+
+    public void setBillStartNum(Integer billStartNum) {
+        this.billStartNum = billStartNum;
+    }
+
+    public Integer getPayNum() {
+        return payNum;
+    }
+
+    public void setPayNum(Integer payNum) {
+        this.payNum = payNum;
+    }
+}

+ 56 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java

@@ -26,6 +26,10 @@ public class MusicGroup {
 	/** 学校(合作单位) */
 	@ApiModelProperty(value = "学校(合作单位) ",required = false)
 	private Integer schoolId;
+
+	/** 学校(合作单位) */
+	@ApiModelProperty(value = "学校名称 ",required = false)
+	private String schoolName;
 	
 	/** 报名截止日期 */
 	@ApiModelProperty(value = "报名截止日期",required = false)
@@ -34,14 +38,23 @@ public class MusicGroup {
 	/** 团长 */
 	@ApiModelProperty(value = "运营主管",required = false)
 	private Integer teamTeacherId;
+	/** 团长 */
+	@ApiModelProperty(value = "运营主管名称",required = false)
+	private String teamTeacherName;
 	
 	/** 教务老师 */
+	@ApiModelProperty(value = "教务老师名字",required = false)
+	private String educationalTeacherName;
+	/** 教务老师 */
 	@ApiModelProperty(value = "教务老师",required = false)
 	private Integer educationalTeacherId;
 	
 	/** 收费类型 */
 	@ApiModelProperty(value = "收费类型",required = false)
 	private Integer chargeTypeId;
+	/** 收费类型 */
+	@ApiModelProperty(value = "收费类型名称",required = false)
+	private String chargeTypeName;
 	
 	@ApiModelProperty(value = "课程形态",required = false)
 	private String courseForm;
@@ -96,6 +109,49 @@ public class MusicGroup {
 	@ApiModelProperty(value = "乐团创建人",required = false)
 	private Integer operatorUserId;
 
+	@ApiModelProperty(value = "在读人数",required = true)
+	private Integer payNum;
+
+	public String getSchoolName() {
+		return schoolName;
+	}
+
+	public void setSchoolName(String schoolName) {
+		this.schoolName = schoolName;
+	}
+
+	public String getTeamTeacherName() {
+		return teamTeacherName;
+	}
+
+	public void setTeamTeacherName(String teamTeacherName) {
+		this.teamTeacherName = teamTeacherName;
+	}
+
+	public String getEducationalTeacherName() {
+		return educationalTeacherName;
+	}
+
+	public void setEducationalTeacherName(String educationalTeacherName) {
+		this.educationalTeacherName = educationalTeacherName;
+	}
+
+	public String getChargeTypeName() {
+		return chargeTypeName;
+	}
+
+	public void setChargeTypeName(String chargeTypeName) {
+		this.chargeTypeName = chargeTypeName;
+	}
+
+	public Integer getPayNum() {
+		return payNum;
+	}
+
+	public void setPayNum(Integer payNum) {
+		this.payNum = payNum;
+	}
+
 	public String getImg() {
 		return img;
 	}

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

@@ -28,7 +28,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param mixClassGroupId
      * @return
      */
-    List<ClassGroup> findClassGroup(Integer musicGroupId, Integer mixClassGroupId);
+    List<ClassGroup> findClassGroup(String musicGroupId, Integer mixClassGroupId);
 
     /**
      * 根据乐团编号查询单技班列表
@@ -36,7 +36,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroup> findAllNormalClassGroupByMusicGroupId(int musicGroupId);
+    List<ClassGroup> findAllNormalClassGroupByMusicGroupId(String musicGroupId);
 
 
     /**
@@ -45,7 +45,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroup> findAllMixClassGroupByMusicGroupId(int musicGroupId);
+    List<ClassGroup> findAllMixClassGroupByMusicGroupId(String musicGroupId);
 
     /**
      * @Author: Joburgess
@@ -54,7 +54,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return java.util.List<com.ym.mec.biz.dal.entity.ClassGroup>
      * @describe 获取乐团下所有班级
      */
-    List<ClassGroup> findAllClassGroupByMusicGroup(Long musicGroupId);
+    List<ClassGroup> findAllClassGroupByMusicGroup(String musicGroupId);
 
     /**
      * 添加单技班
@@ -114,7 +114,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeachersDto> getClassGroupAndTeachers(Integer musicGroupId);
+    List<ClassGroupTeachersDto> getClassGroupAndTeachers(String musicGroupId);
 
     /**
      * 获取乐团班级老师课酬
@@ -122,7 +122,7 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(Integer musicGroupId);
+    List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(String musicGroupId);
 
 
     /**
@@ -163,4 +163,11 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return
      */
     ClassGroup addStudent(ClassGroup classGroup,int userId);
+
+    /**
+     * 获取未分配合奏的单技班列表
+     * @param musicGroupId
+     * @return
+     */
+    List<ClassGroup> findNoClassSubjects(String musicGroupId);
 }

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

@@ -1,9 +1,7 @@
 package com.ym.mec.biz.service;
 
-import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
 import com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary;
 import com.ym.mec.common.service.BaseService;
-import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -14,6 +12,6 @@ public interface ClassGroupTeacherSalaryService extends BaseService<Long, ClassG
      * @param musicGroupId
      * @return
      */
-    List<ClassGroupTeacherSalary> findByMusicGroupId(int musicGroupId);
+    List<ClassGroupTeacherSalary> findByMusicGroupId(String musicGroupId);
 
 }

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

@@ -1,6 +1,8 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.entity.GoodsCategory;
+import com.ym.mec.biz.dal.page.GoodsCategoryQueryInfo;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface GoodsCategoryService extends BaseService<Integer, GoodsCategory> {
@@ -16,4 +18,11 @@ public interface GoodsCategoryService extends BaseService<Integer, GoodsCategory
      * @param goodsCategory
      */
     void upsetGoodsCategory(GoodsCategory goodsCategory);
+
+    /**
+     * 获取商品分类树状列表
+     * @param queryInfo
+     * @return
+     */
+    PageInfo<GoodsCategory> queryTreePage(GoodsCategoryQueryInfo queryInfo);
 }

+ 11 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupService.java

@@ -3,10 +3,10 @@ package com.ym.mec.biz.service;
 import java.util.Date;
 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.dto.*;
 import com.ym.mec.biz.dal.entity.MusicGroup;
+import com.ym.mec.biz.dal.page.MusicGroupQueryInfo;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface MusicGroupService extends BaseService<String, MusicGroup> {
@@ -15,7 +15,7 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * @param subFeeSettingDto
 	 * @Author superzou
 	 */
-	void createGroup(SubFeeSettingDto subFeeSettingDto, Integer userId);
+	String createGroup(SubFeeSettingDto subFeeSettingDto, Integer userId);
 
 	/**
 	 * 获取学生所在乐团详情
@@ -79,4 +79,11 @@ public interface MusicGroupService extends BaseService<String, MusicGroup> {
 	 * @return
 	 */
 	boolean renew(String musicGroupId, Integer userId, double amount);
+
+	/**
+	 * 获取乐团列表
+	 * @param queryInfo
+	 * @return
+	 */
+	PageInfo<MusicGroup> queryMusicGroupPage(MusicGroupQueryInfo queryInfo);
 }

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

@@ -15,7 +15,7 @@ public interface MusicGroupSubjectPlanService extends BaseService<Integer, Music
      * @param musicGroupId
      * @return
      */
-    List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(int musicGroupId);
+    List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(String musicGroupId);
 
 
     /**
@@ -40,6 +40,5 @@ public interface MusicGroupSubjectPlanService extends BaseService<Integer, Music
      * @param musicGroupId
      * @return
      */
-    MusicGroupRegRespDto getMusicGroupRegInfo(Integer musicGroupId);
-
+    MusicGroupRegRespDto getMusicGroupRegInfo(String musicGroupId);
 }

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

@@ -49,7 +49,7 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
 	 * @param actualSubjectId 科目id
 	 * @return
 	 */
-	List<StudentRegistration> getNoClassStuBySubjectId(Integer musicGroupId, Integer actualSubjectId);
+	List<StudentRegistration> getNoClassStuBySubjectId(String musicGroupId, Integer actualSubjectId);
 
 	/**
 	 * 获取乐团声部未分配学生统计
@@ -58,7 +58,7 @@ public interface StudentRegistrationService extends BaseService<Long, StudentReg
 	 * @param actualSubjectId
 	 * @return
 	 */
-	Integer getNoClassStuCountBySubjectId(Integer musicGroupId, Integer actualSubjectId);
+	Integer getNoClassStuCountBySubjectId(String musicGroupId, Integer actualSubjectId);
 
 	/**
 	 * 根据user_id 和 乐团id更新

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

@@ -22,7 +22,7 @@ public interface SubjectService extends BaseService<Integer, Subject> {
      * @param musicGroupId
      * @return
      */
-    List<Subject> findSubByMusicGroupId(Integer musicGroupId);
+    List<Subject> findSubByMusicGroupId(String musicGroupId);
 
     /**
      * 分页查询科目树状列表
@@ -46,7 +46,7 @@ public interface SubjectService extends BaseService<Integer, Subject> {
      * @param musicGroupId
      * @return
      */
-    List<SubjectApplyDetailDto> findSubApplyDetail(Integer musicGroupId);
+    List<SubjectApplyDetailDto> findSubApplyDetail(String musicGroupId);
 
     /**
      * 修改、新增科目树状列表

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

@@ -66,7 +66,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroup> findClassGroup(Integer musicGroupId, Integer mixClassGroupId) {
+    public List<ClassGroup> findClassGroup(String musicGroupId, Integer mixClassGroupId) {
         if (null == mixClassGroupId) {
             return classGroupDao.findAllMixClassGroup(musicGroupId);
         } else {
@@ -75,12 +75,12 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroup> findAllNormalClassGroupByMusicGroupId(int musicGroupId) {
+    public List<ClassGroup> findAllNormalClassGroupByMusicGroupId(String musicGroupId) {
         return classGroupDao.findAllNormalClassGroupByMusicGroupId(musicGroupId);
     }
 
     @Override
-    public List<ClassGroup> findAllMixClassGroupByMusicGroupId(int musicGroupId) {
+    public List<ClassGroup> findAllMixClassGroupByMusicGroupId(String musicGroupId) {
         List<ClassGroup> allMixClassGroup = classGroupDao.findAllMixClassGroup(musicGroupId);
         for (ClassGroup mixClassGroup : allMixClassGroup) {
             mixClassGroup.setClassNames(classGroupDao.findMixClassChildClassGroupNames(mixClassGroup.getId()).getName());
@@ -89,7 +89,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroup> findAllClassGroupByMusicGroup(Long musicGroupId) {
+    public List<ClassGroup> findAllClassGroupByMusicGroup(String musicGroupId) {
         List<ClassGroup> allMixClassGroup = classGroupDao.findAllClassGroupByMusicGroup(musicGroupId);
         return allMixClassGroup;
     }
@@ -263,7 +263,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroupTeachersDto> getClassGroupAndTeachers(Integer musicGroupId) {
+    public List<ClassGroupTeachersDto> getClassGroupAndTeachers(String musicGroupId) {
         List<ClassGroupTeachersDto> classGroupAndTeachersList = classGroupDao.findClassGroupByMusicGroupId(musicGroupId);
 
         List<ClassGroupTeacherMapper> classGroupTeacherMapperList = classGroupTeacherMapperService.findClassGroupTeachers(classGroupAndTeachersList);
@@ -281,7 +281,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
     }
 
     @Override
-    public List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(Integer musicGroupId) {
+    public List<ClassGroupTeachersDto> getClassGroupAndTeacherSalary(String musicGroupId) {
         //乐团班级及班级老师
         List<ClassGroupTeachersDto> classGroupAndTeachers = getClassGroupAndTeachers(musicGroupId);
         //乐团的课程计划
@@ -454,4 +454,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         classGroupStudentMapperService.insert(classGroupStudentMapper);
         return classGroup;
     }
+
+    @Override
+    public List<ClassGroup> findNoClassSubjects(String musicGroupId) {
+        return classGroupDao.findNoClassSubjects(musicGroupId);
+    }
 }

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

@@ -23,7 +23,7 @@ public class ClassGroupTeacherSalaryServiceImpl extends BaseServiceImpl<Long, Cl
 
 
     @Override
-    public List<ClassGroupTeacherSalary> findByMusicGroupId(int musicGroupId) {
+    public List<ClassGroupTeacherSalary> findByMusicGroupId(String musicGroupId) {
         return ClassGroupTeacherSalaryDao.findByMusicGroupId(musicGroupId);
     }
 }

+ 30 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/GoodsCategoryServiceImpl.java

@@ -2,8 +2,12 @@ package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.biz.dal.dao.GoodsCategoryDao;
 import com.ym.mec.biz.dal.entity.GoodsCategory;
+import com.ym.mec.biz.dal.entity.Subject;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
+import com.ym.mec.biz.dal.page.GoodsCategoryQueryInfo;
 import com.ym.mec.biz.service.GoodsCategoryService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +48,32 @@ public class GoodsCategoryServiceImpl extends BaseServiceImpl<Integer, GoodsCate
 		});
 	}
 
+	@Override
+	public PageInfo<GoodsCategory> queryTreePage(GoodsCategoryQueryInfo queryInfo) {
+		PageInfo<GoodsCategory> pageInfo = queryPage(queryInfo);
+		for (GoodsCategory goodsCategory:pageInfo.getRows()) {
+			goodsCategory = getTree(goodsCategory,queryInfo.getStatus());
+		}
+		return pageInfo;
+	}
+
+
+	private GoodsCategory getTree(GoodsCategory goodsCategory, YesOrNoEnum yesOrNoEnum){
+		//得到根节点对象
+		//获取子节点list
+		List<GoodsCategory> goodsCategories = goodsCategoryDao.findByParentId(goodsCategory.getId(),yesOrNoEnum);
+		//如果存在子节点
+		if(goodsCategories != null && goodsCategories.size() > 0) {
+			//将子节点list放入父节点对象
+			goodsCategory.setGoodsCategories(goodsCategories);
+			//遍历子节点....
+			for (GoodsCategory subject : goodsCategories) {
+				getTree(subject,yesOrNoEnum);
+			}
+		}
+		return goodsCategory;
+	}
+
 	private Integer upset(GoodsCategory goodsCategory, Integer parentId){
 		if(parentId != null){
 			goodsCategory.setParentId(parentId);

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

@@ -1,43 +1,31 @@
 package com.ym.mec.biz.service.impl;
 
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-import com.ym.mec.biz.dal.entity.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
-
-import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
-import com.ym.mec.biz.dal.dao.MusicGroupBuildLogDao;
-import com.ym.mec.biz.dal.dao.MusicGroupDao;
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentEntitiesDao;
-import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
-import com.ym.mec.biz.dal.dao.MusicGroupSubjectGoodsGroupDao;
-import com.ym.mec.biz.dal.dao.MusicGroupSubjectPlanDao;
-import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
+import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.BasicUserDto;
 import com.ym.mec.biz.dal.dto.MusicCardDto;
+import com.ym.mec.biz.dal.dto.MusicGroupsDto;
 import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
-import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.biz.dal.enums.DealStatusEnum;
-import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
-import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.enums.*;
+import com.ym.mec.biz.dal.page.MusicGroupQueryInfo;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.SysUserCashAccountService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupMember;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.exception.BizException;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.IdGeneratorService;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
+import com.ym.mec.util.collection.MapUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> implements MusicGroupService {
@@ -45,6 +33,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 	@Autowired
 	private MusicGroupDao musicGroupDao;
 	@Autowired
+	private ChargeTypeDao chargeTypeDao;
+	@Autowired
+	private TeacherDao teacherDao;
+	@Autowired
+	private IdGeneratorService idGeneratorService;
+	@Autowired
+	private SchoolDao schoolDao;
+	@Autowired
 	private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
 	@Autowired
 	private MusicGroupPaymentEntitiesDao musicGroupPaymentEntitiesDao;
@@ -76,58 +72,57 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
 	@Override
 	@Transactional(rollbackFor = Exception.class)
-	public void createGroup(SubFeeSettingDto subFeeSettingDto, Integer userId) {
+	public String createGroup(SubFeeSettingDto subFeeSettingDto, Integer userId) {
 		MusicGroup musicGroup = subFeeSettingDto.getMusicGroup();
 		List<MusicGroupPaymentEntities> musicGroupPaymentEntities = subFeeSettingDto.getMusicGroupPaymentEntities();
 		List<MusicGroupSubjectGoodsGroup> musicGroupSubjectGoodsGroups = subFeeSettingDto.getMusicGroupSubjectGoodsGroups();
 		List<MusicGroupSubjectPlan> musicGroupSubjectPlans = subFeeSettingDto.getMusicGroupSubjectPlans();
-		if (musicGroup == null || musicGroupPaymentEntities == null || musicGroupSubjectGoodsGroups == null || musicGroupSubjectPlans == null) {
-			String musicGroupId = UUID.randomUUID().toString();
-			musicGroup.setId(musicGroupId);
-			// 保存乐团基本信息
-			musicGroupDao.insert(musicGroup);
-			// 保存乐团付费主体列表
-			musicGroupPaymentEntities.forEach(e -> {
-				e.setMusicGroupId(musicGroupId);
-				musicGroupPaymentEntitiesDao.insert(e);
-			});
-			// 保存学员付费周期
-			List<Integer> months = subFeeSettingDto.getMonths();
-			if (months != null && months.size() > 0) {
-				MusicGroupPaymentCalender mg;
-				for (Integer month : months) {
-					mg = new MusicGroupPaymentCalender();
-					mg.setMusicGroupId(musicGroupId);
-					mg.setPaymentMonth(month);
-					musicGroupPaymentCalenderDao.insert(mg);
-				}
+		String musicGroupId = idGeneratorService.generatorId()+"";
+		musicGroup.setId(musicGroupId);
+		// 保存乐团基本信息
+		musicGroupDao.insert(musicGroup);
+		// 保存乐团付费主体列表
+		musicGroupPaymentEntities.forEach(e -> {
+			e.setMusicGroupId(musicGroupId);
+			musicGroupPaymentEntitiesDao.insert(e);
+		});
+		// 保存学员付费周期
+		List<Integer> months = subFeeSettingDto.getMonths();
+		if (months != null && months.size() > 0) {
+			MusicGroupPaymentCalender mg;
+			for (Integer month : months) {
+				mg = new MusicGroupPaymentCalender();
+				mg.setMusicGroupId(musicGroupId);
+				mg.setPaymentMonth(month);
+				musicGroupPaymentCalenderDao.insert(mg);
 			}
-			// 保存乐团声部规划
-			if (musicGroupSubjectPlans == null) {
-				musicGroupSubjectPlans = new ArrayList<MusicGroupSubjectPlan>();
-			}
-			musicGroupSubjectPlans.forEach(e -> {
-				e.setMusicGroupId(musicGroupId);
-				musicGroupSubjectPlanDao.insert(e);
-			});
-			// 保存乐团声部商品规划
-			if (musicGroupSubjectGoodsGroups == null) {
-				musicGroupSubjectGoodsGroups = new ArrayList<MusicGroupSubjectGoodsGroup>();
-			}
-			musicGroupSubjectGoodsGroups.forEach(e -> {
-				e.setMusicGroupId(musicGroupId);
-				musicGroupSubjectGoodsGroupDao.insert(e);
-			});
-			// 新增聊天群
-//			ImGroupModel imGroupModel = new ImGroupModel(musicGroupId, musicGroup.getName());
-			// 教务老师和运营主管加入群组
-			ImGroupMember[] imGroupMembers = { new ImGroupMember(musicGroup.getTeamTeacherId().toString()),
-					new ImGroupMember(musicGroup.getEducationalTeacherId().toString()) };
-			// 创建群组
-			imFeignService.groupCreate(new ImGroupModel(musicGroupId, imGroupMembers, musicGroup.getName()));
-			// 记录创建日志
-			musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "提交建团申请", userId, ""));
 		}
+		// 保存乐团声部规划
+		if (musicGroupSubjectPlans == null) {
+			musicGroupSubjectPlans = new ArrayList<>();
+		}
+		musicGroupSubjectPlans.forEach(e -> {
+			e.setMusicGroupId(musicGroupId);
+			musicGroupSubjectPlanDao.insert(e);
+		});
+		// 保存乐团声部商品规划
+		if (musicGroupSubjectGoodsGroups == null) {
+			musicGroupSubjectGoodsGroups = new ArrayList<>();
+		}
+		musicGroupSubjectGoodsGroups.forEach(e -> {
+			e.setMusicGroupId(musicGroupId);
+			musicGroupSubjectGoodsGroupDao.insert(e);
+		});
+		// 新增聊天群
+//			ImGroupModel imGroupModel = new ImGroupModel(musicGroupId, musicGroup.getName());
+		// 教务老师和运营主管加入群组
+		ImGroupMember[] imGroupMembers = { new ImGroupMember(musicGroup.getTeamTeacherId().toString()),
+				new ImGroupMember(musicGroup.getEducationalTeacherId().toString()) };
+		// 创建群组
+		imFeignService.groupCreate(new ImGroupModel(musicGroupId, imGroupMembers, musicGroup.getName()));
+		// 记录创建日志
+		musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "提交建团申请", userId, ""));
+		return musicGroupId;
 	}
 
 	@Override
@@ -273,7 +268,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 	public boolean quitMusicGroup(String musicGroupId, Integer userId) {
 		MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
 		if (musicGroup == null) {
-			throw new BizException("乐团找不到");
+			throw new BizException("乐团不存在");
 		}
 		
 		classGroupStudentMapperDao.updateUserStatusByMusicGroupId(musicGroupId, userId, ClassGroupStudentStatusEnum.QUIT);
@@ -285,4 +280,46 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 	public boolean renew(String musicGroupId, Integer userId, double amount) {
 		return true;
 	}
+
+	@Override
+	public PageInfo<MusicGroup> queryMusicGroupPage(MusicGroupQueryInfo queryInfo) {
+		PageInfo<MusicGroup> musicGroupPageInfo = queryPage(queryInfo);
+		List<MusicGroup> musicGroupList = musicGroupPageInfo.getRows();
+		//获取学校编号列表
+		Set<Integer> schoolIds = musicGroupList.stream().map(e -> e.getSchoolId()).collect(Collectors.toSet());
+		List<Map<Integer,String>> schoolNames =  schoolDao.queryNameByIds(schoolIds);
+		//获取相关学校名称map
+		Map<Integer,String> schoolNameMap = MapUtil.convertMybatisMap(schoolNames);
+
+		//获取教务老师编号列表
+		Set<Integer> educationalTeacherIds = musicGroupList.stream().map(e -> e.getEducationalTeacherId()).collect(Collectors.toSet());
+		//获取相关老师的名字
+		List<Map<Integer,String>> educationalTeacherNames =  teacherDao.queryNameByIds(educationalTeacherIds);
+		Map<Integer,String> educationalTeacherNameMap = MapUtil.convertMybatisMap(educationalTeacherNames);
+
+		//获取运营主管编号列表
+		Set<Integer> teamTeacherIds = musicGroupList.stream().map(e -> e.getTeamTeacherId()).collect(Collectors.toSet());
+		List<Map<Integer,String>> teamTeacherNames =  teacherDao.queryNameByIds(teamTeacherIds);
+		Map<Integer,String> teamTeacherNameMap = MapUtil.convertMybatisMap(teamTeacherNames);
+
+		//获取乐团编号列表
+		Set<String> musicGroupIds = musicGroupList.stream().map(e -> e.getId()).collect(Collectors.toSet());
+		//统计乐团在读人数
+		List<Map<String,Long>> payNums =  musicGroupDao.countPayNum(musicGroupIds);
+		Map<String,Long> payNumMap = MapUtil.convertMybatisMap(payNums);
+
+		//获取收费类型编号列表
+		Set<Integer> chargeTypeIds = musicGroupList.stream().map(e -> e.getChargeTypeId()).collect(Collectors.toSet());
+		List<Map<Integer,String>> chargeTypeNames =  chargeTypeDao.queryNameByIds(chargeTypeIds);
+		Map<Integer,String> chargeTypeNameMap = MapUtil.convertMybatisMap(chargeTypeNames);
+
+		musicGroupList.forEach(e->{
+			e.setSchoolName(schoolNameMap.get(e.getSchoolId()));
+			e.setEducationalTeacherName(educationalTeacherNameMap.get(e.getEducationalTeacherId()));
+			e.setTeamTeacherName(teamTeacherNameMap.get(e.getTeamTeacherId()));
+			e.setPayNum(payNumMap.get(e.getId())==null?0:payNumMap.get(e.getId()).intValue());
+			e.setChargeTypeName(chargeTypeNameMap.get(e.getChargeTypeId()));
+		});
+		return musicGroupPageInfo;
+	}
 }

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

@@ -43,7 +43,7 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     }
 
     @Override
-    public List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(int musicGroupId) {
+    public List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(String musicGroupId) {
         List<MusicGroupSubjectPlan> musicSubjectClassPlans = musicGroupSubjectPlanDao.getMusicSubjectClassPlan(musicGroupId);
         for (MusicGroupSubjectPlan musicSubjectClassPlan : musicSubjectClassPlans) {
             Integer noClassStuCount = studentRegistrationService.getNoClassStuCountBySubjectId(musicGroupId, musicSubjectClassPlan.getSubjectId());
@@ -88,11 +88,11 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
     }
 
     @Override
-    public MusicGroupRegRespDto getMusicGroupRegInfo(Integer musicGroupId) {
+    public MusicGroupRegRespDto getMusicGroupRegInfo(String musicGroupId) {
         MusicGroupRegRespDto musicGroupRegResp = new MusicGroupRegRespDto();
 
         //乐团信息
-        MusicGroup musicGroup = musicGroupService.get(musicGroupId.toString());
+        MusicGroup musicGroup = musicGroupService.get(musicGroupId);
         musicGroupRegResp.setMusicGroupName(musicGroup.getName());
         //声部信息
         List<Subject> subjectList = subjectService.findSubByMusicGroupId(musicGroupId);

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

@@ -103,12 +103,12 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
     }
 
     @Override
-    public List<StudentRegistration> getNoClassStuBySubjectId(Integer musicGroupId, Integer actualSubjectId) {
+    public List<StudentRegistration> getNoClassStuBySubjectId(String musicGroupId, Integer actualSubjectId) {
         return studentRegistrationDao.getNoClassStuBySubjectId(musicGroupId, actualSubjectId);
     }
 
     @Override
-    public Integer getNoClassStuCountBySubjectId(Integer musicGroupId, Integer actualSubjectId) {
+    public Integer getNoClassStuCountBySubjectId(String musicGroupId, Integer actualSubjectId) {
         return studentRegistrationDao.getNoClassStuCountBySubjectId(musicGroupId, actualSubjectId);
     }
 

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

@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
 
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @Service
 public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  implements SubjectService {
@@ -41,7 +42,7 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
     }
 
     @Override
-    public List<Subject> findSubByMusicGroupId(Integer musicGroupId) {
+    public List<Subject> findSubByMusicGroupId(String musicGroupId) {
         return subjectDao.findSubByMusicGroupId(musicGroupId);
     }
 
@@ -60,8 +61,10 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
     }
 
     @Override
-    public List<SubjectApplyDetailDto> findSubApplyDetail(Integer musicGroupId) {
+    public List<SubjectApplyDetailDto> findSubApplyDetail(String musicGroupId) {
         List<SubjectApplyDetailDto> subApplyDetail = subjectDao.findSubApplyDetail(musicGroupId);
+        List<Integer> subjectIds = subApplyDetail.stream().map(e -> e.getSubjectId()).collect(Collectors.toList());
+
         subApplyDetail.forEach(detail ->{
             detail.setPayNum(studentRegistrationDao.countPayNum(musicGroupId,detail.getSubjectId()));
         });

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

@@ -71,4 +71,10 @@
     <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM charge_type
 	</select>
+    <select id="queryNameByIds" resultType="java.util.Map" parameterType="list">
+        SELECT id_ `key`,name_ `value` FROM charge_type WHERE id_ IN
+        <foreach item="item" index="index" collection="chargeTypeIds" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
 </mapper>

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

@@ -409,6 +409,14 @@
             AND cg.name_ LIKE CONCAT('%',#{search},'%')
         </if>
     </select>
+    <select id="findNoClassSubjects" resultMap="ClassGroup">
+        SELECT * FROM class_group cg
+        WHERE cg.id_ NOT IN
+        (SELECT cgr.sub_class_group_id_ FROM class_group_relation cgr
+        LEFT JOIN class_group cg ON cg.id_ = cgr.class_group_id_
+        WHERE cg.music_group_id_ = #{musicGroupId})
+        AND cg.music_group_id_ = #{musicGroupId}
+    </select>
 
     <!-- 增加实际学生人数 -->
     <update id="addStudentNum" parameterType="com.ym.mec.biz.dal.entity.ClassGroup">

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

@@ -300,7 +300,7 @@
 	        s.name_ school_name_,
 	        ta.sign_in_status_,
 	        ta.sign_out_status_,
-	        cg.teach_mode_
+	        cs.teach_mode_
         FROM
             course_schedule cs
             LEFT JOIN sys_user su ON cs.teacher_id_=su.id_

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

@@ -79,4 +79,8 @@
     <select id="queryCount" resultType="int">
 		SELECT COUNT(*) FROM goods_category
 	</select>
+
+    <select id="findByParentId" resultMap="GoodsCategory">
+        SELECT * FROM goods_category WHERE parent_id_ = #{parentId} AND status_ = #{delFlag}
+    </select>
 </mapper>

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

@@ -128,7 +128,6 @@
 		DELETE FROM music_group WHERE id_ = #{id}
 	</delete>
 
-	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="MusicGroup" parameterType="map">
 		SELECT * FROM music_group ORDER BY id_
 		<include refid="global.limit" />
@@ -252,4 +251,13 @@
 		LEFT JOIN class_group_teacher_mapper cgtm ON cg.id_ = cgtm.class_group_id_
 		WHERE cg.music_group_id_ = #{id}
 	</select>
+    <select id="countPayNum" resultType="java.util.Map" parameterType="list">
+		SELECT cg.music_group_id_ `key`,COUNT(cgsm.id_) `value` FROM class_group cg
+		LEFT JOIN class_group_student_mapper cgsm ON cg.id_ = cgsm.class_group_id_
+		WHERE cg.music_group_id_ IN
+		<foreach item="item" index="index" collection="musicGroupIds" open="(" separator="," close=")">
+			#{item}
+		</foreach>
+		AND cgsm.status_ != 'QUIT' GROUP BY cg.music_group_id_
+	</select>
 </mapper>

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

@@ -110,4 +110,10 @@
             </if>
         </where>
     </select>
+    <select id="queryNameByIds" resultType="java.util.Map" parameterType="list">
+        select id_ `key`,name_ `value` FROM school s WHERE id_ IN
+        <foreach item="item" index="index" collection="schoolIds" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
 </mapper>

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

@@ -80,7 +80,9 @@
 	</select>
 
     <select id="findSubByMusicGroupId" resultMap="Subject">
-        SELECT s.* FROM music_group_subject_plan mgsp LEFT JOIN `subject` s ON mgsp.subject_id_ = s.id_ WHERE mgsp.music_group_id_ = #{musicGroupId}
+        SELECT s.* FROM music_group_subject_plan mgsp
+        LEFT JOIN `subject` s ON mgsp.subject_id_ = s.id_
+        WHERE mgsp.music_group_id_ = #{musicGroupId}
     </select>
 
     <select id="findSubByChargeType" resultMap="Subject">
@@ -113,7 +115,7 @@
         SELECT mgsp.subject_id_,s.name_,mgsp.expected_student_num_,mgsp.apply_student_num_
         FROM music_group_subject_plan mgsp
         LEFT JOIN `subject` s ON mgsp.subject_id_ = s.id_
-        WHERE mgsp.music_group_id_ =
+        WHERE mgsp.music_group_id_ = #{musicGroupId}
     </select>
     <select id="findBySubIds" resultType="string">
         SELECT name_ FROM `subject` WHERE del_flag_ = 0 AND FIND_IN_SET (id_,#{subIds})

+ 7 - 3
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -42,9 +42,7 @@
         <result column="birthdate_" property="birthdate"/>
         <result column="email_" property="email"/>
         <result column="im_token_" property="imToken"/>
-        <collection property="subjectName" ofType="string">
-            <result column="subject_name_"/>
-        </collection>
+        <collection property="subjectName" ofType="string" column="subject_name_"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -252,4 +250,10 @@
             AND su.username_ LIKE CONCAT('%',#{search},'%')
         </if>
     </select>
+    <select id="queryNameByIds" resultType="java.util.Map" parameterType="list">
+        select id_ `key`,real_name_ `value` FROM sys_user s WHERE id_ IN
+        <foreach item="item" index="index" collection="userIds" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
 </mapper>

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

@@ -57,8 +57,8 @@ public class MusicGroupRegisterController extends BaseController {
 
     @ApiOperation(value = "获取乐团报名所需信息")
     @GetMapping("/getMusicGroupRegInfo")
-    @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
-    public HttpResponseResult getMusicGroupRegInfo(Integer musicGroupId) {
+    @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String")})
+    public HttpResponseResult getMusicGroupRegInfo(String musicGroupId) {
         return succeed(musicGroupSubjectPlanService.getMusicGroupRegInfo(musicGroupId));
     }
 

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

@@ -73,26 +73,32 @@ public class ClassGroupController extends BaseController {
 
     @ApiOperation(value = "合奏班相关班级获取")
     @GetMapping("/findClassGroupAboutMix")
-    public Object findClassGroupAboutMix(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId,
+    public Object findClassGroupAboutMix(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId,
                                          @ApiParam(value = "班级编号", required = false) Integer mixClassGroupId) {
         return succeed(classGroupService.findClassGroup(musicGroupId, mixClassGroupId));
     }
 
     @ApiOperation(value = "乐团单技班列表")
     @GetMapping("/findMusicGroupClass")
-    public Object findMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId) {
+    public Object findMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
         return succeed(classGroupService.findAllNormalClassGroupByMusicGroupId(musicGroupId));
     }
 
+    @ApiOperation(value = "获取未分班的单技班列表")
+    @GetMapping("/findNoClassSubjects")
+    public Object findNoClassSubjects(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
+        return succeed(classGroupService.findNoClassSubjects(musicGroupId));
+    }
+
     @ApiOperation(value = "乐团合奏班列表")
     @GetMapping("/findMixMusicGroupClass")
-    public Object findMixMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId) {
+    public Object findMixMusicGroupClass(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
         return succeed(classGroupService.findAllMixClassGroupByMusicGroupId(musicGroupId));
     }
 
     @ApiOperation(value = "乐团所有班列表")
     @GetMapping("/findAllClassGroupByMusicGroup")
-    public Object findAllClassGroupByMusicGroup(@ApiParam(value = "乐团编号", required = true) @RequestParam Long musicGroupId) {
+    public Object findAllClassGroupByMusicGroup(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
         return succeed(classGroupService.findAllClassGroupByMusicGroup(musicGroupId));
     }
 
@@ -107,13 +113,13 @@ public class ClassGroupController extends BaseController {
 
     @ApiOperation(value = "获取乐团班级老师")
     @GetMapping("/findMusicGroupClassTeacher")
-    public Object findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId) {
+    public Object findMusicGroupClassTeacher(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
         return succeed(classGroupService.getClassGroupAndTeachers(musicGroupId));
     }
 
     @ApiOperation(value = "获取乐团班级老师课酬")
     @GetMapping("/findMusicGroupClassTeacherSalary")
-    public Object findMusicGroupClassTeacherSalary(@ApiParam(value = "乐团编号", required = true) @RequestParam Integer musicGroupId) {
+    public Object findMusicGroupClassTeacherSalary(@ApiParam(value = "乐团编号", required = true) @RequestParam String musicGroupId) {
         return succeed(classGroupService.getClassGroupAndTeacherSalary(musicGroupId));
     }
 

+ 7 - 14
mec-web/src/main/java/com/ym/mec/web/controller/GoodsCategoryController.java

@@ -1,22 +1,15 @@
 package com.ym.mec.web.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.ym.mec.biz.dal.entity.GoodsCategory;
 import com.ym.mec.biz.dal.page.GoodsCategoryQueryInfo;
 import com.ym.mec.biz.service.GoodsCategoryService;
 import com.ym.mec.biz.service.GoodsService;
 import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 @RequestMapping("category")
 @Api(tags = "商品分类服务")
@@ -47,10 +40,10 @@ public class GoodsCategoryController extends BaseController {
         return succeed();
     }
 
-    @ApiOperation(value = "分页查询商品分类列表")
+    @ApiOperation(value = "分页查询商品分类树状列表")
     @GetMapping("/queryPage")
     public Object queryPage(GoodsCategoryQueryInfo queryInfo) {
-        return succeed(goodsCategoryService.queryPage(queryInfo));
+        return succeed(goodsCategoryService.queryTreePage(queryInfo));
     }
 
     @ApiOperation(value = "根据商品分类编号查询商品分类")

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

@@ -49,7 +49,7 @@ public class MusicGroupController extends BaseController {
     @ApiOperation(value = "分页查询乐团列表")
     @GetMapping("/queryPage")
     public Object queryPage(MusicGroupQueryInfo queryInfo){
-        return succeed(musicGroupService.queryPage(queryInfo));
+        return succeed(musicGroupService.queryMusicGroupPage(queryInfo));
     }
 
     @ApiOperation(value = "新增乐团  建团申请数据提交")
@@ -59,7 +59,6 @@ public class MusicGroupController extends BaseController {
         if(sysUser == null || sysUser.getId() == null){
             return failed("获取用户信息失败");
         }
-        musicGroupService.createGroup(subFeeSettingDto,sysUser.getId());
-        return succeed();
+        return succeed(musicGroupService.createGroup(subFeeSettingDto,sysUser.getId()));
     }
 }

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

@@ -29,7 +29,7 @@ public class MusicGroupSubjectPlanController extends BaseController {
 
     @ApiOperation(value = "乐团声部分班情况")
     @GetMapping("/getMusicSubjectClass")
-    public Object getMusicSubjectClass(@ApiParam(value = "乐团编号", required = true) int musicGroupId) {
+    public Object getMusicSubjectClass(@ApiParam(value = "乐团编号", required = true) String musicGroupId) {
         return succeed(musicGroupSubjectPlanService.getMusicSubjectClassPlan(musicGroupId));
     }
 

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

@@ -81,7 +81,7 @@ public class StudentRegistrationController extends BaseController {
     @GetMapping("/getNoClassStu")
     @ApiImplicitParams({@ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String"),
             @ApiImplicitParam(name = "actualSubjectId", value = "科目(声部)id", required = true, dataType = "int")})
-    public Object getNoClassStuBySubjectId(Integer musicGroupId, Integer actualSubjectId) {
+    public Object getNoClassStuBySubjectId(String musicGroupId, Integer actualSubjectId) {
         return succeed(studentRegistrationService.getNoClassStuBySubjectId(musicGroupId, actualSubjectId));
     }
 

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

@@ -57,8 +57,8 @@ public class SubjectController extends BaseController {
 
     @ApiOperation(value = "通过乐团编号查询乐团科目规划")
     @GetMapping("/querySubByMusicGroupId")
-    @ApiImplicitParams({ @ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
-    public Object findSubByMusicGroupId(Integer musicGroupId){
+    @ApiImplicitParams({ @ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String")})
+    public Object findSubByMusicGroupId(String musicGroupId){
         return succeed(subjectService.findSubByMusicGroupId(musicGroupId));
     }
 
@@ -78,8 +78,8 @@ public class SubjectController extends BaseController {
 
     @ApiOperation(value = "通过乐团编号获取声部列表以及声部报名、缴费、计划人数")
     @GetMapping("/findSubApplyDetail")
-    @ApiImplicitParams({ @ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "Integer")})
-    public Object findSubApplyDetail(Integer musicGroupId){
+    @ApiImplicitParams({ @ApiImplicitParam(name = "musicGroupId", value = "乐团编号", required = true, dataType = "String")})
+    public Object findSubApplyDetail(String musicGroupId){
         return succeed(subjectService.findSubApplyDetail(musicGroupId));
     }
 }