Browse Source

Merge branch 'saas' of http://git.dayaedu.com/yonge/mec into feature/1022_vip

# Conflicts:
#	mec-application/src/main/java/com/ym/mec/vo/MusicSheetVo.java
#	mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicScore.java
#	mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicScoreAccompaniment.java
zouxuan 4 months ago
parent
commit
1d3a2892e1

+ 7 - 0
mec-application/src/main/java/com/ym/mec/student/controller/MusicSheetController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.student.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
 import com.ym.mec.biz.dal.entity.*;
@@ -83,6 +84,12 @@ public class MusicSheetController {
             musicSheetDetail.setIsConvertibleScore(detail.getIsConvertibleScore());
         }
 
+        // 如果是合奏 并且乐器ID = 2268
+        musicSheetDetail.setSpecialPercussionFlag(false);
+        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            musicSheetDetail.setSpecialPercussionFlag(true);
+        }
+
         // 设置乐器信息
         if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
             List<Integer> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))

+ 7 - 0
mec-application/src/main/java/com/ym/mec/student/controller/open/OpenMusicSheetController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.student.controller.open;
 
 import com.alibaba.fastjson.JSON;
+import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
 import com.ym.mec.biz.dal.entity.SysMusicScore;
@@ -66,6 +67,12 @@ public class OpenMusicSheetController {
             musicSheetDetail.setBizMusicCategoryId(detail.getCategoriesId() == null ? null : detail.getCategoriesId().longValue());
         }
 
+        // 如果是合奏 并且乐器ID = 2268
+        musicSheetDetail.setSpecialPercussionFlag(false);
+        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            musicSheetDetail.setSpecialPercussionFlag(true);
+        }
+
         // 设置乐器信息
         if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
             List<Integer> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))

+ 7 - 0
mec-application/src/main/java/com/ym/mec/teacher/controller/MusicSheetController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.teacher.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
 import com.ym.mec.biz.dal.dao.TeacherDao;
@@ -81,6 +82,12 @@ public class MusicSheetController {
             musicSheetDetail.setIsConvertibleScore(detail.getIsConvertibleScore());
         }
 
+        // 如果是合奏 并且乐器ID = 2268
+        musicSheetDetail.setSpecialPercussionFlag(false);
+        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            musicSheetDetail.setSpecialPercussionFlag(true);
+        }
+
         // 设置乐器信息
         if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
             List<Integer> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))

+ 7 - 0
mec-application/src/main/java/com/ym/mec/teacher/controller/open/OpenMusicSheetController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.teacher.controller.open;
 
 import com.alibaba.fastjson.JSON;
+import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
 import com.ym.mec.biz.dal.entity.SysMusicScore;
@@ -66,6 +67,12 @@ public class OpenMusicSheetController {
             musicSheetDetail.setBizMusicCategoryId(detail.getCategoriesId() == null ? null : detail.getCategoriesId().longValue());
         }
 
+        // 如果是合奏 并且乐器ID = 2268
+        musicSheetDetail.setSpecialPercussionFlag(false);
+        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            musicSheetDetail.setSpecialPercussionFlag(true);
+        }
+
         // 设置乐器信息
         if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
             List<Integer> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))

+ 4 - 0
mec-application/src/main/java/com/ym/mec/vo/MusicSheetVo.java

@@ -400,6 +400,10 @@ public class MusicSheetVo {
 
         @ApiModelProperty("使用状态 试用: FREE 锁定: LOCK 解锁:UNLOCK")
         private String useStatus;
+
+        @ApiModelProperty("是否是特殊打击乐")
+        private Boolean specialPercussionFlag;
+
     }
 
     @Data

+ 7 - 0
mec-application/src/main/java/com/ym/mec/web/controller/MusicSheetController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.web.controller;
 
 import com.alibaba.fastjson.JSON;
+import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
 import com.ym.mec.biz.dal.entity.Instrument;
@@ -75,6 +76,12 @@ public class MusicSheetController {
             musicSheetDetail.setIsConvertibleScore(detail.getIsConvertibleScore());
         }
 
