|
@@ -25,6 +25,7 @@ import android.support.design.widget.Snackbar;
|
|
import android.support.v4.content.ContextCompat;
|
|
import android.support.v4.content.ContextCompat;
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.view.Gravity;
|
|
import android.view.Gravity;
|
|
|
|
+import android.view.MotionEvent;
|
|
import android.view.View;
|
|
import android.view.View;
|
|
import android.view.animation.Animation;
|
|
import android.view.animation.Animation;
|
|
import android.view.animation.AnimationUtils;
|
|
import android.view.animation.AnimationUtils;
|
|
@@ -127,7 +128,7 @@ import static com.wdkl.callingbed2.util.sendcommand.CallingBedSendCommand.setWSH
|
|
*/
|
|
*/
|
|
|
|
|
|
public class CallingBedActivity extends BaseActivity implements ISerialPortBedOnclickEvent, IMediaPlayerVolume, IVvsipServiceListener
|
|
public class CallingBedActivity extends BaseActivity implements ISerialPortBedOnclickEvent, IMediaPlayerVolume, IVvsipServiceListener
|
|
- , SipCallBackI, MediaPlayerManger.PlayMusicCompleteListener {
|
|
|
|
|
|
+ , SipCallBackI, MediaPlayerManger.PlayMusicCompleteListener, View.OnClickListener {
|
|
|
|
|
|
//初始化数据实体
|
|
//初始化数据实体
|
|
private InitDataEntity initDataEntity;
|
|
private InitDataEntity initDataEntity;
|
|
@@ -184,9 +185,17 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
@Bind(R.id.activity_calling_bed_layout_rl_main)
|
|
@Bind(R.id.activity_calling_bed_layout_rl_main)
|
|
RelativeLayout rlMain;
|
|
RelativeLayout rlMain;
|
|
- @Bind(R.id.activity_calling_bed_layout_rl_right)
|
|
|
|
|
|
+ //右侧侧滑栏layout
|
|
|
|
+ @Bind(R.id.bed_layout_ll_right_view)
|
|
LinearLayout llRight;
|
|
LinearLayout llRight;
|
|
|
|
|
|
|
|
+ @Bind(R.id.activity_calling_bed_layout_ll_right)
|
|
|
|
+ LinearLayout llRightMain;
|
|
|
|
+ @Bind(R.id.rl_view_doctor_layout)
|
|
|
|
+ RelativeLayout rlViewDoctor;
|
|
|
|
+ @Bind(R.id.rl_view_cost_layout)
|
|
|
|
+ RelativeLayout rlViewCost;
|
|
|
|
+
|
|
//状态栏
|
|
//状态栏
|
|
@Bind(R.id.activity_calling_bed_layout_title)
|
|
@Bind(R.id.activity_calling_bed_layout_title)
|
|
View vTitle;
|
|
View vTitle;
|
|
@@ -210,13 +219,13 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
@Bind(R.id.activity_calling_bed_layout_main)
|
|
@Bind(R.id.activity_calling_bed_layout_main)
|
|
View vMain;
|
|
View vMain;
|
|
@Bind(R.id.activity_calling_bed_layout_doctor)
|
|
@Bind(R.id.activity_calling_bed_layout_doctor)
|
|
- RelativeLayout vDoctor;
|
|
|
|
|
|
+ RelativeLayout vDoctor; //医嘱
|
|
@Bind(R.id.activity_calling_bed_layout_cost)
|
|
@Bind(R.id.activity_calling_bed_layout_cost)
|
|
- View vCost;
|
|
|
|
- @Bind(R.id.activity_calling_bed_layout_qr_code)
|
|
|
|
- View vQrCode;
|
|
|
|
|
|
+ View vCost; //费用
|
|
|
|
+ //@Bind(R.id.activity_calling_bed_layout_qr_code)
|
|
|
|
+ //View vQrCode; //二维码
|
|
@Bind(R.id.activity_calling_bed_layout_support)
|
|
@Bind(R.id.activity_calling_bed_layout_support)
|
|
- View vSupport;
|
|
|
|
|
|
+ View vSupport; //请求增援
|
|
@Bind(R.id.activity_calling_bed_layout_call)
|
|
@Bind(R.id.activity_calling_bed_layout_call)
|
|
View vCall;
|
|
View vCall;
|
|
@Bind(R.id.activity_calling_bed_layout_nurse)
|
|
@Bind(R.id.activity_calling_bed_layout_nurse)
|
|
@@ -228,27 +237,37 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
@Bind(R.id.view_qr_code_layout_qr_code)
|
|
@Bind(R.id.view_qr_code_layout_qr_code)
|
|
ImageView qrBarcodeImg;
|
|
ImageView qrBarcodeImg;
|
|
- //侧滑栏的text
|
|
|
|
- @Bind(R.id.activity_calling_bed_layout_tv_doctor_text)
|
|
|
|
- TextView tvDoctor;
|
|
|
|
-
|
|
|
|
- @Bind(R.id.activity_calling_bed_layout_tv_version)
|
|
|
|
- TextView tvVersion;
|
|
|
|
|
|
|
|
- @Bind(R.id.activity_calling_bed_layout_tv_cost_text)
|
|
|
|
|
|
+ //侧滑栏view
|
|
|
|
+ @Bind(R.id.right_ll_main_item)
|
|
|
|
+ LinearLayout llMainItem;
|
|
|
|
+ @Bind(R.id.right_tv_main_text)
|
|
|
|
+ TextView tvMain;
|
|
|
|
+ @Bind(R.id.right_ll_advice_item)
|
|
|
|
+ LinearLayout llAdviceItem;
|
|
|
|
+ @Bind(R.id.right_tv_medical_advice_text)
|
|
|
|
+ TextView tvAdvice;
|
|
|
|
+ @Bind(R.id.right_ll_cost_item)
|
|
|
|
+ LinearLayout llCostItem;
|
|
|
|
+ @Bind(R.id.right_tv_cost_text)
|
|
TextView tvCost;
|
|
TextView tvCost;
|
|
- @Bind(R.id.activity_calling_bed_layout_tv_qr_code_text)
|
|
|
|
- TextView tvQrCode;
|
|
|
|
- @Bind(R.id.activity_calling_bed_layout_tv_support_text)
|
|
|
|
|
|
+ @Bind(R.id.right_ll_call_care_item)
|
|
|
|
+ LinearLayout llCallCareItem;
|
|
|
|
+ @Bind(R.id.right_tv_call_care_text)
|
|
|
|
+ TextView tvCallCare;
|
|
|
|
+ @Bind(R.id.right_ll_support_item)
|
|
|
|
+ LinearLayout llSupportItem;
|
|
|
|
+ @Bind(R.id.right_tv_support_text)
|
|
TextView tvSupport;
|
|
TextView tvSupport;
|
|
- @Bind(R.id.activity_calling_bed_layout_tv_call_text)
|
|
|
|
- TextView tvCall;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_broadcasting)
|
|
|
|
- MarqueeText tvBroadcasting;
|
|
|
|
|
|
+ @Bind(R.id.right_ll_settings_item)
|
|
|
|
+ LinearLayout llSettingsItem;
|
|
|
|
+ @Bind(R.id.right_tv_settings_text)
|
|
|
|
+ TextView tvSettings;
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
/*主界面id*/
|
|
/*主界面id*/
|
|
- //侧滑栏
|
|
|
|
|
|
+ //左侧护理项
|
|
@Bind(R.id.view_main_layout_left_one_title)
|
|
@Bind(R.id.view_main_layout_left_one_title)
|
|
TextView tvLeftOneTitle;
|
|
TextView tvLeftOneTitle;
|
|
@Bind(R.id.view_main_layout_left_one_content)
|
|
@Bind(R.id.view_main_layout_left_one_content)
|
|
@@ -270,31 +289,24 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
@Bind(R.id.view_main_layout_left_five_content)
|
|
@Bind(R.id.view_main_layout_left_five_content)
|
|
TextView tvLeftFiveContent;
|
|
TextView tvLeftFiveContent;
|
|
|
|
|
|
- @Bind(R.id.view_main_layout_tv_bed_num)
|
|
|
|
|
|
+ //中间床位信息
|
|
|
|
+ @Bind(R.id.view_main_layout_tv_bed_number)
|
|
TextView tvBedNum;
|
|
TextView tvBedNum;
|
|
- @Bind(R.id.view_main_layout_tv_name)
|
|
|
|
- TextView tvName;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_detail)
|
|
|
|
- TextView tvDetail;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_illness)
|
|
|
|
- TextView tvIllness;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_admission)
|
|
|
|
- TextView tvAdmission;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_doctor_name)
|
|
|
|
|
|
+ @Bind(R.id.view_main_layout_iv_bed_qr_code)
|
|
|
|
+ ImageView ivTwoDimensionalCode;
|
|
|
|
+ @Bind(R.id.view_main_layout_tv_duty_doctor)
|
|
TextView tvDoctorName;
|
|
TextView tvDoctorName;
|
|
- @Bind(R.id.view_main_layout_tv_nurse_name)
|
|
|
|
|
|
+ @Bind(R.id.view_main_layout_tv_duty_nurse)
|
|
TextView tvNurseName;
|
|
TextView tvNurseName;
|
|
- @Bind(R.id.view_main_layout_tv_hosp_number)
|
|
|
|
- TextView tvHospNumber;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_hosp_data)
|
|
|
|
- TextView tvHospData;
|
|
|
|
- @Bind(R.id.view_main_layout_iv_doctor)
|
|
|
|
- ImageView ivDoctor;
|
|
|
|
- @Bind(R.id.view_main_layout_iv_nurse)
|
|
|
|
- ImageView ivNurse;
|
|
|
|
-
|
|
|
|
- @Bind(R.id.view_main_layout_img_two_dimensional_code)
|
|
|
|
- ImageView ivTwoDimensionalCode;
|
|
|
|
|
|
+
|
|
|
|
+ //右侧患者信息
|
|
|
|
+ @Bind(R.id.view_main_layout_tv_patient_name)
|
|
|
|
+ TextView tvName;
|
|
|
|
+ @Bind(R.id.view_main_layout_tv_age_gender)
|
|
|
|
+ TextView tvAgeGender;
|
|
|
|
+ @Bind(R.id.activity_calling_bed_layout_tv_illness)
|
|
|
|
+ TextView tvIllness;
|
|
|
|
+
|
|
|
|
|
|
//医嘱界面
|
|
//医嘱界面
|
|
@Bind(R.id.view_doctor_tv_name)
|
|
@Bind(R.id.view_doctor_tv_name)
|
|
@@ -338,39 +350,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
@Bind(R.id.view_nurse_layout_tv_call_timeout)
|
|
@Bind(R.id.view_nurse_layout_tv_call_timeout)
|
|
TextView tvNurseTimeOut;
|
|
TextView tvNurseTimeOut;
|
|
|
|
|
|
- //侧滑栏(增长页面)
|
|
|
|
- @Bind(R.id.view_main_layout_left_one_title_big)
|
|
|
|
- TextView tvLeftOneTitle_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_one_content_big)
|
|
|
|
- MarqueeText tvLeftOneContent_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_two_title_big)
|
|
|
|
- TextView tvLeftTwoTitle_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_two_content_big)
|
|
|
|
- MarqueeText tvLeftTwoContent_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_three_title_big)
|
|
|
|
- TextView tvLeftThreeTitle_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_three_content_big)
|
|
|
|
- MarqueeText tvLeftThreeContent_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_four_title_big)
|
|
|
|
- TextView tvLeftFourTitle_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_four_content_big)
|
|
|
|
- MarqueeText tvLeftFourContent_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_five_title_big)
|
|
|
|
- TextView tvLeftFiveTitle_big;
|
|
|
|
- @Bind(R.id.view_main_layout_left_five_content_big)
|
|
|
|
- MarqueeText tvLeftFiveContent_big;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_illness_big)
|
|
|
|
- TextView tvIllness_big;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_detail_big)
|
|
|
|
- TextView tvDetail_big;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_bed_num_big)
|
|
|
|
- MarqueeText tvBedNum_big;
|
|
|
|
- @Bind(R.id.view_main_layout_tv_name_big)
|
|
|
|
- MarqueeText tvName_big;
|
|
|
|
-
|
|
|
|
- private RelativeLayout rlBottomMessage;
|
|
|
|
private ImageView ivWelcome;
|
|
private ImageView ivWelcome;
|
|
- private MyTextView tvNoticeContent;
|
|
|
|
|
|
+ private MyTextView tvMessage;
|
|
// 语音播报
|
|
// 语音播报
|
|
private TextToSpeech textToSpeech;
|
|
private TextToSpeech textToSpeech;
|
|
//开启的线程
|
|
//开启的线程
|
|
@@ -400,6 +381,12 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
*/
|
|
*/
|
|
private long callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);//默认30秒
|
|
private long callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);//默认30秒
|
|
|
|
|
|
|
|
+ //触摸移动坐标
|
|
|
|
+ float downX;
|
|
|
|
+ float downY;
|
|
|
|
+ float moveX;
|
|
|
|
+ float moveY;
|
|
|
|
+ long currentMS;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 时间线程
|
|
* 时间线程
|
|
@@ -546,14 +533,30 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
super.onCreate(savedInstanceState);
|
|
//初始化view
|
|
//初始化view
|
|
- allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vQrCode, vSupport, vCall, vNurse));
|
|
|
|
|
|
+ allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vSupport, vCall, vNurse));
|
|
initReceive();
|
|
initReceive();
|
|
|
|
+ setListeners();
|
|
|
|
|
|
//20190415 waderson 测试
|
|
//20190415 waderson 测试
|
|
ScreenManagerUtil.setScreenBrightness(context, 210);
|
|
ScreenManagerUtil.setScreenBrightness(context, 210);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void setListeners() {
|
|
|
|
+ llMainItem.setOnClickListener(this);
|
|
|
|
+
|
|
|
|
+ llMainItem.setOnClickListener(this);
|
|
|
|
+ llAdviceItem.setOnClickListener(this);
|
|
|
|
+ llCostItem.setOnClickListener(this);
|
|
|
|
+ llCallCareItem.setOnClickListener(this);
|
|
|
|
+ llSupportItem.setOnClickListener(this);
|
|
|
|
+ llSettingsItem.setOnClickListener(this);
|
|
|
|
+
|
|
|
|
+ llRightMain.setOnClickListener(this);
|
|
|
|
+ rlViewDoctor.setOnClickListener(this);
|
|
|
|
+ rlViewCost.setOnClickListener(this);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public int getLayoutId() {
|
|
public int getLayoutId() {
|
|
//SIP准备工作
|
|
//SIP准备工作
|
|
@@ -565,9 +568,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
protected void initView() {
|
|
protected void initView() {
|
|
//更新include 的ui bind 不到
|
|
//更新include 的ui bind 不到
|
|
/*******************************************************/
|
|
/*******************************************************/
|
|
- rlBottomMessage = vMain.findViewById(R.id.view_main_layout_rl_message);
|
|
|
|
ivWelcome = vWelcome.findViewById(R.id.view_welcome_iv_main);
|
|
ivWelcome = vWelcome.findViewById(R.id.view_welcome_iv_main);
|
|
- tvNoticeContent = vMain.findViewById(R.id.view_main_layout_tv_msg);
|
|
|
|
|
|
+ tvMessage = vMain.findViewById(R.id.activity_calling_bed_layout_tv_message);
|
|
/*******************************************************/
|
|
/*******************************************************/
|
|
|
|
|
|
timeThread = new TimeThread();
|
|
timeThread = new TimeThread();
|
|
@@ -613,10 +615,80 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
costArrayList = new ArrayList<>();
|
|
costArrayList = new ArrayList<>();
|
|
costAdapter = new CostAdapter(costArrayList);
|
|
costAdapter = new CostAdapter(costArrayList);
|
|
rvCost.setLayoutManager(new FullyLinearLayoutManager(this));
|
|
rvCost.setLayoutManager(new FullyLinearLayoutManager(this));
|
|
|
|
+ rvCost.setOnTouchListener(new View.OnTouchListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public boolean onTouch(View v, MotionEvent event) {
|
|
|
|
+ //重置回到主界面倒计时
|
|
|
|
+ timeOfBackMainPage = 0;
|
|
|
|
+ timeOut = callTimeOutBack;
|
|
|
|
+ switch (event.getAction()) {
|
|
|
|
+ case MotionEvent.ACTION_DOWN:
|
|
|
|
+ //float DownX
|
|
|
|
+ downX = event.getX();
|
|
|
|
+ //float DownY
|
|
|
|
+ downY = event.getY();
|
|
|
|
+ moveX = 0;
|
|
|
|
+ moveY = 0;
|
|
|
|
+ //long currentMS 获取系统时间
|
|
|
|
+ currentMS = System.currentTimeMillis();
|
|
|
|
+ break;
|
|
|
|
+ case MotionEvent.ACTION_MOVE:
|
|
|
|
+ moveX += Math.abs(event.getX() - downX);//X轴距离
|
|
|
|
+ moveY += Math.abs(event.getY() - downY);//y轴距离
|
|
|
|
+ downX = event.getX();
|
|
|
|
+ downY = event.getY();
|
|
|
|
+ break;
|
|
|
|
+ case MotionEvent.ACTION_UP:
|
|
|
|
+ long moveTime = System.currentTimeMillis() - currentMS;//移动时间
|
|
|
|
+ //判断点击还是滑动
|
|
|
|
+ if (moveTime < 100 || (moveX < 30 && moveY < 30)) {
|
|
|
|
+ rlViewCost.performClick();
|
|
|
|
+ return true; //不再执行后面的事件
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
doctorChargeArrayList = new ArrayList<>();
|
|
doctorChargeArrayList = new ArrayList<>();
|
|
doctorAdapter = new DoctorAdapter(doctorChargeArrayList);
|
|
doctorAdapter = new DoctorAdapter(doctorChargeArrayList);
|
|
rvDoctor.setLayoutManager(new FullyLinearLayoutManager(this));
|
|
rvDoctor.setLayoutManager(new FullyLinearLayoutManager(this));
|
|
|
|
+ rvDoctor.setOnTouchListener(new View.OnTouchListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public boolean onTouch(View v, MotionEvent event) {
|
|
|
|
+ //重置回到主界面倒计时
|
|
|
|
+ timeOfBackMainPage = 0;
|
|
|
|
+ timeOut = callTimeOutBack;
|
|
|
|
+ switch (event.getAction()) {
|
|
|
|
+ case MotionEvent.ACTION_DOWN:
|
|
|
|
+ //float DownX
|
|
|
|
+ downX = event.getX();
|
|
|
|
+ //float DownY
|
|
|
|
+ downY = event.getY();
|
|
|
|
+ moveX = 0;
|
|
|
|
+ moveY = 0;
|
|
|
|
+ //long currentMS 获取系统时间
|
|
|
|
+ currentMS = System.currentTimeMillis();
|
|
|
|
+ break;
|
|
|
|
+ case MotionEvent.ACTION_MOVE:
|
|
|
|
+ moveX += Math.abs(event.getX() - downX);//X轴距离
|
|
|
|
+ moveY += Math.abs(event.getY() - downY);//y轴距离
|
|
|
|
+ downX = event.getX();
|
|
|
|
+ downY = event.getY();
|
|
|
|
+ break;
|
|
|
|
+ case MotionEvent.ACTION_UP:
|
|
|
|
+ long moveTime = System.currentTimeMillis() - currentMS;//移动时间
|
|
|
|
+ //判断点击还是滑动
|
|
|
|
+ if (moveTime < 100 || (moveX < 30 && moveY < 30)) {
|
|
|
|
+ rlViewDoctor.performClick();
|
|
|
|
+ return true; //不再执行后面的事件
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
noticeArrayList = new ArrayList<>();
|
|
noticeArrayList = new ArrayList<>();
|
|
|
|
|
|
@@ -1046,11 +1118,6 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
//显示未托管图标
|
|
//显示未托管图标
|
|
ivTrust.setImageResource(R.mipmap.ic_calling_sickbed_bed_wrong_trusteeship);
|
|
ivTrust.setImageResource(R.mipmap.ic_calling_sickbed_bed_wrong_trusteeship);
|
|
}
|
|
}
|
|
- try {
|
|
|
|
- tvVersion.setText("V" + this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName);
|
|
|
|
- } catch (PackageManager.NameNotFoundException e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1072,9 +1139,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
vWelcome.setVisibility(View.GONE);
|
|
vWelcome.setVisibility(View.GONE);
|
|
vMain.setVisibility(View.VISIBLE);
|
|
vMain.setVisibility(View.VISIBLE);
|
|
|
|
|
|
- // Bitmap logoBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.erlogo);
|
|
|
|
- //ivTwoDimensionalCode.setImageBitmap(TwoDimensionCodeUtil.CreatePicture(Constants.TWO_DIMENSION_CODE_PATH + SerialPortUtil.KEY_ID, 200, 200, logoBitmap, true));
|
|
|
|
-
|
|
|
|
|
|
+ //左侧护理项
|
|
tvLeftOneTitle.setText(mainDataEntity.getLeftOneTitle());
|
|
tvLeftOneTitle.setText(mainDataEntity.getLeftOneTitle());
|
|
tvLeftOneContent.setText(mainDataEntity.getLeftOneContent());
|
|
tvLeftOneContent.setText(mainDataEntity.getLeftOneContent());
|
|
|
|
|
|
@@ -1089,92 +1154,40 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
tvLeftFiveTitle.setText(mainDataEntity.getLeftFiveTitle());
|
|
tvLeftFiveTitle.setText(mainDataEntity.getLeftFiveTitle());
|
|
tvLeftFiveContent.setText(mainDataEntity.getLeftFiveContent());
|
|
tvLeftFiveContent.setText(mainDataEntity.getLeftFiveContent());
|
|
- //增长页面 祁阳人民医院提的(201901017 Waderson)
|
|
|
|
- tvLeftOneTitle_big.setText(mainDataEntity.getLeftOneTitle());
|
|
|
|
- tvLeftOneContent_big.setText(mainDataEntity.getLeftOneContent());
|
|
|
|
-
|
|
|
|
- tvLeftTwoTitle_big.setText(mainDataEntity.getLeftTwoTitle());
|
|
|
|
- tvLeftTwoContent_big.setText(mainDataEntity.getLeftTwoContent());
|
|
|
|
|
|
|
|
- tvLeftThreeTitle_big.setText(mainDataEntity.getLeftThreeTitle());
|
|
|
|
- tvLeftThreeContent_big.setText(mainDataEntity.getLeftThreeContent());
|
|
|
|
|
|
+ //床位号
|
|
|
|
+ if (null != initDataEntity) {
|
|
|
|
+ tvBedNum.setText(initDataEntity.getDeviceBedNum());
|
|
|
|
+ }
|
|
|
|
|
|
- tvLeftFourTitle_big.setText(mainDataEntity.getLeftFourTitle());
|
|
|
|
- tvLeftFourContent_big.setText(mainDataEntity.getLeftFourContent());
|
|
|
|
|
|
+ //二维码
|
|
|
|
+ Bitmap logoBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.erlogo);
|
|
|
|
+ ivTwoDimensionalCode.setImageBitmap(TwoDimensionCodeUtil.CreatePicture(Constants.TWO_DIMENSION_CODE_PATH + SerialPortUtil.KEY_ID, 200, 200, logoBitmap, true));
|
|
|
|
|
|
- tvLeftFiveTitle_big.setText(mainDataEntity.getLeftFiveTitle());
|
|
|
|
- tvLeftFiveContent_big.setText(mainDataEntity.getLeftFiveContent());
|
|
|
|
|
|
+ //值班医生和护士
|
|
|
|
+ tvDoctorName.setText("值班医生: " + mainDataEntity.getResponsDoctor());
|
|
|
|
+ tvNurseName.setText("值班护士: " + mainDataEntity.getResponsNurse());
|
|
|
|
|
|
|
|
+ //患者姓名
|
|
String name = mainDataEntity.getName();
|
|
String name = mainDataEntity.getName();
|
|
if (StringUtils.notEmpty(name)) {
|
|
if (StringUtils.notEmpty(name)) {
|
|
if (name.length() >= 4) {
|
|
if (name.length() >= 4) {
|
|
tvName.setTextSize(69);
|
|
tvName.setTextSize(69);
|
|
tvName.setText(name);
|
|
tvName.setText(name);
|
|
- tvName_big.setTextSize(60);//50
|
|
|
|
- tvName_big.setText(name);
|
|
|
|
} else {
|
|
} else {
|
|
tvName.setTextSize(95);
|
|
tvName.setTextSize(95);
|
|
tvName.setText(name);
|
|
tvName.setText(name);
|
|
- tvName_big.setTextSize(65);//55
|
|
|
|
- tvName_big.setText(name);
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- tvName.setText("");
|
|
|
|
- tvName_big.setText("");
|
|
|
|
|
|
+ tvName.setText("---");
|
|
}
|
|
}
|
|
|
|
|
|
- tvDetail.setText("[ " + mainDataEntity.getSex() + " ]");//"【"+mainDataEntity.getSex()+"】"
|
|
|
|
- tvDetail_big.setText("[ " + mainDataEntity.getSex() + " ]");//"【"+mainDataEntity.getSex()+"】"
|
|
|
|
-
|
|
|
|
- tvIllness.setText(mainDataEntity.getAgeNum() + "" + mainDataEntity.getAgeUnit());
|
|
|
|
- tvIllness_big.setText(mainDataEntity.getAgeNum() + "" + mainDataEntity.getAgeUnit());
|
|
|
|
-
|
|
|
|
- tvHospNumber.setText("入院:" + mainDataEntity.getInpatientNum());
|
|
|
|
|
|
+ //患者性别和年龄
|
|
|
|
+ String ageGender = "【" + mainDataEntity.getSex() + " " + mainDataEntity.getAgeNum() + mainDataEntity.getAgeUnit() + "】";
|
|
|
|
+ tvAgeGender.setText(ageGender);
|
|
|
|
|
|
- tvHospData.setText(mainDataEntity.getAdmissionTime());
|
|
|
|
-
|
|
|
|
- tvDoctorName.setText(mainDataEntity.getResponsDoctor());
|
|
|
|
-
|
|
|
|
- tvNurseName.setText(mainDataEntity.getResponsNurse());
|
|
|
|
-
|
|
|
|
- if (null != initDataEntity) {
|
|
|
|
- tvBedNum.setText(initDataEntity.getDeviceBedNum());
|
|
|
|
- tvBedNum_big.setText(initDataEntity.getDeviceBedNum());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- Picasso.with(context).load(Constants.URL + Constants.URL_END + "/" + mainDataEntity.getResponsDoctorPic()).transform(new Transformation() {
|
|
|
|
- @Override
|
|
|
|
- public Bitmap transform(Bitmap source) {
|
|
|
|
- Bitmap bitmap = BitmapUtils.zoom(source, DensityUtils.dp2px(context, 62), DensityUtils.dp2px(context, 62));
|
|
|
|
- //圆形处理
|
|
|
|
- bitmap = BitmapUtils.circleBitmap(bitmap);
|
|
|
|
- //回收bitmap资源
|
|
|
|
- source.recycle();
|
|
|
|
- return bitmap;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public String key() {
|
|
|
|
- return "";//需要保证返回值不能为null。否则报错
|
|
|
|
- }
|
|
|
|
- }).fit().memoryPolicy(MemoryPolicy.NO_CACHE).networkPolicy(NetworkPolicy.NO_CACHE).into(ivDoctor);
|
|
|
|
-
|
|
|
|
- Picasso.with(context).load(Constants.URL + Constants.URL_END + "/" + mainDataEntity.getResponsNursePic()).transform(new Transformation() {
|
|
|
|
- @Override
|
|
|
|
- public Bitmap transform(Bitmap source) {
|
|
|
|
- Bitmap bitmap = BitmapUtils.zoom(source, DensityUtils.dp2px(context, 62), DensityUtils.dp2px(context, 62));
|
|
|
|
- //圆形处理
|
|
|
|
- bitmap = BitmapUtils.circleBitmap(bitmap);
|
|
|
|
- //回收bitmap资源
|
|
|
|
- source.recycle();
|
|
|
|
- return bitmap;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public String key() {
|
|
|
|
- return "";//需要保证返回值不能为null。否则报错
|
|
|
|
- }
|
|
|
|
- }).fit().memoryPolicy(MemoryPolicy.NO_CACHE).networkPolicy(NetworkPolicy.NO_CACHE).into(ivNurse);
|
|
|
|
|
|
+ //病情
|
|
|
|
+ tvIllness.setText(mainDataEntity.getIllness());
|
|
|
|
|
|
setTitle();
|
|
setTitle();
|
|
}
|
|
}
|
|
@@ -1189,7 +1202,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
for (int i = 0; i < noticeArrayList.size(); i++) {
|
|
for (int i = 0; i < noticeArrayList.size(); i++) {
|
|
strNotice += " 【" + (i + 1) + "】 " + noticeArrayList.get(i).getNoticeContent() + " " + noticeArrayList.get(i).getNoticeEndTime();
|
|
strNotice += " 【" + (i + 1) + "】 " + noticeArrayList.get(i).getNoticeContent() + " " + noticeArrayList.get(i).getNoticeEndTime();
|
|
}
|
|
}
|
|
- tvNoticeContent.setText(strNotice);
|
|
|
|
|
|
+ tvMessage.setText(strNotice);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1280,8 +1293,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
public void run() {
|
|
public void run() {
|
|
//=====================停止廣播==================//
|
|
//=====================停止廣播==================//
|
|
MediaPlayerManger.getInstance().stopMediaPlayer();
|
|
MediaPlayerManger.getInstance().stopMediaPlayer();
|
|
- tvBroadcasting.setText("");
|
|
|
|
- tvBroadcasting.setVisibility(View.INVISIBLE);
|
|
|
|
|
|
+ //tvBroadcasting.setText("");
|
|
|
|
+ //tvBroadcasting.setVisibility(View.INVISIBLE);
|
|
isCloseBroadcast = true;
|
|
isCloseBroadcast = true;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1339,7 +1352,10 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (null != vWelcome) {
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //7寸分机注释掉下面代码
|
|
|
|
+ /*if (null != vWelcome) {
|
|
//只有在欢迎界面没有显示的时候串口才能用
|
|
//只有在欢迎界面没有显示的时候串口才能用
|
|
if (vWelcome.getVisibility() == View.GONE) {
|
|
if (vWelcome.getVisibility() == View.GONE) {
|
|
//医嘱键短按松开
|
|
//医嘱键短按松开
|
|
@@ -1489,9 +1505,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
//呼叫超时倒计时开启
|
|
//呼叫超时倒计时开启
|
|
callTypeCallNurse = "2";
|
|
callTypeCallNurse = "2";
|
|
localMillsCallNurse = System.currentTimeMillis();
|
|
localMillsCallNurse = System.currentTimeMillis();
|
|
- } /*else {
|
|
|
|
|
|
+ } *//*else {
|
|
handsMICStatus = setHandsMIC(serialPortUtil, false);
|
|
handsMICStatus = setHandsMIC(serialPortUtil, false);
|
|
- }*/
|
|
|
|
|
|
+ }*//*
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -1512,7 +1528,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
}
|
|
}
|
|
|
|
|
|
//---------------------------------------------串口点击事件监听----------------------------------------------------------
|
|
//---------------------------------------------串口点击事件监听----------------------------------------------------------
|
|
@@ -1713,8 +1729,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
MediaPlayerManger.getInstance().setVolume(0);
|
|
MediaPlayerManger.getInstance().setVolume(0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- tvBroadcasting.setVisibility(View.VISIBLE);
|
|
|
|
- tvBroadcasting.setText("======广播中======");
|
|
|
|
|
|
+ //tvBroadcasting.setVisibility(View.VISIBLE);
|
|
|
|
+ //tvBroadcasting.setText("======广播中======");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
@@ -1723,8 +1739,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
case "broadcast_2":
|
|
case "broadcast_2":
|
|
try {
|
|
try {
|
|
MediaPlayerManger.getInstance().stopMediaPlayer();
|
|
MediaPlayerManger.getInstance().stopMediaPlayer();
|
|
- tvBroadcasting.setText("");
|
|
|
|
- tvBroadcasting.setVisibility(View.INVISIBLE);
|
|
|
|
|
|
+ //tvBroadcasting.setText("");
|
|
|
|
+ //tvBroadcasting.setVisibility(View.INVISIBLE);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
@@ -1893,64 +1909,56 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
//---------------------------------------------设置硬件参数部分(下)-----------------------------------------------------------------
|
|
//---------------------------------------------设置硬件参数部分(下)-----------------------------------------------------------------
|
|
//---------------------------------------------串口点击事件部分(上)---------------------------------------------------------------------
|
|
//---------------------------------------------串口点击事件部分(上)---------------------------------------------------------------------
|
|
|
|
+ //主页面
|
|
|
|
+ public void clickVMain() {
|
|
|
|
+ vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
|
|
+ timeOfBackMainPage = 0;
|
|
|
|
+ timeOut = callTimeOutBack;
|
|
|
|
+ if (isVisible(vMain)) {
|
|
|
|
+ goneLlRightView(true);
|
|
|
|
+ } else {
|
|
|
|
+ showThisView(vMain);
|
|
|
|
+ //changeTextColor(tvMain);
|
|
|
|
+ goneLlRightView(true);
|
|
|
|
+ if (null != initDataEntity) {
|
|
|
|
+ getMainData(1);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //医嘱页面
|
|
public void clickVDoctor() {
|
|
public void clickVDoctor() {
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
timeOfBackMainPage = 0;
|
|
timeOfBackMainPage = 0;
|
|
timeOut = callTimeOutBack;
|
|
timeOut = callTimeOutBack;
|
|
if (isVisible(vDoctor)) {
|
|
if (isVisible(vDoctor)) {
|
|
- showThisView(vMain);
|
|
|
|
goneLlRightView(true);
|
|
goneLlRightView(true);
|
|
} else {
|
|
} else {
|
|
- if (isVisible(vMain)) {
|
|
|
|
- if (isVisible(llRight)) {
|
|
|
|
- showThisView(vDoctor);
|
|
|
|
- changeTextColor(tvDoctor);
|
|
|
|
- goneLlRightView(true);
|
|
|
|
- getDoctorData();
|
|
|
|
- } else {
|
|
|
|
- showLlRightView();
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (!isVisible(vSupport) && !isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
|
|
|
|
- showThisView(vDoctor);
|
|
|
|
- getDoctorData();
|
|
|
|
- } else {
|
|
|
|
- showToast("请先取消呼叫!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ showThisView(vDoctor);
|
|
|
|
+ //changeTextColor(tvAdvice);
|
|
|
|
+ goneLlRightView(true);
|
|
|
|
+ getDoctorData();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //费用页面
|
|
public void clickVCost() {
|
|
public void clickVCost() {
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
timeOfBackMainPage = 0;
|
|
timeOfBackMainPage = 0;
|
|
timeOut = callTimeOutBack;
|
|
timeOut = callTimeOutBack;
|
|
if (isVisible(vCost)) {
|
|
if (isVisible(vCost)) {
|
|
- showThisView(vMain);
|
|
|
|
goneLlRightView(true);
|
|
goneLlRightView(true);
|
|
} else {
|
|
} else {
|
|
- if (isVisible(vMain)) {
|
|
|
|
- if (isVisible(llRight)) {
|
|
|
|
- showThisView(vCost);
|
|
|
|
- changeTextColor(tvCost);
|
|
|
|
- goneLlRightView(true);
|
|
|
|
- getCostData();
|
|
|
|
- } else {
|
|
|
|
- showLlRightView();
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if (!isVisible(vSupport) && !isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
|
|
|
|
- showThisView(vCost);
|
|
|
|
- getCostData();
|
|
|
|
- } else {
|
|
|
|
- showToast("请先取消呼叫!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ showThisView(vCost);
|
|
|
|
+ //changeTextColor(tvCost);
|
|
|
|
+ goneLlRightView(true);
|
|
|
|
+ getCostData();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //二维码页面
|
|
public void clickVQrCode() {
|
|
public void clickVQrCode() {
|
|
- vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
|
|
|
|
+ /*vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
timeOfBackMainPage = 0;
|
|
timeOfBackMainPage = 0;
|
|
timeOut = callTimeOutBack;
|
|
timeOut = callTimeOutBack;
|
|
if (isVisible(vQrCode)) {
|
|
if (isVisible(vQrCode)) {
|
|
@@ -1974,81 +1982,63 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
showToast("请先取消呼叫!");
|
|
showToast("请先取消呼叫!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //请求增援页面
|
|
public void clickVSupport() {
|
|
public void clickVSupport() {
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
timeOfBackMainPage = 0;
|
|
timeOfBackMainPage = 0;
|
|
timeOut = callTimeOutBack;
|
|
timeOut = callTimeOutBack;
|
|
- if (isVisible(vSupport)) {
|
|
|
|
- CALL_STATUS = STANDBY;
|
|
|
|
- showThisView(vMain);
|
|
|
|
|
|
+ if (isVisible(vMain) && isVisible(llRight)) {
|
|
|
|
+ showThisView(vSupport);
|
|
|
|
+ //changeTextColor(tvSupport);
|
|
goneLlRightView(true);
|
|
goneLlRightView(true);
|
|
|
|
+ setDoorLight(serialPortUtil, "200");//门灯红色闪烁 add by waderson 20191119 后来加的门灯控制
|
|
|
|
+ UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
|
|
|
|
+ CALL_STATUS = Constants.SUPPORT_IN_CALL;
|
|
|
|
+ if (null != initDataEntity) {
|
|
|
|
+ jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- if (isVisible(vMain)) {
|
|
|
|
- if (isVisible(llRight)) {
|
|
|
|
- showThisView(vSupport);
|
|
|
|
- changeTextColor(tvSupport);
|
|
|
|
- goneLlRightView(true);
|
|
|
|
- setDoorLight(serialPortUtil, "200");//门灯红色闪烁 add by waderson 20191119 后来加的门灯控制
|
|
|
|
- UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
|
|
|
|
- CALL_STATUS = Constants.SUPPORT_IN_CALL;
|
|
|
|
- if (null != initDataEntity) {
|
|
|
|
- jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- showLlRightView();
|
|
|
|
|
|
+ if (!isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
|
|
|
|
+ showThisView(vSupport);
|
|
|
|
+ setDoorLight(serialPortUtil, "200");//门灯红色闪烁 add by waderson 20191119 后来加的门灯控制
|
|
|
|
+ UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
|
|
|
|
+ CALL_STATUS = Constants.SUPPORT_IN_CALL;
|
|
|
|
+ if (null != initDataEntity) {
|
|
|
|
+ jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (!isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
|
|
|
|
- showThisView(vSupport);
|
|
|
|
- setDoorLight(serialPortUtil, "200");//门灯红色闪烁 add by waderson 20191119 后来加的门灯控制
|
|
|
|
- UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
|
|
|
|
- CALL_STATUS = Constants.SUPPORT_IN_CALL;
|
|
|
|
- if (null != initDataEntity) {
|
|
|
|
- jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- showToast("请先取消呼叫!");
|
|
|
|
- }
|
|
|
|
|
|
+ showToast("请先取消呼叫!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //呼叫护工页面
|
|
public void clickVCall() {
|
|
public void clickVCall() {
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
timeOfBackMainPage = 0;
|
|
timeOfBackMainPage = 0;
|
|
timeOut = callTimeOutBack;
|
|
timeOut = callTimeOutBack;
|
|
- if (isVisible(vCall)) {
|
|
|
|
- CALL_STATUS = STANDBY;
|
|
|
|
- showThisView(vMain);
|
|
|
|
|
|
+ if (isVisible(vMain) && isVisible(llRight)) {
|
|
|
|
+ showThisView(vCall);
|
|
|
|
+ //changeTextColor(tvCallCare);
|
|
goneLlRightView(true);
|
|
goneLlRightView(true);
|
|
|
|
+ //sendProtectHelp();//呼叫护工还没有做;这个先预留
|
|
|
|
+ CALL_STATUS = Constants.WORK_IN_CALL;
|
|
|
|
+ if (null != initDataEntity) {
|
|
|
|
+ jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- if (isVisible(vMain)) {
|
|
|
|
- if (isVisible(llRight)) {
|
|
|
|
- showThisView(vCall);
|
|
|
|
- changeTextColor(tvCall);
|
|
|
|
- goneLlRightView(true);
|
|
|
|
- //sendProtectHelp();//呼叫护工还没有做;这个先预留
|
|
|
|
- CALL_STATUS = Constants.WORK_IN_CALL;
|
|
|
|
- if (null != initDataEntity) {
|
|
|
|
- jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- showLlRightView();
|
|
|
|
|
|
+ if (!isVisible(vSupport) && !isVisible(vNurse)) {//排除呼叫状态
|
|
|
|
+ showThisView(vCall);
|
|
|
|
+ //sendProtectHelp();//呼叫护工还没有做;这个先预留
|
|
|
|
+ CALL_STATUS = Constants.WORK_IN_CALL;
|
|
|
|
+ if (null != initDataEntity) {
|
|
|
|
+ jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (!isVisible(vSupport) && !isVisible(vNurse)) {//排除呼叫状态
|
|
|
|
- showThisView(vCall);
|
|
|
|
- //sendProtectHelp();//呼叫护工还没有做;这个先预留
|
|
|
|
- CALL_STATUS = Constants.WORK_IN_CALL;
|
|
|
|
- if (null != initDataEntity) {
|
|
|
|
- jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- showToast("请先取消呼叫!");
|
|
|
|
- }
|
|
|
|
|
|
+ showToast("请先取消呼叫!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2056,6 +2046,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
public boolean callNurse = false;//超时自动取消呼叫了,20191118 之前是长按取消呼叫,后来又改成了根据UI的改变来取消,说让客户一目了然
|
|
public boolean callNurse = false;//超时自动取消呼叫了,20191118 之前是长按取消呼叫,后来又改成了根据UI的改变来取消,说让客户一目了然
|
|
|
|
|
|
|
|
+ //呼叫护士页面
|
|
public void clickVNurse() {
|
|
public void clickVNurse() {
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
vMain_big.setVisibility(View.GONE);//显示增长页面20191017
|
|
timeOfBackMainPage = 0;
|
|
timeOfBackMainPage = 0;
|
|
@@ -2101,7 +2092,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
* 显示侧边栏
|
|
* 显示侧边栏
|
|
*/
|
|
*/
|
|
protected void showLlRightView() {
|
|
protected void showLlRightView() {
|
|
- changeTextColor(null);
|
|
|
|
|
|
+ //changeTextColor(null);
|
|
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.in_righttoleft);
|
|
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.in_righttoleft);
|
|
llRight.setAnimation(animation);
|
|
llRight.setAnimation(animation);
|
|
llRight.setVisibility(View.VISIBLE);
|
|
llRight.setVisibility(View.VISIBLE);
|
|
@@ -2125,7 +2116,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
//修复主动打床头机ui不变化
|
|
//修复主动打床头机ui不变化
|
|
if (v.getVisibility() == View.VISIBLE) return;
|
|
if (v.getVisibility() == View.VISIBLE) return;
|
|
if (!StringUtils.listNotEmpty(allViews)) {
|
|
if (!StringUtils.listNotEmpty(allViews)) {
|
|
- allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vQrCode, vSupport, vCall, vNurse));
|
|
|
|
|
|
+ allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vSupport, vCall, vNurse));
|
|
}
|
|
}
|
|
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.in_righttoleft);
|
|
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.in_righttoleft);
|
|
Animation closeAnimation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.out_righttoleft);
|
|
Animation closeAnimation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.out_righttoleft);
|
|
@@ -2164,15 +2155,52 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
* tvDoctor.setTextColor(ContextCompat.getColor(context, R.color.white));
|
|
* tvDoctor.setTextColor(ContextCompat.getColor(context, R.color.white));
|
|
*/
|
|
*/
|
|
private void changeTextColor(TextView textView) {
|
|
private void changeTextColor(TextView textView) {
|
|
- tvDoctor.setTextColor(Color.WHITE);
|
|
|
|
|
|
+ tvMain.setTextColor(Color.WHITE);
|
|
|
|
+ tvAdvice.setTextColor(Color.WHITE);
|
|
tvCost.setTextColor(Color.WHITE);
|
|
tvCost.setTextColor(Color.WHITE);
|
|
- tvQrCode.setTextColor(Color.WHITE);
|
|
|
|
|
|
+ tvCallCare.setTextColor(Color.WHITE);
|
|
tvSupport.setTextColor(Color.WHITE);
|
|
tvSupport.setTextColor(Color.WHITE);
|
|
- tvCall.setTextColor(Color.WHITE);
|
|
|
|
|
|
+ tvSettings.setTextColor(Color.WHITE);
|
|
if (null != textView)
|
|
if (null != textView)
|
|
textView.setTextColor(Color.YELLOW);
|
|
textView.setTextColor(Color.YELLOW);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void showHideRightView() {
|
|
|
|
+ if (isVisible(llRight)) {
|
|
|
|
+ goneLlRightView(true);
|
|
|
|
+ } else {
|
|
|
|
+ showLlRightView();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void onClick(View v) {
|
|
|
|
+ switch (v.getId()) {
|
|
|
|
+ case R.id.right_ll_main_item:
|
|
|
|
+ clickVMain();
|
|
|
|
+ break;
|
|
|
|
+ case R.id.right_ll_advice_item:
|
|
|
|
+ clickVDoctor();
|
|
|
|
+ break;
|
|
|
|
+ case R.id.right_ll_cost_item:
|
|
|
|
+ clickVCost();
|
|
|
|
+ break;
|
|
|
|
+ case R.id.right_ll_call_care_item:
|
|
|
|
+ clickVCall();
|
|
|
|
+ break;
|
|
|
|
+ case R.id.right_ll_support_item:
|
|
|
|
+ clickVSupport();
|
|
|
|
+ break;
|
|
|
|
+ case R.id.right_ll_settings_item:
|
|
|
|
+ break;
|
|
|
|
+ case R.id.activity_calling_bed_layout_ll_right:
|
|
|
|
+ case R.id.rl_view_doctor_layout:
|
|
|
|
+ case R.id.rl_view_cost_layout:
|
|
|
|
+ showHideRightView();
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//---------------------------------------------UI更改操作部分(下)---------------------------------------------------------------------
|
|
//---------------------------------------------UI更改操作部分(下)---------------------------------------------------------------------
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2340,12 +2368,10 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void playMusicComplete(int position) {
|
|
public void playMusicComplete(int position) {
|
|
- tvBroadcasting.setText("");
|
|
|
|
- tvBroadcasting.setVisibility(View.INVISIBLE);
|
|
|
|
|
|
+ //tvBroadcasting.setText("");
|
|
|
|
+ //tvBroadcasting.setVisibility(View.INVISIBLE);
|
|
//播放广播恢复默认状态
|
|
//播放广播恢复默认状态
|
|
Constants.INTIME_BROADCAST = "";
|
|
Constants.INTIME_BROADCAST = "";
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private float mVolume = 1.0f;
|
|
private float mVolume = 1.0f;
|