Browse Source

## [1.1.11] version 30 - 2020-07-30
### Changed
- 优化交互列表呈现
### Fixed
- 交互列表加载更多及刷新事件
### Added
- 错误日志增加device_id参数

allen 3 years ago
parent
commit
38aefab697
21 changed files with 121 additions and 138 deletions
  1. 2 2
      build.gradle
  2. 0 10
      home/src/main/code/com/wdkl/ncs/android/component/home/activity/EventActivity.kt
  3. 29 4
      home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchCallRecordsActivity.kt
  4. 3 6
      home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchContactsActivity.kt
  5. 21 51
      home/src/main/code/com/wdkl/ncs/android/component/home/adapter/WatchCallRecordsItemAdapter.kt
  6. 1 1
      home/src/main/code/com/wdkl/ncs/android/component/home/helper/AppUpdateHelper.java
  7. 2 0
      home/src/main/code/com/wdkl/ncs/android/component/home/util/AnrFcExceptionUtil.java
  8. 3 3
      home/src/main/code/com/wdkl/ncs/android/component/home/util/MediaPlayer.kt
  9. BIN
      home/src/main/res/drawable/checked_100.png
  10. BIN
      home/src/main/res/drawable/event_do.png
  11. BIN
      home/src/main/res/drawable/event_undo.png
  12. BIN
      home/src/main/res/drawable/sos_96.png
  13. 2 2
      home/src/main/res/drawable/sp_event_handled.xml
  14. 5 0
      home/src/main/res/drawable/sp_event_undo.xml
  15. 0 8
      home/src/main/res/drawable/sp_event_unhandled_bg.xml
  16. BIN
      home/src/main/res/drawable/unchecked_100.png
  17. 34 41
      home/src/main/res/layout/adapter_watch_call_records_item.xml
  18. 1 1
      home/src/main/res/layout/watch_activity_event.xml
  19. 0 1
      middleware/src/main/code/com/wdkl/ncs/android/middleware/logic/presenter/home/WatchCallRecordsFragmentPresenter.kt
  20. 1 1
      middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/channel/DeviceChannel.java
  21. 17 7
      readme.md

+ 2 - 2
build.gradle

