Kaynağa Gözat

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 4 yıl önce
ebeveyn
işleme
12c64cc5c2

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

@@ -11,6 +11,9 @@ public class MusicGroupCourseScheduleDto {
 
     @ApiModelProperty(value = "课程编号")
     private Integer courseScheduleId;
+    
+    @ApiModelProperty(value = "课程名称")
+    private String courseScheduleName;
 
     @ApiModelProperty(value = "上课日期",required = false)
     private String classDate;
@@ -262,4 +265,12 @@ public class MusicGroupCourseScheduleDto {
         this.masterTeacherName = masterTeacherName;
     }
 
+	public String getCourseScheduleName() {
+		return courseScheduleName;
+	}
+
+	public void setCourseScheduleName(String courseScheduleName) {
+		this.courseScheduleName = courseScheduleName;
+	}
+
 }

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

@@ -175,7 +175,6 @@ public interface VipGroupService extends BaseService<Long, VipGroup> {
      * @param teacherId: 要计算课酬的老师的编号
      * @param onlineClassesUnitPrice: 线上课程单价
      * @param offlineClassesUnitPrice: 线下课程单价
-     * @param computeTotalPrice: 是否计算课程购买总价
      * @return java.util.Map
      */
     <K extends VipGroup> Map<String, BigDecimal> countVipGroupPredictFee(K vipGroup,

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

@@ -1006,8 +1006,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("指定的活动方案不存在");
 		}
 
-		Teacher teacher = teacherDao.get(teacherId);
-
 		VipGroupSalarySettlementDto vipGroupSalarySettlementDto = JSON.parseObject(vipGroupActivity.getSalarySettlementJson(), VipGroupSalarySettlementDto.class);
 
 		if(Objects.isNull(vipGroupSalarySettlementDto)){
@@ -1121,10 +1119,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 		//教师线下单课酬计算
 		if(Objects.nonNull(vipGroupSalarySettlementDto.getOfflineSalarySettlement())){
-			if(vipGroup instanceof VipGroupApplyBaseInfoDto){
-				teacherOfflineSalary=((VipGroupApplyBaseInfoDto) vipGroup).getOfflineTeacherSalary();
-				results.put("offlineTeacherSalary",teacherOfflineSalary);
-			}
 			if(Objects.isNull(teacherOfflineSalary)){
 				switch (vipGroupSalarySettlementDto.getOfflineSalarySettlement().getSalarySettlementType()){
 					case TEACHER_DEFAULT:
@@ -1149,7 +1143,19 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		}
 
 		BigDecimal ots = results.get("onlineTeacherSalary");
+		if(Objects.isNull(ots)){
+			ots = teacherDefaultVipGroupSalary.getOnlineClassesSalary();
+		}
+		if(Objects.isNull(ots)){
+			ots = BigDecimal.ZERO;
+		}
 		BigDecimal ofts = results.get("offlineTeacherSalary");
+		if(Objects.isNull(ofts)){
+			ofts = teacherDefaultVipGroupSalary.getOfflineClassesSalary();
+		}
+		if(Objects.isNull(ofts)){
+			ofts = BigDecimal.ZERO;
+		}
 		if(Objects.nonNull(vipGroup.getStatus())&&normalStudentNum!=vipGroupCategory.getStudentNum()){
 			ots = ots.divide(new BigDecimal(vipGroupCategory.getStudentNum()),CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 			ofts = ofts.divide(new BigDecimal(vipGroupCategory.getStudentNum()),CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN).multiply(new BigDecimal(normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml

@@ -754,6 +754,7 @@
         <result property="signOutStatus" column="sign_out_status_"/>
         <result property="settlementTime" column="settlement_time_"/>
         <result property="remark" column="remark_"/>
+        <result property="courseScheduleName" column="course_schedule_name_"/>
     </resultMap>
     <select id="queryMusicGroupCourseSchedule" resultMap="MusicGroupCourseScheduleDto">
         SELECT cs.id_ course_schedule_id_,cs.class_date_,cs.start_class_time_,cs.end_class_time_,cs.class_group_id_,
@@ -773,7 +774,7 @@
     </select>
 
     <select id="queryMusicGroupCourseScheduleDetail" resultMap="MusicGroupCourseScheduleDto">
-        SELECT cs.id_ course_schedule_id_,cs.class_date_,cs.start_class_time_,cs.end_class_time_,cs.class_group_id_,
+        SELECT cs.id_ course_schedule_id_,cs.class_date_,cs.start_class_time_,cs.end_class_time_,cs.class_group_id_,cs.name_ course_schedule_name_,
         cs.type_ course_schedule_type_,cs.status_ course_schedule_status_,cg.name_ course_schedule_name_,
         IF(ta.sign_in_status_ IS NULL,3,ta.sign_in_status_) sign_in_status_,
         IF(ta.sign_out_status_ IS NULL,3,ta.sign_out_status_) sign_out_status_,