Bläddra i källkod

化验提示语修改,套餐和名称一样,取其中一个

zhoutg 4 år sedan
förälder
incheckning
0af53eba77

+ 14 - 2
src/main/java/com/diagbot/process/OtherTipProcess.java

@@ -62,7 +62,14 @@ public class OtherTipProcess {
                         map = groupRule.gravidityRule(wordCrfDTO);
                     }
                     if (CoreUtil.getMapFlag(map) == true) {
-                        String content = otherTipNeoDTO.getName() + otherTipNeoDTO.getDetailName();
+                        String content = "";
+                        if (otherTipNeoDTO.getName() == null || otherTipNeoDTO.getDetailName() == null
+                                || !otherTipNeoDTO.getName().equals(otherTipNeoDTO.getDetailName())) {
+                            content = otherTipNeoDTO.getName() + otherTipNeoDTO.getDetailName();
+                        } else {
+                            content = otherTipNeoDTO.getDetailName();
+                        }
+
                         if (StringUtil.isNotBlank(otherTipNeoDTO.getOtherValue())) {
                             content += otherTipNeoDTO.getOtherValue();
                         } else {
@@ -127,7 +134,12 @@ public class OtherTipProcess {
                     if (sb.toString().length() > 0) {
                         sb.append(",");
                     }
-                    sb.append(lis.getName() + lis.getDetailName() + CoreUtil.getLisValue(lis));
+                    if (lis.getName() == null || lis.getDetailName() == null
+                            || !lis.getName().equals(lis.getDetailName())) {
+                        sb.append(lis.getName() + lis.getDetailName() + CoreUtil.getLisValue(lis));
+                    } else {
+                        sb.append(lis.getDetailName() + CoreUtil.getLisValue(lis));
+                    }
                 }
             }
             // 辅检名称

+ 13 - 2
src/main/java/com/diagbot/util/CoreUtil.java

@@ -310,14 +310,25 @@ public class CoreUtil {
         }
         if (StringUtil.isNotBlank(lis.getOtherValue())) {
             if (lis.getOtherValue().equals(nodeNeoDTO.getVal())) {
-                map.put("msg", lis.getName() + lis.getDetailName() + lis.getOtherValue());
+                // 套餐和明细一样,提示语只取其中一个
+                if (lis.getName() == null || lis.getDetailName() == null
+                        || !lis.getName().equals(lis.getDetailName())) {
+                    map.put("msg", lis.getName() + lis.getDetailName() + lis.getOtherValue());
+                } else {
+                    map.put("msg", lis.getDetailName() + lis.getOtherValue());
+                }
                 flag = true;
             }
         } else if (lis.getValue() != null) {
             double value = lis.getValue();
             flag = compareNum(nodeNeoDTO, value);
             if (flag) {
-                map.put("msg", lis.getName() + lis.getDetailName() + subZeroAndDot(String.valueOf(lis.getValue())));
+                if (lis.getName() == null || lis.getDetailName() == null
+                        || !lis.getName().equals(lis.getDetailName())) {
+                    map.put("msg", lis.getName() + lis.getDetailName() + subZeroAndDot(String.valueOf(lis.getValue())));
+                } else {
+                    map.put("msg", lis.getDetailName() + subZeroAndDot(String.valueOf(lis.getValue())));
+                }
             }
         }
         map.put("flag", flag);