|
|
|
@ -98,9 +98,15 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
|
|
|
|
|
private void assertDefaultAnswer(List<MedicalRecQaVO> qaList) {
|
|
|
|
|
Assert.notEmpty(qaList, "默认问题列表不能为空");
|
|
|
|
|
|
|
|
|
|
qaList.forEach(qa->Assert.notEmpty(qa.getAnswerResourceId(),"默认问题回答视频不能为空"));
|
|
|
|
|
|
|
|
|
|
CommonDic systemDic = commonDicService.lambdaQuery().eq(CommonDic::getGroupCode, "AQT").eq(CommonDic::getCode, "system").one();
|
|
|
|
|
Assert.notNull(systemDic, "未找到系统问题");
|
|
|
|
|
List<AskTemplateQuestionLibrary> askTemplateQuestionLibraryList = askTemplateQuestionLibraryService.lambdaQuery().eq(AskTemplateQuestionLibrary::getDictId, systemDic.getId()).list();
|
|
|
|
|
List<CommonDic> chiildCommonDicList = commonDicService.lambdaQuery().eq(CommonDic::getParentId, systemDic.getId()).list();
|
|
|
|
|
Assert.notEmpty(chiildCommonDicList, "系统问题未找到");
|
|
|
|
|
List<String> dicIds = chiildCommonDicList.stream().map(i -> String.valueOf(i.getId())).collect(Collectors.toList());
|
|
|
|
|
List<AskTemplateQuestionLibrary> askTemplateQuestionLibraryList = askTemplateQuestionLibraryService.lambdaQuery().in(AskTemplateQuestionLibrary::getDictId, dicIds).list();
|
|
|
|
|
if (CollUtil.isEmpty(askTemplateQuestionLibraryList)){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|