Kaynağa Gözat

Merge branch 'dev/KLBstand' into dev/precSR

gaodm 6 yıl önce
ebeveyn
işleme
331994b111
49 değiştirilmiş dosya ile 819 ekleme ve 521 silme
  1. 7 15
      aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java
  2. 7 18
      aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  3. 2 0
      aipt-service/src/main/java/com/diagbot/dto/ConceptRetrievalDTO.java
  4. 4 0
      aipt-service/src/main/java/com/diagbot/dto/RetrievalDTO.java
  5. 2 1
      aipt-service/src/main/java/com/diagbot/enums/LexiconRSTypeEnum.java
  6. 4 1
      aipt-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java
  7. 1 1
      aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java
  8. 74 44
      aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  9. 16 17
      aipt-service/src/main/java/com/diagbot/facade/PushFacade.java
  10. 1 0
      aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java
  11. 8 0
      aipt-service/src/main/java/com/diagbot/mapper/ConceptMapper.java
  12. 8 0
      aipt-service/src/main/java/com/diagbot/service/ConceptService.java
  13. 11 0
      aipt-service/src/main/java/com/diagbot/service/impl/ConceptServiceImpl.java
  14. 19 0
      aipt-service/src/main/java/com/diagbot/vo/LisConfigVO.java
  15. 4 2
      aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java
  16. 304 78
      aipt-service/src/main/resources/mapper/ConceptMapper.xml
  17. 17 43
      icss-service/src/main/java/com/diagbot/client/TranServiceClient.java
  18. 45 84
      icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java
  19. 4 2
      icss-service/src/main/java/com/diagbot/dto/LisConfigDTO.java
  20. 2 0
      icss-service/src/main/java/com/diagbot/dto/RetrievalDTO.java
  21. 9 9
      icss-service/src/main/java/com/diagbot/facade/AssembleFacade.java
  22. 25 15
      icss-service/src/main/java/com/diagbot/facade/LisExcelResFacade.java
  23. 17 71
      icss-service/src/main/java/com/diagbot/facade/LisMappingFacade.java
  24. 2 1
      icss-service/src/main/java/com/diagbot/facade/PushFacade.java
  25. 7 16
      icss-service/src/main/java/com/diagbot/facade/QuestionFacade.java
  26. 6 0
      icss-service/src/main/java/com/diagbot/vo/LisHospitalCodeVO.java
  27. 2 1
      icssman-service/src/main/java/com/diagbot/enums/QuestionTypeEnum.java
  28. 7 0
      icssman-service/src/main/java/com/diagbot/facade/LisMappingFacade.java
  29. 23 3
      icssman-service/src/main/java/com/diagbot/facade/QuestionFacade.java
  30. 2 0
      icssman-service/src/main/java/com/diagbot/vo/ConceptExistVO.java
  31. 1 0
      icssman-service/src/main/java/com/diagbot/vo/QuestionIndexVO.java
  32. 0 1
      icssman-service/src/main/java/com/diagbot/vo/QuestionPageVO.java
  33. 3 0
      icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml
  34. 2 2
      knowledgeman-service/src/main/java/com/diagbot/enums/LexiconRSTypeEnum.java
  35. 4 1
      knowledgeman-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java
  36. 31 25
      knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java
  37. 1 1
      knowledgeman-service/src/main/java/com/diagbot/service/impl/EnumsDataServiceImpl.java
  38. 13 1
      knowledgeman-service/src/main/java/com/diagbot/util/ParamConvertUtil.java
  39. 2 0
      knowledgeman-service/src/main/java/com/diagbot/vo/ConceptExistVO.java
  40. 8 2
      knowledgeman-service/src/main/java/com/diagbot/vo/GetAllInformationVO.java
  41. 3 1
      tran-service/src/main/java/com/diagbot/dto/LisConfigDTO.java
  42. 19 22
      tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java
  43. 7 0
      tran-service/src/main/java/com/diagbot/mapper/TranLisConfigMapper.java
  44. 7 0
      tran-service/src/main/java/com/diagbot/service/TranLisConfigService.java
  45. 10 0
      tran-service/src/main/java/com/diagbot/service/impl/TranLisConfigServiceImpl.java
  46. 18 0
      tran-service/src/main/java/com/diagbot/vo/LisConfigVO.java
  47. 4 0
      tran-service/src/main/java/com/diagbot/vo/LisHospitalCodeVO.java
  48. 18 29
      tran-service/src/main/java/com/diagbot/web/TranLisConfigController.java
  49. 28 14
      tran-service/src/main/resources/mapper/TranLisConfigMapper.xml

+ 7 - 15
aipt-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -14,6 +14,7 @@ import com.diagbot.vo.HospitalDeptInfoVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataiIds;
 import com.diagbot.vo.IndexDataiIds;
+import com.diagbot.vo.LisConfigVO;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -57,22 +58,13 @@ public interface TranServiceClient {
     RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
     RespDTO<GetTopPatientInfoDTO> getTopPatientInfo(@RequestBody GetTopPatientInfoVO getTopPatientInfoVO);
 
 
     /**
     /**
-     * 根据医院编码获取化验公表映射关系-itemName不为空
+     * 根据医院编码和套餐名称获取化验公表映射关系
      *
      *
-     * @param hosCodeVO
-     * @return
-     */
-    @PostMapping("/tranLisConfig/getLisConfigByHosCode_NotEmptyItemName")
-    RespDTO<Map<String, Map<String, String>>> getLisConfigByHosCode_NotEmptyItemName(@RequestBody HosCodeVO hosCodeVO);
-
-    /**
-     * 根据医院编码获取化验公表映射关系-itemName为空
-     *
-     * @param hosCodeVO
+     * @param lisConfigVO
      * @return
      * @return
      */
      */
-    @PostMapping("/tranLisConfig/getLisConfigByHosCode_EmptyItemName")
-    RespDTO<Map<String, String>> getLisConfigByHosCode_EmptyItemName(@RequestBody HosCodeVO hosCodeVO);
+    @PostMapping("/tranLisConfig/getLisConfigByMealNameAndHosCode")
+    RespDTO<Map<String, Map<String, String>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO);
 
 
     /**
     /**
      * 根据医院编码获取辅检公表映射关系
      * 根据医院编码获取辅检公表映射关系
@@ -113,11 +105,11 @@ public interface TranServiceClient {
     /**
     /**
      * 根据医院编码获取化验公表映射关系,公表项做key
      * 根据医院编码获取化验公表映射关系,公表项做key
      *
      *
-     * @param hosCodeVO
+     * @param lisConfigVO
      * @return
      * @return
      */
      */
     @PostMapping("/tranLisConfig/getLisConfigByUniqueNameAndHosCode")
     @PostMapping("/tranLisConfig/getLisConfigByUniqueNameAndHosCode")
-    RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO);
+    RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody LisConfigVO lisConfigVO);
 
 
     /**
     /**
      * 根据医院编码查询辅检公表映射,公表项做key
      * 根据医院编码查询辅检公表映射,公表项做key

+ 7 - 18
aipt-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -14,6 +14,7 @@ import com.diagbot.vo.HospitalDeptInfoVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataSaveVO;
 import com.diagbot.vo.IndexDataiIds;
 import com.diagbot.vo.IndexDataiIds;
+import com.diagbot.vo.LisConfigVO;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -49,26 +50,14 @@ public class TranServiceHystrix implements TranServiceClient {
     }
     }
 
 
     /**
     /**
-     * 根据医院编码获取化验公表映射关系-itemName不为空
+     * 根据医院编码和套餐名称获取化验公表映射关系
      *
      *
-     * @param hosCodeVO
+     * @param lisConfigVO
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public RespDTO<Map<String, Map<String, String>>> getLisConfigByHosCode_NotEmptyItemName(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getLisConfigByHosCode_NotEmptyItemName");
-        return null;
-    }
-
-    /**
-     * 根据医院编码获取化验公表映射关系-itemName为空
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @Override
-    public RespDTO<Map<String, String>> getLisConfigByHosCode_EmptyItemName(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getLisConfigByHosCode_EmptyItemName");
+    public RespDTO<Map<String, Map<String, String>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
+        log.error("【hystrix】调用{}异常", "getLisConfigByMealNameAndHosCode");
         return null;
         return null;
     }
     }
 
 
@@ -123,11 +112,11 @@ public class TranServiceHystrix implements TranServiceClient {
     /**
     /**
      * 根据医院编码获取化验公表映射关系,公表项做key
      * 根据医院编码获取化验公表映射关系,公表项做key
      *
      *
-     * @param hosCodeVO
+     * @param lisConfigVO
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
+    public RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
         log.error("【hystrix】调用{}异常", "getLisConfigByUniqueNameAndHosCode");
         log.error("【hystrix】调用{}异常", "getLisConfigByUniqueNameAndHosCode");
         return null;
         return null;
     }
     }

+ 2 - 0
aipt-service/src/main/java/com/diagbot/dto/ConceptRetrievalDTO.java

@@ -20,4 +20,6 @@ public class ConceptRetrievalDTO {
     private Long libTypeId;//标签类型id
     private Long libTypeId;//标签类型id
     private String libTypeName;//标签类型名称
     private String libTypeName;//标签类型名称
     private Integer type;//questionType
     private Integer type;//questionType
+    private Long uniqueId;//公表id
+    private String uniqueName;//公表名称
 }
 }

+ 4 - 0
aipt-service/src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -27,4 +27,8 @@ public class RetrievalDTO {
     private String libTypeName;
     private String libTypeName;
     //icss标签type
     //icss标签type
     private Integer type;
     private Integer type;
+    //公表名称
+    private String uniqueName;
+    //公表ID
+    private Long uniqueId;
 }
 }

+ 2 - 1
aipt-service/src/main/java/com/diagbot/enums/LexiconRSTypeEnum.java

@@ -26,7 +26,8 @@ public enum LexiconRSTypeEnum implements KeyedNamed {
     SPEC(15,"规格"),
     SPEC(15,"规格"),
     HAS(16,"有"),
     HAS(16,"有"),
     ORDER_BY(17,"包含排列于"),
     ORDER_BY(17,"包含排列于"),
-    SUBITEM(18,"包含子项");
+    SUBITEM(18,"包含子项"),
+    PUSH(19,"推送");
 
 
     @Setter
     @Setter
     private Integer key;
     private Integer key;

+ 4 - 1
aipt-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java

@@ -76,7 +76,10 @@ public enum LexiconTypeEnum implements KeyedNamed {
     FAMILY_HISTORY(64,"家族史"),
     FAMILY_HISTORY(64,"家族史"),
     FOOD_ALLERGY_HISTORY(65,"食物过敏史"),
     FOOD_ALLERGY_HISTORY(65,"食物过敏史"),
     HISTORY_OF_DRUG_ALLERGY(66,"药物过敏史"),
     HISTORY_OF_DRUG_ALLERGY(66,"药物过敏史"),
-    FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY(67,"家族相关传染病史");
+    FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY(67,"家族相关传染病史"),
+    FURTHER_CONSULTATION(68,"复诊"),
+    DIAGNOSTIC_CRITERIA(69,"诊断依据条件"),
+    OTHER_DIAGNOSTIC_CRITERIA(70,"诊断依据其他");
 
 
 
 
     @Setter
     @Setter

+ 1 - 1
aipt-service/src/main/java/com/diagbot/facade/ClinicalFacade.java

@@ -56,7 +56,7 @@ public class ClinicalFacade {
     @Autowired
     @Autowired
     private ConceptFacade conceptFacade;
     private ConceptFacade conceptFacade;
 
 
-    private static String up = "高";
+    private static String up = "高";
     private static String down = "降低";
     private static String down = "降低";
     private static String normal = "正常";
     private static String normal = "正常";
 
 

+ 74 - 44
aipt-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -24,9 +24,9 @@ import com.diagbot.vo.ConceptExistVO;
 import com.diagbot.vo.ConceptFindVO;
 import com.diagbot.vo.ConceptFindVO;
 import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptSearchVO;
 import com.diagbot.vo.ConceptUsualVO;
 import com.diagbot.vo.ConceptUsualVO;
-import com.diagbot.vo.ExistListByConceptIdsVO;
 import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.GetStaticKnowledgeVO;
 import com.diagbot.vo.RetrievalVO;
 import com.diagbot.vo.RetrievalVO;
+import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
@@ -115,16 +115,16 @@ public class ConceptFacade extends ConceptServiceImpl {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "术语列表不能为空");
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "术语列表不能为空");
         }
         }
 
 
-        if (IntegerUtil.isNull(conceptFindVO.getAge())){
+        if (IntegerUtil.isNull(conceptFindVO.getAge())) {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "年龄不能为空");
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "年龄不能为空");
         }
         }
 
 
-        if (IntegerUtil.isNull(conceptFindVO.getSexType())){
+        if (IntegerUtil.isNull(conceptFindVO.getSexType())) {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "性别不能为空");
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "性别不能为空");
         }
         }
 
 
         //获取结构
         //获取结构
-        List<ConceptBaseDTO>  concepts
+        List<ConceptBaseDTO> concepts
                 = this.getConceptConMap(conceptFindVO);
                 = this.getConceptConMap(conceptFindVO);
 
 
         //出参封装
         //出参封装
@@ -260,14 +260,14 @@ public class ConceptFacade extends ConceptServiceImpl {
      * @param retrievalVO
      * @param retrievalVO
      * @return
      * @return
      */
      */
