|
@@ -539,6 +539,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
List<MusicGroupPaymentCalenderCourseSettings> newCourses = goodsDto.getNewCourses();
|
|
|
BigDecimal remitFee = goodsDto.getRemitFee();
|
|
|
if (CollectionUtils.isNotEmpty(goodsGroups)) {
|
|
|
+
|
|
|
+ BigDecimal organShareProfit = BigDecimal.ZERO;
|
|
|
+
|
|
|
for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
|
|
|
StudentPaymentOrderDetail studentPaymentOrderDetail4goodsGroup = new StudentPaymentOrderDetail();
|
|
|
studentPaymentOrderDetail4goodsGroup.setRemitFee(BigDecimal.ZERO);
|
|
@@ -580,6 +583,22 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
if (OrderDetailTypeEnum.MUSICAL.equals(type)) {
|
|
|
maintenanceGoodsId = goodsGroup.getGoodsIdList();
|
|
|
}
|
|
|
+
|
|
|
+ if(goodsGroup.getOrganShareProfit() != null){
|
|
|
+ organShareProfit = organShareProfit.add(goodsGroup.getOrganShareProfit());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //分部分润
|
|
|
+ if(organShareProfit.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ StudentPaymentOrderDetail spod = new StudentPaymentOrderDetail();
|
|
|
+ spod.setType(OrderDetailTypeEnum.ORGAN_SHARE_PROFIT);
|
|
|
+ spod.setPrice(organShareProfit);
|
|
|
+ spod.setRemitFee(BigDecimal.ZERO);
|
|
|
+ spod.setCreateTime(date);
|
|
|
+ spod.setUpdateTime(date);
|
|
|
+ spod.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
+ studentPaymentOrderDetailList.add(spod);
|
|
|
}
|
|
|
}
|
|
|
|