Browse Source

Merge branch 'master' into innerDevelop

zhoutg 4 years ago
parent
commit
c90faa190e

+ 17 - 15
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -721,21 +721,23 @@ public class NeoFacade {
                     if (StringUtil.isBlank(result)) {
                         val = lis.getValue();
                         unit = lis.getUnits();
-                        for (LisRemind lisRemind : lrlist) {
-                            if (lisRemind.getRange() == 0) { /*&& lisRemind.getUnit().equals(unit) &&*/
-                                if (null == lisRemind.getMinval() && val <= lisRemind.getMaxval()) {
-                                    otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
-                                } else if (null == lisRemind.getMaxval() && val >= lisRemind.getMinval()) {
-                                    otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
-                                } else if (null != lisRemind.getMinval() && null != lisRemind.getMaxval() &&
-                                        val <= lisRemind.getMaxval() && val >= lisRemind.getMinval()) {
-                                    otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
-                                }
-                            } else if (lisRemind.getRange() == 1) { /*&& lisRemind.getUnit().equals(unit) &&*/
-                                if (null != lisRemind.getMaxval() && val > lisRemind.getMaxval()) {
-                                    otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
-                                } else if (null != lisRemind.getMinval() && val < lisRemind.getMinval()) {
-                                    otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
+                        if (null != val) {
+                            for (LisRemind lisRemind : lrlist) {
+                                if (lisRemind.getRange() == 0) { /*&& lisRemind.getUnit().equals(unit) &&*/
+                                    if (null == lisRemind.getMinval() && null != lisRemind.getMaxval() && val <= lisRemind.getMaxval()) {
+                                        otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
+                                    } else if (null == lisRemind.getMaxval() && val >= lisRemind.getMinval()) {
+                                        otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
+                                    } else if (null != lisRemind.getMinval() && null != lisRemind.getMaxval() &&
+                                            val <= lisRemind.getMaxval() && val >= lisRemind.getMinval()) {
+                                        otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
+                                    }
+                                } else if (lisRemind.getRange() == 1) { /*&& lisRemind.getUnit().equals(unit) &&*/
+                                    if (null != lisRemind.getMaxval() && val > lisRemind.getMaxval()) {
+                                        otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
+                                    } else if (null != lisRemind.getMinval() && val < lisRemind.getMinval()) {
+                                        otherTipNeoDTOS = updateTipNeoDTO(otherTipNeoDTOS, lis, lisRemind);
+                                    }
                                 }
                             }
                         }

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

@@ -68,8 +68,13 @@ public class OtherTipProcess {
                         } else {
                             content += CoreUtil.subZeroAndDot(otherTipNeoDTO.getValue().toString());
                         }
-                        BillMsg billMsg = MsgUtil.getCommonOtherTipLisMsg(content, (String)map.get("msg"), nodeNeoDTO.getTermtype());
-                        res.getOtherList().add(billMsg);
+                        List<String> msgList = (List<String>)map.get("msg");
+                        if (ListUtil.isNotEmpty(msgList)) {
+                            for (String msg : msgList) {
+                                BillMsg billMsg = MsgUtil.getCommonOtherTipLisMsg(content, msg, nodeNeoDTO.getTermtype());
+                                res.getOtherList().add(billMsg);
+                            }
+                        }
                     }
                 }
             }

+ 8 - 13
src/main/java/com/diagbot/repository/TransfusionSuggestNode.java

@@ -58,30 +58,25 @@ public class TransfusionSuggestNode {
 			if (tf.getNode_label().equals(Constants.lisname)) {
 				lisname = tf.getIndex_name();
 				lisresult = lismap.get(lisname);
-				if (lisresult!=null) {
+				if (lisresult!=null && null != lisresult.getValue()) {
 					val = lisresult.getValue();
 					if (tf.getRange() == 0) {
-						if (null==tf.getMinval() && null==tf.getMaxval()) {
+						if (null == tf.getMinval() && null == tf.getMaxval()) {
 							lisresult = null;
-						}
-						else if (null==tf.getMinval() && val > tf.getMaxval()) {
+						} else if (null == tf.getMinval() && val > tf.getMaxval()) {
 							lisresult = null;
-						}
-						else if(null==tf.getMaxval() && val < tf.getMinval()) {
+						} else if (null == tf.getMaxval() && val < tf.getMinval()) {
 							lisresult = null;
-						}
-						else if (null!=tf.getMinval() && null!=tf.getMaxval() &&
+						} else if (null != tf.getMinval() && null != tf.getMaxval() &&
 								(val > tf.getMaxval() || val < tf.getMinval())) {
 							lisresult = null;
 						}
 					} else if (tf.getRange() == 1) {
-						if (null==tf.getMinval() && null==tf.getMaxval()) {
+						if (null == tf.getMinval() && null == tf.getMaxval()) {
 							lisresult = null;
-						}
-						else if (null!=tf.getMaxval() && val < tf.getMaxval()) {
+						} else if (null != tf.getMaxval() && val < tf.getMaxval()) {
 							lisresult = null;
-						}
-						else if (null!=tf.getMinval() && val > tf.getMinval()){
+						} else if (null != tf.getMinval() && val > tf.getMinval()) {
 							lisresult = null;
 						}
 					}

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

@@ -277,16 +277,17 @@ public class CoreUtil {
     public static Map compareNameWithNode(NodeNeoDTO nodeNeoDTO, List<? extends Item> item) {
         Map<String, Object> map = new LinkedHashMap<>();
         boolean flag = false;
+        List<String> msgList = new ArrayList<>();
         if (ListUtil.isNotEmpty(item) && nodeNeoDTO != null) {
             for (Item it : item) {
                 if (it.getUniqueName().equals(nodeNeoDTO.getName())) {
                     flag = true;
-                    map.put("msg", it.getName());
-                    break;
+                    msgList.add(it.getName());
                 }
             }
         }
         map.put("flag", flag);
+        map.put("msg", msgList);
         return map;
     }