zouxuan %!s(int64=4) %!d(string=hai) anos
pai
achega
161a2ad0f4

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalenderStudentDetail.java

@@ -168,14 +168,14 @@ public class MusicGroupPaymentCalenderStudentDetail {
 		if (o == null || getClass() != o.getClass()) return false;
 		MusicGroupPaymentCalenderStudentDetail that = (MusicGroupPaymentCalenderStudentDetail) o;
 		return userId.equals(that.userId) &&
-				courseOriginalPrice.equals(that.courseOriginalPrice) &&
-				courseCurrentPrice.equals(that.courseCurrentPrice) &&
+				courseOriginalPrice.doubleValue()==(that.courseOriginalPrice.doubleValue()) &&
+				courseCurrentPrice.doubleValue()==(that.courseCurrentPrice.doubleValue()) &&
 				courseType.equals(that.courseType) &&
 				classGroupId.equals(that.classGroupId);
 	}
 
 	@Override
 	public int hashCode() {
-		return Objects.hash(userId, courseOriginalPrice, courseCurrentPrice, courseType, classGroupId);
+		return Objects.hash(userId, courseOriginalPrice.doubleValue(), courseCurrentPrice.doubleValue(), courseType, classGroupId);
 	}
 }

+ 8 - 9
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java

@@ -3724,23 +3724,22 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         MusicGroup musicGroup = musicGroupDao.findByClassGroupId(masterClassGroupId);
         BigDecimal masterTotalPrice = getMasterTotalPrice(masterClassGroupId);
         //是否有需要审核的缴费项目
-        //将学员加入新乐团、扣除原乐团剩余课程余额、补充到现有乐团
         List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = paymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
 
-        Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = calenderStudentDetails.stream().collect(Collectors.groupingBy(e -> e.getUserId()));
-        for (Map<Integer, String> classGroupStudent : classGroupStudents) {
-            Integer classGroupId = classGroupStudent.keySet().iterator().next();
-            studentRegistrationService.insertStudent(classGroupStudent.get(classGroupId),musicGroupDao.findByClassGroupId(classGroupId).getId(),musicGroup.getId(),collect);
-        }
-
         paymentCalenderDto.setMusicGroupId(musicGroup.getId());
-
-        boolean containsAll = ListUtil.isEquals(musicGroupPaymentCalenderStudentDetails,calenderStudentDetails);
+        boolean containsAll = musicGroupPaymentCalenderStudentDetails.containsAll(calenderStudentDetails);
         if(!containsAll){
             paymentCalenderDto.setStatus(AUDITING);
         }else {
             paymentCalenderDto.setStatus(NO);
         }
+
+        //将学员加入新乐团、扣除原乐团剩余课程余额、补充到现有乐团
+        Map<Integer, List<MusicGroupPaymentCalenderStudentDetail>> collect = calenderStudentDetails.stream().collect(Collectors.groupingBy(e -> e.getUserId()));
+        for (Map<Integer, String> classGroupStudent : classGroupStudents) {
+            Integer classGroupId = classGroupStudent.keySet().iterator().next();
+            studentRegistrationService.insertStudent(classGroupStudent.get(classGroupId),musicGroupDao.findByClassGroupId(classGroupId).getId(),musicGroup.getId(),collect);
+        }
         paymentCalenderDto.setPayUserType(MusicGroupPaymentCalender.PayUserType.STUDENT);
         paymentCalenderDto.setPaymentType(SPAN_GROUP_CLASS_ADJUST);
         //生成缴费项目

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -561,7 +561,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 				List<MusicGroupPaymentCalenderStudentDetail> musicGroupPaymentCalenderStudentDetails = classGroupService.queryStudentPaymentCalenders(adjust.getMasterClassGroupId(),
 						adjust.getClassGroupStudents(),studentIds);
 				List<MusicGroupPaymentCalenderStudentDetail> calenderStudentDetails = musicGroupPaymentCalenderDto.getMusicGroupPaymentCalenderStudentDetails();
-				boolean containsAll = ListUtil.isEquals(musicGroupPaymentCalenderStudentDetails,calenderStudentDetails);
+
+				boolean containsAll = musicGroupPaymentCalenderStudentDetails.containsAll(calenderStudentDetails);
 				if(!containsAll){
 					status = AUDITING;
 					//保存新的学员详情