瀏覽代碼

正则抽取辅检,体征优化

kongwz 3 年之前
父節點
當前提交
07e69e9c7d
共有 1 個文件被更改,包括 4 次插入8 次删除
  1. 4 8
      src/main/java/com/diagbot/facade/KlRegularConfigFacade.java

+ 4 - 8
src/main/java/com/diagbot/facade/KlRegularConfigFacade.java

@@ -170,12 +170,10 @@ public class KlRegularConfigFacade extends KlRegularConfigServiceImpl {
                     PD pd = x.getPd();
                     if (pd != null) {
                         String value = pd.getValue();
-                        String unit = pd.getUnit();
                         String key = name + "_" + value;
                         if (rulePacsCompiles.containsKey(key)) {
-                            if (StringUtil.isBlank(unit)) {
-                                unit = rulePacsCompiles.get(key);
-                                pd.setUnit(unit);
+                            if (StringUtil.isNotBlank(rulePacsCompiles.get(key))) {
+                                pd.setUnit(rulePacsCompiles.get(key));
                             }
                             rulePacsCompiles.remove(key);
                         }
@@ -209,12 +207,10 @@ public class KlRegularConfigFacade extends KlRegularConfigServiceImpl {
                     PD pd = next.getPd();
                     if (pd != null) {
                         String value = pd.getValue();
-                        String unit = pd.getUnit();
                         String key = name + "_" + value;
                         if (rulevitalsCompiles.containsKey(key)) {
-                            if (StringUtil.isBlank(unit)) {
-                                unit = rulevitalsCompiles.get(key);
-                                pd.setUnit(unit);
+                            if (StringUtil.isNotBlank(rulevitalsCompiles.get(key))) {
+                                pd.setUnit(rulevitalsCompiles.get(key));
                             }
                             rulevitalsCompiles.remove(key);
                         }