فهرست منبع

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;