Browse Source

Merge branch '230322' of http://git.dayaedu.com/yonge/mec into zx_saas_2023_03

 Conflicts:
	mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ChargeTypeSubjectMapperDao.java
zouxuan 2 years ago
parent
commit
fefdc8383f
34 changed files with 172 additions and 282 deletions
  1. 5 4
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ChargeTypeSubjectMapperDao.java
  2. 0 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleTeacherSalaryDao.java
  3. 0 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupOrganizationCourseSettingsDao.java
  4. 4 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/OrganizationCourseUnitPriceSettingsDao.java
  5. 4 10
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java
  6. 9 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ChargeTypeSubjectMapper.java
  7. 0 23
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java
  8. 11 13
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupOrganizationCourseSettings.java
  9. 14 20
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/OrganizationCourseUnitPriceSettings.java
  10. 0 10
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java
  11. 11 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/CourseViewTypeEnum.java
  12. 9 5
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/ChargeTypeSubjectMapperQueryInfo.java
  13. 9 8
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseSettingQueryInfo.java
  14. 9 7
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/OrganizationCourseUnitPriceSettingsQueryInfo.java
  15. 4 3
      mec-biz/src/main/java/com/ym/mec/biz/service/OrganizationCourseUnitPriceSettingsService.java
  16. 3 11
      mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java
  17. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ChargeTypeSubjectMapperServiceImpl.java
  18. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  19. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderCourseSettingsServiceImpl.java
  20. 1 18
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  21. 3 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSubjectPlanServiceImpl.java
  22. 4 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrganizationCourseUnitPriceSettingsServiceImpl.java
  23. 0 15
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java
  24. 16 16
      mec-biz/src/main/resources/config/mybatis/ChargeTypeSubjectMapperMapper.xml
  25. 1 5
      mec-biz/src/main/resources/config/mybatis/CloudTeacherOrderMapper.xml
  26. 2 15
      mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml
  27. 4 11
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  28. 8 8
      mec-biz/src/main/resources/config/mybatis/MusicGroupOrganizationCourseSettingsMapper.xml
  29. 15 16
      mec-biz/src/main/resources/config/mybatis/OrganizationCourseUnitPriceSettingsMapper.xml
  30. 1 7
      mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml
  31. 0 1
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  32. 0 2
      mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java
  33. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/OrganizationCourseUnitPriceSettingsController.java
  34. 17 19
      mec-web/src/main/java/com/ym/mec/web/controller/SubjectController.java

+ 5 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ChargeTypeSubjectMapperDao.java

@@ -2,17 +2,18 @@ package com.ym.mec.biz.dal.dao;
 
 import java.util.List;
 
+import org.apache.ibatis.annotations.Param;
+
 import com.ym.mec.biz.dal.entity.ChargeTypeSubjectMapper;
 import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.dal.BaseDAO;
