Преглед на файлове

fix(自动获取数据):
自动拉取His数据Bug修复

18339543638 преди 2 години
родител
ревизия
d3c2b47fc1
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      nb-service/web-service/src/main/java/com/nb/web/service/bus/hospital/HospitalManager.java

+ 5 - 3
nb-service/web-service/src/main/java/com/nb/web/service/bus/hospital/HospitalManager.java

@@ -265,11 +265,13 @@ public class HospitalManager {
             return;
         }
         //参数未改变
-        if(ObjectUtil.equals(this.getUpdateConfig().getInterval(),updateConfig.getInterval())){
+        if(ObjectUtil.isNotNull(this.getUpdateConfig())&&ObjectUtil.equals(this.getUpdateConfig().getInterval(),updateConfig.getInterval())){
             return;
         }else {
-            //取消上次循环
-            hisSchedule.cancel(true);
+            if(hisSchedule!=null){
+                //取消上次循环
+                hisSchedule.cancel(true);
+            }
             hisSchedule = singleHisExecutor.scheduleAtFixedRate(this::scheduleHis, 0, updateConfig.getInterval(),TimeUnit.MINUTES);
         }
         this.updateConfig=updateConfig;