Преглед изворни кода

化验明细项为空时,套餐跟公表名称必须一致

zhaops пре 5 година
родитељ
комит
1025d54d31

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

@@ -103,6 +103,13 @@ public class LisMappingFacade extends LisMappingServiceImpl {
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验公表项项术语不存在");
         }
 
+        //化验明细项为空时,套餐跟公表名称必须一致
+        if (lisMappingVO.getItemId() == null || lisMappingVO.getItemId().equals(0L)) {
+            if (!mealConcept.getLibName().equals(uniqueConcept.getLibName())) {
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "化验套餐名跟公表名需保持一致");
+            }
+        }
+
         QueryWrapper<LisMapping> lisMappingQueryWrapper = new QueryWrapper<>();
         lisMappingQueryWrapper
                 .eq("is_deleted", IsDeleteEnum.N.getKey())

+ 0 - 48
triage-service/src/main/java/com/diagbot/facade/AIFacade.java

@@ -102,57 +102,9 @@ public class AIFacade {
                     FeatureRate item;
                     if (disFeatureMap.get("确诊") != null) {
                         items = getItems(disFeatureMap, "确诊", 1);
-                        //                        List<FeatureRate> featureRateList = disFeatureMap.get("确诊");
-                        //                        featureRateList = featureRateList
-                        //                                .stream()
-                        //                                .filter(i -> i.getExtraProperty() != null)
-                        //                                .collect(Collectors.toList());
-                        //                        if (ListUtil.isNotEmpty(featureRateList)) {
-                        //                            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>>>() {
-                        //                                //降序排序
-                        //                                public int compare(Map.Entry<String, List<FeatureRate>> o1,
-                        //                                                   Map.Entry<String, List<FeatureRate>> o2) {
-                        //                                    return Integer.compare(o2.getValue().size(), o1.getValue().size());
-                        //                                }
-                        //                            });
-                        //                            for (Map.Entry<String, List<FeatureRate>> entry : list) {
-                        //                                if (items.size() < 1) {
-                        //                                    item = new FeatureRate();
-                        //                                    item.setExtraProperty(entry.getKey());
-                        //                                    items.add(item);
-                        //                                }
-                        //                            }
-                        //                        }
                     }
                     if (disFeatureMap.get("拟诊") != null && ListUtil.isEmpty(items)) {
                         items = getItems(disFeatureMap, "拟诊", 2);
-                        //                        List<FeatureRate> featureRateList = disFeatureMap.get("拟诊");
-                        //                        featureRateList = featureRateList
-                        //                                .stream()
-                        //                                .filter(i -> i.getExtraProperty() != null)
-                        //                                .collect(Collectors.toList());
-                        //                        if (ListUtil.isNotEmpty(featureRateList)) {
-                        //                            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>>>() {
-                        //                                //降序排序
-                        //                                public int compare(Map.Entry<String, List<FeatureRate>> o1,
-                        //                                                   Map.Entry<String, List<FeatureRate>> o2) {
-                        //                                    return Integer.compare(o2.getValue().size(), o1.getValue().size());
-                        //                                }
-                        //                            });
-                        //                            for (Map.Entry<String, List<FeatureRate>> entry : list) {
-                        //                                if (items.size() < 2) {
-                        //                                    item = new FeatureRate();
-                        //                                    item.setExtraProperty(entry.getKey());
-                        //                                    items.add(item);
-                        //                                }
-                        //                            }
-                        //                        }
                     }
                     if (disFeatureMap.get("可能诊断") != null && ListUtil.isEmpty(items)) {
                         Double rate;