|
@@ -2,7 +2,6 @@ package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
-import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
@@ -25,24 +24,17 @@ import com.ym.mec.common.exception.BizException;
|
|
import com.ym.mec.common.page.PageInfo;
|
|
import com.ym.mec.common.page.PageInfo;
|
|
import com.ym.mec.common.service.IdGeneratorService;
|
|
import com.ym.mec.common.service.IdGeneratorService;
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
-import com.ym.mec.common.tenant.TenantContextHolder;
|
|
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
-import com.ym.mec.util.excel.POIUtil;
|
|
|
|
-import com.ym.mec.util.ini.IniFileUtil;
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.core.io.ClassPathResource;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.ui.ModelMap;
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
-import java.io.ByteArrayInputStream;
|
|
|
|
-import java.io.InputStream;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.CompletableFuture;
|
|
@@ -112,6 +104,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
@Autowired
|
|
@Autowired
|
|
private CloudTeacherOrderService cloudTeacherOrderService;
|
|
private CloudTeacherOrderService cloudTeacherOrderService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private MusicGroupPaymentCalenderAddressService musicGroupPaymentCalenderAddressService;
|
|
|
|
+ @Autowired
|
|
private MusicGroupPaymentCalenderGoodsServiceImpl musicGroupPaymentCalenderGoodsService;
|
|
private MusicGroupPaymentCalenderGoodsServiceImpl musicGroupPaymentCalenderGoodsService;
|
|
@Autowired
|
|
@Autowired
|
|
private MusicGroupPaymentCalenderActivityServiceImpl musicGroupPaymentCalenderActivityService;
|
|
private MusicGroupPaymentCalenderActivityServiceImpl musicGroupPaymentCalenderActivityService;
|
|
@@ -298,6 +292,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
BigDecimal originalTotalAmount = courseOriginalAmount.add(memberOriginalAmount)
|
|
BigDecimal originalTotalAmount = courseOriginalAmount.add(memberOriginalAmount)
|
|
.add(activityOriginalAmount)
|
|
.add(activityOriginalAmount)
|
|
|
|
+ .add(goodsOriginalAmount)
|
|
.add(repairOriginalAmount).setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
.add(repairOriginalAmount).setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
//计算缴费项目总金额(前端录入)
|
|
//计算缴费项目总金额(前端录入)
|
|
@@ -309,6 +304,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
|
|
|
|
BigDecimal actualTotalAmount = courseActualAmount.add(memberActualAmount)
|
|
BigDecimal actualTotalAmount = courseActualAmount.add(memberActualAmount)
|
|
.add(repairActualAmount)
|
|
.add(repairActualAmount)
|
|
|
|
+ .add(goodsActualAmount)
|
|
.add(activityActualAmount).setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
.add(activityActualAmount).setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
//标记是否云教练缴费
|
|
//标记是否云教练缴费
|
|
if(musicGroupPaymentCalender.getPayUserType() == STUDENT && musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
if(musicGroupPaymentCalender.getPayUserType() == STUDENT && musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
@@ -350,7 +346,9 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
BigDecimal memberCurrentAmount = musicGroupPaymentCalenderMemberService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
BigDecimal memberCurrentAmount = musicGroupPaymentCalenderMemberService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
BigDecimal repairCurrentAmount = musicGroupPaymentCalenderRepairService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
BigDecimal repairCurrentAmount = musicGroupPaymentCalenderRepairService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
BigDecimal activityCurrentAmount = musicGroupPaymentCalenderActivityService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
BigDecimal activityCurrentAmount = musicGroupPaymentCalenderActivityService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
|
|
+ BigDecimal goodsCurrentAmount = musicGroupPaymentCalenderGoodsService.getCurrentAmount(musicGroupPaymentBaseCalender);
|
|
BigDecimal currentTotalAmount = courseCurrentAmount.add(memberCurrentAmount)
|
|
BigDecimal currentTotalAmount = courseCurrentAmount.add(memberCurrentAmount)
|
|
|
|
+ .add(goodsCurrentAmount)
|
|
.add(repairCurrentAmount)
|
|
.add(repairCurrentAmount)
|
|
.add(activityCurrentAmount).setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
.add(activityCurrentAmount).setScale(0, BigDecimal.ROUND_HALF_UP);
|
|
status = actualTotalAmount.compareTo(currentTotalAmount) == 0 ? NO : AUDITING;
|
|
status = actualTotalAmount.compareTo(currentTotalAmount) == 0 ? NO : AUDITING;
|
|
@@ -434,6 +432,15 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
musicGroupPaymentCalender.setMusicGroupPaymentCalenderCourseSettingsList(courseSettingsList);
|
|
musicGroupPaymentCalender.setMusicGroupPaymentCalenderCourseSettingsList(courseSettingsList);
|
|
musicGroupPaymentCalenderCourseSettingsService.batchInsert(musicGroupPaymentCalender);
|
|
musicGroupPaymentCalenderCourseSettingsService.batchInsert(musicGroupPaymentCalender);
|
|
}
|
|
}
|
|
|
|
+ //保存商品缴费信息
|
|
|
|
+ if (musicGroupPaymentCalender.getPaymentType() == GOODS_PURCHASE) {
|
|
|
|
+ if(CollectionUtils.isNotEmpty(musicGroupPaymentBaseCalender.getCalenderGoodsList())){
|
|
|
|
+ musicGroupPaymentCalenderGoodsService.saveBatch(musicGroupPaymentBaseCalender.getCalenderGoodsList());
|
|
|
|
+ }
|
|
|
|
+ if(musicGroupPaymentBaseCalender.getCalenderAddress() != null){
|
|
|
|
+ musicGroupPaymentCalenderAddressService.save(musicGroupPaymentBaseCalender.getCalenderAddress());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
// 如果是报名,需要修改乐团状态
|
|
// 如果是报名,需要修改乐团状态
|
|
if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
if (musicGroupPaymentCalender.getPaymentType() == MUSIC_APPLY) {
|
|
@@ -538,6 +545,8 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
|
|
if (calenderMember != null) {
|
|
if (calenderMember != null) {
|
|
result.put("memberPrivilegesItemList", memberRankPrivilegesService.queryByMemberRankId(calenderMember.getMemberRankSettingId()));
|
|
result.put("memberPrivilegesItemList", memberRankPrivilegesService.queryByMemberRankId(calenderMember.getMemberRankSettingId()));
|
|
}
|
|
}
|
|
|
|
+ //获取商品采购信息
|
|
|
|
+ result.put("goods",musicGroupPaymentCalenderGoodsService.lambdaQuery().eq(MusicGroupPaymentCalenderGoods::getCalenderId,calenderId).list());
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|