|
@@ -3503,7 +3503,13 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(classGroupIds))), HashMap.class);
|
|
Map<Integer, Integer> studyNums = JSONObject.parseObject(JSONObject.toJSONString(MapUtil.convertIntegerMap(classGroupDao.countStudyNum(classGroupIds))), HashMap.class);
|
|
|
|
|
|
Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroupSet, null));
|
|
Map<Integer, Long> totalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countTotalNumByClassGroupId(classGroupSet, null));
|
|
- Map<Integer, Long> preTotalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreTotalNumByClassGroupId(classGroupSet));
|
|
|
|
|
|
+ MusicGroupSchoolTermCourseDetail termCourseDetail = musicGroupSchoolTermCourseDetailDao.findByCourseDateAndMusicGroupId(musicGroupId, null);
|
|
|
|
+ Map<Integer, Long> preTotalNumMap = null;
|
|
|
|
+ Map<Integer, Long> preSubMinutesMap = null;
|
|
|
|
+ if(termCourseDetail != null){
|
|
|
|
+ preTotalNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreTotalNumByClassGroupId(classGroupSet));
|
|
|
|
+ preSubMinutesMap = MapUtil.convertIntegerMap(courseScheduleDao.countPreSubMinutesByClassGroupId(classGroupSet,termCourseDetail.getId()));
|
|
|
|
+ }
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroupSet));
|
|
Map<Integer, Long> currentNumMap = MapUtil.convertIntegerMap(courseScheduleDao.countExpendNumByClassGroupId(classGroupSet));
|
|
|
|
|
|
for (ClassGroupTeachersDto classGroup : classGroups) {
|
|
for (ClassGroupTeachersDto classGroup : classGroups) {
|
|
@@ -3515,18 +3521,27 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
classGroup.setClassGroupTeacherMapperList(classGroupTeacherMappers);
|
|
classGroup.setClassGroupTeacherMapperList(classGroupTeacherMappers);
|
|
classGroup.setStudentNum(studyNums.get(classGroup.getId()));
|
|
classGroup.setStudentNum(studyNums.get(classGroup.getId()));
|
|
int totalClassTimes = 0;
|
|
int totalClassTimes = 0;
|
|
- int preTotalClassTimes = 0;
|
|
|
|
int currentClassTimes = 0;
|
|
int currentClassTimes = 0;
|
|
- if (preTotalNumMap.containsKey(classGroup.getId())) {
|
|
|
|
- preTotalClassTimes = preTotalNumMap.get(classGroup.getId()).intValue();
|
|
|
|
|
|
+ if(preSubMinutesMap != null){
|
|
|
|
+ if (preSubMinutesMap.containsKey(classGroup.getId())) {
|
|
|
|
+ Long aLong = preSubMinutesMap.get(classGroup.getId());
|
|
|
|
+ classGroup.setPreSubMinutes(aLong==null?0:aLong.intValue());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(preTotalNumMap != null){
|
|
|
|
+ if (preTotalNumMap.containsKey(classGroup.getId())) {
|
|
|
|
+ Long aLong = preTotalNumMap.get(classGroup.getId());
|
|
|
|
+ classGroup.setPreTotalClassTimes(aLong==null?0:aLong.intValue());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
if (totalNumMap.containsKey(classGroup.getId())) {
|
|
if (totalNumMap.containsKey(classGroup.getId())) {
|
|
totalClassTimes = totalNumMap.get(classGroup.getId()).intValue();
|
|
totalClassTimes = totalNumMap.get(classGroup.getId()).intValue();
|
|
}
|
|
}
|
|
if (currentNumMap.containsKey(classGroup.getId())) {
|
|
if (currentNumMap.containsKey(classGroup.getId())) {
|
|
currentClassTimes = currentNumMap.get(classGroup.getId()).intValue();
|
|
currentClassTimes = currentNumMap.get(classGroup.getId()).intValue();
|
|
}
|
|
}
|
|
- classGroup.setPreTotalClassTimes(preTotalClassTimes);
|
|
|
|
|
|
+
|
|
classGroup.setTotalClassTimes(totalClassTimes);
|
|
classGroup.setTotalClassTimes(totalClassTimes);
|
|
classGroup.setCurrentClassTimes(currentClassTimes);
|
|
classGroup.setCurrentClassTimes(currentClassTimes);
|
|
}
|
|
}
|
|
@@ -4344,6 +4359,10 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
|
|
}
|
|
}
|
|
//获取分布默认的课程类型单价
|
|
//获取分布默认的课程类型单价
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
|
|
MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
|
|
|
|
+ //主班乐团不能是系统收费团
|
|
|
|
+ if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
|
|
+ throw new BizException("操作失败:主班乐团不能是系统收费团");
|
|
|
|
+ }
|
|
Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getChargeTypeId(), musicGroup.getOrganId()));
|
|
Map<String, BigDecimal> unitPriceMap = MapUtil.convertIntegerMap(organizationCourseUnitPriceSettingsDao.queryMapByOrganIdAndChargeTypeId(musicGroup.getChargeTypeId(), musicGroup.getOrganId()));
|
|
Set<String> masterKeySet = masterMap.keySet();
|
|
Set<String> masterKeySet = masterMap.keySet();
|
|
//计算主班课程类型剩余价值
|
|
//计算主班课程类型剩余价值
|