Explorar o código

正则抽取辅检,体征优化

kongwz %!s(int64=3) %!d(string=hai) anos
pai
achega
07e69e9c7d

+ 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);
                         }