|
@@ -1808,11 +1808,13 @@ public class ExportServiceImpl implements ExportService {
|
|
|
//专业
|
|
|
if (row.getGroupType().equals(GroupType.VIP)) {
|
|
|
row.setVipCourseFee(row.getActualAmount());
|
|
|
- VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
|
|
|
- if (vipGroupInfo != null) {
|
|
|
- row.setSchoolName(vipGroupInfo.getSchoolName());
|
|
|
- row.setSubjectName(vipGroupInfo.getSubjectName());
|
|
|
- row.setEduTeacher(vipGroupInfo.getEducationalTeacherName());
|
|
|
+ if(StringUtils.isNotEmpty(row.getMusicGroupId()) && row.getClassGroupId() != null){
|
|
|
+ VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
|
|
|
+ if (vipGroupInfo != null) {
|
|
|
+ row.setSchoolName(vipGroupInfo.getSchoolName());
|
|
|
+ row.setSubjectName(vipGroupInfo.getSubjectName());
|
|
|
+ row.setEduTeacher(vipGroupInfo.getEducationalTeacherName());
|
|
|
+ }
|
|
|
}
|
|
|
if(row.getTypeDesc() == null){
|
|
|
//学员没有历史VIP课程则导出为【VIP课新增】
|
|
@@ -2166,25 +2168,28 @@ public class ExportServiceImpl implements ExportService {
|
|
|
} else if (row.getGroupType().equals(GroupType.SPORADIC)) {
|
|
|
//考级报名
|
|
|
if (row.getType().equals(OrderTypeEnum.DEGREE_REGISTRATION)) {
|
|
|
- String[] feeTypes = row.getMemo().split(";");
|
|
|
- List<String> feeTypeList = Arrays.asList(feeTypes);
|
|
|
- for (String feeTypeStr : feeTypeList) {
|
|
|
- int index = feeTypeStr.lastIndexOf(":");
|
|
|
- if (index < 0) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- BigDecimal typeFee = new BigDecimal(feeTypeStr.substring(index + 1));
|
|
|
- if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- typeFee = typeFee.multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
|
|
|
- }
|
|
|
- if (feeTypeStr.contains("VIP")) {
|
|
|
- row.setVipCourseFee(typeFee);
|
|
|
- } else if (feeTypeStr.contains("网管课")) {
|
|
|
- row.setPracticeCourseFee(typeFee);
|
|
|
- } else if (feeTypeStr.contains("乐理课")) {
|
|
|
- row.setTheoryCourseFee(typeFee);
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(row.getMemo())){
|
|
|
+ String[] feeTypes = row.getMemo().split(";");
|
|
|
+ List<String> feeTypeList = Arrays.asList(feeTypes);
|
|
|
+ for (String feeTypeStr : feeTypeList) {
|
|
|
+ int index = feeTypeStr.lastIndexOf(":");
|
|
|
+ if (index < 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ BigDecimal typeFee = new BigDecimal(feeTypeStr.substring(index + 1));
|
|
|
+ if (row.getExpectAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
+ typeFee = typeFee.multiply(row.getActualAmount()).divide(row.getExpectAmount(), 2, BigDecimal.ROUND_DOWN);
|
|
|
+ }
|
|
|
+ if (feeTypeStr.contains("VIP")) {
|
|
|
+ row.setVipCourseFee(typeFee);
|
|
|
+ } else if (feeTypeStr.contains("网管课")) {
|
|
|
+ row.setPracticeCourseFee(typeFee);
|
|
|
+ } else if (feeTypeStr.contains("乐理课")) {
|
|
|
+ row.setTheoryCourseFee(typeFee);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
row.setDegreeFee(row.getActualAmount().subtract(row.getVipCourseFee()).subtract(row.getPracticeCourseFee()).subtract(row.getTheoryCourseFee()));
|
|
|
} else {
|
|
|
if (row.getChargeType() != null && SporadicChargeTypeEnum.LEVEL.getCode().equals(row.getChargeType())) {
|
|
@@ -2518,11 +2523,13 @@ public class ExportServiceImpl implements ExportService {
|
|
|
//专业
|
|
|
if (row.getGroupType().equals(GroupType.VIP)) {
|
|
|
row.setVipCourseFee(row.getActualAmount());
|
|
|
- VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
|
|
|
- if (vipGroupInfo != null) {
|
|
|
- row.setSchoolName(vipGroupInfo.getSchoolName());
|
|
|
- row.setSubjectName(vipGroupInfo.getSubjectName());
|
|
|
- row.setEduTeacher(vipGroupInfo.getEducationalTeacherName());
|
|
|
+ if(StringUtils.isNotEmpty(row.getMusicGroupId()) && row.getClassGroupId() != null) {
|
|
|
+ VipGroup vipGroupInfo = vipGroupDao.findVipGroupInfo(Integer.parseInt(row.getMusicGroupId()), row.getClassGroupId());
|
|
|
+ if (vipGroupInfo != null) {
|
|
|
+ row.setSchoolName(vipGroupInfo.getSchoolName());
|
|
|
+ row.setSubjectName(vipGroupInfo.getSubjectName());
|
|
|
+ row.setEduTeacher(vipGroupInfo.getEducationalTeacherName());
|
|
|
+ }
|
|
|
}
|
|
|
if(row.getTypeDesc() == null){
|
|
|
//学员没有历史VIP课程则导出为【VIP课新增】
|