zhaops 5 éve
szülő
commit
e13b2df6d8

+ 41 - 14
knowledgeman-service/src/main/java/com/diagbot/facade/LisMappingFacade.java

@@ -59,7 +59,10 @@ public class LisMappingFacade extends LisMappingServiceImpl {
     public IPage<LisMappingPageDTO> getLisMappingPage(LisMappingPageVO lisMappingPageVO) {
         IPage<LisMappingPageDTO> dtoPage = this.lisMappingPage(lisMappingPageVO);
         List<LisMappingPageDTO> records = dtoPage.getRecords();
-        List<String> userIds = records.stream().map(record -> record.getModifier()).collect(Collectors.toList());
+        List<String> userIds = records
+                .stream()
+                .map(record -> record.getModifier())
+                .collect(Collectors.toList());
         RespDTO<Map<String, String>> data = userServiceClient.getUserInfoByIds(userIds);
         Map<String, String> userInfos = data.data;
         for (LisMappingPageDTO record : records) {
@@ -101,10 +104,13 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         }
 
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
-        lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+        lisMappingQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("meal_id", lisMappingVO.getMealId());
         if (lisMappingVO.getItemId() == null || lisMappingVO.getItemId().equals(0L)) {
-            lisMappingQueryWrapper.and(i -> i.isNull("item_id").or(j -> j.eq("item_id", "0")));
+            lisMappingQueryWrapper
+                    .and(i -> i.isNull("item_id")
+                            .or(j -> j.eq("item_id", "0")));
         } else {
             lisMappingQueryWrapper.eq("item_id", lisMappingVO.getItemId());
         }
@@ -141,7 +147,10 @@ public class LisMappingFacade extends LisMappingServiceImpl {
             List<QuestionInfo> questionInfoList = respDTO.data;
             if (ListUtil.isNotEmpty(questionInfoList)) {
                 IdListVO idListVO = new IdListVO();
-                List<Long> idList = questionInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
+                List<Long> idList = questionInfoList
+                        .stream()
+                        .map(i -> i.getId())
+                        .collect(Collectors.toList());
                 idListVO.setIdList(idList);
                 RespDTO<Boolean> cacheRespDTO = icssManServiceClient.clearCache(idListVO);
             }
@@ -160,7 +169,9 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("meal_id", lisMappingVO.getMealId());
         if (lisMappingVO.getItemId() == null || lisMappingVO.getItemId().equals(0L)) {
-            lisMappingQueryWrapper.and(i -> i.isNull("item_id").or(j -> j.eq("item_id", "0")));
+            lisMappingQueryWrapper
+                    .and(i -> i.isNull("item_id")
+                            .or(j -> j.eq("item_id", "0")));
         } else {
             lisMappingQueryWrapper.eq("item_id", lisMappingVO.getItemId());
         }
@@ -206,7 +217,10 @@ public class LisMappingFacade extends LisMappingServiceImpl {
             List<QuestionInfo> questionInfoList = respDTO.data;
             if (ListUtil.isNotEmpty(questionInfoList)) {
                 IdListVO idListVO = new IdListVO();
-                List<Long> idList = questionInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
+                List<Long> idList = questionInfoList
+                        .stream()
+                        .map(i -> i.getId())
+                        .collect(Collectors.toList());
                 idListVO.setIdList(idList);
                 RespDTO<Boolean> cacheRespDTO = icssManServiceClient.clearCache(idListVO);
             }
@@ -224,7 +238,8 @@ public class LisMappingFacade extends LisMappingServiceImpl {
     public String getLisUniqueName(GetUniqueNameVO getUniqueNameVO) {
         String uniqueName = "";
         QueryWrapper<Concept> conceptQueryWrapper = new QueryWrapper<>();
-        conceptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+        conceptQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("lib_name", getUniqueNameVO.getMealName())
                 .eq("lib_type", LexiconTypeEnum.LIS_PACKAGE.getKey());
         Concept mealConcept = conceptFacade.getOne(conceptQueryWrapper, false);
@@ -234,7 +249,8 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         Concept itemConcept = null;
         if (StringUtil.isNotBlank(getUniqueNameVO.getItemName())) {
             conceptQueryWrapper = new QueryWrapper<>();
-            conceptQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+            conceptQueryWrapper
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .eq("lib_name", getUniqueNameVO.getItemName())
                     .eq("lib_type", LexiconTypeEnum.LIS_DETAILS.getKey());
             itemConcept = conceptFacade.getOne(conceptQueryWrapper, false);
@@ -243,10 +259,13 @@ public class LisMappingFacade extends LisMappingServiceImpl {
             }
         }
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
-        lisMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+        lisMappingQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("meal_id", mealConcept.getId());
         if (itemConcept == null) {
-            lisMappingQueryWrapper.and(i -> i.isNull("item_id").or(j -> j.eq("item_id", 0L)));
+            lisMappingQueryWrapper
+                    .and(i -> i.isNull("item_id")
+                            .or(j -> j.eq("item_id", 0L)));
         } else {
             lisMappingQueryWrapper.eq("item_id", itemConcept.getId());
         }
@@ -270,8 +289,12 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         Map<String, Object> paramMap = new HashMap<>();
         paramMap.put("uniqueNames", uniqueNames);
         List<LisMappingWrapper> lisMappingWrapperList = this.getLisMappingByName(paramMap);
-        List<String> mealNames = lisMappingWrapperList.stream().map(i -> i.getMealName()).filter(j -> j != null)
-                .distinct().collect(Collectors.toList());
+        List<String> mealNames = lisMappingWrapperList
+                .stream()
+                .map(i -> i.getMealName())
+                .filter(j -> j != null)
+                .distinct()
+                .collect(Collectors.toList());
         return mealNames;
     }
 
@@ -285,8 +308,12 @@ public class LisMappingFacade extends LisMappingServiceImpl {
         Map<String, Object> paramMap = new HashMap<>();
         paramMap.put("itemNames", itemNames);
         List<LisMappingWrapper> lisMappingWrapperList = this.getLisMappingByName(paramMap);
-        List<String> mealNames = lisMappingWrapperList.stream().map(i -> i.getMealName())
-                .filter(j -> j != null).distinct().collect(Collectors.toList());
+        List<String> mealNames = lisMappingWrapperList
+                .stream()
+                .map(i -> i.getMealName())
+                .filter(j -> j != null)
+                .distinct()
+                .collect(Collectors.toList());
         return mealNames;
     }
 }

+ 4 - 2
prec-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -80,10 +80,12 @@ public class PushFacade {
     public List<ConceptPushDTO> addQuestionId(List<ConceptPushDTO> concepts, Integer type) {
         List<String> nameList = concepts
                 .stream()
-                .map(concept -> concept.getTagName()).collect(Collectors.toList());
+                .map(concept -> concept.getTagName())
+                .collect(Collectors.toList());
         if (ListUtil.isNotEmpty(nameList)) {
             QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper<>();
-            questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+            questionInfoQueryWrapper
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
                     .in("tag_name", nameList)
                     .eq("type", type);
             List<QuestionInfo> questionInfoList = questionFacade.list(questionInfoQueryWrapper);

+ 2 - 1
tran-service/src/main/java/com/diagbot/facade/DataServiceFacade.java

@@ -31,7 +31,8 @@ public class DataServiceFacade {
             throw new CommonException(CommonErrorCode.PARAM_IS_NULL, "请输入医院编码");
         }
         QueryWrapper<HospitalInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+        queryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("code", hosCodeVO.getHosCode());
         HospitalInfo hospitalInfo = hospitalInfoFacade.getOne(queryWrapper, false);
         if (hospitalInfo == null) {

+ 5 - 2
tran-service/src/main/java/com/diagbot/facade/IntroduceTitleConfigFacade.java

@@ -25,9 +25,12 @@ public class IntroduceTitleConfigFacade extends IntroduceTitleConfigServiceImpl
      */
     public Map<String, String> getTitleMappingHosCode(String hosCode) {
         QueryWrapper<IntroduceTitleConfig> titleMappingQueryWrapper = new QueryWrapper<>();
-        titleMappingQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
+        titleMappingQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_code", hosCode);
         List<IntroduceTitleConfig> titleMappingList = this.list(titleMappingQueryWrapper);
-        Map<String, String> retMap= EntityUtil.makeMapWithKeyValue(titleMappingList, "itemName", "uniqueName");
+        Map<String, String> retMap
+                = EntityUtil.makeMapWithKeyValue(titleMappingList, "itemName", "uniqueName");
         return retMap;
     }
 }

+ 10 - 4
tran-service/src/main/java/com/diagbot/facade/PacsConfigFacade.java

@@ -26,9 +26,12 @@ public class PacsConfigFacade extends PacsConfigServiceImpl{
      */
     public Map<String, String> getPacsConfigByHosCode(String hosCode) {
         QueryWrapper<PacsConfig> pacsConfigQueryWrapper = new QueryWrapper<>();
-        pacsConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code",hosCode);
+        pacsConfigQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_code", hosCode);
         List<PacsConfig> pacsConfigList = this.list(pacsConfigQueryWrapper);
-        Map<String, String> retMap=EntityUtil.makeMapWithKeyValue(pacsConfigList, "mealName", "uniqueName");
+        Map<String, String> retMap
+                = EntityUtil.makeMapWithKeyValue(pacsConfigList, "mealName", "uniqueName");
         return retMap;
     }
 
@@ -40,9 +43,12 @@ public class PacsConfigFacade extends PacsConfigServiceImpl{
     public Map<String, List<String>> getPacsConfigByUniqueNameAndHosCode(String hosCode) {
         Map<String, List<String>> retMap = new LinkedHashMap<>();
         QueryWrapper<PacsConfig> pacsConfigQueryWrapper = new QueryWrapper<>();
-        pacsConfigQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).eq("hospital_code", hosCode);
+        pacsConfigQueryWrapper
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_code", hosCode);
         List<PacsConfig> pacsConfigList = this.list(pacsConfigQueryWrapper);
-        Map<String, List<PacsConfig>> pacsConfigMap = EntityUtil.makeEntityListMap(pacsConfigList, "uniqueName");
+        Map<String, List<PacsConfig>> pacsConfigMap
+                = EntityUtil.makeEntityListMap(pacsConfigList, "uniqueName");
         for (Map.Entry<String, List<PacsConfig>> entry : pacsConfigMap.entrySet()) {
             retMap.put(entry.getKey(), EntityUtil.makeListByFieldName(entry.getValue(), "mealName"));
         }

+ 13 - 8
tran-service/src/main/java/com/diagbot/facade/TranLisConfigFacade.java

@@ -50,16 +50,20 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 	public Map<String, Map<String, String>> getLisConfigByMealNameAndHosCode(LisConfigVO lisConfigVO) {
 		Map<String, Map<String, String>> retMap = new LinkedHashMap<>();
 		QueryWrapper<TranLisConfig> lisConfigQueryWrapper = new QueryWrapper<>();
-		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());
+		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);
-		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()) {
 			if (entry.getValue().size() > 0) {
-				retMap.put(entry.getKey(), EntityUtil.makeMapWithKeyValue(entry.getValue(), "itemName", "uniqueName"));
+				retMap.put(entry.getKey(),
+						EntityUtil.makeMapWithKeyValue(entry.getValue(), "itemName", "uniqueName"));
 			} else {
 				retMap.put(entry.getKey(), null);
 			}
@@ -78,12 +82,13 @@ public class TranLisConfigFacade extends TranLisConfigServiceImpl{
 		QueryWrapper<TranLisConfig> tranLisConfigQueryWrapper = new QueryWrapper<>();
 		tranLisConfigQueryWrapper
 				.eq("is_deleted", IsDeleteEnum.N.getKey())
-				.eq("hospital_code",lisConfigVO.getHosCode());
-		if(ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList())){
-			tranLisConfigQueryWrapper.in("unique_name",lisConfigVO.getUniqueNameList());
+				.eq("hospital_code", lisConfigVO.getHosCode());
+		if (ListUtil.isNotEmpty(lisConfigVO.getUniqueNameList())) {
+			tranLisConfigQueryWrapper.in("unique_name", lisConfigVO.getUniqueNameList());
 		}
 		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()) {
 			retMap.put(entry.getKey(), EntityUtil.makeListByFieldName(entry.getValue(), "mealName"));
 		}

+ 23 - 8
triage-service/src/main/java/com/diagbot/facade/AIFacade.java

@@ -2,7 +2,6 @@ package com.diagbot.facade;
 
 import com.diagbot.client.AiptServiceClient;
 import com.diagbot.client.TranServiceClient;
-import com.diagbot.client.bean.Feature;
 import com.diagbot.client.bean.FeatureRate;
 import com.diagbot.client.bean.ResponseData;
 import com.diagbot.client.bean.SearchData;
@@ -103,9 +102,13 @@ public class AIFacade {
                     FeatureRate item;
                     if (disFeatureMap.get("确诊") != null) {
                         List<FeatureRate> featureRateList = disFeatureMap.get("确诊");
-                        featureRateList = featureRateList.stream().filter(i -> i.getExtraProperty() != null).collect(Collectors.toList());
+                        featureRateList = featureRateList
+                                .stream()
+                                .filter(i -> i.getExtraProperty() != null)
+                                .collect(Collectors.toList());
                         if (ListUtil.isNotEmpty(featureRateList)) {
-                            Map<String, List<FeatureRate>> disMap = EntityUtil.makeEntityListMap(featureRateList, "extraProperty");
+                            Map<String, List<FeatureRate>> disMap
+                                    = EntityUtil.makeEntityListMap(featureRateList, "extraProperty");
                             List<Map.Entry<String, List<FeatureRate>>> list = new ArrayList<Map.Entry<String, List<FeatureRate>>>(disMap.entrySet());
                             Collections.sort(list, new Comparator<Map.Entry<String, List<FeatureRate>>>() {
                                 //降序排序
@@ -125,9 +128,13 @@ public class AIFacade {
                     }
                     if (disFeatureMap.get("拟诊") != null && ListUtil.isEmpty(items)) {
                         List<FeatureRate> featureRateList = disFeatureMap.get("拟诊");
-                        featureRateList = featureRateList.stream().filter(i -> i.getExtraProperty() != null).collect(Collectors.toList());
+                        featureRateList = featureRateList
+                                .stream()
+                                .filter(i -> i.getExtraProperty() != null)
+                                .collect(Collectors.toList());
                         if (ListUtil.isNotEmpty(featureRateList)) {
-                            Map<String, List<FeatureRate>> disMap = EntityUtil.makeEntityListMap(featureRateList, "extraProperty");
+                            Map<String, List<FeatureRate>> disMap
+                                    = EntityUtil.makeEntityListMap(featureRateList, "extraProperty");
                             List<Map.Entry<String, List<FeatureRate>>> list = new ArrayList<Map.Entry<String, List<FeatureRate>>>(disMap.entrySet());
                             Collections.sort(list, new Comparator<Map.Entry<String, List<FeatureRate>>>() {
                                 //降序排序
@@ -149,7 +156,11 @@ public class AIFacade {
                         Double rate;
                         Map<String, Double> map = new HashMap<>();
                         List<FeatureRate> featureRateList = disFeatureMap.get("可能诊断");
-                        featureRateList = featureRateList.stream().filter(i -> i.getExtraProperty() != null).filter(i -> i.getRate() != null).collect(Collectors.toList());
+                        featureRateList = featureRateList
+                                .stream()
+                                .filter(i -> i.getExtraProperty() != null)
+                                .filter(i -> i.getRate() != null)
+                                .collect(Collectors.toList());
                         for (FeatureRate featureRate : featureRateList) {
                             if (featureRate.getRate() != null && Double.valueOf(featureRate.getRate()) > 0.1d) {
                                 if (StringUtil.isNotBlank(featureRate.getExtraProperty())) {
@@ -190,8 +201,12 @@ public class AIFacade {
                     if (ListUtil.isNotEmpty(items)) {
                         HospitalDeptVO hospitalDeptVO = new HospitalDeptVO();
                         hospitalDeptVO.setHospitalCode(aivo.getHospitalCode());
-                        hospitalDeptVO.setConceptNames(items.stream().map(i -> i.getExtraProperty()).collect(Collectors.toList()));
-                        RespDTO<Map<String, List<HospitalDeptDTO>>> retDeptMap = tranServiceClient.hospitalDeptByConceptNames(hospitalDeptVO);
+                        hospitalDeptVO.setConceptNames(items
+                                .stream()
+                                .map(i -> i.getExtraProperty())
+                                .collect(Collectors.toList()));
+                        RespDTO<Map<String, List<HospitalDeptDTO>>> retDeptMap
+                                = tranServiceClient.hospitalDeptByConceptNames(hospitalDeptVO);
                         if (RespDTOUtil.respIsOK(retDeptMap)) {
                             Map<String, List<HospitalDeptDTO>> deptMap = retDeptMap.data;
                             for (FeatureRate item : items) {