@@ -47,12 +47,12 @@ buildscript {
     /**
     /**
      * APP版本码
      * APP版本码
      */
      */
-    ext.app_version_code = 29
+    ext.app_version_code = 30
 
 
     /**
     /**
      * APP版本号
      * APP版本号
      */
      */
-    ext.app_version = "1.1.10"
+    ext.app_version = "1.1.11"
 
 
     /**
     /**
      * 项目依赖库
      * 项目依赖库

+ 0 - 10
home/src/main/code/com/wdkl/ncs/android/component/home/activity/EventActivity.kt

@@ -51,16 +51,6 @@ class EventActivity : BaseActivity<WatchHomeActivityPresenter, WatchActivityEven
         tcpModel = intent.getSerializableExtra("TcpModel") as TcpModel
         tcpModel = intent.getSerializableExtra("TcpModel") as TcpModel
         interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
         interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
 
 
-        //是否已播放 已响应
-//        if (interactionVO.actionEnd != null) {
-        Log.e(TAG, "" + (interactionVO!!.actionEnd) + " ")
-        Log.e(TAG, "" + interactionVO!!.actionType + " ")
-        Log.e(TAG, "" + interactionVO!!.data + " ")
-
-        Log.e(TAG, "" + interactionVO!!.actionType + " ")
-        Log.e(TAG, "" + TcpType.IM.name + " ")
-
-
 //            //判断是呼入还是呼出 1 分机到主机 2主机到分机
 //            //判断是呼入还是呼出 1 分机到主机 2主机到分机
 //            if(interactionVO.actionDirectionType == 1){
 //            if(interactionVO.actionDirectionType == 1){
 //                interactionVO.sickbedTv.text = itemData.fromFrameFullName
 //                interactionVO.sickbedTv.text = itemData.fromFrameFullName

+ 29 - 4
home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchCallRecordsActivity.kt

@@ -30,6 +30,8 @@ import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction
 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.MessageEvent
 import com.wdkl.ncs.android.middleware.utils.MessageEvent
 import kotlinx.android.synthetic.main.watch_activity_call_records.*
 import kotlinx.android.synthetic.main.watch_activity_call_records.*
+import kotlinx.android.synthetic.main.watch_activity_call_records.refresh
+import kotlinx.android.synthetic.main.watch_contacts_lay.*
 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
@@ -46,6 +48,7 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
      */
      */
     private lateinit var virtualLayoutManager: VirtualLayoutManager
     private lateinit var virtualLayoutManager: VirtualLayoutManager
 
 
+    private var page: Int = 1
     /**
     /**
      * @Name  delegateAdapter
      * @Name  delegateAdapter
      * @Type  DelegateAdapter
      * @Type  DelegateAdapter
@@ -97,17 +100,31 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
         customerId = intent.getStringExtra("customer_id")
         customerId = intent.getStringExtra("customer_id")
         if (action == all) {
         if (action == all) {
             if (customerId.equals("")) {
             if (customerId.equals("")) {
-//            presenter.loadFloor(all, 1,30, Constants.ids.toInt(),0)
-                presenter.loadPage(all, 1, 30, Constants.deviceId.toInt(), 0, 0)
+                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 0)
                 call_relyout.visibility = View.GONE
                 call_relyout.visibility = View.GONE
+
+                refresh.setOnLoadMoreListener {
+                    page += 1
+                    presenter.loadPage(all, page, 30, Constants.deviceId, 0, 0)
+                }
+                refresh.setOnRefreshListener {
+                    presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 0)
+                }
             }
             }
         } else if (action == unread) {
         } else if (action == unread) {
-            presenter.loadPage(all, 1, 30, Constants.deviceId.toInt(), 0, 1)
+            presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 1)
             call_relyout.visibility = View.GONE
             call_relyout.visibility = View.GONE
 
 
+            refresh.setOnLoadMoreListener {
+                page += 1
+                presenter.loadPage(all, page, 30, Constants.deviceId, 0, 1)
+            }
+            refresh.setOnRefreshListener {
+                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, 1)
+            }
         } else if (action == initiator) {
         } else if (action == initiator) {
             call_relyout.visibility = View.VISIBLE
             call_relyout.visibility = View.VISIBLE
-            presenter.loadPage(initiator, 1, 30, Constants.deviceId.toInt(), customerId.toInt(), -1)
+            presenter.loadPage(initiator, 1, 30, Constants.deviceId, customerId.toInt(), -1)
             call_relyout.setOnClickListener {
             call_relyout.setOnClickListener {
                 loadingDialog.show()
                 loadingDialog.show()
                 call_relyout.isEnabled = false
                 call_relyout.isEnabled = false
@@ -115,6 +132,14 @@ class WatchCallRecordsActivity : BaseActivity<WatchCallRecordsFragmentPresenter,
                 TcpClient.getInstance().sendMsg(tcpModel.toJson())
                 TcpClient.getInstance().sendMsg(tcpModel.toJson())
                 countDownTimer.start()
                 countDownTimer.start()
             }
             }
+
+            refresh.setOnLoadMoreListener {
+                page += 1
+                presenter.loadPage(all, page, 30, Constants.deviceId, 0, -1)
+            }
+            refresh.setOnRefreshListener {
+                presenter.loadPage(all, 1, 30, Constants.deviceId, 0, -1)
+            }
         }
         }
         initCountDownTimer()
         initCountDownTimer()
     }
     }

+ 3 - 6
home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchContactsActivity.kt

@@ -29,8 +29,6 @@ class WatchContactsActivity : BaseActivity<WatchActivityPresenter, WatchContacts
     private var page: Int = 1
     private var page: Int = 1
     private val adapter = WatchContactsItemAdapter(ArrayList())
     private val adapter = WatchContactsItemAdapter(ArrayList())
 
 
-    var deviceId: Int = 17
-
     private lateinit var virtualLayoutManager: VirtualLayoutManager
     private lateinit var virtualLayoutManager: VirtualLayoutManager
 
 
     private lateinit var delegateAdapter: DelegateAdapter
     private lateinit var delegateAdapter: DelegateAdapter
@@ -80,17 +78,16 @@ class WatchContactsActivity : BaseActivity<WatchActivityPresenter, WatchContacts
         /**配置到RecycleView*/
         /**配置到RecycleView*/
         watch_contacts_list.layoutManager = virtualLayoutManager
         watch_contacts_list.layoutManager = virtualLayoutManager
         watch_contacts_list.adapter = delegateAdapter
         watch_contacts_list.adapter = delegateAdapter
-        deviceId = Constants.deviceId.toInt()
-        presenter.loadData(page, deviceId)
+        presenter.loadData(page, Constants.deviceId)
     }
     }
 
 
     override fun bindEvent() {
     override fun bindEvent() {
         refresh.setOnLoadMoreListener {
         refresh.setOnLoadMoreListener {
             page += 1
             page += 1
-            presenter.loadData(page, deviceId)
+            presenter.loadData(page, Constants.deviceId)
         }
         }
         refresh.setOnRefreshListener {
         refresh.setOnRefreshListener {
-            presenter.loadData(1, deviceId)
+            presenter.loadData(1, Constants.deviceId)
         }
         }
 
 
         adapter.setOnItemClickListener { data, position ->
         adapter.setOnItemClickListener { data, position ->

+ 21 - 51
home/src/main/code/com/wdkl/ncs/android/component/home/adapter/WatchCallRecordsItemAdapter.kt

@@ -7,12 +7,13 @@ import com.alibaba.android.vlayout.LayoutHelper
 import com.alibaba.android.vlayout.layout.LinearLayoutHelper
 import com.alibaba.android.vlayout.layout.LinearLayoutHelper
 import com.wdkl.ncs.android.component.home.R
 import com.wdkl.ncs.android.component.home.R
 import com.wdkl.ncs.android.component.home.databinding.AdapterWatchCallRecordsItemBinding
 import com.wdkl.ncs.android.component.home.databinding.AdapterWatchCallRecordsItemBinding
+import com.wdkl.ncs.android.component.home.util.MediaPlayHelper
 import com.wdkl.ncs.android.component.nursehome.common.Constants
 import com.wdkl.ncs.android.component.nursehome.common.Constants
-import com.wdkl.ncs.android.component.nursehome.util.MediaPlayer
 import com.wdkl.ncs.android.component.nursehome.util.TimeTransition
 import com.wdkl.ncs.android.component.nursehome.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.lib.utils.showMessage
 import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.middleware.api.UrlManager
 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.TcpClient
 import com.wdkl.ncs.android.middleware.tcp.TcpClient
 import com.wdkl.ncs.android.middleware.tcp.channel.EventUtil
 import com.wdkl.ncs.android.middleware.tcp.channel.EventUtil
@@ -74,30 +75,21 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
 
 
             //是否已播放 已响应
             //是否已播放 已响应
             if (itemData.actionEnd != null) {
             if (itemData.actionEnd != null) {
-                Log.e(TAG, "" + itemData.actionEnd+" "+position)
-                Log.e(TAG, "" + itemData.actionType+" "+position)
-                Log.e(TAG, "" + itemData.data+" "+position)
-
-                Log.e(TAG, "" + itemData.actionDirectionType+" "+position)
-                Log.e(TAG, "" + TcpType.IM.name+" "+position)
-
-                binding.treatmentStateImagev.setImageResource(R.drawable.yi_chu_li)
+                binding.treatmentStateImagev.setImageResource(R.drawable.checked_100)
                 binding.treatmentStateImagev.visibility = View.VISIBLE
                 binding.treatmentStateImagev.visibility = View.VISIBLE
                 binding.processingTimeTv.visibility = View.VISIBLE
                 binding.processingTimeTv.visibility = View.VISIBLE
 
 
                 //判断是呼入还是呼出 1 分机到主机 2主机到分机
                 //判断是呼入还是呼出 1 分机到主机 2主机到分机
-                if(itemData.actionDirectionType == 1){
-                    binding.sickbedTv.text = itemData.fromFrameFullName
-                    binding.nameTv.text = itemData.fromMemberName
-                    //TODO 图标显示不正常 暂时没放完整图标
-                    binding.callStatusImagev.setImageResource(R.drawable.hu_ru_yi_jie)
-                }else if(itemData.actionDirectionType == 2 || itemData.actionDirectionType == 3){
+                if (itemData.fromDeviceMemberId == Constants.memberId){
                     binding.sickbedTv.text = itemData.toFrameFullName
                     binding.sickbedTv.text = itemData.toFrameFullName
                     binding.nameTv.text = itemData.toMemberName
                     binding.nameTv.text = itemData.toMemberName
                     binding.callStatusImagev.setImageResource(R.drawable.hu_chu_yi_jie)
                     binding.callStatusImagev.setImageResource(R.drawable.hu_chu_yi_jie)
+                } else {
+                    binding.sickbedTv.text = itemData.fromFrameFullName
+                    binding.nameTv.text = itemData.fromMemberName
+                    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
@@ -105,8 +97,8 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                     binding.projectTv.text = "SOS"
                     binding.projectTv.text = "SOS"
                     binding.conductorNameTv.text = itemData.toMemberName
                     binding.conductorNameTv.text = itemData.toMemberName
                     binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
                     binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
-                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_handled)
-
+                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
+                    binding.callStatusImagev.setImageResource(R.drawable.sos_96)
                 }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
@@ -114,7 +106,8 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                     binding.projectTv.text = itemData.data
                     binding.projectTv.text = itemData.data
                     binding.conductorNameTv.text = itemData.toMemberName
                     binding.conductorNameTv.text = itemData.toMemberName
                     binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
                     binding.processingTimeTv.text = TimeTransition().stampToDate(itemData.actionEnd*1000)
-                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_handled)
+                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_do)
+                    binding.callStatusImagev.setImageResource(R.drawable.event_do)
                 }else if (itemData.actionType == TcpType.IM.name){//语音已播放
                 }else if (itemData.actionType == TcpType.IM.name){//语音已播放
 
 
                     binding.projectTv.visibility = View.GONE
                     binding.projectTv.visibility = View.GONE
@@ -140,41 +133,35 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                 }
                 }
 
 
             } else {
             } else {
-                Log.e(TAG, "" + itemData.actionEnd+" "+position)
-                Log.e(TAG, "" + itemData.actionType+" "+position)
-                Log.e(TAG, "" + itemData.data+" "+position)
-                Log.e(TAG, "" + itemData.actionDirectionType+" "+position)
-
-                binding.treatmentStateImagev.setImageResource(R.drawable.wei_chu_li)
+                binding.treatmentStateImagev.setImageResource(R.drawable.unchecked_100)
                 binding.treatmentStateImagev.visibility = View.VISIBLE
                 binding.treatmentStateImagev.visibility = View.VISIBLE
                 binding.conductorNameTv.visibility = View.GONE
                 binding.conductorNameTv.visibility = View.GONE
                 binding.processingTimeTv.visibility = View.VISIBLE
                 binding.processingTimeTv.visibility = View.VISIBLE
 
 
                 //判断是呼入还是呼出 1 分机到主机 2主机到分机
                 //判断是呼入还是呼出 1 分机到主机 2主机到分机
-                if(itemData.actionDirectionType == 1){
-                    Log.e(TAG, "进入。。。。" )
+                if(Constants.memberId!=itemData.fromDeviceMemberId){
                     binding.sickbedTv.text = itemData.fromFrameFullName
                     binding.sickbedTv.text = itemData.fromFrameFullName
                     binding.nameTv.text = itemData.fromMemberName
                     binding.nameTv.text = itemData.fromMemberName
                     binding.callStatusImagev.setImageResource(R.drawable.hu_ru_wei_jie)
                     binding.callStatusImagev.setImageResource(R.drawable.hu_ru_wei_jie)
-                }else if(itemData.actionDirectionType == 2 || itemData.actionDirectionType == 3){
+                }else{
                     binding.sickbedTv.text = itemData.toFrameFullName
                     binding.sickbedTv.text = itemData.toFrameFullName
                     binding.nameTv.text = itemData.toMemberName
                     binding.nameTv.text = 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
                     binding.projectTv.visibility = View.VISIBLE
                     binding.projectTv.visibility = View.VISIBLE
                     binding.projectTv.text = "SOS"
                     binding.projectTv.text = "SOS"
-                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_unhandled_bg)
+                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
                     binding.processingTimeTv.text = "未处理"
                     binding.processingTimeTv.text = "未处理"
-
+                    binding.callStatusImagev.setImageResource(R.drawable.sos_96)
                 }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_unhandled_bg)
+                    binding.projectTv.setBackgroundResource(R.drawable.sp_event_undo)
+                    binding.callStatusImagev.setImageResource(R.drawable.event_undo)
                     binding.processingTimeTv.text = "未处理"
                     binding.processingTimeTv.text = "未处理"
                 }else if (itemData.actionType == TcpType.IM.name){//语音未播放
                 }else if (itemData.actionType == TcpType.IM.name){//语音未播放
                     binding.projectTv.visibility = View.GONE
                     binding.projectTv.visibility = View.GONE
@@ -195,24 +182,14 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                 }
                 }
             }
             }
 
 
