Browse Source

云教练修改

zouxuan 3 years ago
parent
commit
d423524e72
18 changed files with 138 additions and 83 deletions
  1. 0 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleEvaluateDao.java
  2. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderActivityDao.java
  3. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/CalenderMemberDto.java
  4. 0 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupPaymentCalenderAddStudentDto.java
  5. 4 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CloudTeacherOrder.java
  6. 22 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/CalenderBaseServiceEnum.java
  7. 12 5
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/PeriodEnum.java
  8. 2 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderActivityService.java
  9. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/service/MusicGroupPaymentCalenderBaseService.java
  10. 0 9
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ActivityPlanServiceImpl.java
  11. 11 14
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CloudTeacherOrderServiceImpl.java
  12. 6 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MemberPaymentCalenderServiceImpl.java
  13. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderActivityServiceImpl.java
  14. 6 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderCourseSettingsServiceImpl.java
  15. 18 21
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderDetailServiceImpl.java
  16. 18 26
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  17. 6 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicRepairPaymentCalenderServiceImpl.java
  18. 3 0
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderActivityDao.xml

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

@@ -7,7 +7,6 @@ import com.ym.mec.biz.dal.enums.OrderTypeEnum;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.dal.BaseDAO;
 
 
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
-import org.junit.runners.Parameterized.Parameters;
 
 
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;

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

@@ -9,4 +9,6 @@ import java.util.List;
 public interface MusicGroupPaymentCalenderActivityDao extends BaseMapper<MusicGroupPaymentCalenderActivity> {
 public interface MusicGroupPaymentCalenderActivityDao extends BaseMapper<MusicGroupPaymentCalenderActivity> {
 
 
     void insertBatch(@Param("calenderActivityList") List<MusicGroupPaymentCalenderActivity> musicGroupPaymentCalenderActivities);
     void insertBatch(@Param("calenderActivityList") List<MusicGroupPaymentCalenderActivity> musicGroupPaymentCalenderActivities);
+
+    void delByCalenderId(@Param("calenderId") Long calenderId);
 }
 }

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