+        // 如果是合奏 并且乐器ID = 2268
+        musicSheetDetail.setSpecialPercussionFlag(false);
+        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            musicSheetDetail.setSpecialPercussionFlag(true);
+        }
+
         // 设置乐器信息
         if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {
             List<Integer> instrumentIds = Arrays.stream(musicSheetDetail.getMusicalInstrumentIds().split(","))

+ 6 - 0
mec-application/src/main/java/com/ym/mec/web/controller/open/OpenMusicSheetController.java

@@ -1,6 +1,7 @@
 package com.ym.mec.web.controller.open;
 
 import com.alibaba.fastjson.JSON;
+import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.wrapper.music.CbsMusicSheetWrapper;
 import com.microsvc.toolkit.common.response.template.R;
 import com.ym.mec.biz.dal.entity.SysMusicScore;
@@ -65,6 +66,11 @@ public class OpenMusicSheetController {
             // 设置业务端曲目分类
             musicSheetDetail.setBizMusicCategoryId(detail.getCategoriesId() == null ? null : detail.getCategoriesId().longValue());
         }
+        // 如果是合奏 并且乐器ID = 2268
+        musicSheetDetail.setSpecialPercussionFlag(false);
+        if ("2268".equals(musicSheetDetail.getMusicalInstrumentIds()) && musicSheetDetail.getMusicSheetType() == EMusicSheetType.CONCERT) {
+            musicSheetDetail.setSpecialPercussionFlag(true);
+        }
 
         // 设置乐器信息
         if (StringUtils.isNotBlank(musicSheetDetail.getMusicalInstrumentIds())) {

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicScore.java

@@ -178,6 +178,15 @@ public class SysMusicScore {
 	@ApiModelProperty("伴奏固定调PDF文件")
 	private String accJianPdfUrl;
 
+	@ApiModelProperty("五线谱图片")
+	private String musicImg;
+
+	@ApiModelProperty("首调图片")
+	private String musicFirstImg;
+
+	@ApiModelProperty("固定调图片")
+	private String musicJianImg;
+
     @ApiModelProperty("曲目状态 ")
 	private List<SysMusicScoreAccompaniment> background;
 
@@ -196,4 +205,13 @@ public class SysMusicScore {
 		return ToStringBuilder.reflectionToString(this);
 	}
 
+	public SysMusicScore musicFirstImg(String musicFirstImg) {
+		this.musicFirstImg = musicFirstImg;
+		return this;
+	}
+
+	public SysMusicScore musicImg(String musicImg) {
+		this.musicImg = musicImg;
+		return this;
+	}
 }

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicScoreAccompaniment.java

@@ -144,6 +144,15 @@ public class SysMusicScoreAccompaniment {
 	@ApiModelProperty("伴奏固定调PDF文件")
 	private String accJianPdfUrl;
 
+	@ApiModelProperty("五线谱图片")
+	private String musicImg;
+
+	@ApiModelProperty("首调图片")
+	private String musicFirstImg;
+
+	@ApiModelProperty("固定调图片")
+	private String musicJianImg;
+
 	@ApiModelProperty("使用状态 试用: FREE 锁定: LOCK 解锁:UNLOCK")
 	private String useStatus;
 
@@ -152,4 +161,13 @@ public class SysMusicScoreAccompaniment {
 		return ToStringBuilder.reflectionToString(this);
 	}
 
+	public SysMusicScoreAccompaniment musicJianImg(String musicJianImg) {
+		this.musicJianImg = musicJianImg;
+		return this;
+	}
+
+	public SysMusicScoreAccompaniment musicImg(String musicImg) {
+		this.musicImg = musicImg;
+		return this;
+	}
 }

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

@@ -2937,7 +2937,7 @@ public class ExportServiceImpl implements ExportService {
             //获取乐团信息
             this.initMusicGroupInfo(basicOrder, musicGroupNameMap, firstMusicMap, userLastMusicIdMap, userLastMusicNameMap, calenderCooperationMap);
             //填充备注信息
-            if (basicOrder.getGoodsList() != null) {
+            if (CollectionUtils.isNotEmpty(basicOrder.getGoodsList())) {
                 String goodsName = basicOrder.getGoodsList().stream().map(Goods::getName).collect(Collectors.joining("|"));
                 basicOrder.setMemo(goodsName);
             }

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

@@ -1231,7 +1231,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
                 }
                 if(dto.getTrainStudentNum().compareTo(BigDecimal.ZERO) > 0){
                     dto.setTrainAvgTrainTime(dto.getTrainTotalTime().divide(dto.getTrainStudentNum(),2, 2));
-                    dto.setTrainStandRate(dto.getTrain1().divide(dto.getTrainStudentNum(),4, 2).multiply(decimal).setScale(2));
+                    dto.setTrainStandRate(new BigDecimal(dto.getTrain2() +dto.getTrain3()+dto.getTrain4()).divide(dto.getTrainStudentNum(),4, 2).multiply(decimal).setScale(2));
                 }
             }
         }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreAccompanimentServiceImpl.java

@@ -191,6 +191,12 @@ public class SysMusicScoreAccompanimentServiceImpl extends BaseServiceImpl<Strin
 				record.setMusicPdfUrl(musicSheetApplication.getMusicPdfUrl());
 				record.setFirstPdfUrl(musicSheetApplication.getFirstPdfUrl());
 				record.setJianPdfUrl(musicSheetApplication.getJianPdfUrl());
+
+				// 设置五线谱、首调、固定调谱面图片
+				record.musicImg(musicSheetApplication.getMusicImg())
+					.musicJianImg(musicSheetApplication.getMusicJianImg())
+					.setMusicFirstImg(musicSheetApplication.getMusicFirstImg());
+
 				record.setIsMixBeat(musicSheetApplication.getIsMixBeat());
 				record.setIsConvertibleScore(musicSheetApplication.getIsConvertibleScore());
 				if(musicSheetApplication.getScoreType() != null){

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreServiceImpl.java

@@ -214,6 +214,12 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
         record.setPlayMode(SysMusicScore.PlayMode.valueOf(musicSheetApplication.getPlayMode().getCode()));
         record.setExtConfigJson(musicSheetApplication.getExtConfigJson());
         record.setExtStyleConfigJson(musicSheetApplication.getExtStyleConfigJson());
+
+        // 设置曲目五线谱、首调、固定调谱面图片
+        record.musicImg(musicSheetApplication.getMusicImg())
+            .musicFirstImg(musicSheetApplication.getMusicFirstImg())
+            .setMusicJianImg(musicSheetApplication.getMusicJianImg());
+
         record.setShowFlag(musicSheetApplication.getStatus()?1:0);
 //        if(musicSheetApplication.getMusicSheetCategoryId() != null){
 //            record.setMusicScoreCategoriesId(musicSheetApplication.getMusicSheetCategoryId().intValue());

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -1245,7 +1245,7 @@
     </select>
     <select id="queryVipQuitOrder" resultType="com.ym.mec.biz.dal.entity.StudentPaymentOrder">
         SELECT spo.* FROM student_payment_order spo
-        left join class_group_student_mapper cgsm ON spo.class_group_id_ = cgsm.class_group_id_ and spo.music_group_id_ = cgsm.music_group_id_
+        left join class_group_student_mapper cgsm ON spo.class_group_id_ = cgsm.class_group_id_ and spo.music_group_id_ = cgsm.music_group_id_ AND spo.user_id_ = cgsm.user_id_
         WHERE cgsm.music_group_id_ = #{vipGroupId} AND cgsm.status_ != 'QUIT'
         AND spo.type_ IN ('LIVE_GROUP_BUY','SMALL_CLASS_TO_BUY')
         AND spo.status_ = 'SUCCESS'  AND spo.class_group_id_ = cgsm.class_group_id_ and spo.music_group_id_ = cgsm.music_group_id_