|
@@ -14,8 +14,10 @@ import com.diagbot.enums.QuestionTypeEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.IntroduceInfoServiceImpl;
|
|
|
+import com.diagbot.util.ArrayUtil;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RespDTOUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.EMRIntroduceVO;
|
|
|
import com.diagbot.vo.HosCodeVO;
|
|
@@ -161,18 +163,28 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
String uniqueName = "";
|
|
|
Integer type = emrIntroduceVO.getType();
|
|
|
if (type.equals(QuestionTypeEnum.Lis.getKey())) {
|
|
|
- if (StringUtil.isNotBlank(emrIntroduceVO.getName()))
|
|
|
+ if (StringUtil.isNotBlank(emrIntroduceVO.getName())) {
|
|
|
if (StringUtil.isNotBlank(emrIntroduceVO.getDetailName())) {
|
|
|
RespDTO<Map<String, Map<String, String>>> respLisConfigMap = tranServiceClient.getLisConfigByHosCode_NotEmptyItemName(hosCodeVO);
|
|
|
+ if (RespDTOUtil.respIsNG(respLisConfigMap)) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR);
|
|
|
+ }
|
|
|
Map<String, Map<String, String>> lisConfigMap = respLisConfigMap.data;
|
|
|
uniqueName = lisConfigMap.get(emrIntroduceVO.getName()).get(emrIntroduceVO.getDetailName());
|
|
|
} else {
|
|
|
RespDTO<Map<String, String>> respLisConfigMap_emptyItemName = tranServiceClient.getLisConfigByHosCode_EmptyItemName(hosCodeVO);
|
|
|
+ if (RespDTOUtil.respIsNG(respLisConfigMap_emptyItemName)) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR);
|
|
|
+ }
|
|
|
Map<String, String> lisConfigMap_emptyItemName = respLisConfigMap_emptyItemName.data;
|
|
|
uniqueName = lisConfigMap_emptyItemName.get(emrIntroduceVO.getName());
|
|
|
}
|
|
|
+ }
|
|
|
} else if (type.equals(QuestionTypeEnum.Pacs.getKey())) {
|
|
|
RespDTO<Map<String, String>> respPacsConfigMap = tranServiceClient.getPacsConfigByHosCode(hosCodeVO);
|
|
|
+ if (RespDTOUtil.respIsNG(respPacsConfigMap)) {
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR);
|
|
|
+ }
|
|
|
Map<String, String> pacsConfigMap = respPacsConfigMap.data;
|
|
|
uniqueName = pacsConfigMap.get(emrIntroduceVO.getName());
|
|
|
}
|
|
@@ -187,7 +199,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
String[] titles = emrIntroduceVO.getTitles();
|
|
|
Map<String, String> titleMapping = new LinkedHashMap<>();
|
|
|
List<String> uniqueTitleList = Lists.newLinkedList();
|
|
|
- if (titles.length > 0) {
|
|
|
+ if (ArrayUtil.isNotEmpty(titles)) {
|
|
|
for (String title : titles) {
|
|
|
String uniqueTitle = titleMappingMap.get(title);
|
|
|
titleMapping.put(title, uniqueTitle);
|
|
@@ -220,8 +232,8 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
eq("introduce_id", introduceMap.getIntroduceId()).
|
|
|
orderByAsc("order_no");
|
|
|
//如果标题列表未传,全部返回
|
|
|
- if (emrIntroduceVO.getTitles().length > 0) {
|
|
|
- if (uniqueTitleList.size() > 0) {
|
|
|
+ if (ArrayUtil.isNotEmpty(emrIntroduceVO.getTitles())) {
|
|
|
+ if (ListUtil.isNotEmpty(uniqueTitleList)) {
|
|
|
introduceDetailQueryWrapper.in("title", uniqueTitleList);
|
|
|
} else {
|
|
|
//标题未匹配上,不返回数据,加一个不成立的条件
|
|
@@ -230,7 +242,7 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
|
|
|
}
|
|
|
List<IntroduceDetail> introduceDetailList = introduceDetailFacade.list(introduceDetailQueryWrapper);
|
|
|
List<EMRIntroduceDetailDTO> retList = Lists.newLinkedList();
|
|
|
- if (emrIntroduceVO.getTitles().length > 0) {
|
|
|
+ if (ArrayUtil.isNotEmpty(emrIntroduceVO.getTitles())) {
|
|
|
for (Map.Entry<String, String> entry : titleMapping.entrySet()) {
|
|
|
EMRIntroduceDetailDTO detailDTO = new EMRIntroduceDetailDTO();
|
|
|
detailDTO.setTitle(entry.getKey());
|