|
@@ -410,6 +410,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
*/
|
|
|
private long callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 30000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);//默认30秒
|
|
|
|
|
|
+ //床位是否入住
|
|
|
+ private boolean isEmptyInfo = true;
|
|
|
|
|
|
/**
|
|
|
* 时间线程
|
|
@@ -977,7 +979,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
});
|
|
|
} else {
|
|
|
LogUtil.d("getMainData", "setWelcomeView==succeed==");
|
|
|
- setWelcomeView();
|
|
|
+ //setWelcomeView();
|
|
|
+ setDefaultMainView();
|
|
|
dismissNurseBrightness();
|
|
|
}
|
|
|
}
|
|
@@ -1096,12 +1099,22 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
vWelcome.setVisibility(View.VISIBLE);
|
|
|
}
|
|
|
|
|
|
+ private void setDefaultMainView() {
|
|
|
+ isEmptyInfo = true;
|
|
|
+ setTitle();
|
|
|
+ vMain.setVisibility(View.VISIBLE);
|
|
|
+ if (initDataEntity != null) {
|
|
|
+ tvBedNum.setText(initDataEntity.getDeviceBedNum());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 更新主界面UI
|
|
|
*/
|
|
|
private void setMainView() {
|
|
|
if (null != mainDataEntity) {
|
|
|
//关闭欢迎界面
|
|
|
+ isEmptyInfo = false;
|
|
|
vWelcome.setVisibility(View.GONE);
|
|
|
vMain.setVisibility(View.VISIBLE);
|
|
|
|
|
@@ -1376,9 +1389,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (null != vWelcome) {
|
|
|
+ if (!isEmptyInfo /*null != vWelcome*/) {
|
|
|
//只有在欢迎界面没有显示的时候串口才能用
|
|
|
- if (vWelcome.getVisibility() == View.GONE) {
|
|
|
+ //if (vWelcome.getVisibility() == View.GONE) {
|
|
|
//医嘱键短按松开
|
|
|
if (buffer[0] == 1) {
|
|
|
CallingBedActivity.this.runOnUiThread(new Runnable() {
|
|
@@ -1549,8 +1562,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- }
|
|
|
+ //}
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2332,9 +2344,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
@Override
|
|
|
public void onStatusVvsipCallEvent(VvsipCall call) {
|
|
|
LogUtil.d("QQWW", "onStatusVvsipCallEvent----call.mState:==" + call.mState + call.isIncomingCall());
|
|
|
- if (!isVisible(vWelcome)) {
|
|
|
+ //if (!isVisible(vWelcome)) {
|
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
|
- }
|
|
|
+ //}
|
|
|
switch (call.mState) {
|
|
|
case 0://正在呼叫中:子机自动接通 isIncomingCall() = true mState = 0 //正在通话中:isIncomingCall() = true
|
|
|
//通话中关闭广播
|
|
@@ -2492,7 +2504,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
protected void comeBackMainPage() {
|
|
|
timeOfBackMainPage++;
|
|
|
timeOut--;
|
|
|
- if (!isVisible(vMain) && timeOfBackMainPage >= callTimeOutBack && !CALL_STATUS.equals(Constants.IN_CALLING) && !isVisible(vWelcome)) {
|
|
|
+ if (!isVisible(vMain) && timeOfBackMainPage >= callTimeOutBack && !CALL_STATUS.equals(Constants.IN_CALLING) &&!isEmptyInfo /*!isVisible(vWelcome)*/) {
|
|
|
// if (callNurse) {//超时自动取消呼叫了,20191118 之前是长按取消呼叫,后来又改成了根据UI的改变来取消,说让客户一目了然
|
|
|
// callNurse = false;
|
|
|
// UdpSendUtil.sendHangUp(initDataEntity, mainDataEntity);//取消呼叫 add by waderson 20191118
|
|
@@ -2531,7 +2543,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
* 自动拉起护理项加长页面
|
|
|
*/
|
|
|
protected void callLongNursePage(String second) {
|
|
|
- if (!isVisible(vWelcome) && !CALL_STATUS.equals(Constants.IN_CALLING)) {
|
|
|
+ if (!isEmptyInfo /*!isVisible(vWelcome)*/ && !CALL_STATUS.equals(Constants.IN_CALLING)) {
|
|
|
|
|
|
if ("0".equals(second) || "30".equals(second)) {//一分钟跳4次
|
|
|
if (isVisible(vMain) && !isVisible(vMain_big)) {
|