|
@@ -4,10 +4,7 @@ import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType.SC
|
|
|
import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType.STUDENT;
|
|
|
import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.AUDITING;
|
|
|
import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum.REJECT;
|
|
|
-import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.ADD_COURSE;
|
|
|
-import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.ADD_STUDENT;
|
|
|
-import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.MUSIC_APPLY;
|
|
|
-import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.MUSIC_RENEW;
|
|
|
+import static com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
@@ -23,6 +20,9 @@ import java.util.Map.Entry;
|
|
|
import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dao.*;
|
|
|
+import com.ym.mec.biz.dal.dto.*;
|
|
|
+import com.ym.mec.biz.dal.entity.*;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -34,50 +34,12 @@ 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.auth.api.entity.SysUserRole;
|
|
|
-import com.ym.mec.biz.dal.dao.ClassGroupDao;
|
|
|
-import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
|
|
|
-import com.ym.mec.biz.dal.dao.CourseScheduleDao;
|
|
|
-import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
|
|
|
-import com.ym.mec.biz.dal.dao.CourseScheduleTeacherSalaryDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupBuildLogDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupOrganizationCourseSettingsDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupOrganizationCourseSettingsDetailDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderCourseSettingsDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentStudentCourseDetailDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupStudentClassAdjustDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
|
|
|
-import com.ym.mec.biz.dal.dao.OrganizationCourseUnitPriceSettingsDao;
|
|
|
-import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SysConfigDao;
|
|
|
-import com.ym.mec.biz.dal.dao.TeacherAttendanceDao;
|
|
|
-import com.ym.mec.biz.dal.dto.CalenderPushDto;
|
|
|
-import com.ym.mec.biz.dal.dto.ClassGroup4MixDto;
|
|
|
-import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderAuditDetailDto;
|
|
|
-import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderAuditDto;
|
|
|
-import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderDto;
|
|
|
import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderDto.MusicGroupPaymentDateRange;
|
|
|
-import com.ym.mec.biz.dal.entity.ClassGroup;
|
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroup;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupBuildLog;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettings;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupOrganizationCourseSettingsDetail;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupPaymentStudentCourseDetail;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupStudentClassAdjust;
|
|
|
-import com.ym.mec.biz.dal.entity.MusicGroupStudentFee;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
|
|
|
-import com.ym.mec.biz.dal.entity.Organization;
|
|
|
-import com.ym.mec.biz.dal.entity.OrganizationCourseUnitPriceSettings;
|
|
|
import com.ym.mec.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.MusicGroupStatusEnum;
|
|
|
import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
|
|
@@ -140,9 +102,6 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
@Autowired
|
|
|
private TeacherAttendanceDao teacherAttendanceDao;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
|
@Autowired
|
|
|
private MusicGroupBuildLogDao musicGroupBuildLogDao;
|
|
|
@Autowired
|
|
@@ -150,19 +109,17 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
@Autowired
|
|
|
private OrganizationDao organizationDao;
|
|
|
@Autowired
|
|
|
- private StudentRegistrationDao studentRegistrationDao;
|
|
|
- @Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
@Autowired
|
|
|
- private CourseScheduleStudentPaymentServiceImpl courseScheduleStudentPaymentService;
|
|
|
- @Autowired
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
|
@Autowired
|
|
|
private MusicGroupStudentClassAdjustDao musicGroupStudentClassAdjustDao;
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentCalenderDetailService musicGroupPaymentCalenderDetailService;
|
|
|
+ @Autowired
|
|
|
+ private MusicGroupPaymentCalenderStudentDetailDao musicGroupPaymentCalenderStudentDetailDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, MusicGroupPaymentCalender> getDAO() {
|
|
@@ -366,7 +323,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
if (musicGroupPaymentCalender.getDeadlinePaymentDate() == null && payUserType == PayUserType.STUDENT) {
|
|
|
musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
|
|
|
}
|
|
|
- if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE) {
|
|
|
+ if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE && paymentType != SPAN_GROUP_CLASS_ADJUST) {
|
|
|
int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
if (count > 0) {
|
|
@@ -411,11 +368,20 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
}
|
|
|
musicGroupPaymentCalenderCourseSettingsDao.batchInsert(currentMusicGroupPaymentCalenderCourseSettings);
|
|
|
}
|
|
|
-
|
|
|
+ //如果是跨团班级合并,保存用户缴费详情
|
|
|
+ List<MusicGroupPaymentCalenderStudentDetail> musicGroupPaymentCalenderStudentDetails = null;
|
|
|
+ if (musicGroupPaymentCalender.getPaymentType() == SPAN_GROUP_CLASS_ADJUST){
|
|
|
+ musicGroupPaymentCalenderStudentDetails = musicGroupPaymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
|
|
|
+ //记录学员缴费详情
|
|
|
+ musicGroupPaymentCalenderStudentDetailDao.batchInsert(musicGroupPaymentCalenderStudentDetails,musicGroupPaymentCalender.getId());
|
|
|
+ }
|
|
|
if (musicGroupPaymentCalender.getStatus() != AUDITING) {
|
|
|
// 如果是进行中加学生
|
|
|
if (musicGroupPaymentCalender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
addStudent(musicGroupPaymentCalender, currentMusicGroupPaymentCalenderCourseSettings);
|
|
|
+ }else if(musicGroupPaymentCalender.getPaymentType() == SPAN_GROUP_CLASS_ADJUST){
|
|
|
+ //如果是跨团班级合并,添加学员
|
|
|
+ musicGroupPaymentCalenderDetailService.batchAdd(musicGroupPaymentCalender,musicGroupPaymentCalenderStudentDetails);
|
|
|
}else if(musicGroupPaymentCalenderDto.getMergeClassFlag()){
|
|
|
//缴费项目添加学员
|
|
|
int[] ints = Arrays.stream(musicGroupPaymentCalenderDto.getStudentIds().split(",")).mapToInt(Integer::parseInt).toArray();
|
|
@@ -673,7 +639,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
if (musicGroupPaymentCalender.getDeadlinePaymentDate() == null && payUserType == PayUserType.STUDENT) {
|
|
|
musicGroupPaymentCalender.setDeadlinePaymentDate(DateUtil.addDays(musicGroupPaymentCalender.getStartPaymentDate(), 3));
|
|
|
}
|
|
|
- if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE) {
|
|
|
+ if (paymentType != ADD_STUDENT && paymentType != ADD_COURSE && paymentType != SPAN_GROUP_CLASS_ADJUST) {
|
|
|
int count = musicGroupPaymentCalenderDao.queryIntersectionByValidDate(musicGroupId, musicGroupPaymentCalender.getPayUserType(),
|
|
|
musicGroupPaymentCalender.getPaymentValidStartDate(), musicGroupPaymentCalender.getPaymentValidEndDate(), null);
|
|
|
if (count > 0) {
|