小程序消息查询

This commit is contained in:
zhangheng 2024-07-09 16:04:42 +08:00
parent 767b2004af
commit 7dbf152a62

View File

@ -312,8 +312,9 @@ public class HomePageServiceImpl implements HomePageService {
//查询问卷
QuestionInfo questionInfo = questionInfoMapper.selectQuestionInfoById(signPatientManageRouteNode.getQuestionInfoId());
// 查询题目表
QuestionVO questionVO = new QuestionVO();
if (Objects.nonNull(questionInfo)) {
BeanUtils.copyBeanProp(messageContentVO.getQuestion(), questionInfo);
BeanUtils.copyBeanProp(questionVO, questionInfo);
List<QuestionSubjectVO> questionSubjects = questionSubjectMapper.selectQuestionSubjectBy(signPatientManageRouteNode.getQuestionInfoId());
if (CollectionUtils.isNotEmpty(questionSubjects)) {
List<Long> questionSubjectIds = questionSubjects.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getId())).map(QuestionSubject::getId).collect(Collectors.toList());
@ -323,7 +324,8 @@ public class HomePageServiceImpl implements HomePageService {
List<QuestionSubjectOptionVO> collect = questionSubjectOptions.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getQuestionnaireSubjectId()) && questionSubject.getId().equals(item.getQuestionnaireSubjectId())).collect(Collectors.toList());
questionSubject.setQuestionSubjectOptionList(collect);
}
messageContentVO.getQuestion().setQuestionSubjectList(questionSubjects);
questionVO.setQuestionSubjectList(questionSubjects);
messageContentVO.setQuestion(questionVO);
}
}
}
@ -335,7 +337,7 @@ public class HomePageServiceImpl implements HomePageService {
messageContentVO.setPropagandaContent(JSONObject.parseObject(JSONObject.toJSONString(propagandaMaterialsVo)));
}
//副文本塞值
if (!TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType()) || !TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(signPatientManageRouteNode.getTaskType()) || !TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(signPatientManageRouteNode.getTaskType())) {
if (!TaskContentEnum.PROPAGANDA_ARTICLE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.QUESTIONNAIRE_SCALE.getInfo().equals(signPatientManageRouteNode.getTaskType()) && !TaskContentEnum.ARTIFICIAL_FOLLOW_UP.getInfo().equals(signPatientManageRouteNode.getTaskType())) {
messageContentVO.setTaskType(TaskContentEnum.TEXT_REMIND.getInfo());
messageContentVO.setNodeContent(signPatientManageRouteNode.getNodeContent());
}