|
@@ -32,6 +32,7 @@ import java.util.stream.Collectors;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -65,30 +66,6 @@ import com.ym.mec.biz.dal.entity.MusicGroupStudentFee.PaymentStatus;
|
|
|
import com.ym.mec.biz.dal.page.MusicGroupQueryInfo;
|
|
|
import com.ym.mec.biz.dal.page.MusicMemberQueryInfo;
|
|
|
import com.ym.mec.biz.event.source.GroupEventSource;
|
|
|
-import com.ym.mec.biz.service.ClassGroupService;
|
|
|
-import com.ym.mec.biz.service.ClassGroupStudentMapperService;
|
|
|
-import com.ym.mec.biz.service.CloudTeacherOrderService;
|
|
|
-import com.ym.mec.biz.service.ContractService;
|
|
|
-import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
|
|
|
-import com.ym.mec.biz.service.GoodsService;
|
|
|
-import com.ym.mec.biz.service.ImGroupMemberService;
|
|
|
-import com.ym.mec.biz.service.ImGroupService;
|
|
|
-import com.ym.mec.biz.service.ImUserFriendService;
|
|
|
-import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
|
|
|
-import com.ym.mec.biz.service.MusicGroupService;
|
|
|
-import com.ym.mec.biz.service.MusicGroupSubjectGoodsGroupService;
|
|
|
-import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
|
|
|
-import com.ym.mec.biz.service.PayService;
|
|
|
-import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
|
|
|
-import com.ym.mec.biz.service.StudentPaymentOrderService;
|
|
|
-import com.ym.mec.biz.service.StudentPaymentRouteOrderService;
|
|
|
-import com.ym.mec.biz.service.StudentRegistrationService;
|
|
|
-import com.ym.mec.biz.service.StudentService;
|
|
|
-import com.ym.mec.biz.service.SysConfigService;
|
|
|
-import com.ym.mec.biz.service.SysCouponCodeService;
|
|
|
-import com.ym.mec.biz.service.SysMessageService;
|
|
|
-import com.ym.mec.biz.service.SysUserCashAccountDetailService;
|
|
|
-import com.ym.mec.biz.service.SysUserCashAccountService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.entity.ImGroupMember;
|
|
@@ -134,79 +111,54 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
private MusicGroupPurchaseListDao musicGroupPurchaseListDao;
|
|
|
@Autowired
|
|
|
private MusicGroupStudentFeeDao musicGroupStudentFeeDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ClassGroupTeacherMapperDao classGroupTeacherMapperDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private StudentPaymentOrderDao studentPaymentOrderDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private SysUserCashAccountService sysUserCashAccountService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private SysUserCashAccountDetailService sysUserCashAccountDetailService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private MusicGroupPaymentCalenderStudentDetailDao musicGroupPaymentCalenderStudentDetailDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private MusicGroupQuitDao musicGroupQuitDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private StudentRegistrationDao studentRegistrationDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CourseScheduleDao courseScheduleDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private ClassGroupDao classGroupDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private OrganizationDao organizationDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CourseScheduleTeacherSalaryDao courseScheduleTeacherSalaryDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CourseScheduleStudentPaymentService courseScheduleStudentPaymentService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private CooperationOrganDao cooperationOrganDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private TeacherAttendanceDao teacherAttendanceDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private StudentPaymentOrderService studentPaymentOrderService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private PayService payService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private EmployeeDao employeeDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
private SysMessageService sysMessageService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private SysConfigDao sysConfigDao;
|
|
|
-
|
|
|
@Autowired
|
|
|
- private SysTenantConfigDao sysTenantConfigDao;
|
|
|
-
|
|
|
+ private SysTenantConfigService sysTenantConfigService;
|
|
|
@Autowired
|
|
|
private ClassGroupService classGroupService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private StudentPaymentOrderDetailDao studentPaymentOrderDetailDao;
|
|
|
@Autowired
|
|
@@ -527,7 +479,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
throw new BizException("操作失败:只有乐团在[{}]状态才能操作", MusicGroupStatusEnum.PRE_APPLY.getMsg());
|
|
|
}
|
|
|
if (isCheckStudentNum) {
|
|
|
- String configValue = sysTenantConfigDao.getConfigValue(SysConfigService.MUSIC_MIN_STUDENT_NUM, musicGroup.getTenantId());
|
|
|
+ String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.MUSIC_MIN_STUDENT_NUM, musicGroup.getTenantId());
|
|
|
if(StringUtils.isNotEmpty(configValue)){
|
|
|
Integer minStudentNum = Integer.parseInt(configValue);
|
|
|
// 查询乐团已报名人数
|
|
@@ -1461,7 +1413,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
throw new BizException("乐团机构信息异常,请联系管理员");
|
|
|
}
|
|
|
//预报名开关
|
|
|
- String configValue = sysTenantConfigDao.getConfigValue(SysConfigService.MUSIC_PRE_APPLY_OPEN_FLAG, musicGroup.getTenantId());
|
|
|
+ String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.MUSIC_PRE_APPLY_OPEN_FLAG, musicGroup.getTenantId());
|
|
|
if(StringUtils.isNotEmpty(configValue) && configValue.equals(1)){
|
|
|
//记录操作日志
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "审核通过(审核中 -> 预报名)", sysUser.getId(), ""));
|
|
@@ -1686,14 +1638,15 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}*/
|
|
|
//获取当前乐团所有已报名学员
|
|
|
List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroupId, null);
|
|
|
- if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
+ String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.REFUND_PERIOD, musicGroup.getTenantId());
|
|
|
+ if (StringUtils.isNotEmpty(configValue) && musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
if (registrations != null && registrations.size() > 0) {
|
|
|
Map<Integer, String> map = new HashMap<>(registrations.size());
|
|
|
registrations.forEach(e -> {
|
|
|
map.put(e.getUserId(), e.getUserId().toString());
|
|
|
});
|
|
|
sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_CLOSE,
|
|
|
- map, null, 0, "1", "STUDENT", musicGroup.getName(), sysConfigDao.findConfigValue(SysConfigService.REFUND_PERIOD));
|
|
|
+ map, null, 0, "1", "STUDENT", musicGroup.getName(), configValue);
|
|
|
}
|
|
|
}
|
|
|
//将学生退团
|
|
@@ -3917,9 +3870,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
Integer paymentStudentNum = studentRegistrationDao.getPaymentStudentNum(musicGroupId);
|
|
|
|
|
|
//若乐团新建团,则操作【确认开团】时,若【已缴费】学员达到98人,则无需对【未缴费】学员新增回访
|
|
|
- String configValue = sysTenantConfigDao.getConfigValue(SysConfigService.NEW_MUSIC_PAYMENT_STUDENT_NUM, musicGroup.getTenantId());
|
|
|
+ String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.NEW_MUSIC_PAYMENT_STUDENT_NUM, musicGroup.getTenantId());
|
|
|
//若乐团不是新建团,则操作【确认开团】时,若【已缴费】学员达到58人,则无需对【未缴费】学员新增回访
|
|
|
- String configValue1 = sysTenantConfigDao.getConfigValue(SysConfigService.OLD_MUSIC_PAYMENT_STUDENT_NUM, musicGroup.getTenantId());
|
|
|
+ String configValue1 = sysTenantConfigService.getTenantConfigValue(SysConfigService.OLD_MUSIC_PAYMENT_STUDENT_NUM, musicGroup.getTenantId());
|
|
|
if ((StringUtils.isNotEmpty(configValue) && cooperationMusicGroupNum <= 0 && paymentStudentNum < Integer.parseInt(configValue)) ||
|
|
|
(StringUtils.isNotEmpty(configValue1) && cooperationMusicGroupNum > 0 && paymentStudentNum < Integer.parseInt(configValue1))) {
|
|
|
checkStudentVisit(musicGroupId);
|