@@ -17,12 +17,23 @@ public class CalenderMemberDto {
     @ApiModelProperty(value = "会员现价", required = false)
     @ApiModelProperty(value = "会员现价", required = false)
     private BigDecimal actualAmount = BigDecimal.ZERO;
     private BigDecimal actualAmount = BigDecimal.ZERO;
 
 
+    @ApiModelProperty(value = "会员原价", required = false)
+    private BigDecimal originalAmount = BigDecimal.ZERO;
+
     @ApiModelProperty(value = "会员等级编号", required = false)
     @ApiModelProperty(value = "会员等级编号", required = false)
     private Integer memberRankSettingId = 1;
     private Integer memberRankSettingId = 1;
 
 
     @ApiModelProperty(value = "是否必选", required = false)
     @ApiModelProperty(value = "是否必选", required = false)
     private Boolean optionalFlag = false;
     private Boolean optionalFlag = false;
 
 
+    public BigDecimal getOriginalAmount() {
+        return originalAmount;
+    }
+
+    public void setOriginalAmount(BigDecimal originalAmount) {
+        this.originalAmount = originalAmount;
+    }
+
     public PeriodEnum getPeriodEnum() {
     public PeriodEnum getPeriodEnum() {
         return periodEnum;
         return periodEnum;
     }
     }

+ 0 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupPaymentCalenderAddStudentDto.java

@@ -1,6 +1,5 @@
 package com.ym.mec.biz.dal.dto;
 package com.ym.mec.biz.dal.dto;
 
 
-import java.util.List;
 import java.util.Set;
 import java.util.Set;
 
 
 public class MusicGroupPaymentCalenderAddStudentDto {
 public class MusicGroupPaymentCalenderAddStudentDto {

+ 4 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CloudTeacherOrder.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.entity;
 package com.ym.mec.biz.dal.entity;
 
 
+import com.ym.mec.biz.dal.enums.PeriodEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
@@ -29,7 +30,7 @@ public class CloudTeacherOrder extends BaseEntity {
      * 时长类型 1-天 2-月 3-年
      * 时长类型 1-天 2-月 3-年
      */
      */
     @ApiModelProperty(value = "时长类型 1-天 2-月 3-年")
     @ApiModelProperty(value = "时长类型 1-天 2-月 3-年")
-    private Integer type;
+    private PeriodEnum type;
 
 
     /**
     /**
      * 时长类型 1-天 2-月 3-年
      * 时长类型 1-天 2-月 3-年
@@ -137,11 +138,11 @@ public class CloudTeacherOrder extends BaseEntity {
         this.studentId = studentId;
         this.studentId = studentId;
     }
     }
 
 
-    public Integer getType() {
+    public PeriodEnum getType() {
         return type;
         return type;
     }
     }
 
 
-    public void setType(Integer type) {
+    public void setType(PeriodEnum type) {
         this.type = type;
         this.type = type;
     }
     }
 
 

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/CalenderBaseServiceEnum.java

@@ -0,0 +1,22 @@
+package com.ym.mec.biz.dal.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+
+public enum CalenderBaseServiceEnum implements BaseEnum<String, CalenderBaseServiceEnum> {
+	COURSE("课程"), MEMBER("会员"), MUSIC_REPAIR("乐保"), ACTIVITY("活动");
+
+	private String code;
+
+	CalenderBaseServiceEnum(String code) {
+		this.code = code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	@Override
+	public String getCode() {
+		return code;
+	}
+}

+ 12 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/PeriodEnum.java

@@ -5,15 +5,22 @@ import com.ym.mec.common.enums.BaseEnum;
 /**
 /**
  * 周期
  * 周期
  */
  */
-public enum PeriodEnum implements BaseEnum<String, PeriodEnum> {
-	DAY("日"), MONTH("月"), QUARTERLY("季度"), YEAR_HALF("半年"), YEAR("年");
+public enum PeriodEnum implements BaseEnum<Integer, PeriodEnum> {
+	DAY(1,"日"), MONTH(2,"月"), QUARTERLY(3,"季度"), YEAR_HALF(4,"半年"), YEAR(5,"年");
+
+	private Integer code;
 
 
 	private String msg;
 	private String msg;
 
 
-	PeriodEnum(String msg) {
+	PeriodEnum(Integer code,String msg) {
+		this.code = code;
 		this.msg = msg;
 		this.msg = msg;
 	}
 	}
 
 
+	public void setCode(Integer code) {
+		this.code = code;
+	}
+
 	public String getMsg() {
 	public String getMsg() {
 		return msg;
 		return msg;
 	}
 	}
@@ -23,7 +30,7 @@ public enum PeriodEnum implements BaseEnum<String, PeriodEnum> {
 	}
 	}
 
 
 	@Override
 	@Override
-	public String getCode() {
-		return this.name();
+	public Integer getCode() {
+		return this.code;
 	}
 	}
 }
 }

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

@@ -12,4 +12,6 @@ public interface MusicGroupPaymentCalenderActivityService {
     * @date 2021/12/22 15:31
     * @date 2021/12/22 15:31
     */
     */
     void batchInsert(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender, Long calenderId);
     void batchInsert(MusicGroupPaymentBaseCalender musicGroupPaymentBaseCalender, Long calenderId);
+
+    void delByCalenderId(Long calenderId);
 }
 }

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

@@ -2,11 +2,16 @@ package com.ym.mec.biz.service;
 
 
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.enums.CalenderBaseServiceEnum;
 
 
 import java.math.BigDecimal;
 import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
 
 
 public interface MusicGroupPaymentCalenderBaseService {
 public interface MusicGroupPaymentCalenderBaseService {
 
 
+    Map<CalenderBaseServiceEnum,MusicGroupPaymentCalenderBaseService> calenderBaseServiceMap = new HashMap<>();
+
     /**
     /**
     * @description: 缴费项目组件
     * @description: 缴费项目组件
      * @param baseCalender
      * @param baseCalender
@@ -33,4 +38,6 @@ public interface MusicGroupPaymentCalenderBaseService {
     * @date 2021/12/21 23:35
     * @date 2021/12/21 23:35
     */
     */
     BigDecimal getActualAmount(MusicGroupPaymentBaseCalender baseCalender);
     BigDecimal getActualAmount(MusicGroupPaymentBaseCalender baseCalender);
+
+
 }
 }

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

@@ -1,15 +1,11 @@
 package com.ym.mec.biz.service.impl;
 package com.ym.mec.biz.service.impl;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.ActivityPlanDao;
 import com.ym.mec.biz.dal.dao.ActivityPlanDao;
 import com.ym.mec.biz.dal.dto.ActivityPlanAddDto;
 import com.ym.mec.biz.dal.dto.ActivityPlanAddDto;
 import com.ym.mec.biz.dal.dto.SalarySettlementDto;
 import com.ym.mec.biz.dal.dto.SalarySettlementDto;
 import com.ym.mec.biz.dal.dto.SalarySettlementTypeDto;
 import com.ym.mec.biz.dal.dto.SalarySettlementTypeDto;
 import com.ym.mec.biz.dal.entity.ActivityPlan;
 import com.ym.mec.biz.dal.entity.ActivityPlan;
-import com.ym.mec.biz.dal.entity.VipGroupActivity;
-import com.ym.mec.biz.event.source.EntityChangeEventSource;
 import com.ym.mec.biz.service.ActivityPlanService;
 import com.ym.mec.biz.service.ActivityPlanService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
@@ -20,16 +16,11 @@ import org.springframework.transaction.annotation.Transactional;
 
 
 import java.util.Objects;
 import java.util.Objects;
 
 
-import static com.ym.mec.biz.dal.enums.SalarySettlementTypeEnum.RATIO_DISCOUNT;
-import static com.ym.mec.biz.dal.enums.SalarySettlementTypeEnum.TEACHER_DEFAULT;
-
 @Service
 @Service
 public class ActivityPlanServiceImpl extends BaseServiceImpl<Integer, ActivityPlan>  implements ActivityPlanService {
 public class ActivityPlanServiceImpl extends BaseServiceImpl<Integer, ActivityPlan>  implements ActivityPlanService {
 	
 	
 	@Autowired
 	@Autowired
 	private ActivityPlanDao activityPlanDao;
 	private ActivityPlanDao activityPlanDao;
-//	@Autowired
-//	private SysUserFeignService sysUserFeignService;
 
 
 	@Override
 	@Override
 	public BaseDAO<Integer, ActivityPlan> getDAO() {
 	public BaseDAO<Integer, ActivityPlan> getDAO() {

+ 11 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CloudTeacherOrderServiceImpl.java

@@ -1,23 +1,26 @@
 package com.ym.mec.biz.service.impl;
 package com.ym.mec.biz.service.impl;
 
 
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.stream.Collectors;
-
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.ym.mec.biz.dal.dao.*;
+import com.ym.mec.biz.dal.dao.CloudTeacherDao;
+import com.ym.mec.biz.dal.dao.CloudTeacherOrderDao;
+import com.ym.mec.biz.dal.dao.SysConfigDao;
+import com.ym.mec.biz.dal.dto.CloudTeacherOrderDto;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
 import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
+import com.ym.mec.biz.dal.enums.PeriodEnum;
 import com.ym.mec.biz.dal.enums.TenantOrderRecordEnum;
 import com.ym.mec.biz.dal.enums.TenantOrderRecordEnum;
 import com.ym.mec.biz.dal.page.CloudTeacherOrderQueryInfo;
 import com.ym.mec.biz.dal.page.CloudTeacherOrderQueryInfo;
 import com.ym.mec.biz.service.*;
 import com.ym.mec.biz.service.*;
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.IdGeneratorService;
 import com.ym.mec.common.service.IdGeneratorService;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.yqpay.Msg;
 import com.ym.mec.thirdparty.yqpay.Msg;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.collection.MapUtil;
+import com.ym.mec.util.date.DateUtil;
 import org.joda.time.LocalDateTime;
 import org.joda.time.LocalDateTime;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
@@ -25,12 +28,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
-import com.ym.mec.biz.dal.dto.CloudTeacherOrderDto;
-import com.ym.mec.biz.dal.enums.PeriodEnum;
-import com.ym.mec.common.dal.BaseDAO;
-import com.ym.mec.common.exception.BizException;
-import com.ym.mec.common.service.impl.BaseServiceImpl;
-import com.ym.mec.util.date.DateUtil;
+import java.math.BigDecimal;
+import java.util.*;
 
 
 @Service
 @Service
 public class CloudTeacherOrderServiceImpl extends BaseServiceImpl<Long, CloudTeacherOrder> implements CloudTeacherOrderService {
 public class CloudTeacherOrderServiceImpl extends BaseServiceImpl<Long, CloudTeacherOrder> implements CloudTeacherOrderService {
@@ -38,8 +37,6 @@ public class CloudTeacherOrderServiceImpl extends BaseServiceImpl<Long, CloudTea
     @Autowired
     @Autowired
     private CloudTeacherOrderDao cloudTeacherOrderDao;
     private CloudTeacherOrderDao cloudTeacherOrderDao;
     @Autowired
     @Autowired
-    private CourseScheduleDao courseScheduleDao;
-    @Autowired
     private CloudTeacherDao cloudTeacherDao;
     private CloudTeacherDao cloudTeacherDao;
     @Autowired
     @Autowired
     private StudentService studentService;
     private StudentService studentService;

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

@@ -6,6 +6,7 @@ import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.entity.MemberFeeSetting;
 import com.ym.mec.biz.dal.entity.MemberFeeSetting;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.enums.CalenderBaseServiceEnum;
 import com.ym.mec.biz.dal.enums.PeriodEnum;
 import com.ym.mec.biz.dal.enums.PeriodEnum;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
@@ -18,12 +19,16 @@ import java.math.BigDecimal;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.NO;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.NO;
 
 
-@Service(value = "memberCalenderService")
+@Service
 public class MemberPaymentCalenderServiceImpl implements MusicGroupPaymentCalenderBaseService {
 public class MemberPaymentCalenderServiceImpl implements MusicGroupPaymentCalenderBaseService {
 
 
     @Autowired
     @Autowired
     private MemberFeeSettingDao memberFeeSettingDao;
     private MemberFeeSettingDao memberFeeSettingDao;
 
 
+    public MemberPaymentCalenderServiceImpl() {
+        MusicGroupPaymentCalenderBaseService.calenderBaseServiceMap.put(CalenderBaseServiceEnum.MEMBER,this);
+    }
+
     @Override
     @Override
     public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
     public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
 
 

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderActivityServiceImpl.java

@@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderActivityDao;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderActivity;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderActivity;
+import com.ym.mec.biz.dal.enums.CalenderBaseServiceEnum;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderActivityService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderActivityService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -15,6 +16,10 @@ import java.util.List;
 public class MusicGroupPaymentCalenderActivityServiceImpl extends ServiceImpl<MusicGroupPaymentCalenderActivityDao, MusicGroupPaymentCalenderActivity>
 public class MusicGroupPaymentCalenderActivityServiceImpl extends ServiceImpl<MusicGroupPaymentCalenderActivityDao, MusicGroupPaymentCalenderActivity>
         implements MusicGroupPaymentCalenderActivityService, MusicGroupPaymentCalenderBaseService {
         implements MusicGroupPaymentCalenderActivityService, MusicGroupPaymentCalenderBaseService {
 
 
+    public MusicGroupPaymentCalenderActivityServiceImpl() {
+        MusicGroupPaymentCalenderBaseService.calenderBaseServiceMap.put(CalenderBaseServiceEnum.ACTIVITY,this);
+    }
+
     @Override
     @Override
     public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
     public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
 
 
@@ -42,4 +47,9 @@ public class MusicGroupPaymentCalenderActivityServiceImpl extends ServiceImpl<Mu
             baseMapper.insertBatch(calenderActivityList);
             baseMapper.insertBatch(calenderActivityList);
         }
         }
     }
     }
+
+    @Override
+    public void delByCalenderId(Long calenderId) {
+        baseMapper.delByCalenderId(calenderId);
+    }
 }
 }

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

@@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.dao.MusicGroupPaymentStudentCourseDetailDao;
 import com.ym.mec.biz.dal.dao.OrganizationCourseUnitPriceSettingsDao;
 import com.ym.mec.biz.dal.dao.OrganizationCourseUnitPriceSettingsDao;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.entity.*;
+import com.ym.mec.biz.dal.enums.CalenderBaseServiceEnum;
 import com.ym.mec.biz.service.MusicGroupOrganizationCourseSettingsService;
 import com.ym.mec.biz.service.MusicGroupOrganizationCourseSettingsService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
@@ -39,6 +40,10 @@ public class MusicGroupPaymentCalenderCourseSettingsServiceImpl extends BaseServ
 	@Autowired
 	@Autowired
 	private MusicGroupOrganizationCourseSettingsService musicGroupOrganizationCourseSettingsService;
 	private MusicGroupOrganizationCourseSettingsService musicGroupOrganizationCourseSettingsService;
 
 
+	public MusicGroupPaymentCalenderCourseSettingsServiceImpl() {
+		MusicGroupPaymentCalenderBaseService.calenderBaseServiceMap.put(CalenderBaseServiceEnum.COURSE,this);
+	}
+
 	@Override
 	@Override
 	public BaseDAO<Integer, MusicGroupPaymentCalenderCourseSettings> getDAO() {
 	public BaseDAO<Integer, MusicGroupPaymentCalenderCourseSettings> getDAO() {
 		return musicGroupPaymentCalenderCourseSettingsDao;
 		return musicGroupPaymentCalenderCourseSettingsDao;
@@ -97,7 +102,7 @@ public class MusicGroupPaymentCalenderCourseSettingsServiceImpl extends BaseServ
 		return musicGroupPaymentCalenderCourseSettingsDao.queryCalenderCourseSettingsByBatchNo(batchNo);
 		return musicGroupPaymentCalenderCourseSettingsDao.queryCalenderCourseSettingsByBatchNo(batchNo);
 	}
 	}
 
 
-	@Override
+    @Override
 	public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
 	public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
 
 
 	}
 	}

+ 18 - 21
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderDetailServiceImpl.java

@@ -491,18 +491,18 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 			}
 			}
 			
 			
 			List<MusicGroupPaymentCalenderCourseSettings> courseSettingsList = musicGroupPaymentCalenderCourseSettingsDao.getWithPaymentCalender(musicGroupPaymentCalenderId);
 			List<MusicGroupPaymentCalenderCourseSettings> courseSettingsList = musicGroupPaymentCalenderCourseSettingsDao.getWithPaymentCalender(musicGroupPaymentCalenderId);
-			
-			BigDecimal expectAmount = BigDecimal.ZERO;
-			BigDecimal expectMemberAmount = musicGroupPaymentCalender.getMemberPaymentAmount();
-
-			if (musicGroupPaymentCalender.getPayUserType() == STUDENT) {
-				for (MusicGroupPaymentCalenderCourseSettings courseSettings : courseSettingsList) {
-					// 剔除可选课程
-					if (courseSettings.getIsStudentOptional() == false) {
-						expectAmount = expectAmount.add(courseSettings.getCourseCurrentPrice());
-					}
-				}
-			}
+//
+//			BigDecimal expectAmount = BigDecimal.ZERO;
+//			BigDecimal expectMemberAmount = musicGroupPaymentCalender.getMemberPaymentAmount();
+
+//			if (musicGroupPaymentCalender.getPayUserType() == STUDENT) {
+//				for (MusicGroupPaymentCalenderCourseSettings courseSettings : courseSettingsList) {
+//					// 剔除可选课程
+//					if (courseSettings.getIsStudentOptional() == false) {
+//						expectAmount = expectAmount.add(courseSettings.getCourseCurrentPrice());
+//					}
+//				}
+//			}
 			
 			
 			Date date = new Date();
 			Date date = new Date();
 			MusicGroupPaymentCalenderDetail musicGroupPaymentCalenderDetail = null;
 			MusicGroupPaymentCalenderDetail musicGroupPaymentCalenderDetail = null;
@@ -514,9 +514,9 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 				musicGroupPaymentCalenderDetail = new MusicGroupPaymentCalenderDetail();
 				musicGroupPaymentCalenderDetail = new MusicGroupPaymentCalenderDetail();
 				musicGroupPaymentCalenderDetail.setMusicGroupPaymentCalenderId(musicGroupPaymentCalenderId);
 				musicGroupPaymentCalenderDetail.setMusicGroupPaymentCalenderId(musicGroupPaymentCalenderId);
 				musicGroupPaymentCalenderDetail.setCreateTime(date);
 				musicGroupPaymentCalenderDetail.setCreateTime(date);
-				musicGroupPaymentCalenderDetail.setExpectAmount(expectAmount);
-				musicGroupPaymentCalenderDetail.setExpectMemberAmount(expectMemberAmount);
-				if (expectAmount.doubleValue() == 0d && expectMemberAmount.doubleValue() == 0d) {
+//				musicGroupPaymentCalenderDetail.setExpectAmount(musicGroupPaymentCalender.getPaymentAmount());
+//				musicGroupPaymentCalenderDetail.setExpectMemberAmount(musicGroupPaymentCalender.getMemberPaymentAmount());
+				if (musicGroupPaymentCalender.getPaymentAmount().compareTo(BigDecimal.ZERO) == 0) {
 					musicGroupPaymentCalenderDetail.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
 					musicGroupPaymentCalenderDetail.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
 				} else {
 				} else {
 					musicGroupPaymentCalenderDetail.setPaymentStatus(PaymentStatus.NON_PAYMENT);
 					musicGroupPaymentCalenderDetail.setPaymentStatus(PaymentStatus.NON_PAYMENT);
@@ -528,19 +528,16 @@ public class MusicGroupPaymentCalenderDetailServiceImpl extends BaseServiceImpl<
 				musicGroupPaymentCalenderDetail.setResponsibleUserId(musicGroupPaymentCalender.getOperator());
 				musicGroupPaymentCalenderDetail.setResponsibleUserId(musicGroupPaymentCalender.getOperator());
 				
 				
 				musicGroupPaymentCalenderDetailList.add(musicGroupPaymentCalenderDetail);
 				musicGroupPaymentCalenderDetailList.add(musicGroupPaymentCalenderDetail);
-				if (expectAmount.doubleValue() == 0d && expectMemberAmount.doubleValue() == 0d) {
+				if (musicGroupPaymentCalender.getPaymentAmount().compareTo(BigDecimal.ZERO) == 0) {
 					// 添加会员有效时长
 					// 添加会员有效时长
 					if(musicGroupPaymentCalender.getMemberRankSettingId() != null){
 					if(musicGroupPaymentCalender.getMemberRankSettingId() != null){
 						CloudTeacherOrder cloudTeacherOrder = new CloudTeacherOrder();
 						CloudTeacherOrder cloudTeacherOrder = new CloudTeacherOrder();
 						cloudTeacherOrder.setOrganId(musicGroup.getOrganId());
 						cloudTeacherOrder.setOrganId(musicGroup.getOrganId());
-						cloudTeacherOrder.setType(2);
+						cloudTeacherOrder.setType(musicGroupPaymentCalender.getMemberPeriod());
 						cloudTeacherOrder.setTime(musicGroupPaymentCalender.getMemberValidDate());
 						cloudTeacherOrder.setTime(musicGroupPaymentCalender.getMemberValidDate());
-						cloudTeacherOrder.setAmount(expectMemberAmount);
+						cloudTeacherOrder.setAmount(BigDecimal.ZERO);
 						cloudTeacherOrder.setStudentId(studentId);
 						cloudTeacherOrder.setStudentId(studentId);
 						cloudTeacherOrder.setLevel(musicGroupPaymentCalender.getMemberRankSettingId());
 						cloudTeacherOrder.setLevel(musicGroupPaymentCalender.getMemberRankSettingId());
-						cloudTeacherOrder.setStatus(2);
-						cloudTeacherOrder.setStartTime(date);
-						cloudTeacherOrder.setEndTime(DateUtil.addMonths(date,musicGroupPaymentCalender.getMemberValidDate()));
 						cloudTeacherOrder.setRemark("缴费项目0元新增学员");
 						cloudTeacherOrder.setRemark("缴费项目0元新增学员");
 						cloudTeacherOrder.setMusicGroupId(musicGroupId);
 						cloudTeacherOrder.setMusicGroupId(musicGroupId);
 						cloudTeacherOrderDao.insert(cloudTeacherOrder);
 						cloudTeacherOrderDao.insert(cloudTeacherOrder);

+ 18 - 26
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -13,6 +13,7 @@ import static com.ym.mec.biz.dal.enums.PaymentStatusEnum.YES;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.*;
 import java.util.*;
 import java.util.Map.Entry;
 import java.util.Map.Entry;
+import java.util.function.Consumer;
 import java.util.stream.Collectors;
 import java.util.stream.Collectors;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
@@ -68,8 +69,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 	@Autowired
 	@Autowired
 	private MusicGroupOrganizationCourseSettingsDetailDao musicGroupOrganizationCourseSettingsDetailDao;
 	private MusicGroupOrganizationCourseSettingsDetailDao musicGroupOrganizationCourseSettingsDetailDao;
 	@Autowired
 	@Autowired
-	private MusicGroupOrganizationCourseSettingsService musicGroupOrganizationCourseSettingsService;
-	@Autowired
 	private OrganizationCourseUnitPriceSettingsDao organizationCourseUnitPriceSettingsDao;
 	private OrganizationCourseUnitPriceSettingsDao organizationCourseUnitPriceSettingsDao;
 	@Autowired
 	@Autowired
 	private MusicGroupPaymentStudentCourseDetailDao musicGroupPaymentStudentCourseDetailDao;
 	private MusicGroupPaymentStudentCourseDetailDao musicGroupPaymentStudentCourseDetailDao;
@@ -129,10 +128,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 	private CloudTeacherOrderDao cloudTeacherOrderDao;
 	private CloudTeacherOrderDao cloudTeacherOrderDao;
 	@Autowired
 	@Autowired
 	private MusicGroupPaymentCalenderActivityService musicGroupPaymentCalenderActivityService;
 	private MusicGroupPaymentCalenderActivityService musicGroupPaymentCalenderActivityService;
-	@Resource(name = "musicRepairService")
-	private MusicGroupPaymentCalenderBaseService musicRepairService;
-	@Resource(name = "memberCalenderService")
-	private MusicGroupPaymentCalenderBaseService memberCalenderService;
 
 
 	@Override
 	@Override
 	public BaseDAO<Long, MusicGroupPaymentCalender> getDAO() {
 	public BaseDAO<Long, MusicGroupPaymentCalender> getDAO() {
@@ -566,24 +561,29 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 
 
 		PaymentCalenderStatusEnum status = PaymentCalenderStatusEnum.NO;
 		PaymentCalenderStatusEnum status = PaymentCalenderStatusEnum.NO;
 
 
-		Date date = new Date();
-		String batchNo = idGeneratorService.generatorId() + "";
-
-		BigDecimal originalMemberPaymentAmount = BigDecimal.ZERO;
+		//检测缴费项目是否有费用变更
+		Map<CalenderBaseServiceEnum, MusicGroupPaymentCalenderBaseService> calenderBaseServiceMap = MusicGroupPaymentCalenderBaseService.calenderBaseServiceMap;
 		if (musicGroupPaymentBaseCalender.getPayUserType() == SCHOOL) {
 		if (musicGroupPaymentBaseCalender.getPayUserType() == SCHOOL) {
 			status = AUDITING;
 			status = AUDITING;
 		} else {
 		} else {
-			status = memberCalenderService.checkComponentAmount(musicGroupPaymentBaseCalender);
+			status = calenderBaseServiceMap.get(CalenderBaseServiceEnum.MEMBER).checkComponentAmount(musicGroupPaymentBaseCalender);
 			if(status != AUDITING){
 			if(status != AUDITING){
-				status = ((MusicGroupPaymentCalenderCourseSettingsServiceImpl)musicGroupPaymentCalenderCourseSettingsService).checkComponentAmount(musicGroupPaymentBaseCalender);
+				status = calenderBaseServiceMap.get(CalenderBaseServiceEnum.COURSE).checkComponentAmount(musicGroupPaymentBaseCalender);
 			}
 			}
 			if(status != AUDITING){
 			if(status != AUDITING){
-				status = musicRepairService.checkComponentAmount(musicGroupPaymentBaseCalender);
+				status = calenderBaseServiceMap.get(CalenderBaseServiceEnum.MUSIC_REPAIR).checkComponentAmount(musicGroupPaymentBaseCalender);
 			}
 			}
 		}
 		}
+		//计算缴费项目总金额
+		BigDecimal totalPaymentAmount = BigDecimal.ZERO;
+		totalPaymentAmount = totalPaymentAmount.add(calenderBaseServiceMap.get(CalenderBaseServiceEnum.MEMBER).getActualAmount(musicGroupPaymentBaseCalender));
+		totalPaymentAmount = totalPaymentAmount.add(((MusicGroupPaymentCalenderCourseSettingsServiceImpl)musicGroupPaymentCalenderCourseSettingsService).getActualAmount(musicGroupPaymentBaseCalender));
+		totalPaymentAmount = totalPaymentAmount.add(calenderBaseServiceMap.get(CalenderBaseServiceEnum.MUSIC_REPAIR).getActualAmount(musicGroupPaymentBaseCalender));
+		totalPaymentAmount = totalPaymentAmount.add(calenderBaseServiceMap.get(CalenderBaseServiceEnum.ACTIVITY).getActualAmount(musicGroupPaymentBaseCalender));
+
+		Date date = new Date();
 
 
 		MusicGroupPaymentCalender musicGroupPaymentCalender = new MusicGroupPaymentCalender();
 		MusicGroupPaymentCalender musicGroupPaymentCalender = new MusicGroupPaymentCalender();
-		musicGroupPaymentCalender.setOriginalMemberPaymentAmount(originalMemberPaymentAmount);
 		musicGroupPaymentCalender.setDeadlinePaymentDate(musicGroupPaymentBaseCalender.getDeadlinePaymentDate());
 		musicGroupPaymentCalender.setDeadlinePaymentDate(musicGroupPaymentBaseCalender.getDeadlinePaymentDate());
 		musicGroupPaymentCalender.setMemo(musicGroupPaymentBaseCalender.getMemo());
 		musicGroupPaymentCalender.setMemo(musicGroupPaymentBaseCalender.getMemo());
 		musicGroupPaymentCalender.setMusicGroupId(musicGroupId);
 		musicGroupPaymentCalender.setMusicGroupId(musicGroupId);
@@ -593,14 +593,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		musicGroupPaymentCalender.setOperator(sysUser.getId());
 		musicGroupPaymentCalender.setOperator(sysUser.getId());
 		musicGroupPaymentCalender.setCreateTime(date);
 		musicGroupPaymentCalender.setCreateTime(date);
 		musicGroupPaymentCalender.setUpdateTime(date);
 		musicGroupPaymentCalender.setUpdateTime(date);
-		musicGroupPaymentCalender.setStatus(status);
 		musicGroupPaymentCalender.setPaymentType(musicGroupPaymentBaseCalender.getPaymentType());
 		musicGroupPaymentCalender.setPaymentType(musicGroupPaymentBaseCalender.getPaymentType());
-
-		BigDecimal totalPaymentAmount = BigDecimal.ZERO;
-		totalPaymentAmount = totalPaymentAmount.add(memberCalenderService.getActualAmount(musicGroupPaymentBaseCalender));
-		totalPaymentAmount = totalPaymentAmount.add(((MusicGroupPaymentCalenderCourseSettingsServiceImpl)musicGroupPaymentCalenderCourseSettingsService).getActualAmount(musicGroupPaymentBaseCalender));
-		totalPaymentAmount = totalPaymentAmount.add(musicRepairService.getActualAmount(musicGroupPaymentBaseCalender));
-		totalPaymentAmount = totalPaymentAmount.add(((MusicGroupPaymentCalenderActivityServiceImpl)musicGroupPaymentCalenderActivityService).getActualAmount(musicGroupPaymentBaseCalender));
 		musicGroupPaymentCalender.setPaymentAmount(totalPaymentAmount);
 		musicGroupPaymentCalender.setPaymentAmount(totalPaymentAmount);
 
 
 		//会员缴费信息
 		//会员缴费信息
@@ -612,6 +605,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			musicGroupPaymentCalender.setMemberValidDate(calenderMember.getMemberNum());
 			musicGroupPaymentCalender.setMemberValidDate(calenderMember.getMemberNum());
 			musicGroupPaymentCalender.setMemberPeriod(calenderMember.getPeriodEnum());
 			musicGroupPaymentCalender.setMemberPeriod(calenderMember.getPeriodEnum());
 			musicGroupPaymentCalender.setMemberOptionalFlag(calenderMember.getOptionalFlag());
 			musicGroupPaymentCalender.setMemberOptionalFlag(calenderMember.getOptionalFlag());
+			musicGroupPaymentCalender.setOriginalMemberPaymentAmount(calenderMember.getOriginalAmount());
 		}
 		}
 		//乐保缴费信息
 		//乐保缴费信息
 		MusicRepairDto musicRepair = musicGroupPaymentBaseCalender.getMusicRepair();
 		MusicRepairDto musicRepair = musicGroupPaymentBaseCalender.getMusicRepair();
@@ -620,6 +614,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 			musicGroupPaymentCalender.setMusicRepairActualPrice(musicRepair.getActualAmount());
 			musicGroupPaymentCalender.setMusicRepairActualPrice(musicRepair.getActualAmount());
 			musicGroupPaymentCalender.setMusicRepairOptionalFlag(musicRepair.getOptionalFlag());
 			musicGroupPaymentCalender.setMusicRepairOptionalFlag(musicRepair.getOptionalFlag());
 		}
 		}
+		musicGroupPaymentCalender.setStatus(status);
 
 
 //		BigDecimal totalPaymentAmount = musicGroupPaymentCalenderDto.getMasterTotalPrice();
 //		BigDecimal totalPaymentAmount = musicGroupPaymentCalenderDto.getMasterTotalPrice();
 //		if(musicGroupPaymentCalenderCourseSettingsList != null){
 //		if(musicGroupPaymentCalenderCourseSettingsList != null){
@@ -663,6 +658,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		}
 		}
 
 
 		// 设置批次号
 		// 设置批次号
+		String batchNo = idGeneratorService.generatorId() + "";
 		musicGroupPaymentCalender.setBatchNo(batchNo);
 		musicGroupPaymentCalender.setBatchNo(batchNo);
 		musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
 		musicGroupPaymentCalenderDao.insert(musicGroupPaymentCalender);
 
 
@@ -1711,10 +1707,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		if (musicGroupPaymentCalenderDetailList != null && musicGroupPaymentCalenderDetailList.size() > 0) {
 		if (musicGroupPaymentCalenderDetailList != null && musicGroupPaymentCalenderDetailList.size() > 0) {
 			throw new BizException("缴费项目中已存在学员,不能删除");
 			throw new BizException("缴费项目中已存在学员,不能删除");
 		}
 		}
-//		if (calender.getStatus() != PaymentCalenderStatusEnum.AUDITING && calender.getStatus() != PaymentCalenderStatusEnum.NO
-//				&& calender.getStatus() != PaymentCalenderStatusEnum.REJECT && calender.getStatus() != DRAFT) {
-//			throw new BizException("删除失败,{} 的缴费项目不允许删除",calender.getStatus().getDesc());
-//		}
 		MusicGroupStudentClassAdjust byBatchNo = musicGroupStudentClassAdjustDao.findByBatchNo(calender.getBatchNo());
 		MusicGroupStudentClassAdjust byBatchNo = musicGroupStudentClassAdjustDao.findByBatchNo(calender.getBatchNo());
 		if(byBatchNo != null){
 		if(byBatchNo != null){
 			throw new BizException("删除失败,班级调整的缴费项目不允许删除");
 			throw new BizException("删除失败,班级调整的缴费项目不允许删除");
@@ -1732,7 +1724,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		musicGroupPaymentCalenderDao.delete(id);
 		musicGroupPaymentCalenderDao.delete(id);
 		musicGroupPaymentCalenderDetailDao.deleteByCalenderId(id);
 		musicGroupPaymentCalenderDetailDao.deleteByCalenderId(id);
 		musicGroupPaymentStudentCourseDetailDao.deleteByMusicGroupPaymentCalenderId(id);
 		musicGroupPaymentStudentCourseDetailDao.deleteByMusicGroupPaymentCalenderId(id);
-		
+		musicGroupPaymentCalenderActivityService.delByCalenderId(id);
 		List<Long> calenderIds = new ArrayList<Long>();
 		List<Long> calenderIds = new ArrayList<Long>();
 		calenderIds.add(id);
 		calenderIds.add(id);
 		musicGroupPaymentCalenderCourseSettingsService.deleteByMusicGroupPaymentCalenderId(calenderIds);
 		musicGroupPaymentCalenderCourseSettingsService.deleteByMusicGroupPaymentCalenderId(calenderIds);

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

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service.impl;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.dto.MusicGroupPaymentBaseCalender;
 import com.ym.mec.biz.dal.dto.MusicRepairDto;
 import com.ym.mec.biz.dal.dto.MusicRepairDto;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.enums.CalenderBaseServiceEnum;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.biz.service.MusicGroupPaymentCalenderBaseService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysTenantConfigService;
 import com.ym.mec.biz.service.SysTenantConfigService;
@@ -17,12 +18,16 @@ import java.math.BigDecimal;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.NO;
 import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.NO;
 
 
-@Service(value = "musicRepairService")
+@Service
 public class MusicRepairPaymentCalenderServiceImpl implements MusicGroupPaymentCalenderBaseService {
 public class MusicRepairPaymentCalenderServiceImpl implements MusicGroupPaymentCalenderBaseService {
 
 
     @Autowired
     @Autowired
     private SysTenantConfigService sysTenantConfigService;
     private SysTenantConfigService sysTenantConfigService;
 
 
+    public MusicRepairPaymentCalenderServiceImpl() {
+        MusicGroupPaymentCalenderBaseService.calenderBaseServiceMap.put(CalenderBaseServiceEnum.MUSIC_REPAIR,this);
+    }
+
     @Override
     @Override
     public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
     public void createComponent(MusicGroupPaymentBaseCalender baseCalender) {
 
 

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderActivityDao.xml

@@ -24,4 +24,7 @@
       #{entity.originalAmount}, NOW(), NOW())
       #{entity.originalAmount}, NOW(), NOW())
     </foreach>
     </foreach>
   </insert>
   </insert>
+  <delete id="delByCalenderId">
+    DELETE FROM music_group_payment_calender_activity WHERE calender_id_ = #{calenderId}
+  </delete>
 </mapper>
 </mapper>