|
@@ -28,11 +28,13 @@ import com.enation.javashop.android.jrouter.external.annotation.Router
|
|
import com.enation.javashop.net.engine.model.NetState
|
|
import com.enation.javashop.net.engine.model.NetState
|
|
import com.google.common.base.Strings
|
|
import com.google.common.base.Strings
|
|
import com.google.gson.Gson
|
|
import com.google.gson.Gson
|
|
-import com.wdkl.gstreamer.demo.MyGStreamManager
|
|
|
|
import com.wdkl.ncs.android.component.nursehome.BuildConfig
|
|
import com.wdkl.ncs.android.component.nursehome.BuildConfig
|
|
import com.wdkl.ncs.android.component.nursehome.R
|
|
import com.wdkl.ncs.android.component.nursehome.R
|
|
import com.wdkl.ncs.android.component.nursehome.databinding.ActivityNewNurseHomeBinding
|
|
import com.wdkl.ncs.android.component.nursehome.databinding.ActivityNewNurseHomeBinding
|
|
import com.wdkl.ncs.android.component.nursehome.fragment.*
|
|
import com.wdkl.ncs.android.component.nursehome.fragment.*
|
|
|
|
+import com.wdkl.ncs.android.component.nursehome.fragment.visit.VisitCallFragment
|
|
|
|
+import com.wdkl.ncs.android.component.nursehome.fragment.visit.VisitMainFragment
|
|
|
|
+import com.wdkl.ncs.android.component.nursehome.fragment.visit.VisitSetFragment
|
|
import com.wdkl.ncs.android.component.nursehome.hardware.HardWareFactroy
|
|
import com.wdkl.ncs.android.component.nursehome.hardware.HardWareFactroy
|
|
import com.wdkl.ncs.android.component.nursehome.launch.NurseHomeLaunch
|
|
import com.wdkl.ncs.android.component.nursehome.launch.NurseHomeLaunch
|
|
import com.wdkl.ncs.android.component.nursehome.led.LedItem
|
|
import com.wdkl.ncs.android.component.nursehome.led.LedItem
|
|
@@ -40,6 +42,7 @@ import com.wdkl.ncs.android.component.nursehome.led.LedManagerUtils
|
|
import com.wdkl.ncs.android.component.nursehome.service.WdklSipService
|
|
import com.wdkl.ncs.android.component.nursehome.service.WdklSipService
|
|
import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig
|
|
import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig
|
|
import com.wdkl.ncs.android.component.nursehome.util.*
|
|
import com.wdkl.ncs.android.component.nursehome.util.*
|
|
|
|
+import com.wdkl.ncs.android.component.nursehome.visit.tcp.VisitTcpClient
|
|
import com.wdkl.ncs.android.component.nursehome.window.IncidentWindow
|
|
import com.wdkl.ncs.android.component.nursehome.window.IncidentWindow
|
|
import com.wdkl.ncs.android.lib.base.BaseActivity
|
|
import com.wdkl.ncs.android.lib.base.BaseActivity
|
|
import com.wdkl.ncs.android.lib.base.BaseApplication
|
|
import com.wdkl.ncs.android.lib.base.BaseApplication
|
|
@@ -61,11 +64,7 @@ import com.wdkl.ncs.android.middleware.model.vo.HostDevicePartSettingVO
|
|
import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
|
|
import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
|
|
import com.wdkl.ncs.android.middleware.model.vo.NurseDeviceInfoVO
|
|
import com.wdkl.ncs.android.middleware.model.vo.NurseDeviceInfoVO
|
|
import com.wdkl.ncs.android.middleware.tcp.TcpClient
|
|
import com.wdkl.ncs.android.middleware.tcp.TcpClient
|
|
-import com.wdkl.ncs.android.middleware.tcp.channel.DeviceChannel
|
|
|
|
-import com.wdkl.ncs.android.middleware.tcp.channel.EntraceGuardUtil
|
|
|
|
-import com.wdkl.ncs.android.middleware.tcp.channel.OtherUtil
|
|
|
|
-import com.wdkl.ncs.android.middleware.tcp.channel.VoiceUtil
|
|
|
|
-import com.wdkl.ncs.android.middleware.tcp.dto.TcpCallback
|
|
|
|
|
|
+import com.wdkl.ncs.android.middleware.tcp.channel.*
|
|
import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel
|
|
import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.DeviceTypeEnum
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.DeviceTypeEnum
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction
|
|
@@ -76,12 +75,12 @@ import com.wdkl.ncs.janus.util.JanusConstant
|
|
import kotlinx.android.synthetic.main.activity_new_nurse_home.*
|
|
import kotlinx.android.synthetic.main.activity_new_nurse_home.*
|
|
import kotlinx.android.synthetic.main.activity_nurse_home.*
|
|
import kotlinx.android.synthetic.main.activity_nurse_home.*
|
|
import kotlinx.android.synthetic.main.activity_nurse_home.view_title_layout_tv_point
|
|
import kotlinx.android.synthetic.main.activity_nurse_home.view_title_layout_tv_point
|
|
|
|
+import kotlinx.android.synthetic.main.adapter_broadcasting_frame_part.*
|
|
import kotlinx.android.synthetic.main.view_title_layout.*
|
|
import kotlinx.android.synthetic.main.view_title_layout.*
|
|
import org.greenrobot.eventbus.EventBus
|
|
import org.greenrobot.eventbus.EventBus
|
|
import org.greenrobot.eventbus.Subscribe
|
|
import org.greenrobot.eventbus.Subscribe
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
import org.linphone.core.AccountCreator
|
|
import org.linphone.core.AccountCreator
|
|
-import org.linphone.core.Core
|
|
|
|
import org.linphone.core.RegistrationState
|
|
import org.linphone.core.RegistrationState
|
|
import org.linphone.core.TransportType
|
|
import org.linphone.core.TransportType
|
|
import serialporttest.utils.SerialPortUtilHost
|
|
import serialporttest.utils.SerialPortUtilHost
|
|
@@ -119,10 +118,23 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
var batteryBroadcastReceiver: BatteryBroadcastReceiver? = null
|
|
var batteryBroadcastReceiver: BatteryBroadcastReceiver? = null
|
|
private var executor: ScheduledExecutorService? = null
|
|
private var executor: ScheduledExecutorService? = null
|
|
|
|
|
|
|
|
+ private var visIntent: Intent? = null
|
|
|
|
+
|
|
|
|
|
|
companion object {
|
|
companion object {
|
|
var sosItemList = ArrayList<CallingItem>()
|
|
var sosItemList = ArrayList<CallingItem>()
|
|
var callingList = ArrayList<CallingItem>()
|
|
var callingList = ArrayList<CallingItem>()
|
|
|
|
+ var viditingList = ArrayList<String>()
|
|
|
|
+
|
|
|
|
+ // 添加字符串到 viditingList 中
|
|
|
|
+ fun addToViditingList(str: String) {
|
|
|
|
+ viditingList.add(str)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 删除 viditingList 中与指定值相同的字符串
|
|
|
|
+ fun removeValueFromViditingList(str: String) {
|
|
|
|
+ viditingList.removeAll { it == str }
|
|
|
|
+ }
|
|
|
|
|
|
fun checkIncomingCall(bedDeviceId: Int?): Boolean {
|
|
fun checkIncomingCall(bedDeviceId: Int?): Boolean {
|
|
if (callingList.size > 0) {
|
|
if (callingList.size > 0) {
|
|
@@ -159,6 +171,7 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
private val uninstallApk = false
|
|
private val uninstallApk = false
|
|
private var copyDone = false
|
|
private var copyDone = false
|
|
private var tcpConnect: Boolean = false
|
|
private var tcpConnect: Boolean = false
|
|
|
|
+ private var visittcpConnect: Boolean = false
|
|
|
|
|
|
private var isFragmentVisible = false
|
|
private var isFragmentVisible = false
|
|
|
|
|
|
@@ -537,11 +550,17 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
}
|
|
}
|
|
|
|
|
|
R.id.menu_led -> {
|
|
R.id.menu_led -> {
|
|
- showMiddleFragment(LedSettingsFragment())
|
|
|
|
|
|
+// val fragment: Fragment? = JRouter.prepare().create("/agora/visit").seek() as Fragment?
|
|
|
|
+// val fragment: Fragment? = JRouter.prepare().create("/agora/visit").
|
|
|
|
+ showMiddleFragment(VisitMainFragment())
|
|
|
|
+ redDot.visibility = View.GONE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ menu_led.setOnClickListener {
|
|
|
|
+ showMiddleFragment(VisitMainFragment())
|
|
|
|
+ redDot.visibility = View.GONE
|
|
|
|
+ }
|
|
main_rl_3.setOnClickListener(this)
|
|
main_rl_3.setOnClickListener(this)
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -720,6 +739,11 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
Log.e(TAG, "收到返回的设置配置信息 ")
|
|
Log.e(TAG, "收到返回的设置配置信息 ")
|
|
Log.e(TAG, "partId " + data.partId)
|
|
Log.e(TAG, "partId " + data.partId)
|
|
|
|
|
|
|
|
+ //寻找 这里要做判断 没有声网探视不启动
|
|
|
|
+ Thread {
|
|
|
|
+ VisitTcpClient.getInstance().init(Constant.SLEEP_TCP_SERVER_URL_text, Constant.VISIT_TCP_PORT!!.toInt(), Constant.reader_idle_time!!.toInt())
|
|
|
|
+ }.start()
|
|
|
|
+
|
|
if (SettingConfig.getSipEnabled(activity)) {
|
|
if (SettingConfig.getSipEnabled(activity)) {
|
|
//配置sip账户
|
|
//配置sip账户
|
|
if (WdklSipService.getCore() != null) {
|
|
if (WdklSipService.getCore() != null) {
|
|
@@ -818,6 +842,19 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
}
|
|
}
|
|
|
|
|
|
setSettingConfiguration()
|
|
setSettingConfiguration()
|
|
|
|
+// if (data.isBool_outside_vital && !visittcpConnect) {
|
|
|
|
+// visittcpConnect = true
|
|
|
|
+// //初始化tcp
|
|
|
|
+// Thread {
|
|
|
|
+// if (!BuildConfig.DEBUG){
|
|
|
|
+// VisitTcpClient.getInstance().init(Constant.SLEEP_TCP_SERVER_URL, Constant.VISIT_TCP_PORT!!.toInt(), Constant.reader_idle_time!!.toInt())
|
|
|
|
+// }else{
|
|
|
|
+// VisitTcpClient.getInstance().init(Constant.SLEEP_TCP_SERVER_URL_text, Constant.VISIT_TCP_PORT!!.toInt(), Constant.reader_idle_time!!.toInt())
|
|
|
|
+// }
|
|
|
|
+// }.start()
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
} catch (e: Exception) {
|
|
} catch (e: Exception) {
|
|
//showMessage("Setting configs error: " + e.message)
|
|
//showMessage("Setting configs error: " + e.message)
|
|
Log.i(TAG, "获取设置配置信息异常" + e.message)
|
|
Log.i(TAG, "获取设置配置信息异常" + e.message)
|
|
@@ -923,7 +960,7 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
supportFragmentManager.inTransaction {
|
|
supportFragmentManager.inTransaction {
|
|
remove(currentFragment!!)
|
|
remove(currentFragment!!)
|
|
currentFragment = fragment
|
|
currentFragment = fragment
|
|
- //updateLeftBtState()
|
|
|
|
|
|
+ updateLeftBtState()
|
|
add(R.id.host_main_frame, fragment)
|
|
add(R.id.host_main_frame, fragment)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1446,6 +1483,11 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
menu_more.setBackgroundResource(R.drawable.shape_main_bt_bg2)
|
|
menu_more.setBackgroundResource(R.drawable.shape_main_bt_bg2)
|
|
menu_more.setTextColor(getResources().getColor(R.color.delete_text_color));
|
|
menu_more.setTextColor(getResources().getColor(R.color.delete_text_color));
|
|
}
|
|
}
|
|
|
|
+ is VisitMainFragment -> {
|
|
|
|
+ //led
|
|
|
|
+ menu_led.setBackgroundResource(R.drawable.shape_main_bt_bg2)
|
|
|
|
+ menu_led.setTextColor(getResources().getColor(R.color.delete_text_color));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1513,9 +1555,9 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
//视频通话请求
|
|
//视频通话请求
|
|
if (Constant.CALL_STATE == Constant.CALL_CALLING
|
|
if (Constant.CALL_STATE == Constant.CALL_CALLING
|
|
- || Constant.CALL_STATE == Constant.CALL_OUTGOING
|
|
|
|
- || Constant.CALL_STATE == Constant.CALL_VISITING
|
|
|
|
- || Constant.CALL_STATE == Constant.CALL_V_INCOMING) {
|
|
|
|
|
|
+ || Constant.CALL_STATE == Constant.CALL_OUTGOING
|
|
|
|
+ || Constant.CALL_STATE == Constant.CALL_VISITING
|
|
|
|
+ || Constant.CALL_STATE == Constant.CALL_V_INCOMING) {
|
|
//通话占线
|
|
//通话占线
|
|
val callTcp = VoiceUtil.voiceCalling(tcpModel.tid, Constant.DEVICE_ID, tcpModel.fromId, interactionVO.id)
|
|
val callTcp = VoiceUtil.voiceCalling(tcpModel.tid, Constant.DEVICE_ID, tcpModel.fromId, interactionVO.id)
|
|
TcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
TcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
@@ -1528,8 +1570,8 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
if (SettingConfig.getTtsMode(activity) == SettingConfig.TTS_ON) {
|
|
if (SettingConfig.getTtsMode(activity) == SettingConfig.TTS_ON) {
|
|
var frameName: String? = ""
|
|
var frameName: String? = ""
|
|
if (DeviceTypeEnum.DOCTOR_HOST.value() == interactionVO.fromDeviceType
|
|
if (DeviceTypeEnum.DOCTOR_HOST.value() == interactionVO.fromDeviceType
|
|
- || DeviceTypeEnum.NURSE_HOST.value() == interactionVO.fromDeviceType
|
|
|
|
- || DeviceTypeEnum.OTHER_HOST.value() == interactionVO.fromDeviceType) {
|
|
|
|
|
|
+ || DeviceTypeEnum.NURSE_HOST.value() == interactionVO.fromDeviceType
|
|
|
|
+ || DeviceTypeEnum.OTHER_HOST.value() == interactionVO.fromDeviceType) {
|
|
//医生机,护士主机,其他主机,总控主机等
|
|
//医生机,护士主机,其他主机,总控主机等
|
|
frameName = interactionVO.fromDeviceName
|
|
frameName = interactionVO.fromDeviceName
|
|
} else if (DeviceTypeEnum.NURSE_WATCH.value() == interactionVO.fromDeviceType) {
|
|
} else if (DeviceTypeEnum.NURSE_WATCH.value() == interactionVO.fromDeviceType) {
|
|
@@ -2055,9 +2097,9 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
LedHelper.updateLedInfo(interactionVO, true, false)
|
|
LedHelper.updateLedInfo(interactionVO, true, false)
|
|
showSosAlert(tcpModel, false, false)
|
|
showSosAlert(tcpModel, false, false)
|
|
if (Constant.CALL_STATE != Constant.CALL_CALLING
|
|
if (Constant.CALL_STATE != Constant.CALL_CALLING
|
|
- && Constant.CALL_STATE != Constant.CALL_OUTGOING
|
|
|
|
- && Constant.CALL_STATE != Constant.CALL_VISITING
|
|
|
|
- && Constant.CALL_STATE != Constant.CALL_V_INCOMING
|
|
|
|
|
|
+ && Constant.CALL_STATE != Constant.CALL_OUTGOING
|
|
|
|
+ && Constant.CALL_STATE != Constant.CALL_VISITING
|
|
|
|
+ && Constant.CALL_STATE != Constant.CALL_V_INCOMING
|
|
) {
|
|
) {
|
|
if (SettingConfig.getTtsMode(this) == SettingConfig.TTS_ON) {
|
|
if (SettingConfig.getTtsMode(this) == SettingConfig.TTS_ON) {
|
|
val frameName: String
|
|
val frameName: String
|
|
@@ -2139,6 +2181,94 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ } else if (tcpModel.type == TcpType.REMOTE_VISIT) {
|
|
|
|
+ if (tcpModel.action == TcpAction.REMOTEVISITAction.CALL) {
|
|
|
|
+ //通知分机进入探视
|
|
|
|
+ val json = JSON.parseObject(tcpModel.data.toString())
|
|
|
|
+// val bedId = json.getString("bed")
|
|
|
|
+ val visitid = json.getString("id")
|
|
|
|
+ val toId = json.getString("callBedId")
|
|
|
|
+ val callTcp = SwVisitUtil.visitCall(Constant.DEVICE_ID,toId.toInt() ,visitid)
|
|
|
|
+ TcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ viditingList.add(visitid.toString())
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_VISIT_list))
|
|
|
|
+ } else if (tcpModel.action == TcpAction.REMOTEVISITAction.FAILED) {
|
|
|
|
+ //收到 分机不在线,通知界面,转接给小程序服务器
|
|
|
|
+ val visitid = tcpModel.data.toString()
|
|
|
|
+ val callTcp = SwVisitUtil.visitHandoff( visitid)
|
|
|
|
+ VisitTcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ removeValueFromViditingList(visitid.toString())
|
|
|
|
+ if (skyCallFragment is VisitCallFragment){
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_REMOVE_CALL_FRAGMENT))
|
|
|
|
+ }else{
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_VISIT_list))
|
|
|
|
+ }
|
|
|
|
+ }else if (tcpModel.action == TcpAction.REMOTEVISITAction.CANCEL) {
|
|
|
|
+ //收到 小程序取消 通知页面 比对id,取消探视(或者刷新页面)直接转给分机
|
|
|
|
+// val json = JSON.parseObject(tcpModel.data.toString())
|
|
|
|
+ val visitid = tcpModel.data.toString()
|
|
|
|
+ val callTcp = SwVisitUtil.visitCancel(Constant.DEVICE_ID,visitid)
|
|
|
|
+ TcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ removeValueFromViditingList(visitid.toString())
|
|
|
|
+ //寻找 需要补充一个如果挂断提示,如果正在查看的情况下
|
|
|
|
+// showMessage("通话已取消.....")
|
|
|
|
+ if (skyCallFragment is VisitCallFragment){
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_REMOVE_CALL_FRAGMENT))
|
|
|
|
+ }else{
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_VISIT_list))
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else if (tcpModel.action == TcpAction.REMOTEVISITAction.HANDOFF) {
|
|
|
|
+ //收到 挂断 fromId不为null的是分机发过来的,为null的是 直接转给分机并且通知主机界面关闭
|
|
|
|
+ if(tcpModel.tid!=null){
|
|
|
|
+ //分机发过来的
|
|
|
|
+ val visitid = tcpModel.data.toString()
|
|
|
|
+ val callTcp = SwVisitUtil.visitWxHANDOFF(visitid)
|
|
|
|
+ VisitTcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ removeValueFromViditingList(visitid.toString())
|
|
|
|
+ }else{
|
|
|
|
+ //小程序发过来的
|
|
|
|
+ val visitid = tcpModel.data.toString()
|
|
|
|
+ val callTcp = SwVisitUtil.visitHangup(Constant.DEVICE_ID,visitid)
|
|
|
|
+ TcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ removeValueFromViditingList(visitid.toString())
|
|
|
|
+ }
|
|
|
|
+ //寻找 需要补充一个如果挂断提示,如果正在查看的情况下
|
|
|
|
+// showMessage("通话已挂断.....")
|
|
|
|
+ if (skyCallFragment is VisitCallFragment){
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_REMOVE_CALL_FRAGMENT))
|
|
|
|
+ }else{
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_VISIT_list))
|
|
|
|
+ }
|
|
|
|
+ }else if (tcpModel.action == TcpAction.REMOTEVISITAction.DATA) {
|
|
|
|
+ //收到 通知刷新预约界面,左侧消息小红点。
|
|
|
|
+ redDot.visibility = View.VISIBLE
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("refresh", Constant.EVENT_VISIT_list))
|
|
|
|
+ }else if (tcpModel.action == TcpAction.REMOTEVISITAction.CALLING) {
|
|
|
|
+ //收到 通知小程序 分机正在通话中
|
|
|
|
+ val visitid = tcpModel.data.toString()
|
|
|
|
+ val callTcp = SwVisitUtil.visitIngCall(visitid)
|
|
|
|
+ VisitTcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ //寻找 需要补充一个如果挂断提示,如果正在查看的情况下
|
|
|
|
+// showMessage("通话异常.....")
|
|
|
|
+ removeValueFromViditingList(visitid.toString())
|
|
|
|
+ if (skyCallFragment is VisitCallFragment){
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_REMOVE_CALL_FRAGMENT))
|
|
|
|
+ }else{
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_VISIT_list))
|
|
|
|
+ }
|
|
|
|
+ }else if (tcpModel.action == TcpAction.REMOTEVISITAction.REJECT) {
|
|
|
|
+ //收到 通知小程序 分机拒绝
|
|
|
|
+ val visitid = tcpModel.data.toString()
|
|
|
|
+ val callTcp = SwVisitUtil.visitreject(visitid)
|
|
|
|
+ VisitTcpClient.getInstance().sendMsg(callTcp.toJson())
|
|
|
|
+ removeValueFromViditingList(visitid.toString())
|
|
|
|
+ if (skyCallFragment is VisitCallFragment){
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_REMOVE_CALL_FRAGMENT))
|
|
|
|
+ }else{
|
|
|
|
+ EventBus.getDefault().post(MessageEvent("BackCall", Constant.EVENT_VISIT_list))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2185,11 +2315,6 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
AppUpdateHelper.restartApp(activity)
|
|
AppUpdateHelper.restartApp(activity)
|
|
}
|
|
}
|
|
|
|
|
|
- Constant.EVENT_r_br_set -> {
|
|
|
|
- showMiddleFragment(BroadcastNewFragment())
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
Constant.EVENT_BROADCAST_STATE -> {
|
|
Constant.EVENT_BROADCAST_STATE -> {
|
|
val state = messageEvent.getMessage() as String
|
|
val state = messageEvent.getMessage() as String
|
|
if ("on".equals(state)) {
|
|
if ("on".equals(state)) {
|
|
@@ -2198,10 +2323,13 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
tv_broadcast_state.visibility = View.GONE
|
|
tv_broadcast_state.visibility = View.GONE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ Constant.EVENT_r_br_set -> {
|
|
|
|
+ showMiddleFragment(BroadcastNewFragment())
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
Constant.EVENT_V_br_set -> {
|
|
Constant.EVENT_V_br_set -> {
|
|
supportFragmentManager.inTransaction {
|
|
supportFragmentManager.inTransaction {
|
|
-
|
|
|
|
val bundle = Bundle()
|
|
val bundle = Bundle()
|
|
bundle.putString("id", messageEvent.message.toString())
|
|
bundle.putString("id", messageEvent.message.toString())
|
|
val fragment = BroadcastSetFragment()
|
|
val fragment = BroadcastSetFragment()
|
|
@@ -2212,6 +2340,36 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNewN
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ Constant.EVENT_r_VISIT_th -> {
|
|
|
|
+ showMiddleFragment(VisitMainFragment())
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ Constant.EVENT_V_VISIT_th -> {
|
|
|
|
+ supportFragmentManager.inTransaction {
|
|
|
|
+ val bundle = Bundle()
|
|
|
|
+ bundle.putString("id", messageEvent.message.toString())
|
|
|
|
+ bundle.putString("channelName", messageEvent.channelName.toString())
|
|
|
|
+ val fragment = VisitSetFragment()
|
|
|
|
+ remove(currentFragment!!)
|
|
|
|
+ currentFragment = fragment
|
|
|
|
+ fragment.arguments = bundle
|
|
|
|
+ add(R.id.host_main_frame, fragment)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //进入院外探视
|
|
|
|
+ Constant.EVENT_VISIT_START -> {
|
|
|
|
+ var fragment = VisitCallFragment()
|
|
|
|
+ var bundle = Bundle()
|
|
|
|
+ bundle.putString("channelName", messageEvent.channelName.toString())
|
|
|
|
+ bundle.putString("type", messageEvent.message.toString())
|
|
|
|
+ fragment.arguments = bundle
|
|
|
|
+ addCallFragment(fragment)
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|