|
@@ -64,16 +64,18 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
|
|
|
}
|
|
|
for (ModuleInfoDTO bean : data) {
|
|
|
- List<ModuleDetailDTO> moduleDetailDTOList = BeanUtil.listCopyTo(moduleDetailMap.get(bean.getId()), ModuleDetailDTO.class);
|
|
|
- bean.setModuleDetailDTOList(moduleDetailDTOList);
|
|
|
- for (ModuleDetailDTO detailDTO : moduleDetailDTOList) {
|
|
|
- if (null != detailDTO.getQuestionId()) {
|
|
|
- QuestionVO questionVO = new QuestionVO();
|
|
|
- questionVO.setId(detailDTO.getQuestionId());
|
|
|
- questionVO.setSexType(moduleVO.getSexType());
|
|
|
- questionVO.setAge(moduleVO.getAge());
|
|
|
- QuestionDTO questionDTO = questionFacade.getById(questionVO);
|
|
|
- BeanUtil.copyProperties(questionDTO, detailDTO);
|
|
|
+ if (moduleDetailMap.get(bean.getId()) != null) {
|
|
|
+ List<ModuleDetailDTO> moduleDetailDTOList = BeanUtil.listCopyTo(moduleDetailMap.get(bean.getId()), ModuleDetailDTO.class);
|
|
|
+ bean.setModuleDetailDTOList(moduleDetailDTOList);
|
|
|
+ for (ModuleDetailDTO detailDTO : moduleDetailDTOList) {
|
|
|
+ if (null != detailDTO.getQuestionId()) {
|
|
|
+ QuestionVO questionVO = new QuestionVO();
|
|
|
+ questionVO.setId(detailDTO.getQuestionId());
|
|
|
+ questionVO.setSexType(moduleVO.getSexType());
|
|
|
+ questionVO.setAge(moduleVO.getAge());
|
|
|
+ QuestionDTO questionDTO = questionFacade.getById(questionVO);
|
|
|
+ BeanUtil.copyProperties(questionDTO, detailDTO);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|