|
@@ -12,6 +12,7 @@ import com.wdkl.ncs.android.component.home.util.TimeTransition
|
|
|
import com.wdkl.ncs.android.lib.adapter.BaseDelegateAdapter
|
|
|
import com.wdkl.ncs.android.lib.utils.BaseRecyclerViewHolder
|
|
|
import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
|
|
|
+import com.wdkl.ncs.android.middleware.tcp.enums.EventStatusEnum
|
|
|
import com.wdkl.ncs.android.middleware.tcp.enums.TcpType
|
|
|
|
|
|
/**
|
|
@@ -67,6 +68,48 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
|
binding.callTimeTv.text = TimeTransition().stampToDate(itemData.createDate*1000)
|
|
|
}
|
|
|
|
|
|
+ if (itemData.actionType == TcpType.EVENT.name) {
|
|
|
+ if (itemData.actionEndMemberId != null) {
|
|
|
+ //已响应
|
|
|
+ binding.treatmentStateImagev.setImageResource(R.drawable.checked_100)
|
|
|
+ binding.treatmentStateImagev.visibility = View.VISIBLE
|
|
|
+ binding.playTv.visibility = View.GONE
|
|
|
+ binding.projectTv.visibility = View.VISIBLE
|
|
|
+ binding.conductorNameTv.visibility = View.VISIBLE
|
|
|
+ binding.projectTv.text = itemData.data
|
|
|
+ binding.conductorNameTv.text = itemData.actionEndMemberName
|
|
|
+ binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
|
+ binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
|
+ binding.callStatusImagev.setImageResource(R.drawable.event_do)
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
|
+ } else {
|
|
|
+ if (itemData.actionStatus == EventStatusEnum.CANCELED.status) {
|
|
|
+ //已取消
|
|
|
+ binding.treatmentStateImagev.visibility = View.GONE
|
|
|
+ binding.playTv.visibility = View.GONE
|
|
|
+ binding.projectTv.visibility = View.VISIBLE
|
|
|
+ binding.projectTv.text = itemData.data
|
|
|
+ binding.projectTv.setBackgroundResource(R.drawable.sp_event_cancel)
|
|
|
+ binding.callStatusImagev.setImageResource(R.drawable.event_undo)
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
|
+ binding.processingTimeTv.setText(R.string.event_cancel)
|
|
|
+ } else {
|
|
|
+ //未响应
|
|
|
+ binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_100)
|
|
|
+ binding.treatmentStateImagev.visibility = View.VISIBLE
|
|
|
+ binding.playTv.visibility = View.GONE
|
|
|
+ binding.projectTv.visibility = View.VISIBLE
|
|
|
+ binding.projectTv.text = itemData.data
|
|
|
+ binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
|
+ binding.callStatusImagev.setImageResource(R.drawable.event_undo)
|
|
|
+ binding.callStatusImagev.visibility = View.VISIBLE
|
|
|
+ binding.processingTimeTv.setText(R.string.event_undo)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
//是否已播放 已响应
|
|
|
if (itemData.actionEnd != null) {
|
|
|
binding.treatmentStateImagev.setImageResource(R.drawable.checked_100)
|
|
@@ -95,39 +138,25 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
|
binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
|
binding.callStatusImagev.setImageResource(R.drawable.sos_96)
|
|
|
- }else if(itemData.actionType == TcpType.EVENT.name){//事件已经响应 相应的数据
|
|
|
- binding.playTv.visibility = View.GONE
|
|
|
- binding.projectTv.visibility = View.VISIBLE
|
|
|
- binding.conductorNameTv.visibility = View.VISIBLE
|
|
|
- binding.projectTv.text = itemData.data
|
|
|
- binding.conductorNameTv.text = itemData.toMemberName
|
|
|
- binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
|
|
|
- binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
|
|
|
- binding.callStatusImagev.setImageResource(R.drawable.event_do)
|
|
|
}else if (itemData.actionType == TcpType.IM.name){//语音已播放
|
|
|
-
|
|
|
binding.projectTv.visibility = View.GONE
|
|
|
binding.playTv.visibility = View.VISIBLE
|
|
|
binding.conductorNameTv.visibility = View.GONE
|
|
|
binding.playTv.setBackgroundResource(R.drawable.yi_bo_fang)
|
|
|
binding.processingTimeTv.text = "已播放"
|
|
|
-
|
|
|
}else if(itemData.actionType == TcpType.VOICE.name || itemData.actionType == TcpType.PHONE.name){ //语音呼叫已接听
|
|
|
binding.projectTv.visibility = View.GONE
|
|
|
binding.playTv.visibility = View.GONE
|
|
|
binding.treatmentStateImagev.visibility = View.GONE
|
|
|
binding.conductorNameTv.visibility = View.GONE
|
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
|
-
|
|
|
}else if(itemData.actionType == TcpType.VIDEO.name){ //视频呼叫已接听
|
|
|
-
|
|
|
binding.projectTv.visibility = View.GONE
|
|
|
binding.playTv.visibility = View.GONE
|
|
|
binding.treatmentStateImagev.visibility = View.GONE
|
|
|
binding.conductorNameTv.visibility = View.GONE
|
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_100)
|
|
|
binding.treatmentStateImagev.visibility = View.VISIBLE
|
|
@@ -154,13 +183,6 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
|
binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
|
binding.processingTimeTv.text = "未处理"
|
|
|
binding.callStatusImagev.setImageResource(R.drawable.sos_96)
|
|
|
- }else if(itemData.actionType == TcpType.EVENT.name){//事件未处理
|
|
|
- binding.playTv.visibility = View.GONE
|
|
|
- binding.projectTv.visibility = View.VISIBLE
|
|
|
- binding.projectTv.text = itemData.data
|
|
|
- binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
|
|
|
- binding.callStatusImagev.setImageResource(R.drawable.event_undo)
|
|
|
- binding.processingTimeTv.text = "未处理"
|
|
|
}else if (itemData.actionType == TcpType.IM.name){//语音未播放
|
|
|
binding.projectTv.visibility = View.GONE
|
|
|
binding.playTv.visibility = View.VISIBLE
|
|
@@ -176,46 +198,8 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
|
|
|
binding.playTv.visibility = View.GONE
|
|
|
binding.treatmentStateImagev.visibility = View.GONE
|
|
|
binding.processingTimeTv.visibility = View.GONE
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-// binding.projectTv.setOnClickListener {
|
|
|
-// if (itemData.actionEnd != null)return@setOnClickListener
|
|
|
-// Log.i(TAG, "点击了事件按钮")
|
|
|
-//
|
|
|
-// Thread(Runnable {
|
|
|
-// run {
|
|
|
-// if (!Constants.deviceId.equals("")) {
|
|
|
-// var eventTcpModel = EventUtil.eventResponse(Constants.deviceId.toInt(), itemData.fromDeviceId, itemData.id)
|
|
|
-// NettyClient.Companion.getInstance().sendMsg(eventTcpModel.toJson())
|
|
|
-// } else {
|
|
|
-// showMessage("获取不到当给前设备id")
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }).start()
|
|
|
-//
|
|
|
-// //处理完之后要刷新数据
|
|
|
-// }
|
|
|
-// binding.playTv.setOnClickListener {
|
|
|
-// if (itemData.actionEnd != null)return@setOnClickListener
|
|
|
-// //点击之后播放语音留言
|
|
|
-// showMessage("点击了播放留言")
|
|
|
-// Thread(Runnable {
|
|
|
-// run {
|
|
|
-// if (!Constants.deviceId.equals("")) {
|
|
|
-// var imUtilTcpModel = ImUtil.imRead(Constants.deviceId.toInt(), itemData.fromDeviceId, itemData.id)
|
|
|
-// NettyClient.Companion.getInstance().sendMsg(imUtilTcpModel.toJson())
|
|
|
-// MediaPlayHelper.getInstance().playUrlMusic(UrlManager.build().device_url+itemData.data,0.8f,false)
|
|
|
-// } else {
|
|
|
-// showMessage("获取不到当给前设备id")
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }).start()
|
|
|
-//
|
|
|
-// //处理完之后要刷新数据
|
|
|
-// }
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|