Ver código fonte

Merge branch 'zx_saas_cbs' of http://git.dayaedu.com/yonge/mec into test

zouxuan 1 ano atrás
pai
commit
a569688313

+ 0 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CbsMusicSheetServiceImpl.java

@@ -3,14 +3,12 @@ package com.ym.mec.biz.service.impl;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.dayaedu.cbs.common.enums.music.EMusicSourceType;
-import com.dayaedu.cbs.common.enums.school.EMusicSheetType;
 import com.dayaedu.cbs.openfeign.service.CbsMusicSheetService;
 import com.dayaedu.cbs.openfeign.wrapper.music.*;
 import com.microsvc.toolkit.common.response.paging.PageInfo;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.ym.mec.biz.dal.dao.SysUserTenantDao;
 import com.ym.mec.biz.dal.entity.Instrument;
-import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.entity.SysMusicScore;
 import com.ym.mec.biz.service.InstrumentService;
 import com.ym.mec.biz.service.SubjectService;

+ 10 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicScoreServiceImpl.java

@@ -237,23 +237,19 @@ public class SysMusicScoreServiceImpl extends BaseServiceImpl<Integer, SysMusicS
         record.setEnableEvaluation(musicSheetApplication.getIsEvaluated());
         record.setIsConvertibleScore(musicSheetApplication.getIsConvertibleScore());
         record.setScoreType(musicSheetApplication.getScoreType().getCode());
-        if(musicSheetApplication.getMusicSheetType() == EMusicSheetType.CONCERT){
-            record.setSubjectName("");
-        }else {
-            if(StringUtils.isNotEmpty(musicSheetApplication.getMusicalInstrumentIds())){
-                if(StringUtils.isNotEmpty(record.getSubjectIds())){
-                    Set<String> subjectNames = new HashSet<>();
-                    for (String subjectId : record.getSubjectIds().split(",")) {
-                        Instrument instrument = instrumentMap.get(Integer.parseInt(subjectId));
-                        if(instrument != null){
-                            CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto musicalInstrumentQueryDto = musicalInstrumentQueryMap.get(instrument.getId());
-                            if(Objects.nonNull(musicalInstrumentQueryDto)) {
-                                subjectNames.add(musicalInstrumentQueryDto.getName());
-                            }
+        if(StringUtils.isNotEmpty(musicSheetApplication.getMusicalInstrumentIds())){
+            if(StringUtils.isNotEmpty(record.getSubjectIds())){
+                Set<String> subjectNames = new HashSet<>();
+                for (String subjectId : record.getSubjectIds().split(",")) {
+                    Instrument instrument = instrumentMap.get(Integer.parseInt(subjectId));
+                    if(instrument != null){
+                        CbsMusicalInstrumentWrapper.MusicalInstrumentQueryDto musicalInstrumentQueryDto = musicalInstrumentQueryMap.get(instrument.getId());
+                        if(Objects.nonNull(musicalInstrumentQueryDto)) {
+                            subjectNames.add(musicalInstrumentQueryDto.getName());
                         }
                     }
-                    record.setSubjectName(String.join(",",subjectNames));
                 }
+                record.setSubjectName(String.join(",",subjectNames));
             }
         }
     }

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

@@ -201,7 +201,7 @@
 				AND sesc.parent_id_ = #{parentId}
 			</if>
 			<if test="subjectId != null">
-				AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.music_sheet_type_ = 'CONCERT' OR ses.is_all_subject_)
+				AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.is_all_subject_)
 			</if>
 			<if test="clientType != null">
 				AND ses.client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/SysMusicScoreMapper.xml

@@ -273,10 +273,10 @@
 				AND ses.score_type_ = #{scoreType}
 			</if>
 			<if test="subjectId != null">
-				AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.music_sheet_type_ = 'CONCERT' OR ses.is_all_subject_)
+				AND (FIND_IN_SET(#{subjectId},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.is_all_subject_)
 			</if>
 			<if test="subjectIds != null and subjectIds != ''">
-				AND (FIND_IN_SET(#{subjectIds},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.music_sheet_type_ = 'CONCERT' OR ses.is_all_subject_)
+				AND (FIND_IN_SET(#{subjectIds},ses.subject_ids_) OR ses.subject_ids_ IS NULL OR ses.subject_ids_ = '' OR ses.is_all_subject_)
 			</if>
 			<if test="clientType != null">
 				AND ses.client_type_ = #{clientType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}