-
-
             binding.projectTv.setOnClickListener {
             binding.projectTv.setOnClickListener {
-                //事件处理监听
-//                    点击之后发送通知
-//                    showMessage("点击了事件按钮")
                 if (itemData.actionEnd != null)return@setOnClickListener
                 if (itemData.actionEnd != null)return@setOnClickListener
-                Log.e(TAG, "点击了事件按钮")
+                Log.i(TAG, "点击了事件按钮")
 
 
                 Thread(Runnable {
                 Thread(Runnable {
                     run {
                     run {
-                        Log.e(TAG, "aaassss "+ Constants.deviceId +"kong")
-
                         if (!Constants.deviceId.equals("")) {
                         if (!Constants.deviceId.equals("")) {
                             var eventTcpModel = EventUtil.eventResponse(Constants.deviceId.toInt(), itemData.fromDeviceId, itemData.id)
                             var eventTcpModel = EventUtil.eventResponse(Constants.deviceId.toInt(), itemData.fromDeviceId, itemData.id)
-//                        val map = HashMap<String,Int>()
-//                        map.put("id",1)
-//                        eventTcpModel.setData(map)
                             TcpClient.getInstance().sendMsg(eventTcpModel.toJson())
                             TcpClient.getInstance().sendMsg(eventTcpModel.toJson())
                         } else {
                         } else {
                             showMessage("获取不到当给前设备id")
                             showMessage("获取不到当给前设备id")
@@ -230,15 +207,8 @@ class WatchCallRecordsItemAdapter(val data: ArrayList<InteractionVO>) : BaseDele
                     run {
                     run {
                         if (!Constants.deviceId.equals("")) {
                         if (!Constants.deviceId.equals("")) {
                             var imUtilTcpModel = ImUtil.imRead(Constants.deviceId.toInt(), itemData.fromDeviceId, itemData.id)
                             var imUtilTcpModel = ImUtil.imRead(Constants.deviceId.toInt(), itemData.fromDeviceId, itemData.id)
-
-//                val map = HashMap<String,Int>()
-//                map.put("id",1)
-//                imUtilTcpModel.setData(map)
                             TcpClient.getInstance().sendMsg(imUtilTcpModel.toJson())
                             TcpClient.getInstance().sendMsg(imUtilTcpModel.toJson())
-                            var mediaPlayer = MediaPlayer()
-                            mediaPlayer.startMediaPlayer("http://192.168.1.112:8006"+itemData.data)
-                            mediaPlayer.setVolume(0.3f)
-
+                            MediaPlayHelper.getInstance().playUrlMusic(UrlManager.build().device_url+itemData.data,0.8f,false)
                         } else {
                         } else {
                             showMessage("获取不到当给前设备id")
                             showMessage("获取不到当给前设备id")
                         }
                         }

+ 1 - 1
home/src/main/code/com/wdkl/ncs/android/component/home/helper/AppUpdateHelper.java

@@ -160,7 +160,7 @@ public class AppUpdateHelper {
         BufferedReader errorResult = null;
         BufferedReader errorResult = null;
         StringBuilder successMsg = new StringBuilder();
         StringBuilder successMsg = new StringBuilder();
         StringBuilder errorMsg = new StringBuilder();
         StringBuilder errorMsg = new StringBuilder();
-        Log.e(TAG, "install package: " + packageName + ", apkPath: " + apkPath);
+        Log.i(TAG, "install package: " + packageName + ", apkPath: " + apkPath);
         try {
         try {
             process = new ProcessBuilder("pm", "install", "-i", packageName, "-r", apkPath).start();
             process = new ProcessBuilder("pm", "install", "-i", packageName, "-r", apkPath).start();
             successResult = new BufferedReader(new InputStreamReader(process.getInputStream()));
             successResult = new BufferedReader(new InputStreamReader(process.getInputStream()));

+ 2 - 0
home/src/main/code/com/wdkl/ncs/android/component/home/util/AnrFcExceptionUtil.java

@@ -12,6 +12,7 @@ import com.github.anrwatchdog.ANRError;
 import com.github.anrwatchdog.ANRWatchDog;
 import com.github.anrwatchdog.ANRWatchDog;
 import com.wdkl.ncs.android.component.home.activity.WatchHome2Activity;
 import com.wdkl.ncs.android.component.home.activity.WatchHome2Activity;
 import com.wdkl.ncs.android.component.home.service.WdKeepAliveService;
 import com.wdkl.ncs.android.component.home.service.WdKeepAliveService;
+import com.wdkl.ncs.android.component.nursehome.common.Constants;
 import com.wdkl.ncs.android.middleware.api.UrlManager;
 import com.wdkl.ncs.android.middleware.api.UrlManager;
 
 
 import java.io.File;
 import java.io.File;
@@ -126,6 +127,7 @@ public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
         }
         }
 
 
         FormBody.Builder formBody = new FormBody.Builder();
         FormBody.Builder formBody = new FormBody.Builder();
+        formBody.add("device_id", ""+Constants.Companion.getDeviceId());
         formBody.add("class_name",class_name);
         formBody.add("class_name",class_name);
         formBody.add("method_name",method_name);
         formBody.add("method_name",method_name);
         formBody.add("exception_name",exception_name);
         formBody.add("exception_name",exception_name);

+ 3 - 3
home/src/main/code/com/wdkl/ncs/android/component/home/util/MediaPlayer.kt

@@ -13,17 +13,17 @@ class MediaPlayer {
     var mMediaPlayer: MediaPlayer? = null
     var mMediaPlayer: MediaPlayer? = null
 
 
     init {
     init {
-        Log.e(TAG, "初始化播放器")
+        Log.i(TAG, "初始化播放器")
         mMediaPlayer = MediaPlayer()
         mMediaPlayer = MediaPlayer()
         //这样设置 不能控制本音乐的音量大小 也就是setVolume无效
         //这样设置 不能控制本音乐的音量大小 也就是setVolume无效
 //        mMediaPlayer!!.setAudioStreamType(AudioManager.STREAM_MUSIC)
 //        mMediaPlayer!!.setAudioStreamType(AudioManager.STREAM_MUSIC)
         mMediaPlayer!!.setAudioStreamType(AudioManager.STREAM_VOICE_CALL)
         mMediaPlayer!!.setAudioStreamType(AudioManager.STREAM_VOICE_CALL)
         mMediaPlayer!!.setOnCompletionListener {
         mMediaPlayer!!.setOnCompletionListener {
-            Log.e(TAG, "播放完成")
+            Log.i(TAG, "播放完成")
         }
         }
 
 
         mMediaPlayer!!.setOnPreparedListener {
         mMediaPlayer!!.setOnPreparedListener {
-            Log.e(TAG, "加载完长")
+            Log.i(TAG, "加载完长")
             mMediaPlayer!!.start()
             mMediaPlayer!!.start()
         }
         }
         mMediaPlayer!!.setOnErrorListener { mp, what, extra ->
         mMediaPlayer!!.setOnErrorListener { mp, what, extra ->

BIN
home/src/main/res/drawable/checked_100.png


BIN
home/src/main/res/drawable/event_do.png


BIN
home/src/main/res/drawable/event_undo.png


BIN
home/src/main/res/drawable/sos_96.png


+ 2 - 2
home/src/main/res/drawable/sp_event_handled.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <stroke android:color="#F78B8F" android:width="2px" />
-    <corners android:radius="2px"/>
+    <solid android:color="#2ECC71"/>
+    <corners android:radius="5sp"/>
 </shape>
 </shape>

+ 5 - 0
home/src/main/res/drawable/sp_event_undo.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <stroke android:color="#F78B8F" android:width="2dp" />
+    <corners android:radius="5sp"/>
+</shape>

+ 0 - 8
home/src/main/res/drawable/sp_event_unhandled_bg.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <solid android:color="#F78B8F"/>
-    <corners android:topLeftRadius="0px"
-        android:topRightRadius="0px"
-        android:bottomLeftRadius="0px"
-        android:bottomRightRadius="0px"/>
-</shape>

BIN
home/src/main/res/drawable/unchecked_100.png


+ 34 - 41
home/src/main/res/layout/adapter_watch_call_records_item.xml

@@ -1,62 +1,59 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<layout>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
 
 
-    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    <RelativeLayout
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="70dp"
         android:layout_height="70dp"
         android:background="@drawable/item_selector"
         android:background="@drawable/item_selector"
-        android:layout_marginTop="6dp">
+        android:layout_marginTop="2dp">
 
 
         <LinearLayout
         <LinearLayout
             android:id="@+id/tab_linyout"
             android:id="@+id/tab_linyout"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="9dp"
+            android:layout_marginStart="5dp"
             android:layout_centerVertical="true"
             android:layout_centerVertical="true"
             android:orientation="vertical">
             android:orientation="vertical">
 
 
-            <ImageView
-                android:id="@+id/tab_imagev"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:src="@drawable/hu_ru_yi_jie" />
+<!--            <ImageView-->
+<!--                android:id="@+id/tab_imagev"-->
+<!--                android:layout_width="wrap_content"-->
+<!--                android:layout_height="wrap_content"-->
+<!--                android:src="@drawable/hu_ru_yi_jie" />-->
 
 
             <ImageView
             <ImageView
                 android:id="@+id/call_status_imagev"
                 android:id="@+id/call_status_imagev"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
+                android:layout_width="26dp"
+                android:layout_height="26dp"
                 android:layout_marginTop="2dp"
                 android:layout_marginTop="2dp"
-                android:src="@drawable/hu_ru_yi_jie"
-                android:visibility="gone"/>
+                android:src="@drawable/hu_ru_yi_jie"/>
         </LinearLayout>
         </LinearLayout>
 
 
         <RelativeLayout
         <RelativeLayout
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_height="match_parent"
             android:layout_marginTop="4dp"
             android:layout_marginTop="4dp"
-            android:layout_marginRight="9dp"
-            android:layout_toRightOf="@+id/tab_linyout">
+            android:layout_marginEnd="9dp"
+            android:layout_toEndOf="@+id/tab_linyout">
 
 
             <RelativeLayout
             <RelativeLayout
                 android:id="@+id/room_name_linlyout"
                 android:id="@+id/room_name_linlyout"
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="6dp">
+                android:layout_marginStart="6dp">
 
 
                 <TextView
                 <TextView
                     android:id="@+id/sickbed_tv"
                     android:id="@+id/sickbed_tv"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="05房01床"
-                    android:textSize="14dp" />
+                    android:textSize="14sp" />
 
 
                 <TextView
                 <TextView
                     android:id="@+id/call_time_tv"
                     android:id="@+id/call_time_tv"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_alignParentRight="true"
-                    android:text="12:00:00"
-                    android:textSize="12dp" />
+                    android:layout_alignParentEnd="true"
+                    android:textSize="12sp" />
 
 
             </RelativeLayout>
             </RelativeLayout>
 
 
@@ -65,7 +62,7 @@
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/room_name_linlyout"
                 android:layout_below="@+id/room_name_linlyout"
-                android:layout_marginLeft="6dp"
+                android:layout_marginStart="6dp"
                 android:layout_marginTop="4dp"
                 android:layout_marginTop="4dp"
                 android:orientation="vertical">
                 android:orientation="vertical">
 
 
@@ -73,33 +70,31 @@
                     android:id="@+id/name_tv"
                     android:id="@+id/name_tv"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="zhangx"
-                    android:textSize="14dp" />
+                    android:textSize="14sp" />
 
 
                 <LinearLayout
                 <LinearLayout
                     android:id="@+id/incident_linlyou"
                     android:id="@+id/incident_linlyou"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_alignParentRight="true"
+                    android:layout_alignParentEnd="true"
                     android:orientation="horizontal">
                     android:orientation="horizontal">
 
 
                     <ImageView
                     <ImageView
                         android:id="@+id/treatment_state_imagev"
                         android:id="@+id/treatment_state_imagev"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
+                        android:layout_width="12dp"
+                        android:layout_height="12dp"
                         android:layout_gravity="center"
                         android:layout_gravity="center"
-                        android:layout_marginRight="6dp"
-                        android:src="@drawable/yi_chu_li" />
-
-
+                        android:layout_marginEnd="6dp"
+                        android:src="@drawable/checked_100" />
                     <TextView
                     <TextView
                         android:id="@+id/project_tv"
                         android:id="@+id/project_tv"
-                        android:layout_width="59dp"
+                        android:layout_width="wrap_content"
                         android:layout_height="20dp"
                         android:layout_height="20dp"
+                        android:paddingLeft="5dp"
+                        android:paddingRight="5dp"
                         android:gravity="center"
                         android:gravity="center"
-                        android:text="---"
-                        android:background="@drawable/sp_event_handled"
-                        android:textSize="12dp"
+                        android:background="@drawable/sp_event_undo"
+                        android:textSize="12sp"
                          />
                          />
 
 
                     <ImageView
                     <ImageView
@@ -117,7 +112,7 @@
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/nursing_project_relalyout"
                 android:layout_below="@+id/nursing_project_relalyout"
-                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true"
                 android:layout_marginTop="4dp"
                 android:layout_marginTop="4dp"
                 android:orientation="horizontal">
                 android:orientation="horizontal">
 
 
@@ -125,16 +120,14 @@
                     android:id="@+id/conductor_name_tv"
                     android:id="@+id/conductor_name_tv"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginRight="10dp"
-                    android:text="处理人"
-                    android:textSize="12dp" />
+                    android:layout_marginEnd="10dp"
+                    android:textSize="12sp" />
 
 
                 <TextView
                 <TextView
                     android:id="@+id/processing_time_tv"
                     android:id="@+id/processing_time_tv"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="12:00:00"
-                    android:textSize="12dp" />
+                    android:textSize="12sp" />
             </LinearLayout>
             </LinearLayout>
         </RelativeLayout>
         </RelativeLayout>
     </RelativeLayout>
     </RelativeLayout>

+ 1 - 1
home/src/main/res/layout/watch_activity_event.xml

@@ -95,7 +95,7 @@
                         android:id="@+id/project_tv"
                         android:id="@+id/project_tv"
                         android:layout_width="59px"
                         android:layout_width="59px"
                         android:layout_height="20px"
                         android:layout_height="20px"
-                        android:background="@drawable/sp_event_handled"
+                        android:background="@drawable/sp_event_undo"
                         android:gravity="center"
                         android:gravity="center"
                         android:text="啊哈哈"
                         android:text="啊哈哈"
                         android:textSize="12px" />
                         android:textSize="12px" />

+ 0 - 1
middleware/src/main/code/com/wdkl/ncs/android/middleware/logic/presenter/home/WatchCallRecordsFragmentPresenter.kt

@@ -84,7 +84,6 @@ class WatchCallRecordsFragmentPresenter @Inject constructor() :RxPresenter<Watch
     @SuppressLint("LongLogTag")
     @SuppressLint("LongLogTag")
     override fun loadPage(ACTION:String, page_no:Int, page_size:Int, device_id:Int, customer_id: Int, choice:Int) {
     override fun loadPage(ACTION:String, page_no:Int, page_size:Int, device_id:Int, customer_id: Int, choice:Int) {
         //page_no页码  page_size每页显示的数量  device_id设备ID
         //page_no页码  page_size每页显示的数量  device_id设备ID
-        Log.e("WatchCallRecordsFragmentPresenter","qqqqqqq")
         //获取全部通话记录数据
         //获取全部通话记录数据
         if(ACTION .equals("ALL")){
         if(ACTION .equals("ALL")){
             callRecordsFragmentApi.getCallRecords(page_no,page_size,device_id,choice)
             callRecordsFragmentApi.getCallRecords(page_no,page_size,device_id,choice)

+ 1 - 1
middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/channel/DeviceChannel.java

@@ -42,7 +42,7 @@ public class DeviceChannel {
         lastTcp.clear();
         lastTcp.clear();
         lastTcp.put(tcpModel.toJson(), System.currentTimeMillis());
         lastTcp.put(tcpModel.toJson(), System.currentTimeMillis());
 
 
-        Log.e(TAG,"收到tcp消息 DeviceChannel "+tcpJsonStr);
+//        Log.e(TAG,"收到tcp消息 DeviceChannel "+tcpJsonStr);
 
 
         switch (tcpModel.getType()){
         switch (tcpModel.getType()){
             case VOICE:
             case VOICE:

+ 17 - 7
readme.md

@@ -26,17 +26,17 @@
 
 
 ---
 ---
 
 
-## [1.1.9] version 28 - 2020-07-29
+## [1.1.11] version 30 - 2020-07-30
+### Changed
+- 优化交互列表呈现
 ### Fixed
 ### Fixed
-- 解决同事之间呼叫记录详情名称错误的问题
-    - 增加Constants.memberId
-- 修复呼叫有时弹不出呼叫界面的问题
-- 修复BUG上传服务器错误
-
+- 交互列表加载更多及刷新事件
+### Added
+- 错误日志增加device_id参数
 
 
 ---
 ---
 
 
-## [1.1.10] version 29 - 2020-07-29
+## [1.1.10] version 29 - 2020-07-30
 ### Fixed
 ### Fixed
 - 修复无使用人时闪退的问题
 - 修复无使用人时闪退的问题
 ### Changed
 ### Changed
@@ -45,6 +45,16 @@
 
 
 ---
 ---
 
 
+## [1.1.9] version 28 - 2020-07-29
+### Fixed
+- 解决同事之间呼叫记录详情名称错误的问题
+    - 增加Constants.memberId
+- 修复呼叫有时弹不出呼叫界面的问题
+- 修复BUG上传服务器错误
+
+
+---
+
 ## [1.1.8] version 27 - 2020-07-29
 ## [1.1.8] version 27 - 2020-07-29
 ### Fixed
 ### Fixed
 - 有新交互进入时,停止语音播报
 - 有新交互进入时,停止语音播报