|
@@ -11,10 +11,7 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.MusicSheetAuthRecordDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.req.TeacherMusicSheetAuditReq;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.search.TeacherMusicSheetAuditSearch;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.MusicSheet;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.MusicSheetAccompaniment;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.MusicSheetAuthRecord;
|
|
|
-import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
|
+import com.yonge.cooleshow.biz.dal.entity.*;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.MessageTypeEnum;
|
|
@@ -23,6 +20,7 @@ import com.yonge.cooleshow.biz.dal.service.*;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.MusicSheetDetailVo;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.TeacherMusicSheetVo;
|
|
|
import com.yonge.cooleshow.biz.dal.wrapper.AddMusicSheetWrapper;
|
|
|
+import com.yonge.cooleshow.biz.dal.wrapper.InstrumentWrapper;
|
|
|
import com.yonge.cooleshow.common.service.IdGeneratorService;
|
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
|
import com.yonge.toolset.thirdparty.message.MessageSenderPluginContext;
|
|
@@ -60,6 +58,8 @@ public class MusicSheetAuthRecordServiceImpl extends ServiceImpl<MusicSheetAuthR
|
|
|
@Resource
|
|
|
private SysMessageService sysMessageService;
|
|
|
@Resource
|
|
|
+ private InstrumentService instrumentService;
|
|
|
+ @Resource
|
|
|
private MusicSheetAccompanimentService musicSheetAccompanimentService;
|
|
|
|
|
|
@Value("${openfeign-client.app-id:1745637981387108354}")
|
|
@@ -181,6 +181,13 @@ public class MusicSheetAuthRecordServiceImpl extends ServiceImpl<MusicSheetAuthR
|
|
|
throw new BizException("曲目信息不能为空");
|
|
|
}
|
|
|
AddMusicSheetWrapper.AddMusicSheet addMusicSheet = JSON.parseObject(musicSheetAuthRecord.getMusicSheetJson(), AddMusicSheetWrapper.AddMusicSheet.class);
|
|
|
+ //反查乐器关联的声部
|
|
|
+ String musicalInstrumentIds = addMusicSheet.getMusicalInstrumentIds();
|
|
|
+ List<Instrument> list = instrumentService.lambdaQuery().in(Instrument::getId, musicalInstrumentIds.split(",")).list();
|
|
|
+ if(CollectionUtils.isEmpty(list)){
|
|
|
+ throw new BizException("乐器信息不存在");
|
|
|
+ }
|
|
|
+ addMusicSheet.setSubjectIds(list.stream().map(e->e.getSubjectId().toString()).distinct().collect(Collectors.joining(",")));
|
|
|
List<CbsMusicSheetApplicationExtendClientWrapper.AddMusicSheetApplicationExtend> extendList = new ArrayList<>();
|
|
|
CbsMusicSheetApplicationExtendClientWrapper.AddMusicSheetApplicationExtend extend = new CbsMusicSheetApplicationExtendClientWrapper.AddMusicSheetApplicationExtend();
|
|
|
extend.setApplicationId(applicationId);
|