Browse Source

Merge branch 'vip_group_activity'

Joburgess 4 years ago
parent
commit
153831f0fd

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherAttendancesDto.java

@@ -79,6 +79,17 @@ public class TeacherAttendancesDto {
     @ApiModelProperty(value = "申述处理状态",required = false)
     private ComplaintsStatusEnum complaintsStatus;
 
+    /** 结算时间 */
+    private java.util.Date settlementTime;
+
+    public Date getSettlementTime() {
+        return settlementTime;
+    }
+
+    public void setSettlementTime(Date settlementTime) {
+        this.settlementTime = settlementTime;
+    }
+
     public String getDisposeContent() {
         return disposeContent;
     }

+ 11 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -666,11 +666,18 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 							}else if (practiceGroup.getType() == TRIAL){
 								courseScheduleTeacherSalary.setExpectSalary(new BigDecimal(0));
 							}else {
-								BigDecimal salary = teacherPracticeSalaryMap.get(cgtm.getUserId());
-								if (salary == null) {
-									throw new BizException("请设置老师网管课课酬");
+								SysConfig practiceCourseSalaryConfig = sysConfigService.findByParamName(SysConfigService.PRACTICE_COURSE_SALARY);
+								BigDecimal freeTeacherSalary = new BigDecimal(practiceCourseSalaryConfig.getParanValue());
+
+								if(Objects.nonNull(oldCourseMainTeacherSalary)&&freeTeacherSalary.compareTo(oldCourseMainTeacherSalary.getExpectSalary())==0){
+									courseScheduleTeacherSalary.setExpectSalary(freeTeacherSalary);
+								}else{
+									BigDecimal salary = teacherPracticeSalaryMap.get(cgtm.getUserId());
+									if (salary == null) {
+										throw new BizException("请设置老师网管课课酬");
+									}
+									courseScheduleTeacherSalary.setExpectSalary(salary);
 								}
-								courseScheduleTeacherSalary.setExpectSalary(salary);
 							}
 						} else if (type == CourseScheduleType.VIP) {
 

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -1480,6 +1480,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
             t.setTeacherId(courseScheduleTeacherSalary.getUserId());
             t.setTeacherName(idUserMap.containsKey(t.getTeacherId())?idUserMap.get(t.getTeacherId()).getUserName():"");
             t.setTeacherRole(courseScheduleTeacherSalary.getTeacherRole());
+            t.setSettlementTime(courseScheduleTeacherSalary.getSettlementTime());
             if(idTeacherAttendanceMap.containsKey(t.getTeacherId())){
                 TeacherAttendance teacherAttendance = idTeacherAttendanceMap.get(t.getTeacherId());
                 t.setTeacherAttendance(teacherAttendance);

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -242,7 +242,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		//获取活动信息
 		VipGroupActivity vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupApplyBaseInfo().getVipGroupActivityId());
-		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getStudentMaxUsedTimes())&&StringUtils.isNotBlank(vipGroupApplyBaseInfoDto.getStudentIdList())){
+		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getStudentMaxUsedTimes())&&vipGroupActivity.getStudentMaxUsedTimes()!=-1&&StringUtils.isNotBlank(vipGroupApplyBaseInfoDto.getStudentIdList())){
 			List<String> tempStudentIds = Arrays.asList(vipGroupApplyBaseInfoDto.getStudentIdList().split(","));
 			for (String studentIdStr : tempStudentIds) {
 				int useNum = vipGroupDao.countStudentUserActivityNum(vipGroup.getVipGroupApplyBaseInfo().getVipGroupActivityId(), Integer.valueOf(studentIdStr));
@@ -268,7 +268,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			}
 		}
 
-		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getMinCourseNum())&&Objects.nonNull(vipGroupActivity.getMaxCourseNum())){
+		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getMinCourseNum())&&vipGroupActivity.getMinCourseNum()!=-1&&Objects.nonNull(vipGroupActivity.getMaxCourseNum())&&vipGroupActivity.getMaxCourseNum()!=-1){
 			Integer requestCourseNum = vipGroupApplyBaseInfoDto.getOnlineClassesNum() + vipGroupApplyBaseInfoDto.getOfflineClassesNum();
 			if(requestCourseNum.compareTo(vipGroupActivity.getMinCourseNum())<0||requestCourseNum.compareTo(vipGroupActivity.getMaxCourseNum())>0){
 				throw new BizException("该活动课时数为{}节~{}节", vipGroupActivity.getMinCourseNum(), vipGroupActivity.getMaxCourseNum());
@@ -1512,7 +1512,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId().intValue());
 		}
 
-		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getStudentMaxUsedTimes())){
+		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getStudentMaxUsedTimes())&&vipGroupActivity.getStudentMaxUsedTimes()!=-1){
 			int useNum = vipGroupDao.countStudentUserActivityNum(vipGroup.getVipGroupActivityId(), Integer.valueOf(user.getId()));
 			if(useNum>vipGroupActivity.getStudentMaxUsedTimes()){
 				throw new BizException("当前活动可购买次数为{}次", vipGroupActivity.getStudentMaxUsedTimes());
@@ -2909,7 +2909,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			vipGroupActivity = vipGroupActivityDao.get(vipGroup.getVipGroupActivityId().intValue());
 		}
 
-		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getStudentMaxUsedTimes())&&!CollectionUtils.isEmpty(studentIds)){
+		if(Objects.nonNull(vipGroupActivity)&&Objects.nonNull(vipGroupActivity.getStudentMaxUsedTimes())&&vipGroupActivity.getStudentMaxUsedTimes()!=-1&&!CollectionUtils.isEmpty(studentIds)){
 			for (Integer studentId : studentIds) {
 				int useNum = vipGroupDao.countStudentUserActivityNum(vipGroup.getVipGroupActivityId(), Integer.valueOf(studentId));
 				if(useNum>vipGroupActivity.getStudentMaxUsedTimes()){

+ 0 - 6
mec-biz/src/main/resources/config/mybatis/StudentExtracurricularExercisesSituationMapper.xml

@@ -564,9 +564,6 @@
 		FROM
 			student_extracurricular_exercises_situation_ sees
 			LEFT JOIN teacher tea ON tea.id_=sees.teacher_id_
-			<if test="unDone!=null and unDone==1">
-				LEFT JOIN teacher_remind tm ON sees.monday_=tm.monday_ AND sees.teacher_id_=tm.teacher_id_
-			</if>
 			LEFT JOIN organization organ ON organ.id_=tea.organ_id_
 			LEFT JOIN sys_user su ON tea.id_=su.id_
 		<include refid="queryTeacherServeInfoCondition" />
@@ -616,9 +613,6 @@
 			FROM
 				student_extracurricular_exercises_situation_ sees
 				LEFT JOIN teacher tea ON tea.id_=sees.teacher_id_
-				<if test="unDone!=null and unDone==1">
-					LEFT JOIN teacher_remind tm ON sees.monday_=tm.monday_ AND sees.teacher_id_=tm.teacher_id_
-				</if>
 			<include refid="queryTeacherServeInfoCondition" />
 			GROUP BY sees.monday_,sees.sunday_,sees.teacher_id_
 			<trim prefix="HAVING" prefixOverrides="AND">