|
@@ -7,6 +7,7 @@ import com.diagbot.dto.QuestionDTO;
|
|
|
import com.diagbot.entity.ModuleDetail;
|
|
|
import com.diagbot.entity.ModuleInfo;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
+import com.diagbot.enums.TagTypeEnum;
|
|
|
import com.diagbot.service.impl.ModuleInfoServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
@@ -66,7 +67,6 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
for (ModuleInfoDTO bean : data) {
|
|
|
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();
|
|
@@ -77,6 +77,21 @@ public class ModuleFacade extends ModuleInfoServiceImpl {
|
|
|
BeanUtil.copyProperties(questionDTO, detailDTO);
|
|
|
}
|
|
|
}
|
|
|
+ //因为性别和年龄会过滤标签,留下重复的标点符号,以下用来处理重复的“”
|
|
|
+ boolean previousIsEmpty = false;
|
|
|
+ for (int i = 0; i < moduleDetailDTOList.size(); i++) {
|
|
|
+ if (moduleDetailDTOList.get(i).getTagType() != null
|
|
|
+ && TagTypeEnum.T8.getKey() == Integer.valueOf(moduleDetailDTOList.get(i).getTagType())
|
|
|
+ && "".equals(moduleDetailDTOList.get(i).getName())) {
|
|
|
+ if (previousIsEmpty) {
|
|
|
+ moduleDetailDTOList.remove(i--);
|
|
|
+ }
|
|
|
+ previousIsEmpty = true;
|
|
|
+ } else {
|
|
|
+ previousIsEmpty = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ bean.setModuleDetailDTOList(moduleDetailDTOList);
|
|
|
}
|
|
|
}
|
|
|
return data;
|