|
@@ -260,10 +260,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
// 保存乐团声部商品规划
|
|
|
if (musicGroupSubjectGoodsGroups != null && musicGroupSubjectGoodsGroups.size() > 0) {
|
|
|
for (MusicGroupSubjectGoodsGroup musicGroupSubjectGoodsGroup : musicGroupSubjectGoodsGroups) {
|
|
|
- if(musicGroupSubjectGoodsGroup.getType().equals(GoodsType.INSTRUMENT) && (musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson() == null
|
|
|
+ if (musicGroupSubjectGoodsGroup.getType().equals(GoodsType.INSTRUMENT) && (musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson() == null
|
|
|
|| musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson().isEmpty()
|
|
|
- || musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson().equals("{}"))){
|
|
|
- throw new BizException(musicGroupSubjectGoodsGroup.getName()+" 请选择提供方式");
|
|
|
+ || musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson().equals("{}"))) {
|
|
|
+ throw new BizException(musicGroupSubjectGoodsGroup.getName() + " 请选择提供方式");
|
|
|
}
|
|
|
}
|
|
|
musicGroupSubjectGoodsGroupDao.batchInsert(musicGroupSubjectGoodsGroups, musicGroupId);
|
|
@@ -307,7 +307,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentPaymentOrder.setVersion(0);
|
|
|
Date date = new Date();
|
|
|
if (sporadicPayDto.getUseBalancePayment() && amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- if(chargeInfo.getChargeType().getCode().equals(9)){
|
|
|
+ if (chargeInfo.getChargeType().getCode().equals(9)) {
|
|
|
throw new BizException("账户充值不支持余额支付");
|
|
|
}
|
|
|
SysUserCashAccount userCashAccount = sysUserCashAccountService.get(userId);
|
|
@@ -891,10 +891,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
if (subFeeSettingDto.getMusicGroupSubjectGoodsGroups() != null && subFeeSettingDto.getMusicGroupSubjectGoodsGroups().size() > 0) {
|
|
|
for (MusicGroupSubjectGoodsGroup musicGroupSubjectGoodsGroup : subFeeSettingDto.getMusicGroupSubjectGoodsGroups()) {
|
|
|
- if(musicGroupSubjectGoodsGroup.getType().equals(GoodsType.INSTRUMENT) && (musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson() == null
|
|
|
+ if (musicGroupSubjectGoodsGroup.getType().equals(GoodsType.INSTRUMENT) && (musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson() == null
|
|
|
|| musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson().isEmpty()
|
|
|
- || musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson().equals("{}"))){
|
|
|
- throw new BizException(musicGroupSubjectGoodsGroup.getName()+" 请选择提供方式");
|
|
|
+ || musicGroupSubjectGoodsGroup.getKitGroupPurchaseTypeJson().equals("{}"))) {
|
|
|
+ throw new BizException(musicGroupSubjectGoodsGroup.getName() + " 请选择提供方式");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1040,7 +1040,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
//是否有基础训练班
|
|
|
Integer num = classGroupDao.countClassNumByType(musicGroupId);
|
|
|
- if(num != null && num > 0){
|
|
|
+ if (num != null && num > 0) {
|
|
|
Map<Integer, String> studentMap = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(studentRegistrationDao.findIdMapByMusicGroupId(musicGroupId, 2))), HashMap.class);
|
|
|
if (studentMap != null && studentMap.size() > 0) {
|
|
|
String baseURL = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
@@ -1095,14 +1095,14 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<BasicUserDto> findTeachersByStuId(Integer studentId,String search){
|
|
|
+ public List<BasicUserDto> findTeachersByStuId(Integer studentId, String search) {
|
|
|
//获取相关课程,班级老师列表
|
|
|
Set<Integer> teacherIds = teacherDao.findMusicTeacherIds(studentId);
|
|
|
//获取学员所在乐团列表
|
|
|
List<String> musicGroupIds = studentRegistrationDao.queryStudentMusicGroup(studentId);
|
|
|
- if(musicGroupIds != null && musicGroupIds.size() > 0){
|
|
|
+ if (musicGroupIds != null && musicGroupIds.size() > 0) {
|
|
|
List<MusicGroup> musicGroups = musicGroupDao.queryListByIds(StringUtils.join(musicGroupIds, ","));
|
|
|
- musicGroups.forEach(e->{
|
|
|
+ musicGroups.forEach(e -> {
|
|
|
teacherIds.add(e.getDirectorUserId());
|
|
|
teacherIds.add(e.getEducationalTeacherId());
|
|
|
teacherIds.add(e.getTeamTeacherId());
|
|
@@ -1122,11 +1122,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
teacherIds.addAll(teacherDao.findCommEducationalTeacherId(studentId));
|
|
|
//获取关联的指导老师
|
|
|
Student student = studentDao.get(studentId);
|
|
|
- if(student != null && student.getTeacherId() != null){
|
|
|
+ if (student != null && student.getTeacherId() != null) {
|
|
|
teacherIds.add(student.getTeacherId());
|
|
|
}
|
|
|
- if(teacherIds.size() > 0){
|
|
|
- return teacherDao.queryTeacherBaseInfo(teacherIds,search);
|
|
|
+ if (teacherIds.size() > 0) {
|
|
|
+ return teacherDao.queryTeacherBaseInfo(teacherIds, search);
|
|
|
}
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
@@ -1363,7 +1363,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
List<Integer> classGroupIdList = classGroupStudentMapperDao.queryClassGroupIdList(musicGroupId, userId, GroupType.MUSIC);
|
|
|
//更新学员在班级的状态
|
|
|
for (Integer classGroupId : classGroupIdList) {
|
|
|
- classGroupStudentMapperService.delClassGroupStudent(userId,classGroupId);
|
|
|
+ classGroupStudentMapperService.delClassGroupStudent(userId, classGroupId);
|
|
|
}
|
|
|
|
|
|
//删除续费周期
|
|
@@ -1459,7 +1459,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
List<Integer> classGroupIdList = classGroupStudentMapperDao.queryClassGroupIdList(musicGroupId, userId, GroupType.MUSIC);
|
|
|
for (Integer classGroupId : classGroupIdList) {
|
|
|
- classGroupStudentMapperService.delClassGroupStudent(userId,classGroupId);
|
|
|
+ classGroupStudentMapperService.delClassGroupStudent(userId, classGroupId);
|
|
|
}
|
|
|
|
|
|
//删除续费周期
|
|
@@ -1536,16 +1536,16 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (musicGroupStudentFee == null) {
|
|
|
throw new BizException("个人续费信息错误");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
- if(studentRegistration == null || studentRegistration.getPaymentStatus() != PaymentStatusEnum.YES){
|
|
|
- throw new BizException("请走报名缴费流程");
|
|
|
+ if (studentRegistration == null || studentRegistration.getPaymentStatus() != PaymentStatusEnum.YES) {
|
|
|
+ throw new BizException("请走报名缴费流程");
|
|
|
}
|
|
|
MusicGroupPaymentCalenderDetail userLastCalenderDetail = musicGroupPaymentCalenderDetailDao.getUserLastCalenderDetail(musicGroupId, userId);
|
|
|
- if(userLastCalenderDetail == null){
|
|
|
+ if (userLastCalenderDetail == null) {
|
|
|
throw new BizException("当前续费时间已截止,请联系指导老师");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//判断是否是续费
|
|
|
/*List<StudentPaymentOrder> orderList = studentPaymentOrderDao.queryByCondition(GroupType.MUSIC, musicGroupId, userId, DealStatusEnum.SUCCESS);
|
|
|
if (orderList == null || orderList.size() == 0) {
|
|
@@ -1605,13 +1605,16 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
sysUserCashAccountService.updateBalance(userId, amount.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐团续费");
|
|
|
|
|
|
+ MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.getForLock(userLastCalenderDetail.getMusicGroupPaymentCalenderId());
|
|
|
//更新下次续费时间
|
|
|
musicGroupStudentFee.setUpdateTime(date);
|
|
|
musicGroupStudentFee.setLatestPaidTime(date);
|
|
|
musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
|
|
|
musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
|
|
|
- Integer getRemainNetworkClassTimes = musicGroupStudentFee.getRemainNetworkClassTimes() == null ? 0 : musicGroupStudentFee.getRemainNetworkClassTimes();
|
|
|
- musicGroupStudentFee.setRemainNetworkClassTimes(getRemainNetworkClassTimes+1);
|
|
|
+ if (musicGroupPaymentCalender.getType().equals(MusicGroupPaymentCalender.FeeType.ONLINE)) {
|
|
|
+ Integer getRemainNetworkClassTimes = musicGroupStudentFee.getRemainNetworkClassTimes() == null ? 0 : musicGroupStudentFee.getRemainNetworkClassTimes();
|
|
|
+ musicGroupStudentFee.setRemainNetworkClassTimes(getRemainNetworkClassTimes + 1);
|
|
|
+ }
|
|
|
// musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, musicGroupStudentFee.getNextPaymentDate(), musicGroupStudentFee));
|
|
|
musicGroupStudentFeeDao.update(musicGroupStudentFee);
|
|
|
|
|
@@ -1622,9 +1625,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
userLastCalenderDetail.setUpdateTime(date);
|
|
|
musicGroupPaymentCalenderDetailDao.update(userLastCalenderDetail);
|
|
|
//更新实际缴费人数
|
|
|
- MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.getForLock(userLastCalenderDetail.getMusicGroupPaymentCalenderId());
|
|
|
- Integer actualNum = musicGroupPaymentCalender.getActualNum() == null ? 0:musicGroupPaymentCalender.getActualNum();
|
|
|
- musicGroupPaymentCalender.setActualNum(actualNum+1);
|
|
|
+ Integer actualNum = musicGroupPaymentCalender.getActualNum() == null ? 0 : musicGroupPaymentCalender.getActualNum();
|
|
|
+ musicGroupPaymentCalender.setActualNum(actualNum + 1);
|
|
|
musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
return null;
|
|
@@ -1680,7 +1682,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
public boolean renewForCallback(StudentPaymentOrder studentPaymentOrder) throws IOException {
|
|
|
|
|
|
int updateNum = studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
- if(updateNum <= 0){
|
|
|
+ if (updateNum <= 0) {
|
|
|
throw new BizException("订单更新失败");
|
|
|
}
|
|
|
Integer userId = studentPaymentOrder.getUserId();
|
|
@@ -1699,19 +1701,24 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
push.put(userId, userId.toString());
|
|
|
yimei.put(userId, studentRegistration.getParentsPhone());
|
|
|
if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
|
|
|
+ MusicGroupPaymentCalenderDetail userLastCalenderDetail = musicGroupPaymentCalenderDetailDao.getUserLastCalenderDetail(musicGroupId, userId);
|
|
|
+ if (userLastCalenderDetail == null) {
|
|
|
+ throw new BizException("学生没有续费中的记录");
|
|
|
+ }
|
|
|
+
|
|
|
+ MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.getForLock(userLastCalenderDetail.getMusicGroupPaymentCalenderId());
|
|
|
+
|
|
|
musicGroupStudentFee.setUpdateTime(date);
|
|
|
musicGroupStudentFee.setLatestPaidTime(date);
|
|
|
musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
|
|
|
musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
|
|
|
- Integer getRemainNetworkClassTimes = musicGroupStudentFee.getRemainNetworkClassTimes() == null ? 0 : musicGroupStudentFee.getRemainNetworkClassTimes();
|
|
|
- musicGroupStudentFee.setRemainNetworkClassTimes(getRemainNetworkClassTimes+1);
|
|
|
+ if (musicGroupPaymentCalender.getType().equals(MusicGroupPaymentCalender.FeeType.ONLINE)) {
|
|
|
+ Integer getRemainNetworkClassTimes = musicGroupStudentFee.getRemainNetworkClassTimes() == null ? 0 : musicGroupStudentFee.getRemainNetworkClassTimes();
|
|
|
+ musicGroupStudentFee.setRemainNetworkClassTimes(getRemainNetworkClassTimes + 1);
|
|
|
+ }
|
|
|
// musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId, musicGroupStudentFee.getNextPaymentDate(), musicGroupStudentFee));
|
|
|
musicGroupStudentFeeDao.update(musicGroupStudentFee);
|
|
|
|
|
|
- MusicGroupPaymentCalenderDetail userLastCalenderDetail = musicGroupPaymentCalenderDetailDao.getUserLastCalenderDetail(musicGroupId, userId);
|
|
|
- if(userLastCalenderDetail == null){
|
|
|
- throw new BizException("学生没有续费中的记录");
|
|
|
- }
|
|
|
//更新学生的缴费记录状态
|
|
|
userLastCalenderDetail.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
|
|
|
userLastCalenderDetail.setActualAmount(userLastCalenderDetail.getExpectAmount());
|
|
@@ -1720,9 +1727,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroupPaymentCalenderDetailDao.update(userLastCalenderDetail);
|
|
|
|
|
|
//更新实际缴费人数
|
|
|
- MusicGroupPaymentCalender musicGroupPaymentCalender = musicGroupPaymentCalenderDao.getForLock(userLastCalenderDetail.getMusicGroupPaymentCalenderId());
|
|
|
- Integer actualNum = musicGroupPaymentCalender.getActualNum() == null ? 0:musicGroupPaymentCalender.getActualNum();
|
|
|
- musicGroupPaymentCalender.setActualNum(actualNum+1);
|
|
|
+ Integer actualNum = musicGroupPaymentCalender.getActualNum() == null ? 0 : musicGroupPaymentCalender.getActualNum();
|
|
|
+ musicGroupPaymentCalender.setActualNum(actualNum + 1);
|
|
|
musicGroupPaymentCalender.setUpdateTime(date);
|
|
|
musicGroupPaymentCalenderDao.update(musicGroupPaymentCalender);
|
|
|
|
|
@@ -1822,7 +1828,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
courseScheduleTeacherSalaryDao.update(courseScheduleTeacherSalary);
|
|
|
}
|
|
|
Teacher teacher = teacherDao.get(teacherId);
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(classGroupDao.findByCourseSchedule(courseScheduleId.intValue(),0).getMusicGroupId());
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(classGroupDao.findByCourseSchedule(courseScheduleId.intValue(), 0).getMusicGroupId());
|
|
|
Set<Integer> roleIds = new HashSet<>(1);
|
|
|
roleIds.add(SysUserRole.SECTION_MANAGER);
|
|
|
|
|
@@ -1936,11 +1942,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
ImGroupMember[] nowImGroupMembers2 = {new ImGroupMember(educationalTeacherId.toString())};
|
|
|
|
|
|
Integer oldDirectorUserId = oldMusicGroup.getDirectorUserId();
|
|
|
- if(oldDirectorUserId == null){
|
|
|
+ if (oldDirectorUserId == null) {
|
|
|
oldDirectorUserId = teamTeacherId;
|
|
|
}
|
|
|
Integer directorUserId = newMusicGroup.getDirectorUserId();
|
|
|
- if(directorUserId == null){
|
|
|
+ if (directorUserId == null) {
|
|
|
directorUserId = teamTeacherId;
|
|
|
}
|
|
|
|
|
@@ -1972,7 +1978,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
//如果已生成课表,那么修改未上课时教学点
|
|
|
courseScheduleDao.updateCourseScheduleSchool("MUSIC", musicGroupId, musicGroup.getSchoolId());
|
|
|
}
|
|
|
- updateTeamTeacher(group,musicGroup);
|
|
|
+ updateTeamTeacher(group, musicGroup);
|
|
|
// List<Integer> months = subFeeSettingDto.getMonths();
|
|
|
|
|
|
Date date = new Date();
|