|
@@ -36,8 +36,8 @@ import http.vo.response.LabPersonVo;
|
|
import http.vo.response.LabWarnVo;
|
|
import http.vo.response.LabWarnVo;
|
|
import kotlin.Unit;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.functions.Function1;
|
|
-import xn.xxp.app.InitActivity;
|
|
|
|
-import xn.xxp.home.setting.SettingActivity;
|
|
|
|
|
|
+import xn.xxp.app.InitTool;
|
|
|
|
+import xn.xxp.app.LabApp;
|
|
import xn.xxp.app.SyncFaceTool;
|
|
import xn.xxp.app.SyncFaceTool;
|
|
import xn.xxp.databinding.ActivityHomeBinding;
|
|
import xn.xxp.databinding.ActivityHomeBinding;
|
|
import xn.xxp.home.AccessVerify;
|
|
import xn.xxp.home.AccessVerify;
|
|
@@ -49,6 +49,7 @@ import xn.xxp.home.auth.ChoiceAuthActivity;
|
|
import xn.xxp.home.fragment.AccessPersonFragment;
|
|
import xn.xxp.home.fragment.AccessPersonFragment;
|
|
import xn.xxp.home.fragment.DutyPersonFragment;
|
|
import xn.xxp.home.fragment.DutyPersonFragment;
|
|
import xn.xxp.home.lab_info.LabDescActivity;
|
|
import xn.xxp.home.lab_info.LabDescActivity;
|
|
|
|
+import xn.xxp.home.setting.SettingActivity;
|
|
import xn.xxp.home.window.WindowFragment;
|
|
import xn.xxp.home.window.WindowFragment;
|
|
import xn.xxp.mqtt.MqttManager;
|
|
import xn.xxp.mqtt.MqttManager;
|
|
import xn.xxp.mqtt.event.BulletinBoardEvent;
|
|
import xn.xxp.mqtt.event.BulletinBoardEvent;
|
|
@@ -390,18 +391,26 @@ public class HomeActivity extends BaseCountDownActivity<ActivityHomeBinding> imp
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
public void onLabInfoEvent(LabInfoEvent event) {
|
|
public void onLabInfoEvent(LabInfoEvent event) {
|
|
if (!TextUtils.isEmpty(event.getMessage())) {
|
|
if (!TextUtils.isEmpty(event.getMessage())) {
|
|
- ActivityUtils.finishToActivity(HomeActivity.class, false);
|
|
|
|
showLoading("实验室信息更改,即将重新初始化!");
|
|
showLoading("实验室信息更改,即将重新初始化!");
|
|
- ThreadUtils.runOnUiThreadDelayed(new Runnable() {
|
|
|
|
|
|
+ ThreadUtils.executeByCached(new ThreadUtils.SimpleTask<Object>() {
|
|
|
|
+ @Override
|
|
|
|
+ public Object doInBackground() throws Throwable {
|
|
|
|
+ InitTool.INSTANCE.queryLabConfig(deviceConfig.getDevId());
|
|
|
|
+ InitTool.INSTANCE.queryLabInfo(LabApp.laboratory.subId, null);
|
|
|
|
+ deviceConfig = deviceConfigDao.getDeviceConfig();
|
|
|
|
+ labConfig = labConfigDao.getLabConfig();
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
- public void run() {
|
|
|
|
|
|
+ public void onSuccess(Object result) {
|
|
dismissLoading();
|
|
dismissLoading();
|
|
- ActivityUtils.finishToActivity(InitActivity.class, false);
|
|
|
|
}
|
|
}
|
|
- }, 3000);
|
|
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
public void onOnlineUserEvent(OnlineUserEvent event) {
|
|
public void onOnlineUserEvent(OnlineUserEvent event) {
|
|
help.queryPerson();
|
|
help.queryPerson();
|