소스 검색

导出需求

zouxuan 3 년 전
부모
커밋
9c372e504a
1개의 변경된 파일21개의 추가작업 그리고 4개의 파일을 삭제
  1. 21 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

+ 21 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -1629,10 +1629,14 @@ public class ExportServiceImpl implements ExportService {
                     Integer cooperationId = calenderCooperationMap.get(calenderId);
                     if(cooperationId != null){
                         String firstMusicId = firstMusicMap.get(cooperationId);
-                        if(Objects.equals(firstMusicId,row.getMusicGroupId())){
+                        if(StringUtils.isEmpty(firstMusicId)){
                             row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_MUSIC);
                         }else {
-                            row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.ADD_MUSIC);
+                            if(Objects.equals(firstMusicId,row.getMusicGroupId())){
+                                row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_MUSIC);
+                            }else {
+                                row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.ADD_MUSIC);
+                            }
                         }
                     }
                 }else {
@@ -1743,6 +1747,15 @@ public class ExportServiceImpl implements ExportService {
                     row.setSubjectName(vipGroupInfo.getSubjectName());
                     row.setEduTeacher(vipGroupInfo.getEducationalTeacherName());
                 }
+                if(row.getTypeDesc() == null){
+                    //学员没有历史VIP课程则导出为【VIP课新增】
+                    //学员有历史VIP课程到导出为【VIP课续费]
+                    if(Objects.equals(userFirstVipMap.get(row.getUserId()),row.getMusicGroupId())){
+                        row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_VIP);
+                    }else {
+                        row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.RENEW_VIP);
+                    }
+                }
             }else if(row.getGroupType() == GroupType.ACTIVITY){
                 row.setVipCourseFee(row.getActualAmount());
             }else if(row.getGroupType() == GroupType.MEMBER){
@@ -2040,10 +2053,14 @@ public class ExportServiceImpl implements ExportService {
                     Integer cooperationId = calenderCooperationMap.get(calenderId);
                     if(cooperationId != null){
                         String firstMusicId = firstMusicMap.get(cooperationId);
-                        if(Objects.equals(firstMusicId,row.getMusicGroupId())){
+                        if(StringUtils.isEmpty(firstMusicId)){
                             row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_MUSIC);
                         }else {
-                            row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.ADD_MUSIC);
+                            if(Objects.equals(firstMusicId,row.getMusicGroupId())){
+                                row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.NEW_MUSIC);
+                            }else {
+                                row.setTypeDesc(StudentPaymentOrderExportDto.TypeDesc.ADD_MUSIC);
+                            }
                         }
                     }
                 }else {