Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

周箭河 4 lat temu
rodzic
commit
2d924ce00a

+ 5 - 15
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupStudentsDto.java

@@ -54,9 +54,7 @@ public class MusicGroupStudentsDto{
 
 
     private Boolean isActive = false;
     private Boolean isActive = false;
 
 
-    private Boolean hasVip;
-
-    private Boolean hasPractice;
+    private Boolean hasCourse;
 
 
     private Integer isLock;
     private Integer isLock;
 
 
@@ -74,20 +72,12 @@ public class MusicGroupStudentsDto{
     @ApiModelProperty(value = "欠费金额",required = false)
     @ApiModelProperty(value = "欠费金额",required = false)
     private BigDecimal noPaymentAmount;
     private BigDecimal noPaymentAmount;
 
 
-    public Boolean getHasVip() {
-        return hasVip;
-    }
-
-    public void setHasVip(Boolean hasVip) {
-        this.hasVip = hasVip;
-    }
-
-    public Boolean getHasPractice() {
-        return hasPractice;
+    public Boolean getHasCourse() {
+        return hasCourse;
     }
     }
 
 
-    public void setHasPractice(Boolean hasPractice) {
-        this.hasPractice = hasPractice;
+    public void setHasCourse(Boolean hasCourse) {
+        this.hasCourse = hasCourse;
     }
     }
 
 
     public BigDecimal getNoPaymentAmount() {
     public BigDecimal getNoPaymentAmount() {

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/VipGroupStudentDto.java

@@ -38,6 +38,28 @@ public class VipGroupStudentDto {
 
 
     private Integer studentStatus;
     private Integer studentStatus;
 
 
+    /** 线上课单价 */
+    private java.math.BigDecimal onlineClassesUnitPrice;
+
+    /** 线下课单价 */
+    private java.math.BigDecimal offlineClassesUnitPrice;
+
+    public BigDecimal getOnlineClassesUnitPrice() {
+        return onlineClassesUnitPrice;
+    }
+
+    public void setOnlineClassesUnitPrice(BigDecimal onlineClassesUnitPrice) {
+        this.onlineClassesUnitPrice = onlineClassesUnitPrice;
+    }
+
+    public BigDecimal getOfflineClassesUnitPrice() {
+        return offlineClassesUnitPrice;
+    }
+
+    public void setOfflineClassesUnitPrice(BigDecimal offlineClassesUnitPrice) {
+        this.offlineClassesUnitPrice = offlineClassesUnitPrice;
+    }
+
     public BigDecimal getBalance() {
     public BigDecimal getBalance() {
         return balance;
         return balance;
     }
     }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleStudentPayment.java

@@ -55,7 +55,7 @@ public class CourseScheduleStudentPayment implements Comparable<CourseScheduleSt
 
 
 	private String examSongDownloadJson;
 	private String examSongDownloadJson;
 
 
-	private Boolean beMerged = false;
+	private Boolean beMerged;
 
 
 	public Boolean getBeMerged() {
 	public Boolean getBeMerged() {
 		return beMerged;
 		return beMerged;

+ 11 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherDefaultVipGroupSalary.java

@@ -22,6 +22,8 @@ public class TeacherDefaultVipGroupSalary {
 	/** 课程类型 */
 	/** 课程类型 */
 	@ApiModelProperty(value = "课程类型名称(1v1,1v2)", required = false)
 	@ApiModelProperty(value = "课程类型名称(1v1,1v2)", required = false)
 	private String vipGroupCategoryName;
 	private String vipGroupCategoryName;
+
+	private Boolean musicTheory;
 	
 	
 	/** 线上课薪酬 */
 	/** 线上课薪酬 */
 	@ApiModelProperty(value = "线上课薪酬", required = false)
 	@ApiModelProperty(value = "线上课薪酬", required = false)
@@ -100,7 +102,15 @@ public class TeacherDefaultVipGroupSalary {
 	public java.util.Date getUpdateTime(){
 	public java.util.Date getUpdateTime(){
 		return this.updateTime;
 		return this.updateTime;
 	}
 	}
-			
+
+	public Boolean getMusicTheory() {
+		return musicTheory;
+	}
+
+	public void setMusicTheory(Boolean musicTheory) {
+		this.musicTheory = musicTheory;
+	}
+
 	@Override
 	@Override
 	public String toString() {
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);
 		return ToStringBuilder.reflectionToString(this);

+ 6 - 17
mec-biz/src/main/java/com/ym/mec/biz/dal/page/MusicGroupStudentQueryInfo.java

@@ -20,11 +20,8 @@ public class MusicGroupStudentQueryInfo extends QueryInfo {
   @ApiModelProperty(value = "是否激活")
   @ApiModelProperty(value = "是否激活")
   private Boolean isActive;
   private Boolean isActive;
 
 
-  @ApiModelProperty(value = "是否有未开始的vip课")
-  private Boolean hasVip;
-
-  @ApiModelProperty(value = "是否有未开始的网管课")
-  private Boolean hasPractice;
+  @ApiModelProperty(value = "是否有未开始的vip课、网管课")
+  private Boolean hasCourse;
 
 
   @ApiModelProperty(value = "是否锁定")
   @ApiModelProperty(value = "是否锁定")
   private Integer isLock;
   private Integer isLock;
@@ -37,20 +34,12 @@ public class MusicGroupStudentQueryInfo extends QueryInfo {
 
 
   private boolean isExport = false;
   private boolean isExport = false;
 
 
-  public Boolean getHasVip() {
-    return hasVip;
-  }
-
-  public void setHasVip(Boolean hasVip) {
-    this.hasVip = hasVip;
-  }
-
-  public Boolean getHasPractice() {
-    return hasPractice;
+  public Boolean getHasCourse() {
+    return hasCourse;
   }
   }
 
 
-  public void setHasPractice(Boolean hasPractice) {
-    this.hasPractice = hasPractice;
+  public void setHasCourse(Boolean hasCourse) {
+    this.hasCourse = hasCourse;
   }
   }
 
 
   public boolean getIsExport() {
   public boolean getIsExport() {

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloseQueryInfo.java

@@ -4,6 +4,9 @@ import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 
 
 public class TeacherCloseQueryInfo extends QueryInfo {
 public class TeacherCloseQueryInfo extends QueryInfo {
+    @ApiModelProperty(value = "考勤编号列表")
+    private String teacherAttendanceId;
+
     @ApiModelProperty(value = "教师编号")
     @ApiModelProperty(value = "教师编号")
     private Integer teacherId;
     private Integer teacherId;
 
 
@@ -34,6 +37,14 @@ public class TeacherCloseQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "分部")
     @ApiModelProperty(value = "分部")
     private String organId;
     private String organId;
 
 
+    public String getTeacherAttendanceId() {
+        return teacherAttendanceId;
+    }
+
+    public void setTeacherAttendanceId(String teacherAttendanceId) {
+        this.teacherAttendanceId = teacherAttendanceId;
+    }
+
     public String getCourseScheduleStatus() {
     public String getCourseScheduleStatus() {
         return courseScheduleStatus;
         return courseScheduleStatus;
     }
     }

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

@@ -5353,9 +5353,10 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		}
 		}
 		courseScheduleDao.batchUpdate(mergeCourses);
 		courseScheduleDao.batchUpdate(mergeCourses);
 
 
-//		if(!CollectionUtils.isEmpty(updatePayments)){
-//			courseScheduleStudentPaymentDao.batchUpdate(updatePayments);
-//		}
+		if(!CollectionUtils.isEmpty(courseScheduleStudentPayments)){
+			courseScheduleStudentPayments.forEach(c->c.setBeMerged(false));
+			courseScheduleStudentPaymentDao.batchUpdate(courseScheduleStudentPayments);
+		}
 		if(!CollectionUtils.isEmpty(newPayments))
 		if(!CollectionUtils.isEmpty(newPayments))
 			courseScheduleStudentPaymentDao.batchInsert(newPayments);
 			courseScheduleStudentPaymentDao.batchInsert(newPayments);
 
 

+ 8 - 12
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -385,7 +385,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
                 //未签到扣除全部课酬
                 //未签到扣除全部课酬
                 deductCost = deductCost.add(expectSalary);
                 deductCost = deductCost.add(expectSalary);
                 deductReasons.add("未签到扣除全部课酬");
                 deductReasons.add("未签到扣除全部课酬");
-            }else if(YesOrNoEnum.NO.equals(courseTeacherAttendances.get(0).getSignInStatus())){
+            }else if(YesOrNoEnum.NO.equals(courseTeacherAttendances.get(0).getSignInStatus())&&TeachModeEnum.ONLINE.equals(courseScheduleTeacherSalary.getCourseSchedule().getTeachMode())){
                 //异常签到
                 //异常签到
                 int signCourseTimeBetweenSeconds = DateUtil.secondsBetween(courseTeacherAttendances.get(0).getSignInTime(), courseScheduleTeacherSalary.getCourseSchedule().getStartClassTime());
                 int signCourseTimeBetweenSeconds = DateUtil.secondsBetween(courseTeacherAttendances.get(0).getSignInTime(), courseScheduleTeacherSalary.getCourseSchedule().getStartClassTime());
                 float signCourseTimeBetween = (float)signCourseTimeBetweenSeconds/(float)60;
                 float signCourseTimeBetween = (float)signCourseTimeBetweenSeconds/(float)60;
@@ -398,18 +398,16 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
                     deductCost = deductCost.add(expectSalary);
                     deductCost = deductCost.add(expectSalary);
                     deductReasons.add("课程开始后3分钟进入教室扣除全部课酬");
                     deductReasons.add("课程开始后3分钟进入教室扣除全部课酬");
                 }
                 }
-
-                if(TeachModeEnum.OFFLINE.equals(courseScheduleTeacherSalary.getCourseSchedule().getTeachMode())){
-                    deductCost = deductCost.add(expectSalary);
-                    deductReasons.add("点名时经纬度不在范围内扣除全部课酬");
-                }
+            }else if(YesOrNoEnum.NO.equals(courseTeacherAttendances.get(0).getSignInStatus())&&TeachModeEnum.OFFLINE.equals(courseScheduleTeacherSalary.getCourseSchedule().getTeachMode())){
+                deductCost = deductCost.add(expectSalary);
+                deductReasons.add("点名时经纬度不在范围内扣除全部课酬");
             }
             }
 
 
             if(CollectionUtils.isEmpty(courseTeacherAttendances)||Objects.isNull(courseTeacherAttendances.get(0).getSignOutStatus())){
             if(CollectionUtils.isEmpty(courseTeacherAttendances)||Objects.isNull(courseTeacherAttendances.get(0).getSignOutStatus())){
                 //未签退扣除全部课酬
                 //未签退扣除全部课酬
                 deductCost = deductCost.add(expectSalary);
                 deductCost = deductCost.add(expectSalary);
                 deductReasons.add("未签退扣除全部课酬");
                 deductReasons.add("未签退扣除全部课酬");
-            }else if(YesOrNoEnum.NO.equals(courseTeacherAttendances.get(0).getSignOutStatus())){
+            }else if(YesOrNoEnum.NO.equals(courseTeacherAttendances.get(0).getSignOutStatus())&&TeachModeEnum.ONLINE.equals(courseScheduleTeacherSalary.getCourseSchedule().getTeachMode())){
                 //异常签退
                 //异常签退
                 int signOutCourseTimeBetweenSeconds = DateUtil.secondsBetween(courseTeacherAttendances.get(0).getSignOutTime(), courseScheduleTeacherSalary.getCourseSchedule().getEndClassTime());
                 int signOutCourseTimeBetweenSeconds = DateUtil.secondsBetween(courseTeacherAttendances.get(0).getSignOutTime(), courseScheduleTeacherSalary.getCourseSchedule().getEndClassTime());
                 float signOutCourseTimeBetween = (float)signOutCourseTimeBetweenSeconds/(float)60;
                 float signOutCourseTimeBetween = (float)signOutCourseTimeBetweenSeconds/(float)60;
@@ -423,11 +421,9 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
                     deductCost = deductCost.add(expectSalary.divide(new BigDecimal(2)));
                     deductCost = deductCost.add(expectSalary.divide(new BigDecimal(2)));
                     deductReasons.add("课程结束前3分钟后至课程结束前退出教室扣除一半课酬");
                     deductReasons.add("课程结束前3分钟后至课程结束前退出教室扣除一半课酬");
                 }
                 }
-
-                if(TeachModeEnum.OFFLINE.equals(courseScheduleTeacherSalary.getCourseSchedule().getTeachMode())){
-                    deductCost = deductCost.add(expectSalary);
-                    deductReasons.add("点名时经纬度不在范围内扣除全部课酬");
-                }
+            }else if(YesOrNoEnum.NO.equals(courseTeacherAttendances.get(0).getSignInStatus())&&TeachModeEnum.OFFLINE.equals(courseScheduleTeacherSalary.getCourseSchedule().getTeachMode())){
+                deductCost = deductCost.add(expectSalary);
+                deductReasons.add("点名时经纬度不在范围内扣除全部课酬");
             }
             }
 
 
             if(BigDecimal.ZERO.compareTo(deductCost)<0){
             if(BigDecimal.ZERO.compareTo(deductCost)<0){

+ 19 - 35
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -12,6 +12,7 @@ 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.enums.CourseStatusEnum;
 import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
+import com.ym.mec.biz.dal.enums.StudentMusicGroupStatusEnum;
 import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.biz.service.SysConfigService;
 import com.ym.mec.biz.service.SysConfigService;
 
 
@@ -421,21 +422,13 @@ public class StudentManageServiceImpl implements StudentManageService {
             return pageInfo;
             return pageInfo;
         }
         }
         List<Integer> userIds = studentRegistrations.stream().map(e -> e.getUserId()).collect(Collectors.toList());
         List<Integer> userIds = studentRegistrations.stream().map(e -> e.getUserId()).collect(Collectors.toList());
-        if(queryInfo.getHasVip() != null){
+        if(queryInfo.getHasCourse() != null){
             //有剩余课程的学员
             //有剩余课程的学员
-            List<Integer> hasVipStudent = courseScheduleDao.findHasCourseStudent(userIds,"VIP");
-            if(queryInfo.getHasVip()){
-                userIds = hasVipStudent;
+            List<Integer> hasCourseStudent = courseScheduleDao.findHasCourseStudent(userIds,"VIP,PRACTICE");
+            if(queryInfo.getHasCourse()){
+                userIds = hasCourseStudent;
             }else {
             }else {
-                userIds.removeAll(hasVipStudent);
-            }
-        }
-        if(queryInfo.getHasPractice() != null && userIds.size() > 0){
-            List<Integer> hasPracticeStudent = courseScheduleDao.findHasCourseStudent(userIds,"PRACTICE");
-            if(queryInfo.getHasPractice()){
-                userIds = hasPracticeStudent;
-            }else {
-                userIds.removeAll(hasPracticeStudent);
+                userIds.removeAll(hasCourseStudent);
             }
             }
         }
         }
         if(userIds.size() == 0){
         if(userIds.size() == 0){
@@ -464,11 +457,9 @@ public class StudentManageServiceImpl implements StudentManageService {
                 }
                 }
             }
             }
             List<Integer> collect = dataList.stream().map(e -> e.getUserId()).collect(Collectors.toList());
             List<Integer> collect = dataList.stream().map(e -> e.getUserId()).collect(Collectors.toList());
-            List<Integer> hasVipStudent = courseScheduleDao.findHasCourseStudent(collect,"VIP");
-            List<Integer> hasPracticeStudent = courseScheduleDao.findHasCourseStudent(collect,"PRACTICE");
+            List<Integer> hasCourseStudent = courseScheduleDao.findHasCourseStudent(collect,"VIP,PRACTICE");
             dataList.forEach(e->{
             dataList.forEach(e->{
-                e.setHasVip(hasVipStudent.contains(e.getUserId()));
-                e.setHasPractice(hasPracticeStudent.contains(e.getUserId()));
+                e.setHasCourse(hasCourseStudent.contains(e.getUserId()));
                 e.setNoPaymentAmount(totalAmountMap.get(e.getUserId()));
                 e.setNoPaymentAmount(totalAmountMap.get(e.getUserId()));
             });
             });
         }
         }
@@ -481,7 +472,7 @@ public class StudentManageServiceImpl implements StudentManageService {
 
 
     @Override
     @Override
     public Object musicGroupStudentsSum(String musicGroupId) {
     public Object musicGroupStudentsSum(String musicGroupId) {
-        Map<String, Object> resultMap = new HashMap<>(3);
+        Map<String, Object> resultMap = new HashMap<>(4);
         //乐团在读人数
         //乐团在读人数
         resultMap.put("studying", studentManageDao.countStudyNum(musicGroupId));
         resultMap.put("studying", studentManageDao.countStudyNum(musicGroupId));
         //退团人数
         //退团人数
@@ -490,25 +481,18 @@ public class StudentManageServiceImpl implements StudentManageService {
         resultMap.put("add", studentManageDao.countAddNum(musicGroupId));
         resultMap.put("add", studentManageDao.countAddNum(musicGroupId));
         //未完成vip、网管课学员数量/该乐团在读学员人数*100%
         //未完成vip、网管课学员数量/该乐团在读学员人数*100%
         List<StudentRegistration> studentRegistrations = studentRegistrationDao.getMusicGroupStu(musicGroupId);
         List<StudentRegistration> studentRegistrations = studentRegistrationDao.getMusicGroupStu(musicGroupId);
-        if(studentRegistrations.size() == 0){
-            resultMap.put("vipRate","0.00%");
-            resultMap.put("practiceRate","0.00%");
-        }
-        List<Integer> userIds = studentRegistrations.stream().map(e -> e.getUserId()).collect(Collectors.toList());
-        List<Integer> hasVipStudent = courseScheduleDao.findHasCourseStudent(userIds,"VIP");
-        double size = userIds.size()+0d;
-        if(hasVipStudent.size() == 0){
-            resultMap.put("vipRate","0.00%");
-        }else {
-            double d = (hasVipStudent.size() / size) * 100;
-            resultMap.put("vipRate",String.format("%.2f", d) + "%");
+        List<Integer> userIds = studentRegistrations.stream().filter(e -> e.getMusicGroupStatus() != StudentMusicGroupStatusEnum.QUIT).map(StudentRegistration::getUserId).collect(Collectors.toList());
+        if(userIds.size() == 0){
+            resultMap.put("courseRate","0.00%");
+            return resultMap;
         }
         }
-        List<Integer> hasPracticeStudent = courseScheduleDao.findHasCourseStudent(userIds,"PRACTICE");
-        if(hasPracticeStudent.size() == 0){
-            resultMap.put("practiceRate","0.00%");
+        List<Integer> hasCourseStudent = courseScheduleDao.findHasCourseStudent(userIds,"VIP,PRACTICE");
+        double size = userIds.size() + 0d;
+        if(hasCourseStudent.size() == 0){
+            resultMap.put("courseRate","0.00%");
         }else {
         }else {
-            double d = (hasPracticeStudent.size() / size) * 100;
-            resultMap.put("practiceRate",String.format("%.2f", d) + "%");
+            double d = (hasCourseStudent.size() / size) * 100;
+            resultMap.put("courseRate",String.format("%.2f", d) + "%");
         }
         }
         return resultMap;
         return resultMap;
     }
     }

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

@@ -326,16 +326,24 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
         if(Objects.isNull(vipGroupDefaultClassesUnitPrice)){
         if(Objects.isNull(vipGroupDefaultClassesUnitPrice)){
             vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
             vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
         }else{
         }else{
-            if(Objects.nonNull(vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice())
-                    &&vipGroupApplyBaseInfoDto.getOfflineClassesUnitPrice().compareTo(vipGroupDefaultClassesUnitPrice.getOfflineClassesUnitPrice())!=0){
-                vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
-            }
-            if(Objects.nonNull(vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice())
-                    &&vipGroupApplyBaseInfoDto.getOnlineClassesUnitPrice().compareTo(vipGroupDefaultClassesUnitPrice.getOnlineClassesUnitPrice())!=0){
-                vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
-            }
+			for (VipGroupStudentCoursePrice vscp : vscps) {
+				if(Objects.nonNull(vscp.getOfflineClassesUnitPrice())
+						&&vscp.getOfflineClassesUnitPrice().compareTo(vipGroupDefaultClassesUnitPrice.getOfflineClassesUnitPrice())!=0){
+					vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
+					break;
+				}
+				if(Objects.nonNull(vscp.getOnlineClassesUnitPrice())
+						&&vscp.getOnlineClassesUnitPrice().compareTo(vipGroupDefaultClassesUnitPrice.getOnlineClassesUnitPrice())!=0){
+					vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.ING);
+					break;
+				}
+			}
         }
         }
 
 
+        if(StringUtils.isBlank(vipGroupApplyBaseInfoDto.getStudentIdList())){
+			vipGroupApplyBaseInfoDto.setStudentIdList(StringUtils.join(vscps.stream().map(VipGroupStudentCoursePrice::getStudentId).collect(Collectors.toList()), ","));
+		}
+
         if(vipGroup.getOnlyProgress()){
         if(vipGroup.getOnlyProgress()){
 			vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.PASS);
 			vipGroupApplyBaseInfoDto.setAuditStatus(AuditStatusEnum.PASS);
 		}
 		}
@@ -791,12 +799,23 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		Map<String, Object> params = new HashMap<String, Object>();
 		Map<String, Object> params = new HashMap<String, Object>();
 		MapUtil.populateMap(params, queryInfo);
 		MapUtil.populateMap(params, queryInfo);
 
 
-		List dataList = null;
+		List<VipGroupStudentDto> dataList = null;
 		int count = vipGroupDao.countHaveCourseBalanceStudentNum(params);
 		int count = vipGroupDao.countHaveCourseBalanceStudentNum(params);
 		if (count > 0) {
 		if (count > 0) {
 			pageInfo.setTotal(count);
 			pageInfo.setTotal(count);
 			params.put("offset", pageInfo.getOffset());
 			params.put("offset", pageInfo.getOffset());
 			dataList = vipGroupDao.findHaveCourseBalanceStudents(params);
 			dataList = vipGroupDao.findHaveCourseBalanceStudents(params);
+
+			List<VipGroupStudentCoursePrice> vipGroupStudentCoursePrices = vipGroupStudentCoursePriceDao.getVipGroupStudentCoursePrice(queryInfo.getVipGroupId(), null);
+			Map<Integer, VipGroupStudentCoursePrice> userPriceMap = vipGroupStudentCoursePrices.stream().collect(Collectors.toMap(VipGroupStudentCoursePrice::getStudentId, v -> v, (v1, v2) -> v1));
+			for (VipGroupStudentDto vipGroupStudentDto : dataList) {
+				if(!userPriceMap.containsKey(vipGroupStudentDto.getId())){
+					continue;
+				}
+				VipGroupStudentCoursePrice vipGroupStudentCoursePrice = userPriceMap.get(vipGroupStudentDto.getId());
+				vipGroupStudentDto.setOnlineClassesUnitPrice(vipGroupStudentCoursePrice.getOnlineClassesUnitPrice());
+				vipGroupStudentDto.setOfflineClassesUnitPrice(vipGroupStudentCoursePrice.getOfflineClassesUnitPrice());
+			}
 		}
 		}
 		if (count == 0) {
 		if (count == 0) {
 			dataList = new ArrayList<>();
 			dataList = new ArrayList<>();
@@ -1110,7 +1129,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		if(Objects.isNull(vipGroupActivity)||vipGroupCategory.getMusicTheory()){
 		if(Objects.isNull(vipGroupActivity)||vipGroupCategory.getMusicTheory()){
 			BigDecimal ots = teacherDefaultVipGroupSalary.getOfflineClassesSalary();
 			BigDecimal ots = teacherDefaultVipGroupSalary.getOfflineClassesSalary();
 			BigDecimal ofts = teacherDefaultVipGroupSalary.getOfflineClassesSalary();
 			BigDecimal ofts = teacherDefaultVipGroupSalary.getOfflineClassesSalary();
-			if(Objects.nonNull(vipGroup.getStatus())&&normalStudentNum!=vipGroupCategory.getStudentNum()){
+			if(Objects.nonNull(vipGroup.getStatus())&&vipGroupCategory.getMusicTheory()){
 				ots = ots.multiply(new BigDecimal(normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 				ots = ots.multiply(new BigDecimal(normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 				ofts = ofts.multiply(new BigDecimal(normalStudentNum>5?5:normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 				ofts = ofts.multiply(new BigDecimal(normalStudentNum>5?5:normalStudentNum)).setScale(CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
 			}
 			}
@@ -2998,7 +3017,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 				surplusCoursesPrice=surplusCoursesPrice.multiply(discount).setScale(CommonConstants.DECIMAL_FINAL_PLACE,BigDecimal.ROUND_HALF_UP);
 				surplusCoursesPrice=surplusCoursesPrice.multiply(discount).setScale(CommonConstants.DECIMAL_FINAL_PLACE,BigDecimal.ROUND_HALF_UP);
 			}
 			}
 
 
-			sysUserCashAccountService.subtractFromCourseBalanceAndBalance(studentId,surplusCoursesPrice,PlatformCashAccountDetailTypeEnum.PAY_FEE, "后台添加学员扣减账户金额");
+			sysUserCashAccountService.subtractFromCourseBalanceAndBalance(studentId,surplusCoursesPrice,PlatformCashAccountDetailTypeEnum.PAY_FEE, "后台添加学员金额扣减");
 
 
 			List<CourseScheduleStudentPayment> courseScheduleStudentPayments=new ArrayList<>();
 			List<CourseScheduleStudentPayment> courseScheduleStudentPayments=new ArrayList<>();
 
 

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

@@ -3546,7 +3546,7 @@
             #{item}
             #{item}
         </foreach>
         </foreach>
         AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW()
         AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW()
-        AND cs.group_type_ = #{groupType}
+        AND FIND_IN_SET(cs.group_type_,#{groupType})
         GROUP BY cssp.user_id_
         GROUP BY cssp.user_id_
     </select>
     </select>
 </mapper>
 </mapper>

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

@@ -203,7 +203,7 @@
                 AND FIND_IN_SET(organ_id_,#{organId})
                 AND FIND_IN_SET(organ_id_,#{organId})
             </if>
             </if>
             <if test="musicGroupName != null and musicGroupName != ''">
             <if test="musicGroupName != null and musicGroupName != ''">
-                AND (name_ LIKE CONCAT('%',#{musicGroupName},'%') or id_ like CONCAT('%',#{musicGroupName},'%'))
+                AND (name_ LIKE CONCAT('%',#{musicGroupName},'%') OR id_ LIKE CONCAT('%',#{musicGroupName},'%'))
             </if>
             </if>
             <if test="chargeTypeId != null">
             <if test="chargeTypeId != null">
                 AND charge_type_id_ = #{chargeTypeId}
                 AND charge_type_id_ = #{chargeTypeId}

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml

@@ -308,6 +308,9 @@
             <if test="organId != null and organId != ''">
             <if test="organId != null and organId != ''">
                 AND FIND_IN_SET(cs.organ_id_,#{organId})
                 AND FIND_IN_SET(cs.organ_id_,#{organId})
             </if>
             </if>
+            <if test="teacherAttendanceId != null and teacherAttendanceId != ''">
+                AND FIND_IN_SET(ta.id_,#{teacherAttendanceId})
+            </if>
         </where>
         </where>
     </sql>
     </sql>
 
 

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

@@ -11,6 +11,7 @@
         <result column="user_id_" property="userId"/>
         <result column="user_id_" property="userId"/>
         <result column="vip_group_category_id_" property="vipGroupCategoryId"/>
         <result column="vip_group_category_id_" property="vipGroupCategoryId"/>
         <result column="vip_group_category_name_" property="vipGroupCategoryName"/>
         <result column="vip_group_category_name_" property="vipGroupCategoryName"/>
+        <result column="music_theory_" property="musicTheory"/>
         <result column="online_classes_salary_" property="onlineClassesSalary"/>
         <result column="online_classes_salary_" property="onlineClassesSalary"/>
         <result column="offline_classes_salary_" property="offlineClassesSalary"/>
         <result column="offline_classes_salary_" property="offlineClassesSalary"/>
         <result column="create_time_" property="createTime"/>
         <result column="create_time_" property="createTime"/>
@@ -75,7 +76,7 @@
 
 
     <!-- 分页查询 -->
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="TeacherDefaultVipGroupSalary" parameterType="map">
     <select id="queryPage" resultMap="TeacherDefaultVipGroupSalary" parameterType="map">
-        SELECT tdvgs.*,vgc.name_ vip_group_category_name_ FROM teacher_default_vip_group_salary tdvgs
+        SELECT tdvgs.*,vgc.name_ vip_group_category_name_,vgc.music_theory_ FROM teacher_default_vip_group_salary tdvgs
         LEFT JOIN  vip_group_category vgc ON tdvgs.vip_group_category_id_ = vgc.id_
         LEFT JOIN  vip_group_category vgc ON tdvgs.vip_group_category_id_ = vgc.id_
         <where>
         <where>
             <if test="search != null and search != ''">
             <if test="search != null and search != ''">