|
@@ -82,10 +82,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
private MusicGroupDao musicGroupDao;
|
|
|
@Autowired
|
|
|
private TeacherDao teacherDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private MusicGroupDeliveryRecordDao musicGroupDeliveryRecordDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private StudentService studentService;
|
|
|
@Autowired
|
|
@@ -93,16 +91,12 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
@Autowired
|
|
|
private SchoolDao schoolDao;
|
|
|
@Autowired
|
|
|
- private MusicGroupPaymentCalenderDao musicGroupPaymentCalenderDao;
|
|
|
- @Autowired
|
|
|
private MusicGroupPaymentCalenderMemberDao musicGroupPaymentCalenderMemberDao;
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentCalenderService musicGroupPaymentCalenderService;
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentEntitiesDao musicGroupPaymentEntitiesDao;
|
|
|
@Autowired
|
|
|
- private MusicGroupSubjectGoodsGroupDao musicGroupSubjectGoodsGroupDao;
|
|
|
- @Autowired
|
|
|
private MusicGroupSubjectPlanDao musicGroupSubjectPlanDao;
|
|
|
@Autowired
|
|
|
private StudentTeacherMapperDao studentTeacherMapperDao;
|
|
@@ -241,6 +235,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
return musicGroupDao;
|
|
|
}
|
|
|
|
|
|
+ public MusicGroupDao getDao() {
|
|
|
+ return musicGroupDao;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean importStudentToMusicGroup(String musicGroupId, Map<String, List<Map<String, Object>>> excelData) {
|
|
@@ -317,7 +315,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
|
|
|
//查询课程费用是否是0
|
|
|
- MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
+ MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderService.getDao().findByMusicGroupRegCalender(musicGroupId);
|
|
|
if(musicGroupPaymentCalender == null){
|
|
|
throw new BizException("请先创建乐团报名缴费");
|
|
|
}
|
|
@@ -429,7 +427,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
}
|
|
|
musicGroupPaymentCalender.setUpdateTime(nowDate);
|
|
|
- musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(musicGroupPaymentCalender);
|
|
|
|
|
|
MusicGroupPaymentCalenderDetail musicGroupPaymentCalenderDetail = null;
|
|
|
List<MusicGroupPaymentCalenderDetail> insertMusicGroupPaymentCalenderDetailList = new ArrayList<MusicGroupPaymentCalenderDetail>();
|
|
@@ -628,7 +626,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
calender.setExpectNum(calender.getExpectNum() + allList.size());
|
|
|
}
|
|
|
calender.setUpdateTime(now);
|
|
|
- musicGroupPaymentCalenderDao.update(calender);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(calender);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -742,7 +740,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroupSubjectGoodsGroup.setGroupRemissionCourseFee(0);
|
|
|
}
|
|
|
}
|
|
|
- musicGroupSubjectGoodsGroupDao.batchInsert(musicGroupSubjectGoodsGroups, musicGroupId);
|
|
|
+ musicGroupSubjectGoodsGroupService.getDao().batchInsert(musicGroupSubjectGoodsGroups, musicGroupId);
|
|
|
}
|
|
|
return musicGroupId;
|
|
|
}
|
|
@@ -833,11 +831,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroup.getId(), "预报名完成(预报名 -> 报名缴费中)", sysUser.getId(), ""));
|
|
|
|
|
|
studentRegistrationDao.musicGroupOpenPay(musicGroupId, PaymentStatusEnum.OPEN);
|
|
|
- MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
+ MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderService.getDao().findByMusicGroupRegCalender(musicGroupId);
|
|
|
if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
|
regCalender.setUpdateTime(new Date());
|
|
|
- musicGroupPaymentCalenderDao.update(regCalender);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(regCalender);
|
|
|
}
|
|
|
//三方乐团不发送缴费通知
|
|
|
if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
@@ -1006,7 +1004,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
public HttpResponseResult renew(RegisterPayDto renewParamDto) throws Exception {
|
|
|
Long calenderId = renewParamDto.getCalenderId();
|
|
|
Integer userId = renewParamDto.getUserId();
|
|
|
- MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.get(calenderId);
|
|
|
+ MusicGroupPaymentCalender calender = musicGroupPaymentCalenderService.getDao().get(calenderId);
|
|
|
StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, calender.getMusicGroupId());
|
|
|
if (studentRegistration == null) {
|
|
|
throw new BizException("请走报名缴费流程");
|
|
@@ -1139,7 +1137,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
Map<String, List<MusicGroupPaymentImportDto>> dtoMap = importDtos.stream().collect(Collectors.groupingBy(e -> e.getBatchNo()));
|
|
|
Date now = new Date();
|
|
|
for (String batchNo : dtoMap.keySet()) {
|
|
|
- List<MusicGroupPaymentCalender> byBatchNo = musicGroupPaymentCalenderDao.findByBatchNo(batchNo);
|
|
|
+ List<MusicGroupPaymentCalender> byBatchNo = musicGroupPaymentCalenderService.getDao().findByBatchNo(batchNo);
|
|
|
if(CollectionUtils.isEmpty(byBatchNo)){
|
|
|
throw new BizException("缴费项目批次{}不存在",batchNo);
|
|
|
}
|
|
@@ -1344,7 +1342,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (studentRegistration == null) {
|
|
|
throw new BizException("报名信息有误,请核查");
|
|
|
}
|
|
|
- MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(studentRegistration.getMusicGroupId());
|
|
|
+ MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderService.getDao().findByMusicGroupRegCalender(studentRegistration.getMusicGroupId());
|
|
|
if (musicGroupRegCalender == null) {
|
|
|
throw new BizException("缴费信息不存在");
|
|
|
}
|
|
@@ -1543,7 +1541,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
//删除原有的乐团声部规划
|
|
|
musicGroupSubjectPlanDao.delByMusicGroupId(musicGroupId);
|
|
|
//删除原有的声部商品组合
|
|
|
- musicGroupSubjectGoodsGroupDao.delByMusicGroupId(subFeeSettingDto.getMusicGroupId());
|
|
|
+ musicGroupSubjectGoodsGroupService.getDao().delByMusicGroupId(subFeeSettingDto.getMusicGroupId());
|
|
|
if (musicGroupSubjectPlans != null && musicGroupSubjectPlans.size() > 0) {
|
|
|
musicGroupSubjectPlans.forEach(e -> {
|
|
|
//修改课程费用
|
|
@@ -1576,7 +1574,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- musicGroupSubjectGoodsGroupDao.batchInsert(subFeeSettingDto.getMusicGroupSubjectGoodsGroups(), musicGroupId);
|
|
|
+ musicGroupSubjectGoodsGroupService.getDao().batchInsert(subFeeSettingDto.getMusicGroupSubjectGoodsGroups(), musicGroupId);
|
|
|
}
|
|
|
sendSeoMessageSource.sendSeoMessage(musicGroup.getOrganId(), new SysUserRoleEnum[]{ORGAN_MANAGER},
|
|
|
null, null, MessageTypeEnum.BACKSTAGE_CREATE_MUSIC_GROUP_APPLY, sysUser.getRealName(), musicGroup.getName());
|
|
@@ -1705,7 +1703,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
List<PaymentCalenderStatusEnum> statusList = new ArrayList<MusicGroupPaymentCalender.PaymentCalenderStatusEnum>();
|
|
|
statusList.add(PaymentCalenderStatusEnum.DRAFT);
|
|
|
//修改乐团报名缴费项目状态
|
|
|
- List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderService.getDao().queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
|
|
|
if(musicGroupPaymentCalenderList == null || musicGroupPaymentCalenderList.size() == 0) {
|
|
|
throw new BizException("请先创建缴费项目");
|
|
@@ -1716,7 +1714,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
t.setUpdateTime(date);
|
|
|
});
|
|
|
|
|
|
- musicGroupPaymentCalenderDao.batchUpdate(musicGroupPaymentCalenderList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().batchUpdate(musicGroupPaymentCalenderList);
|
|
|
|
|
|
sendSeoMessageSource.sendSeoMessage(musicGroup.getOrganId(), new SysUserRoleEnum[]{ORGAN_MANAGER},
|
|
|
null, null, MessageTypeEnum.BACKSTAGE_CREATE_MUSIC_GROUP_APPLY, sysUser.getRealName(), musicGroup.getName());
|
|
@@ -1750,21 +1748,21 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
List<PaymentCalenderStatusEnum> statusList = new ArrayList<MusicGroupPaymentCalender.PaymentCalenderStatusEnum>();
|
|
|
statusList.add(PaymentCalenderStatusEnum.AUDITING);
|
|
|
//修改乐团报名缴费项目状态
|
|
|
- List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderService.getDao().queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
|
|
|
musicGroupPaymentCalenderList.forEach(t -> {
|
|
|
t.setStatus(PaymentCalenderStatusEnum.DRAFT);
|
|
|
t.setUpdateTime(date);
|
|
|
});
|
|
|
|
|
|
- musicGroupPaymentCalenderDao.batchUpdate(musicGroupPaymentCalenderList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().batchUpdate(musicGroupPaymentCalenderList);
|
|
|
|
|
|
}else if(musicGroup.getStatus() == MusicGroupStatusEnum.FEE_AUDIT){
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "乐团审核失败(费用审核中 -> 费用审核失败)", sysUser.getId(), memo));
|
|
|
List<PaymentCalenderStatusEnum> statusList = new ArrayList<MusicGroupPaymentCalender.PaymentCalenderStatusEnum>();
|
|
|
statusList.add(PaymentCalenderStatusEnum.AUDITING);
|
|
|
//修改乐团报名缴费项目状态
|
|
|
- List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderService.getDao().queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
|
|
|
musicGroupPaymentCalenderList.forEach(t -> {
|
|
|
t.setStatus(PaymentCalenderStatusEnum.REJECT);
|
|
@@ -1772,7 +1770,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
t.setMemo(memo);
|
|
|
});
|
|
|
|
|
|
- musicGroupPaymentCalenderDao.batchUpdate(musicGroupPaymentCalenderList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().batchUpdate(musicGroupPaymentCalenderList);
|
|
|
|
|
|
//修改乐团状态
|
|
|
musicGroup.setStatus(MusicGroupStatusEnum.FEE_AUDIT_FAILED);
|
|
@@ -1811,7 +1809,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
List<PaymentCalenderStatusEnum> statusList = new ArrayList<MusicGroupPaymentCalender.PaymentCalenderStatusEnum>();
|
|
|
statusList.add(PaymentCalenderStatusEnum.AUDITING);
|
|
|
//修改乐团报名缴费项目状态
|
|
|
- List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderService.getDao().queryByPaymentStatus(musicGroupId, statusList, null);
|
|
|
|
|
|
if(musicGroupPaymentCalenderList == null || musicGroupPaymentCalenderList.size() == 0){
|
|
|
throw new BizException("没有审核中的缴费项目");
|
|
@@ -1834,7 +1832,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
t.setUpdateTime(date);
|
|
|
});
|
|
|
|
|
|
- musicGroupPaymentCalenderDao.batchUpdate(musicGroupPaymentCalenderList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().batchUpdate(musicGroupPaymentCalenderList);
|
|
|
}
|
|
|
musicGroup.setUpdateTime(date);
|
|
|
musicGroupDao.update(musicGroup);
|
|
@@ -1909,7 +1907,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
public List<MusicCardDto> queryUserMusicGroups(Integer userId) {
|
|
|
List<MusicCardDto> musicCardDtos = musicGroupDao.queryUserMusicGroups(userId);
|
|
|
Set<String> musicGroupIds = musicCardDtos.stream().map(MusicCardDto::getMusicGroupId).collect(Collectors.toSet());
|
|
|
- Map<String, String> paymentStatus = MapUtil.convertMybatisMap(musicGroupPaymentCalenderDao.queryUserPaymentStatus(userId, StringUtils.join(musicGroupIds, ",")));
|
|
|
+ Map<String, String> paymentStatus = MapUtil.convertMybatisMap(musicGroupPaymentCalenderService.getDao().queryUserPaymentStatus(userId, StringUtils.join(musicGroupIds, ",")));
|
|
|
// 获取学员在该乐团续费状态
|
|
|
musicCardDtos.forEach(e -> {
|
|
|
e.setPaymentStatus(paymentStatus.get(e.getMusicGroupId()));
|
|
@@ -2551,30 +2549,30 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
|
|
|
//删除进行中加学生,且在审批中或拒绝的缴费
|
|
|
- List<Long> paymentCalenderIdList = musicGroupPaymentCalenderDao.findStudentNoPaymentCalender(userId, musicGroupId);
|
|
|
+ List<Long> paymentCalenderIdList = musicGroupPaymentCalenderService.getDao().findStudentNoPaymentCalender(userId, musicGroupId);
|
|
|
if (paymentCalenderIdList != null && paymentCalenderIdList.size() > 0) {
|
|
|
- musicGroupPaymentCalenderDao.delByIds(paymentCalenderIdList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().delByIds(paymentCalenderIdList);
|
|
|
}
|
|
|
|
|
|
//查询未交费的项目
|
|
|
List<MusicGroupPaymentCalenderDetail> musicGroupPaymentCalenderDetailList = musicGroupPaymentCalenderDetailDao.queryNotPaymentStudentByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
|
|
|
for (MusicGroupPaymentCalenderDetail mgpcd : musicGroupPaymentCalenderDetailList) {
|
|
|
- MusicGroupPaymentCalender mgpc = musicGroupPaymentCalenderDao.get(mgpcd.getMusicGroupPaymentCalenderId());
|
|
|
+ MusicGroupPaymentCalender mgpc = musicGroupPaymentCalenderService.getDao().get(mgpcd.getMusicGroupPaymentCalenderId());
|
|
|
if (mgpc != null) {
|
|
|
if (mgpc.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
- musicGroupPaymentCalenderDao.delete(mgpc.getId());
|
|
|
+ musicGroupPaymentCalenderService.getDao().delete(mgpc.getId());
|
|
|
} else {
|
|
|
// 缴费项目预计人数减一
|
|
|
mgpc.setExpectNum(mgpc.getExpectNum() - 1);
|
|
|
mgpc.setUpdateTime(date);
|
|
|
- musicGroupPaymentCalenderDao.update(mgpc);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(mgpc);
|
|
|
}
|
|
|
}
|
|
|
musicGroupPaymentCalenderDetailDao.delete(mgpcd.getId());
|
|
|
}
|
|
|
//删除用户购买的课程记录
|
|
|
- List<MusicGroupPaymentCalender> paymentCalenders = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId);
|
|
|
+ List<MusicGroupPaymentCalender> paymentCalenders = musicGroupPaymentCalenderService.getDao().findByMusicGroupId(musicGroupId);
|
|
|
if(CollectionUtils.isNotEmpty(paymentCalenders)){
|
|
|
List<Long> calenderIds = paymentCalenders.stream().map(e -> e.getId()).collect(Collectors.toList());
|
|
|
musicGroupPaymentStudentCourseDetailService.deleteByMusicGroupPaymentCalenderId(StringUtils.join(calenderIds,","),userId);
|
|
@@ -2845,24 +2843,24 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
|
|
|
//删除进行中加学生,且在审批中或拒绝的缴费
|
|
|
- List<Long> paymentCalenderIdList = musicGroupPaymentCalenderDao.findStudentNoPaymentCalender(userId, musicGroupId);
|
|
|
+ List<Long> paymentCalenderIdList = musicGroupPaymentCalenderService.getDao().findStudentNoPaymentCalender(userId, musicGroupId);
|
|
|
if (paymentCalenderIdList != null && paymentCalenderIdList.size() > 0) {
|
|
|
- musicGroupPaymentCalenderDao.delByIds(paymentCalenderIdList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().delByIds(paymentCalenderIdList);
|
|
|
}
|
|
|
|
|
|
//查询未交费的项目
|
|
|
List<MusicGroupPaymentCalenderDetail> musicGroupPaymentCalenderDetailList = musicGroupPaymentCalenderDetailDao.queryNotPaymentStudentByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
|
|
|
for (MusicGroupPaymentCalenderDetail mgpcd : musicGroupPaymentCalenderDetailList) {
|
|
|
- MusicGroupPaymentCalender mgpc = musicGroupPaymentCalenderDao.get(mgpcd.getMusicGroupPaymentCalenderId());
|
|
|
+ MusicGroupPaymentCalender mgpc = musicGroupPaymentCalenderService.getDao().get(mgpcd.getMusicGroupPaymentCalenderId());
|
|
|
if (mgpc != null) {
|
|
|
if (mgpc.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
- musicGroupPaymentCalenderDao.delete(mgpc.getId());
|
|
|
+ musicGroupPaymentCalenderService.getDao().delete(mgpc.getId());
|
|
|
} else {
|
|
|
// 缴费项目预计人数减一
|
|
|
mgpc.setExpectNum(mgpc.getExpectNum() - 1);
|
|
|
mgpc.setUpdateTime(date);
|
|
|
- musicGroupPaymentCalenderDao.update(mgpc);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(mgpc);
|
|
|
}
|
|
|
}
|
|
|
musicGroupPaymentCalenderDetailDao.delete(mgpcd.getId());
|
|
@@ -3066,24 +3064,24 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
|
|
|
//删除进行中加学生,且在审批中或拒绝的缴费
|
|
|
- List<Long> paymentCalenderIdList = musicGroupPaymentCalenderDao.findStudentNoPaymentCalender(userId, musicGroupId);
|
|
|
+ List<Long> paymentCalenderIdList = musicGroupPaymentCalenderService.getDao().findStudentNoPaymentCalender(userId, musicGroupId);
|
|
|
if (paymentCalenderIdList != null && paymentCalenderIdList.size() > 0) {
|
|
|
- musicGroupPaymentCalenderDao.delByIds(paymentCalenderIdList);
|
|
|
+ musicGroupPaymentCalenderService.getDao().delByIds(paymentCalenderIdList);
|
|
|
}
|
|
|
|
|
|
//查询未交费的项目
|
|
|
List<MusicGroupPaymentCalenderDetail> musicGroupPaymentCalenderDetailList = musicGroupPaymentCalenderDetailDao.queryNotPaymentStudentByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
|
|
|
for (MusicGroupPaymentCalenderDetail mgpcd : musicGroupPaymentCalenderDetailList) {
|
|
|
- MusicGroupPaymentCalender mgpc = musicGroupPaymentCalenderDao.get(mgpcd.getMusicGroupPaymentCalenderId());
|
|
|
+ MusicGroupPaymentCalender mgpc = musicGroupPaymentCalenderService.getDao().get(mgpcd.getMusicGroupPaymentCalenderId());
|
|
|
if (mgpc != null) {
|
|
|
if (mgpc.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
- musicGroupPaymentCalenderDao.delete(mgpc.getId());
|
|
|
+ musicGroupPaymentCalenderService.getDao().delete(mgpc.getId());
|
|
|
} else {
|
|
|
// 缴费项目预计人数减一
|
|
|
mgpc.setExpectNum(mgpc.getExpectNum() - 1);
|
|
|
mgpc.setUpdateTime(date);
|
|
|
- musicGroupPaymentCalenderDao.update(mgpc);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(mgpc);
|
|
|
}
|
|
|
}
|
|
|
musicGroupPaymentCalenderDetailDao.delete(mgpcd.getId());
|
|
@@ -3256,7 +3254,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
if (studentPaymentOrder.getStatus() == SUCCESS) {
|
|
|
//如果是进行中加学员
|
|
|
- MusicGroupPaymentCalender paymentCalender = musicGroupPaymentCalenderDao.get(studentPaymentOrder.getCalenderId());
|
|
|
+ MusicGroupPaymentCalender paymentCalender = musicGroupPaymentCalenderService.getDao().get(studentPaymentOrder.getCalenderId());
|
|
|
if (paymentCalender.getPaymentType() == MusicGroupPaymentCalender.PaymentType.ADD_STUDENT) {
|
|
|
studentRegistration.setPaymentStatus(YES);
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
@@ -3434,7 +3432,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
// Map<String, Integer> payNumMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(studentRegistrationDao.countNormalNum(StringUtils.join(musicGroupIds, ",")))), HashMap.class);
|
|
|
|
|
|
|
|
|
- Map<String, BigDecimal> chargeStandardMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderDao.queryChargeStandard(StringUtils.join(musicGroupIds, ",")));
|
|
|
+ Map<String, BigDecimal> chargeStandardMap = MapUtil.convertIntegerMap(musicGroupPaymentCalenderService.getDao().queryChargeStandard(StringUtils.join(musicGroupIds, ",")));
|
|
|
|
|
|
//获取教学点编号
|
|
|
Map<Integer, String> cooperationOrganNames = MapUtil.convertMybatisMap(cooperationOrganDao.queryNameByIds(StringUtils.join(musicGroupList.stream().map(MusicGroup::getCooperationOrganId).collect(Collectors.toSet()), ",")));
|
|
@@ -3619,11 +3617,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if ((group.getStatus().equals(MusicGroupStatusEnum.AUDIT_FAILED) || group.getStatus().equals(MusicGroupStatusEnum.DRAFT))
|
|
|
&& group.getCourseViewType() != musicGroup.getCourseViewType()) {
|
|
|
//删除原有的声部商品组合
|
|
|
- musicGroupSubjectGoodsGroupDao.delByMusicGroupId(musicGroupId);
|
|
|
+ musicGroupSubjectGoodsGroupService.getDao().delByMusicGroupId(musicGroupId);
|
|
|
//删除原有的缴费项目
|
|
|
- MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
+ MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderService.getDao().findByMusicGroupRegCalender(musicGroupId);
|
|
|
if (regCalender != null) {
|
|
|
- musicGroupPaymentCalenderDao.delByGroupId(musicGroupId);
|
|
|
+ musicGroupPaymentCalenderService.getDao().delByGroupId(musicGroupId);
|
|
|
|
|
|
List<Long> calenderIds = new ArrayList<Long>();
|
|
|
calenderIds.add(regCalender.getId());
|
|
@@ -3642,7 +3640,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
statusList.add(PaymentCalenderStatusEnum.NO);
|
|
|
statusList.add(PaymentCalenderStatusEnum.OPEN);
|
|
|
statusList.add(PaymentCalenderStatusEnum.AUDITING);
|
|
|
- List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList, PayUserType.STUDENT.getCode());
|
|
|
+ List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderService.getDao().queryByPaymentStatus(musicGroupId, statusList, PayUserType.STUDENT.getCode());
|
|
|
|
|
|
if (musicGroupPaymentCalenderList != null && musicGroupPaymentCalenderList.size() > 0) {
|
|
|
throw new BizException("存在未完结[审核中/未开启缴费/开启缴费]的缴费项目,请检查");
|
|
@@ -3679,7 +3677,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
subFeeSettingDto.setMusicGroupPaymentEntities(musicGroupPaymentEntitiesDao.findByMusicGroupId(musicGroupId));
|
|
|
subFeeSettingDto.setMaxMusicalInstrumentsProfits(organizationDao.get(musicGroup.getOrganId()).getMaxMusicalInstrumentsProfits());
|
|
|
//获取缴费周期
|
|
|
- //List<Integer> paymentMonth = musicGroupPaymentCalenderDao.findByMusicGroupId(musicGroupId).stream().map(e -> e.getPaymentMonth()).collect(Collectors.toList());
|
|
|
+ //List<Integer> paymentMonth = musicGroupPaymentCalenderService.getDao().findByMusicGroupId(musicGroupId).stream().map(e -> e.getPaymentMonth()).collect(Collectors.toList());
|
|
|
//subFeeSettingDto.setMonths(paymentMonth);
|
|
|
return subFeeSettingDto;
|
|
|
}
|
|
@@ -3690,7 +3688,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
//获取乐团声部规划列表
|
|
|
subFeeSettingDto.setMusicGroupSubjectPlans(musicGroupSubjectPlanDao.getMusicSubjectClassPlan(musicGroupId));
|
|
|
//获取乐团声部商品组
|
|
|
- subFeeSettingDto.setMusicGroupSubjectGoodsGroups(musicGroupSubjectGoodsGroupDao.findGoodsGroup(musicGroupId, null));
|
|
|
+ subFeeSettingDto.setMusicGroupSubjectGoodsGroups(musicGroupSubjectGoodsGroupService.getDao().findGoodsGroup(musicGroupId, null));
|
|
|
return subFeeSettingDto;
|
|
|
}
|
|
|
|
|
@@ -3717,12 +3715,12 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
List<Map<Integer, String>> mapList = studentRegistrationDao.findMapByMusicGroupId(musicGroupId, 0);
|
|
|
//所有人开启缴费
|
|
|
studentRegistrationDao.musicGroupOpenPay(musicGroupId, PaymentStatusEnum.OPEN);
|
|
|
- MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(musicGroupId);
|
|
|
+ MusicGroupPaymentCalender regCalender = musicGroupPaymentCalenderService.getDao().findByMusicGroupRegCalender(musicGroupId);
|
|
|
if (regCalender != null && regCalender.getPayUserType().equals(MusicGroupPaymentCalender.PayUserType.STUDENT)) {
|
|
|
regCalender.setStatus(MusicGroupPaymentCalender.PaymentCalenderStatusEnum.OPEN);
|
|
|
regCalender.setDeadlinePaymentDate(DateUtil.toDate(expireDate));
|
|
|
regCalender.setUpdateTime(new Date());
|
|
|
- musicGroupPaymentCalenderDao.update(regCalender);
|
|
|
+ musicGroupPaymentCalenderService.getDao().update(regCalender);
|
|
|
}
|
|
|
//三方乐团不发送缴费通知
|
|
|
if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|