|
@@ -3,9 +3,7 @@ package com.ym.mec.biz.service.impl;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.MUSIC;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.MUSIC;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.PRACTICE;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.PRACTICE;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.VIP;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.VIP;
|
|
-import static com.ym.mec.biz.dal.enums.PracticeGroupType.CHARGE;
|
|
|
|
-import static com.ym.mec.biz.dal.enums.PracticeGroupType.FREE;
|
|
|
|
-import static com.ym.mec.biz.dal.enums.PracticeGroupType.TRIAL;
|
|
|
|
|
|
+import static com.ym.mec.biz.dal.enums.PracticeGroupType.*;
|
|
|
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.lang.reflect.InvocationTargetException;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
@@ -3357,6 +3355,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
ts.setExpectSalary(teacherSalary);
|
|
ts.setExpectSalary(teacherSalary);
|
|
|
|
|
|
} else if (newCourseSchedule.getGroupType() == PRACTICE) {
|
|
} else if (newCourseSchedule.getGroupType() == PRACTICE) {
|
|
|
|
+ PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(newCourseSchedule.getMusicGroupId()));
|
|
|
|
+ if(Objects.isNull(practiceGroup)){
|
|
|
|
+ throw new BizException("课程组信息错误");
|
|
|
|
+ }
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaryList = teacherDefaultPracticeGroupSalaryDao
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaryList = teacherDefaultPracticeGroupSalaryDao
|
|
.queryByUserId(teacherId);
|
|
.queryByUserId(teacherId);
|
|
if (teacherDefaultPracticeGroupSalaryList != null && teacherDefaultPracticeGroupSalaryList.size() > 0) {
|
|
if (teacherDefaultPracticeGroupSalaryList != null && teacherDefaultPracticeGroupSalaryList.size() > 0) {
|
|
@@ -3364,6 +3366,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
} else {
|
|
} else {
|
|
throw new BizException("请设置老师 的网管课课酬");
|
|
throw new BizException("请设置老师 的网管课课酬");
|
|
}
|
|
}
|
|
|
|
+ if(Objects.nonNull(practiceGroup)&& !PracticeGroupType.CHARGE.equals(practiceGroup.getType()) && !PracticeGroupType.COME_ON_PACKAGE.equals(practiceGroup.getType())){
|
|
|
|
+ SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
|
|
|
|
+ ts.setExpectSalary(new BigDecimal(practiceCourseSalaryConfig.getParanValue()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if(ts.getExpectSalary() == null){
|
|
if(ts.getExpectSalary() == null){
|
|
throw new BizException("请设置老师的课酬");
|
|
throw new BizException("请设置老师的课酬");
|
|
@@ -4564,7 +4570,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
|
|
|
|
PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(oldCourseSchedule.getMusicGroupId()));
|
|
PracticeGroup practiceGroup = practiceGroupDao.get(Long.valueOf(oldCourseSchedule.getMusicGroupId()));
|
|
if(practiceGroup.getType() != TRIAL){
|
|
if(practiceGroup.getType() != TRIAL){
|
|
- if(practiceGroup.getType() != FREE){
|
|
|
|
|
|
+ if(CHARGE.equals(practiceGroup.getType())||COME_ON_PACKAGE.equals(practiceGroup.getType())){
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
|
|
if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
|
|
if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
|
|
throw new BizException("请设置老师默认课酬");
|
|
throw new BizException("请设置老师默认课酬");
|
|
@@ -4667,7 +4673,7 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
|
|
courseScheduleDao.batchUpdate(courseSchedules);
|
|
courseScheduleDao.batchUpdate(courseSchedules);
|
|
Set<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toSet());
|
|
Set<Long> courseScheduleIds = courseSchedules.stream().map(e -> e.getId()).collect(Collectors.toSet());
|
|
if(practiceGroup.getType() != TRIAL){
|
|
if(practiceGroup.getType() != TRIAL){
|
|
- if(CHARGE == practiceGroup.getType()){
|
|
|
|
|
|
+ if(CHARGE == practiceGroup.getType() || COME_ON_PACKAGE.equals(practiceGroup.getType())){
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
|
|
List<TeacherDefaultPracticeGroupSalary> teacherDefaultPracticeGroupSalaries = teacherDefaultPracticeGroupSalaryDao.queryByUserId(teacherId);
|
|
if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
|
|
if(teacherDefaultPracticeGroupSalaries == null || teacherDefaultPracticeGroupSalaries.size() == 0){
|
|
throw new BizException("请设置老师默认课酬");
|
|
throw new BizException("请设置老师默认课酬");
|