|
@@ -10,6 +10,7 @@ import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
+import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -165,6 +166,11 @@ public class TeacherDefaultMusicGroupSalaryServiceImpl extends BaseServiceImpl<L
|
|
|
int studentNum = courseScheduleStudentPaymentDao.countCourseOnlyStudentNum(ts.getCourseScheduleId());
|
|
|
ts.setExpectSalary(ts.getExpectSalary().multiply(new BigDecimal(studentNum)));
|
|
|
}
|
|
|
+ //课堂课课酬改为按分钟数计算,并且时长占比向下取整
|
|
|
+ if (CourseSchedule.CourseScheduleType.CLASSROOM.equals(tdms.getCourseScheduleType())){
|
|
|
+ ts.setExpectSalary(TeachTypeEnum.BISHOP.equals(ts.getTeacherRole()) ? tdms.getMainTeacher30MinSalary() : tdms.getAssistantTeacher30MinSalary());
|
|
|
+ ts.setExpectSalary(duration.divide(new BigDecimal(40), BigDecimal.ZERO.intValue(), BigDecimal.ROUND_DOWN).multiply(ts.getExpectSalary()).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
+ }
|
|
|
list.add(ts);
|
|
|
} else if (musicGroup.getSettlementType() == SalarySettlementTypeEnum.TEACHER_DEFAULT) {// 默认课酬
|
|
|
mins = 30;
|
|
@@ -187,6 +193,11 @@ public class TeacherDefaultMusicGroupSalaryServiceImpl extends BaseServiceImpl<L
|
|
|
int studentNum = courseScheduleStudentPaymentDao.countCourseOnlyStudentNum(ts.getCourseScheduleId());
|
|
|
ts.setExpectSalary(ts.getExpectSalary().multiply(new BigDecimal(studentNum)));
|
|
|
}
|
|
|
+ //课堂课课酬改为按分钟数计算,并且时长占比向下取整
|
|
|
+ if (CourseSchedule.CourseScheduleType.CLASSROOM.equals(tdms.getCourseScheduleType())){
|
|
|
+ ts.setExpectSalary(TeachTypeEnum.BISHOP.equals(ts.getTeacherRole()) ? tdms.getMainTeacher30MinSalary() : tdms.getAssistantTeacher30MinSalary());
|
|
|
+ ts.setExpectSalary(duration.divide(new BigDecimal(40), BigDecimal.ZERO.intValue(), BigDecimal.ROUND_DOWN).multiply(ts.getExpectSalary()).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
+ }
|
|
|
list.add(ts);
|
|
|
}
|
|
|
if(ts.getExpectSalary() == null){
|