|
@@ -13,6 +13,7 @@ import com.wdkl.ncs.android.component.home.util.TimeTransition
|
|
import com.wdkl.ncs.android.lib.adapter.BaseDelegateAdapter
|
|
import com.wdkl.ncs.android.lib.adapter.BaseDelegateAdapter
|
|
import com.wdkl.ncs.android.lib.utils.BaseRecyclerViewHolder
|
|
import com.wdkl.ncs.android.lib.utils.BaseRecyclerViewHolder
|
|
import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
|
|
import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
|
|
|
|
+import com.wdkl.ncs.android.middleware.tcp.enums.DeviceTypeEnum
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.TcpType
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.TcpType
|
|
import com.wdkl.ncs.android.middleware.utils.StringUtil
|
|
import com.wdkl.ncs.android.middleware.utils.StringUtil
|
|
|
|
|
|
@@ -68,6 +69,19 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
if (itemData.createDate != null) {
|
|
if (itemData.createDate != null) {
|
|
binding.callTimeTv.text = TimeTransition().stampToDate(itemData.createDate*1000)
|
|
binding.callTimeTv.text = TimeTransition().stampToDate(itemData.createDate*1000)
|
|
}
|
|
}
|
|
|
|
+ binding.callStatusImagev.visibility = View.INVISIBLE
|
|
|
|
+
|
|
|
|
+ if (!TextUtils.isEmpty(itemData.fromMemberName)) {
|
|
|
|
+ binding.sickbedTv.text = "From: " + itemData.fromMemberName
|
|
|
|
+ } else {
|
|
|
|
+ binding.sickbedTv.text = "From: " + itemData.fromFrameFullName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!TextUtils.isEmpty(itemData.toMemberName)) {
|
|
|
|
+ binding.nameTv.text = "To: " + itemData.toMemberName
|
|
|
|
+ } else {
|
|
|
|
+ binding.nameTv.text = "To: " + itemData.toFrameFullName
|
|
|
|
+ }
|
|
|
|
|
|
//是否已播放 已响应
|
|
//是否已播放 已响应
|
|
if (itemData.actionEnd != null) {
|
|
if (itemData.actionEnd != null) {
|
|
@@ -76,7 +90,7 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.processingTimeTv.visibility = View.VISIBLE
|
|
binding.processingTimeTv.visibility = View.VISIBLE
|
|
|
|
|
|
//判断是呼入还是呼出
|
|
//判断是呼入还是呼出
|
|
- if (itemData.fromDeviceMemberId == Constants.memberId){
|
|
|
|
|
|
+ /*if (itemData.fromDeviceMemberId == Constants.memberId){
|
|
binding.sickbedTv.text = itemData.toFrameFullName
|
|
binding.sickbedTv.text = itemData.toFrameFullName
|
|
if (TextUtils.isEmpty(itemData.toMemberName)) {
|
|
if (TextUtils.isEmpty(itemData.toMemberName)) {
|
|
binding.nameTv.text = "To: " + StringUtil.getResString(R.string.str_null)
|
|
binding.nameTv.text = "To: " + StringUtil.getResString(R.string.str_null)
|
|
@@ -92,26 +106,28 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.nameTv.text = "From: " + itemData.fromMemberName
|
|
binding.nameTv.text = "From: " + itemData.fromMemberName
|
|
}
|
|
}
|
|
binding.callStatusImagev.setImageResource(R.drawable.hu_ru_yi_jie)
|
|
binding.callStatusImagev.setImageResource(R.drawable.hu_ru_yi_jie)
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
if(itemData.actionType == TcpType.SOS.name){ //sos紧急呼叫 已处理
|
|
if(itemData.actionType == TcpType.SOS.name){ //sos紧急呼叫 已处理
|
|
binding.playTv.visibility = View.GONE
|
|
binding.playTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.VISIBLE
|
|
binding.projectTv.visibility = View.VISIBLE
|
|
binding.conductorNameTv.visibility = View.VISIBLE
|
|
binding.conductorNameTv.visibility = View.VISIBLE
|
|
binding.projectTv.text = "SOS"
|
|
binding.projectTv.text = "SOS"
|
|
- binding.conductorNameTv.text = itemData.toMemberName
|
|
|
|
|
|
+ binding.conductorNameTv.text = itemData.actionEndMemberName
|
|
binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
binding.callStatusImagev.setImageResource(R.drawable.sos_96)
|
|
binding.callStatusImagev.setImageResource(R.drawable.sos_96)
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
}else if(itemData.actionType == TcpType.EVENT.name){//事件已经响应 相应的数据
|
|
}else if(itemData.actionType == TcpType.EVENT.name){//事件已经响应 相应的数据
|
|
binding.playTv.visibility = View.GONE
|
|
binding.playTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.VISIBLE
|
|
binding.projectTv.visibility = View.VISIBLE
|
|
binding.conductorNameTv.visibility = View.VISIBLE
|
|
binding.conductorNameTv.visibility = View.VISIBLE
|
|
binding.projectTv.text = itemData.data
|
|
binding.projectTv.text = itemData.data
|
|
- binding.conductorNameTv.text = itemData.toMemberName
|
|
|
|
|
|
+ binding.conductorNameTv.text = itemData.actionEndMemberName
|
|
binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
binding.callStatusImagev.setImageResource(R.drawable.event_do)
|
|
binding.callStatusImagev.setImageResource(R.drawable.event_do)
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
}else if (itemData.actionType == TcpType.IM.name){//语音已播放
|
|
}else if (itemData.actionType == TcpType.IM.name){//语音已播放
|
|
|
|
|
|
binding.projectTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.GONE
|
|
@@ -125,6 +141,8 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.processingTimeTv.text = "已播放"
|
|
binding.processingTimeTv.text = "已播放"
|
|
}*/
|
|
}*/
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
|
|
+ binding.callStatusImagev.setImageResource(R.drawable.voice_recorder)
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
|
|
|
|
}else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫已接听
|
|
}else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫已接听
|
|
binding.projectTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.GONE
|
|
@@ -149,7 +167,7 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.processingTimeTv.visibility = View.VISIBLE
|
|
binding.processingTimeTv.visibility = View.VISIBLE
|
|
|
|
|
|
//判断是呼入还是呼出 1 分机到主机 2主机到分机
|
|
//判断是呼入还是呼出 1 分机到主机 2主机到分机
|
|
- if(Constants.memberId != itemData.fromDeviceMemberId){
|
|
|
|
|
|
+ /*if(Constants.memberId != itemData.fromDeviceMemberId){
|
|
binding.sickbedTv.text = itemData.fromFrameFullName
|
|
binding.sickbedTv.text = itemData.fromFrameFullName
|
|
if (TextUtils.isEmpty(itemData.fromMemberName)) {
|
|
if (TextUtils.isEmpty(itemData.fromMemberName)) {
|
|
binding.nameTv.text = "From: " + StringUtil.getResString(R.string.str_null)
|
|
binding.nameTv.text = "From: " + StringUtil.getResString(R.string.str_null)
|
|
@@ -165,7 +183,7 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.nameTv.text = "To: " + itemData.toMemberName
|
|
binding.nameTv.text = "To: " + itemData.toMemberName
|
|
}
|
|
}
|
|
binding.callStatusImagev.setImageResource(R.drawable.hu_chu_wei_jie)
|
|
binding.callStatusImagev.setImageResource(R.drawable.hu_chu_wei_jie)
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
if(itemData.actionType == TcpType.SOS.name){ //sos紧急呼叫 未处理
|
|
if(itemData.actionType == TcpType.SOS.name){ //sos紧急呼叫 未处理
|
|
binding.playTv.visibility = View.GONE
|
|
binding.playTv.visibility = View.GONE
|
|
@@ -174,12 +192,14 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
binding.processingTimeTv.setText(R.string.event_undo)
|
|
binding.processingTimeTv.setText(R.string.event_undo)
|
|
binding.callStatusImagev.setImageResource(R.drawable.sos_96)
|
|
binding.callStatusImagev.setImageResource(R.drawable.sos_96)
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
}else if(itemData.actionType == TcpType.EVENT.name){//事件未处理
|
|
}else if(itemData.actionType == TcpType.EVENT.name){//事件未处理
|
|
binding.playTv.visibility = View.GONE
|
|
binding.playTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.VISIBLE
|
|
binding.projectTv.visibility = View.VISIBLE
|
|
binding.projectTv.text = itemData.data
|
|
binding.projectTv.text = itemData.data
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
binding.callStatusImagev.setImageResource(R.drawable.event_undo)
|
|
binding.callStatusImagev.setImageResource(R.drawable.event_undo)
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
binding.processingTimeTv.setText(R.string.event_undo)
|
|
binding.processingTimeTv.setText(R.string.event_undo)
|
|
}else if (itemData.actionType == TcpType.IM.name){//语音未播放
|
|
}else if (itemData.actionType == TcpType.IM.name){//语音未播放
|
|
binding.projectTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.GONE
|
|
@@ -192,6 +212,8 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.processingTimeTv.text = "未播放"
|
|
binding.processingTimeTv.text = "未播放"
|
|
}*/
|
|
}*/
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
|
|
+ binding.callStatusImagev.setImageResource(R.drawable.voice_recorder)
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
}else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫未接听
|
|
}else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫未接听
|
|
binding.projectTv.visibility = View.GONE
|
|
binding.projectTv.visibility = View.GONE
|
|
binding.playTv.visibility = View.GONE
|
|
binding.playTv.visibility = View.GONE
|
|
@@ -225,6 +247,7 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
binding.callStatusImagev.setImageResource(R.drawable.hu_chu_wei_jie)
|
|
binding.callStatusImagev.setImageResource(R.drawable.hu_chu_wei_jie)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|