-import org.apache.ibatis.annotations.Param;
 
 public interface ChargeTypeSubjectMapperDao extends BaseDAO<Long, ChargeTypeSubjectMapper> {
 
     /**
      * 删除当前收费类型关联的科目
      */
-    void deleteByChargeTypeId(Integer chargeTypeId);
+    void deleteByChargeTypeId(CourseViewTypeEnum courseViewType);
 
     int batchInsert(List<ChargeTypeSubjectMapper> chargeTypeSubjectMapperList);
 
@@ -25,9 +26,9 @@ public interface ChargeTypeSubjectMapperDao extends BaseDAO<Long, ChargeTypeSubj
      * @param subjectId
      * @return
      */
-    ChargeTypeSubjectMapper getSubjectDiscount(@Param("chargeTypeId") Integer chargeTypeId, @Param("subjectId") Integer subjectId);
+    ChargeTypeSubjectMapper getSubjectDiscount(@Param("courseViewType") CourseViewTypeEnum courseViewType, @Param("subjectId") Integer subjectId);
 
-    ChargeTypeSubjectMapper getSubjectsDiscount(@Param("chargeTypeId") Integer chargeTypeId, @Param("subjectIds") String subjectIds);
+    ChargeTypeSubjectMapper getSubjectsDiscount(@Param("courseViewType") CourseViewTypeEnum courseViewType, @Param("subjectIds") String subjectIds);
 
     ChargeTypeSubjectMapper findByViewTypeANdSubject(@Param("courseViewType") CourseViewTypeEnum courseViewType,
                                                      @Param("subjectId") Integer subjectId,

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

@@ -180,15 +180,6 @@ public interface CourseScheduleTeacherSalaryDao extends BaseDAO<Long, CourseSche
 
 	/**
 	 * @param courseScheduleIds: 课程编号列表
-	 * @return java.util.List<java.util.Map < java.lang.String, java.lang.Integer>>
-	 * @describe 根据课程获取对应乐团的收费类型
-	 * @author Joburgess
-	 * @date 2019/11/3
-	 */
-	List<Map<String, Integer>> findMusicGroupChargeTypeByCourse(@Param("courseScheduleIds") List<Long> courseScheduleIds);
-
-	/**
-	 * @param courseScheduleIds: 课程编号列表
 	 * @return java.util.List<java.util.Map < java.lang.Integer, java.math.BigDecimal>>
 	 * @describe 根据课程获取对应的教学点补贴
 	 * @author Joburgess

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

@@ -3,8 +3,6 @@ package com.ym.mec.biz.dal.dao;
 import com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettings;
 import com.ym.mec.common.dal.BaseDAO;
 
-import java.util.List;
-
 public interface MusicGroupOrganizationCourseSettingsDao extends BaseDAO<Integer, MusicGroupOrganizationCourseSettings> {
 
 }

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

@@ -2,7 +2,9 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
 import com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.dal.BaseDAO;
+
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -18,7 +20,7 @@ public interface OrganizationCourseUnitPriceSettingsDao extends BaseDAO<Integer,
 	 * @return
 	 */
 	OrganizationCourseUnitPriceSettings queryByOrganIdAndCourseTypeAndChargeType(@Param("organId") Integer organId,
-			@Param("courseScheduleType") CourseScheduleType courseType, @Param("chargeTypeId") Integer chargeTypeId);
+			@Param("courseScheduleType") CourseScheduleType courseType, @Param("courseViewType") CourseViewTypeEnum courseViewType);
 
 	/**
 	 * 批量新增
@@ -34,7 +36,7 @@ public interface OrganizationCourseUnitPriceSettingsDao extends BaseDAO<Integer,
 	 * @param organId
 	 * @return
 	 */
-    List<Map<String, Integer>> queryMapByOrganIdAndChargeTypeId(@Param("chargeTypeId") Integer chargeTypeId, @Param("organId") Integer organId);
+    List<Map<String, Integer>> queryMapByOrganIdAndChargeTypeId(@Param("courseViewType") CourseViewTypeEnum courseViewType, @Param("organId") Integer organId);
 
     List<OrganizationCourseUnitPriceSettings> querySingle(@Param("organId")Integer organId, @Param("courseType") String courseType, @Param("tenantId") Integer tenantId);
 

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

@@ -5,8 +5,10 @@ import com.ym.mec.biz.dal.dto.StudentAttendanceViewDto;
 import com.ym.mec.biz.dal.dto.SubjectApplyDetailDto;
 import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.entity.Subject;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 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;
@@ -23,14 +25,6 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
     List<Subject> findSubByMusicGroupId(String musicGroupId);
 
     /**
-     * 通过乐团收费方式,获取默认的声部列表
-     *
-     * @param chargeTypeId
-     * @return
-     */
-    List<Subject> findSubByChargeType(Integer chargeTypeId);
-
-    /**
      * 根据父级id查询子级列表
      *
      * @param parentId
@@ -41,10 +35,10 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
     /**
      * 通过乐团收费类型,获取默认的声部列表
      *
-     * @param chargeTypeId
+     * @param courseViewType
      * @return
      */
-    List<Subject> findDefaultSubByChargeTypeId(Integer chargeTypeId);
+    List<Subject> findDefaultSubByChargeTypeId(@Param("courseViewType") CourseViewTypeEnum courseViewType);
 
     /**
      * 通过乐团编号获取声部列表以及声部报名、缴费、计划人数

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

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.entity;
 
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
 import com.ym.mec.common.entity.BaseEntity;
 
@@ -17,9 +18,8 @@ public class ChargeTypeSubjectMapper extends BaseEntity {
 	/**  */
 	private Long id;
 	
-	/**  */
-	@ApiModelProperty(value = "收费类型编号",required = false)
-	private Integer chargeTypeId;
+	@ApiModelProperty(value = "收费模式",required = false)
+	private CourseViewTypeEnum courseViewType;
 	
 	/**  */
 	@ApiModelProperty(value = "科目编号",required = false)
@@ -54,14 +54,14 @@ public class ChargeTypeSubjectMapper extends BaseEntity {
 		return this.id;
 	}
 			
-	public void setChargeTypeId(Integer chargeTypeId){
-		this.chargeTypeId = chargeTypeId;
+	public CourseViewTypeEnum getCourseViewType() {
+		return courseViewType;
 	}
-	
-	public Integer getChargeTypeId(){
-		return this.chargeTypeId;
+
+	public void setCourseViewType(CourseViewTypeEnum courseViewType) {
+		this.courseViewType = courseViewType;
 	}
-			
+
 	public void setSubjectId(Integer subjectId){
 		this.subjectId = subjectId;
 	}

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

@@ -74,13 +74,6 @@ public class MusicGroup extends BaseEntity {
 	@ApiModelProperty(value = "衔接老师编号",required = false)
 	private Integer transactionTeacherId;
 	
-	/** 收费类型 */
-	@ApiModelProperty(value = "收费类型",required = false)
-	private Integer chargeTypeId;
-	/** 收费类型 */
-	@ApiModelProperty(value = "收费类型名称",required = false)
-	private String chargeTypeName;
-	
 	@ApiModelProperty(value = "课程形态",required = false)
 	private String courseForm;
 
@@ -414,14 +407,6 @@ public class MusicGroup extends BaseEntity {
 		this.educationalTeacherName = educationalTeacherName;
 	}
 
-	public String getChargeTypeName() {
-		return chargeTypeName;
-	}
-
-	public void setChargeTypeName(String chargeTypeName) {
-		this.chargeTypeName = chargeTypeName;
-	}
-
 	public Integer getPayNum() {
 		return payNum;
 	}
@@ -510,14 +495,6 @@ public class MusicGroup extends BaseEntity {
 		return this.educationalTeacherId;
 	}
 			
-	public void setChargeTypeId(Integer chargeTypeId){
-		this.chargeTypeId = chargeTypeId;
-	}
-	
-	public Integer getChargeTypeId(){
-		return this.chargeTypeId;
-	}
-			
 	public String getCourseForm() {
 		return courseForm;
 	}

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

@@ -6,6 +6,7 @@ import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.entity.BaseEntity;
 
 public class MusicGroupOrganizationCourseSettings extends BaseEntity {
@@ -23,12 +24,9 @@ public class MusicGroupOrganizationCourseSettings extends BaseEntity {
     */
     @ApiModelProperty(value="分部")
     private Integer organId;
-
-    /**
-    * 收费模式
-    */
-    @ApiModelProperty(value="收费模式")
-    private Integer chargeTypeId;
+	
+	@ApiModelProperty(value = "收费模式",required = false)
+	private CourseViewTypeEnum courseViewType;
 
     /**
     * 总价
@@ -75,15 +73,15 @@ public class MusicGroupOrganizationCourseSettings extends BaseEntity {
         this.organId = organId;
     }
 
-    public Integer getChargeTypeId() {
-        return chargeTypeId;
-    }
+    public CourseViewTypeEnum getCourseViewType() {
+		return courseViewType;
+	}
 
-    public void setChargeTypeId(Integer chargeTypeId) {
-        this.chargeTypeId = chargeTypeId;
-    }
+	public void setCourseViewType(CourseViewTypeEnum courseViewType) {
+		this.courseViewType = courseViewType;
+	}
 
-    public BigDecimal getTotalCurrentPrice() {
+	public BigDecimal getTotalCurrentPrice() {
         return totalCurrentPrice;
     }
 

+ 14 - 20
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/OrganizationCourseUnitPriceSettings.java

@@ -1,10 +1,13 @@
 package com.ym.mec.biz.dal.entity;
 
+import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.entity.BaseEntity;
 
 /**
@@ -20,9 +23,10 @@ public class OrganizationCourseUnitPriceSettings extends BaseEntity {
 	
 	/** 课程类型 */
 	private CourseScheduleType courseType;
-
-	private Integer chargeTypeId;
 	
+	@ApiModelProperty(value = "收费模式",required = false)
+	private CourseViewTypeEnum courseViewType;
+
 	private BigDecimal unitPrice = new BigDecimal(0);
 	
 	/**  */
@@ -33,8 +37,6 @@ public class OrganizationCourseUnitPriceSettings extends BaseEntity {
 	
 	private Organization organ = new Organization();
 	
-	private ChargeType chargeType = new ChargeType();
-	
 	public void setId(Integer id){
 		this.id = id;
 	}
@@ -51,6 +53,14 @@ public class OrganizationCourseUnitPriceSettings extends BaseEntity {
 		return this.organId;
 	}
 			
+	public CourseViewTypeEnum getCourseViewType() {
+		return courseViewType;
+	}
+
+	public void setCourseViewType(CourseViewTypeEnum courseViewType) {
+		this.courseViewType = courseViewType;
+	}
+
 	public CourseScheduleType getCourseType() {
 		return courseType;
 	}
@@ -82,14 +92,6 @@ public class OrganizationCourseUnitPriceSettings extends BaseEntity {
 	public java.util.Date getUpdateTime(){
 		return this.updateTime;
 	}
-			
-	public Integer getChargeTypeId() {
-		return chargeTypeId;
-	}
-
-	public void setChargeTypeId(Integer chargeTypeId) {
-		this.chargeTypeId = chargeTypeId;
-	}
 
 	public Organization getOrgan() {
 		return organ;
@@ -99,14 +101,6 @@ public class OrganizationCourseUnitPriceSettings extends BaseEntity {
 		this.organ = organ;
 	}
 
-	public ChargeType getChargeType() {
-		return chargeType;
-	}
-
-	public void setChargeType(ChargeType chargeType) {
-		this.chargeType = chargeType;
-	}
-
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 0 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentRegistration.java

@@ -127,8 +127,6 @@ public class StudentRegistration extends BaseEntity {
     //乐团
     private OwnershipType ownershipType;
 
-    private Integer chargeTypeId;
-
     @ApiModelProperty(value = "是否是合并的学员 0-否 1-是",required = true)
     private Integer isMerge = 0;
 
@@ -452,14 +450,6 @@ public class StudentRegistration extends BaseEntity {
         this.ownershipType = ownershipType;
     }
 
-	public Integer getChargeTypeId() {
-		return chargeTypeId;
-	}
-
-	public void setChargeTypeId(Integer chargeTypeId) {
-		this.chargeTypeId = chargeTypeId;
-	}
-
     public BigDecimal getSurplusCourseFee() {
         return surplusCourseFee;
     }

+ 11 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/CourseViewTypeEnum.java

@@ -5,7 +5,8 @@ import com.ym.mec.common.enums.BaseEnum;
 public enum CourseViewTypeEnum implements BaseEnum<Integer, CourseViewTypeEnum> {
     COURSE_FEE(0, "课程收费", 2),
     AMR(1, "器乐练习系统", 3),
-    MEMBER_FEE(2, "会员收费", 4);
+    MEMBER_FEE(2, "会员收费", 4),
+    FREE(3, "免费", 4);
 
     private Integer code;
 
@@ -18,6 +19,15 @@ public enum CourseViewTypeEnum implements BaseEnum<Integer, CourseViewTypeEnum>
         this.msg = msg;
         this.contractVersion = contractVersion;
     }
+    
+    public static CourseViewTypeEnum codeOf(int code){
+    	for(CourseViewTypeEnum e : CourseViewTypeEnum.values()){
+    		if(e.code == code){
+    			return e;
+    		}
+    	}
+    	return null;
+    }
 
     public void setCode(Integer code) {
         this.code = code;

+ 9 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/page/ChargeTypeSubjectMapperQueryInfo.java

@@ -1,20 +1,24 @@
 package com.ym.mec.biz.dal.page;
 
+import io.swagger.annotations.ApiModelProperty;
+
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.page.QueryInfo;
 
 public class ChargeTypeSubjectMapperQueryInfo extends QueryInfo {
 
-	private Integer chargeTypeId;
+	@ApiModelProperty(value = "收费模式",required = false)
+	private CourseViewTypeEnum courseViewType;
 
 	/**  */
 	private Integer subjectId;
 
-	public Integer getChargeTypeId() {
-		return chargeTypeId;
+	public CourseViewTypeEnum getCourseViewType() {
+		return courseViewType;
 	}
 
-	public void setChargeTypeId(Integer chargeTypeId) {
-		this.chargeTypeId = chargeTypeId;
+	public void setCourseViewType(CourseViewTypeEnum courseViewType) {
+		this.courseViewType = courseViewType;
 	}
 
 	public Integer getSubjectId() {

+ 9 - 8
mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseSettingQueryInfo.java

@@ -8,8 +8,8 @@ public class CourseSettingQueryInfo extends QueryInfo {
     @ApiModelProperty(value="分部id")
     private Integer organId;
 
-    @ApiModelProperty(value="收费模式id")
-    private Integer chargeTypeId;
+    @ApiModelProperty(value="收费模式")
+    private Integer courseViewType;
 
     public Integer getOrganId() {
         return organId;
@@ -19,11 +19,12 @@ public class CourseSettingQueryInfo extends QueryInfo {
         this.organId = organId;
     }
 
-    public Integer getChargeTypeId() {
-        return chargeTypeId;
-    }
+	public Integer getCourseViewType() {
+		return courseViewType;
+	}
+
+	public void setCourseViewType(Integer courseViewType) {
+		this.courseViewType = courseViewType;
+	}
 
-    public void setChargeTypeId(Integer chargeTypeId) {
-        this.chargeTypeId = chargeTypeId;
-    }
 }

+ 9 - 7
mec-biz/src/main/java/com/ym/mec/biz/dal/page/OrganizationCourseUnitPriceSettingsQueryInfo.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.dal.page;
 import io.swagger.annotations.ApiModelProperty;
 
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.page.QueryInfo;
 
 public class OrganizationCourseUnitPriceSettingsQueryInfo extends QueryInfo {
@@ -12,9 +13,9 @@ public class OrganizationCourseUnitPriceSettingsQueryInfo extends QueryInfo {
 
 	@ApiModelProperty(value = "课程类型", required = false)
 	private CourseScheduleType courseScheduleType;
-
-	@ApiModelProperty(value = "乐团收费类型编号", required = false)
-	private Integer chargeTypeId;
+	
+	@ApiModelProperty(value = "收费模式",required = false)
+	private CourseViewTypeEnum courseViewType;
 
 	public Integer getOrganId() {
 		return organId;
@@ -32,11 +33,12 @@ public class OrganizationCourseUnitPriceSettingsQueryInfo extends QueryInfo {
 		this.courseScheduleType = courseScheduleType;
 	}
 
-	public Integer getChargeTypeId() {
-		return chargeTypeId;
+	public CourseViewTypeEnum getCourseViewType() {
+		return courseViewType;
 	}
 
-	public void setChargeTypeId(Integer chargeTypeId) {
-		this.chargeTypeId = chargeTypeId;
+	public void setCourseViewType(CourseViewTypeEnum courseViewType) {
+		this.courseViewType = courseViewType;
 	}
+
 }

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

@@ -2,8 +2,9 @@ package com.ym.mec.biz.service;
 
 import java.util.List;
 
-import com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings;
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
+import com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.common.service.BaseService;
 
 public interface OrganizationCourseUnitPriceSettingsService extends BaseService<Integer, OrganizationCourseUnitPriceSettings> {
@@ -19,10 +20,10 @@ public interface OrganizationCourseUnitPriceSettingsService extends BaseService<
 	 * 根据分部编号以及课程类型查询对象
 	 * @param organId 分部编号
 	 * @param courseType 课程类型
-	 * @param chargeTypeId 收费类型编号
+	 * @param courseViewType 收费模式
 	 * @return
 	 */
-	OrganizationCourseUnitPriceSettings queryByOrganIdAndCourseTypeAndChargeType(Integer organId, CourseScheduleType courseType, Integer chargeTypeId);
+	OrganizationCourseUnitPriceSettings queryByOrganIdAndCourseTypeAndChargeType(Integer organId, CourseScheduleType courseType, CourseViewTypeEnum courseViewType);
 
 	List<OrganizationCourseUnitPriceSettings> querySingle(Integer organId, String courseType, Integer tenantId);
 

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

@@ -1,5 +1,8 @@
 package com.ym.mec.biz.service;
 
+import java.util.List;
+import java.util.Map;
+
 import com.ym.mec.biz.dal.dto.ConditionDto;
 import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.dto.SubjectApplyDetailDto;
@@ -9,9 +12,6 @@ import com.ym.mec.biz.dal.page.SubjectQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
-import java.util.List;
-import java.util.Map;
-
 public interface SubjectService extends BaseService<Integer, Subject> {
 
     /**
@@ -31,14 +31,6 @@ public interface SubjectService extends BaseService<Integer, Subject> {
     PageInfo<Subject> queryPageTree(SubjectQueryInfo queryInfo);
 
     /**
-     * 通过乐团收费类型,获取默认的声部列表
-     *
-     * @param chargeTypeId
-     * @return
-     */
-    List<Subject> findDefaultSubByChargeTypeId(Integer chargeTypeId,Integer organId,Integer number);
-
-    /**
      * 通过乐团编号获取声部列表以及声部报名、缴费、计划人数
      *
      * @param musicGroupId

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

@@ -31,7 +31,7 @@ public class ChargeTypeSubjectMapperServiceImpl extends BaseServiceImpl<Long, Ch
 
     @Override
     public boolean batchInsert(List<ChargeTypeSubjectMapper> chargeTypeSubjectMapperList) {
-        ChargeTypeSubjectMapper subjectDiscount = chargeTypeSubjectMapperDao.getSubjectDiscount(chargeTypeSubjectMapperList.get(0).getChargeTypeId(), chargeTypeSubjectMapperList.get(0).getSubjectId());
+        ChargeTypeSubjectMapper subjectDiscount = chargeTypeSubjectMapperDao.getSubjectDiscount(chargeTypeSubjectMapperList.get(0).getCourseViewType(), chargeTypeSubjectMapperList.get(0).getSubjectId());
         if (subjectDiscount != null) {
             throw new BizException("此声部商品折扣已添加");
         }

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

@@ -4070,7 +4070,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         Map<String, Long> map = MapUtil.convertIntegerMap(courseScheduleDao.findClassMaxCourseNumMap(classGroupIds));
         //获取分布默认的课程类型单价
         MusicGroup musicGroup = musicGroupDao.findByClassGroupId(classGroupIds.get(0));
-        Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getChargeTypeId(), musicGroup.getOrganId()));
+        Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getCourseViewType(), musicGroup.getOrganId()));
         Set<String> courseTypes = map.keySet();
         Set<String> groupType = new HashSet<>();
         for (Integer classGroupId : classGroupIds) {
@@ -4152,7 +4152,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                     List<MusicGroupPaymentCalenderCourseSettings> musicGroupPaymentCalenderCourseSettingsList = calenderDto.getMusicGroupPaymentCalenderCourseSettingsList();
                     for (MusicGroupPaymentCalenderCourseSettings courseSettings : musicGroupPaymentCalenderCourseSettingsList) {
                         OrganizationCourseUnitPriceSettings defaultUnitPrice = organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(
-                                musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getChargeTypeId());
+                                musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getCourseViewType());
                         if (defaultUnitPrice == null) {
                             throw new BizException("请先设置分部课程类型单价");
                         }
@@ -4446,7 +4446,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         /*if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
             throw new BizException("操作失败:主班乐团不能是系统收费团");
         }*/
-        Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getChargeTypeId(), musicGroup.getOrganId()));
+        Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getCourseViewType(), musicGroup.getOrganId()));
         Set<String> masterKeySet = masterMap.keySet();
         //计算主班课程类型剩余价值
         BigDecimal masterTotalPrice = BigDecimal.ZERO;
@@ -4476,7 +4476,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         Map<String, BigDecimal> resultMap = new HashMap<>();
         //获取分布默认的课程类型单价
         MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
-        Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getChargeTypeId(), musicGroup.getOrganId()));
+        Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getCourseViewType(), musicGroup.getOrganId()));
         Set<String> masterKeySet = masterMap.keySet();
         //计算主班课程类型剩余价值
         for (String s : masterKeySet) {

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

@@ -141,7 +141,7 @@ public class MusicGroupPaymentCalenderCourseSettingsServiceImpl extends BaseServ
 				// 如果是课程收费,判断是否审核
 				for (MusicGroupPaymentCalenderCourseSettings courseSettings : musicGroupPaymentCalenderCourseSettingsList) {
 					OrganizationCourseUnitPriceSettings defaultUnitPrice = organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(
-							musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getChargeTypeId());
+							musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getCourseViewType());
 					if (defaultUnitPrice == null) {
 						throw new BizException("请先设置分部课程类型单价");
 					}
@@ -193,7 +193,7 @@ public class MusicGroupPaymentCalenderCourseSettingsServiceImpl extends BaseServ
 				// 如果是课程收费,判断是否审核
 				for (MusicGroupPaymentCalenderCourseSettings courseSettings : musicGroupPaymentCalenderCourseSettingsList) {
 					OrganizationCourseUnitPriceSettings defaultUnitPrice = organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(
-							musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getChargeTypeId());
+							musicGroup.getOrganId(), courseSettings.getCourseType(), musicGroup.getCourseViewType());
 					if (defaultUnitPrice == null) {
 						throw new BizException("请先设置分部课程类型单价");
 					}

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

@@ -68,8 +68,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     @Autowired
     private MusicGroupDao musicGroupDao;
     @Autowired
-    private ChargeTypeDao chargeTypeDao;
-    @Autowired
     private TeacherDao teacherDao;
     
     @Autowired
@@ -3132,14 +3130,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
         Map<String, BigDecimal> chargeStandardMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryChargeStandard(StringUtils.join(musicGroupIds, ",")));
 
-        // 获取收费类型编号列表
-        Set<Integer> chargeTypeIds = musicGroupList.stream().map(e -> e.getChargeTypeId()).collect(Collectors.toSet());
-        if (chargeTypeIds == null) {
-            chargeTypeIds = new HashSet<>();
-        }
-        List<Map<Integer, String>> chargeTypeNames = chargeTypeDao.queryNameByIds(StringUtils.join(chargeTypeIds, ","));
-        Map<Integer, String> chargeTypeNameMap = MapUtil.convertMybatisMap(chargeTypeNames);
-
         //获取教学点编号
         Map<Integer, String> cooperationOrganNames = MapUtil.convertMybatisMap(cooperationOrganDao.queryNameByIds(StringUtils.join(musicGroupList.stream().map(MusicGroup::getCooperationOrganId).collect(Collectors.toSet()), ",")));
 
@@ -3161,7 +3151,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             e.setDirectorUserName(directorUserNameMap.get(e.getDirectorUserId()));
             e.setPayNum(payNumMap.get(e.getId()) == null ? 0 : payNumMap.get(e.getId()));
             e.setGroupMemberNum(e.getGroupMemberNum() == null ? 0 : e.getGroupMemberNum());
-            e.setChargeTypeName(chargeTypeNameMap.get(e.getChargeTypeId()));
             e.setHasVerifyMusicalList(purchaseListMap.get(e.getId()) != null);
             if (e.getStatus().equals(MusicGroupStatusEnum.PREPARE) || e.getStatus().equals(MusicGroupStatusEnum.PROGRESS)) {
                 if (viewRegButtonMap.containsKey(e.getId())) {
@@ -3322,7 +3311,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         Date date = new Date();
         //缴费方式不同
         if ((group.getStatus().equals(MusicGroupStatusEnum.AUDIT_FAILED) || group.getStatus().equals(MusicGroupStatusEnum.DRAFT))
-                && !group.getChargeTypeId().equals(musicGroup.getChargeTypeId())) {
+                && group.getCourseViewType() != musicGroup.getCourseViewType()) {
             //删除原有的声部商品组合
             musicGroupSubjectGoodsGroupDao.delByMusicGroupId(musicGroupId);
             //删除原有的缴费项目
@@ -3375,8 +3364,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         SubFeeSettingDto subFeeSettingDto = new SubFeeSettingDto();
         //获取乐团信息
         MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
-        ChargeType chargeType = chargeTypeDao.get(musicGroup.getChargeTypeId());
-        musicGroup.setChargeTypeName(chargeType.getName());
         MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderService.findByMusicGroupRegCalender(musicGroup.getId());
         if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
             musicGroup.setPaymentExpireDate(regCalender.getDeadlinePaymentDate());
@@ -3469,10 +3456,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             musicGroup.setSchoolName(school.getName());
             musicGroup.setAddress(school.getAddress());
         }
-        ChargeType chargeType = chargeTypeDao.get(musicGroup.getChargeTypeId());
-        if (chargeType != null) {
-            musicGroup.setChargeTypeName(chargeType.getName());
-        }
         int highClassGroupNum = studentRegistrationDao.findMusicGroupStudentNum(musicGroupId) / 5;
         musicGroup.setImproventClassesNum(highClassGroupNum);
         return musicGroup;

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

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.dto.MusicGroupGoodsAndDiscountDto;
 import com.ym.mec.biz.dal.dto.MusicGroupRegRespDto;
 import com.ym.mec.biz.dal.dto.MusicGroupSubjectGoodsAndInfoDto;
 import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.GoodsType;
 import com.ym.mec.biz.service.*;
@@ -201,11 +202,11 @@ public class MusicGroupSubjectPlanServiceImpl extends BaseServiceImpl<Integer, M
             organId = musicGroup.getOrganId();
         }
         List<MusicGroupGoodsAndDiscountDto> goodsList = goodsDao.getMusicGroupGoodsAndDiscount(subjectId, type, courseViewType,organId, TenantContextHolder.getTenantId());
-        if (chargeTypeId == null || (type != null && !"INSTRUMENT".equals(type))) {
+        if (courseViewType == null || (type != null && !"INSTRUMENT".equals(type))) {
             return goodsList;
         }
 
-        ChargeTypeSubjectMapper subjectDiscount = chargeTypeSubjectMapperDao.getSubjectDiscount(chargeTypeId, subjectId);
+        ChargeTypeSubjectMapper subjectDiscount = chargeTypeSubjectMapperDao.getSubjectDiscount(CourseViewTypeEnum.codeOf(courseViewType), subjectId);
         
         if (subjectDiscount == null){
         	subjectDiscount = new ChargeTypeSubjectMapper();

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

@@ -8,9 +8,11 @@ import org.springframework.stereotype.Service;
 import com.ym.mec.biz.dal.dao.OrganizationCourseUnitPriceSettingsDao;
 import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
 import com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings;
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
 import com.ym.mec.biz.service.OrganizationCourseUnitPriceSettingsService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+
 import org.springframework.transaction.annotation.Transactional;
 
 @Service
@@ -31,8 +33,8 @@ public class OrganizationCourseUnitPriceSettingsServiceImpl extends BaseServiceI
 	}
 
 	@Override
-	public OrganizationCourseUnitPriceSettings queryByOrganIdAndCourseTypeAndChargeType(Integer organId, CourseScheduleType courseType, Integer chargeTypeId) {
-		return organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(organId, courseType, chargeTypeId);
+	public OrganizationCourseUnitPriceSettings queryByOrganIdAndCourseTypeAndChargeType(Integer organId, CourseScheduleType courseType, CourseViewTypeEnum courseViewType) {
+		return organizationCourseUnitPriceSettingsDao.queryByOrganIdAndCourseTypeAndChargeType(organId, courseType, courseViewType);
 	}
 
 	@Override

+ 0 - 15
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java

@@ -15,14 +15,12 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import com.ym.mec.biz.dal.dao.ChargeTypeOrganizationFeeDao;
-import com.ym.mec.biz.dal.dao.MusicGroupDao;
 import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dao.SubjectDao;
 import com.ym.mec.biz.dal.dao.SubjectGoodsMapperDao;
 import com.ym.mec.biz.dal.dto.ConditionDto;
 import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.dto.SubjectApplyDetailDto;
-import com.ym.mec.biz.dal.entity.ChargeTypeOrganizationFee;
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.entity.SubjectGoodsMapper;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
@@ -65,19 +63,6 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject> implem
     }
 
     @Override
-    public List<Subject> findDefaultSubByChargeTypeId(Integer chargeTypeId, Integer organId, Integer number) {
-        List<Subject> subByChargeTypeId = subjectDao.findDefaultSubByChargeTypeId(chargeTypeId);
-        ChargeTypeOrganizationFee byOrganId = chargeTypeOrganizationFeeDao.findByOrganId(chargeTypeId, organId);
-        if (byOrganId != null) {
-            BigDecimal bigDecimal = new BigDecimal(number);
-            subByChargeTypeId.forEach(e -> {
-                e.setFee(byOrganId.getCourseFee().multiply(bigDecimal));
-            });
-        }
-        return subByChargeTypeId;
-    }
-
-    @Override
     public List<SubjectApplyDetailDto> findSubApplyDetail(String musicGroupId) {
         List<SubjectApplyDetailDto> subApplyDetail = subjectDao.findSubApplyDetail(musicGroupId);
         

+ 16 - 16
mec-biz/src/main/resources/config/mybatis/ChargeTypeSubjectMapperMapper.xml

@@ -8,7 +8,7 @@
 
     <resultMap type="com.ym.mec.biz.dal.entity.ChargeTypeSubjectMapper" id="ChargeTypeSubjectMapper">
         <result column="id_" property="id"/>
-        <result column="charge_type_id_" property="chargeTypeId"/>
+        <result column="course_view_type_" property="courseViewType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="subject_id_" property="subjectId"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
@@ -37,9 +37,9 @@
     <!-- 向数据库增加一条记录 -->
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.ChargeTypeSubjectMapper" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
-        INSERT INTO charge_type_subject_mapper (charge_type_id_, subject_id_, kit_group_purchase_type_, deposit_fee_,
+        INSERT INTO charge_type_subject_mapper (course_view_type_, subject_id_, kit_group_purchase_type_, deposit_fee_,
                                                 fee_, goods_discount_rate_, create_time_, update_time_,tenant_id_)
-        VALUES (#{chargeTypeId}, #{subjectId},
+        VALUES (#{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{subjectId},
                 #{kitGroupPurchaseTypeEnum,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{depositFee},
                 #{fee}, #{goodsDiscountRate}, now(), now(),#{tenantId})
     </insert>
@@ -48,10 +48,10 @@
     <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id"
             keyProperty="id">
         INSERT INTO charge_type_subject_mapper
-        (charge_type_id_,subject_id_,kit_group_purchase_type_,deposit_fee_,fee_,goods_discount_rate_,create_time_,update_time_,tenant_id_)
+        (course_view_type_,subject_id_,kit_group_purchase_type_,deposit_fee_,fee_,goods_discount_rate_,create_time_,update_time_,tenant_id_)
         VALUES
         <foreach collection="list" item="item" separator=",">
-            (#{item.chargeTypeId},#{item.subjectId},#{item.kitGroupPurchaseTypeEnum,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.depositFee},#{item.fee},#{item.goodsDiscountRate},now(),now(),#{item.tenantId})
+            (#{item.courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.subjectId},#{item.kitGroupPurchaseTypeEnum,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.depositFee},#{item.fee},#{item.goodsDiscountRate},now(),now(),#{item.tenantId})
         </foreach>
     </insert>
 
@@ -62,8 +62,8 @@
             <if test="subjectId != null">
                 subject_id_ = #{subjectId},
             </if>
-            <if test="chargeTypeId != null">
-                charge_type_id_ = #{chargeTypeId},
+            <if test="courseViewType != null">
+                course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
             <if test="kitGroupPurchaseTypeEnum != null">
                 kit_group_purchase_type_ =
@@ -92,8 +92,8 @@
                 <if test="item.subjectId != null">
                     subject_id_ = #{item.subjectId},
                 </if>
-                <if test="item.chargeTypeId != null">
-                    charge_type_id_ = #{item.chargeTypeId},
+                <if test="item.courseViewType != null">
+                    course_view_type_ = #{item.courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
                 </if>
                 <if test="item.kitGroupPurchaseTypeEnum != null">
                     kit_group_purchase_type_ =
@@ -126,14 +126,14 @@
     <delete id="deleteByChargeTypeId">
         DELETE
         FROM charge_type_subject_mapper
-        WHERE charge_type_id_ = #{chargeTypeId}
+        WHERE course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
     </delete>
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="ChargeTypeSubjectMapper" parameterType="map">
         SELECT * FROM charge_type_subject_mapper where  tenant_id_ = #{tenantId}
-        	<if test="chargeTypeId != null">
-        		and charge_type_id_ = #{chargeTypeId}
+        	<if test="courseViewType != null">
+        		and course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
         	<if test="subjectId != null">
         		and subject_id_ = #{subjectId}
@@ -145,8 +145,8 @@
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
         SELECT COUNT(*) FROM charge_type_subject_mapper where tenant_id_ = #{tenantId}
-        	<if test="chargeTypeId != null">
-        		and charge_type_id_ = #{chargeTypeId}
+        	<if test="courseViewType != null">
+        		and course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
         	</if>
         	<if test="subjectId != null">
         		and subject_id_ = #{subjectId}
@@ -157,7 +157,7 @@
     <select id="getSubjectDiscount" resultMap="ChargeTypeSubjectMapper">
         SELECT *
         FROM charge_type_subject_mapper
-        WHERE charge_type_id_ = #{chargeTypeId}
+        WHERE course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
           AND subject_id_ = #{subjectId}
     </select>
 
@@ -165,7 +165,7 @@
     <select id="getSubjectsDiscount" resultMap="ChargeTypeSubjectMapper">
         SELECT *
         FROM charge_type_subject_mapper
-        WHERE charge_type_id_ = #{chargeTypeId}
+        WHERE course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
           AND FIND_IN_SET(subject_id_, #{subjectIds})
     </select>
     <select id="findByViewTypeANdSubject" resultMap="ChargeTypeSubjectMapper">

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

@@ -261,14 +261,13 @@
     </resultMap>
     <select id="queryCloudTeacherActiveDetail" resultMap="CloudTeacherActiveTargetDetailDto">
         SELECT su.username_,cto.remark_,cto.amount_,cto.student_id_,GROUP_CONCAT(DISTINCT co.name_) cooperation_name_,
-        GROUP_CONCAT(DISTINCT mg.name_) music_group_name_,GROUP_CONCAT(DISTINCT ct.name_) charge_type_name_,
+        GROUP_CONCAT(DISTINCT mg.name_) music_group_name_,GROUP_CONCAT(DISTINCT case when mg.course_view_type_ = 2 then '会员收费' when mg.course_view_type_ = 3 then '免费' else '课程收费' end) charge_type_name_,
         sj.name_ subject_name_,st.current_grade_num_,cto.create_time_
         FROM cloud_teacher_order cto
         LEFT JOIN sys_user su ON su.id_ = cto.student_id_
         LEFT JOIN student_registration sr ON sr.user_id_ = cto.student_id_ AND sr.music_group_status_ = 'NORMAL'
         LEFT JOIN music_group mg ON mg.id_ = sr.music_group_id_ AND mg.status_ = 'PROGRESS'
         LEFT JOIN cooperation_organ co ON co.id_ = mg.cooperation_organ_id_
-        LEFT JOIN charge_type ct ON ct.id_ = mg.charge_type_id_
         LEFT JOIN student st ON st.user_id_ = cto.student_id_
         LEFT JOIN `subject` sj ON sj.id_ = st.subject_id_list_
         <include refid="queryCloudTeacherActiveDetailSql"/>
@@ -458,9 +457,6 @@
             <if test="search != null and search != ''">
                 AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR mg.id_ LIKE CONCAT('%',#{search},'%'))
             </if>
-            <if test="chargeType != null">
-                AND mg.charge_type_id_ = #{chargeType}
-            </if>
             <if test="subjectId != null">
                 AND st.subject_id_list_ = #{subjectId}
             </if>

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

@@ -380,19 +380,6 @@
 		</foreach>
 		AND mg.settlement_type_ IS NOT NULL
 	</select>
-	<select id="findMusicGroupChargeTypeByCourse" resultType="map">
-		SELECT
-			cs.id_ AS 'key',
-			mg.charge_type_id_ AS 'value'
-		FROM
-			course_schedule cs
-			LEFT JOIN class_group cg ON cs.class_group_id_=cg.id_
-			LEFT JOIN music_group mg ON cg.music_group_id_=mg.id_
-		WHERE cs.id_ IN
-		<foreach collection="courseScheduleIds" item="courseScheduleId" open="(" close=")" separator=",">
-			#{courseScheduleId}
-		</foreach>
-	</select>
 	<select id="findCourseSubsidyByCourses" resultType="map">
 		SELECT
 			cs.id_ AS 'key',
@@ -729,7 +716,8 @@
  	</resultMap>
     <select id="exportMusicTeacherSalary" resultMap="ExportTeacherSalaryDtoMap">
 		SELECT cs.`id_` courseScheduleId,ts.user_id_ teacherId,mgo.name_ courseScheduleOrganName,mg.name_ groupName,
-		ct.name_ changeType,u.real_name_ teacherName,o.name_ teacherOrganName,cs.music_group_id_ group_id_,
+		case when mg.course_view_type_ = 2 then '会员收费' when mg.course_view_type_ = 3 then '免费' else '课程收费' end changeType,
+		u.real_name_ teacherName,o.name_ teacherOrganName,cs.music_group_id_ group_id_,
 		CASE WHEN cs.teach_mode_ = 'OFFLINE' THEN '线下' WHEN cs.teach_mode_ = 'ONLINE' THEN '线上' END teach_mode_,
 		CASE WHEN t.job_nature_ = 'PART_TIME' THEN '兼职' WHEN t.job_nature_ = 'FULL_TIME' THEN '全职' ELSE '零时工' END jobType,
 		CASE WHEN cs.type_ = 'SINGLE' THEN '单技课' WHEN cs.type_ = 'MIX' THEN '合奏课' WHEN cs.type_ = 'HIGH' THEN '基础技能课'  WHEN cs.type_ = 'VIP' THEN 'vip课'
@@ -757,7 +745,6 @@
 		LEFT JOIN course_schedule_student_payment sp ON sp.course_schedule_id_ = ts.course_schedule_id_
 		LEFT JOIN music_group mg ON (mg.id_ = ts.music_group_id_ AND ts.group_type_ = 'MUSIC')
 		LEFT JOIN organization mgo ON mgo.id_ = mg.organ_id_
-		LEFT JOIN charge_type ct ON ct.id_ = mg.charge_type_id_
 		WHERE DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month} AND cs.`del_flag_` != 1 AND cs.group_type_ = 'MUSIC' AND ts.settlement_time_ IS NOT NULL
 		AND t.is_settlement_salary_ = 1 and ts.tenant_id_ = #{tenantId}
 		<if test="courseTypeList != null">

+ 4 - 11
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -12,7 +12,6 @@
         <result column="team_teacher_id_" property="teamTeacherId"/>
         <result column="educational_teacher_id_" property="educationalTeacherId"/>
         <result column="transaction_teacher_id_" property="transactionTeacherId"/>
-        <result column="charge_type_id_" property="chargeTypeId"/>
         <result column="course_form_" property="courseForm"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
@@ -90,12 +89,12 @@
     </select>
 
     <select id="queryBasicInfo" resultMap="MusicGroupBasicDto">
-        SELECT mg.*,o.name_ organ_name_,s.name_ school_name_ ,co.name_ cooperation_organ_name_,ct.name_ charge_type_name_,
+        SELECT mg.*,o.name_ organ_name_,s.name_ school_name_ ,co.name_ cooperation_organ_name_,
         u1.real_name_ edu_teacher_name_,u2.real_name_ teans_teacher_name_,u2.phone_ teans_teacher_phone_,
         u3.real_name_ team_teacher_name_,u4.real_name_ dir_teacher_name_,u5.real_name_ repair_teacher_name_
         FROM music_group mg left join organization o on mg.organ_id_ = o.id_
         left join school s on mg.school_id_ = s.id_ left join cooperation_organ co on co.id_ = mg.cooperation_organ_id_
-        left join charge_type ct on ct.id_ = mg.charge_type_id_ left join sys_user u1 on u1.id_ = mg.educational_teacher_id_
+        left join sys_user u1 on u1.id_ = mg.educational_teacher_id_
         left join sys_user u2 on u2.id_ = mg.transaction_teacher_id_ left join sys_user u3 on u3.id_ = mg.team_teacher_id_
         left join sys_user u4 on u4.id_ = mg.director_user_id_ left join sys_user u5 on u5.id_ = mg.repair_user_id_
         WHERE mg.id_ = #{id}
@@ -114,7 +113,7 @@
         INSERT INTO music_group
                 (id_, name_, organ_id_, school_id_, apply_expire_date_, pre_apply_expire_date_, team_teacher_id_,
                  educational_teacher_id_,
-                 charge_type_id_, course_form_, create_time_, update_time_, status_,
+                 course_form_, create_time_, update_time_, status_,
                  bill_start_date_, improvent_classes_num_, enroll_classes_, payment_expire_date_, is_extra_class_,
                  settlement_type_, cooperation_organ_id_, enlightenment_course_time_,
                  parent_meeting_time_, img_, director_user_id_, is_classroom_lessons_, memo_, expect_start_group_date_,
@@ -123,7 +122,7 @@
                  music_group_plan_making_id_,first_recruit_grade_,default_charge_standard_,single_train_minutes_,course_plan_,sale_activity_desc_,graduate_grade_,basic_student_num_,payment_user_type_,charge_mode_)
         VALUES (#{id}, #{name}, #{organId}, #{schoolId}, #{applyExpireDate}, #{preApplyExpireDate}, #{teamTeacherId},
                 #{educationalTeacherId},
-                #{chargeTypeId}, #{courseForm}, now(), now(),
+                #{courseForm}, now(), now(),
                 #{status, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{billStartDate},
                 #{improventClassesNum}, #{enrollClasses}, #{paymentExpireDate},
                 #{isExtraClass, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
@@ -171,9 +170,6 @@
             <if test="courseForm != null">
                 course_form_ = #{courseForm},
             </if>
-            <if test="chargeTypeId != null">
-                charge_type_id_ = #{chargeTypeId},
-            </if>
             <if test="educationalTeacherId != null">
                 educational_teacher_id_ = #{educationalTeacherId},
             </if>
@@ -326,9 +322,6 @@
                 AND (mg.name_ LIKE CONCAT('%',#{search},'%') OR mg.id_ LIKE CONCAT('%',#{search},'%')
                  OR mg.cooperation_organ_id_ = #{search} OR co.name_ LIKE CONCAT('%',#{search},'%'))
             </if>
-            <if test="chargeTypeId != null">
-                AND mg.charge_type_id_ = #{chargeTypeId}
-            </if>
             <if test="musicGroupStatus != null">
                 AND FIND_IN_SET(mg.status_,#{musicGroupStatus})
             </if>

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

@@ -8,7 +8,7 @@
         <id column="id_" property="id"/>
         <result column="name_" property="name"/>
         <result column="organ_id_" property="organId"/>
-        <result column="charge_type_id_" property="chargeTypeId"/>
+        <result column="course_view_type_" property="courseViewType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="total_current_price_" property="totalCurrentPrice"/>
         <result column="total_original_price_" property="totalOriginalPrice"/>
         <result column="create_time_" property="createTime"/>
@@ -17,7 +17,7 @@
     </resultMap>
     <sql id="Base_Column_List">
         <!--@mbg.generated-->
-        id_, name_, organ_id_, charge_type_id_, total_current_price_, total_original_price_,
+        id_, name_, organ_id_, course_view_type_, total_current_price_, total_original_price_,
         create_time_, update_time_,tenant_id_
     </sql>
     <select id="get" parameterType="java.lang.Integer" resultMap="MusicGroupOrganizationCourseSettings">
@@ -35,10 +35,10 @@
     <insert id="insert" keyColumn="id_" keyProperty="id"
             parameterType="com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettings" useGeneratedKeys="true">
         <!--@mbg.generated-->
-        insert into music_group_organization_course_settings (name_, organ_id_, charge_type_id_, total_current_price_,
+        insert into music_group_organization_course_settings (name_, organ_id_, course_view_type_, total_current_price_,
         total_original_price_,
         create_time_, update_time_,tenant_id_)
-        values (#{name}, #{organId}, #{chargeTypeId}, #{totalCurrentPrice}, #{totalOriginalPrice},
+        values (#{name}, #{organId}, #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{totalCurrentPrice}, #{totalOriginalPrice},
         NOW(),NOW(),#{tenantId})
     </insert>
     <update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettings">
@@ -51,8 +51,8 @@
             <if test="organId != null">
                 organ_id_ = #{organId},
             </if>
-            <if test="chargeTypeId != null">
-                charge_type_id_ = #{chargeTypeId},
+            <if test="courseViewType != null">
+                course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
             <if test="totalCurrentPrice != null">
                 total_current_price_ = #{totalCurrentPrice},
@@ -95,8 +95,8 @@
             <if test="organId != null">
                 AND mgocs.organ_id_=#{organId}
             </if>
-            <if test="chargeTypeId != null">
-                AND mgocs.charge_type_id_ = #{chargeTypeId}
+            <if test="courseViewType != null">
+                AND mgocs.course_view_type_ = #{courseViewType}
             </if>
         </where>
     </sql>

+ 15 - 16
mec-biz/src/main/resources/config/mybatis/OrganizationCourseUnitPriceSettingsMapper.xml

@@ -7,7 +7,7 @@
 		<result column="id_" property="id" />
 		<result column="organ_id_" property="organId" />
 		<result column="course_type_" property="courseType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
-		<result column="charge_type_id_" property="chargeTypeId" />
+		<result column="course_view_type_" property="courseViewType" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
 		<result column="unit_price_" property="unitPrice" />
 		<result column="create_time_" property="createTime" />
 		<result column="update_time_" property="updateTime" />
@@ -29,16 +29,16 @@
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		INSERT INTO organization_course_unit_price_settings
-		(id_,organ_id_,course_type_,charge_type_id_,unit_price_,create_time_,update_time_,tenant_id_)
-		VALUES(#{id},#{organId},#{courseType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{chargeTypeId},#{unitPrice},now(),now(),#{tenantId})
+		(id_,organ_id_,course_type_,course_view_type_,unit_price_,create_time_,update_time_,tenant_id_)
+		VALUES(#{id},#{organId},#{courseType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{unitPrice},now(),now(),#{tenantId})
 	</insert>
 	
 	<insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
 		INSERT INTO organization_course_unit_price_settings
-		(id_,organ_id_,course_type_,charge_type_id_,unit_price_,create_time_,update_time_,tenant_id_)
+		(id_,organ_id_,course_type_,course_view_type_,unit_price_,create_time_,update_time_,tenant_id_)
 		VALUES
 		<foreach collection="list" item="item" separator=",">
-		(#{item.id},#{item.organId},#{item.courseType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.chargeTypeId},#{item.unitPrice},now(),now(),#{item.tenantId})
+		(#{item.id},#{item.organId},#{item.courseType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{item.unitPrice},now(),now(),#{item.tenantId})
 		</foreach>
 	</insert>
 
@@ -58,8 +58,8 @@
 			<if test="courseType != null">
 				course_type_ = #{courseType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 			</if>
-			<if test="chargeTypeId != null">
-				charge_type_id_ = #{chargeTypeId},
+			<if test="courseViewType != null">
+				course_view_type_ = #{courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
 			</if>
 			<if test="unitPrice != null">
 				unit_price_ = #{unitPrice},
@@ -78,8 +78,7 @@
 
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="OrganizationCourseUnitPriceSettings" parameterType="map">
-		SELECT ups.*,o.name_ organ_name_ ,ct.name_ charge_type_name_ FROM organization_course_unit_price_settings ups left join organization o on ups.organ_id_ = o.id_
-		left join charge_type ct on ct.id_ = ups.charge_type_id_
+		SELECT ups.*,o.name_ organ_name_  FROM organization_course_unit_price_settings ups left join organization o on ups.organ_id_ = o.id_
 		<where>
 			ups.tenant_id_ = #{tenantId}
 			<if test="organId != null">
@@ -88,8 +87,8 @@
 			<if test="courseScheduleType != null">
 				and ups.course_type_ = #{courseScheduleType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
-			<if test="chargeTypeId != null">
-				and ups.charge_type_id_ = #{chargeTypeId}
+			<if test="courseViewType != null">
+				and ups.course_view_type_ = #{courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
 		</where>
 		ORDER BY ups.id_ desc
@@ -107,19 +106,19 @@
 			<if test="courseScheduleType != null">
 				and ups.course_type_ = #{courseScheduleType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
-			<if test="chargeTypeId != null">
-				and ups.charge_type_id_ = #{chargeTypeId}
+			<if test="courseViewType != null">
+				and ups.course_view_type_ = #{courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 			</if>
 		</where>
 	</select>
 	
 	<select id="queryByOrganIdAndCourseTypeAndChargeType" resultMap="OrganizationCourseUnitPriceSettings" parameterType="map">
 		SELECT * FROM organization_course_unit_price_settings WHERE organ_id_ = #{organId} and course_type_ = #{courseScheduleType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-		and charge_type_id_ = #{chargeTypeId}
+		and course_view_type_ = #{courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 	</select>
     <select id="queryMapByOrganIdAndChargeTypeId" resultType="java.util.Map">
 		SELECT course_type_ 'key',MAX(unit_price_)'value' FROM organization_course_unit_price_settings
-		WHERE organ_id_ = #{organId} AND charge_type_id_ = #{chargeTypeId}
+		WHERE organ_id_ = #{organId} AND course_view_type_ = #{courseViewType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
 		GROUP BY course_type_
 	</select>
 	<select id="querySingle" resultType="com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings">
@@ -131,7 +130,7 @@
 	</select>
     <select id="queryByMusicGroupId" resultMap="OrganizationCourseUnitPriceSettings">
 		select ocups.* from organization_course_unit_price_settings ocups
-		LEFT JOIN music_group mg ON mg.organ_id_ = ocups.organ_id_ AND mg.charge_type_id_ = ocups.charge_type_id_
+		LEFT JOIN music_group mg ON mg.organ_id_ = ocups.organ_id_ AND mg.course_view_type_ = ocups.course_view_type_
 		where mg.id_ = #{musicGroupId}
 	</select>
 </mapper>

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

@@ -84,12 +84,6 @@
         WHERE mgsp.music_group_id_ = #{musicGroupId} AND s.del_flag_ = 0
     </select>
 
-    <select id="findSubByChargeType" resultMap="Subject">
-        SELECT s.* FROM charge_type_subject_mapper ctsm
-        LEFT JOIN `subject` s ON ctsm.subject_id_ = s.id_
-        WHERE ctsm.charge_type_id_ = #{chargeTypeId} AND s.del_flag_ = 0
-    </select>
-
     <select id="findByParentId" resultMap="Subject">
         SELECT * FROM subject <include refid="querySubPageSql"/>
     </select>
@@ -97,7 +91,7 @@
     <select id="findDefaultSubByChargeTypeId" resultMap="Subject">
         SELECT s.* FROM charge_type_subject_mapper ctsm
         LEFT JOIN `subject` s ON subject_id_ = s.id_
-        WHERE ctsm.charge_type_id_ = #{chargeTypeId} AND s.del_flag_ = 0
+        WHERE ctsm.course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler} AND s.del_flag_ = 0
     </select>
 
     <resultMap id="subApplyDetail" type="com.ym.mec.biz.dal.dto.SubjectApplyDetailDto">

+ 0 - 1
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -190,7 +190,6 @@ public class MusicGroupController extends BaseController {
             return failed(err + "不能缴费");
         }
         studentRegistration.setOwnershipType(musicGroup.getOwnershipType());
-        studentRegistration.setChargeTypeId(musicGroup.getChargeTypeId());
         if (sysUser != null) {
             studentRegistration.setGender(sysUser.getGender());
         }

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

@@ -264,7 +264,6 @@ public class StudentOrderController extends BaseController {
             orderDetail.put("course", musicGroup.getCourseForm());
             orderDetail.put("ownershipType", musicGroup.getOwnershipType());
             orderDetail.put("detailType", orderDetailType);
-            orderDetail.put("chargeTypeId", musicGroup.getChargeTypeId());
             orderDetail.put("courseViewType", musicGroup.getCourseViewType());
 
             //新的课程形态10.27
@@ -821,7 +820,6 @@ public class StudentOrderController extends BaseController {
         MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.getMusicGroupRegCalender(musicGroupId);
         if (musicGroupRegCalender != null) {
             MusicGroup musicGroup = musicGroupService.get(musicGroupId);
-            musicGroupRegCalender.setChargeTypeId(musicGroup.getChargeTypeId());
             List<MusicGroupPaymentCalenderCourseSettings> courseSettings = musicGroupPaymentCalenderCourseSettingsDao.getMusicGroupRegCalenderCourseSettings(musicGroupId);
             musicGroupRegCalender.setMusicGroupPaymentCalenderCourseSettingsList(courseSettings);
             musicGroupRegCalender.setCourseViewType(musicGroup.getCourseViewType());

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

@@ -57,7 +57,7 @@ public class OrganizationCourseUnitPriceSettingsController extends BaseControlle
 		for (OrganizationCourseUnitPriceSettings organizationCourseUnitPriceSettings : organizationCourseUnitPriceSettingsList) {
 			OrganizationCourseUnitPriceSettings originalObj = organizationCourseUnitPriceSettingsService.queryByOrganIdAndCourseTypeAndChargeType(
 					organizationCourseUnitPriceSettings.getOrganId(), organizationCourseUnitPriceSettings.getCourseType(),
-					organizationCourseUnitPriceSettings.getChargeTypeId());
+					organizationCourseUnitPriceSettings.getCourseViewType());
 			if (originalObj != null) {
 				return failed("当前分部已经存在该课程类型的单价");
 			}

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

@@ -1,17 +1,27 @@
 package com.ym.mec.web.controller;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.entity.SubjectGoodsMapper;
 import com.ym.mec.biz.dal.page.SubjectQueryInfo;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.exception.BizException;
-import io.swagger.annotations.*;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
 
 @RequestMapping("subject")
 @Api(tags = "科目服务")
@@ -58,18 +68,6 @@ public class SubjectController extends BaseController {
         return succeed(subjectService.findSubByMusicGroupId(musicGroupId));
     }
 
-    @ApiOperation(value = "通过乐团收费类型,获取默认的声部列表")
-    @GetMapping("/findDefaultSubByChargeTypeId")
-    @PreAuthorize("@pcs.hasPermissions('subject/findDefaultSubByChargeTypeId')")
-    @ApiImplicitParams({ @ApiImplicitParam(name = "chargeTypeId", value = "收费类型编号", required = true, dataType = "Integer"),
-            @ApiImplicitParam(name = "organId", value = "分部编号", required = true, dataType = "Integer")})
-    public Object findDefaultSubByChargeTypeId(Integer chargeTypeId,Integer organId,Integer number){
-        if(chargeTypeId == null || organId == null || number == null){
-            throw new BizException("参数校验错误");
-        }
-        return succeed(subjectService.findDefaultSubByChargeTypeId(chargeTypeId,organId,number));
-    }
-
     @ApiOperation(value = "新建乐团时,获取设置声部费用默认数据")
     @GetMapping("/setSubjectInfo")
     @PreAuthorize("@pcs.hasPermissions('subject/setSubjectInfo')")