|
|
@@ -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;
|