|
@@ -27,6 +27,7 @@ import com.wdkl.callingmainnurse.entity.NurseHostListInfo;
|
|
|
import com.wdkl.callingmainnurse.entity.UdpEntity;
|
|
|
import com.wdkl.callingmainnurse.ui.activity.MainFragmentActivity;
|
|
|
import com.wdkl.callingmainnurse.util.AnalysisUdpUtil;
|
|
|
+import com.wdkl.callingmainnurse.util.AutoRebootUtil;
|
|
|
import com.wdkl.callingmainnurse.util.LogUtil;
|
|
|
import com.wdkl.callingmainnurse.util.NetUtil;
|
|
|
import com.wdkl.callingmainnurse.util.SharedPreferencesUtil;
|
|
@@ -519,6 +520,7 @@ public class TrusteeshipFragment extends BaseFragment implements TrusteeshipAdap
|
|
|
// tvQuestTp.setText("托管状态:取消不成功,被托管设备未连接网络");
|
|
|
mCountDownAutoTimerInterrupt = null;
|
|
|
EventBus.getDefault().post(new MessageEvent(TRUST_FLAG_VALUE, Constants.EVENT_FRAGMENT_TRUST));
|
|
|
+ AutoRebootUtil.reboot();
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -580,6 +582,7 @@ public class TrusteeshipFragment extends BaseFragment implements TrusteeshipAdap
|
|
|
public void onFinish() {
|
|
|
tvQuestTp.setText("设备正在重启中...");
|
|
|
mAutoRestartTimer = null;
|
|
|
+ AutoRebootUtil.reboot();
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -699,11 +702,11 @@ public class TrusteeshipFragment extends BaseFragment implements TrusteeshipAdap
|
|
|
mToastH.postDelayed(auto, 50);
|
|
|
|
|
|
// LogUtil.d("SSS", "本机收到原主机设备撤销托管要求" + "开启取消托管任务:自动重启倒计时:11111111111111");
|
|
|
+ break;
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
- if (!initdataentity.getId().equals((mUdpEntityInfo).getDoorwayMachineID()))//
|
|
|
- break;
|
|
|
+ //if (!initdataentity.getId().equals((mUdpEntityInfo).getDoorwayMachineID()))//
|
|
|
+ // break;
|
|
|
LogUtil.d("托管", "主机二:接收主机一的取消托管请求");
|
|
|
showTrust("1");
|
|
|
LogUtil.d("托管", "跳过");
|
|
@@ -780,6 +783,7 @@ public class TrusteeshipFragment extends BaseFragment implements TrusteeshipAdap
|
|
|
tvNurseHostNoeds.setText("托管状态:" + "本机已完成:托管请求 " + mTrustedDeciveName != null ? mTrustedDeciveName + "正在托管中..." : "");
|
|
|
ivCancel.setEnabled(true);
|
|
|
ivCancel.setImageResource(R.mipmap.ic_trusteeship_cancel);
|
|
|
+ AutoRebootUtil.reboot();
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -888,8 +892,8 @@ public class TrusteeshipFragment extends BaseFragment implements TrusteeshipAdap
|
|
|
UIUtils.isOpen = true;
|
|
|
AnalysisUdpUtil.isOpen = true;
|
|
|
// Toast.makeText(getActivity(), "托管不成功,无门口机、子机设备", Toast.LENGTH_LONG).show();
|
|
|
- tvQuestTp.setText("托管不成功,无门口机、子机设备");
|
|
|
- UdpSendUtil.sendDeposit4ConnectFail(initdataentity.getId(), mUdpEntityInfo.getNurseHostID(), "托管不成功,无门口机、子机设备");
|
|
|
+ //tvQuestTp.setText("托管不成功,无门口机、子机设备");
|
|
|
+ //UdpSendUtil.sendDeposit4ConnectFail(initdataentity.getId(), mUdpEntityInfo.getNurseHostID(), "托管不成功,无门口机、子机设备");
|
|
|
if (mCountDownAutoTimer != null) {
|
|
|
mCountDownAutoTimer.cancel();
|
|
|
mCountDownAutoTimer = null;
|
|
@@ -898,6 +902,19 @@ public class TrusteeshipFragment extends BaseFragment implements TrusteeshipAdap
|
|
|
mCountDownCancleTimer.cancel();
|
|
|
mCountDownCancleTimer = null;
|
|
|
}
|
|
|
+
|
|
|
+ //reboot device
|
|
|
+ Runnable auto = new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ autoRestart("本机收到原主机设备撤销托管要求" + "开启取消托管任务:自动重启倒计时:");
|
|
|
+ }
|
|
|
+ };
|
|
|
+ if (mToastH == null) {
|
|
|
+ mToastH = new Handler();
|
|
|
+ }
|
|
|
+ mToastH.postDelayed(auto, 50);
|
|
|
+
|
|
|
} else {
|
|
|
if (jsonObj.getString("Code").equals("OK!")) {
|
|
|
// String data = jsonObj.getString("hostList");//
|