|
@@ -11,6 +11,7 @@ import com.ym.mec.biz.dal.entity.*;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.page.PracticeGroupQueryInfo;
|
|
import com.ym.mec.biz.dal.page.PracticeGroupQueryInfo;
|
|
import com.ym.mec.biz.service.*;
|
|
import com.ym.mec.biz.service.*;
|
|
|
|
+import com.ym.mec.common.constant.CommonConstants;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.controller.BaseController;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
@@ -105,6 +106,8 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
private GroupClassService groupService;
|
|
private GroupClassService groupService;
|
|
@Autowired
|
|
@Autowired
|
|
private PracticeGroupSellPriceDao practiceGroupSellPriceDao;
|
|
private PracticeGroupSellPriceDao practiceGroupSellPriceDao;
|
|
|
|
+ @Autowired
|
|
|
|
+ private TeacherDefaultPracticeGroupSalaryDao teacherDefaultPracticeGroupSalaryDao;
|
|
|
|
|
|
private static Map<Integer, Map<Integer, List<Integer>>> schoolSubjectTeachersMap;
|
|
private static Map<Integer, Map<Integer, List<Integer>>> schoolSubjectTeachersMap;
|
|
|
|
|
|
@@ -2686,6 +2689,12 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
courseSchedule.setIsLock(1);
|
|
courseSchedule.setIsLock(1);
|
|
}
|
|
}
|
|
courseScheduleDao.batchAddCourseSchedules(practiceCourses);
|
|
courseScheduleDao.batchAddCourseSchedules(practiceCourses);
|
|
|
|
+ TeacherDefaultPracticeGroupSalary teacherDefaultPracticeGroupSalary = teacherDefaultPracticeGroupSalaryDao.findByTeacherAndCourseMinutes(practiceGroupBuyParams.getUserId(),practiceCourseMinutes);
|
|
|
|
+ BigDecimal teacherDefaultSalary=new BigDecimal(practiceCourseSalaryConfig.getParanValue());
|
|
|
|
+ if(Objects.nonNull(teacherDefaultPracticeGroupSalary)){
|
|
|
|
+ teacherDefaultSalary=teacherDefaultPracticeGroupSalary.getMainTeacherSalary();
|
|
|
|
+ }
|
|
|
|
+ BigDecimal studentSingleCourseCost=amount.divide(new BigDecimal(practiceCourses.size()),CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
|
|
for (CourseSchedule courseSchedule : practiceCourses) {
|
|
for (CourseSchedule courseSchedule : practiceCourses) {
|
|
//课程与老师薪水表
|
|
//课程与老师薪水表
|
|
CourseScheduleTeacherSalary courseScheduleTeacherSalary = new CourseScheduleTeacherSalary();
|
|
CourseScheduleTeacherSalary courseScheduleTeacherSalary = new CourseScheduleTeacherSalary();
|
|
@@ -2694,7 +2703,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
courseScheduleTeacherSalary.setMusicGroupId(practiceGroupBuyParams.getId().toString());
|
|
courseScheduleTeacherSalary.setMusicGroupId(practiceGroupBuyParams.getId().toString());
|
|
courseScheduleTeacherSalary.setTeacherRole(classGroupTeacherMapper.getTeacherRole());
|
|
courseScheduleTeacherSalary.setTeacherRole(classGroupTeacherMapper.getTeacherRole());
|
|
courseScheduleTeacherSalary.setUserId(practiceGroupBuyParams.getUserId());
|
|
courseScheduleTeacherSalary.setUserId(practiceGroupBuyParams.getUserId());
|
|
- courseScheduleTeacherSalary.setExpectSalary(new BigDecimal(practiceCourseSalaryConfig.getParanValue()));
|
|
|
|
|
|
+ courseScheduleTeacherSalary.setExpectSalary(teacherDefaultSalary);
|
|
courseScheduleTeacherSalary.setCreateTime(now);
|
|
courseScheduleTeacherSalary.setCreateTime(now);
|
|
courseScheduleTeacherSalary.setUpdateTime(now);
|
|
courseScheduleTeacherSalary.setUpdateTime(now);
|
|
courseScheduleTeacherSalary.setClassGroupId(classGroup.getId());
|
|
courseScheduleTeacherSalary.setClassGroupId(classGroup.getId());
|
|
@@ -2706,7 +2715,7 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
|
|
courseScheduleStudentPayment.setMusicGroupId(practiceGroupBuyParams.getId().toString());
|
|
courseScheduleStudentPayment.setMusicGroupId(practiceGroupBuyParams.getId().toString());
|
|
courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
courseScheduleStudentPayment.setUserId(practiceGroupBuyParams.getStudentId());
|
|
courseScheduleStudentPayment.setUserId(practiceGroupBuyParams.getStudentId());
|
|
- courseScheduleStudentPayment.setExpectPrice(BigDecimal.ZERO);
|
|
|
|
|
|
+ courseScheduleStudentPayment.setExpectPrice(studentSingleCourseCost);
|
|
courseScheduleStudentPayment.setClassGroupId(classGroup.getId());
|
|
courseScheduleStudentPayment.setClassGroupId(classGroup.getId());
|
|
courseScheduleStudentPayment.setCreateTime(now);
|
|
courseScheduleStudentPayment.setCreateTime(now);
|
|
courseScheduleStudentPayment.setUpdateTime(now);
|
|
courseScheduleStudentPayment.setUpdateTime(now);
|