|
@@ -171,11 +171,14 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
.stream().collect(Collectors.toMap(CbsMusicSheetWrapper.MusicSheetApplication::getId, Function.identity()));
|
|
|
|
|
|
//获取乐器名称
|
|
|
- String instrumentIds = applications.stream().map(CbsMusicSheetWrapper.MusicSheetApplication::getMusicalInstrumentIds).collect(Collectors.joining(","));
|
|
|
- List<CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto> musicalInstrumentQueryDtos =
|
|
|
- this.queryMusicalInstrument(Arrays.stream(instrumentIds.split(",")).map(Integer::parseInt).distinct().collect(Collectors.toList()));
|
|
|
- Map<Integer,CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto> musicalInstrumentQueryMap = musicalInstrumentQueryDtos.stream()
|
|
|
- .collect(Collectors.toMap(CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto::getId, o -> o, (o1, o2) -> o1));
|
|
|
+ String instrumentIds = applications.stream().map(CbsMusicSheetWrapper.MusicSheetApplication::getMusicalInstrumentIds)
|
|
|
+ .filter(StringUtils::isNotEmpty).collect(Collectors.joining(","));
|
|
|
+ Map<Integer,CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto> musicalInstrumentQueryMap = new HashMap<>();
|
|
|
+ if(StringUtils.isNotEmpty(instrumentIds)){
|
|
|
+ List<CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto> musicalInstrumentQueryDtos =
|
|
|
+ this.queryMusicalInstrument(Arrays.stream(instrumentIds.split(",")).map(Integer::parseInt).distinct().collect(Collectors.toList()));
|
|
|
+ musicalInstrumentQueryMap = musicalInstrumentQueryDtos.stream().collect(Collectors.toMap(CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto::getId, o -> o, (o1, o2) -> o1));
|
|
|
+ }
|
|
|
//获取分类名称
|
|
|
Map<Integer, String> categoriesMap = new HashMap<>(categoriesIds.size());
|
|
|
for (Integer categoriesId : categoriesIds) {
|
|
@@ -432,7 +435,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
}
|
|
|
|
|
|
//测试环境合奏分类
|
|
|
- private static String categoryIds = "42,43,44,45,46,91,92,93,94,95,7,11,15,180";
|
|
|
+// private static String categoryIds = "42,43,44,45,46,91,92,93,94,95,7,11,15,180";
|
|
|
private static String prodCategoryIds = "42,43,44,45,46,91,92,93,94,95,185,186,7,11,15,180";
|
|
|
|
|
|
private CbsMusicSheetWrapper.AddMusicSheet musicToAddMusicSheet(SysMusicScore from, List<SysMusicScoreAccompaniment> accList) {
|
|
@@ -466,7 +469,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
}
|
|
|
}
|
|
|
if(addMusicSheet.getMusicSheetType() == null){
|
|
|
- if(Arrays.stream(categoryIds.split(",")).anyMatch(e->e.equals(from.getMusicScoreCategoriesId().toString()))){
|
|
|
+ if(Arrays.stream(prodCategoryIds.split(",")).anyMatch(e->e.equals(from.getMusicScoreCategoriesId().toString()))){
|
|
|
addMusicSheet.setMusicSheetType(EMusicSheetType.CONCERT);
|
|
|
}else {
|
|
|
addMusicSheet.setMusicSheetType(EMusicSheetType.SINGLE);
|
|
@@ -474,7 +477,6 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
}
|
|
|
addMusicSheet.setIsEvaluated(from.isEnableEvaluation());
|
|
|
addMusicSheet.setIsConvertibleScore(true);
|
|
|
- addMusicSheet.setPlaySpeed(from.getSpeed());
|
|
|
addMusicSheet.setPlayMode(from.getPlayMode() == SysMusicScore.PlayMode.MP3 ? EMusicPlayMode.MP3 : EMusicPlayMode.MIDI);
|
|
|
addMusicSheet.setMidiFileUrl(from.getMidiUrl());
|
|
|
addMusicSheet.setExtConfigJson(from.getExtConfigJson());
|
|
@@ -518,6 +520,7 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
|
|
|
addMusicSheet.setIsUseSystemBeat(sheetAccompaniment.getIsOpenMetronome());
|
|
|
musicSheetSounds.add(musicSheetSound);
|
|
|
}
|
|
|
+ addMusicSheet.setPlaySpeed(sheetAccompaniment.getSpeed());
|
|
|
}
|
|
|
tracks = musicSheetSounds.stream().map(CbsMusicSheetWrapper.MusicSheetSound::getTrack).collect(Collectors.joining(","));
|
|
|
addMusicSheet.setMusicSheetSoundList(musicSheetSounds);
|