-    public List<ConceptRetrievalDTO> retrivelConceptInfo(RetrievalVO retrievalVO){
+    public List<ConceptRetrievalDTO> retrivelConceptInfo(RetrievalVO retrievalVO) {
         Boolean bla = true;
         Boolean bla = true;
-        if (null != retrievalVO.getType()){
-            if(retrievalVO.getType().intValue() == ConceptTypeEnum.Lis.getKey()){//如果是化验,添加化验子项类型
-                retrievalVO.setDetilType(LexiconTypeEnum.LIS_DETAILS.getKey());
+        if (null != retrievalVO.getType()) {
+            if (retrievalVO.getType().intValue() == ConceptTypeEnum.Lis.getKey()) {//如果是化验,添加化验子项类型
+                retrievalVO.setDetailType(LexiconTypeEnum.LIS_DETAILS.getKey());
                 bla = true;
                 bla = true;
-            }else if(retrievalVO.getType().intValue() == ConceptTypeEnum.Past.getKey()
-                    || retrievalVO.getType().intValue() == ConceptTypeEnum.Other.getKey()){//如果是其他史设置其他史类型
+            } else if (retrievalVO.getType().intValue() == ConceptTypeEnum.Past.getKey()
+                    || retrievalVO.getType().intValue() == ConceptTypeEnum.Other.getKey()) {//如果是其他史设置其他史类型
                 List<Integer> typeList = new ArrayList<>();
                 List<Integer> typeList = new ArrayList<>();
                 typeList.add(LexiconTypeEnum.HISTORY_OF_PAST_DISEASES.getKey());
                 typeList.add(LexiconTypeEnum.HISTORY_OF_PAST_DISEASES.getKey());
                 typeList.add(LexiconTypeEnum.HISTORY_OF_TRAUMA.getKey());
                 typeList.add(LexiconTypeEnum.HISTORY_OF_TRAUMA.getKey());
@@ -285,17 +285,24 @@ public class ConceptFacade extends ConceptServiceImpl {
                 retrievalVO.setOtherType(typeList);
                 retrievalVO.setOtherType(typeList);
                 bla = false;
                 bla = false;
             }
             }
-            if(bla){
+            if (bla) {
                 retrievalVO.setType(ParamConvertUtil.conceptConvert2Lib(retrievalVO.getType()));
                 retrievalVO.setType(ParamConvertUtil.conceptConvert2Lib(retrievalVO.getType()));
             }
             }
         }
         }
-        List<ConceptRetrievalDTO> conceptRetrievalDTOS = this.retrievalConcept(retrievalVO);
+        List<ConceptRetrievalDTO> conceptRetrievalDTOS = Lists.newArrayList();
+        if (retrievalVO.getIsStatic().equals(1)) {
+            conceptRetrievalDTOS = this.staticKnowledge(retrievalVO);
+        } else {
+            conceptRetrievalDTOS = this.retrievalConcept(retrievalVO);
+        }
+
         List<ConceptRetrievalDTO> res = new ArrayList<>();
         List<ConceptRetrievalDTO> res = new ArrayList<>();
         List<Long> selfList = new ArrayList<>(); // 本体
         List<Long> selfList = new ArrayList<>(); // 本体
         List<Long> subList = new ArrayList<>(); // 子项
         List<Long> subList = new ArrayList<>(); // 子项
         List<String> conceptNameList = new ArrayList<>();//名称结果集保证数据唯一
         List<String> conceptNameList = new ArrayList<>();//名称结果集保证数据唯一
+        List<Long> uniqueIdList = new ArrayList<>();
         for (ConceptRetrievalDTO bean : conceptRetrievalDTOS) {
         for (ConceptRetrievalDTO bean : conceptRetrievalDTOS) {
-            if(StringUtil.isNotEmpty(bean.getParentName())) { // 重置showType
+            if (StringUtil.isNotEmpty(bean.getParentName())) { // 重置showType
                 bean.setShowType(2L);
                 bean.setShowType(2L);
             }
             }
             if (bean.getShowType().intValue() == 1) { // 本体
             if (bean.getShowType().intValue() == 1) { // 本体
@@ -306,23 +313,54 @@ public class ConceptFacade extends ConceptServiceImpl {
         }
         }
         // 有本体,过滤同义词和子项;无本体,有子项,过滤同义词
         // 有本体,过滤同义词和子项;无本体,有子项,过滤同义词
         for (ConceptRetrievalDTO bean : conceptRetrievalDTOS) {
         for (ConceptRetrievalDTO bean : conceptRetrievalDTOS) {
-            if(bean.getShowType().intValue() == 1) {
-                res.add(bean);
-            } else if (bean.getShowType().intValue() == 2) {
-                if(!selfList.contains(bean.getParentId()) && !conceptNameList.contains(bean.getParentName())) {
-                    conceptNameList.add(bean.getParentName());
+            if (bean.getShowType().intValue() == 1) {
+                if(retrievalVO.getIsSonShow().intValue() == 0){//isSonShow为0执行检索去重逻辑
                     res.add(bean);
                     res.add(bean);
+                }else {//sSonShow不为0执行静态知识检索去重逻辑
+                    if(bean.getUniqueId() != null && bean.getUniqueId() != 0){
+                        if(!uniqueIdList.contains(bean.getUniqueId())){
+                            res.add(bean);
+                            uniqueIdList.add(bean.getUniqueId());
+                        }
+                    }else {
+                        res.add(bean);
+                    }
+                }
+            } else if (bean.getShowType().intValue() == 2) {
+                if(retrievalVO.getIsSonShow().intValue() == 0){//isSonShow为0执行检索去重逻辑
+                    if (!selfList.contains(bean.getParentId()) && !conceptNameList.contains(bean.getParentName()) ) {
+                        conceptNameList.add(bean.getParentName());
+                        res.add(bean);
+                    }
+                } else {//sSonShow不为0执行静态知识检索去重逻辑
+                    if(bean.getUniqueId() != null && bean.getUniqueId() != 0){
+                        if(!uniqueIdList.contains(bean.getUniqueId())){
+                            res.add(bean);
+                            uniqueIdList.add(bean.getUniqueId());
+                        }
+                    }
                 }
                 }
             } else if (bean.getShowType().intValue() == 0) {
             } else if (bean.getShowType().intValue() == 0) {
-                if(!selfList.contains(bean.getSelfId()) && !subList.contains(bean.getSelfId()) && !conceptNameList.contains(bean.getSelfName())) {
-                    conceptNameList.add(bean.getSelfName());
-                    res.add(bean);
+                if(retrievalVO.getIsSonShow().intValue() == 0){//isSonShow为0执行检索去重逻辑
+                    if (!selfList.contains(bean.getSelfId()) && !subList.contains(bean.getSelfId()) && !conceptNameList.contains(bean.getSelfName())) {
+                        conceptNameList.add(bean.getSelfName());
+                        res.add(bean);
+                    }
+                }else {//SonShow不为0执行静态知识检索去重逻辑
+                    if(bean.getUniqueId() != null && bean.getUniqueId() != 0){
+                        if(!uniqueIdList.contains(bean.getUniqueId())){
+                            res.add(bean);
+                            uniqueIdList.add(bean.getUniqueId());
+                        }
+                    }else {
+                        res.add(bean);
+                    }
                 }
                 }
             }
             }
         }
         }
         //把本体的sameName过滤掉
         //把本体的sameName过滤掉
         for (ConceptRetrievalDTO conceptRetrievalDTO : res) {
         for (ConceptRetrievalDTO conceptRetrievalDTO : res) {
-            if(conceptRetrievalDTO.getSameName() != null && conceptRetrievalDTO.getSameName().equals(conceptRetrievalDTO.getSelfName())){
+            if (conceptRetrievalDTO.getSameName() != null && conceptRetrievalDTO.getSameName().equals(conceptRetrievalDTO.getSelfName())) {
                 conceptRetrievalDTO.setSameName(null);
                 conceptRetrievalDTO.setSameName(null);
             }
             }
             conceptRetrievalDTO.setType(ParamConvertUtil.libConvert2Concept(conceptRetrievalDTO.getLibTypeId().intValue()));
             conceptRetrievalDTO.setType(ParamConvertUtil.libConvert2Concept(conceptRetrievalDTO.getLibTypeId().intValue()));
@@ -337,21 +375,23 @@ public class ConceptFacade extends ConceptServiceImpl {
      * @param getStaticKnowledgeVO
      * @param getStaticKnowledgeVO
      * @return
      * @return
      */
      */
-    public List<RetrievalDTO> getStaticKnowledge(GetStaticKnowledgeVO getStaticKnowledgeVO){
+    public List<RetrievalDTO> getStaticKnowledge(GetStaticKnowledgeVO getStaticKnowledgeVO) {
         List<RetrievalDTO> retrievalDTOS = new ArrayList<>();
         List<RetrievalDTO> retrievalDTOS = new ArrayList<>();
         RetrievalVO retrievalVO = new RetrievalVO();
         RetrievalVO retrievalVO = new RetrievalVO();
         RetrievalDTO retrievalDTO = new RetrievalDTO();
         RetrievalDTO retrievalDTO = new RetrievalDTO();
-        BeanUtil.copyProperties(getStaticKnowledgeVO,retrievalVO);
+        BeanUtil.copyProperties(getStaticKnowledgeVO, retrievalVO);
+        retrievalVO.setIsSonShow(1);
         retrievalVO.setIsStatic(1);
         retrievalVO.setIsStatic(1);
         List<Integer> types = new ArrayList<>();
         List<Integer> types = new ArrayList<>();
-        types.add(LexiconTypeEnum.LIS_TABLES.getKey());//添加化验公表项类型
         for (Integer type : getStaticKnowledgeVO.getTypes()) {
         for (Integer type : getStaticKnowledgeVO.getTypes()) {
-            types.add(ParamConvertUtil.conceptConvert2Lib(type));
+            if(type.intValue() == ConceptTypeEnum.Lis.getKey()){//单独设置化验类型
+                retrievalVO.setType(type);
+            }else {//查询时去掉化验
+                types.add(ParamConvertUtil.conceptConvert2Lib(type));
+            }
         }
         }
-        //设置类型为诊断、药品、化验、辅检
+        //设置类型为诊断、药品、辅检
         retrievalVO.setOtherType(types);
         retrievalVO.setOtherType(types);
-        //如果为化验时设置子项类型
-        retrievalVO.setDetilType(LexiconTypeEnum.LIS_DETAILS.getKey());
         //获取标签信息
         //获取标签信息
         List<ConceptRetrievalDTO> conceptRetrievalDTOList = this.retrivelConceptInfo(retrievalVO);
         List<ConceptRetrievalDTO> conceptRetrievalDTOList = this.retrivelConceptInfo(retrievalVO);
         List<RetrievalDTO> staticRetrievalList = new ArrayList<>();
         List<RetrievalDTO> staticRetrievalList = new ArrayList<>();
@@ -361,6 +401,7 @@ public class ConceptFacade extends ConceptServiceImpl {
                 retrievalDTO = new RetrievalDTO();
                 retrievalDTO = new RetrievalDTO();
                 retrievalDTO.setConceptId(conceptRetrievalDTO.getSelfId());
                 retrievalDTO.setConceptId(conceptRetrievalDTO.getSelfId());
                 retrievalDTO.setName(conceptRetrievalDTO.getSelfName());
                 retrievalDTO.setName(conceptRetrievalDTO.getSelfName());
+                retrievalDTO.setUniqueName(conceptRetrievalDTO.getUniqueName());
                 if (StringUtil.isNotEmpty(conceptRetrievalDTO.getParentName())) {//parent不为空时说明有子项,返回父级id
                 if (StringUtil.isNotEmpty(conceptRetrievalDTO.getParentName())) {//parent不为空时说明有子项,返回父级id
                     retrievalDTO.setConceptId(conceptRetrievalDTO.getParentId());
                     retrievalDTO.setConceptId(conceptRetrievalDTO.getParentId());
                     retrievalDTO.setName(conceptRetrievalDTO.getParentName());
                     retrievalDTO.setName(conceptRetrievalDTO.getParentName());
@@ -376,21 +417,10 @@ public class ConceptFacade extends ConceptServiceImpl {
                 retrievalDTOS.add(retrievalDTO);
                 retrievalDTOS.add(retrievalDTO);
             }
             }
         }
         }
-        //判断是否存在静态知识
-        List<Long> cenceptIdList = retrievalDTOS.stream().map(RetrievalDTO::getConceptId).collect(Collectors.toList());
-        ExistListByConceptIdsVO existListByConceptIdsVO = new ExistListByConceptIdsVO();
-        existListByConceptIdsVO.setConceptIds(cenceptIdList);
-        List<Long> existConceptIdList = conceptDetailFacade.existListByConceptIds(existListByConceptIdsVO);
-        if(ListUtil.isNotEmpty(existConceptIdList)){
-            for (RetrievalDTO retrievalDTOInfo : retrievalDTOS) {
-                for (Long concept : existConceptIdList) {
-                    if (retrievalDTOInfo.getConceptId().intValue() == concept.intValue()){
-                        retrievalDTO = new RetrievalDTO();
-                        BeanUtil.copyProperties(retrievalDTOInfo,retrievalDTO);
-                        staticRetrievalList.add(retrievalDTO);
-                    }
-                }
-            }
+        for (RetrievalDTO retrievalDTOInfo : retrievalDTOS) {
+            retrievalDTO = new RetrievalDTO();
+            BeanUtil.copyProperties(retrievalDTOInfo, retrievalDTO);
+            staticRetrievalList.add(retrievalDTO);
         }
         }
         return staticRetrievalList;
         return staticRetrievalList;
     }
     }

+ 16 - 17
aipt-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -29,6 +29,7 @@ import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.ConceptBaseVO;
 import com.diagbot.vo.HospitalSetVO;
 import com.diagbot.vo.HospitalSetVO;
+import com.diagbot.vo.LisConfigVO;
 import com.diagbot.vo.SearchVo;
 import com.diagbot.vo.SearchVo;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -379,32 +380,26 @@ public class PushFacade {
      * @return
      * @return
      */
      */
     public List<LisResult> addUniqueName(List<LisResult> lisResults, String hosCode) {
     public List<LisResult> addUniqueName(List<LisResult> lisResults, String hosCode) {
-        HosCodeVO hosCodeVO = new HosCodeVO();
-        hosCodeVO.setHosCode(hosCode);
         //化验项转公表内容,参数处理
         //化验项转公表内容,参数处理
         if (ListUtil.isNotEmpty(lisResults)) {
         if (ListUtil.isNotEmpty(lisResults)) {
-            RespDTO<Map<String, Map<String, String>>> lisConfigRes = tranServiceClient.getLisConfigByHosCode_NotEmptyItemName(hosCodeVO);
-            RespDTO<Map<String, String>> lisConfigWithEmptyItemNameRes = tranServiceClient.getLisConfigByHosCode_EmptyItemName(hosCodeVO);
+            List<String> mealNameList = lisResults.stream().map(lisResult -> lisResult.getName()).collect(Collectors.toList());
+            LisConfigVO lisConfigVO = new LisConfigVO();
+            lisConfigVO.setHosCode(hosCode);
+            lisConfigVO.setMealNameList(mealNameList);
+            RespDTO<Map<String, Map<String, String>>> lisConfigRes = tranServiceClient.getLisConfigByMealNameAndHosCode(lisConfigVO);
             Map<String, Map<String, String>> lisConfigMap = new LinkedHashMap<>();
             Map<String, Map<String, String>> lisConfigMap = new LinkedHashMap<>();
-            Map<String, String> lisConfigMap_emptyItemName = new LinkedHashMap<>();
             if (RespDTOUtil.respIsOK(lisConfigRes)) {
             if (RespDTOUtil.respIsOK(lisConfigRes)) {
                 lisConfigMap = lisConfigRes.data;
                 lisConfigMap = lisConfigRes.data;
             }
             }
-            if (RespDTOUtil.respIsOK(lisConfigWithEmptyItemNameRes)) {
-                lisConfigMap_emptyItemName = lisConfigWithEmptyItemNameRes.data;
-            }
             for (LisResult lisResult : lisResults) {
             for (LisResult lisResult : lisResults) {
                 if (!lisResult.getSource().equals(LisSourceEnum.Outer.getKey())) {
                 if (!lisResult.getSource().equals(LisSourceEnum.Outer.getKey())) {
                     continue;
                     continue;
                 }
                 }
-                if (StringUtil.isNotBlank(lisResult.getName())) {
-                    if (StringUtil.isNotBlank(lisResult.getDetailName())) {
-                        if (lisConfigMap.get(lisResult.getName()) != null) {
-                            lisResult.setUniqueName(lisConfigMap.get(lisResult.getName()).get(lisResult.getDetailName()));
-                        }
-                    } else {
-                        lisResult.setUniqueName(lisConfigMap_emptyItemName.get(lisResult.getName()));
-                    }
+                if (lisResult.getDetailName() == null) {
+                    lisResult.setDetailName("");
+                }
+                if (lisConfigMap.get(lisResult.getName()) != null) {
+                    lisResult.setUniqueName(lisConfigMap.get(lisResult.getName()).get(lisResult.getDetailName()));
                 }
                 }
             }
             }
         }
         }
@@ -422,8 +417,12 @@ public class PushFacade {
     public List<ConceptPushDTO> addClientName(List<ConceptPushDTO> concepts, String hosCode, Integer type) {
     public List<ConceptPushDTO> addClientName(List<ConceptPushDTO> concepts, String hosCode, Integer type) {
         HosCodeVO hosCodeVO = new HosCodeVO();
         HosCodeVO hosCodeVO = new HosCodeVO();
         hosCodeVO.setHosCode(hosCode);
         hosCodeVO.setHosCode(hosCode);
+        LisConfigVO lisConfigVO = new LisConfigVO();
+        lisConfigVO.setHosCode(hosCode);
+        List<String> uniqueNameList = concepts.stream().map(concept -> concept.getName()).collect(Collectors.toList());
+        lisConfigVO.setUniqueNameList(uniqueNameList);
         if (type.equals(ConceptTypeEnum.Lis.getKey())) {
         if (type.equals(ConceptTypeEnum.Lis.getKey())) {
-            RespDTO<Map<String, List<String>>> lisRes = tranServiceClient.getLisConfigByUniqueNameAndHosCode(hosCodeVO);
+            RespDTO<Map<String, List<String>>> lisRes = tranServiceClient.getLisConfigByUniqueNameAndHosCode(lisConfigVO);
             if (RespDTOUtil.respIsOK(lisRes)) {
             if (RespDTOUtil.respIsOK(lisRes)) {
                 Map<String, List<String>> lisMappingByUniqueName = lisRes.data;
                 Map<String, List<String>> lisMappingByUniqueName = lisRes.data;
                 for (ConceptPushDTO concept : concepts) {
                 for (ConceptPushDTO concept : concepts) {

+ 1 - 0
aipt-service/src/main/java/com/diagbot/facade/TreatmentFacade.java

@@ -232,6 +232,7 @@ public class TreatmentFacade {
             }
             }
             retSubMap.put(concept.getLibType(), concept);
             retSubMap.put(concept.getLibType(), concept);
             retMap.put(concept.getLibName(), retSubMap);
             retMap.put(concept.getLibName(), retSubMap);
+            retSubMap = new LinkedHashMap<>();
         }
         }
         return retMap;
         return retMap;
     }
     }

+ 8 - 0
aipt-service/src/main/java/com/diagbot/mapper/ConceptMapper.java

@@ -46,6 +46,14 @@ public interface ConceptMapper extends BaseMapper<Concept> {
      */
      */
     List<ConceptRetrievalDTO> retrievalConcept(RetrievalVO retrievalVO);
     List<ConceptRetrievalDTO> retrievalConcept(RetrievalVO retrievalVO);
 
 
+    /**
+     * 静态知识检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    List<ConceptRetrievalDTO> staticKnowledge(RetrievalVO retrievalVO);
+
     List<ConceptBaseDTO> getConceptConMap(ConceptFindVO conceptFindVO);
     List<ConceptBaseDTO> getConceptConMap(ConceptFindVO conceptFindVO);
 
 
     /**
     /**

+ 8 - 0
aipt-service/src/main/java/com/diagbot/service/ConceptService.java

@@ -46,6 +46,14 @@ public interface ConceptService extends IService<Concept> {
      */
      */
     List<ConceptRetrievalDTO> retrievalConcept(RetrievalVO retrievalVO);
     List<ConceptRetrievalDTO> retrievalConcept(RetrievalVO retrievalVO);
 
 
+    /**
+     * 静态知识检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    List<ConceptRetrievalDTO> staticKnowledge(RetrievalVO retrievalVO);
+
     List<ConceptBaseDTO> getConceptConMap(ConceptFindVO conceptFindVO);
     List<ConceptBaseDTO> getConceptConMap(ConceptFindVO conceptFindVO);
 
 
     /**
     /**

+ 11 - 0
aipt-service/src/main/java/com/diagbot/service/impl/ConceptServiceImpl.java

@@ -48,6 +48,17 @@ public class ConceptServiceImpl extends ServiceImpl<ConceptMapper, Concept> impl
         return baseMapper.retrievalConcept(retrievalVO);
         return baseMapper.retrievalConcept(retrievalVO);
     }
     }
 
 
+    /**
+     * 静态知识检索
+     *
+     * @param retrievalVO
+     * @return
+     */
+    @Override
+    public List<ConceptRetrievalDTO> staticKnowledge(RetrievalVO retrievalVO){
+        return baseMapper.staticKnowledge(retrievalVO);
+    }
+
     /**
     /**
      * 获取带排序概念-关系-概念
      * 获取带排序概念-关系-概念
      *
      *

+ 19 - 0
aipt-service/src/main/java/com/diagbot/vo/LisConfigVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import com.diagbot.client.bean.HosCodeVO;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description: 化验公表映射检索入参
+ * @Author:zhaops
+ * @time: 2019/7/6 15:52
+ */
+@Getter
+@Setter
+public class LisConfigVO extends HosCodeVO {
+    List<String> mealNameList;
+    List<String> uniqueNameList;
+}

+ 4 - 2
aipt-service/src/main/java/com/diagbot/vo/RetrievalVO.java

@@ -22,9 +22,11 @@ public class RetrievalVO {
     //需要去重的id
     //需要去重的id
     private List<Long> inputIds;
     private List<Long> inputIds;
     //获取子项时需要用到的type类型
     //获取子项时需要用到的type类型
-    private Integer detilType;
+    private Integer detailType;
     //类型为其他史时用到的type类型
     //类型为其他史时用到的type类型
     private List<Integer> otherType;
     private List<Integer> otherType;
     //是否是静态搜索
     //是否是静态搜索
-    private Integer isStatic;
+    private Integer isStatic = 0;
+    //是否显示子项(0.不显示,1.显示)
+    private Integer isSonShow = 0;
 }
 }

+ 304 - 78
aipt-service/src/main/resources/mapper/ConceptMapper.xml

@@ -192,17 +192,11 @@
         LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
         LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
         LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
         LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
         LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
         LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
-        <if test="isStatic != null and isStatic == 1">
-            LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
-        </if>
         WHERE
         WHERE
         t1.is_deleted = 'N'
         t1.is_deleted = 'N'
         AND t2.is_deleted = 'N'
         AND t2.is_deleted = 'N'
         AND t3.is_deleted = 'N'
         AND t3.is_deleted = 'N'
         AND t6.is_deleted = 'N'
         AND t6.is_deleted = 'N'
-        <if test="isStatic != null and isStatic == 1">
-            AND t7.is_deleted = 'N'
-        </if>
         <if test="type != null">
         <if test="type != null">
             AND t1.lib_type = #{type}
             AND t1.lib_type = #{type}
         </if>
         </if>
@@ -229,28 +223,17 @@
             </foreach>
             </foreach>
         </if>
         </if>
         AND (t2.spell =  UPPER(#{InputStr}) OR t2.name =  #{InputStr})
         AND (t2.spell =  UPPER(#{InputStr}) OR t2.name =  #{InputStr})
-        <if test="isStatic != null and isStatic == 1">
-            GROUP BY t1.id
-        </if>
-        <if test="isStatic == null or isStatic != 1">
-            LIMIT 100
-        </if>)
+        LIMIT 100)
         UNION
         UNION
         (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
         (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
         LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
         LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
         LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
         LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
         LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
         LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
-        <if test="isStatic != null and isStatic == 1">
-            LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
-        </if>
         WHERE
         WHERE
         t1.is_deleted = 'N'
         t1.is_deleted = 'N'
         AND t2.is_deleted = 'N'
         AND t2.is_deleted = 'N'
         AND t3.is_deleted = 'N'
         AND t3.is_deleted = 'N'
         AND t6.is_deleted = 'N'
         AND t6.is_deleted = 'N'
-        <if test="isStatic != null and isStatic == 1">
-            AND t7.is_deleted = 'N'
-        </if>
         <if test="type != null">
         <if test="type != null">
             AND t1.lib_type = #{type}
             AND t1.lib_type = #{type}
         </if>
         </if>
@@ -277,28 +260,17 @@
             </foreach>
             </foreach>
         </if>
         </if>
         AND (t2.spell LIKE CONCAT( UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
         AND (t2.spell LIKE CONCAT( UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT( #{InputStr},'%'))
-        <if test="isStatic != null and isStatic == 1">
-            GROUP BY t1.id
-        </if>
-        <if test="isStatic == null or isStatic != 1">
-            LIMIT 100
-        </if>)
+        LIMIT 100)
         UNION
         UNION
         (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
         (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
         LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
         LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
         LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
         LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
         LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
         LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
-        <if test="isStatic != null and isStatic == 1">
-            LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
-        </if>
         WHERE
         WHERE
         t1.is_deleted = 'N'
         t1.is_deleted = 'N'
         AND t2.is_deleted = 'N'
         AND t2.is_deleted = 'N'
         AND t3.is_deleted = 'N'
         AND t3.is_deleted = 'N'
         AND t6.is_deleted = 'N'
         AND t6.is_deleted = 'N'
-        <if test="isStatic != null and isStatic == 1">
-            AND t7.is_deleted = 'N'
-        </if>
         <if test="type != null">
         <if test="type != null">
             AND t1.lib_type = #{type}
             AND t1.lib_type = #{type}
         </if>
         </if>
@@ -325,13 +297,8 @@
             </foreach>
             </foreach>
         </if>
         </if>
         AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
         AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
-        <if test="isStatic != null and isStatic == 1">
-            GROUP BY t1.id
-        </if>
-        <if test="isStatic == null or isStatic != 1">
-            LIMIT 100
-        </if>)
-        <if test="detilType != null and detilType != ''">
+        LIMIT 100)
+        <if test="detailType != null and detailType != ''">
             UNION
             UNION
             (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
             (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
@@ -339,9 +306,6 @@
             LEFT JOIN kl_concept t5 on t5.id = t4.start_id
             LEFT JOIN kl_concept t5 on t5.id = t4.start_id
             LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
             LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
             LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
             LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
-            <if test="isStatic != null and isStatic == 1">
-                LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t5.id
-            </if>
             WHERE
             WHERE
             t1.is_deleted = 'N'
             t1.is_deleted = 'N'
             AND t2.is_deleted = 'N'
             AND t2.is_deleted = 'N'
@@ -349,11 +313,8 @@
             AND t4.is_deleted = 'N'
             AND t4.is_deleted = 'N'
             AND t5.is_deleted = 'N'
             AND t5.is_deleted = 'N'
             AND t6.is_deleted = 'N'
             AND t6.is_deleted = 'N'
-            <if test="isStatic != null and isStatic == 1">
-                AND t7.is_deleted = 'N'
-            </if>
-            <if test="detilType != null">
-                AND t1.lib_type = #{detilType}
+            <if test="detailType != null">
+                AND t1.lib_type = #{detailType}
             </if>
             </if>
             <if test="sexType == 3">
             <if test="sexType == 3">
                 and t3.sex_type in ('1','2','3')
                 and t3.sex_type in ('1','2','3')
@@ -373,12 +334,7 @@
                 </foreach>
                 </foreach>
             </if>
             </if>
             AND t4.relation_id = 18
             AND t4.relation_id = 18
-            <if test="isStatic != null and isStatic == 1">
-                GROUP BY t5.id
-            </if>
-            <if test="isStatic == null or isStatic != 1">
-                LIMIT 100
-            </if>)
+            LIMIT 100)
             UNION
             UNION
             (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
             (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
@@ -386,9 +342,6 @@
             LEFT JOIN kl_concept t5 on t5.id = t4.start_id
             LEFT JOIN kl_concept t5 on t5.id = t4.start_id
             LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
             LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
             LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
             LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
-            <if test="isStatic != null and isStatic == 1">
-                LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t5.id
-            </if>
             WHERE
             WHERE
             t1.is_deleted = 'N'
             t1.is_deleted = 'N'
             AND t2.is_deleted = 'N'
             AND t2.is_deleted = 'N'
@@ -396,11 +349,8 @@
             AND t4.is_deleted = 'N'
             AND t4.is_deleted = 'N'
             AND t5.is_deleted = 'N'
             AND t5.is_deleted = 'N'
             AND t6.is_deleted = 'N'
             AND t6.is_deleted = 'N'
-            <if test="isStatic != null and isStatic == 1">
-                AND t7.is_deleted = 'N'
-            </if>
-            <if test="detilType != null">
-                AND t1.lib_type = #{detilType}
+            <if test="detailType != null">
+                AND t1.lib_type = #{detailType}
             </if>
             </if>
             <if test="sexType == 3">
             <if test="sexType == 3">
                 and t3.sex_type in ('1','2','3')
                 and t3.sex_type in ('1','2','3')
@@ -423,9 +373,7 @@
                 GROUP BY t5.id
                 GROUP BY t5.id
             </if>
             </if>
             AND t4.relation_id = 18
             AND t4.relation_id = 18
-            <if test="isStatic == null or isStatic != 1">
-                LIMIT 100
-            </if>)
+            LIMIT 100)
             UNION
             UNION
             (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
             (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
             LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
@@ -433,9 +381,6 @@
             LEFT JOIN kl_concept t5 on t5.id = t4.start_id
             LEFT JOIN kl_concept t5 on t5.id = t4.start_id
             LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
             LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
             LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
             LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
-            <if test="isStatic != null and isStatic == 1">
-                LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t5.id
-            </if>
             WHERE
             WHERE
             t1.is_deleted = 'N'
             t1.is_deleted = 'N'
             AND t2.is_deleted = 'N'
             AND t2.is_deleted = 'N'
@@ -443,11 +388,8 @@
             AND t4.is_deleted = 'N'
             AND t4.is_deleted = 'N'
             AND t5.is_deleted = 'N'
             AND t5.is_deleted = 'N'
             AND t6.is_deleted = 'N'
             AND t6.is_deleted = 'N'
-            <if test="isStatic != null and isStatic == 1">
-                AND t7.is_deleted = 'N'
-            </if>
-            <if test="detilType != null">
-                AND t1.lib_type = #{detilType}
+            <if test="detailType != null">
+                AND t1.lib_type = #{detailType}
             </if>
             </if>
             <if test="sexType == 3">
             <if test="sexType == 3">
                 and t3.sex_type in ('1','2','3')
                 and t3.sex_type in ('1','2','3')
@@ -466,18 +408,302 @@
                     #{id}
                     #{id}
                 </foreach>
                 </foreach>
             </if>
             </if>
-            <if test="isStatic != null and isStatic == 1">
-                GROUP BY t5.id
-            </if>
             AND t4.relation_id = 18
             AND t4.relation_id = 18
-            <if test="isStatic == null or isStatic != 1">
-                LIMIT 100
-            </if>)
+            LIMIT 100)
         </if>
         </if>
         ) a1
         ) a1
-        <if test="isStatic == null or isStatic != 1">
-            LIMIT 100
+        LIMIT 100
+    </select>
+
+    <select id="staticKnowledge" resultType="com.diagbot.dto.ConceptRetrievalDTO">
+        -- 除化验外其他类型标签
+        (SELECT b1.*,0 uniqueId,null uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+        LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t7.is_deleted = 'N'
+        <if test="otherType != null and otherType.size > 0">
+            AND t1.lib_type in
+            <foreach item="type" collection="otherType" open="(" separator="," close=")">
+                #{type}
+            </foreach>
+        </if>
+        AND (t2.spell = UPPER(#{InputStr}) OR t2.name = (#{InputStr}))
+        GROUP BY t1.id) b1)
+        UNION
+        (SELECT b1.*,0 uniqueId,null uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+        LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t7.is_deleted = 'N'
+        <if test="otherType != null and otherType.size > 0">
+            AND t1.lib_type in
+            <foreach item="type" collection="otherType" open="(" separator="," close=")">
+                #{type}
+            </foreach>
         </if>
         </if>
+        AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT((#{InputStr}),'%'))
+        GROUP BY t1.id) b1)
+        UNION
+        (SELECT b1.*,0 uniqueId,null uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+                LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+                LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                LEFT JOIN kl_concept_detail t7 ON t7.concept_id = t1.id
+                WHERE
+                t1.is_deleted = 'N'
+                AND t2.is_deleted = 'N'
+                AND t3.is_deleted = 'N'
+                AND t6.is_deleted = 'N'
+                AND t7.is_deleted = 'N'
+                <if test="otherType != null and otherType.size > 0">
+                    AND t1.lib_type in
+                    <foreach item="type" collection="otherType" open="(" separator="," close=")">
+                        #{type}
+                    </foreach>
+                </if>
+                AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',(#{InputStr}),'%'))
+                GROUP BY t1.id) b1)
+
+        -- 化验本体标签公表项匹配静态知识
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t1.lib_type = #{type}
+        AND (t2.spell = UPPER(#{InputStr}) OR t2.name = (#{InputStr}))
+        GROUP BY t1.id) b1,
+        kl_concept b2,
+        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and b1.selfName = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t1.lib_type = #{type}
+        AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT((#{InputStr}),'%'))
+        GROUP BY t1.id) b1,
+        kl_concept b2,
+        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and b1.selfName = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,0 parentId,null parentName,t2.`name` sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+                LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+                LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                WHERE
+                t1.is_deleted = 'N'
+                AND t2.is_deleted = 'N'
+                AND t3.is_deleted = 'N'
+                AND t6.is_deleted = 'N'
+                AND t1.lib_type = #{type}
+                AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',(#{InputStr}),'%'))
+                GROUP BY t1.id) b1,
+                        kl_concept b2,
+                        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and b1.selfName = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+
+        -- 化验子项推父项,父项公表项匹配静态知识
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT 0 selfId,null selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
+        LEFT JOIN kl_concept t5 on t5.id = t4.start_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
+        LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t4.is_deleted = 'N'
+        AND t5.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t1.lib_type = #{detailType}
+        AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
+        AND t4.relation_id = 18
+        GROUP BY t5.id) b1,
+        kl_concept b2,
+        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and b1.parentName = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT 0 selfId,null selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
+        LEFT JOIN kl_concept t5 on t5.id = t4.start_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
+        LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t4.is_deleted = 'N'
+        AND t5.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t1.lib_type = #{detailType}
+        AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT(#{InputStr},'%'))
+        AND t4.relation_id = 18
+        GROUP BY t5.id) b1,
+        kl_concept b2,
+        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and b1.parentName = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT 0 selfId,null selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t5.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
+                    LEFT JOIN kl_concept t5 on t5.id = t4.start_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t5.lib_type
+                    LEFT JOIN kl_concept_common t3 ON t5.id = t3.concept_id
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t3.is_deleted = 'N'
+                    AND t4.is_deleted = 'N'
+                    AND t5.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = #{detailType}
+                    AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
+                    AND t4.relation_id = 18
+                    GROUP BY t5.id) b1,
+                        kl_concept b2,
+                        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and b1.parentName = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+
+        -- 化验子项推父项,父项--子项组合公表项匹配静态知识
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
+        LEFT JOIN kl_concept t5 on t5.id = t4.start_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+        LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t4.is_deleted = 'N'
+        AND t5.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t1.lib_type = #{detailType}
+        AND (t2.spell = UPPER(#{InputStr}) OR t2.name = #{InputStr})
+        AND t4.relation_id = 18
+        GROUP BY t5.id) b1,
+        kl_concept b2,
+        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and CONCAT(b1.parentName,'--',b1.selfName) = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+        LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+        LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
+        LEFT JOIN kl_concept t5 on t5.id = t4.start_id
+        LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+        LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+        WHERE
+        t1.is_deleted = 'N'
+        AND t2.is_deleted = 'N'
+        AND t3.is_deleted = 'N'
+        AND t4.is_deleted = 'N'
+        AND t5.is_deleted = 'N'
+        AND t6.is_deleted = 'N'
+        AND t1.lib_type = #{detailType}
+        AND (t2.spell LIKE CONCAT(UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT(#{InputStr},'%'))
+        AND t4.relation_id = 18
+        GROUP BY t5.id) b1,
+        kl_concept b2,
+        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and CONCAT(b1.parentName,'--',b1.selfName) = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
+        UNION
+        (SELECT b1.*,b2.id uniqueId,b2.lib_name uniqueName
+        FROM (SELECT t1.id selfId,t1.lib_name selfName,t5.id parentId,t5.lib_name parentName,null sameName,t2.is_concept showType,t1.lib_type libTypeId,t6.`name` libTypeName FROM kl_concept t1
+                    LEFT JOIN kl_library_info t2 ON t1.id = t2.concept_id
+                    LEFT JOIN kl_relation t4 ON t4.end_id= t1.id
+                    LEFT JOIN kl_concept t5 on t5.id = t4.start_id
+                    LEFT JOIN kl_lexicon t6 ON t6.id = t1.lib_type
+                    LEFT JOIN kl_concept_common t3 ON t1.id = t3.concept_id
+                    WHERE
+                    t1.is_deleted = 'N'
+                    AND t2.is_deleted = 'N'
+                    AND t3.is_deleted = 'N'
+                    AND t4.is_deleted = 'N'
+                    AND t5.is_deleted = 'N'
+                    AND t6.is_deleted = 'N'
+                    AND t1.lib_type = #{detailType}
+                    AND (t2.spell LIKE CONCAT('%',UPPER(#{InputStr}),'%') OR t2.name LIKE CONCAT('%',#{InputStr},'%'))
+                    AND t4.relation_id = 18
+                    GROUP BY t5.id) b1,
+                        kl_concept b2,
+                        kl_concept_detail b3
+        WHERE b2.is_deleted = 'N'
+        and b3.is_deleted = 'N'
+        and CONCAT(b1.parentName,'--',b1.selfName) = b2.lib_name
+        and b2.lib_type = 46
+        and b2.id = b3.concept_id)
     </select>
     </select>
 
 
     <select id="getConceptConMap" resultType="com.diagbot.dto.ConceptBaseDTO" parameterType="com.diagbot.vo.ConceptFindVO">
     <select id="getConceptConMap" resultType="com.diagbot.dto.ConceptBaseDTO" parameterType="com.diagbot.vo.ConceptFindVO">

+ 17 - 43
icss-service/src/main/java/com/diagbot/client/TranServiceClient.java

@@ -1,14 +1,5 @@
 package com.diagbot.client;
 package com.diagbot.client;
 
 
-import java.util.List;
-import java.util.Map;
-
-import javax.validation.Valid;
-
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.client.hystrix.TranServiceHystrix;
 import com.diagbot.dto.DoctorInfoDTO;
 import com.diagbot.dto.DoctorInfoDTO;
 import com.diagbot.dto.GetExportInquirysDTO;
 import com.diagbot.dto.GetExportInquirysDTO;
@@ -40,6 +31,13 @@ import com.diagbot.vo.PacsCheckItemVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.TranFieldInfoVO;
 import com.diagbot.vo.TranFieldInfoVO;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 
 /**
 /**
  * @Description: 调用信息对接层服务
  * @Description: 调用信息对接层服务
@@ -129,17 +127,19 @@ public interface TranServiceClient {
      */
      */
     @PostMapping("/inquiryInfo/saveInquiryToHis")
     @PostMapping("/inquiryInfo/saveInquiryToHis")
     RespDTO<Boolean> saveInquiryToHis(@RequestBody SaveInquiryToHisVO saveInquiryToHisVO);
     RespDTO<Boolean> saveInquiryToHis(@RequestBody SaveInquiryToHisVO saveInquiryToHisVO);
-    
+
     /**
     /**
      * 急诊-历史病历列表
      * 急诊-历史病历列表
+     *
      * @param hisInquirysForJzVO
      * @param hisInquirysForJzVO
      * @return
      * @return
      */
      */
     @PostMapping("/inquiryInfo/hisInquirysForJz")
     @PostMapping("/inquiryInfo/hisInquirysForJz")
     RespDTO<HisInquirysForJzDTO> hisInquirysForJz(@RequestBody HisInquirysForJzVO hisInquirysForJzVO);
     RespDTO<HisInquirysForJzDTO> hisInquirysForJz(@RequestBody HisInquirysForJzVO hisInquirysForJzVO);
-    
+
     /**
     /**
      * 急诊-添加二次诊断
      * 急诊-添加二次诊断
+     *
      * @param addDiagnoseSecondVO
      * @param addDiagnoseSecondVO
      * @return
      * @return
      */
      */
@@ -148,30 +148,13 @@ public interface TranServiceClient {
 
 
     /**
     /**
      * 急诊-获取需要导出的问诊数据
      * 急诊-获取需要导出的问诊数据
+     *
      * @param inquiryIds
      * @param inquiryIds
      * @return
      * @return
      */
      */
     @PostMapping("/inquiryInfo/getExportInquirys")
     @PostMapping("/inquiryInfo/getExportInquirys")
     RespDTO<List<GetExportInquirysDTO>> getExportInquirys(@RequestBody List<Long> inquiryIds);
     RespDTO<List<GetExportInquirysDTO>> getExportInquirys(@RequestBody List<Long> inquiryIds);
 
 
-    /**
-     * 根据医院编码获取化验公表映射关系-itemName不为空
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @PostMapping("/tranLisConfig/getLisConfigByHosCode_NotEmptyItemName")
-    RespDTO<Map<String, Map<String, String>>> getLisConfigByHosCode_NotEmptyItemName(@RequestBody HosCodeVO hosCodeVO);
-
-    /**
-     * 根据医院编码获取化验公表映射关系-itemName为空
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @PostMapping("/tranLisConfig/getLisConfigByHosCode_EmptyItemName")
-    RespDTO<Map<String, String>> getLisConfigByHosCode_EmptyItemName(@RequestBody HosCodeVO hosCodeVO);
-
     /**
     /**
      * 根据医院编码获取辅检公表映射关系
      * 根据医院编码获取辅检公表映射关系
      *
      *
@@ -199,15 +182,6 @@ public interface TranServiceClient {
     @PostMapping("/diseaseIcd/getDiseaseIcdByHosCode")
     @PostMapping("/diseaseIcd/getDiseaseIcdByHosCode")
     RespDTO<Map<String, String>> getDiseaseIcdByHosCode(@RequestBody HosCodeVO hosCodeVO);
     RespDTO<Map<String, String>> getDiseaseIcdByHosCode(@RequestBody HosCodeVO hosCodeVO);
 
 
-    /**
-     * 根据医院编码获取化验公表映射关系,公表项做key
-     *
-     * @param hosCodeVO
-     * @return
-     */
-    @PostMapping("/tranLisConfig/getLisConfigByUniqueNameAndHosCode")
-    RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO);
-
     /**
     /**
      * 根据医院编码查询辅检公表映射,公表项做key
      * 根据医院编码查询辅检公表映射,公表项做key
      *
      *
@@ -216,19 +190,19 @@ public interface TranServiceClient {
      */
      */
     @PostMapping("/pacsConfig/getPacsConfigByUniqueNameAndHosCode")
     @PostMapping("/pacsConfig/getPacsConfigByUniqueNameAndHosCode")
     RespDTO<Map<String, List<String>>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO);
     RespDTO<Map<String, List<String>>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO);
-    
+
     @PostMapping("/lisDockingImports/lisDockingImports")
     @PostMapping("/lisDockingImports/lisDockingImports")
     public RespDTO<LisRetrieveListAllDTO> getLisDatas(@RequestBody @Valid LisArgumentsVO lisArgumentsVO);
     public RespDTO<LisRetrieveListAllDTO> getLisDatas(@RequestBody @Valid LisArgumentsVO lisArgumentsVO);
 
 
     @PostMapping("/lisDockingImports/getByGroupNameLisData")
     @PostMapping("/lisDockingImports/getByGroupNameLisData")
-	public RespDTO<LisDataDTO> getByGroupNameLisData(@RequestBody @Valid LisGroupNameVO lisGroupNameVO);
+    public RespDTO<LisDataDTO> getByGroupNameLisData(@RequestBody @Valid LisGroupNameVO lisGroupNameVO);
 
 
     @PostMapping("/lisDockingImports/pacsDockingImport")
     @PostMapping("/lisDockingImports/pacsDockingImport")
-	RespDTO<PacsRetrieveListAllDTO> pacsDockingImports(@RequestBody @Valid PacsArgumentsVO pacsArgumentsVO);
+    RespDTO<PacsRetrieveListAllDTO> pacsDockingImports(@RequestBody @Valid PacsArgumentsVO pacsArgumentsVO);
 
 
     @PostMapping("/lisDockingImports/getByCheckItemPacsData")
     @PostMapping("/lisDockingImports/getByCheckItemPacsData")
-	RespDTO<PacsDataDTO> getByCheckItemPacsDatas(@RequestBody @Valid PacsCheckItemVO pacsGroupNameVO);
-    
+    RespDTO<PacsDataDTO> getByCheckItemPacsDatas(@RequestBody @Valid PacsCheckItemVO pacsGroupNameVO);
+
     @PostMapping("/sysSet/getSysSetInfoDatas")
     @PostMapping("/sysSet/getSysSetInfoDatas")
     RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid @RequestBody HospitalSetVO hospitalSetVO);
     RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid @RequestBody HospitalSetVO hospitalSetVO);
 }
 }

+ 45 - 84
icss-service/src/main/java/com/diagbot/client/hystrix/TranServiceHystrix.java

@@ -1,13 +1,5 @@
 package com.diagbot.client.hystrix;
 package com.diagbot.client.hystrix;
 
 
-import java.util.List;
-import java.util.Map;
-
-import javax.validation.Valid;
-
-import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.RequestBody;
-
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.client.TranServiceClient;
 import com.diagbot.dto.DoctorInfoDTO;
 import com.diagbot.dto.DoctorInfoDTO;
 import com.diagbot.dto.GetExportInquirysDTO;
 import com.diagbot.dto.GetExportInquirysDTO;
@@ -39,8 +31,13 @@ import com.diagbot.vo.PacsCheckItemVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.PatientInfoVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.SaveInquiryToHisVO;
 import com.diagbot.vo.TranFieldInfoVO;
 import com.diagbot.vo.TranFieldInfoVO;
-
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 
 /**
 /**
  * @Description: 调用信息对接层服务
  * @Description: 调用信息对接层服务
@@ -103,46 +100,22 @@ public class TranServiceHystrix implements TranServiceClient {
         log.error("【hystrix】调用{}异常", "saveInquiryToHis");
         log.error("【hystrix】调用{}异常", "saveInquiryToHis");
         return null;
         return null;
     }
     }
-    
-    @Override
-	public RespDTO<HisInquirysForJzDTO> hisInquirysForJz(HisInquirysForJzVO hisInquirysForJzVO) {
-    	log.error("【hystrix】调用{}异常", "hisInquirysForJz");
-		return null;
-	}
-
-	@Override
-	public RespDTO<Boolean> addDiagnoseSecond(AddDiagnoseSecondVO addDiagnoseSecondVO) {
-    	log.error("【hystrix】调用{}异常", "addDiagnoseSecond");
-		return null;
-	}
-	
-	@Override
-	public RespDTO<List<GetExportInquirysDTO>> getExportInquirys(List<Long> inquiryIds) {
-		log.error("【hystrix】调用{}异常", "getExportInquirys");
-		return null;
-	}
-	
-	/**
-     * 根据医院编码获取化验公表映射关系-itemName不为空
-     *
-     * @param hosCodeVO
-     * @return
-     */
+
     @Override
     @Override
-    public RespDTO<Map<String, Map<String, String>>> getLisConfigByHosCode_NotEmptyItemName(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getLisConfigByHosCode_NotEmptyItemName");
+    public RespDTO<HisInquirysForJzDTO> hisInquirysForJz(HisInquirysForJzVO hisInquirysForJzVO) {
+        log.error("【hystrix】调用{}异常", "hisInquirysForJz");
         return null;
         return null;
     }
     }
 
 
-    /**
-     * 根据医院编码获取化验公表映射关系-itemName为空
-     *
-     * @param hosCodeVO
-     * @return
-     */
     @Override
     @Override
-    public RespDTO<Map<String, String>> getLisConfigByHosCode_EmptyItemName(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getLisConfigByHosCode_EmptyItemName");
+    public RespDTO<Boolean> addDiagnoseSecond(AddDiagnoseSecondVO addDiagnoseSecondVO) {
+        log.error("【hystrix】调用{}异常", "addDiagnoseSecond");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<GetExportInquirysDTO>> getExportInquirys(List<Long> inquiryIds) {
+        log.error("【hystrix】调用{}异常", "getExportInquirys");
         return null;
         return null;
     }
     }
 
 
@@ -183,56 +156,44 @@ public class TranServiceHystrix implements TranServiceClient {
     }
     }
 
 
     /**
     /**
-     * 根据医院编码获取化验公表映射关系,公表项做key
+     * 根据医院编码查询辅检公表映射,公表项做key
      *
      *
      * @param hosCodeVO
      * @param hosCodeVO
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getLisConfigByUniqueNameAndHosCode");
+    public RespDTO<Map<String, List<String>>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
+        log.error("【hystrix】调用{}异常", "getPacsConfigByUniqueNameAndHosCode");
         return null;
         return null;
     }
     }
 
 
-    /**
-     * 根据医院编码查询辅检公表映射,公表项做key
-     *
-     * @param hosCodeVO
-     * @return
-     */
     @Override
     @Override
-    public RespDTO<Map<String, List<String>>> getPacsConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
-        log.error("【hystrix】调用{}异常", "getPacsConfigByUniqueNameAndHosCode");
+    public RespDTO<LisRetrieveListAllDTO> getLisDatas(@RequestBody @Valid LisArgumentsVO lisArgumentsVO) {
+        log.error("【hystrix】调用{}异常", "getLisDatas");
         return null;
         return null;
     }
     }
 
 
-	@Override
-	public RespDTO<LisRetrieveListAllDTO> getLisDatas(@RequestBody @Valid LisArgumentsVO lisArgumentsVO) {
-		log.error("【hystrix】调用{}异常", "getLisDatas");
-		return null;
-	}
-
-	@Override
-	public RespDTO<LisDataDTO> getByGroupNameLisData(@RequestBody @Valid LisGroupNameVO lisGroupNameVO) {
-		log.error("【hystrix】调用{}异常", "getByGroupNameLisData");
-		return null;
-	}
-
-	@Override
-	public RespDTO<PacsRetrieveListAllDTO> pacsDockingImports(@RequestBody @Valid PacsArgumentsVO pacsArgumentsVO) {
-		log.error("【hystrix】调用{}异常", "pacsDockingImports");
-		return null;
-	}
-
-	@Override
-	public RespDTO<PacsDataDTO> getByCheckItemPacsDatas(@RequestBody @Valid PacsCheckItemVO pacsGroupNameVO) {
-		log.error("【hystrix】调用{}异常", "getByCheckItemPacsDatas");
-		return null;
-	}
-
-	@Override
-	public RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid HospitalSetVO hospitalSetVO) {
-		log.error("【hystrix】调用{}异常", "getSysSetInfoDatas");
-		return null;
-	}
+    @Override
+    public RespDTO<LisDataDTO> getByGroupNameLisData(@RequestBody @Valid LisGroupNameVO lisGroupNameVO) {
+        log.error("【hystrix】调用{}异常", "getByGroupNameLisData");
+        return null;
+    }
+
+    @Override
+    public RespDTO<PacsRetrieveListAllDTO> pacsDockingImports(@RequestBody @Valid PacsArgumentsVO pacsArgumentsVO) {
+        log.error("【hystrix】调用{}异常", "pacsDockingImports");
+        return null;
+    }
+
+    @Override
+    public RespDTO<PacsDataDTO> getByCheckItemPacsDatas(@RequestBody @Valid PacsCheckItemVO pacsGroupNameVO) {
+        log.error("【hystrix】调用{}异常", "getByCheckItemPacsDatas");
+        return null;
+    }
+
+    @Override
+    public RespDTO<List<SysSetInfoDTO>> getSysSetInfoDatas(@Valid HospitalSetVO hospitalSetVO) {
+        log.error("【hystrix】调用{}异常", "getSysSetInfoDatas");
+        return null;
+    }
 }
 }

+ 4 - 2
icss-service/src/main/java/com/diagbot/dto/LisConfigDTO.java

@@ -12,8 +12,10 @@ import lombok.Setter;
 @Setter
 @Setter
 @Getter
 @Getter
 public class LisConfigDTO {
 public class LisConfigDTO {
-	 private Long id;
-	 /**
+	private Long id;
+	 
+	private String assembly;
+	/**
      * 医院id
      * 医院id
      */
      */
     private String hospitalId;
     private String hospitalId;

+ 2 - 0
icss-service/src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -27,4 +27,6 @@ public class RetrievalDTO {
     private String libTypeName;
     private String libTypeName;
     //icss标签type
     //icss标签type
     private Integer type;
     private Integer type;
+    //公表名称
+    private String uniqueName;
 }
 }

+ 9 - 9
icss-service/src/main/java/com/diagbot/facade/AssembleFacade.java

@@ -13,6 +13,7 @@ import org.springframework.stereotype.Component;
 
 
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 
 /**
 /**
  * @Description:
  * @Description:
@@ -64,21 +65,20 @@ public class AssembleFacade {
 
 
         //化验项映射,转公表
         //化验项映射,转公表
         if (ListUtil.isNotEmpty(pushVO.getLis())) {
         if (ListUtil.isNotEmpty(pushVO.getLis())) {
-            Map<String, Map<String, String>> lisConfigMap = lisMappingFacade.getLisMapping_NotEmptyItemName();
-            Map<String, String> lisConfigWithEmptyItemNameMap = lisMappingFacade.getLisConfig_EmptyItemName();
+            List<String> mealNameList = pushVO.getLis().stream().map(lisResult -> lisResult.getName()).collect(Collectors.toList());
+            Map<String, Map<String, String>> lisConfigMap = lisMappingFacade.getLisMappingByMealName(mealNameList);
             for (LisResult lisResult : pushVO.getLis()) {
             for (LisResult lisResult : pushVO.getLis()) {
                 //source=0 icss页面数据,source=1 外部导入数据,外部导入数据不处理
                 //source=0 icss页面数据,source=1 外部导入数据,外部导入数据不处理
                 if (!lisResult.getSource().equals(LisSourceEnum.Inner.getKey())) {
                 if (!lisResult.getSource().equals(LisSourceEnum.Inner.getKey())) {
                     continue;
                     continue;
                 }
                 }
                 if (StringUtil.isNotBlank(lisResult.getName())) {
                 if (StringUtil.isNotBlank(lisResult.getName())) {
-                    if (StringUtil.isNotBlank(lisResult.getDetailName())) {
-                        Map<String, String> detailMap = lisConfigMap.get(lisResult.getName());
-                        if (null != detailMap && detailMap.size() > 0 && StringUtil.isNotBlank(detailMap.get(lisResult.getDetailName()))) {
-                            lisResult.setUniqueName(detailMap.get(lisResult.getDetailName()));
-                        }
-                    } else {
-                        lisResult.setUniqueName(lisConfigWithEmptyItemNameMap.get(lisResult.getName()));
+                    if (lisResult.getDetailName() == null) {
+                        lisResult.setDetailName("");
+                    }
+                    Map<String, String> detailMap = lisConfigMap.get(lisResult.getName());
+                    if (null != detailMap && detailMap.size() > 0 && StringUtil.isNotBlank(detailMap.get(lisResult.getDetailName()))) {
+                        lisResult.setUniqueName(detailMap.get(lisResult.getDetailName()));
                     }
                     }
                 }
                 }
             }
             }

+ 25 - 15
icss-service/src/main/java/com/diagbot/facade/LisExcelResFacade.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.exception.CommonException;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.LisExcelResVO;
 import com.diagbot.vo.LisExcelResVO;
 import com.diagbot.vo.LisExcelWrapperVO;
 import com.diagbot.vo.LisExcelWrapperVO;
@@ -44,11 +45,13 @@ public class LisExcelResFacade {
     @Autowired
     @Autowired
     TranServiceClient tranServiceClient;
     TranServiceClient tranServiceClient;
 
 
-    public RespDTO<LitAssayVO> lisExcelAnalysis(MultipartFile file, LisHospitalCodeVO lisHospitalCodeVO, HttpServletRequest request) {
+    @SuppressWarnings("null")
+	public RespDTO<LitAssayVO> lisExcelAnalysis(MultipartFile file, LisHospitalCodeVO lisHospitalCodeVO, HttpServletRequest request) {
 
 
         List<String> messages = new ArrayList<>();
         List<String> messages = new ArrayList<>();
         List<LisExcelWrapperVO> lisExcelWrapperList = new ArrayList<>();
         List<LisExcelWrapperVO> lisExcelWrapperList = new ArrayList<>();
         InputStream inputStream = null;
         InputStream inputStream = null;
+        List<String> assemblys = new ArrayList<String>();
         Workbook wb = null;
         Workbook wb = null;
         try {
         try {
             if (!file.isEmpty()) {
             if (!file.isEmpty()) {
@@ -107,8 +110,17 @@ public class LisExcelResFacade {
                                     }
                                     }
                                     LisExcelWrapperVO lisExcelWrapper = new LisExcelWrapperVO();
                                     LisExcelWrapperVO lisExcelWrapper = new LisExcelWrapperVO();
 
 
+                                    
                                     lisExcelWrapper.setMealName(mealName);
                                     lisExcelWrapper.setMealName(mealName);
                                     lisExcelWrapper.setItemName(itemName);
                                     lisExcelWrapper.setItemName(itemName);
+                                    String assembly = mealName+"--";
+                                    if (!assemblys.contains(assembly)){
+                                        assemblys.add(assembly);
+                                    }
+                                    assembly = mealName+"--"+itemName;
+                                    if (!assemblys.contains(assembly)){
+                                        assemblys.add(assembly);
+                                    }
                                     //  lisExcelWrapper.setUniqueName(uniqueName);
                                     //  lisExcelWrapper.setUniqueName(uniqueName);
                                     lisExcelWrapper.setUnit(unit);
                                     lisExcelWrapper.setUnit(unit);
                                     lisExcelWrapper.setValue(value);
                                     lisExcelWrapper.setValue(value);
@@ -141,29 +153,27 @@ public class LisExcelResFacade {
                 messages.add("无文件上传!");
                 messages.add("无文件上传!");
             }
             }
             //匹配公表名
             //匹配公表名
+            lisHospitalCodeVO.setAssemblys(assemblys);
             RespDTO<List<LisConfigDTO>> litDatas = tranServiceClient.getLisConfigByhospitalId(lisHospitalCodeVO);
             RespDTO<List<LisConfigDTO>> litDatas = tranServiceClient.getLisConfigByhospitalId(lisHospitalCodeVO);
             if (litDatas == null || !"0".equals(litDatas.code)) {
             if (litDatas == null || !"0".equals(litDatas.code)) {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                         "获取匹配公表名信息失败");
                         "获取匹配公表名信息失败");
             }
             }
             List<LisConfigDTO> litData = litDatas.data;
             List<LisConfigDTO> litData = litDatas.data;
+
             //导入的数据跟公表数据进行配对
             //导入的数据跟公表数据进行配对
-            if (litData.size() > 0) {
+            if (ListUtil.isNotEmpty(litData)) {
+                Map<String, String> listMap = litData.stream()
+                        .collect(Collectors.toMap(LisConfigDTO::getAssembly, LisConfigDTO::getUniqueName));
                 List<LisExcelWrapperVO> lisExcelWrapperListNew = new ArrayList<>();
                 List<LisExcelWrapperVO> lisExcelWrapperListNew = new ArrayList<>();
                 for (LisExcelWrapperVO lisExcelWrapperNew : lisExcelWrapperList) {
                 for (LisExcelWrapperVO lisExcelWrapperNew : lisExcelWrapperList) {
-
-                    for (LisConfigDTO LisNew : litData) {
-                        if (LisNew.getItemName() != null) {
-                            if (LisNew.getMealName().equals(lisExcelWrapperNew.getMealName())
-                                    && LisNew.getItemName().equals(lisExcelWrapperNew.getItemName())) {
-                                lisExcelWrapperNew.setUniqueName(LisNew.getUniqueName());
-                            }
-                        } else {
-                            if (LisNew.getMealName().equals(lisExcelWrapperNew.getMealName())) {
-                                lisExcelWrapperNew.setUniquemealName(LisNew.getUniqueName());
-                            }
-                        }
-
+                    String assemblymeal = lisExcelWrapperNew.getMealName()+"--";
+                    if(null != listMap.get(assemblymeal)){
+                        lisExcelWrapperNew.setUniquemealName(listMap.get(assemblymeal));
+                    }
+                    String item = lisExcelWrapperNew.getMealName()+"--"+lisExcelWrapperNew.getItemName();
+                    if(null != listMap.get(item)){
+                        lisExcelWrapperNew.setUniqueName(listMap.get(item));
                     }
                     }
                     lisExcelWrapperListNew.add(lisExcelWrapperNew);
                     lisExcelWrapperListNew.add(lisExcelWrapperNew);
                 }
                 }

+ 17 - 71
icss-service/src/main/java/com/diagbot/facade/LisMappingFacade.java

@@ -7,6 +7,7 @@ import com.diagbot.service.impl.LisMappingServiceImpl;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.StringUtil;
+import com.google.common.collect.Lists;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
 import java.util.LinkedHashMap;
 import java.util.LinkedHashMap;
@@ -23,13 +24,16 @@ public class LisMappingFacade extends LisMappingServiceImpl {
 
 
     /**
     /**
      * 获取化验公表映射关系 Map<mealName,Map<itemName,uniqueName>> itemName 不为空
      * 获取化验公表映射关系 Map<mealName,Map<itemName,uniqueName>> itemName 不为空
-     *
+     * @param mealNameList
      * @return
      * @return
      */
      */
-    public Map<String, Map<String, String>> getLisMapping_NotEmptyItemName() {
+    public Map<String, Map<String, String>> getLisMappingByMealName(List<String> mealNameList) {
         Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
         Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
-        lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).isNotNull("item_name").ne("item_name", "");
+        lisMappingQueryWrapper.select("meal_name,ifnull(item_name,'') as item_name,unique_name").eq("is_deleted", IsDeleteEnum.N.getKey());
+        if (ListUtil.isNotEmpty(mealNameList)) {
+            lisMappingQueryWrapper.in("meal_name", mealNameList);
+        }
         List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
         List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
         Map<String, List<LisMapping>> lisMappingMap = EntityUtil.makeEntityListMap(lisMappingList, "mealName");
         Map<String, List<LisMapping>> lisMappingMap = EntityUtil.makeEntityListMap(lisMappingList, "mealName");
         for (Map.Entry<String, List<LisMapping>> entry : lisMappingMap.entrySet()) {
         for (Map.Entry<String, List<LisMapping>> entry : lisMappingMap.entrySet()) {
@@ -42,42 +46,18 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         return retMap;
         return retMap;
     }
     }
 
 
-    /**
-     * 根据医院编码获取化验公表映射关系-itemName为空 Map<mealName,uniqueName>
-     *
-     * @return
-     */
-    public Map<String, String> getLisConfig_EmptyItemName() {
-        QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
-        lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
-                isNull("item_name").or(i -> i.eq("item_name", ""));
-        List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
-        Map<String, String> retMap = EntityUtil.makeMapWithKeyValue(lisMappingList, "mealName", "uniqueName");
-        return retMap;
-    }
-
-    /**
-     * 获取化验公表映射关系 Map<mealName,uniqueName> itemName 为空
-     *
-     * @return
-     */
-    public Map<String, String> getLisMappingWithoutItemName() {
-        QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
-        lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).isNull("item_name").or(i -> i.eq("item_name", ""));
-        List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
-        Map<String, String> retMap = EntityUtil.makeMapWithKeyValue(lisMappingList, "mealName", "uniqueName");
-        return retMap;
-    }
-
     /**
     /**
      * 化验公表映射关系  Map<uniqueName,List<mealName>>
      * 化验公表映射关系  Map<uniqueName,List<mealName>>
-     *
+     * @param uniqueNameList
      * @return
      * @return
      */
      */
-    public Map<String, List<String>> getLisMappingByUniqueName() {
+    public Map<String, List<String>> getLisMappingByUniqueName(List<String> uniqueNameList) {
         Map<String, List<String>> retMap = new LinkedHashMap<>();
         Map<String, List<String>> retMap = new LinkedHashMap<>();
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
         lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
         lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
+        if (ListUtil.isNotEmpty(uniqueNameList)) {
+            lisMappingQueryWrapper.in("unique_name", uniqueNameList);
+        }
         List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
         List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
         Map<String, List<LisMapping>> lisMappingMap = EntityUtil.makeEntityListMap(lisMappingList, "uniqueName");
         Map<String, List<LisMapping>> lisMappingMap = EntityUtil.makeEntityListMap(lisMappingList, "uniqueName");
         for (Map.Entry<String, List<LisMapping>> entry : lisMappingMap.entrySet()) {
         for (Map.Entry<String, List<LisMapping>> entry : lisMappingMap.entrySet()) {
@@ -93,51 +73,17 @@ public class LisMappingFacade extends LisMappingServiceImpl {
      * @return
      * @return
      */
      */
     public Map<String, Map<String, String>> getLisMappingByQuestion(String project, List<String> details) {
     public Map<String, Map<String, String>> getLisMappingByQuestion(String project, List<String> details) {
-        Map<String, Map<String, String>> lisWithItemNamMap = getLisMapping_NotEmptyItemName();
-        Map<String, String> lisWithoutItemNameMap = getLisMappingWithoutItemName();
-
         if (StringUtil.isBlank(project)) {
         if (StringUtil.isBlank(project)) {
             return null;
             return null;
         }
         }
 
 
-        Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
-        Map<String, String> projectMap = new LinkedHashMap<>();
-        projectMap.put(project, lisWithoutItemNameMap.get(project));
-        retMap.put("project", projectMap);
-
-        if (ListUtil.isEmpty(details)) {
-            return retMap;
-        }
-
-        Map<String, String> detailMap = new LinkedHashMap<>();
-        Map<String, String> projectDetailMap = lisWithItemNamMap.get(project);
-        if (projectDetailMap != null) {
-            for (String detail : details) {
-                detailMap.put(detail, projectDetailMap.get(detail));
-            }
-        }
-        retMap.put("details", detailMap);
-        return retMap;
-    }
-
-
-    /**
-     * 获取对应关系
-     *
-     * @param project 套餐
-     * @param details 明细
-     * @param lisWithItemNamMap
-     * @param lisWithoutItemNameMap
-     * @return
-     */
-    public Map<String, Map<String, String>> getLisMappingByQuestion(String project, List<String> details, Map<String, String> lisWithoutItemNameMap, Map<String, Map<String, String>> lisWithItemNamMap) {
-        if (StringUtil.isBlank(project)) {
-            return null;
-        }
+        List<String> mealNameList= Lists.newLinkedList();
+        mealNameList.add(project);
+        Map<String, Map<String, String>> lisMappingMap = getLisMappingByMealName(mealNameList);
 
 
         Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
         Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
         Map<String, String> projectMap = new LinkedHashMap<>();
         Map<String, String> projectMap = new LinkedHashMap<>();
-        projectMap.put(project, lisWithoutItemNameMap.get(project));
+        projectMap.put(project, lisMappingMap.get(project).get(""));
         retMap.put("project", projectMap);
         retMap.put("project", projectMap);
 
 
         if (ListUtil.isEmpty(details)) {
         if (ListUtil.isEmpty(details)) {
@@ -145,7 +91,7 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         }
         }
 
 
         Map<String, String> detailMap = new LinkedHashMap<>();
         Map<String, String> detailMap = new LinkedHashMap<>();
-        Map<String, String> projectDetailMap = lisWithItemNamMap.get(project);
+        Map<String, String> projectDetailMap = lisMappingMap.get(project);
         if (projectDetailMap != null) {
         if (projectDetailMap != null) {
             for (String detail : details) {
             for (String detail : details) {
                 detailMap.put(detail, projectDetailMap.get(detail));
                 detailMap.put(detail, projectDetailMap.get(detail));

+ 2 - 1
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -149,8 +149,9 @@ public class PushFacade {
         if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Lis.getKey()))) {
         if (featureTypeSet.contains(String.valueOf(FeatureTypeEnum.Lis.getKey()))) {
             List<QuestionPushDTO> labs = data.getLab();
             List<QuestionPushDTO> labs = data.getLab();
             if (ListUtil.isNotEmpty(labs)) {
             if (ListUtil.isNotEmpty(labs)) {
+                List<String> uniqueNameList = labs.stream().map(lab -> lab.getName()).collect(Collectors.toList());
                 //公表项转套餐项
                 //公表项转套餐项
-                Map<String, List<String>> lisMapping = lisMappingFacade.getLisMappingByUniqueName();
+                Map<String, List<String>> lisMapping = lisMappingFacade.getLisMappingByUniqueName(uniqueNameList);
                 List<String> nameList = Lists.newLinkedList();
                 List<String> nameList = Lists.newLinkedList();
                 Map<String, Long> lisMap = new LinkedHashMap<>();
                 Map<String, Long> lisMap = new LinkedHashMap<>();
                 List<QuestionPushDTO> lisDTO = Lists.newLinkedList();
                 List<QuestionPushDTO> lisDTO = Lists.newLinkedList();

+ 7 - 16
icss-service/src/main/java/com/diagbot/facade/QuestionFacade.java

@@ -128,15 +128,6 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
         List<QuestionInfo> questionInfoList = this.getByParam2(paramMap);
         List<QuestionInfo> questionInfoList = this.getByParam2(paramMap);
         List<Long> questionId = questionInfoList.stream().map(r -> r.getId()).collect(Collectors.toList());
         List<Long> questionId = questionInfoList.stream().map(r -> r.getId()).collect(Collectors.toList());
 
 
-        //获取uniqueName
-        List<QuestionInfo> lisQuestion = questionInfoList.stream().filter(r -> r.getType() == QuestionTypeEnum.Lis.getKey()).collect(Collectors.toList());
-        Map<String, String> proMap = new LinkedHashMap<>();
-        Map<String, Map<String, String>> proDetailMap = new LinkedHashMap<>();
-        if (ListUtil.isNotEmpty(lisQuestion)) {
-             proMap = lisMappingFacade.getLisConfig_EmptyItemName();
-             proDetailMap = lisMappingFacade.getLisMapping_NotEmptyItemName();
-        }
-
         // 获取第一层明细项
         // 获取第一层明细项
         Map<Long, List<QuestionDetail>> detailMap = getQuestionDetailWithMap(questionInfoList.stream().filter(r -> r.getTagType() == 1).map(r -> r.getId()).collect(Collectors.toList()));
         Map<Long, List<QuestionDetail>> detailMap = getQuestionDetailWithMap(questionInfoList.stream().filter(r -> r.getTagType() == 1).map(r -> r.getId()).collect(Collectors.toList()));
 
 
@@ -165,9 +156,9 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
             // 设置第二层mapping
             // 设置第二层mapping
             List<QuestionInfoWrapper> w2 = mapping2.get(res.getId());
             List<QuestionInfoWrapper> w2 = mapping2.get(res.getId());
             if (ListUtil.isNotEmpty(w2)) {
             if (ListUtil.isNotEmpty(w2)) {
-                List<QuestionDTO> m2 =  BeanUtil.listCopyTo(w2, QuestionDTO.class);
+                List<QuestionDTO> m2 = BeanUtil.listCopyTo(w2, QuestionDTO.class);
                 res.setQuestionMapping(m2);
                 res.setQuestionMapping(m2);
-                for (QuestionDTO q2: m2) {
+                for (QuestionDTO q2 : m2) {
                     // 设置第二层明细
                     // 设置第二层明细
                     if (detailMap2.get(q2.getId()) != null) {
                     if (detailMap2.get(q2.getId()) != null) {
                         q2.setQuestionDetailList(detailMap2.get(q2.getId()));
                         q2.setQuestionDetailList(detailMap2.get(q2.getId()));
@@ -175,9 +166,9 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
                     List<QuestionInfoWrapper> w3 = mapping3.get(q2.getId());
                     List<QuestionInfoWrapper> w3 = mapping3.get(q2.getId());
                     if (ListUtil.isNotEmpty(w3)) {
                     if (ListUtil.isNotEmpty(w3)) {
                         // 设置第三层mapping
                         // 设置第三层mapping
-                        List<QuestionDTO> m3 =  BeanUtil.listCopyTo(w3, QuestionDTO.class);
+                        List<QuestionDTO> m3 = BeanUtil.listCopyTo(w3, QuestionDTO.class);
                         q2.setQuestionMapping(m3);
                         q2.setQuestionMapping(m3);
-                        for (QuestionDTO q3: m3) {
+                        for (QuestionDTO q3 : m3) {
                             // 设置第三层明细
                             // 设置第三层明细
                             if (detailMap3.get(q3.getId()) != null) {
                             if (detailMap3.get(q3.getId()) != null) {
                                 q3.setQuestionDetailList(detailMap3.get(q3.getId()));
                                 q3.setQuestionDetailList(detailMap3.get(q3.getId()));
@@ -195,7 +186,7 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
                 if (ListUtil.isNotEmpty(res.getQuestionMapping())) {
                 if (ListUtil.isNotEmpty(res.getQuestionMapping())) {
                     details = res.getQuestionMapping().stream().map(row -> row.getName()).collect(Collectors.toList());
                     details = res.getQuestionMapping().stream().map(row -> row.getName()).collect(Collectors.toList());
                 }
                 }
-                Map<String, Map<String, String>> map = lisMappingFacade.getLisMappingByQuestion(project, details, proMap, proDetailMap);
+                Map<String, Map<String, String>> map = lisMappingFacade.getLisMappingByQuestion(project, details);
                 if (map != null) {
                 if (map != null) {
                     if (map.get("project") != null) {
                     if (map.get("project") != null) {
                         res.setUniqueName(map.get("project").get(res.getName()));
                         res.setUniqueName(map.get("project").get(res.getName()));
@@ -234,8 +225,8 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
      * 获取下级question
      * 获取下级question
      *
      *
      * @param sexType 性别
      * @param sexType 性别
-     * @param age 年龄
-     * @param ids 列表
+     * @param age     年龄
+     * @param ids     列表
      * @return
      * @return
      */
      */
     public Map getQuestionMappingWithMap(Integer sexType, Integer age, List<Long> ids, List<Long> mappIds) {
     public Map getQuestionMappingWithMap(Integer sexType, Integer age, List<Long> ids, List<Long> mappIds) {

+ 6 - 0
icss-service/src/main/java/com/diagbot/vo/LisHospitalCodeVO.java

@@ -1,5 +1,8 @@
 package com.diagbot.vo;
 package com.diagbot.vo;
 
 
+import java.util.List;
+
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
 
 
@@ -17,4 +20,7 @@ public class LisHospitalCodeVO {
 	 * 医院编码
 	 * 医院编码
 	 */
 	 */
 	String hospitalCode;
 	String hospitalCode;
+
+	@ApiModelProperty(hidden = true)
+	List<String> assemblys;
 }
 }

+ 2 - 1
icssman-service/src/main/java/com/diagbot/enums/QuestionTypeEnum.java

@@ -18,7 +18,8 @@ public enum QuestionTypeEnum implements KeyedNamed {
     Drug(8, "药品"),
     Drug(8, "药品"),
     DrugClass(9, "药品分类"),
     DrugClass(9, "药品分类"),
     Scale(21, "量表"),
     Scale(21, "量表"),
-    Index(22, "核心指标");
+    Index(22, "核心指标"),
+    LisDetail(51, "化验明细");
 
 
     @Setter
     @Setter
     private Integer key;
     private Integer key;

+ 7 - 0
icssman-service/src/main/java/com/diagbot/facade/LisMappingFacade.java

@@ -80,8 +80,15 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
         lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("meal_name", lisMappingVO.getMealName());
                 .eq("meal_name", lisMappingVO.getMealName());
         if (StringUtil.isBlank(lisMappingVO.getItemName())) {
         if (StringUtil.isBlank(lisMappingVO.getItemName())) {
+            if (!lisMappingVO.getMealName().equals(lisMappingVO.getUniqueName())) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验公表名称不匹配");
+            }
             lisMappingQueryWrapper.and(i -> i.isNull("item_name").or(j -> j.eq("item_name", "")));
             lisMappingQueryWrapper.and(i -> i.isNull("item_name").or(j -> j.eq("item_name", "")));
         } else {
         } else {
+            String uniqueName = lisMappingVO.getMealName() + "--" + lisMappingVO.getItemName();
+            if (!uniqueName.equals(lisMappingVO.getUniqueName())) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验公表名称不匹配");
+            }
             lisMappingQueryWrapper.eq("item_name", lisMappingVO.getItemName());
             lisMappingQueryWrapper.eq("item_name", lisMappingVO.getItemName());
         }
         }
         List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);
         List<LisMapping> lisMappingList = this.list(lisMappingQueryWrapper);

+ 23 - 3
icssman-service/src/main/java/com/diagbot/facade/QuestionFacade.java

@@ -20,6 +20,7 @@ import com.diagbot.entity.wrapper.QuestionMappingWrapper;
 import com.diagbot.entity.wrapper.QuestionWrapper;
 import com.diagbot.entity.wrapper.QuestionWrapper;
 import com.diagbot.enums.InsertOrUpdateEnum;
 import com.diagbot.enums.InsertOrUpdateEnum;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.QuestionTypeEnum;
 import com.diagbot.enums.TagTypeEnum;
 import com.diagbot.enums.TagTypeEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.exception.CommonException;
@@ -426,17 +427,35 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
             bean.setModifier(mapRespDTO.data.get(bean.getModifier()));
             bean.setModifier(mapRespDTO.data.get(bean.getModifier()));
         }
         }
 
 
-        List<String> nameList = res.getRecords().stream().map(row -> row.getTagName()).collect(Collectors.toList());
+        // 如果是化验明细项,获取name字段和术语库对应,其他用tagName
+        List<String> nameList = new ArrayList<>();
         ConceptExistVO conceptExistVO = new ConceptExistVO();
         ConceptExistVO conceptExistVO = new ConceptExistVO();
+        for (QuestionPageDTO bean : res.getRecords()) {
+            if (QuestionTypeEnum.Lis.getKey() == bean.getType() && TagTypeEnum.T7.getKey() != bean.getTagType().intValue()) {
+                nameList.add(bean.getName());
+            } else {
+                nameList.add(bean.getTagName());
+            }
+        }
         conceptExistVO.setNameList(nameList);
         conceptExistVO.setNameList(nameList);
         try {
         try {
             RespDTO<Map<String, List<Integer>>> resMap = knowledgemanServiceClient.getConceptMap(conceptExistVO);
             RespDTO<Map<String, List<Integer>>> resMap = knowledgemanServiceClient.getConceptMap(conceptExistVO);
             RespDTOUtil.respNGDeal(resMap, "远程调用根据名称和类型获取概念列表失败");
             RespDTOUtil.respNGDeal(resMap, "远程调用根据名称和类型获取概念列表失败");
             Map<String, List<Integer>> map = resMap.data;
             Map<String, List<Integer>> map = resMap.data;
             for (QuestionPageDTO bean : res.getRecords()) {
             for (QuestionPageDTO bean : res.getRecords()) {
-                List<Integer> list = map.get(bean.getTagName());
+                List<Integer> list = new ArrayList<>();
+                Boolean isLisDetail = false;
+                if (QuestionTypeEnum.Lis.getKey() == bean.getType() && TagTypeEnum.T7.getKey() != bean.getTagType().intValue()) {
+                    isLisDetail = true;
+                }
+                if (isLisDetail) {
+                    list = map.get(bean.getName());
+                } else {
+                    list = map.get(bean.getTagName());
+                }
+                // 化验明细需要特殊处理,类型转换为明细
                 if (ListUtil.isNotEmpty(list)) {
                 if (ListUtil.isNotEmpty(list)) {
-                    if (list.contains(bean.getType())) {
+                    if (list.contains(bean.getType()) || (isLisDetail && list.contains(QuestionTypeEnum.LisDetail.getKey())) ) {
                         bean.setExist(true);
                         bean.setExist(true);
                     }
                     }
                 }
                 }
@@ -536,6 +555,7 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
         paramMap.put("existName", questionIndexVO.getExistName());
         paramMap.put("existName", questionIndexVO.getExistName());
         paramMap.put("notTagType", questionIndexVO.getNotTagType());
         paramMap.put("notTagType", questionIndexVO.getNotTagType());
         paramMap.put("notControlType", questionIndexVO.getNotControlType());
         paramMap.put("notControlType", questionIndexVO.getNotControlType());
+        paramMap.put("name", questionIndexVO.getName());
         List<QuestionInfo> res = this.index(paramMap);
         List<QuestionInfo> res = this.index(paramMap);
         return res;
         return res;
     }
     }

+ 2 - 0
icssman-service/src/main/java/com/diagbot/vo/ConceptExistVO.java

@@ -18,4 +18,6 @@ public class ConceptExistVO {
     private List<String> nameList;
     private List<String> nameList;
     @ApiModelProperty(value = "类型")
     @ApiModelProperty(value = "类型")
     private Integer type;
     private Integer type;
+    @ApiModelProperty(hidden = true)
+    private Boolean isLisDetail = false;
 }
 }

+ 1 - 0
icssman-service/src/main/java/com/diagbot/vo/QuestionIndexVO.java

@@ -14,6 +14,7 @@ import java.util.List;
 @Setter
 @Setter
 public class QuestionIndexVO {
 public class QuestionIndexVO {
     private String tagName;
     private String tagName;
+    private String name;
     private Integer sexType;
     private Integer sexType;
     private Integer age;
     private Integer age;
     private Integer type;
     private Integer type;

+ 0 - 1
icssman-service/src/main/java/com/diagbot/vo/QuestionPageVO.java

@@ -19,6 +19,5 @@ public class QuestionPageVO extends Page {
     private String tagName;
     private String tagName;
     private List<Integer> tagTypeList;
     private List<Integer> tagTypeList;
     private List<Integer> controlTypeList;
     private List<Integer> controlTypeList;
-    private Integer disType;
     private List<Integer> notTypeList;
     private List<Integer> notTypeList;
 }
 }

+ 3 - 0
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -48,6 +48,9 @@
     <select id="index" parameterType="java.util.Map" resultType="com.diagbot.entity.QuestionInfo">
     <select id="index" parameterType="java.util.Map" resultType="com.diagbot.entity.QuestionInfo">
         select * from `icss_question_info`
         select * from `icss_question_info`
         where is_deleted = 'N'
         where is_deleted = 'N'
+        <if test="name != null and name != ''">
+            and name like concat("%", #{name}, "%")
+        </if>
         <if test="tagName != null and tagName != ''">
         <if test="tagName != null and tagName != ''">
             and tag_name like concat("%", #{tagName}, "%")
             and tag_name like concat("%", #{tagName}, "%")
         </if>
         </if>

+ 2 - 2
knowledgeman-service/src/main/java/com/diagbot/enums/LexiconRSTypeEnum.java

@@ -26,7 +26,8 @@ public enum LexiconRSTypeEnum implements KeyedNamed {
     SPEC(15,"规格"),
     SPEC(15,"规格"),
     HAS(16,"有"),
     HAS(16,"有"),
     ORDER_BY(17,"包含排列于"),
     ORDER_BY(17,"包含排列于"),
-    SUBITEM(18,"包含子项");
+    SUBITEM(18,"包含子项"),
+    PUSH(19,"推送");
 
 
     @Setter
     @Setter
     private Integer key;
     private Integer key;
@@ -63,4 +64,3 @@ public enum LexiconRSTypeEnum implements KeyedNamed {
         return name;
         return name;
     }
     }
 }
 }
-

+ 4 - 1
knowledgeman-service/src/main/java/com/diagbot/enums/LexiconTypeEnum.java

@@ -76,7 +76,10 @@ public enum LexiconTypeEnum implements KeyedNamed {
     FAMILY_HISTORY(64,"家族史"),
     FAMILY_HISTORY(64,"家族史"),
     FOOD_ALLERGY_HISTORY(65,"食物过敏史"),
     FOOD_ALLERGY_HISTORY(65,"食物过敏史"),
     HISTORY_OF_DRUG_ALLERGY(66,"药物过敏史"),
     HISTORY_OF_DRUG_ALLERGY(66,"药物过敏史"),
-    FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY(67,"家族相关传染病史");
+    FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY(67,"家族相关传染病史"),
+    FURTHER_CONSULTATION(68,"复诊"),
+    DIAGNOSTIC_CRITERIA(69,"诊断依据条件"),
+    OTHER_DIAGNOSTIC_CRITERIA(70,"诊断依据其他");
 
 
 
 
     @Setter
     @Setter

+ 31 - 25
knowledgeman-service/src/main/java/com/diagbot/facade/ConceptFacade.java

@@ -238,8 +238,21 @@ public class ConceptFacade extends ConceptServiceImpl {
     public IPage<GetAllInformationDTO> getAllInformation(GetAllInformationVO getAllInformationVO) {
     public IPage<GetAllInformationDTO> getAllInformation(GetAllInformationVO getAllInformationVO) {
     	Page<GetAllInformationDTO> getAllInformationDTOPage = new Page<>();
     	Page<GetAllInformationDTO> getAllInformationDTOPage = new Page<>();
     	
     	
+    	List<Long> conceptIdList = null;
+    	if(StringUtil.isBlank(getAllInformationVO.getLibName())&&StringUtil.isNotBlank(getAllInformationVO.getName())){
+    		getAllInformationVO.setLibName(getAllInformationVO.getName());
+    	}
+    	if(StringUtil.isNotBlank(getAllInformationVO.getLibName())){
+    		QueryWrapper<LibraryInfo> libraryInfoQe = new QueryWrapper<>();
+    		libraryInfoQe.eq("is_deleted", IsDeleteEnum.N.getKey());
+    		libraryInfoQe.like("name", getAllInformationVO.getLibName());
+    		libraryInfoQe.eq(StringUtil.isNotBlank(getAllInformationVO.getType()),"type_id", LexiconTypeEnum.getKey(getAllInformationVO.getType()));
+    		conceptIdList = libraryinfoFacade.list(libraryInfoQe).stream().map(i->i.getConceptId()).distinct().collect(Collectors.toList());
+    	}
+    	
     	Page<Concept> conceptPage = new Page<>(getAllInformationVO.getCurrent(),getAllInformationVO.getSize());
     	Page<Concept> conceptPage = new Page<>(getAllInformationVO.getCurrent(),getAllInformationVO.getSize());
     	QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
     	QueryWrapper<Concept> conceptQe = new QueryWrapper<>();
+    	conceptQe.in(ListUtil.isNotEmpty(conceptIdList), "id", conceptIdList);
     	conceptQe.like(StringUtil.isNotBlank(getAllInformationVO.getName()),"lib_name", getAllInformationVO.getName());
     	conceptQe.like(StringUtil.isNotBlank(getAllInformationVO.getName()),"lib_name", getAllInformationVO.getName());
     	conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getType()),"lib_type", LexiconTypeEnum.getKey(getAllInformationVO.getType()));
     	conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getType()),"lib_type", LexiconTypeEnum.getKey(getAllInformationVO.getType()));
     	conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getIsDeleted()),"is_deleted", getAllInformationVO.getIsDeleted());
     	conceptQe.eq(StringUtil.isNotBlank(getAllInformationVO.getIsDeleted()),"is_deleted", getAllInformationVO.getIsDeleted());
@@ -280,25 +293,6 @@ public class ConceptFacade extends ConceptServiceImpl {
         return getAllInformationDTOPage;
         return getAllInformationDTOPage;
     }
     }
     
     
-    
-    public static void main(String[] args){
-    	LibraryInfo libraryInfo1 = new LibraryInfo();
-    	libraryInfo1.setIsConcept(1);
-    	libraryInfo1.setName("rgb");
-    	
-    	LibraryInfo libraryInfo2 = new LibraryInfo();
-    	libraryInfo2.setIsConcept(0);
-    	libraryInfo2.setName("zsj");
-    	
-    	List<LibraryInfo> list = Lists.newArrayList();
-    	list.add(libraryInfo1);
-    	list.add(libraryInfo2);
-    	
-    	String ss = list.stream().sorted((a,b)->b.getIsConcept()-a.getIsConcept()).map(k->k.getName()).collect(Collectors.joining("、"));
-    
-    	System.out.println(ss);
-    }
-
     /**
     /**
      * 医学术语命名删除或者恢复
      * 医学术语命名删除或者恢复
      *
      *
@@ -578,10 +572,14 @@ public class ConceptFacade extends ConceptServiceImpl {
             ConceptCommon conceptCommon = conceptCommonFacade.getOne(conceptCommonQe);
             ConceptCommon conceptCommon = conceptCommonFacade.getOne(conceptCommonQe);
             if (conceptCommon == null) {
             if (conceptCommon == null) {
                 conceptCommon = new ConceptCommon();
                 conceptCommon = new ConceptCommon();
+                conceptCommon.setGmtCreate(now);
+                conceptCommon.setCreator(currentUser);
             }
             }
-
+            
             BeanUtil.copyProperties(addConceptInfoVO, conceptCommon);
             BeanUtil.copyProperties(addConceptInfoVO, conceptCommon);
             conceptCommon.setConceptId(conceptId);
             conceptCommon.setConceptId(conceptId);
+            conceptCommon.setGmtModified(now);
+            conceptCommon.setModifier(currentUser);
 
 
             conceptCommonFacade.saveOrUpdate(conceptCommon);
             conceptCommonFacade.saveOrUpdate(conceptCommon);
         }
         }
@@ -957,11 +955,16 @@ public class ConceptFacade extends ConceptServiceImpl {
         }
         }
 
 
         if (conceptExistVO.getType() != null) {
         if (conceptExistVO.getType() != null) {
-            Integer libType = ParamConvertUtil.conceptConvert2Lib(conceptExistVO.getType());
-            if (libType == null) {
-                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "类型不匹配");
+            // 如果是化验明细项,直接赋值
+            if (conceptExistVO.getIsLisDetail() == true) {
+                conceptExistVO.setLibType(LexiconTypeEnum.LIS_DETAILS.getKey());
+            } else {
+                Integer libType = ParamConvertUtil.conceptConvert2Lib(conceptExistVO.getType());
+                if (libType == null) {
+                    throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "类型不匹配");
+                }
+                conceptExistVO.setLibType(libType);
             }
             }
-            conceptExistVO.setLibType(libType);
         }
         }
 
 
         //获取结构
         //获取结构
@@ -974,7 +977,10 @@ public class ConceptFacade extends ConceptServiceImpl {
             List<Integer> typeList = new ArrayList<>();
             List<Integer> typeList = new ArrayList<>();
             if (ListUtil.isNotEmpty(list)) {
             if (ListUtil.isNotEmpty(list)) {
                 for (Concept c : list) {
                 for (Concept c : list) {
-                    typeList.add(ParamConvertUtil.libConvert2Concept(c.getLibType().intValue()));
+                    Integer type = ParamConvertUtil.libConvert2Concept(c.getLibType().intValue());
+                    if (type != null) {
+                        typeList.add(type);
+                    }
                 }
                 }
                 typeMap.put(key, typeList);
                 typeMap.put(key, typeList);
             }
             }

+ 1 - 1
knowledgeman-service/src/main/java/com/diagbot/service/impl/EnumsDataServiceImpl.java

@@ -30,7 +30,7 @@ public class EnumsDataServiceImpl implements EnumsDataService {
         Map<String, List<EnumEntriesBuilder.Entry>> enumMap = new EnumEntriesBuilder()
         Map<String, List<EnumEntriesBuilder.Entry>> enumMap = new EnumEntriesBuilder()
                 .addEnums("disclaimerCodeEnum", DisclaimerCodeEnum.values())
                 .addEnums("disclaimerCodeEnum", DisclaimerCodeEnum.values())
                 .addEnums("positionTypeEnum", PositionTypeEnum.values())
                 .addEnums("positionTypeEnum", PositionTypeEnum.values())
-                .addEnums("lexiconRSTypeEnum", LexiconRSTypeEnum.INCLUDE_OF)
+                .addEnums("lexiconRSTypeEnum", LexiconRSTypeEnum.INCLUDE_OF, LexiconRSTypeEnum.PUSH)
                 .addEnums("lexiconTypeEnum", LexiconTypeEnum.values())
                 .addEnums("lexiconTypeEnum", LexiconTypeEnum.values())
                 .build();
                 .build();
         return enumMap;
         return enumMap;

+ 13 - 1
knowledgeman-service/src/main/java/com/diagbot/util/ParamConvertUtil.java

@@ -83,7 +83,19 @@ public class ParamConvertUtil {
             case SYMPTOM:
             case SYMPTOM:
                 type = ConceptTypeEnum.Symptom.getKey();
                 type = ConceptTypeEnum.Symptom.getKey();
                 break;
                 break;
-            case HISTORY:
+            case HISTORY_OF_PAST_DISEASES:
+            case HISTORY_OF_TRAUMA:
+            case HISTORY_OF_SURGERY:
+            case HISTORY_OF_BLOOD_TRANSFUSION:
+            case INFECTIOUS_DISEASE_HISTORY:
+            case BAD_HABITS:
+            case MARITAL_HISTORY:
+            case HISTORY_OF_MARRIAGE_AND_CHILDBEARING:
+            case BIRTH_HISTORY:
+            case FAMILY_HISTORY:
+            case FOOD_ALLERGY_HISTORY:
+            case HISTORY_OF_DRUG_ALLERGY:
+            case FAMILY_RELATED_INFECTIOUS_DISEASE_HISTORY:
                 type = ConceptTypeEnum.Other.getKey();
                 type = ConceptTypeEnum.Other.getKey();
                 break;
                 break;
             case VITAL_INDEX:
             case VITAL_INDEX:

+ 2 - 0
knowledgeman-service/src/main/java/com/diagbot/vo/ConceptExistVO.java

@@ -20,4 +20,6 @@ public class ConceptExistVO {
     private Integer type;
     private Integer type;
     @ApiModelProperty(hidden = true)
     @ApiModelProperty(hidden = true)
     private Integer libType;
     private Integer libType;
+    @ApiModelProperty(hidden = true)
+    private Boolean isLisDetail;
 }
 }

+ 8 - 2
knowledgeman-service/src/main/java/com/diagbot/vo/GetAllInformationVO.java

@@ -24,10 +24,16 @@ public class GetAllInformationVO {
     private long current = 1;
     private long current = 1;
     
     
     /**
     /**
-     * 术语名称
+     * 标准术语名称
      */
      */
-    @ApiModelProperty(value="术语名称")
+    @ApiModelProperty(value="标准术语名称")
     private String name;
     private String name;
+    
+    /**
+     * 同义词名称
+     */
+    @ApiModelProperty(value="同义词名称")
+    private String libName;
 
 
     /**
     /**
      * 术语类型
      * 术语类型

+ 3 - 1
tran-service/src/main/java/com/diagbot/dto/LisConfigDTO.java

@@ -13,10 +13,12 @@ import lombok.Setter;
 @Getter
 @Getter
 public class LisConfigDTO {
 public class LisConfigDTO {
 
 
-	 private Long id;
+	private Long id;
 	 /**
 	 /**
      * 医院id
      * 医院id
      */
      */
+	private String assembly;
+	 
     private String hospitalId;
     private String hospitalId;
 
 
     /**
     /**

+ 19 - 22
tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java

@@ -5,8 +5,10 @@ import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.entity.TranLisConfig;
 import com.diagbot.entity.TranLisConfig;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.impl.TranLisConfigServiceImpl;
 import com.diagbot.service.impl.TranLisConfigServiceImpl;
-import com.diagbot.util.BeanUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.LisConfigVO;
+import com.diagbot.vo.LisHospitalCodeVO;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 
 
 import java.util.LinkedHashMap;
 import java.util.LinkedHashMap;
@@ -24,17 +26,19 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 	/**
 	/**
 	 * 根据医院编码查询公表映射配置
 	 * 根据医院编码查询公表映射配置
 	 *
 	 *
-	 * @param hospitalCode
+	 * @param lisHospitalCodeVO
 	 * @return
 	 * @return
 	 */
 	 */
-	public List<LisConfigDTO> getLisConfigByhospitalIds(String hospitalCode) {
+	public List<LisConfigDTO> getLisConfigByhospitalIds(LisHospitalCodeVO lisHospitalCodeVO) {
 
 
-		QueryWrapper<TranLisConfig> lisConfig = new QueryWrapper<>();
+		/*QueryWrapper<TranLisConfig> lisConfig = new QueryWrapper<>();
 	    //System.out.println("hospitalCode==="+hospitalCode);
 	    //System.out.println("hospitalCode==="+hospitalCode);
 		lisConfig.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code", hospitalCode);
 		lisConfig.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code", hospitalCode);
 		List<TranLisConfig> data = list(lisConfig);
 		List<TranLisConfig> data = list(lisConfig);
 		List<LisConfigDTO> datas = BeanUtil.listCopyTo(data, LisConfigDTO.class);
 		List<LisConfigDTO> datas = BeanUtil.listCopyTo(data, LisConfigDTO.class);
 		//System.out.println("json=="+GsonUtil.toJson(datas));
 		//System.out.println("json=="+GsonUtil.toJson(datas));
+		return datas;*/
+		List<LisConfigDTO> datas = getLisConfigByhospitalId(lisHospitalCodeVO);
 		return datas;
 		return datas;
 	}
 	}
 
 
@@ -43,11 +47,14 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 	 *
 	 *
 	 * @return
 	 * @return
 	 */
 	 */
-	public Map<String, Map<String, String>> getLisConfigByHosCode_NotEmptyItemName(String hosCode) {
+	public Map<String, Map<String, String>> getLisConfigByMealNameAndHosCode(LisConfigVO lisConfigVO) {
 		Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
 		Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
 		QueryWrapper<TranLisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
 		QueryWrapper<TranLisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
-		lisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode).
-				isNotNull("item_name").and(i->i.ne("item_name",""));
+		lisConfigQueryWrapper.select("hospital_code,meal_name,ifnull(item_name,'') as item_name,unique_name,unique_id").
+				eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code", lisConfigVO.getHosCode());
+		if (ListUtil.isNotEmpty(lisConfigVO.getMealNameList())) {
+			lisConfigQueryWrapper.in("meal_name", lisConfigVO.getMealNameList());
+		}
 		List<TranLisConfig> lisConfigList = this.list(lisConfigQueryWrapper);
 		List<TranLisConfig> lisConfigList = this.list(lisConfigQueryWrapper);
 		Map<String, List<TranLisConfig>> lisConfigMap = EntityUtil.makeEntityListMap(lisConfigList, "mealName");
 		Map<String, List<TranLisConfig>> lisConfigMap = EntityUtil.makeEntityListMap(lisConfigList, "mealName");
 		for (Map.Entry<String, List<TranLisConfig>> entry : lisConfigMap.entrySet()) {
 		for (Map.Entry<String, List<TranLisConfig>> entry : lisConfigMap.entrySet()) {
@@ -60,29 +67,19 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 		return retMap;
 		return retMap;
 	}
 	}
 
 
-	/**
-	 * 根据医院编码获取化验公表映射关系-itemName为空 Map<mealName,uniqueName>
-	 *
-	 * @return
-	 */
-	public Map<String, String> getLisConfigByHosCode_EmptyItemName(String hosCode) {
-		QueryWrapper<TranLisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
-		lisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode).
-				isNull("item_name").or(i->i.eq("item_name",""));
-		List<TranLisConfig> lisConfigList = this.list(lisConfigQueryWrapper);
-		Map<String, String> retMap = EntityUtil.makeMapWithKeyValue(lisConfigList, "mealName", "uniqueName");
-		return retMap;
-	}
 
 
 	/**
 	/**
 	 * 根据医院编码获取化验公表映射关系,公表项做key  Map<uniqueName,List<mealName>>
 	 * 根据医院编码获取化验公表映射关系,公表项做key  Map<uniqueName,List<mealName>>
 	 *
 	 *
 	 * @return
 	 * @return
 	 */
 	 */
-	public Map<String, List<String>> getLisConfigByUniqueNameAndHosCode(String hosCode) {
+	public Map<String, List<String>> getLisConfigByUniqueNameAndHosCode(LisConfigVO lisConfigVO) {
 		Map<String, List<String>> retMap = new LinkedHashMap<>();
 		Map<String, List<String>> retMap = new LinkedHashMap<>();
 		QueryWrapper<TranLisConfig> tranLisConfigQueryWrapper = new QueryWrapper<>();
 		QueryWrapper<TranLisConfig> tranLisConfigQueryWrapper = new QueryWrapper<>();
-		tranLisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
+		tranLisConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",lisConfigVO.getHosCode());
+		if(ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList())){
+			tranLisConfigQueryWrapper.in("unique_name",lisConfigVO.getUniqueNameList());
+		}
 		List<TranLisConfig> tranLisConfigList = this.list(tranLisConfigQueryWrapper);
 		List<TranLisConfig> tranLisConfigList = this.list(tranLisConfigQueryWrapper);
 		Map<String, List<TranLisConfig>> lisConfigMap = EntityUtil.makeEntityListMap(tranLisConfigList, "uniqueName");
 		Map<String, List<TranLisConfig>> lisConfigMap = EntityUtil.makeEntityListMap(tranLisConfigList, "uniqueName");
 		for (Map.Entry<String, List<TranLisConfig>> entry : lisConfigMap.entrySet()) {
 		for (Map.Entry<String, List<TranLisConfig>> entry : lisConfigMap.entrySet()) {

+ 7 - 0
tran-service/src/main/java/com/diagbot/mapper/TranLisConfigMapper.java

@@ -1,6 +1,11 @@
 package com.diagbot.mapper;
 package com.diagbot.mapper;
 
 
+import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.entity.TranLisConfig;
 import com.diagbot.entity.TranLisConfig;
+import com.diagbot.vo.LisHospitalCodeVO;
+
+import java.util.List;
+
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 
 /**
 /**
@@ -13,4 +18,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  */
  */
 public interface TranLisConfigMapper extends BaseMapper<TranLisConfig> {
 public interface TranLisConfigMapper extends BaseMapper<TranLisConfig> {
 
 
+	List<LisConfigDTO> getLisConfigByhospitalIds(LisHospitalCodeVO lisHospitalCodeVO);
+
 }
 }

+ 7 - 0
tran-service/src/main/java/com/diagbot/service/TranLisConfigService.java

@@ -1,6 +1,11 @@
 package com.diagbot.service;
 package com.diagbot.service;
 
 
+import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.entity.TranLisConfig;
 import com.diagbot.entity.TranLisConfig;
+import com.diagbot.vo.LisHospitalCodeVO;
+
+import java.util.List;
+
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.IService;
 
 
 /**
 /**
@@ -12,5 +17,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2019-02-13
  * @since 2019-02-13
  */
  */
 public interface TranLisConfigService extends IService<TranLisConfig> {
 public interface TranLisConfigService extends IService<TranLisConfig> {
+	
+	public List<LisConfigDTO> getLisConfigByhospitalId(LisHospitalCodeVO lisHospitalCodeVO);
 
 
 }
 }

+ 10 - 0
tran-service/src/main/java/com/diagbot/service/impl/TranLisConfigServiceImpl.java

@@ -1,9 +1,14 @@
 package com.diagbot.service.impl;
 package com.diagbot.service.impl;
 
 
+import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.entity.TranLisConfig;
 import com.diagbot.entity.TranLisConfig;
 import com.diagbot.mapper.TranLisConfigMapper;
 import com.diagbot.mapper.TranLisConfigMapper;
 import com.diagbot.service.TranLisConfigService;
 import com.diagbot.service.TranLisConfigService;
+import com.diagbot.vo.LisHospitalCodeVO;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import java.util.List;
+
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 /**
 /**
@@ -17,4 +22,9 @@ import org.springframework.stereotype.Service;
 @Service
 @Service
 public class TranLisConfigServiceImpl extends ServiceImpl<TranLisConfigMapper, TranLisConfig> implements TranLisConfigService {
 public class TranLisConfigServiceImpl extends ServiceImpl<TranLisConfigMapper, TranLisConfig> implements TranLisConfigService {
 
 
+	@Override
+	public List<LisConfigDTO> getLisConfigByhospitalId(LisHospitalCodeVO lisHospitalCodeVO) {
+		return baseMapper.getLisConfigByhospitalIds(lisHospitalCodeVO);
+	}
+
 }
 }

+ 18 - 0
tran-service/src/main/java/com/diagbot/vo/LisConfigVO.java

@@ -0,0 +1,18 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description: 化验公表映射检索入参
+ * @Author:zhaops
+ * @time: 2019/7/6 15:52
+ */
+@Getter
+@Setter
+public class LisConfigVO extends HosCodeVO {
+    List<String> mealNameList;
+    List<String> uniqueNameList;
+}

+ 4 - 0
tran-service/src/main/java/com/diagbot/vo/LisHospitalCodeVO.java

@@ -1,5 +1,7 @@
 package com.diagbot.vo;
 package com.diagbot.vo;
 
 
+import java.util.List;
+
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
 
 
@@ -17,4 +19,6 @@ public class LisHospitalCodeVO {
 	 * 医院编码
 	 * 医院编码
 	 */
 	 */
 	String hospitalCode;
 	String hospitalCode;
+	
+	List<String> assemblys;
 }
 }

+ 18 - 29
tran-service/src/main/java/com/diagbot/web/TranLisConfigController.java

@@ -1,23 +1,21 @@
 package com.diagbot.web;
 package com.diagbot.web;
 
 
-import java.util.List;
-import java.util.Map;
-
-import com.diagbot.vo.HosCodeVO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.LisConfigDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.TranLisConfigFacade;
 import com.diagbot.facade.TranLisConfigFacade;
+import com.diagbot.vo.LisConfigVO;
 import com.diagbot.vo.LisHospitalCodeVO;
 import com.diagbot.vo.LisHospitalCodeVO;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
 
 
 /**
 /**
  * 
  * 
@@ -38,31 +36,22 @@ public class TranLisConfigController {
 	@PostMapping("/getLisConfigByhospitalId")
 	@PostMapping("/getLisConfigByhospitalId")
 	@SysLogger("getLisConfigByhospitalId")
 	@SysLogger("getLisConfigByhospitalId")
 	public RespDTO<List<LisConfigDTO>> getLisConfigByhospitalId(@RequestBody LisHospitalCodeVO lisHospitalCodeVO) {
 	public RespDTO<List<LisConfigDTO>> getLisConfigByhospitalId(@RequestBody LisHospitalCodeVO lisHospitalCodeVO) {
-		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByhospitalIds(lisHospitalCodeVO.getHospitalCode()));
+		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByhospitalIds(lisHospitalCodeVO));
 	}
 	}
 
 
-	@ApiOperation(value = "根据医院编码获取化验公表映射关系-itemName不为空:[by:zhaops]",
+	@ApiOperation(value = "根据医院编码和套餐名称获取化验公表映射关系:[by:zhaops]",
 			notes = "hosCode: 医院编码,必填<br>")
 			notes = "hosCode: 医院编码,必填<br>")
-	@PostMapping("/getLisConfigByHosCode_NotEmptyItemName")
-	@SysLogger("getLisConfigByHosCode_NotEmptyItemName")
-	public RespDTO<Map<String, Map<String, String>>> getLisConfigByHosCode_NotEmptyItemName(@RequestBody HosCodeVO hosCodeVO) {
-		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByHosCode_NotEmptyItemName(hosCodeVO.getHosCode()));
-	}
-
-	@ApiOperation(value = "根据医院编码获取化验公表映射关系-itemName为空 :[by:zhaops]",
-			notes = "hosCode: 医院编码,必填<br>")
-	@PostMapping("/getLisConfigByHosCode_EmptyItemName")
-	@SysLogger("getLisConfigByHosCode_EmptyItemName")
-	public RespDTO<Map<String, String>> getLisConfigByHosCode_EmptyItemName(@RequestBody HosCodeVO hosCodeVO) {
-		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByHosCode_EmptyItemName(hosCodeVO.getHosCode()));
+	@PostMapping("/getLisConfigByMealNameAndHosCode")
+	@SysLogger("getLisConfigByMealNameAndHosCode")
+	public RespDTO<Map<String, Map<String, String>>> getLisConfigByMealNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
+		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByMealNameAndHosCode(lisConfigVO));
 	}
 	}
 
 
 	@ApiOperation(value = "根据医院编码获取化验公表映射关系,公表项做key :[by:zhaops]",
 	@ApiOperation(value = "根据医院编码获取化验公表映射关系,公表项做key :[by:zhaops]",
 			notes = "hosCode: 医院编码,必填<br>")
 			notes = "hosCode: 医院编码,必填<br>")
 	@PostMapping("/getLisConfigByUniqueNameAndHosCode")
 	@PostMapping("/getLisConfigByUniqueNameAndHosCode")
 	@SysLogger("getLisConfigByUniqueNameAndHosCode")
 	@SysLogger("getLisConfigByUniqueNameAndHosCode")
-	public RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody HosCodeVO hosCodeVO) {
-		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByUniqueNameAndHosCode(hosCodeVO.getHosCode()));
+	public RespDTO<Map<String, List<String>>> getLisConfigByUniqueNameAndHosCode(@RequestBody LisConfigVO lisConfigVO) {
+		return RespDTO.onSuc(tranLisConfigFacade.getLisConfigByUniqueNameAndHosCode(lisConfigVO));
 	}
 	}
-}
-
+}

+ 28 - 14
tran-service/src/main/resources/mapper/TranLisConfigMapper.xml

@@ -2,19 +2,33 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.diagbot.mapper.TranLisConfigMapper">
 <mapper namespace="com.diagbot.mapper.TranLisConfigMapper">
 
 
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.diagbot.entity.TranLisConfig">
-        <id column="id" property="id" />
-        <result column="is_deleted" property="isDeleted" />
-        <result column="gmt_create" property="gmtCreate" />
-        <result column="gmt_modified" property="gmtModified" />
-        <result column="creator" property="creator" />
-        <result column="modifier" property="modifier" />
-        <result column="hospital_code" property="hospitalCode" />
-        <result column="meal_name" property="mealName" />
-        <result column="item_name" property="itemName" />
-        <result column="unique_id" property="uniqueId" />
-        <result column="unique_name" property="uniqueName" />
-    </resultMap>
+	<!-- 通用查询映射结果 -->
+	<resultMap id="BaseResultMap" type="com.diagbot.entity.TranLisConfig">
+		<id column="id" property="id" />
+		<result column="is_deleted" property="isDeleted" />
+		<result column="gmt_create" property="gmtCreate" />
+		<result column="gmt_modified" property="gmtModified" />
+		<result column="creator" property="creator" />
+		<result column="modifier" property="modifier" />
+		<result column="hospital_code" property="hospitalCode" />
+		<result column="meal_name" property="mealName" />
+		<result column="item_name" property="itemName" />
+		<result column="unique_id" property="uniqueId" />
+		<result column="unique_name" property="uniqueName" />
+	</resultMap>
 
 
+	<select id="getLisConfigByhospitalIds" resultType="com.diagbot.dto.LisConfigDTO">
+		SELECT CONCAT(IFNULL(meal_name,""),"--",IFNULL(item_name,"")) AS
+		assembly ,a.*
+		FROM tran_lis_config a WHERE a.is_deleted = 'N'
+		<if test="hospitalCode!=null">
+			AND hospital_code = #{hospitalCode}
+		</if>
+		<if test="assemblys!=null">
+			AND CONCAT(IFNULL(meal_name,""),"--",IFNULL(item_name,"")) IN
+			<foreach collection="assemblys" item="assemblys"  open="(" close=")" separator=",">
+				#{assemblys}
+			</foreach>
+		</if>
+	</select>
 </mapper>
 </mapper>