|
@@ -15,6 +15,7 @@ import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.IntroduceInfoServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.EMRIntroduceVO;
|
|
|
import com.diagbot.vo.HosCodeVO;
|
|
@@ -189,7 +190,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
if (titles.length > 0) {
|
|
|
for (String title : titles) {
|
|
|
String uniqueTitle = titleMappingMap.get(title);
|
|
|
- titleMapping.put(title, uniqueName);
|
|
|
+ titleMapping.put(title, uniqueTitle);
|
|
|
if (StringUtil.isNotBlank(uniqueTitle)) {
|
|
|
uniqueTitleList.add(uniqueTitle);
|
|
|
}
|
|
@@ -205,9 +206,9 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "公表标签不存在");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
QueryWrapper<IntroduceMap> introduceMapQueryWrapper = new QueryWrapper<>();
|
|
|
introduceMapQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
|
|
|
- eq("question_id", questionInfo.getId()).
|
|
|
eq("type", type);
|
|
|
IntroduceMap introduceMap = introduceMapFacade.getOne(introduceMapQueryWrapper);
|
|
|
if (introduceMap == null) {
|
|
@@ -229,17 +230,21 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
}
|
|
|
List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
|
|
|
List<EMRIntroduceDetailDTO> retList = Lists.newLinkedList();
|
|
|
- for (Map.Entry<String, String> entry : titleMapping.entrySet()) {
|
|
|
- EMRIntroduceDetailDTO detailDTO = new EMRIntroduceDetailDTO();
|
|
|
- detailDTO.setTitle(entry.getKey());
|
|
|
- if (StringUtil.isNotBlank(entry.getValue())) {
|
|
|
- for (IntroduceDetail introduceDetail : introduceDetailList) {
|
|
|
- if (entry.getValue().equals(introduceDetail.getTitle())) {
|
|
|
- detailDTO.setText(introduceDetail.getText());
|
|
|
+ if (emrIntroduceVO.getTitles().length > 0) {
|
|
|
+ for (Map.Entry<String, String> entry : titleMapping.entrySet()) {
|
|
|
+ EMRIntroduceDetailDTO detailDTO = new EMRIntroduceDetailDTO();
|
|
|
+ detailDTO.setTitle(entry.getKey());
|
|
|
+ if (StringUtil.isNotBlank(entry.getValue())) {
|
|
|
+ for (IntroduceDetail introduceDetail : introduceDetailList) {
|
|
|
+ if (entry.getValue().equals(introduceDetail.getTitle())) {
|
|
|
+ detailDTO.setText(introduceDetail.getText());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ retList.add(detailDTO);
|
|
|
}
|
|
|
- retList.add(detailDTO);
|
|
|
+ } else {
|
|
|
+ retList = BeanUtil.listCopyTo(introduceDetailList, EMRIntroduceDetailDTO.class);
|
|
|
}
|
|
|
return retList;
|
|
|
}
|