|
@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.dao.*;
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
import com.ym.mec.biz.dal.entity.SalarySettlementDto;
|
|
import com.ym.mec.biz.dal.entity.SalarySettlementDto;
|
|
|
|
+import com.ym.mec.biz.dal.entity.CourseSchedule.CourseScheduleType;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.page.CourseSalaryQueryInfo4Web;
|
|
import com.ym.mec.biz.dal.page.CourseSalaryQueryInfo4Web;
|
|
import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
|
|
import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
|
|
@@ -1314,10 +1315,10 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
}
|
|
}
|
|
|
|
|
|
//课堂课课酬改为按分钟数计算,并且时长占比向下取整
|
|
//课堂课课酬改为按分钟数计算,并且时长占比向下取整
|
|
- if (courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.CLASSROOM)){
|
|
|
|
|
|
+ /*if (courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.CLASSROOM)){
|
|
baseSalary = TeachTypeEnum.BISHOP.equals(courseScheduleTeacherSalary.getTeacherRole()) ? teacherDefaultMusicGroupSalary.getMainTeacher90MinSalary() : teacherDefaultMusicGroupSalary.getAssistantTeacher90MinSalary();
|
|
baseSalary = TeachTypeEnum.BISHOP.equals(courseScheduleTeacherSalary.getTeacherRole()) ? teacherDefaultMusicGroupSalary.getMainTeacher90MinSalary() : teacherDefaultMusicGroupSalary.getAssistantTeacher90MinSalary();
|
|
classTimeDuty = new BigDecimal(classCourseDuration).divide(new BigDecimal(40), BigDecimal.ZERO.intValue(), BigDecimal.ROUND_DOWN);
|
|
classTimeDuty = new BigDecimal(classCourseDuration).divide(new BigDecimal(40), BigDecimal.ZERO.intValue(), BigDecimal.ROUND_DOWN);
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
if(Objects.isNull(baseSalary)){
|
|
if(Objects.isNull(baseSalary)){
|
|
throw new BizException("课酬设置异常");
|
|
throw new BizException("课酬设置异常");
|
|
@@ -1325,7 +1326,12 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
|
|
|
|
salary = baseSalary.multiply(classTimeDuty).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
salary = baseSalary.multiply(classTimeDuty).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
- //基础技能提高课
|
|
|
|
|
|
+ //课堂课课酬
|
|
|
|
+ if (courseSchedule.getType() == CourseScheduleType.CLASSROOM) {
|
|
|
|
+ salary = TeachTypeEnum.BISHOP.equals(courseScheduleTeacherSalary.getTeacherRole()) ? teacherDefaultMusicGroupSalary.getMainTeacher90MinSalary() : teacherDefaultMusicGroupSalary.getAssistantTeacher90MinSalary();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /*//基础技能提高课
|
|
if (courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.HIGH)) {
|
|
if (courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.HIGH)) {
|
|
salary = TeachTypeEnum.BISHOP.equals(courseScheduleTeacherSalary.getTeacherRole()) ? teacherDefaultMusicGroupSalary.getMainTeacher30MinSalary() : teacherDefaultMusicGroupSalary.getAssistantTeacher30MinSalary();
|
|
salary = TeachTypeEnum.BISHOP.equals(courseScheduleTeacherSalary.getTeacherRole()) ? teacherDefaultMusicGroupSalary.getMainTeacher30MinSalary() : teacherDefaultMusicGroupSalary.getAssistantTeacher30MinSalary();
|
|
if (settlementType.equals(SalarySettlementTypeEnum.GRADIENT_SALARY)) {
|
|
if (settlementType.equals(SalarySettlementTypeEnum.GRADIENT_SALARY)) {
|
|
@@ -1342,9 +1348,14 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
|
|
studentNum=5;
|
|
studentNum=5;
|
|
}
|
|
}
|
|
salary = salary.multiply(new BigDecimal(studentNum));
|
|
salary = salary.multiply(new BigDecimal(studentNum));
|
|
- }
|
|
|
|
- //线上小班课
|
|
|
|
- if (courseSchedule.getType().equals(CourseSchedule.CourseScheduleType.HIGH_ONLINE)) {
|
|
|
|
|
|
+ }*/
|
|
|
|
+ //基础技能提高课
|
|
|
|
+ if (courseSchedule.getType() == CourseSchedule.CourseScheduleType.HIGH_ONLINE || courseSchedule.getType() == CourseSchedule.CourseScheduleType.HIGH) {
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isBlank(teacherDefaultMusicGroupSalary.getSalaryRuleJson())){
|
|
|
|
+ throw new BizException("线上基础技能课课酬设置异常");
|
|
|
|
+ }
|
|
|
|
+
|
|
int studentNum = courseScheduleStudentPaymentDao.countCourseOnlyStudentNum(courseSchedule.getId());
|
|
int studentNum = courseScheduleStudentPaymentDao.countCourseOnlyStudentNum(courseSchedule.getId());
|
|
if(studentNum<=0){
|
|
if(studentNum<=0){
|
|
studentNum = classGroupStudentMapperDao.countClassGroupNormalStudentNum(courseSchedule.getClassGroupId());
|
|
studentNum = classGroupStudentMapperDao.countClassGroupNormalStudentNum(courseSchedule.getClassGroupId());
|