|
@@ -18,6 +18,7 @@ import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -31,42 +32,6 @@ import com.alibaba.fastjson.TypeReference;
|
|
|
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.ChargeTypeDao;
|
|
|
-import com.ym.mec.biz.dal.dao.ClassGroupDao;
|
|
|
-import com.ym.mec.biz.dal.dao.ClassGroupStudentMapperDao;
|
|
|
-import com.ym.mec.biz.dal.dao.CooperationOrganDao;
|
|
|
-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.EmployeeDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupBuildLogDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupDao;
|
|
|
-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.MusicGroupPaymentCalenderStudentDetailDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentEntitiesDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentStudentCourseDetailDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupPurchaseListDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupQuitDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupSubjectGoodsGroupDao;
|
|
|
-import com.ym.mec.biz.dal.dao.MusicGroupSubjectPlanDao;
|
|
|
-import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SchoolDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SporadicChargeInfoDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentPaymentOrderDetailDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentPreRegistrationDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
|
|
|
-import com.ym.mec.biz.dal.dao.StudentVisitDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SubjectChangeDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SubjectDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SysConfigDao;
|
|
|
-import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
|
|
|
-import com.ym.mec.biz.dal.dao.TeacherAttendanceDao;
|
|
|
-import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.dto.BasicUserDto;
|
|
|
import com.ym.mec.biz.dal.dto.CloseMusicGroupDto;
|
|
|
import com.ym.mec.biz.dal.dto.CourseFormDto;
|
|
@@ -174,6 +139,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
|
|
|
|
@Autowired
|
|
|
+ private ClassGroupTeacherMapperDao classGroupTeacherMapperDao;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private StudentPaymentOrderDao studentPaymentOrderDao;
|
|
|
|
|
|
@Autowired
|
|
@@ -1202,17 +1170,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
throw new BizException("课酬未确认");
|
|
|
}
|
|
|
}
|
|
|
-// updateTeamTeacher(musicGroup, musicGroup);
|
|
|
- //生成学员费用表
|
|
|
- /*List<MusicGroupStudentFee> musicGroupStudentFees = musicGroupStudentFeeDao.initMusicGroupStudentFee(musicGroupId);
|
|
|
- if (musicGroupStudentFees != null && musicGroupStudentFees.size() > 0) {
|
|
|
- if (musicGroup.getFeeType() != null && musicGroup.getFeeType() != FeeType.OFFLINE) {
|
|
|
- for (MusicGroupStudentFee sf : musicGroupStudentFees) {
|
|
|
- sf.setRemainNetworkClassTimes(sf.getRemainNetworkClassTimes() + 1);
|
|
|
- }
|
|
|
- }
|
|
|
- musicGroupStudentFeeDao.batchInsert(musicGroupStudentFees, null, "PAID_COMPLETED");
|
|
|
- }*/
|
|
|
musicGroupStudentFeeDao.batchUpdateCalenders(musicGroupId);
|
|
|
//记录操作日志
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "确认开团(筹备中 -> 进行中)", sysUser.getId(), ""));
|
|
@@ -1222,6 +1179,17 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
musicGroup.setGroupMemberNum(studentRegistrations == null ? 0 : studentRegistrations.size());
|
|
|
musicGroup.setBillStartDate(new Date());
|
|
|
musicGroupDao.update(musicGroup);
|
|
|
+ //获取乐团班级列表
|
|
|
+ List<ClassGroup> classGroups = classGroupDao.queryClassGroups(musicGroupId, "MUSIC");
|
|
|
+ for (ClassGroup classGroup : classGroups) {
|
|
|
+ //获取班级关联的老师列表
|
|
|
+ Set<Integer> teacherIds = classGroupTeacherMapperDao.queryTeacherIdsByClassGroupId(classGroup.getId(),null,null);
|
|
|
+ //获取班级关联的学员列表
|
|
|
+ Set<Integer> studentIds = classGroupStudentMapperDao.queryStudentIdsByClassGroupId(classGroup.getId(),null,null);
|
|
|
+ //创建IM群组
|
|
|
+ classGroupService.addImGroup(classGroup, new ArrayList<>(studentIds), new ArrayList<>(teacherIds));
|
|
|
+ }
|
|
|
+ imUserFriendService.refreshGroupImUserFriend(musicGroupId,GroupType.MUSIC);
|
|
|
//给老师发送乐团成立通知
|
|
|
Map<Integer, String> map = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertMybatisMap(musicGroupDao.queryTeacherIdMap(musicGroupId))), HashMap.class);
|
|
|
if (map != null && map.size() > 0) {
|
|
@@ -2595,7 +2563,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
//如果已生成课表,那么修改未上课时教学点
|
|
|
courseScheduleDao.updateCourseScheduleSchool("MUSIC", musicGroupId, musicGroup.getSchoolId());
|
|
|
}
|
|
|
- updateTeamTeacher(group, musicGroup);
|
|
|
+ if(group.getStatus() != MusicGroupStatusEnum.PROGRESS){
|
|
|
+ updateTeamTeacher(group, musicGroup);
|
|
|
+ }
|
|
|
|
|
|
Date date = new Date();
|
|
|
//缴费方式不同
|
|
@@ -2621,7 +2591,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (subFeeSettingDto.getMusicGroupPaymentEntities() != null && subFeeSettingDto.getMusicGroupPaymentEntities().size() > 0) {
|
|
|
musicGroupPaymentEntitiesDao.batchAdd(subFeeSettingDto.getMusicGroupPaymentEntities(), musicGroupId);
|
|
|
}
|
|
|
- imUserFriendService.refreshGroupImUserFriend(musicGroupId,GroupType.MUSIC);
|
|
|
+ if(group.getStatus() == MusicGroupStatusEnum.PROGRESS){
|
|
|
+ imUserFriendService.refreshGroupImUserFriend(musicGroupId,GroupType.MUSIC);
|
|
|
+ }
|
|
|
//记录操作日志
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "修改乐团基本信息数据", sysUser.getId(), JSONObject.toJSONString(subFeeSettingDto)));
|
|
|
}
|