Pārlūkot izejas kodu

门口机新版ui第一次提交

XIAOZHI 2 gadi atpakaļ
vecāks
revīzija
a154d56e59
100 mainītis faili ar 7223 papildinājumiem un 646 dzēšanām
  1. 18 7
      app/build.gradle
  2. 2 0
      app/src/main/AndroidManifest.xml
  3. 0 7
      app/src/main/code/com/wdkl/app/ncs/application/Application.kt
  4. 7 9
      callingdoor/build.gradle
  5. 15 1
      callingdoor/src/main/AndroidManifest.xml
  6. 279 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivationActivity.kt
  7. 238 278
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt
  8. 78 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/SetHintActivity.kt
  9. 195 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/SystemActivity.kt
  10. 235 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/TextActivity.kt
  11. 152 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/WebviewActivity.kt
  12. 84 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/adapter/DeviceMenuapter.kt
  13. 152 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/adapter/NewFrameRoomAdapter.kt
  14. 20 2
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/di/CallingdoorComponent.kt
  15. 51 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/HuliDialogHelper.java
  16. 50 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/Network2DialogHelper.java
  17. 56 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/NetworkDialogHelper.java
  18. 43 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/PatrolDialogHelper.java
  19. 43 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/PositioningDialogHelper.java
  20. 49 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/RebootDialogHelper.java
  21. 56 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/ScreenSaverDialogHelper.java
  22. 71 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/ServicesDialogHelper.java
  23. 69 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/SystemDialogHelper.java
  24. 54 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/UpdataDialogHelper.java
  25. 18 16
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/MainFragment.kt
  26. 70 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/MoreFragment.kt
  27. 159 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/NurseFragment.kt
  28. 226 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/NursingWorkFragment.kt
  29. 78 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/YhFragment.kt
  30. 82 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/HardTools.java
  31. 24 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/HardWareFactroy.java
  32. 116 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/imp/Z3128HardTools.java
  33. 0 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AppUpdateHelper.java
  34. 110 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/NetHelper.java
  35. 2 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/ScreenManagerUtil.kt
  36. 6 4
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/settings/SettingConfig.java
  37. 92 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/util/HorizantalAutoBrLayout.java
  38. 429 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/util/NfcUtils.java
  39. 233 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/util/SPUtils.java
  40. 17 0
      callingdoor/src/main/res/drawable/selector_callhu_bt.xml
  41. 5 0
      callingdoor/src/main/res/drawable/selector_network_tx_color.xml
  42. 6 0
      callingdoor/src/main/res/drawable/selector_nuser_ed_d.xml
  43. 24 0
      callingdoor/src/main/res/drawable/selector_nuser_msg_tx_d.xml
  44. 15 0
      callingdoor/src/main/res/drawable/selector_nuserlogin_btn.xml
  45. 17 0
      callingdoor/src/main/res/drawable/selector_zengyuan_bt.xml
  46. 3 0
      callingdoor/src/main/res/drawable/selector_zengyuan_bt_d.xml
  47. 3 0
      callingdoor/src/main/res/drawable/selector_zengyuan_bt_p.xml
  48. 11 0
      callingdoor/src/main/res/drawable/shape_bed_age_txt_bg.xml
  49. 10 0
      callingdoor/src/main/res/drawable/shape_bed_bg.xml
  50. 11 0
      callingdoor/src/main/res/drawable/shape_bed_ll_txt_bg.xml
  51. 11 0
      callingdoor/src/main/res/drawable/shape_bed_medic_txt_bg.xml
  52. 11 0
      callingdoor/src/main/res/drawable/shape_bed_nurse_bg.xml
  53. 11 0
      callingdoor/src/main/res/drawable/shape_bed_nurse_item_bg.xml
  54. 11 0
      callingdoor/src/main/res/drawable/shape_bed_nurse_txt_bg.xml
  55. 11 0
      callingdoor/src/main/res/drawable/shape_bed_sex_txt_bg.xml
  56. 8 3
      callingdoor/src/main/res/drawable/shape_frame_bg.xml
  57. 5 0
      callingdoor/src/main/res/drawable/shape_huli_dialog_bt_bg.xml
  58. 5 0
      callingdoor/src/main/res/drawable/shape_main_bt_bg.xml
  59. 5 0
      callingdoor/src/main/res/drawable/shape_main_bt_bg2.xml
  60. 11 0
      callingdoor/src/main/res/drawable/shape_main_hos_txt_bg.xml
  61. 9 0
      callingdoor/src/main/res/drawable/shape_n_login_ed_bg.xml
  62. 9 0
      callingdoor/src/main/res/drawable/shape_n_login_ed_bg2.xml
  63. 11 0
      callingdoor/src/main/res/drawable/shape_password_bt_bg.xml
  64. 5 0
      callingdoor/src/main/res/drawable/shape_patrol_dialog_bt_bg.xml
  65. 5 0
      callingdoor/src/main/res/drawable/shape_positioning_dialog_bt_bg.xml
  66. 14 0
      callingdoor/src/main/res/drawable/shape_screen_bg.xml
  67. 14 0
      callingdoor/src/main/res/drawable/shape_screen_txt_bg.xml
  68. 11 0
      callingdoor/src/main/res/drawable/shape_settings_txt_bg.xml
  69. 6 2
      callingdoor/src/main/res/layout/call_dialog_lay.xml
  70. 275 0
      callingdoor/src/main/res/layout/callingdoor_activation.xml
  71. 2 3
      callingdoor/src/main/res/layout/callingdoor_main_lay.xml
  72. 159 0
      callingdoor/src/main/res/layout/callingdoor_main_new.xml
  73. 204 0
      callingdoor/src/main/res/layout/callingdoor_nurse.xml
  74. 250 0
      callingdoor/src/main/res/layout/callingdoor_nurse_main.xml
  75. 320 0
      callingdoor/src/main/res/layout/callingdoor_nurse_msg.xml
  76. 644 0
      callingdoor/src/main/res/layout/callingdoor_setting_main.xml
  77. 229 0
      callingdoor/src/main/res/layout/callingdoor_test_main.xml
  78. 164 260
      callingdoor/src/main/res/layout/item_bed.xml
  79. 36 0
      callingdoor/src/main/res/layout/item_icon_lay.xml
  80. 57 0
      callingdoor/src/main/res/layout/main_network_dialog.xml
  81. 159 0
      callingdoor/src/main/res/layout/main_network_two_dialog.xml
  82. 77 0
      callingdoor/src/main/res/layout/main_password_dialog.xml
  83. 67 0
      callingdoor/src/main/res/layout/main_restart_dialog.xml
  84. 79 0
      callingdoor/src/main/res/layout/main_server_dialog.xml
  85. 66 0
      callingdoor/src/main/res/layout/main_version_dialog.xml
  86. 127 14
      callingdoor/src/main/res/layout/main_view_layout.xml
  87. 47 0
      callingdoor/src/main/res/layout/nurse_huli_dialog.xml
  88. 39 0
      callingdoor/src/main/res/layout/nurse_patrol_dialog.xml
  89. 39 0
      callingdoor/src/main/res/layout/nurse_positioning_dialog.xml
  90. 41 0
      callingdoor/src/main/res/layout/nurse_screensaver_dialog.xml
  91. 21 0
      callingdoor/src/main/res/layout/nursing_work_lay.xml
  92. 87 35
      callingdoor/src/main/res/layout/view_title_layout.xml
  93. 4 2
      callingdoor/src/main/res/layout/voice_call_lay.xml
  94. 73 0
      callingdoor/src/main/res/layout/webciew_lay.xml
  95. BIN
      callingdoor/src/main/res/mipmap-mdpi/bg.png
  96. BIN
      callingdoor/src/main/res/mipmap-mdpi/chuang_l.png
  97. BIN
      callingdoor/src/main/res/mipmap-mdpi/chuang_wu.png
  98. BIN
      callingdoor/src/main/res/mipmap-mdpi/chuanghao_bg.png
  99. BIN
      callingdoor/src/main/res/mipmap-mdpi/fang.png
  100. 0 0
      callingdoor/src/main/res/mipmap-mdpi/fang_bg.png

+ 18 - 7
app/build.gradle

@@ -3,7 +3,9 @@ apply plugin: 'kotlin-android'
 apply plugin: 'kotlin-android-extensions'
 apply plugin: 'kotlin-kapt'
 //apply plugin: 'com.enation.javashop.aspectjrt'
-
+def releaseTime() {
+    return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
+}
 kapt {
     arguments {
         arg("moduleName", project.getName())
@@ -56,11 +58,22 @@ android {
             signingConfig signingConfigs.release
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+            // android studio3.0之后,输出名称定义,输出名称配置采用该配置
+            android.applicationVariants.all { variant ->
+                variant.outputs.all {
+                    outputFileName = "wd_${app_device_type}_v${app_version}_${app_version_code}_${releaseTime()}.apk"
+                }
+            }
         }
         debug {
             signingConfig signingConfigs.debug
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+            android.applicationVariants.all { variant ->
+                variant.outputs.all {
+                    outputFileName = "wd_${app_device_type}_v${app_version}_${app_version_code}_${releaseTime()}.apk"
+                }
+            }
         }
     }
     sourceSets {
@@ -100,12 +113,14 @@ dependencies {
      * Dagger编译依赖
      */
     kapt 'com.google.dagger:dagger-compiler:2.7'
+
     /**
      * 内存泄漏监控
      */
     //debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
     //releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
     //testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
+
     /**
      * Kotlin依赖
      */
@@ -114,19 +129,15 @@ dependencies {
      * 路由注解处理器
      */
     kapt "com.enation.geamtear:jrouter-compiler:$router_version"
+
     /**
      * 外部化Moudle配置
      * moudle独立编译配置
      */
     if (!componentTag) {
         compile project(':welcome') // ===> 开始模块  建议在模块内添加广告 欢迎页 等页面
-        compile project(':home')   // ===> 主页模块  里面一般是App的首页 分类楼层页面
-        //compile project(':shop')      // ===> 店铺模块 店铺列表 详细 等
-        //compile project(':setting')   // ===> 设置模块 设置 缓存 App分享等
-        compile project(':extra')    // ===> 额外的一些页面 比如二维码扫描等一些附加功能
-        //compile project(':hello')
         compile project(':callingdoor')
-        //compile project(':sip')
+
     }
     /**
      * JavaShopAndroid 中间件依赖库

+ 2 - 0
app/src/main/AndroidManifest.xml

@@ -20,6 +20,8 @@
     <uses-permission android:name="android.permission.BLUETOOTH"/>
     <uses-permission android:name="android.permission.RECORD_AUDIO"/>
 
+
+
     <uses-permission android:name ="android.permission.WAKE_LOCK" />
     <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
     <application

+ 0 - 7
app/src/main/code/com/wdkl/app/ncs/application/Application.kt

@@ -56,13 +56,6 @@ class Application : BaseApplication() {
         JRouter.openDebug()
         JRouter.openLog()
         JRouter.prepare().create("/welcome/launch").seek()
-        JRouter.prepare().create("/home/launch").seek()
-        //JRouter.prepare().create("/setting/launch").seek()
-        //JRouter.prepare().create("/shop/launch").seek()
-        JRouter.prepare().create("/extra/launch").seek()
-
-        //JRouter.prepare().create("/hello/launch").seek()
-
         JRouter.prepare().create("/callingdoor/launch").seek()
     }
 

+ 7 - 9
callingdoor/build.gradle

@@ -33,7 +33,7 @@ android {
         dataBinding {
             enabled = true
         }
-
+        buildConfigField "String", "BUILD_TIME", getDate()
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
 
@@ -54,7 +54,12 @@ android {
     }
 
 }
-
+//获取编译日期
+static String getDate() {
+    Date date = new Date()
+    String dates = "\""+date.format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))+"\""
+    return dates
+}
 dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
     androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
@@ -77,15 +82,8 @@ dependencies {
      * 公共库依赖
      */
     compile project(':middleware')
-    //compile project(':sip')
     compile project(':bedlib')
     compile project(':welcome')
-
-    //web rtc
-    //compile project(':webrtc')
-    //compile project(':libwebrtc')
-    //compile project(':rtc-chat')
-
     compile project(':janus')
 
     if(componentTag){

+ 15 - 1
callingdoor/src/main/AndroidManifest.xml

@@ -16,12 +16,26 @@
 
         <activity android:name="com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity"
             android:screenOrientation="landscape"
-            android:launchMode="singleInstance"/>
+            android:launchMode="singleTask"/>
 
         <activity android:name="com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity"
             android:screenOrientation="landscape"
             android:launchMode="singleTask"/>
 
+        <activity android:name="com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivationActivity"
+            android:screenOrientation="landscape"
+            android:launchMode="singleTask"/>
+
+        <activity android:name="com.wdkl.app.ncs.callingdoor.activity.SystemActivity"
+            android:screenOrientation="landscape"
+            android:launchMode="singleTask"/>
+
+        <activity android:name="com.wdkl.app.ncs.callingdoor.activity.TextActivity"
+            android:screenOrientation="landscape"
+            android:launchMode="singleTask"/>
+        <activity android:name="com.wdkl.app.ncs.callingdoor.activity.SetHintActivity"
+            android:screenOrientation="landscape"
+            android:launchMode="singleTask"/>
         <provider
             android:name="android.support.v4.content.FileProvider"
             android:authorities="${applicationId}.provider"

+ 279 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivationActivity.kt

@@ -0,0 +1,279 @@
+package com.wdkl.app.ncs.callingdoor.activity
+
+import android.content.Intent
+import android.os.Build
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
+import com.enation.javashop.android.jrouter.external.annotation.Router
+import com.enation.javashop.net.engine.model.NetState
+import com.example.yf_rk3288_api.YF_RK3288_API_Manager
+import com.wdkl.app.ncs.callingdoor.BuildConfig
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorActivationBinding
+import com.wdkl.app.ncs.callingdoor.dialog.RebootDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.ServicesDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.SystemDialogHelper
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper
+import com.wdkl.app.ncs.callingdoor.helper.NetHelper
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.app.ncs.callingdoor.util.SPUtils
+import com.wdkl.ncs.android.lib.base.BaseActivity
+import com.wdkl.ncs.android.lib.base.BaseApplication
+import com.wdkl.ncs.android.lib.utils.AppTool
+import com.wdkl.ncs.android.lib.utils.EcodeHelper
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.api.UrlManager
+import com.wdkl.ncs.android.middleware.common.Constant
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.CallingdoorActivationContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.CallingdoorActivationPresenter
+import com.wdkl.ncs.android.middleware.model.ThirdServerInfo
+import com.wdkl.ncs.android.middleware.udp.ServerInfoUtil
+import com.wdkl.ncs.android.middleware.utils.CommonUtils
+import kotlinx.android.synthetic.main.callingdoor_activation.*
+import okhttp3.OkHttpClient
+import okhttp3.Request
+import java.util.concurrent.TimeUnit
+
+/**
+  * 激活页面
+  * */
+ @Router(path = "/callingdoor/activation")
+class CallingdoorActivationActivity  : BaseActivity<CallingdoorActivationPresenter, CallingdoorActivationBinding>(), CallingdoorActivationContract.View {
+
+    private val TAG = "CallingdoorActivationActivity"
+    val QR_CODE_PATH = "http://m.wdklian.com/care/apk/care.user?type=NCS_DEVICE"
+    private val handler by lazy { Handler(Looper.getMainLooper()) }
+    //服务器是否请求成功
+    private var serverSuccess = false
+    //是否重启
+    private var cancelRestart = false
+
+    override fun getLayId(): Int {
+       return R.layout.callingdoor_activation
+    }
+
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+
+    override fun init() {
+        showui()
+        checkServer()
+
+    }
+
+    override fun bindEvent() {
+        //设备重启
+        activation_settings_button.setOnClickListener {
+            RebootDialogHelper.showDialog(activity)
+        }
+        //系统设置
+        activation_system_button.setOnClickListener {
+            SystemDialogHelper.showDialog(activity)
+        }
+        //服务器设置
+        activation_services_button.setOnClickListener {
+            ServicesDialogHelper.showDialog(activity, object : ServicesDialogHelper.ClickListener {
+                override fun onClick(bedVO: String?) {
+                    setfuq()
+                }
+            })
+        }
+    }
+
+    override fun destory() {
+
+    }
+    private fun showui(){
+        //设置二维码
+        setQrcode()
+        val isActivation = SPUtils.get(this, Constant.APP_ACTIVATION, "");
+        if (isActivation.equals("已激活")){
+            activation_title.setText("系统连接失败")
+            activation_title.setTextColor(resources.getColor(R.color.red_color))
+            activation_title_msg.setText("请检查网络与服务器地址")
+            activation_title.setTextColor(resources.getColor(R.color.red_color))
+        }else{
+            activation_title.setText("请先激活设备")
+            activation_title.setTextColor(resources.getColor(R.color.white))
+            activation_title_msg.setText("设置右侧参数后激活")
+            activation_title.setTextColor(resources.getColor(R.color.white))
+        }
+        //rk3288使用序列号注册,其他使用mac地址注册
+        if ("rk3288".equals(Build.MODEL)) {
+            val yfRk3288ApiManager = YF_RK3288_API_Manager(activity)
+            //获取设备序列号
+            Constant.DEVICE_SN = yfRk3288ApiManager.yfgetSerialNumber()
+            Constant.DEVICE_REGISTER_ID = Constant.DEVICE_SN
+
+            //点亮屏幕并设置为永不休眠
+            yfRk3288ApiManager.yfSetLCDOn()
+            AppTool.Setting.setScreenOffTimeOut(activity, 2147483647)
+        } else {
+            //获取mac地址
+            Constant.LOCAL_MAC = NetHelper.getInstance().macAddress
+            Constant.DEVICE_REGISTER_ID = Constant.LOCAL_MAC
+        }
+        activation_v.text =  BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL
+        activation_ip.text = NetHelper.getInstance().localIP
+        activation_wg.text = NetHelper.getInstance().gateway()
+        activation_ym.text= NetHelper.getInstance().getmask()
+        activation_zcm.text=  Constant.DEVICE_REGISTER_ID
+        val buildUrl = UrlManager.build()
+        activation_fuq.text=   buildUrl.buyer.substringAfterLast("//").substringBefore(":")
+    }
+     fun setfuq(){
+         activation_fuq.text=CommonUtils.getUrl(this)
+         showMessage("请重启设备,重新激活设备")
+    }
+
+    //设置二维码
+    private fun setQrcode(){
+        Thread{
+            //val logoBitmap = BitmapFactory.decodeResource(resources, R.mipmap.erlogo)
+            var builder = StringBuilder()
+            builder.append(QR_CODE_PATH)
+            builder.append("&code=")
+            builder.append(Constant.DEVICE_CODE)
+            builder.append("&mac=")
+            builder.append(Constant.DEVICE_REGISTER_ID)
+            builder.append("&model=")
+            builder.append(Constant.DEVICE_MODEL)
+            builder.append("&hard_ver=")
+            builder.append(Constant.DEVICE_HARD_VER)
+            builder.append("&soft_ver=")
+            builder.append(Constant.DEVICE_SOFT_VER)
+            builder.append("&device_type=")
+            builder.append(Constant.DEVICE_TYPE)
+            builder.append("&device_name=")
+            builder.append(Constant.DEVICE_NAME)
+            val code = EcodeHelper().createQRImage(builder.toString(), 200, null)
+            activity.runOnUiThread {
+                activation_qr_code?.setImageBitmap(code)
+            }
+        }.start()
+    }
+
+
+
+    private fun checkServer() {
+        Thread {
+            while (!serverSuccess) {
+                val okHttpClient = OkHttpClient().newBuilder()
+                        .connectTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
+                        .readTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
+                        .writeTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
+                        .build()
+                val url: String = CommonUtils.getUrl(BaseApplication.appContext)
+                val port: String = CommonUtils.getUrlPort(BaseApplication.appContext)
+                val request = Request.Builder()
+                        .url("http://$url:$port/ncs_url/server_info")
+                        .get()
+                        .build()
+
+                try {
+                    val response = okHttpClient.newCall(request).execute()
+                    if (response != null && response.isSuccessful) {
+                        //接口数据获取成功,进入下一步获取设备信息
+                        serverSuccess = true
+                        val intent = Intent()
+                        intent.setClass(activity, CallingdoorActivity::class.java)
+                        activity.startActivity(intent)
+                    } else {
+                        //接口数据获取失败,可能服务器ip不对,尝试重新获取服务器ip
+                        val info = ServerInfoUtil.get(Constant.DEVICE_REGISTER_ID!!)
+                        checkServerInfo(info)
+                    }
+                } catch (e: Exception) {
+                    //接口数据获取失败,可能服务器ip不对,尝试重新获取服务器ip
+                    val info = ServerInfoUtil.get(Constant.DEVICE_REGISTER_ID!!)
+                    checkServerInfo(info)
+                    //e.printStackTrace()
+                }
+
+                try {
+                    Thread.sleep(30000)
+                } catch (ex: Exception) {
+                    ex.printStackTrace()
+                }
+            }
+        }.start()
+    }
+
+
+    private fun checkServerInfo(info: ThirdServerInfo?) {
+        //检查获取到的服务器ip是否可用,可用则重启app重新初始化,不可用则什么都不做,等待下次重新获取服务器ip
+        if (info != null) {
+            if (info.thirdServer == null || info.thirdServerPort == null) {
+                Log.d(TAG, "server info data null")
+                showMsgMain("get server data null")
+            } else {
+                val okHttpClient = OkHttpClient().newBuilder()
+                        .connectTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
+                        .readTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
+                        .writeTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
+                        .build()
+                val request = Request.Builder()
+                        .url("http://${info.thirdServer}:${info.thirdServerPort}/ncs_url/server_info")
+                        .get()
+                        .build()
+
+                try {
+                    val response = okHttpClient.newCall(request).execute()
+                    if (response != null && response.isSuccessful) {
+                        //接口数据获取成功,稍后重启app
+                        serverSuccess = true
+                        CommonUtils.setUrl(activity, info.thirdServer)
+                        CommonUtils.setUrlPort(activity, info.thirdServerPort.toString())
+                        showMsgMain("restart...")
+                        handler.postDelayed({
+                            if (!cancelRestart) {
+                                AppUpdateHelper.restartApp(activity)
+                            }
+                        }, 10000)
+                    }
+                } catch (e: Exception) {
+                    e.printStackTrace()
+                    showMsgMain("server error or net error")
+                }
+            }
+        } else {
+            Log.d(TAG, "server info null")
+            showMsgMain("get server null")
+        }
+    }
+
+    private fun showMsgMain(msg: String) {
+        runOnUiThread {
+            showMessage(msg)
+        }
+    }
+
+    //数据加载错误
+    override fun onError(message: String, type: Int) {
+
+    }
+    //数据加载完成
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    //开始获取数据
+    override fun start() {
+        //
+    }
+
+    //网络监听
+    override fun networkMonitor(state: NetState) {
+        state.filter(onMobile = {
+
+        }, onWifi = {
+
+        }, offline = {
+
+        })
+    }
+
+}

+ 238 - 278
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt

@@ -22,7 +22,7 @@ import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.agreement.CallingdoorAgreement
 import com.wdkl.app.ncs.callingdoor.bean.CallingItem
 import com.wdkl.app.ncs.callingdoor.bean.Trans433Data
-import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorMainLayBinding
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorMainNewBinding
 import com.wdkl.app.ncs.callingdoor.fragment.*
 import com.wdkl.app.ncs.callingdoor.helper.*
 import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
@@ -69,6 +69,7 @@ import kotlinx.android.synthetic.main.callingdoor_main_lay.room_action_language_
 import kotlinx.android.synthetic.main.callingdoor_main_lay.tv_room_name
 import kotlinx.android.synthetic.main.callingdoor_main_lay.view_flipper
 import kotlinx.android.synthetic.main.callingdoor_main_lay_rk3288.*
+import kotlinx.android.synthetic.main.callingdoor_main_new.*
 import kotlinx.android.synthetic.main.view_bed_name.*
 import kotlinx.android.synthetic.main.view_title_layout.*
 import okhttp3.OkHttpClient
@@ -95,17 +96,25 @@ import kotlin.collections.ArrayList
  */
 
 @Router(path = "/callingdoor/main")
-class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, CallingdoorMainLayBinding>(), CallingdoorActivityContract.View, CallingdoorAgreement,
+class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, CallingdoorMainNewBinding>(), CallingdoorActivityContract.View, CallingdoorAgreement,
     SerialPortUtil.ISerialPortBedOnclickEvent, SerialPortUtil.ISerialPortBedOnclickString, SerialPortUtil433.ISerialPort433Data {
+
     var TAG = CallingdoorActivity::class.java.getSimpleName()
 
     private lateinit var receiver: TimeReceiver
     private var curFragment = ""
-
     //首页
     private val mainFragment = "main_fragment"
     //二维码
     private val qrFragment = "qr_fragment"
+    //医护
+    private val yhFragment = "yh_fragment"
+    //进入医护
+    private val NurseFragment = "nurse_fragment"
+
+//    private val moreFragment = "more_fragment"
+    //更多
+    private val nwFragment = "nw_fragment"
     //test
     private val testFragment = "test_fragment"
 
@@ -122,7 +131,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     private var clickVersionTime : Long = 0
     private var clickCount = 1
 
-    private var serverSuccess = false
+
     private var cancelRestart = false
     private var copyDone = false
 
@@ -136,11 +145,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     private var netErrCount : Int = 0
 
     override fun getLayId(): Int {
-        if ("rk3288".equals(Build.MODEL)) {
-            return R.layout.callingdoor_main_lay_rk3288
-        } else {
-            return R.layout.callingdoor_main_lay
-        }
+        //这里来判断横屏还是竖屏
+        return R.layout.callingdoor_main_new
     }
 
     override fun bindDagger() {
@@ -150,32 +156,14 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     override fun onCreate(savedInstanceState: Bundle?) {
         val languageId: Int = SettingConfig.getLanguageId(this)
         LocaleMangerUtils.setApplicationLanguageByIndex(this, languageId)
-
         super.onCreate(savedInstanceState)
     }
 
     override fun init() {
-        //rk3288使用序列号注册,其他使用mac地址注册
-        if ("rk3288".equals(Build.MODEL)) {
-            val yfRk3288ApiManager = YF_RK3288_API_Manager(activity)
-            //获取设备序列号
-            Constant.DEVICE_SN = yfRk3288ApiManager.yfgetSerialNumber()
-            Constant.DEVICE_REGISTER_ID = Constant.DEVICE_SN
-
-            //点亮屏幕并设置为永不休眠
-            yfRk3288ApiManager.yfSetLCDOn()
-            AppTool.Setting.setScreenOffTimeOut(activity, 2147483647)
-        } else {
-            //获取mac地址
-            Constant.LOCAL_MAC = NetHelper.getInstance().macAddress
-            Constant.DEVICE_REGISTER_ID = Constant.LOCAL_MAC
-        }
-
         //presenter.loadTcpServerHost()
         //注册广播
         regReceiver()
         RecordHelper.getInstance().init()
-
         if (!EventBus.getDefault().isRegistered(this)) {
             EventBus.getDefault().register(this)
         }
@@ -187,21 +175,20 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             AppTool.Time.delay(1500) {
                 //串口监听
                 setSerialListener()
-
                 //打开MIC
                 SerialPortHelper.setMIC(false)
                 SerialPortHelper.setHandsFree(true)
                 SerialPortHelper.setSosLight("0")
                 //默认门灯白色
                 //SerialPortHelper.setDoorLight(1, "111")
-
-                Constant.inNursing = SettingConfig.getInNursing(activity)
-                if (Constant.inNursing) {
-                    nursingInteId = SettingConfig.getNursingId(activity)
-                    enterNursing()
-                } else {
-                    SerialPortHelper.setDoorLight(0, "000")
-                }
+                //护理状态
+//                Constant.inNursing = SettingConfig.getInNursing(activity)
+//                if (Constant.inNursing) {
+//                    nursingInteId = SettingConfig.getNursingId(activity)
+//                    enterNursing()
+//                } else {
+//                    SerialPortHelper.setDoorLight(0, "000")
+//                }
             }
 
             //设置默认时区为中国标准时间
@@ -218,10 +205,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         }
         SpeechUtil.getInstance().setSpeechLoopCount(3)
 
-        app_version.text = "V" + BuildConfig.VERSION_NAME
-
-        //显示二维码界面
-        switchFragment(R.id.callingdoor_main_frame, QrCodeFragment(), qrFragment)
+//        app_version.text = "V" + BuildConfig.VERSION_NAME
+//        //显示二维码界面
+//        switchFragment(R.id.callingdoor_main_frame, QrCodeFragment(), qrFragment)
 
         //记录app启动时间
         val lastTime = SettingConfig.getAppStartTime(activity)
@@ -233,8 +219,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
 
         //初始化soundpool
         SoundPoolManager.getInstance().init()
-
-        checkServer()
+        //请求设备信息
+        presenter.loadServerInfo()
 
         if ("rk3128".equals(Build.MODEL)) {
             checkLaunch()
@@ -247,8 +233,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         //3288 15.6寸竖屏:width=1080, height=1920
         //3288 10.1寸竖屏:width=800,  height=1280
         Log.d(TAG, "device orientation: ${Constant.DEVICE_ORIENTATION}, width: ${dm.widthPixels}, height: ${dm.heightPixels}")
-
-        startScheduledExecutor()
+        //显示分机呼叫
+//        startScheduledExecutor()
     }
 
     //检查launch版本
@@ -315,89 +301,6 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
 
-    private fun checkServer() {
-        Thread {
-            while (!serverSuccess) {
-                val okHttpClient = OkHttpClient().newBuilder()
-                    .connectTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
-                    .readTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
-                    .writeTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
-                    .build()
-                val url: String = CommonUtils.getUrl(BaseApplication.appContext)
-                val port: String = CommonUtils.getUrlPort(BaseApplication.appContext)
-                val request = Request.Builder()
-                    .url("http://$url:$port/ncs_url/server_info")
-                    .get()
-                    .build()
-
-                try {
-                    val response = okHttpClient.newCall(request).execute()
-                    if (response != null && response.isSuccessful) {
-                        //接口数据获取成功,进入下一步获取设备信息
-                        serverSuccess = true
-                        presenter.loadServerInfo()
-                    } else {
-                        //接口数据获取失败,可能服务器ip不对,尝试重新获取服务器ip
-                        val info = ServerInfoUtil.get(Constant.DEVICE_REGISTER_ID!!)
-                        checkServerInfo(info)
-                    }
-                } catch (e: Exception) {
-                    //接口数据获取失败,可能服务器ip不对,尝试重新获取服务器ip
-                    val info = ServerInfoUtil.get(Constant.DEVICE_REGISTER_ID!!)
-                    checkServerInfo(info)
-                    //e.printStackTrace()
-                }
-
-                try {
-                    Thread.sleep(30000)
-                } catch (ex: Exception) {
-                    ex.printStackTrace()
-                }
-            }
-        }.start()
-    }
-
-    private fun checkServerInfo(info: ThirdServerInfo?) {
-        //检查获取到的服务器ip是否可用,可用则重启app重新初始化,不可用则什么都不做,等待下次重新获取服务器ip
-        if (info != null) {
-            if (info.thirdServer == null || info.thirdServerPort == null) {
-                Log.d(TAG, "server info data null")
-                showMsgMain("get server data null")
-            } else {
-                val okHttpClient = OkHttpClient().newBuilder()
-                    .connectTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
-                    .readTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
-                    .writeTimeout(15 * 1000L, TimeUnit.MILLISECONDS)
-                    .build()
-                val request = Request.Builder()
-                    .url("http://${info.thirdServer}:${info.thirdServerPort}/ncs_url/server_info")
-                    .get()
-                    .build()
-
-                try {
-                    val response = okHttpClient.newCall(request).execute()
-                    if (response != null && response.isSuccessful) {
-                        //接口数据获取成功,稍后重启app
-                        serverSuccess = true
-                        CommonUtils.setUrl(activity, info.thirdServer)
-                        CommonUtils.setUrlPort(activity, info.thirdServerPort.toString())
-                        showMsgMain("restart...")
-                        handler.postDelayed({
-                            if (!cancelRestart) {
-                                AppUpdateHelper.restartApp(activity)
-                            }
-                        }, 10000)
-                    }
-                } catch (e: Exception) {
-                    e.printStackTrace()
-                    showMsgMain("server error or net error")
-                }
-            }
-        } else {
-            Log.d(TAG, "server info null")
-            showMsgMain("get server null")
-        }
-    }
 
     private fun startScheduledExecutor() {
         val timerTask: TimerTask = object : TimerTask() {
@@ -410,11 +313,6 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         executor!!.scheduleAtFixedRate(timerTask, 100, 30, TimeUnit.SECONDS)
     }
 
-    private fun showMsgMain(msg: String) {
-        runOnUiThread {
-            showMessage(msg)
-        }
-    }
 
     //测试模式
     fun startTestMode() {
@@ -422,6 +320,20 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             switchFragment(R.id.callingdoor_main_frame, TestFragment(), testFragment)
         }
     }
+    //进入医护
+    fun startYhMode() {
+        if (!NurseFragment.equals(curFragment)) {
+            switchFragment(R.id.callingdoor_main_frame, NurseFragment(), NurseFragment)
+        }
+    }
+    //会到首页
+    fun BackMain() {
+        if (!mainFragment.equals(curFragment)) {
+            updateLeftBtState(mainFragment)
+            switchFragment(R.id.callingdoor_main_frame, MainFragment(), mainFragment)
+        }
+
+    }
 
     fun switchFragment(id: Int, fragment: Fragment, tag: String) {
         supportFragmentManager.beginTransaction()
@@ -481,53 +393,78 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
 
     override fun bindEvent() {
         //护理按钮
-        room_action_nurse.setOnLongClickListener {
-            if (!Constant.TCP_CONNECTED) {
-                showMessage(R.string.net_error)
-                return@setOnLongClickListener true
+//        room_action_nurse.setOnLongClickListener {
+//            if (!Constant.TCP_CONNECTED) {
+//                showMessage(R.string.net_error)
+//                return@setOnLongClickListener true
+//            }
+//
+//            if (Constant.DEVICE_ID == -1) {
+//                showMessage("null device id!")
+//                return@setOnLongClickListener true
+//            }
+//
+//            if (Constant.inNursing) {
+//                Constant.inNursing = false
+//                SettingConfig.setInNursing(activity, false)
+//                exitNursing()
+//
+//                if (Constant.DEVICE_ID != -1 && nursingInteId != -1) {
+//                    OtherUtil.sendNursingEnd(Constant.DEVICE_ID, nursingInteId)
+//                    nursingInteId = -1
+//                }
+//            } else {
+//                Constant.inNursing = true
+//                SettingConfig.setInNursing(activity, true)
+//                enterNursing()
+//
+//                if (Constant.DEVICE_ID != -1) {
+//                    OtherUtil.sendNursing(Constant.DEVICE_ID)
+//                }
+//            }
+//
+//            return@setOnLongClickListener true
+//        }
+
+//        room_action_nurse.setOnClickListener {
+//            showMessage(R.string.enter_nursing_tips)
+//        }
+        //首页
+        menu_home.setOnClickListener {
+            if (!mainFragment.equals(curFragment)) {
+                updateLeftBtState(mainFragment)
+                switchFragment(R.id.callingdoor_main_frame, MainFragment(), mainFragment)
             }
 
-            if (Constant.DEVICE_ID == -1) {
-                showMessage("null device id!")
-                return@setOnLongClickListener true
+        }
+        //医护
+        menu_medical_care.setOnClickListener {
+            if (!yhFragment.equals(curFragment)) {
+                updateLeftBtState(yhFragment)
+                switchFragment(R.id.callingdoor_main_frame, YhFragment(), yhFragment)
             }
 
-            if (Constant.inNursing) {
-                Constant.inNursing = false
-                SettingConfig.setInNursing(activity, false)
-                exitNursing()
-
-                if (Constant.DEVICE_ID != -1 && nursingInteId != -1) {
-                    OtherUtil.sendNursingEnd(Constant.DEVICE_ID, nursingInteId)
-                    nursingInteId = -1
-                }
-            } else {
-                Constant.inNursing = true
-                SettingConfig.setInNursing(activity, true)
-                enterNursing()
-
-                if (Constant.DEVICE_ID != -1) {
-                    OtherUtil.sendNursing(Constant.DEVICE_ID)
-                }
+        }
+        //更多
+        menu_more.setOnClickListener {
+            if (!nwFragment.equals(curFragment)) {
+                updateLeftBtState(nwFragment)
+                switchFragment(R.id.callingdoor_main_frame, NursingWorkFragment(), nwFragment)
             }
 
-            return@setOnLongClickListener true
         }
 
-        room_action_nurse.setOnClickListener {
-            showMessage(R.string.enter_nursing_tips)
-        }
 
         //增援按钮
-        room_action_support.setOnClickListener {
+        menu_support.setOnClickListener {
             if (Constant.TCP_CONNECTED) {
                 if (Constant.DEVICE_ID != -1) {
                     OtherUtil.sendReinforce(Constant.DEVICE_ID)
                     showMessage(R.string.support_sent)
-                    room_action_support.isEnabled = false
+                    menu_support.isEnabled = false
                     AppTool.Time.delay(10000) {
                         //10s后才能再按
-                        room_action_support.isEnabled = true
+                        menu_support.isEnabled = true
                     }
                 } else {
                     showMessage("null device id!")
@@ -537,8 +474,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             }
         }
 
-        //呼叫按钮
-        room_action_call.setOnClickListener {
+        //呼叫护士按钮
+        menu_call_nurse.setOnClickListener {
             val time = System.currentTimeMillis()
             if (time - clickTime > 2000) {
                 //防止重复点击
@@ -563,8 +500,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 showMessage(R.string.wait_moment)
             }
         }
-
-        room_action_call_bed.setOnClickListener {
+        //呼叫床位按钮
+        menu_call_bed.setOnClickListener {
             if (Utils.getInBedVOS().size > 0) {
                 CallbedDialogHelper.showDialog(activity, object : CallbedDialogHelper.ClickListener {
                     override fun onVideoClick(bedVO: FrameBedVO?) {
@@ -588,64 +525,64 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             }
         }
 
-        //门口机取消分机呼叫
-        room_cancel_call.setOnClickListener {
-            if (Constant.TCP_CONNECTED) {
-                if (Constant.DEVICE_ID != -1) {
-                    VoiceUtil.cancelCallByDoor(Constant.DEVICE_ID)
-                } else {
-                    showMessage("null device id!")
-                }
-            } else {
-                showMessage(R.string.net_error)
-            }
-
-            Constant.callNums == 0
-            DoorLightHelper.resetDoorLight()
-
-            SpeechUtil.getInstance().stopSpeak()
-            bedCalls.clear()
-            view_flipper.removeAllViews()
-        }
-
-        app_version.setOnLongClickListener {
-            AppInfoDialogHelper.showAppDialog(activity,
-                { dialog, which -> AppUpdateHelper.reboot(activity) },
-                { dialog, which ->
-                    Constant.silentUpdate = false
-                    checkAppVersion()
-                }, { dialog, which ->
-                    showMessage("debug enable")
-                    openNetwrokDebug()
-                })
-
-            return@setOnLongClickListener true
-        }
+        //门口机取消分机呼叫(此处要修改)
+//        room_cancel_call.setOnClickListener {
+//            if (Constant.TCP_CONNECTED) {
+//                if (Constant.DEVICE_ID != -1) {
+//                    VoiceUtil.cancelCallByDoor(Constant.DEVICE_ID)
+//                } else {
+//                    showMessage("null device id!")
+//                }
+//            } else {
+//                showMessage(R.string.net_error)
+//            }
+//
+//            Constant.callNums == 0
+//            DoorLightHelper.resetDoorLight()
+//
+//            SpeechUtil.getInstance().stopSpeak()
+//            bedCalls.clear()
+//            view_flipper.removeAllViews()
+//        }
+        //长按 版本号出现 (此处需要调整)
+//        app_version.setOnLongClickListener {
+//            AppInfoDialogHelper.showAppDialog(activity,
+//                { dialog, which -> AppUpdateHelper.reboot(activity) },
+//                { dialog, which ->
+//                    Constant.silentUpdate = false
+//                    checkAppVersion()
+//                }, { dialog, which ->
+//                    showMessage("debug enable")
+//                    openNetwrokDebug()
+//                })
+//
+//            return@setOnLongClickListener true
+//        }
 
         //if ("rk3288".equals(Build.MODEL)) {
-            app_version.setOnClickListener {
-                if (System.currentTimeMillis() - clickVersionTime < 1500) {
-                    clickCount++
-                } else {
-                    clickCount = 1
-                }
-
-                if (clickCount == 5) {
-                    showMessage(R.string.enter_settings_tips)
-                }
-
-                if (clickCount > 7) {
-                    clickCount = 1
-                    AppTool.Setting.systemSetting(activity)
-                }
-                clickVersionTime = System.currentTimeMillis()
-            }
+//            app_version.setOnClickListener {
+//                if (System.currentTimeMillis() - clickVersionTime < 1500) {
+//                    clickCount++
+//                } else {
+//                    clickCount = 1
+//                }
+//
+//                if (clickCount == 5) {
+//                    showMessage(R.string.enter_settings_tips)
+//                }
+//
+//                if (clickCount > 7) {
+//                    clickCount = 1
+//                    AppTool.Setting.systemSetting(activity)
+//                }
+//                clickVersionTime = System.currentTimeMillis()
+//            }
         //}
 
-
-        room_action_language_set.setOnClickListener {
-            LanguageSetDialogHelper.showDialog(activity)
-        }
+//        //语言设置
+//        room_action_language_set.setOnClickListener {
+//            LanguageSetDialogHelper.showDialog(activity)
+//        }
     }
 
     //开启网络调试
@@ -852,6 +789,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     override fun showDeviceInfo(deviceInfo: DeviceRoomInfoVO) {
         //显示床位信息界面
         if (!mainFragment.equals(curFragment)) {
+            updateLeftBtState(mainFragment)
             switchFragment(R.id.callingdoor_main_frame, MainFragment(), mainFragment)
         }
 
@@ -866,6 +804,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         Constant.DEVICE_SOFT_VER = deviceInfo.softVer
         Constant.DEVICE_HARD_VER = deviceInfo.hardVer
         Constant.DEVICE_NAME = deviceInfo.name
+        Constant.DEVICE_INFO = Gson().toJson(deviceInfo)
         if (deviceInfo.status != null) {
             Constant.DEVICE_STATUS = deviceInfo.status
         }
@@ -877,22 +816,21 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         if (TextUtils.isEmpty(Constant.SIP_ID)) {
             showMessage("SIP ID empty")
         }
-        if (Constant.DEVICE_STATUS == 0) {
-            tv_room_name.setText(R.string.device_disable)
-            tv_room_name.setTextColor(resources.getColor(R.color.red_color))
-        } else {
-            tv_room_name.text = Constant.ROOM_NAME
-            tv_room_name.setTextColor(resources.getColor(R.color.main_color))
-        }
+        //显示床号(此处要处理)
+//        if (Constant.DEVICE_STATUS == 0) {
+//            tv_room_name.setText(R.string.device_disable)
+//            tv_room_name.setTextColor(resources.getColor(R.color.red_color))
+//        } else {
+//            tv_room_name.text = Constant.ROOM_NAME
+//            tv_room_name.setTextColor(resources.getColor(R.color.main_color))
+//        }
 
         if (deviceInfo.frameId != null) {
             Constant.FRAME_ID = deviceInfo.frameId
             //EventBus.getDefault().post(MessageEvent("updateCustom", Constant.EVENT_UPDATE_CUSTOM))
         }
-
+        //请求设置参数
         presenter.loadPartSettings(Constant.PART_ID)
-
-
         //检查版本
         Constant.silentUpdate = true
         checkAppVersion()
@@ -929,23 +867,25 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 Constant.nurseValid = partSetting.nurseValid
             }
 
-            //按钮名称显示
-            if (!TextUtils.isEmpty(partSetting.doorNurseTitle)) {
-                room_action_call.visibility = View.VISIBLE
-                room_action_call.text = partSetting.doorNurseTitle
-            }
-            if (partSetting.doorNurseValid != null && partSetting.doorNurseValid == 0) {
-                room_action_call.visibility = View.GONE
-            }
-
-            if (!TextUtils.isEmpty(partSetting.doorNursingTitle)) {
-                room_action_nurse.visibility = View.VISIBLE
-                room_action_nurse.text = partSetting.doorNursingTitle
-                Constant.NursingTitle = partSetting.doorNursingTitle
-            }
-            if (partSetting.doorNursingValid != null && partSetting.doorNursingValid == 0) {
-                room_action_nurse.visibility = View.GONE
-            }
+//            //按钮名称显示
+//            if (!TextUtils.isEmpty(partSetting.doorNurseTitle)) {
+//                menu_call_nurse.visibility = View.VISIBLE
+//                menu_call_nurse.text = partSetting.doorNurseTitle
+//            }
+//            if (partSetting.doorNurseValid != null && partSetting.doorNurseValid == 0) {
+//                menu_call_nurse.visibility = View.GONE
+//            }
+
+            //进入护理 ?设置名字
+//            if (!TextUtils.isEmpty(partSetting.doorNursingTitle)) {
+//                room_action_nurse.visibility = View.VISIBLE
+//                room_action_nurse.text = partSetting.doorNursingTitle
+//                Constant.NursingTitle = partSetting.doorNursingTitle
+//            }
+
+//            if (partSetting.doorNursingValid != null && partSetting.doorNursingValid == 0) {
+//                room_action_nurse.visibility = View.GONE
+//            }
 
             //护理门灯颜色
             if (partSetting.nursingColorRgb != null && partSetting.nursingColorRgb.length == 3 && TextUtils.isDigitsOnly(partSetting.nursingColorRgb)) {
@@ -1406,7 +1346,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                     }
                 }*/
             }
-
+//分机呼叫显示
             showCalls()
         } catch (ex: Exception) {
             ex.printStackTrace()
@@ -1414,30 +1354,30 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     private fun showCalls() {
-        synchronized(Unit) {
-            if (bedCalls.size > 0) {
-                view_flipper.removeAllViews()
-                for ((index, e) in bedCalls.withIndex()) {
-                    val textView = TextView(activity)
-                    textView.text = e.text
-                    textView.setSingleLine(true)
-                    textView.setEllipsize(TextUtils.TruncateAt.END)
-                    textView.setTextColor(Color.RED)
-                    if ("rk3288".equals(Build.MODEL)) {
-                        textView.textSize = 48f
-                    } else {
-                        textView.textSize = 32f
-                    }
-                    textView.gravity = (Gravity.END or Gravity.CENTER)
-                    //textView.getPaint().setFlags(mFlags);//字体划线
-                    //textView.setTypeface(null, mTypeface);//字体样式
-
-                    view_flipper.addView(textView, index)
-                }
-            } else {
-                view_flipper.removeAllViews()
-            }
-        }
+//        synchronized(Unit) {
+//            if (bedCalls.size > 0) {
+//                view_flipper.removeAllViews()
+//                for ((index, e) in bedCalls.withIndex()) {
+//                    val textView = TextView(activity)
+//                    textView.text = e.text
+//                    textView.setSingleLine(true)
+//                    textView.setEllipsize(TextUtils.TruncateAt.END)
+//                    textView.setTextColor(Color.RED)
+//                    if ("rk3288".equals(Build.MODEL)) {
+//                        textView.textSize = 48f
+//                    } else {
+//                        textView.textSize = 32f
+//                    }
+//                    textView.gravity = (Gravity.END or Gravity.CENTER)
+//                    //textView.getPaint().setFlags(mFlags);//字体划线
+//                    //textView.setTypeface(null, mTypeface);//字体样式
+//
+//                    view_flipper.addView(textView, index)
+//                }
+//            } else {
+//                view_flipper.removeAllViews()
+//            }
+//        }
     }
 
     private fun checkCalls() {
@@ -1468,13 +1408,13 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         this.runOnUiThread {
             when (state) {
                 SipStatus.REGISTERING -> {
-                    view_title_layout_tv_point.setBackgroundResource(R.color.yellow_color)
+                    view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_y)
                 }
                 SipStatus.REGISTERFAIL -> {
-                    view_title_layout_tv_point.setBackgroundResource(R.color.red_color)
+                    view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_h)
                 }
                 SipStatus.REGISTERCOM -> {
-                    view_title_layout_tv_point.setBackgroundResource(R.color.green)
+                    view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_b)
                 }
             }
         }
@@ -1535,13 +1475,33 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     private fun updateTcpState() {
         if (Constant.TCP_CONNECTED) {
             view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_success)
-            view_title_layout_tv_point.setBackgroundResource(R.color.green)
+            view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_b)
         } else {
             view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_fail)
-            view_title_layout_tv_point.setBackgroundResource(R.color.red_color)
+            view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_h)
         }
     }
+    private fun updateLeftBtState(state: String) {
+        menu_home.setBackgroundResource(R.drawable.shape_main_bt_bg)
+        menu_home.setTextColor(getResources().getColor(R.color.white));
+        menu_medical_care.setBackgroundResource(R.drawable.shape_main_bt_bg)
+        menu_medical_care.setTextColor(getResources().getColor(R.color.white));
+        menu_more.setBackgroundResource(R.drawable.shape_main_bt_bg)
+        menu_more.setTextColor(getResources().getColor(R.color.white));
+        if(state.equals(mainFragment)){
+            //首页
+            menu_home.setBackgroundResource(R.drawable.shape_main_bt_bg2)
+            menu_home.setTextColor(getResources().getColor(R.color.delete_text_color));
+        }else if(state.equals(yhFragment)){
+            menu_medical_care.setBackgroundResource(R.drawable.shape_main_bt_bg2)
+            menu_medical_care.setTextColor(getResources().getColor(R.color.delete_text_color));
+        }else{
+            menu_more.setBackgroundResource(R.drawable.shape_main_bt_bg2)
+            menu_more.setTextColor(getResources().getColor(R.color.delete_text_color));
+        }
+
 
+    }
     private fun updateSettings(forceSet: Boolean) {
         val  currentTimestamp = System.currentTimeMillis()
 

+ 78 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/SetHintActivity.kt

@@ -0,0 +1,78 @@
+package com.wdkl.app.ncs.callingdoor.activity
+
+import android.view.View
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorNurseMsgBinding
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorTestMainBinding
+import com.wdkl.app.ncs.callingdoor.dialog.RebootDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.ScreenSaverDialogHelper
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseActivity
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.SetHintActivityContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.SetHintActivityPresenter
+import kotlinx.android.synthetic.main.callingdoor_nurse_msg.*
+import kotlinx.android.synthetic.main.callingdoor_test_main.*
+import kotlinx.android.synthetic.main.view_title_layout.*
+
+/**
+ * 设置提示语
+ * */
+class SetHintActivity : BaseActivity<SetHintActivityPresenter, CallingdoorNurseMsgBinding>(), SetHintActivityContract.View {
+
+    private val TAG = "SetHintActivity"
+    override fun getLayId(): Int {
+        return R.layout.callingdoor_nurse_msg
+    }
+
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+
+    override fun init() {
+        showui()
+    }
+
+    override fun bindEvent() {
+        //测试显示待机页面:暂时没有接口
+        nurse_msg_tx_5.setOnClickListener {
+            ScreenSaverDialogHelper.showDialog(activity)
+        }
+        //返回上一层
+        view_title_layout_return.setOnClickListener {
+            view_title_layout_img.visibility = View.GONE
+            view_title_layout_tv_no.visibility =View.GONE
+            finish()
+        }
+    }
+
+    private fun showui(){
+        view_title_layout_tv_hospital_name.text ="返回上层"
+        view_title_layout_img.visibility = View.VISIBLE
+        view_title_layout_tv_no.visibility = View.VISIBLE
+        view_title_layout_tv_no.text ="设置提示语"
+    }
+
+    override fun destory() {
+
+    }
+
+    override fun onError(message: String, type: Int) {
+
+    }
+
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    override fun start() {
+
+    }
+
+    override fun networkMonitor(state: NetState) {
+
+    }
+
+
+}

+ 195 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/SystemActivity.kt

@@ -0,0 +1,195 @@
+package com.wdkl.app.ncs.callingdoor.activity
+
+import android.content.Intent
+import android.os.Build
+import android.view.View
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.BuildConfig
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorSettingMainBinding
+import com.wdkl.app.ncs.callingdoor.dialog.NetworkDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.RebootDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.ServicesDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.UpdataDialogHelper
+import com.wdkl.app.ncs.callingdoor.helper.NetHelper
+import com.wdkl.app.ncs.callingdoor.helper.UpdateTipsDialogHelper
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseActivity
+import com.wdkl.ncs.android.lib.utils.EcodeHelper
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.api.UrlManager
+import com.wdkl.ncs.android.middleware.common.Constant
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.SystemActivityContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.SystemActivityPresenter
+import com.wdkl.ncs.android.middleware.model.dos.AppVersionDO
+import com.wdkl.ncs.android.middleware.utils.CommonUtils
+import kotlinx.android.synthetic.main.callingdoor_setting_main.*
+import kotlinx.android.synthetic.main.view_title_layout.*
+
+class SystemActivity : BaseActivity<SystemActivityPresenter, CallingdoorSettingMainBinding>(), SystemActivityContract.View {
+    private val TAG = "SystemActivity"
+    val QR_CODE_PATH = "http://m.wdklian.com/care/apk/care.user?type=NCS_DEVICE"
+
+    override fun getLayId(): Int {
+        return R.layout.callingdoor_setting_main
+    }
+
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+
+    override fun init() {
+        showui()
+    }
+
+    override fun bindEvent() {
+        //服务器设置
+        settings_main_1_ll.setOnClickListener {
+            ServicesDialogHelper.showDialog(activity, object : ServicesDialogHelper.ClickListener {
+                override fun onClick(bedVO: String?) {
+                    setfuq()
+                }
+            })
+        }
+        //网络设置
+        settings_main_2_ll.setOnClickListener {
+            NetworkDialogHelper.showDialog(activity)
+        }
+        //进入调试
+        settings_main_3_ll.setOnClickListener {
+            val intent = Intent()
+            intent.setClass(activity, TextActivity::class.java)
+            activity.startActivity(intent)
+        }
+        //版本更新
+        settings_main_4_ll.setOnClickListener {
+            UpdataDialogHelper.showDialog(activity, object : UpdataDialogHelper.ClickListener {
+                override fun onClick() {
+                    if (Constant.PART_ID != null) {
+                        presenter.getAppVersion(Constant.PART_ID, 3)
+                    } else {
+                        showMessage("null part id")
+                    }
+                }
+            })
+        }
+        //重启设备
+        settings_main_5_ll.setOnClickListener {
+            RebootDialogHelper.showDialog(activity)
+        }
+        //返回上一层
+        view_title_layout_return.setOnClickListener {
+            view_title_layout_img.visibility = View.GONE
+            view_title_layout_tv_no.visibility =View.GONE
+           finish()
+        }
+    }
+
+    override fun destory() {
+
+    }
+
+    fun setfuq(){
+        settings_main_10_tx.text= CommonUtils.getUrl(this)
+        showMessage("请重启设备,重新激活设备")
+    }
+
+    private fun showui(){
+        view_title_layout_tv_hospital_name.text ="返回上层"
+        view_title_layout_img.visibility = View.VISIBLE
+        view_title_layout_tv_no.visibility =View.VISIBLE
+        view_title_layout_tv_no.text ="设备信息"
+        //设置二维码
+        setQrcode()
+        //设备id
+        settings_main_6_tx.text =  ""+Constant.DEVICE_ID
+        //设备ip
+        settings_main_7_tx.text = NetHelper.getInstance().localIP
+        //设备网关
+        settings_main_8_tx.text = NetHelper.getInstance().gateway()
+        //设备dns
+        settings_main_9_tx.text= NetHelper.getInstance().getmask()
+        //服务器地址
+        val buildUrl = UrlManager.build()
+        settings_main_10_tx.text=   buildUrl.buyer.substringAfterLast("//").substringBefore(":")
+        //语音id
+        settings_main_11_tx.text= "001"+"类型"
+        //语音类型 ??
+        settings_main_12_tx.text= "001"+"类型"
+        //语音服务器
+        settings_main_13_tx.text= "001"+"类型"
+        //app版本
+        settings_main_14_tx.text =  BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL
+        //发布日期
+        settings_main_15_tx.text =  BuildConfig.BUILD_TIME
+//        activation_zcm.text=  Constant.DEVICE_REGISTER_ID
+
+    }
+    //设置二维码
+    private fun setQrcode(){
+        Thread{
+            //val logoBitmap = BitmapFactory.decodeResource(resources, R.mipmap.erlogo)
+            var builder = StringBuilder()
+            builder.append(QR_CODE_PATH)
+            builder.append("&code=")
+            builder.append(Constant.DEVICE_CODE)
+            builder.append("&mac=")
+            builder.append(Constant.DEVICE_REGISTER_ID)
+            builder.append("&model=")
+            builder.append(Constant.DEVICE_MODEL)
+            builder.append("&hard_ver=")
+            builder.append(Constant.DEVICE_HARD_VER)
+            builder.append("&soft_ver=")
+            builder.append(Constant.DEVICE_SOFT_VER)
+            builder.append("&device_type=")
+            builder.append(Constant.DEVICE_TYPE)
+            builder.append("&device_name=")
+            builder.append(Constant.DEVICE_NAME)
+            val code = EcodeHelper().createQRImage(builder.toString(), 200, null)
+            activity.runOnUiThread {
+                setting_qr_code?.setImageBitmap(code)
+            }
+        }.start()
+    }
+
+    override fun loadAppVersion(appInfo: AppVersionDO) {
+        if (BuildConfig.VERSION_CODE < appInfo.versionNo) {
+            Constant.APP_UPDATING = true
+            Constant.APP_PATH = appInfo.appPath
+            UpdateTipsDialogHelper.showDialog(activity)
+
+        } else {
+            showMessage(R.string.update_no_required)
+        }
+    }
+
+    override fun onNoNet() {
+
+    }
+
+    //数据加载错误
+    override fun onError(message: String, type: Int) {
+
+    }
+    //数据加载完成
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    //开始获取数据
+    override fun start() {
+        //
+    }
+
+    //网络监听
+    override fun networkMonitor(state: NetState) {
+        state.filter(onMobile = {
+
+        }, onWifi = {
+
+        }, offline = {
+
+        })
+    }
+}

+ 235 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/TextActivity.kt

@@ -0,0 +1,235 @@
+package com.wdkl.app.ncs.callingdoor.activity
+
+import android.content.Intent
+import android.hardware.Camera
+import android.os.Build
+import android.view.SurfaceHolder
+import android.view.View
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.BuildConfig
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorSettingMainBinding
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorTestMainBinding
+import com.wdkl.app.ncs.callingdoor.dialog.NetworkDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.RebootDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.ServicesDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.UpdataDialogHelper
+import com.wdkl.app.ncs.callingdoor.helper.*
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseActivity
+import com.wdkl.ncs.android.lib.utils.EcodeHelper
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.api.UrlManager
+import com.wdkl.ncs.android.middleware.common.Constant
+import com.wdkl.ncs.android.middleware.common.MessageEvent
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.SystemActivityContract
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.TextActivityContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.SystemActivityPresenter
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.TextActivityPresenter
+import com.wdkl.ncs.android.middleware.model.dos.AppVersionDO
+import com.wdkl.ncs.android.middleware.utils.CommonUtils
+import kotlinx.android.synthetic.main.callingdoor_setting_main.*
+import kotlinx.android.synthetic.main.callingdoor_setting_main.settings_main_1_ll
+import kotlinx.android.synthetic.main.callingdoor_test_main.*
+import kotlinx.android.synthetic.main.test_fragment_lay.*
+import kotlinx.android.synthetic.main.view_title_layout.*
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+import org.greenrobot.eventbus.ThreadMode
+
+class TextActivity : BaseActivity<TextActivityPresenter, CallingdoorTestMainBinding>(), TextActivityContract.View {
+    private val TAG = "TextActivity"
+
+    var info = ""
+    var buttonTest = false
+
+    private var mCamera: Camera? = null
+
+    override fun getLayId(): Int {
+        return R.layout.callingdoor_test_main
+    }
+
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+
+    override fun init() {
+        showui()
+        RecordHelper.getInstance().init()
+        //摄像头调用  暂无
+//        startCameraPreview()
+    }
+
+    override fun bindEvent() {
+        //  sip呼叫测试  门口机暂时没有
+        text_call_button.setOnClickListener {
+            showMessage("暂未开通")
+        }
+
+        lycs_button.setOnClickListener {
+            startTest()
+        }
+        //返回上一层
+        view_title_layout_return.setOnClickListener {
+            view_title_layout_img.visibility = View.GONE
+            view_title_layout_tv_no.visibility =View.GONE
+            finish()
+        }
+
+    }
+
+    override fun destory() {
+        if (mCamera != null) {
+            mCamera!!.stopPreview()
+            mCamera!!.release()
+            mCamera = null
+        }
+    }
+
+    fun setfuq(){
+        settings_main_10_tx.text= CommonUtils.getUrl(this)
+        showMessage("请重启设备,重新激活设备")
+    }
+
+    private fun showui(){
+        view_title_layout_tv_hospital_name.text ="返回上层"
+        view_title_layout_img.visibility = View.VISIBLE
+        view_title_layout_tv_no.visibility =View.VISIBLE
+        view_title_layout_tv_no.text ="设备调试"
+        text_sbaj_button.setBackgroundResource(R.drawable.shape_main_hos_txt_bg)
+        sbaj_img.visibility=View.INVISIBLE
+        mbhj_button.setBackgroundResource(R.drawable.shape_main_hos_txt_bg)
+        mbh_img.visibility=View.INVISIBLE
+        mbhjqx_button.setBackgroundResource(R.drawable.shape_main_hos_txt_bg)
+        mbhjjqx_img.visibility=View.INVISIBLE
+        lycs_button.setBackgroundResource(R.drawable.shape_main_hos_txt_bg)
+        lycs_img.visibility=View.INVISIBLE
+
+    }
+    //麦克风
+    private fun startTest() {
+        Thread {
+            SoundPoolManager.getInstance().playSound(3, 1.0f, 1.0f, 0)
+            Thread.sleep(2000)
+            RecordHelper.getInstance().recordTestStart()
+            Thread.sleep(2500)
+            RecordHelper.getInstance().recordTestStop()
+            Thread.sleep(500)
+            lycs_button.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.bo, 0, 0, 0)
+            lycs_button.text="播放中"
+            MediaPlayHelper.getInstance().playUrlMusic(RecordHelper.getInstance().audiofilePath, 1.0f, false)
+            Thread.sleep(3000)
+            RecordHelper.getInstance().deleteAudioFile()
+            lycs_button.setBackgroundResource(R.drawable.shape_patrol_dialog_bt_bg)
+            lycs_img.visibility=View.VISIBLE
+
+        }.start()
+    }
+    //摄像头
+    private fun startCameraPreview() {
+        val num = Camera.getNumberOfCameras()
+        if (num > 0) {
+            try {
+                mCamera = Camera.open()
+            } catch (e: Exception) {
+                tv_camera.visibility = View.VISIBLE
+                tv_camera.text = "摄像头打开失败"
+                e.printStackTrace()
+                return
+            }
+
+            camera_preview_surface.getHolder().addCallback(object : SurfaceHolder.Callback {
+                override fun surfaceCreated(holder: SurfaceHolder?) {
+                    /**
+                     * The SurfaceHolder must already contain a surface when this method is called.
+                     * If you are using SurfaceView, you will need to register a SurfaceHolder.Callback
+                     * with SurfaceHolder#addCallback(SurfaceHolder.Callback) and wait for
+                     * SurfaceHolder.Callback#surfaceCreated(SurfaceHolder) before
+                     * calling setPreviewDisplay() or starting preview.
+                     * 相机的预览必须在surfaceCreated后调用,否则黑屏且没有任何提示哦
+                     */
+
+                    try {
+                        mCamera!!.setPreviewDisplay(camera_preview_surface.getHolder())
+                        mCamera!!.startPreview()
+                    } catch (e: Exception) {
+                        e.printStackTrace()
+                    }
+                }
+
+                override fun surfaceChanged(
+                        holder: SurfaceHolder?,
+                        format: Int,
+                        width: Int,
+                        height: Int
+                ) {
+                    //
+                }
+
+                override fun surfaceDestroyed(holder: SurfaceHolder?) {
+                    //
+                }
+            })
+        } else {
+            tv_camera.visibility = View.VISIBLE
+            tv_camera.text = "没有摄像头"
+        }
+    }
+
+    override fun onStart() {
+        EventBus.getDefault().register(this)
+        super.onStart()
+    }
+
+    override fun onStop() {
+        EventBus.getDefault().unregister(this)
+        super.onStop()
+    }
+
+    private fun showInfo(text: String) {
+        activity.runOnUiThread {
+
+        }
+    }
+
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    fun onMoonEvent(messageEvent: MessageEvent) {
+        if (Constant.EVENT_SERIAL_TEST == messageEvent.type) {
+            if (!buttonTest) {
+                val message = messageEvent.message as String
+                if (message == "call") {
+                    info += " ##面板按键## "
+                    buttonTest = true
+                }
+                mbhj_button.setBackgroundResource(R.drawable.shape_patrol_dialog_bt_bg)
+                mbh_img.visibility=View.VISIBLE
+                //startTest()
+            }
+        }
+    }
+    //数据加载错误
+    override fun onError(message: String, type: Int) {
+
+    }
+    //数据加载完成
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    //开始获取数据
+    override fun start() {
+        //
+    }
+
+    //网络监听
+    override fun networkMonitor(state: NetState) {
+        state.filter(onMobile = {
+
+        }, onWifi = {
+
+        }, offline = {
+
+        })
+    }
+}

+ 152 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/WebviewActivity.kt

@@ -0,0 +1,152 @@
+package com.wdkl.app.ncs.callingdoor.activity
+
+import android.graphics.Bitmap
+import android.os.Build
+import android.util.Log
+import android.view.View
+import android.webkit.WebChromeClient
+import android.webkit.WebSettings
+import android.webkit.WebView
+import android.webkit.WebViewClient
+import com.enation.javashop.android.jrouter.external.annotation.Router
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.databinding.WebciewLayBinding
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+
+import com.wdkl.ncs.android.lib.base.BaseActivity
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.WebViewActivityContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.WebviewActivityPresenter
+import kotlinx.android.synthetic.main.webciew_lay.*
+
+
+@Router(path = "/callingbed/webview")
+class WebviewActivity :BaseActivity<WebviewActivityPresenter, WebciewLayBinding>(), WebViewActivityContract.View{
+    private val TAG = "WebviewActivity"
+    override fun getLayId(): Int {
+        return R.layout.webciew_lay
+    }
+
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+
+    override fun init() {
+        val settings: WebSettings = webview.settings
+        webviewSetting(settings);
+        val name = intent.getStringExtra("name") ?: ""
+        if (name!=null){
+            top_title_tv.setText(name)
+        }
+        val url = intent.getStringExtra("url") ?: ""
+        val key = intent.getStringExtra("key") ?: ""
+//        // 输出结果
+//        showMessage(url+key)
+
+        if (url!=null && key!=null){
+            val result = key.replace("&amp;", "&")
+            Log.d(TAG, "更新后的 url_params_temp 值为:"+url+"?"+result)
+            webview.loadUrl(url+"?"+result);
+        }
+//        webview.loadUrl("https://www.baidu.com/");
+        //带参数
+//        webview.loadDataWithBaseURL(HttpConstant.PATH, content, "text/html", "UTF-8", null);
+    }
+
+    override fun bindEvent() {
+        back_btn.setOnClickListener {
+            finish()
+//            push("/callingbed/main")
+        }
+    }
+
+    override fun destory() {
+
+    }
+
+    override fun onError(message: String, type: Int) {
+
+    }
+
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    override fun start() {
+
+    }
+
+    override fun networkMonitor(state: NetState) {
+
+    }
+
+    override fun onBackPressed() {
+        if (webview.canGoBack()) {
+            webview.goBack();
+        } else {
+            this.finish();
+        }
+    }
+    private fun webviewSetting(webSettings: WebSettings) {
+        pb_web_base.setMax(100) //设置加载进度最大值
+        if (Build.VERSION.SDK_INT >= 19) {
+            webSettings.cacheMode = WebSettings.LOAD_CACHE_ELSE_NETWORK //加载缓存否则网络
+        }
+        if (Build.VERSION.SDK_INT >= 19) {
+            webSettings.loadsImagesAutomatically = true //图片自动缩放 打开
+        } else {
+            webSettings.loadsImagesAutomatically = false //图片自动缩放 关闭
+        }
+
+        webview.setLayerType(View.LAYER_TYPE_NONE, null) //硬件解码
+        webSettings.javaScriptEnabled = true // 设置支持javascript脚本
+        webSettings.setSupportZoom(true) // 设置可以支持缩放
+        webSettings.builtInZoomControls = true // 设置出现缩放工具 是否使用WebView内置的缩放组件,由浮动在窗口上的缩放控制和手势缩放控制组成,默认false
+        webSettings.displayZoomControls = false //隐藏缩放工具
+        webSettings.useWideViewPort = false // 扩大比例的缩放
+        webSettings.layoutAlgorithm = WebSettings.LayoutAlgorithm.SINGLE_COLUMN //自适应屏幕
+        webSettings.loadWithOverviewMode = true
+        webSettings.databaseEnabled = false //
+        webSettings.savePassword = false //保存密码
+        webSettings.domStorageEnabled = false //是否开启本地DOM存储  鉴于它的安全特性(任何人都能读取到它,尽管有相应的限制,将敏感数据存储在这里依然不是明智之举),Android 默认是关闭该功能的。
+        webview.isSaveEnabled = true
+        webview.keepScreenOn = true
+        webSettings.textZoom = 100
+        // 设置setWebChromeClient对象
+        // 设置setWebChromeClient对象
+        webview.webChromeClient = object : WebChromeClient() {
+            override fun onReceivedTitle(view: WebView, title: String) {
+                super.onReceivedTitle(view, title)
+
+            }
+
+            override fun onProgressChanged(view: WebView, newProgress: Int) {
+                pb_web_base.setProgress(newProgress)
+                super.onProgressChanged(view, newProgress)
+            }
+        }
+        //设置此方法可在WebView中打开链接,反之用浏览器打开
+        webview.setWebViewClient(object : WebViewClient() {
+            override fun onPageFinished(view: WebView?, url: String?) {
+                super.onPageFinished(view, url)
+                if (!webview.getSettings().getLoadsImagesAutomatically()) {
+                    webview.getSettings().setLoadsImagesAutomatically(true);
+                }
+                pb_web_base.setVisibility(View.GONE);
+            }
+
+            override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
+                pb_web_base.setVisibility(View.VISIBLE);
+                super.onPageStarted(view, url, favicon)
+            }
+
+            override fun shouldOverrideUrlLoading(view: WebView, url: String?): Boolean {
+                // 在当前 WebView 中加载网页,而不是启动系统浏览器
+//                view.loadUrl(url)
+                return true
+            }
+
+        })
+    }
+}

+ 84 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/adapter/DeviceMenuapter.kt

@@ -0,0 +1,84 @@
+package com.wdkl.app.ncs.callingdoor.adapter
+
+import android.content.Context
+import android.support.v7.widget.RecyclerView
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.ImageView
+import android.widget.TextView
+import com.bumptech.glide.Glide
+import com.bumptech.glide.load.engine.DiskCacheStrategy
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.ncs.android.middleware.api.UrlManager
+import com.wdkl.ncs.android.middleware.model.ActionItem
+import com.wdkl.ncs.android.middleware.model.vo.DeviceMenulist
+
+class DeviceMenuapter : RecyclerView.Adapter<DeviceMenuapter.ViewHolder>{
+
+    private var context: Context
+    private var data: ArrayList<DeviceMenulist>
+    private lateinit var onItemClickListener: OnItemClickListener
+
+    private val urlManager = UrlManager.build()
+
+    constructor(context: Context, data: ArrayList<DeviceMenulist>): super() {
+        this.context = context
+        this.data = data
+    }
+
+    fun setOnItemClickListener(listener: OnItemClickListener) {
+        this.onItemClickListener = listener
+    }
+
+    fun updateData(data: ArrayList<DeviceMenulist>) {
+        this.data = data
+        notifyDataSetChanged()
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): ViewHolder {
+        val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_icon_lay, parent, false)
+        val viewHolder = ViewHolder(view)
+
+        return viewHolder
+    }
+
+    override fun getItemCount(): Int {
+        return data?.size
+    }
+
+    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+        if ( data?.get(position).name!=null){
+            holder.textView.text = data?.get(position).name
+        }
+        if (data?.get(position).icon_src!=null && !data?.get(position).icon_src.equals("")){
+            Glide.with(holder.imageView.context)
+                    .load(urlManager.base + data?.get(position).icon_src)
+                    .diskCacheStrategy(DiskCacheStrategy.ALL)
+                    .into(holder.imageView)
+        }else{
+            holder.imageView.visibility=View.GONE
+        }
+        holder.actionView.setOnClickListener {
+            onItemClickListener?.onItemClick(holder.itemView, position)
+//            onItemClickListener?.onItemClick(holder.itemView, data?.get(position).id)
+        }
+    }
+
+
+    class ViewHolder: RecyclerView.ViewHolder {
+        var actionView : View
+        var textView : TextView
+        var imageView : ImageView
+
+        constructor(itemView: View): super(itemView) {
+            actionView = itemView.findViewById(R.id.ll_menu_bt)
+            textView = itemView.findViewById(R.id.tx_menu)
+            imageView = itemView.findViewById(R.id.img_menu)
+        }
+    }
+
+    interface OnItemClickListener {
+        fun onItemClick(view: View, keyId: Int)
+    }
+}

+ 152 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/adapter/NewFrameRoomAdapter.kt

@@ -0,0 +1,152 @@
+package com.wdkl.app.ncs.callingdoor.adapter
+
+import android.content.Context
+import android.graphics.drawable.Drawable
+import android.support.v4.content.ContextCompat
+import android.support.v7.widget.RecyclerView
+import android.text.TextUtils
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
+import android.widget.RelativeLayout
+import android.widget.TextView
+import com.libra.Color
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.util.HorizantalAutoBrLayout
+import com.wdkl.ncs.android.middleware.model.dto.NurseConfigDto
+import com.wdkl.ncs.android.middleware.model.vo.FrameBedVO
+import com.wdkl.ncs.android.middleware.utils.CommonUtils
+import com.wdkl.ncs.android.middleware.utils.StringUtil
+
+class NewFrameRoomAdapter : RecyclerView.Adapter<NewFrameRoomAdapter.BedViewHolder> {
+
+    private var context: Context
+    private var data: ArrayList<FrameBedVO>
+    private var configList = ArrayList<NurseConfigDto>()
+
+
+
+    constructor(context: Context, data: ArrayList<FrameBedVO>) {
+        this.context = context
+        this.data = data
+
+
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BedViewHolder {
+            val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed, parent, false)
+            return BedViewHolder(view)
+    }
+
+    override fun onBindViewHolder(holder: BedViewHolder, position: Int) {
+        try {
+            initDefaultNursingConfigs()
+            val pos = position % data.size
+            showBedInfo(holder, data.get(pos))
+
+        } catch (e: Exception) {
+            e.printStackTrace()
+        }
+    }
+
+    override fun getItemCount(): Int {
+        if (data.size <= 3) {
+            return data.size
+        } else {
+            return Int.MAX_VALUE
+        }
+    }
+
+    fun setData(data: ArrayList<FrameBedVO>) {
+        this.data = data
+        notifyDataSetChanged()
+    }
+
+    private fun initDefaultNursingConfigs() {
+        //初始化默认护理项
+        configList.clear()
+        for (index in 1..5) {
+            var item = NurseConfigDto()
+            item.nurseConfigName = StringUtil.getResString(R.string.default_nurse_config_name)
+            item.nurseOptionName = StringUtil.getResString(R.string.str_empty)
+            item.nurseColorRbg = "D7D7D7"
+            configList.add(item)
+        }
+    }
+
+    private fun showBedInfo(holder: BedViewHolder, bedVO: FrameBedVO) {
+        if (TextUtils.isEmpty(bedVO.customerName)) {
+            //空床位
+            holder.tv_bed_name_title.text = CommonUtils.subStringAfter2(bedVO.frameBed.fullName, "-")
+            holder.bedName.text = "空床位"
+            holder.tv_bed_sex.text = "性别:无"
+            holder.tv_bed_age.text = "年龄:无"
+            holder.bed_medic_name.text = "无"
+            holder.bed_nurse_name.text = "无"
+        } else {
+            holder.tv_bed_name_title.text = CommonUtils.subStringAfter2(bedVO.frameBed.fullName, "-")
+            holder.bedName.text = bedVO.customerName
+            holder.tv_bed_age.text = "年龄:"+ bedVO.customerAge + bedVO.customerAgeUnit
+            if (bedVO.customerSex == 0) {
+                holder.tv_bed_sex.text = "性别:女"
+            } else if (bedVO.customerSex == 1) {
+                holder.tv_bed_sex.text = "性别:男"
+            } else {
+                holder.tv_bed_sex.text = "性别:无"
+            }
+            holder.bed_medic_name.text = bedVO.doctorName
+            holder.bed_nurse_name.text = bedVO.nurseName
+            holder.ll_one.removeAllViews()
+            //设置TextView的属性
+            //设置TextView的属性
+            val lps = RelativeLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT)
+            lps.setMargins(20, 6, 20, 6)
+            if (bedVO.nurseConfigDtos.size==0 )return
+            for (i in bedVO.nurseConfigDtos.indices) {
+                val textView = TextView(context)
+                textView.setText(bedVO.nurseConfigDtos.get(i).nurseOptionName)
+                textView.setTextColor(Color.WHITE)
+                textView.setTextSize(11f)
+                textView.setPadding(20, 6, 20, 6)
+                val drawableId: Int = context.resources.getIdentifier("shape_bed_ll_txt_bg", "drawable", context.packageName)
+                val drawable: Drawable? = ContextCompat.getDrawable(context, drawableId)
+                val rgbValue = Color.parseColor("#" + bedVO.nurseConfigDtos.get(i).nurseColorRbg)
+                drawable?.setTint(rgbValue)
+                textView.background = drawable
+                textView.layoutParams = lps
+                holder.ll_one.addView(textView)
+            }
+        }
+    }
+
+
+
+    class BedViewHolder: RecyclerView.ViewHolder {
+        var bedName : TextView
+        var tv_bed_name_title : TextView
+        var tv_bed_age : TextView
+        var tv_bed_sex : TextView
+        var bed_medic_name : TextView
+        var bed_nurse_name : TextView
+        var bed_medic_info : TextView
+        var bed_nurse_info : TextView
+        var ll_one : HorizantalAutoBrLayout
+
+
+        constructor(itemView: View): super(itemView) {
+            bedName = itemView.findViewById(R.id.tv_bed_name)
+            tv_bed_name_title = itemView.findViewById(R.id.tv_bed_name_title)
+            tv_bed_age = itemView.findViewById(R.id.tv_bed_age)
+            tv_bed_sex = itemView.findViewById(R.id.tv_bed_sex)
+            bed_medic_name = itemView.findViewById(R.id.bed_medic_name)
+            bed_nurse_name = itemView.findViewById(R.id.bed_nurse_name)
+            bed_medic_info = itemView.findViewById(R.id.bed_medic_info)
+            bed_nurse_info = itemView.findViewById(R.id.bed_nurse_info)
+            ll_one = itemView.findViewById(R.id.ll_one)
+
+
+
+        }
+    }
+}

+ 20 - 2
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/di/CallingdoorComponent.kt

@@ -1,7 +1,6 @@
 package com.wdkl.app.ncs.callingdoor.di
 
-import com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity
-import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
+import com.wdkl.app.ncs.callingdoor.activity.*
 import com.wdkl.app.ncs.callingdoor.fragment.*
 import com.wdkl.ncs.android.middleware.di.ApplicationComponent
 import dagger.Component
@@ -12,9 +11,28 @@ interface CallingdoorComponent {
 
     fun inject(activity: AppUpdateActivity)
 
+    fun inject(activity: CallingdoorActivationActivity)
+
+    fun inject(activity: SystemActivity)
+
+    fun inject(activity: TextActivity)
+
+    fun inject(activity: SetHintActivity)
+
     fun inject(fragment: MainFragment)
 
     fun inject(fragment: QrCodeFragment)
 
     fun inject(fragment: TestFragment)
+
+    fun inject(fragment: YhFragment)
+
+    fun inject(fragment: MoreFragment)
+
+    fun inject(fragment: NurseFragment)
+
+    fun inject(fragment: NursingWorkFragment)
+
+    fun inject(activity: WebviewActivity)
+
 }

+ 51 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/HuliDialogHelper.java

@@ -0,0 +1,51 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.R;
+
+/**
+ * 医护护理
+ * */
+public class HuliDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity, boolean isconfirm,ClickListener clickListener) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.nurse_huli_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        TextView hili_top_text = contentView.findViewById(R.id.hili_top_text);
+        TextView hili_text = contentView.findViewById(R.id.hili_text);
+        Button huli_confirm_button = contentView.findViewById(R.id.huli_confirm_button);
+        if (!isconfirm){
+            hili_text.setText("以上病床护理中,确认退出?");
+            huli_confirm_button.setText("退出护理");
+        }else {
+            hili_text.setText("对该病房床位设置为护理状态");
+            huli_confirm_button.setText("进入护理");
+        }
+        hili_top_text.setText("102床、103床、104床、105床");
+        huli_confirm_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+                clickListener.onClick();
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+    public interface ClickListener{
+        void onClick();
+    }
+}

+ 50 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/Network2DialogHelper.java

@@ -0,0 +1,50 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.R;
+
+public class Network2DialogHelper {
+
+    private static AlertDialog alertDialog;
+    private static String network="";
+
+    public static void showDialog(Activity activity) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.main_network_two_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+        EditText network2_ip = contentView.findViewById(R.id.network2_ip);
+        EditText network2_wg = contentView.findViewById(R.id.network2_wg);
+        EditText network2_ym = contentView.findViewById(R.id.network2_ym);
+        EditText network2_dns = contentView.findViewById(R.id.network2_dns);
+        Button network2_cancel_button = contentView.findViewById(R.id.network2_cancel_button);
+        Button network2_determine_button = contentView.findViewById(R.id.network2_determine_button);
+
+        TextView server_determine_button = contentView.findViewById(R.id.server_determine_button);
+
+        network2_cancel_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+
+            }
+        });
+        network2_determine_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                //设置静态网络
+                alertDialog.dismiss();
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+}

+ 56 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/NetworkDialogHelper.java

@@ -0,0 +1,56 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper;
+
+import static com.wdkl.ncs.android.lib.utils.ExtendMethodsKt.showMessage;
+
+public class NetworkDialogHelper {
+
+    private static AlertDialog alertDialog;
+    private static String network="";
+
+    public static void showDialog(Activity activity) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.main_network_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+        TextView network_one_tx = contentView.findViewById(R.id.network_one_tx);
+        TextView network_two_tx = contentView.findViewById(R.id.network_two_tx);
+        Button network_button = contentView.findViewById(R.id.network_button);
+        network_one_tx.setOnClickListener(v -> {
+            network="DHCP";
+            network_one_tx.setBackgroundResource(R.drawable.shape_main_hos_txt_bg);
+            network_one_tx.setBackgroundResource(R.drawable.shape_main_hos_txt_bg);
+        });
+        network_two_tx.setOnClickListener(v -> {
+            network="静态";
+            network_two_tx.setBackgroundResource(R.drawable.shape_main_hos_txt_bg);
+            network_two_tx.setBackgroundResource(R.drawable.shape_main_hos_txt_bg);
+        });
+        network_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+                if (network.equals("静态")){
+                    Network2DialogHelper.showDialog(activity);
+                }else {
+                    //设置成动态获取网络
+                    showMessage("动态获取网络设置成功");
+                }
+
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+}

+ 43 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/PatrolDialogHelper.java

@@ -0,0 +1,43 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.R;
+
+/**
+ * 医护巡房
+ * */
+public class PatrolDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity, ClickListener clickListener) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.nurse_patrol_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        TextView patrol_tip_text = contentView.findViewById(R.id.patrol_tip_text);
+        Button patrol_confirm_button = contentView.findViewById(R.id.patrol_confirm_button);
+
+        patrol_confirm_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+                clickListener.onClick();
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+    public interface ClickListener{
+        void onClick();
+    }
+}

+ 43 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/PositioningDialogHelper.java

@@ -0,0 +1,43 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper;
+/**
+ * 医护定位
+ * */
+public class PositioningDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity, ClickListener clickListener) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.nurse_positioning_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        TextView positioning_tip_text = contentView.findViewById(R.id.positioning_tip_text);
+        Button positioning_confirm_button = contentView.findViewById(R.id.positioning_confirm_button);
+
+        positioning_confirm_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+                clickListener.onClick();
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+    public interface ClickListener{
+        void onClick();
+    }
+}

+ 49 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/RebootDialogHelper.java

@@ -0,0 +1,49 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.support.v7.widget.RecyclerView;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.Button;
+
+import com.alibaba.android.vlayout.VirtualLayoutManager;
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.adapter.BedItemAdapter;
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper;
+import com.wdkl.app.ncs.callingdoor.helper.Utils;
+import com.wdkl.ncs.android.middleware.model.vo.FrameBedVO;
+
+public class RebootDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.main_restart_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        Button btn_cancel = contentView.findViewById(R.id.server_cancel_button);
+        Button server_determine_button = contentView.findViewById(R.id.server_determine_button);
+        btn_cancel.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+            }
+        });
+        server_determine_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+                AppUpdateHelper.reboot(activity);
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+}

+ 56 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/ScreenSaverDialogHelper.java

@@ -0,0 +1,56 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper;
+
+public class    ScreenSaverDialogHelper {
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.nurse_screensaver_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        TextView view_title_layout_tv_hospital_name = contentView.findViewById(R.id.view_title_layout_tv_hospital_name);
+        TextView screensacver_text = contentView.findViewById(R.id.screensacver_text);
+        ImageView view_title_layout_img = contentView.findViewById(R.id.view_title_layout_img);
+        LinearLayout view_title_layout_return = contentView.findViewById(R.id.view_title_layout_return);
+        view_title_layout_img.setVisibility(View.VISIBLE);
+        view_title_layout_tv_hospital_name.setText("退出提示");
+        view_title_layout_return.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                view_title_layout_img.setVisibility(View.GONE);
+                alertDialog.dismiss();
+
+            }
+        });
+
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+        //设置dialog宽高及位置
+        try {
+            Window window = alertDialog.getWindow();
+            window.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
+            window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+}

+ 71 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/ServicesDialogHelper.java

@@ -0,0 +1,71 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Intent;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity;
+import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivationActivity;
+import com.wdkl.app.ncs.callingdoor.helper.CallbedDialogHelper;
+import com.wdkl.ncs.android.lib.base.BaseApplication;
+import com.wdkl.ncs.android.middleware.model.vo.FrameBedVO;
+import com.wdkl.ncs.android.middleware.utils.CommonUtils;
+
+public class ServicesDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity, ClickListener clickListener) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.main_server_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        Button server_determine_button = contentView.findViewById(R.id.server_determine_button);
+        Button server_cancel_button = contentView.findViewById(R.id.server_cancel_button);
+        EditText server_ed = contentView.findViewById(R.id.server_ed);
+        server_determine_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                CommonUtils.setUrl(BaseApplication.appContext, server_ed.getText().toString());
+                if (clickListener != null) {
+                    String IP = server_ed.getText().toString();
+                    clickListener.onClick(IP);
+                }
+                alertDialog.dismiss();
+            }
+        });
+        server_cancel_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                server_ed.setText("");
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+//        //设置dialog宽高及位置
+//        try {
+//            Window window = alertDialog.getWindow();
+//            WindowManager.LayoutParams lp = window.getAttributes();
+//            lp.width = 680;
+//            lp.height = 440;
+//            lp.gravity = Gravity.CENTER;
+//            window.setAttributes(lp);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+    }
+
+    public interface ClickListener{
+        void onClick(String bedVO);
+    }
+}

+ 69 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/SystemDialogHelper.java

@@ -0,0 +1,69 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Intent;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.EditText;
+
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity;
+import com.wdkl.app.ncs.callingdoor.activity.SystemActivity;
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper;
+import com.wdkl.ncs.android.lib.base.BaseApplication;
+import com.wdkl.ncs.android.middleware.utils.CommonUtils;
+
+import static com.wdkl.ncs.android.lib.utils.ExtendMethodsKt.push;
+
+public class SystemDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.main_password_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        Button password_cancel_button = contentView.findViewById(R.id.password_cancel_button);
+        Button password_determine_button = contentView.findViewById(R.id.password_determine_button);
+        EditText password_ed = contentView.findViewById(R.id.password_ed);
+        password_cancel_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                alertDialog.dismiss();
+            }
+        });
+        password_determine_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                String passwprd =password_ed.getText().toString();
+                if (passwprd.equals("888")){
+                    Intent intent = new Intent();
+                    intent.setClass(activity, SystemActivity.class);
+                    activity.startActivity(intent);
+                }
+                alertDialog.dismiss();
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+//        //设置dialog宽高及位置
+//        try {
+//            Window window = alertDialog.getWindow();
+//            WindowManager.LayoutParams lp = window.getAttributes();
+//            lp.width = 680;
+//            lp.height = 440;
+//            lp.gravity = Gravity.CENTER;
+//            window.setAttributes(lp);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+    }
+}

+ 54 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/UpdataDialogHelper.java

@@ -0,0 +1,54 @@
+package com.wdkl.app.ncs.callingdoor.dialog;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Intent;
+import android.os.Build;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.wdkl.app.ncs.callingdoor.BuildConfig;
+import com.wdkl.app.ncs.callingdoor.R;
+import com.wdkl.app.ncs.callingdoor.activity.AppUpdateActivity;
+import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper;
+
+public class UpdataDialogHelper {
+
+    private static AlertDialog alertDialog;
+
+    public static void showDialog(Activity activity, ClickListener clickListener) {
+
+        View contentView = LayoutInflater.from(activity).inflate(R.layout.main_version_dialog, null);
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        builder.setView(contentView);
+
+        TextView version_number_tx = contentView.findViewById(R.id.version_number_tx);
+        TextView version_time_tx = contentView.findViewById(R.id.version_time_tx);
+        Button version_button = contentView.findViewById(R.id.version_button);
+        version_number_tx.setText( BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL);
+        version_time_tx.setText(BuildConfig.BUILD_TIME);
+
+        version_button.setOnClickListener(v -> {
+            if (alertDialog != null && alertDialog.isShowing()) {
+                Intent intent = new Intent();
+                intent.setClass(activity, AppUpdateActivity.class);
+                activity.startActivity(intent);
+
+                clickListener.onClick();
+
+                alertDialog.dismiss();
+            }
+        });
+        alertDialog = builder.create();
+        alertDialog.setCanceledOnTouchOutside(false);
+        alertDialog.setCancelable(false);
+        alertDialog.show();
+
+    }
+
+    public interface ClickListener{
+        void onClick();
+    }
+}

+ 18 - 16
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/MainFragment.kt

@@ -7,6 +7,7 @@ import android.text.TextUtils
 import com.enation.javashop.net.engine.model.NetState
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.adapter.FrameRoomAdapter
+import com.wdkl.app.ncs.callingdoor.adapter.NewFrameRoomAdapter
 import com.wdkl.app.ncs.callingdoor.databinding.MainViewLayoutBinding
 import com.wdkl.app.ncs.callingdoor.helper.DoorLightHelper
 import com.wdkl.app.ncs.callingdoor.helper.Utils
@@ -33,7 +34,7 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
     val TAG = "MainFragment"
 
     private lateinit var gridLayoutManager: OnegoGridLayoutManager
-    private lateinit var roomAdpter : FrameRoomAdapter
+    private lateinit var roomAdpter : NewFrameRoomAdapter
     private var bedList = ArrayList<FrameBedVO>()
 
     override fun getLayId(): Int {
@@ -45,15 +46,10 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
     }
 
     override fun init() {
-        if ("rk3288".equals(Build.MODEL)) {
-            gridLayoutManager = OnegoGridLayoutManager(activity, 1, GridLayoutManager.VERTICAL, false)
-        } else {
-            gridLayoutManager = OnegoGridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false)
-        }
-        roomAdpter = FrameRoomAdapter(activity, bedList)
+        gridLayoutManager = OnegoGridLayoutManager(activity, 1, GridLayoutManager.HORIZONTAL, false)
+        roomAdpter = NewFrameRoomAdapter(activity, bedList)
         rv_bed_view.layoutManager = gridLayoutManager
         rv_bed_view.adapter = roomAdpter
-
         updateInfo()
     }
 
@@ -103,14 +99,20 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
             if (simulateBed) {
                 EventBus.getDefault().post(MessageEvent("remove_call_bed", Constant.EVENT_REMOVE_CALL_BED))
             }
-
-            //var bedNames = ""
-            //val bedSize = bedList.size
-            //if (bedSize == 1) {
-            //    bedNames = CommonUtils.subStringAfter(bedList[0].frameBed.fullName, "-")
-            //} else if (bedList.size > 1) {
-            //    bedNames = CommonUtils.subStringAfter(bedList[0].frameBed.fullName, "-") + " - " + CommonUtils.subStringAfter(bedList[bedSize-1].frameBed.fullName, "-")
-            //}
+            tv_room_name.setText(roomInfo.frameRoom.fullName)
+             val bedSize = bedList.size
+            var bed_people_num =0;
+            val paramCount = bedList.count { it.customerName!=null } // 参数不为空的元素数量
+            val emptyCount = bedList.count { it.customerName==null  } // 参数为空的元素数量
+            f_tx_people_number.setText(paramCount.toString())
+            f_tx_bed_number.setText(emptyCount.toString())
+//            var bedNames = ""
+
+//            if (bedSize == 1) {
+//                bedNames = CommonUtils.subStringAfter(bedList[0].frameBed.fullName, "-")
+//            } else if (bedList.size > 1) {
+//                bedNames = CommonUtils.subStringAfter(bedList[0].frameBed.fullName, "-") + " - " + CommonUtils.subStringAfter(bedList[bedSize-1].frameBed.fullName, "-")
+//            }
 
             //EventBus.getDefault().post(MessageEvent(bedNames, Constant.EVENT_UPDATE_BEDS))
         }

+ 70 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/MoreFragment.kt

@@ -0,0 +1,70 @@
+package com.wdkl.app.ncs.callingdoor.fragment
+
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorNurseBinding
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseFragment
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.MoreFragmentContract
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.YhFragmentContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.MoreFragmentPresenter
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.YhFragmentPresenter
+
+/**
+ * 更多界面
+ */
+class MoreFragment : BaseFragment<MoreFragmentPresenter, CallingdoorNurseBinding>(), MoreFragmentContract.View {
+
+    val TAG = "YhFragment"
+
+
+    override fun getLayId(): Int {
+        return R.layout.callingdoor_nurse
+    }
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+    //数据绑定
+    override fun init() {
+
+    }
+    //点击事件
+    override fun bindEvent() {
+
+    }
+    /**执行其他销毁操作*/
+    override fun destory() {
+
+    }
+
+    override fun setUrlString(url: String) {
+
+    }
+
+    override fun onError(message: String, type: Int) {
+        showMessage(message)
+    }
+
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    override fun start() {
+
+    }
+
+
+    override fun networkMonitor(state: NetState) {
+        state.filter(onWifi = {
+
+        },onMobile = {
+
+        },offline = {
+
+        })
+    }
+
+
+}

+ 159 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/NurseFragment.kt

@@ -0,0 +1,159 @@
+package com.wdkl.app.ncs.callingdoor.fragment
+
+import android.content.Intent
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
+import com.wdkl.app.ncs.callingdoor.activity.SetHintActivity
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorNurseBinding
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorNurseMainBinding
+import com.wdkl.app.ncs.callingdoor.dialog.HuliDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.PatrolDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.PositioningDialogHelper
+import com.wdkl.app.ncs.callingdoor.dialog.ServicesDialogHelper
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseFragment
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.MoreFragmentContract
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.NurseFragmentContract
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.YhFragmentContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.MoreFragmentPresenter
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.NurseFragmentPresenter
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.YhFragmentPresenter
+import kotlinx.android.synthetic.main.callingdoor_nurse.*
+import kotlinx.android.synthetic.main.callingdoor_nurse.nurse_bt
+import kotlinx.android.synthetic.main.callingdoor_nurse_main.*
+import kotlinx.android.synthetic.main.callingdoor_test_main.*
+
+/**
+ * 更多界面
+ */
+class NurseFragment : BaseFragment<NurseFragmentPresenter, CallingdoorNurseMainBinding>(), NurseFragmentContract.View {
+
+    val TAG = "YhFragment"
+    var isconfirm = true
+
+    override fun getLayId(): Int {
+        return R.layout.callingdoor_nurse_main
+    }
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+    //数据绑定
+    override fun init() {
+        showui()
+
+    }
+    //点击事件
+    override fun bindEvent() {
+           //退出医护
+        nurse_main_bt.setOnClickListener {
+            (activity as CallingdoorActivity).BackMain()
+        }
+        //定位
+        nurse_main_1_ll.setOnClickListener {
+            PositioningDialogHelper.showDialog(activity, object : PositioningDialogHelper.ClickListener {
+                override fun onClick() {
+                    nurse_main_1_ll.setBackgroundResource(R.drawable.shape_positioning_dialog_bt_bg)
+                    nurse_main_1_img.setImageResource(R.mipmap.ding_y)
+                    nurse_top_1_tx.setTextColor(resources.getColor(R.color.white))
+                    nurse_top_1_tx.text="已定位"
+                    nurse_main_1_tx.setTextColor(resources.getColor(R.color.white))
+                }
+            })
+        }
+        //巡防
+        nurse_main_2_ll.setOnClickListener {
+            PatrolDialogHelper.showDialog(activity, object : PatrolDialogHelper.ClickListener {
+                override fun onClick() {
+                    nurse_main_2_ll.setBackgroundResource(R.drawable.shape_patrol_dialog_bt_bg)
+                    nurse_main_2_img.setImageResource(R.mipmap.xun_y)
+                    nurse_top_2_tx.setTextColor(resources.getColor(R.color.white))
+                    nurse_top_2_tx.text="已巡房"
+                    nurse_main_2_tx.setTextColor(resources.getColor(R.color.white))
+                }
+            })
+        }
+        //进入护理
+        nurse_main_3_ll.setOnClickListener {
+            HuliDialogHelper.showDialog(activity, isconfirm,object : HuliDialogHelper.ClickListener {
+                override fun onClick() {
+                    isconfirm = !isconfirm
+                    if (!isconfirm){
+                        nurse_main_3_ll.setBackgroundResource(R.drawable.shape_huli_dialog_bt_bg)
+                        nurse_main_3_img.setImageResource(R.mipmap.hu_y)
+                        nurse_top_3_tx.setTextColor(resources.getColor(R.color.white))
+                        nurse_top_3_tx.text="护理中"
+                        nurse_main_3_tx.setTextColor(resources.getColor(R.color.white))
+                    }else{
+                        nurse_main_3_ll.setBackgroundResource(R.drawable.shape_bed_bg)
+                        nurse_main_3_img.setImageResource(R.mipmap.hu)
+                        nurse_top_3_tx.setTextColor(resources.getColor(R.color.black))
+                        nurse_top_3_tx.text="进入护理"
+                        nurse_main_3_tx.setTextColor(resources.getColor(R.color.text_name_color))
+                    }
+
+                }
+            })
+        }
+        //设置提示语
+        nurse_main_4_ll.setOnClickListener {
+            val intent = Intent()
+            intent.setClass(activity, SetHintActivity::class.java)
+            activity.startActivity(intent)
+        }
+
+
+    }
+
+    private fun showui(){
+        nurse_main_tx_name.setText("张舒婷"+"护士")
+        nurse_main_1_ll.setBackgroundResource(R.drawable.shape_bed_bg)
+        nurse_main_1_img.setBackgroundResource(R.mipmap.ding)
+        nurse_top_1_tx.setTextColor(resources.getColor(R.color.black))
+        nurse_top_1_tx.text="定位"
+        nurse_main_2_ll.setBackgroundResource(R.drawable.shape_bed_bg)
+        nurse_main_2_img.setBackgroundResource(R.mipmap.xun)
+        nurse_top_2_tx.setTextColor(resources.getColor(R.color.black))
+        nurse_main_3_ll.setBackgroundResource(R.drawable.shape_bed_bg)
+        nurse_main_3_img.setBackgroundResource(R.mipmap.hu)
+        nurse_top_3_tx.setTextColor(resources.getColor(R.color.black))
+        nurse_main_1_tx.text="住院部402房"
+        nurse_main_2_tx.text="住院部402房"
+        nurse_main_3_tx.text="该房病床进入护理"
+    }
+    /**执行其他销毁操作*/
+    override fun destory() {
+
+    }
+
+    override fun setUrlString(url: String) {
+
+    }
+
+    override fun onError(message: String, type: Int) {
+        showMessage(message)
+    }
+
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    override fun start() {
+
+    }
+
+
+    override fun networkMonitor(state: NetState) {
+        state.filter(onWifi = {
+
+        },onMobile = {
+
+        },offline = {
+
+        })
+    }
+
+
+}

+ 226 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/NursingWorkFragment.kt

@@ -0,0 +1,226 @@
+package com.wdkl.app.ncs.callingdoor.fragment
+
+import android.content.Intent
+import android.os.CountDownTimer
+import android.support.v7.widget.GridLayoutManager
+import android.text.TextUtils
+import android.util.Log
+import android.view.View
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.BuildConfig
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.activity.WebviewActivity
+import com.wdkl.app.ncs.callingdoor.adapter.DeviceMenuapter
+import com.wdkl.app.ncs.callingdoor.databinding.NursingWorkLayBinding
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseFragment
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.common.Constant
+import com.wdkl.ncs.android.middleware.common.MessageEvent
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.NursingWorkFragmentContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.NursingWorkFragmentPresenter
+import com.wdkl.ncs.android.middleware.model.vo.DeviceMenulist
+import com.wdkl.ncs.android.middleware.tcp.TcpClient
+import kotlinx.android.synthetic.main.nursing_work_lay.*
+import kotlinx.android.synthetic.main.view_bed_name.*
+import kotlinx.android.synthetic.main.view_bed_name.tv_bed_name
+import org.greenrobot.eventbus.EventBus
+import org.greenrobot.eventbus.Subscribe
+import org.greenrobot.eventbus.ThreadMode
+import org.json.JSONObject
+
+
+class NursingWorkFragment : BaseFragment<NursingWorkFragmentPresenter, NursingWorkLayBinding>(), NursingWorkFragmentContract.View ,DeviceMenuapter.OnItemClickListener{
+    val TAG = "QrCodeFragment"
+    val pattern = "\\$([^#]*)#".toRegex()
+    var id: String? = ""
+    var cardNo: String? = null
+
+    var type: String? = ""
+    var name: String? = ""
+    private var allOrders = ArrayList<DeviceMenulist>()
+    private lateinit var deviceMenuapter : DeviceMenuapter
+    private lateinit var timer: CountDownTimer
+
+    override fun getLayId(): Int {
+        return R.layout.nursing_work_lay
+    }
+
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+    //数据绑定
+    override fun init() {
+        recycler.setVisibility(View.VISIBLE)
+        val layoutManager = GridLayoutManager(getActivity(), 4)
+        recycler.setLayoutManager(layoutManager)
+        var part_id =Constant.PART_ID
+        if (part_id!=null){
+            presenter.DeviceMenulist(part_id!!, 4)
+        }
+        time()
+    }
+    //点击事件
+    override fun bindEvent() {
+
+    }
+   private fun time(){
+       timer = object : CountDownTimer(100000, 100000) {
+           override fun onTick(millisUntilFinished: Long) {
+               // 每个计时周期结束时调用该方法
+
+           }
+
+           override fun onFinish() {
+               // 倒计时结束时调用该方法
+               EventBus.getDefault().post(MessageEvent("Return_to", Constant.EVENT_SIGNIN_MSG))
+//               println("倒计时结束!")
+           }
+       }
+   }
+    override fun destory() {
+
+    }
+
+
+    override fun setlist(a: List<String>) {
+        val components = a
+
+    }
+
+    override fun setDeviceMenulist(MenuList: List<DeviceMenulist>) {
+        if (MenuList.size>0){
+            for ((index, e) in MenuList.withIndex()) {
+                if (index < allOrders.size) {
+                    allOrders.set(index, e)
+                }else {
+                    allOrders.add(e)
+                }
+            }
+            deviceMenuapter = DeviceMenuapter(activity, allOrders)
+            deviceMenuapter.setOnItemClickListener(this)
+            recycler.adapter = deviceMenuapter
+            deviceMenuapter.updateData(allOrders)
+        }
+
+    }
+
+    override fun onError(message: String, type: Int) {
+        showMessage(message)
+    }
+
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    override fun start() {
+        if (!EventBus.getDefault().isRegistered(this)) {
+            EventBus.getDefault().register(this);
+        }
+        super.onStart()
+    }
+
+    override fun onResume() {
+        timer.start()
+        super.onResume()
+    }
+    override fun onPause() {
+        timer.cancel()
+        super.onPause()
+    }
+    override fun onStop() {
+        if (EventBus.getDefault().isRegistered(this)) {
+            EventBus.getDefault().unregister(this);
+        }
+       super.onStop()
+    }
+
+    override fun networkMonitor(state: NetState) {
+        state.filter(onWifi = {
+
+        }, onMobile = {
+
+        }, offline = {
+
+        })
+    }
+
+
+
+
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    fun onMoonEvent(messageEvent: MessageEvent) {
+        when (messageEvent.getType()) {
+
+        }
+    }
+
+    val regexs = "\\{\\{([A-Za-z]+)\\?(.*?)\\}\\}".toRegex()
+    override fun onItemClick(view: View, keyId: Int) {
+        try {
+            if (allOrders.get(keyId ).type.equals("URL")){
+                name =allOrders.get(keyId ).name
+                var url =allOrders.get(keyId ).url
+                var text = allOrders.get(keyId ).url_params_temp
+                if (!text.equals("")){
+                    regexs.findAll(text).forEach { matchResult ->
+                        val key = matchResult.groupValues[1]
+                        val attribute = matchResult.groupValues[2]
+                        when (key) {
+                            "DEVICE" -> {
+                                val value = getAttributeFromDevice(attribute) // 从设备中获取属性值
+                                text = text.replace(matchResult.groupValues[0], value)
+                            }
+                            "CUSTOM" -> {
+                                val value = getAttributeFromCustomParams(attribute) // 从自定义参数中获取属性值
+                                text = text.replace(matchResult.groupValues[0], value)
+                            }
+                        }
+                    }
+                }
+                regexs.findAll(text).forEach { matchResult ->
+                    val key = matchResult.groupValues[1]
+                    val attribute = matchResult.groupValues[2]
+                    when (key) {
+                        "DEVICE" -> {
+                            val value = getAttributeFromDevice(attribute) // 从设备中获取属性值
+                            text = text.replace(matchResult.groupValues[0], value)
+                        }
+                        "CUSTOM" -> {
+                            val value = getAttributeFromCustomParams(attribute) // 从自定义参数中获取属性值
+                            text = text.replace(matchResult.groupValues[0], value)
+                        }
+                    }
+                }
+                // 调试信息:输出更新后的 url_params_temp 值
+                Log.d(TAG, "更新后的 url_params_temp 值为:$text")
+                val intent = Intent()
+                intent.putExtra("name", name)
+                intent.putExtra("url", url)
+                intent.putExtra("key", text)
+                intent.setClass(activity, WebviewActivity::class.java)
+                activity.startActivity(intent)
+                // 输出结果
+    //            showMessage(text)
+            }
+        } catch (e: Exception) {
+           showMessage("结果异常,请在后台设置")
+        }
+    }
+    // 从设备信息中获取属性值的方法
+    fun getAttributeFromDevice(attribute: String): String {
+        var info =Constant.DEVICE_INFO
+        val propertyValue = JSONObject(info).optString(attribute, "")
+
+        return propertyValue/* 从设备信息中获取属性值的逻辑 */
+    }
+
+    // 从自定义参数中获取属性值的方法
+    fun getAttributeFromCustomParams(attribute: String): String {
+        var info =Constant.CUSTOM_INFO
+        val propertyValue = JSONObject(info).optString(attribute, "")
+
+        return propertyValue/* 从自定义参数中获取属性值的逻辑 */
+    }
+}

+ 78 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/YhFragment.kt

@@ -0,0 +1,78 @@
+package com.wdkl.app.ncs.callingdoor.fragment
+
+
+import android.os.Parcel
+import android.os.Parcelable
+import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.R
+import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
+import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorNurseBinding
+import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
+import com.wdkl.ncs.android.lib.base.BaseFragment
+import com.wdkl.ncs.android.lib.utils.showMessage
+import com.wdkl.ncs.android.lib.vo.filter
+import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.YhFragmentContract
+import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.YhFragmentPresenter
+import kotlinx.android.synthetic.main.callingdoor_main_new.*
+import kotlinx.android.synthetic.main.callingdoor_main_new.menu_medical_care
+import kotlinx.android.synthetic.main.callingdoor_nurse.*
+
+
+/**
+ * 医护界面
+ */
+
+class  YhFragment : BaseFragment<YhFragmentPresenter, CallingdoorNurseBinding>(), YhFragmentContract.View {
+
+    val TAG = "YhFragment"
+    override fun getLayId(): Int {
+        return R.layout.callingdoor_nurse
+    }
+    override fun bindDagger() {
+        CallingdoorLaunch.component.inject(this)
+    }
+    //数据绑定
+    override fun init() {
+
+    }
+    //点击事件
+    override fun bindEvent() {
+       //医护
+        nurse_bt.setOnClickListener {
+            (activity as CallingdoorActivity).startYhMode()
+        }
+    }
+    /**执行其他销毁操作*/
+    override fun destory() {
+
+    }
+
+    override fun setUrlString(url: String) {
+
+    }
+
+    override fun onError(message: String, type: Int) {
+        showMessage(message)
+    }
+
+    override fun complete(message: String, type: Int) {
+
+    }
+
+    override fun start() {
+
+    }
+
+
+    override fun networkMonitor(state: NetState) {
+        state.filter(onWifi = {
+
+        },onMobile = {
+
+        },offline = {
+
+        })
+    }
+
+
+}

+ 82 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/HardTools.java

@@ -0,0 +1,82 @@
+package com.wdkl.app.ncs.callingdoor.hardware;
+
+
+import android.os.Handler;
+
+public  class HardTools {
+
+    public HardTools() {
+
+    }
+
+    public Handler mHandler = null;
+    public void setHandler(Handler handler) {
+        this.mHandler = handler;
+    }
+
+    private boolean isReadStart;
+
+    public boolean isReadStart() {
+        return isReadStart;
+    }
+
+    public void setReadStart(boolean readStart) {
+        isReadStart = readStart;
+    }
+
+    public void EvenRead() {
+
+    }
+    //
+
+
+
+    public interface  IdCardReadListener{
+//        void getIdInfoSucess(UserInfo userInfo, String token);
+        void beginIdRead();
+        void getIdInfoFail();
+    }
+    public  IdCardReadListener idCardReadListener;
+
+    public  void setIdCardReadListener(IdCardReadListener idCardReadListener) {
+        this.idCardReadListener = idCardReadListener;
+    }
+
+ public Handler getmHandler() {
+  return mHandler;
+ }
+
+ public void setmHandler(Handler mHandler) {
+  this.mHandler = mHandler;
+ }
+
+    public void init(){}
+    public void unInit(){}
+
+    //提供卡号
+    public  void offerCardData(String data){}
+    //提供按键数据
+    public void offerKeyBoardData(String data){}
+    //是否开启喂狗
+    public  void enableWatchDog(boolean isEnable){}
+     //喂狗
+     public  void feedDog(){}
+    //是否开启灯光
+    public  void enableLed(boolean isEnable){}
+    public  void enableIRLed(boolean isEnable){}
+    public  void enableControlLed(boolean isEnable,int id){}
+    //开关门继电器控制
+    public void enalbeDoor(boolean isEnable,boolean isShowLight){}
+    public void sendGetHumanTemp(long delayTime){}
+    public void startGetHumanTemp(){}//开始收集体温
+    public void endGetHumanTemp(){}//结束收集体温
+    public boolean GetHumanTempIsStart(){return false;}//开始收集体温
+
+    public void enalbeNet(boolean isEnable){}
+    //获取人脸识别service名称
+    public String getFaceServiceName(){return "com.ldhl.face.face.facedeter.FeterService";}
+
+    //设置voip 初始化配置
+    public void setVoipConfig(){}
+
+}

+ 24 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/HardWareFactroy.java

@@ -0,0 +1,24 @@
+package com.wdkl.app.ncs.callingdoor.hardware;
+/**
+ * 硬件设备控制适配类
+ *
+ * **/
+public  class HardWareFactroy {
+    //不同硬件设备控制类替换即可
+    private static HardTools hardTools;
+    public static HardTools getHardTools() {
+        if(null == hardTools) {
+//            if( BuildConfig.flag.equals(Constants.DEV_GKTC)|| BuildConfig.flag.equals(Constants.DEV_SMTC))
+//                hardTools = GKTCHardTools.getInstance();
+//            else if(BuildConfig.flag.equals(Constants.DEV_JDZCX)){
+//                hardTools = JDZCXHardTools.getInstance();
+//            }else if(BuildConfig.flag.equals(Constants.DEV_HYZN)){//华壹智能
+//                hardTools = HTZN8CHardTools.getInstance();
+//            }
+
+        }
+        return hardTools ;
+    }
+
+
+}

+ 116 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/hardware/imp/Z3128HardTools.java

@@ -0,0 +1,116 @@
+package com.wdkl.app.ncs.callingdoor.hardware.imp;
+
+import com.wdkl.app.ncs.callingdoor.hardware.HardTools;
+
+/**
+ * Z-3128硬件控制类
+ *
+ * */
+public class Z3128HardTools  extends HardTools {
+
+    public static final String HARDWDT_SERVICE = "hardwdt";
+    private boolean isReadStart;
+
+    public boolean isReadStart() {
+        return isReadStart;
+    }
+
+    public void setReadStart(boolean readStart) {
+        isReadStart = readStart;
+    }
+
+    public void EvenRead() {
+        if (!bopen) {
+            OnBnOpen();
+            return;
+        }
+    }
+
+    private static class Z3128HardToolsHolder{
+        private final  static Z3128HardTools zhkj7HardTools = new Z3128HardTools();
+    }
+
+    public static Z3128HardTools getInstance(){
+        return Z3128HardToolsHolder.zhkj7HardTools;
+    }
+
+    @Override
+    public void init() {
+
+    }
+
+    private TaskThread task;
+    private boolean bopen;
+
+    public void OnBnOpen() {
+
+    }
+
+    public void OnBnClose()
+    {
+        isReadStart = false;
+    }
+    private boolean isEexit;
+    @Override
+    public void unInit() {
+
+    }
+
+    @Override
+    public void enableLed(boolean isEnable) {
+
+    }
+
+    @Override
+    public void enalbeDoor(boolean isEnable,boolean isShowLight) {
+
+    }
+
+    @Override
+    public void enalbeNet(boolean isEnable) {
+
+    }
+
+    @Override
+    public void enableWatchDog(boolean isEnable) {
+    }
+
+    @Override
+    public void feedDog() {
+
+    }
+
+    public void OnBnRead()
+    {
+
+    }
+
+    public void Authenticate()
+    {
+
+    }
+
+    public class TaskThread extends  Thread{
+        private boolean isRunning = true;
+        public synchronized void setRunning(boolean isRunning) {
+            this.isRunning = isRunning;
+        }
+
+        @Override
+        public void run() {
+            while(isRunning){
+                try {
+                    Thread.sleep(500);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                OnBnRead();
+                try {
+                    Thread.sleep(200);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+}

+ 0 - 1
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AppUpdateHelper.java

@@ -213,7 +213,6 @@ public class AppUpdateHelper {
             intent.putExtra("interval", 1);
             intent.putExtra("window", 0);
             context.sendBroadcast(intent);
-
             if ("rk3128".equals(Build.MODEL)) {
                 SerialPortHelper.resetDevice();
             }

+ 110 - 1
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/NetHelper.java

@@ -4,9 +4,14 @@ import android.annotation.SuppressLint;
 import android.bluetooth.BluetoothAdapter;
 import android.content.Context;
 import android.net.ConnectivityManager;
+import android.net.DhcpInfo;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkInfo;
 import android.net.wifi.WifiInfo;
 import android.net.wifi.WifiManager;
 import android.text.TextUtils;
+import android.text.format.Formatter;
 
 
 import com.wdkl.ncs.android.lib.base.BaseApplication;
@@ -141,7 +146,7 @@ public class NetHelper {
     public static String getLocalElement(int type) {
         String e = "";
         if (1 == type) {
-            //e = getLocalElementByWifi();
+//            e = getLocalElementByWifi();
         } else if (2 == type) {
             e = getLocalElementByDhcp();
         } else if (3 == type) {
@@ -154,7 +159,111 @@ public class NetHelper {
         }
     }
 
+    /**
+     * 获取网关  Waderson
+     * <p>
+     * 1 WIFI情况下获取网关 2 有线网络下的DHCP模式连接 3 有线网络其他连接方式:比如静态ip、pppoe拨号、ipoe拨号等
+     */
+    public String gateway() {
+        try {
+            String e = "";
+            //先判断是否有线
+            Network network = connManager.getActiveNetwork();
+            NetworkCapabilities networkCapabilities = connManager.getNetworkCapabilities(network);
+            if (networkCapabilities != null) {
+                if (networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
+                    // Wi-Fi 网络连接
+                    WifiInfo wifiInfo = wifiManager.getConnectionInfo();
+                    if (wifiInfo != null) {
+
+                        DhcpInfo dhcpInfo = wifiManager.getDhcpInfo();
+                        e = Formatter.formatIpAddress(dhcpInfo.gateway);
+
+                    } else if (networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
+                        // 有线网络连接
+                        e = getLocalElementByDhcp();
+
+                    } else {
+                        // 其他类型的网络连接
+                        e = getLocalElementByIp();
+                    }
+                }
+            }
+            if (!TextUtils.isEmpty(e) && e.length() >= 11 && e.length() <= 15) {
+                return e;
+            } else {
+                return "192.168.101.1";
+            }
+        } catch (Exception exception) {
+            exception.printStackTrace();
+        }
+        return null;
+    }
+    /**
+     * 获取掩码 Waderson
+     * <p>
+     * 1 WIFI情况下获取网关 2 有线网络下的DHCP模式连接 3 有线网络其他连接方式:比如静态ip、pppoe拨号、ipoe拨号等
+     */
+    public String getmask() {
+        try {
+            String e = "";
+            //先判断是否有线
+            Network network = connManager.getActiveNetwork();
+            NetworkCapabilities networkCapabilities = connManager.getNetworkCapabilities(network);
+            if (networkCapabilities != null) {
+                if (networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
+                    // Wi-Fi 网络连接
+                    WifiInfo wifiInfo = wifiManager.getConnectionInfo();
+                    if (wifiInfo != null) {
+                        DhcpInfo dhcpInfo = wifiManager.getDhcpInfo();
+                        e = Formatter.formatIpAddress(dhcpInfo.netmask);
+                    } else if (networkCapabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
+                        // 有线网络连接
+                        Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
+                        while (networkInterfaces.hasMoreElements()) {
+                            NetworkInterface networkInterface = networkInterfaces.nextElement();
+                            if (networkInterface.isUp() && !networkInterface.isLoopback()) {
+                                Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses();
+                                while (inetAddresses.hasMoreElements()) {
+                                    InetAddress inetAddress = inetAddresses.nextElement();
+                                    if (!inetAddress.isLoopbackAddress() && !inetAddress.isLinkLocalAddress()) {
+                                        e =getSubnetMaskFromPrefixLength(networkInterface.getInterfaceAddresses().get(0).getNetworkPrefixLength());
+                                    }
+                                }
+                            }
+                        }
+
 
+                    }
+                }
+            }
+            if (!TextUtils.isEmpty(e)) {
+                return e;
+            } else {
+                return "0.0.0.0";
+            }
+        } catch (Exception exception) {
+            exception.printStackTrace();
+        }
+        return null;
+    }
+    // 根据前缀长度获取子网掩码
+    private String getSubnetMaskFromPrefixLength(int prefixLength) {
+        try {
+            int maskBits = 0xffffffff << (32 - prefixLength);
+            byte[] maskBytes = new byte[]{
+                    (byte) (maskBits >>> 24),
+                    (byte) (maskBits >> 16 & 0xff),
+                    (byte) (maskBits >> 8 & 0xff),
+                    (byte) (maskBits & 0xff)
+            };
+            InetAddress inetAddress = InetAddress.getByAddress(maskBytes);
+            return inetAddress.getHostAddress();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
     /**
      * 有线网络下的DHCP模式连接
      */

+ 2 - 1
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/ScreenManagerUtil.kt

@@ -54,7 +54,8 @@ class ScreenManagerUtil {
     fun setScreenBrightness(context: Context, paramInt: Int) {
 
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
-            if (!Settings.System.canWrite(context)) {
+
+            if (!Settings.System.canWrite(context) && !"rk3128".equals(Build.MODEL)) {
                 val intent = Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS)
                 intent.data = Uri.parse("package:" + context.packageName)
                 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)

+ 6 - 4
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/settings/SettingConfig.java

@@ -8,6 +8,12 @@ public class SettingConfig {
 
     private static final String SP_NAME = "SP_DOOR_FUNCTION";
 
+    //设备区分
+    public static final String DEV_3188 = "1";//  z-3128(10寸,7寸)
+    public static final String DEV_3288 = "2";//  w-3288(10寸(横屏和竖屏),13.3寸竖屏,15.6寸竖屏)
+    public static final String DEV_dzh = "3";//   w-dch(10寸横屏,13.3竖屏)
+
+
     //白昼设置白天的初始时间设置
     private static final String KEY_SP_INITIAL_DAY_TIME = "KEY_SP_INITIAL_DAY_TIME";
     private static final String initial_day_time = "07:00";
@@ -336,10 +342,6 @@ public class SettingConfig {
         return getSP(context).getString(KEY_SP_APP_START_TIME, "Unknow");
     }
 
-
-
-
-
     private static SharedPreferences getSP(Context context) {
         return context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
     }

+ 92 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/util/HorizantalAutoBrLayout.java

@@ -0,0 +1,92 @@
+package com.wdkl.app.ncs.callingdoor.util;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class HorizantalAutoBrLayout extends ViewGroup {
+    /**
+     * 可使用的最大宽度
+     */
+    private int maxWidth;
+    public HorizantalAutoBrLayout (Context context) {
+        super(context);
+    }
+    public HorizantalAutoBrLayout (Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+    public HorizantalAutoBrLayout (Context context, AttributeSet attrs,
+                                   int defStyle) {
+        super(context, attrs, defStyle);
+    }
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        maxWidth = MeasureSpec.getSize(widthMeasureSpec);
+        /**
+         * 容器的高度,也就是本布局的高度。初始化赋值为0.
+         */
+        int containorHeight = 0;
+        /**
+         * 获取该布局内子组件的个数
+         */
+        int count = getChildCount();
+        for (int i = 0; i < count; i++) {
+            View view = getChildAt(i);
+            /**
+             * measure(int widthMeasureSpec,int
+             * heightMeasureSpec)用于设置子组件显示模式.有三个值:
+             * MeasureSpec.AT_MOST 该组件可以设置自己的大小,但是最大不能超过其父组件的限定
+             * MeasureSpec.EXACTLY 无论该组件设置大小是多少,都只能按照父组件限制的大小来显示
+             * MeasureSpec.UNSPECIFIED 该组件不受父组件的限制,可以设置任意大小
+             */
+            view.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
+            // 把每个子组件的高度相加就是该组件要显示的高度。
+            containorHeight += view.getMeasuredHeight();
+        }
+        /**
+         * onMeasure方法的关键代码,该句设置父容器的大小。
+         */
+        setMeasuredDimension(maxWidth, containorHeight);
+    }
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        // 获取子组件数
+        int childCount = getChildCount();
+        // 子组件行数,初始化赋值为1
+        int row = 1;
+        // 子组件的左边“坐标”
+        int left = 0;
+        // 子组件的右边“坐标”
+        int right = 0;
+        // 子组件的顶部“坐标”
+        int top = 0;
+        // 子组件的底部“坐标”
+        int bottom = 0;
+        // 在父组件中设置的padding属性的值,该值显然也会影响到子组件在屏幕的显示位置
+        int p = getPaddingLeft();
+        for (int i = 0; i < childCount; i++) {
+            View view = getChildAt(i);
+            // 测量子组件的宽
+            int width = view.getMeasuredWidth();
+            // 测量子组件的高
+            int height = view.getMeasuredHeight();
+            left = p + right;
+            right = left + width;
+            top = p * row + height * (row - 1);
+            bottom = top + height;
+            if (right > maxWidth) {
+                row++;
+                //每次换行后要将子组件左边“坐标”与右边“坐标”重新初始化
+                left = 0;
+                right = 0;
+                left = p + right;
+                right = left + width;
+                top = p * row + height * (row - 1);
+                bottom = top + height;
+            }
+            // 最后按照计算出来的“坐标”将子组件放在父容器内
+            view.layout(left, top, right, bottom);
+        }
+    }
+}

+ 429 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/util/NfcUtils.java

@@ -0,0 +1,429 @@
+//package com.wdkl.app.ncs.callingdoor.util;
+//
+//import android.app.PendingIntent;
+//import android.content.Intent;
+//import android.content.IntentFilter;
+//import android.nfc.FormatException;
+//import android.nfc.NdefMessage;
+//import android.nfc.NdefRecord;
+//import android.nfc.NfcAdapter;
+//import android.nfc.Tag;
+//import android.nfc.tech.MifareClassic;
+//import android.nfc.tech.Ndef;
+//import android.util.Log;
+//
+//
+//
+//import java.io.IOException;
+//import java.nio.charset.Charset;
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.Objects;
+//
+///**
+// * NFC 相关的工具类
+// * SDK 最低版本为 14
+// * 参考 https://github.com/albert-lii/SUtils/blob/master/sutils/src/main/java/com/liyi/sutils/utils/NfcUtil.java
+// * @author xzy
+// */
+//
+//@SuppressWarnings("all")
+//public class NfcUtils {
+//    private static final String TAG = "NfcUtils";
+//    /* NFC 适配器 */
+//    private NfcAdapter mAdapter;
+//    PendingIntent pIntent;
+//    /* NDEF 标签读取监听 */
+//    private OnReadFromNdefListener mReadNdefListener;
+//    /* NDEF 标签写入监听 */
+//    private OnWriteToNdefListener mWriteNdefListener;
+//    /* NDEF 标签删除监听 */
+//    private OnDeleteNdefListener mDeleteNdefListener;
+//    private static CallingbedActivity application = CallingbedActivity.Companion.getInstance();
+//
+//    public static com.wdkl.app.ncs.callingbed.utils.NfcUtils getInstance() {
+//        return NfcUtilsHolder.INSTANCE;
+//    }
+//
+//    private static final class NfcUtilsHolder {
+//        private static final com.wdkl.app.ncs.callingbed.utils.NfcUtils INSTANCE = new com.wdkl.app.ncs.callingbed.utils.NfcUtils();
+//    }
+//
+//    private NfcUtils() {
+//        mAdapter = NfcAdapter.getDefaultAdapter(application);
+//        pIntent = PendingIntent.getBroadcast(application, 0,
+//                //在Manifest里或者这里设置当前activity启动模式,否则每次向阳NFC事件,activity会重复创建
+//                // 当然也要按照具体情况来,你设置成singleTask也不是不行,
+//                new Intent("NFC_DISCOVERYED"),
+//                PendingIntent.FLAG_UPDATE_CURRENT);
+//    }
+//
+//    /**
+//     * 判断设备是否支持 NFC 功能
+//     *
+//     * @return {@code true}: 支持<br>{@code false}: 不支持
+//     */
+//    public boolean isSupportNfc() {
+//        return mAdapter != null;
+//    }
+//
+//    /**
+//     * 是否已经打开 NFC 功能
+//     *
+//     * @return {@code true}: 已经打开<br>{@code false}: 未打开
+//     */
+//    public boolean isNfcEnabled() {
+//        if (mAdapter != null && mAdapter.isEnabled()) {
+//            return true;
+//        }
+//        return false;
+//    }
+//
+//    /**
+//     * 判断是否有 NFC 相关的 intent
+//     * <p>
+//     * <p>NDEF_DISCOVERED: 只过滤固定格式的 NDEF 数据,例如:纯文本、指定协议(http、ftp、smb等)的URI等</p>
+//     * <p>
+//     * <p>TECH_DISCOVERED: 当 ACTION_NDEF_DISCOVERED 指定的过滤机制无法匹配 Tag 时,就会使用这种过滤机制进行
+//     * 匹配,
+//     * <p>这种过滤机制并不是通过 Tag 中的数据格式进行匹配的,而是根据 Tag 支持的数据存储格式进行匹配,
+//     * <p>因此这种过滤机制的范围更广</p>
+//     * <p>
+//     * <p>TAG_DISCOVERED: 当前面两种过滤机制都匹配失败后,系统就会利用这种过滤机制来处理,
+//     * <p>这种过滤机制用来处理未识别的 Tag(数据格式不对,而且 Tag 支持的格式也不匹配)</p>
+//     *
+//     * @param intent
+//     */
+//    public boolean isHasNfcIntent(Intent intent) {
+//        boolean isHasIntent = false;
+//        // NFC 的三重过滤机制
+//        if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())
+//                || NfcAdapter.ACTION_TECH_DISCOVERED.equals(intent.getAction())
+//                || NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {
+//            isHasIntent = true;
+//        }
+//        return isHasIntent;
+//    }
+//
+//    /**
+//     * 获取 NFC 的适配器
+//     *
+//     * @return NfcAdapter
+//     */
+//    public NfcAdapter getNfcAdapter() {
+//        if (mAdapter == null) {
+//            mAdapter = NfcAdapter.getDefaultAdapter(application);
+//
+//        }
+//        return mAdapter;
+//    }
+//    public void NfcOnResume(){
+//        if (mAdapter != null) {
+//            //添加intent-filter
+//            IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
+//            IntentFilter tag = new IntentFilter(NfcAdapter.ACTION_TAG_DISCOVERED);
+//            IntentFilter tech = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED);
+//            IntentFilter[] filters = new IntentFilter[]{ndef, tag, tech};
+//            //添加 ACTION_TECH_DISCOVERED 情况下所能读取的NFC格式,这里列的比较全,实际我这里是没有用到的,因为测试的卡是NDEF的
+//            String[][] techList = new String[][]{
+//                    new String[]{
+//                            "android.nfc.tech.Ndef",
+//                            "android.nfc.tech.NfcA",
+//                            "android.nfc.tech.NfcB",
+//                            "android.nfc.tech.NfcF",
+//                            "android.nfc.tech.NfcV",
+//                            "android.nfc.tech.NdefFormatable",
+//                            "android.nfc.tech.MifareClassic",
+//                            "android.nfc.tech.MifareUltralight",
+//                            "android.nfc.tech.NfcBarcode"
+//                    }
+//            };
+//            mAdapter.enableForegroundDispatch(application, pIntent, filters, techList);
+//        }
+//    }
+//
+//    public String readMifareClassic(Intent intent) {
+//
+//        String info = "";
+//        List<byte[]> list = new ArrayList<>();
+//        boolean auth = false;
+//        //读取TAG
+//        Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
+//        MifareClassic mfc = MifareClassic.get(tag);
+//        if (tag != null){
+//            try {
+//                mfc.connect();
+//                if (mfc.isConnected()) {
+//                    int sectorCount = mfc.getSectorCount();//获取TAG中包含的扇区数
+//                    if(sectorCount==16){
+//                        int bindex = mfc.sectorToBlock(1);
+//                        auth = mfc.authenticateSectorWithKeyA(1,
+//                                MifareClassic.KEY_DEFAULT);
+//                        if(auth){
+//                            byte[] data = mfc.readBlock(bindex+1);
+//                            info = new String(data, Charset.forName("utf-8"));
+//                            Log.e(TAG, "读取写入的数据: "+info );
+//                            if (mReadNdefListener != null) {
+//                                mReadNdefListener.Readsuccessfully(info);
+//                            }
+//                            return info;
+//
+//                        }
+//                    }
+//                }
+//            } catch (Exception e) {
+//                Log.e(TAG, e.getMessage());
+//                if (mReadNdefListener != null) {
+//                    mReadNdefListener.readFail();
+//                }
+//            } finally {
+//                try {
+//                    mfc.close();
+//                } catch (IOException e) {
+//                    Log.e(TAG, e.getMessage());
+//                    if (mReadNdefListener != null) {
+//                        mReadNdefListener.readFail();
+//                    }
+//                }
+//            }
+//        }else {
+//            if (mReadNdefListener != null) {
+//                mReadNdefListener.readFail();
+//            }
+//        }
+//
+//        return null;
+//    }
+//
+//    /**
+//     * 从 NDEF 标签中读取数据
+//     *
+//     * @param tag
+//     * @return 读取到的标签信息
+//     */
+//    public String readFromNdef(Tag tag) {
+//        try {
+//            if (tag != null) {
+//                // 解析 Tag 获取到 NDEF 实例
+//                Ndef ndef = Ndef.get(tag);
+//                // 打开连接
+//                ndef.connect();
+//                // 获取 NDEF 消息
+//                NdefMessage message = null;
+//                try {
+//                    message = ndef.getNdefMessage();
+//                } catch (FormatException e) {
+//                    e.printStackTrace();
+//                }
+//                // 将消息转换成字节数组
+//                byte[] data = Objects.requireNonNull(message).toByteArray();
+//                // 将字节数组转换成字符串
+//                String str = new String(data, Charset.forName("UTF-8"));
+//                // 关闭连接
+//                ndef.close();
+//                return str;
+//            } else {
+////                if (mReadNdefListener != null) {
+////                    mReadNdefListener.unConnect();
+////                }
+//            }
+//        } catch (IOException e) {
+//            if (mReadNdefListener != null) {
+//                mReadNdefListener.readFail();
+//            }
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+//
+//    /**
+//     * 向 NDEF 标签中写入信息
+//     *
+//     * @param tag
+//     * @param ndefRecords
+//     */
+//    public void writeToNdef(Tag tag, NdefRecord[] ndefRecords) {
+//        if (tag == null) {
+//            return;
+//        }
+//        NdefMessage ndefMessage = new NdefMessage(ndefRecords);
+//        // 获得写入大小
+//        int size = ndefMessage.toByteArray().length;
+//        // 判断是否是 NDEF 标签
+//        try {
+//            // 解析 TAG 获取到 NDEF 实例
+//            Ndef ndef = Ndef.get(tag);
+//            if (ndef != null) {
+//                // 开始连接
+//                ndef.connect();
+//                // 判断是否可写
+//                if (!ndef.isWritable()) {
+//                    if (mWriteNdefListener != null) {
+//                        mWriteNdefListener.unWritable();
+//                    }
+//                    return;
+//                }
+//                // 判断大小
+//                if (ndef.getMaxSize() < size) {
+//                    if (mWriteNdefListener != null) {
+//                        mWriteNdefListener.sizeOver(ndef);
+//                    }
+//                    return;
+//                }
+//                // 写入NDEF信息
+//                ndef.writeNdefMessage(ndefMessage);
+//                // 关闭连接
+//                ndef.close();
+//            } else {
+////                if (mWriteNdefListener != null) {
+////                    mWriteNdefListener.;
+////                }
+//            }
+//        } catch (IOException e) {
+//            if (mWriteNdefListener != null) {
+//                mWriteNdefListener.writeFail();
+//            }
+//            e.printStackTrace();
+//        } catch (FormatException e) {
+//            if (mWriteNdefListener != null) {
+//                mWriteNdefListener.writeFail();
+//            }
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    /**
+//     * 删除 NDEF 标签中的信息
+//     *
+//     * @param tag
+//     */
+//    public void deleteNdef(Tag tag) {
+//        try {
+//            if (tag != null) {
+//                // 新建一个里面无任何信息的 NdefRecord 实例
+//                NdefRecord nullNdefRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA,
+//                        new byte[]{}, new byte[]{}, new byte[]{});
+//                NdefRecord[] records = {nullNdefRecord};
+//                NdefMessage message = new NdefMessage(records);
+//                // 解析 TAG 获取到 NDEF 实例
+//                Ndef ndef = Ndef.get(tag);
+//                // 打开连接
+//                ndef.connect();
+//                // 写入信息
+//                ndef.writeNdefMessage(message);
+//                // 关闭连接
+//                ndef.close();
+//            } else {
+//                if (mDeleteNdefListener != null) {
+//                    mDeleteNdefListener.unConnect();
+//                }
+//            }
+//        } catch (IOException e) {
+//            if (mDeleteNdefListener != null) {
+//                mDeleteNdefListener.deleteFail();
+//            }
+//            e.printStackTrace();
+//        } catch (FormatException e) {
+//            if (mDeleteNdefListener != null) {
+//                mDeleteNdefListener.deleteFail();
+//            }
+//            e.printStackTrace();
+//        }
+//    }
+//
+//    /**
+//     * 设置 NDEF 标签读取监听
+//     *
+//     * @param listener
+//     */
+//    public void setReadNdefListener(OnReadFromNdefListener listener) {
+//        this.mReadNdefListener = listener;
+//    }
+//
+//    /**
+//     * 设置 NDEF 标签写入监听
+//     *
+//     * @param listener
+//     */
+//    public void setWriteNdefListener(OnWriteToNdefListener listener) {
+//        this.mWriteNdefListener = listener;
+//    }
+//
+//    /**
+//     * 设置 NDEF 标签信息删除监听
+//     *
+//     * @param listener
+//     */
+//    public void setDeleteNdefListener(OnDeleteNdefListener listener) {
+//        this.mDeleteNdefListener = listener;
+//    }
+//
+//    /**
+//     * 清除信息
+//     */
+//    public void clear() {
+//        setReadNdefListener(null);
+//        setWriteNdefListener(null);
+//        setDeleteNdefListener(null);
+//        if (mAdapter != null) {
+//            mAdapter.disableForegroundDispatch(application);
+//        }
+//    }
+//
+//    /**
+//     * 从 NDEF 标签中读取数据监听
+//     */
+//    public interface OnReadFromNdefListener {
+//        /**
+//         *  读取成功
+//         */
+//        void Readsuccessfully(String id);
+//        /**
+//         * 读取失败
+//         */
+//        void readFail();
+//    }
+//
+//    /**
+//     * 向 NDEF 标签中写入数据监听
+//     */
+//    public interface OnWriteToNdefListener {
+//
+//        /**
+//         * 没有连接成功
+//         */
+//        void Connect();
+//
+//        /**
+//         * 当前设备不支持写入
+//         */
+//        void unWritable();
+//
+//        /**
+//         * 要写入的信息容量大于标签支持的最大容量
+//         *
+//         * @param ndef
+//         */
+//        void sizeOver(Ndef ndef);
+//
+//        /**
+//         * 写入失败
+//         */
+//        void writeFail();
+//    }
+//
+//    /**
+//     * 删除 NDEF 标签信息监听
+//     */
+//    public interface OnDeleteNdefListener {
+//        /**
+//         * 没有连接成功
+//         */
+//        void unConnect();
+//
+//        /**
+//         * 删除失败
+//         */
+//        void deleteFail();
+//    }
+//}

+ 233 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/util/SPUtils.java

@@ -0,0 +1,233 @@
+package com.wdkl.app.ncs.callingdoor.util;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+import com.wdkl.ncs.android.middleware.common.Constant;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @Author: WangYong on 2020/11/3
+ * @Description:
+ */
+public class SPUtils {
+    public SPUtils() {
+        /* cannot be instantiated */
+        throw new UnsupportedOperationException("cannot be instantiated");
+    }
+
+    // 系统语言
+    private final String SP_NAME = "language_setting";
+    private final String TAG_LANGUAGE = "language_select";
+    private static volatile SPUtils instance;
+    private final SharedPreferences mSharedPreferences;
+    private Locale systemCurrentLocal = Locale.CHINESE;
+
+    public SPUtils(Context context) {
+        mSharedPreferences = context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);
+    }
+
+    public void saveLanguage(int select) {
+        SharedPreferences.Editor edit = mSharedPreferences.edit();
+        edit.putInt(TAG_LANGUAGE, select);
+        edit.commit();
+    }
+
+    public int getSelectLanguage() {
+        return mSharedPreferences.getInt(TAG_LANGUAGE, 1);
+    }
+
+    public Locale getSystemCurrentLocal() {
+        return systemCurrentLocal;
+    }
+
+    public void setSystemCurrentLocal(Locale local) {
+        systemCurrentLocal = local;
+    }
+
+    public static SPUtils getInstance(Context context) {
+        if (instance == null) {
+            synchronized (SPUtils.class) {
+                if (instance == null) {
+                    instance = new SPUtils(context);
+                }
+            }
+        }
+        return instance;
+    }
+
+    /**
+     * 保存数据的方法,我们需要拿到保存数据的具体类型,然后根据类型调用不同的保存方法
+     *
+     * @param context
+     * @param key
+     * @param object
+     */
+    public static void put(Context context, String key, Object object) {
+
+        SharedPreferences sp = context.getSharedPreferences(Constant.PREFERENCE_USER, Context.MODE_PRIVATE);
+        SharedPreferences.Editor editor = sp.edit();
+
+        if (object instanceof String) {
+            editor.putString(key, (String) object);
+        } else if (object instanceof Integer) {
+            editor.putInt(key, (Integer) object);
+        } else if (object instanceof Boolean) {
+            editor.putBoolean(key, (Boolean) object);
+        } else if (object instanceof Float) {
+            editor.putFloat(key, (Float) object);
+        } else if (object instanceof Long) {
+            editor.putLong(key, (Long) object);
+        } else {
+            editor.putString(key, object.toString());
+        }
+
+        SharedPreferencesCompat.apply(editor);
+    }
+
+
+    /**
+     * 得到保存数据的方法,我们根据默认值得到保存的数据的具体类型,然后调用相对于的方法获取值
+     *
+     * @param context
+     * @param key
+     * @param defaultObject
+     * @return
+     */
+    public static Object get(Context context, String key, Object defaultObject) {
+        SharedPreferences sp = context.getSharedPreferences(Constant.PREFERENCE_USER, Context.MODE_PRIVATE);
+
+        if (defaultObject instanceof String) {
+            return sp.getString(key, (String) defaultObject);
+        } else if (defaultObject instanceof Integer) {
+            return sp.getInt(key, (Integer) defaultObject);
+        } else if (defaultObject instanceof Boolean) {
+            return sp.getBoolean(key, (Boolean) defaultObject);
+        } else if (defaultObject instanceof Float) {
+            return sp.getFloat(key, (Float) defaultObject);
+        } else if (defaultObject instanceof Long) {
+            return sp.getLong(key, (Long) defaultObject);
+        }
+
+        return null;
+    }
+
+
+//
+//    /**
+//     * 获取token
+//     *
+//     * @return
+//     */
+//    public static String getToken(Context context) {
+//        return (String) get(context, Constant.APP_UUID, "");
+//    }
+
+    /**
+     * 移除某个key值已经对应的值
+     *
+     * @param context
+     * @param key
+     */
+    public static void remove(Context context, String key) {
+        SharedPreferences sp = context.getSharedPreferences(Constant.PREFERENCE_USER, Context.MODE_PRIVATE);
+        SharedPreferences.Editor editor = sp.edit();
+        editor.remove(key);
+        SharedPreferencesCompat.apply(editor);
+    }
+
+    /**
+     * 清除所有数据
+     *
+     * @param context
+     */
+    public static void clear(Context context) {
+        SharedPreferences sp = context.getSharedPreferences(Constant.PREFERENCE_USER, Context.MODE_PRIVATE);
+        SharedPreferences.Editor editor = sp.edit();
+        editor.clear();
+        SharedPreferencesCompat.apply(editor);
+    }
+
+    /**
+     * 查询某个key是否已经存在
+     *
+     * @param context
+     * @param key
+     * @return
+     */
+    public static boolean contains(Context context, String key) {
+        SharedPreferences sp = context.getSharedPreferences(Constant.PREFERENCE_USER, Context.MODE_PRIVATE);
+        return sp.contains(key);
+    }
+
+    /**
+     * 返回所有的键值对
+     *
+     * @param context
+     * @return
+     */
+    public static Map<String, ?> getAll(Context context) {
+        SharedPreferences sp = context.getSharedPreferences(Constant.PREFERENCE_USER, Context.MODE_PRIVATE);
+        return sp.getAll();
+    }
+//
+//    /**
+//     * 存放mac地址
+//     *
+//     * @return
+//     */
+//    public static String getMac() {
+//        return (String) get(MyApplication.getAppContext(),Constant.MAC_ADDRESS, "");
+//    }
+//
+//    public static void setMac(Context context,String macAddress) {
+//        put(context,Constant.MAC_ADDRESS, macAddress);
+//    }
+
+    /**
+     * 创建一个解决SharedPreferencesCompat.apply方法的一个兼容类
+     *
+     * @author zhy
+     */
+    private static class SharedPreferencesCompat {
+        private static final Method sApplyMethod = findApplyMethod();
+
+        /**
+         * 反射查找apply的方法
+         *
+         * @return
+         */
+        @SuppressWarnings({"unchecked", "rawtypes"})
+        private static Method findApplyMethod() {
+            try {
+                Class clz = SharedPreferences.Editor.class;
+                return clz.getMethod("apply");
+            } catch (NoSuchMethodException e) {
+            }
+
+            return null;
+        }
+
+        /**
+         * 如果找到则使用apply执行,否则使用commit
+         *
+         * @param editor
+         */
+        public static void apply(SharedPreferences.Editor editor) {
+            try {
+                if (sApplyMethod != null) {
+                    sApplyMethod.invoke(editor);
+                    return;
+                }
+            } catch (IllegalArgumentException e) {
+            } catch (IllegalAccessException e) {
+            } catch (InvocationTargetException e) {
+            }
+            editor.commit();
+        }
+    }
+}

+ 17 - 0
callingdoor/src/main/res/drawable/selector_callhu_bt.xml

@@ -0,0 +1,17 @@
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true">
+        <layer-list>
+            <item android:drawable="@mipmap/hu_bg" />
+            <item>
+                <shape>
+                    <solid android:color="#51000000" />
+                </shape>
+            </item>
+        </layer-list>
+    </item>
+    <item>
+        <layer-list>
+            <item android:drawable="@mipmap/hu_bg" />
+        </layer-list>
+    </item>
+</selector>

+ 5 - 0
callingdoor/src/main/res/drawable/selector_network_tx_color.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/txt_network" android:state_checked="false" />
+    <item android:color="@color/txt_number" android:state_checked="true" />
+</selector>

+ 6 - 0
callingdoor/src/main/res/drawable/selector_nuser_ed_d.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@drawable/shape_n_login_ed_bg" android:state_checked="false" />
+    <item android:drawable="@drawable/shape_n_login_ed_bg2" android:state_checked="true" />
+</selector>

+ 24 - 0
callingdoor/src/main/res/drawable/selector_nuser_msg_tx_d.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_pressed="true" >
+    <shape>
+        <solid
+            android:color="#F7F8FC"
+            />
+        <stroke android:width="1dp" android:color="#ff3f80f1" />
+        <corners android:radius="@dimen/d10" />
+    </shape>
+        <color android:color="#3F80F1" />
+</item>
+    <item android:state_pressed="false" >
+        <shape>
+            <solid
+                android:color="#F4F6F9"
+                />
+            <stroke android:width="1dp" android:color="#97A2BE" />
+            <corners android:radius="@dimen/d10" />
+        </shape>
+        <color android:color="#97A2BE" />
+    </item>
+</selector>

+ 15 - 0
callingdoor/src/main/res/drawable/selector_nuserlogin_btn.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="false">
+        <shape>
+            <corners android:radius="@dimen/d18"/>
+            <solid android:color="#3F80F1"/>
+        </shape>
+    </item>
+    <item android:state_pressed="true">
+        <shape>
+            <corners android:radius="@dimen/d18"/>
+            <solid android:color="#0C2DE3"/>
+        </shape>
+    </item>
+</selector>

+ 17 - 0
callingdoor/src/main/res/drawable/selector_zengyuan_bt.xml

@@ -0,0 +1,17 @@
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true">
+        <layer-list>
+            <item android:drawable="@mipmap/zeng_bg" />
+            <item>
+                <shape>
+                    <solid android:color="#51000000" />
+                </shape>
+            </item>
+        </layer-list>
+    </item>
+    <item>
+        <layer-list>
+            <item android:drawable="@mipmap/zeng_bg" />
+        </layer-list>
+    </item>
+</selector>

+ 3 - 0
callingdoor/src/main/res/drawable/selector_zengyuan_bt_d.xml

@@ -0,0 +1,3 @@
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@mipmap/zeng_bg"/>
+</layer-list>

+ 3 - 0
callingdoor/src/main/res/drawable/selector_zengyuan_bt_p.xml

@@ -0,0 +1,3 @@
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@mipmap/zeng_bg"/>
+</layer-list>

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_age_txt_bg.xml

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

+ 10 - 0
callingdoor/src/main/res/drawable/shape_bed_bg.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_ll_txt_bg.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_medic_txt_bg.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_nurse_bg.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_nurse_item_bg.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_nurse_txt_bg.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_bed_sex_txt_bg.xml

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

+ 8 - 3
callingdoor/src/main/res/drawable/shape_frame_bg.xml

@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <solid android:color="#FBE5E8"/>
+    <solid android:color="#FBE5E8"
+        />
     <corners
-        android:topLeftRadius="10dp"
-        android:topRightRadius="10dp"/>
+        android:topLeftRadius="@dimen/d10"
+        android:topRightRadius="@dimen/d10"
+        android:bottomLeftRadius="@dimen/d10"
+        android:bottomRightRadius="@dimen/d10"
+        />
+
 </shape>

+ 5 - 0
callingdoor/src/main/res/drawable/shape_huli_dialog_bt_bg.xml

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

+ 5 - 0
callingdoor/src/main/res/drawable/shape_main_bt_bg.xml

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

+ 5 - 0
callingdoor/src/main/res/drawable/shape_main_bt_bg2.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_main_hos_txt_bg.xml

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

+ 9 - 0
callingdoor/src/main/res/drawable/shape_n_login_ed_bg.xml

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

+ 9 - 0
callingdoor/src/main/res/drawable/shape_n_login_ed_bg2.xml

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

+ 11 - 0
callingdoor/src/main/res/drawable/shape_password_bt_bg.xml

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

+ 5 - 0
callingdoor/src/main/res/drawable/shape_patrol_dialog_bt_bg.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#37B643" />
+    <corners android:radius="20dp" />
+</shape>

+ 5 - 0
callingdoor/src/main/res/drawable/shape_positioning_dialog_bt_bg.xml

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

+ 14 - 0
callingdoor/src/main/res/drawable/shape_screen_bg.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#00FFFFFF"
+        />
+    <stroke
+        android:width="3dp"
+        android:color="#66FFFFFF" /> <!-- 边框颜色 -->
+    <corners
+        android:topLeftRadius="@dimen/d10"
+        android:topRightRadius="@dimen/d10"
+        android:bottomLeftRadius="@dimen/d10"
+        android:bottomRightRadius="@dimen/d10"
+        />
+</shape>

+ 14 - 0
callingdoor/src/main/res/drawable/shape_screen_txt_bg.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#00FFFFFF"
+        />
+    <stroke
+        android:width="3dp"
+        android:color="#ffffffff" /> <!-- 边框颜色 -->
+    <corners
+        android:topLeftRadius="@dimen/d10"
+        android:topRightRadius="@dimen/d10"
+        android:bottomLeftRadius="@dimen/d10"
+        android:bottomRightRadius="@dimen/d10"
+        />
+</shape>

+ 11 - 0
callingdoor/src/main/res/drawable/shape_settings_txt_bg.xml

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

+ 6 - 2
callingdoor/src/main/res/layout/call_dialog_lay.xml

@@ -1,7 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:background="@mipmap/call_bg"
+    >
 
     <!--拨出按钮显示-->
     <LinearLayout
@@ -9,7 +11,9 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:gravity="center"
-        android:orientation="vertical">
+        android:orientation="vertical"
+
+        >
 
         <TextView
             android:layout_width="match_parent"

+ 275 - 0
callingdoor/src/main/res/layout/callingdoor_activation.xml

@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="#F8FAFE">
+
+        <ImageView
+            android:id="@+id/activation_img"
+            android:layout_width="@dimen/d637"
+            android:layout_height="match_parent"
+            android:background="@mipmap/activation_bg"
+            />
+        <TextView
+            android:id="@+id/activation_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="请先激活设备"
+            android:textStyle="bold"
+            android:textSize="@dimen/font_size_32"
+            android:textColor="@color/white"
+            android:layout_marginTop="@dimen/d98"
+            android:layout_marginLeft="@dimen/d100"
+            />
+        <TextView
+            android:id="@+id/activation_title_msg"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="设置右侧参数后激活"
+            android:textSize="@dimen/font_size_16"
+            android:textColor="@color/white"
+            android:textStyle="bold"
+            android:layout_marginTop="@dimen/d144"
+            android:layout_marginLeft="@dimen/d100"
+            />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:gravity="center"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginTop="@dimen/d41"
+            android:layout_marginLeft="@dimen/d600"
+            android:layout_marginRight="@dimen/d24"
+            android:layout_marginBottom="@dimen/d10">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="智能健康 关爱互联系统"
+                    android:textSize="@dimen/font_size_18"
+                    android:textColor="@color/black"
+                    android:layout_marginTop="@dimen/d35" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="扫描二维码进行激活"
+                    android:textSize="@dimen/font_size_10"
+                    android:textColor="@color/black"
+                    android:layout_marginTop="@dimen/d10" />
+
+                <ImageView
+                    android:id="@+id/activation_qr_code"
+                    android:layout_width="@dimen/d112"
+                    android:layout_height="@dimen/d112"
+                    android:layout_marginTop="@dimen/d10" />
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:layout_marginTop="@dimen/d10"
+                    android:layout_marginLeft="@dimen/d90">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="当前版本号:"
+                        android:textSize="@dimen/font_size_13"
+                        android:textColor="@color/black"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/activation_v"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="V1.0.1.0"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:textSize="@dimen/font_size_10"
+                        android:textColor="@color/txt_setting" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:layout_marginLeft="@dimen/d108"
+                    android:layout_marginTop="@dimen/d15">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="本机IP:"
+                        android:textSize="@dimen/font_size_13"
+                        android:textColor="@color/black"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/activation_ip"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="192.168.0.0"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:textSize="@dimen/font_size_10"
+                        android:textColor="@color/txt_setting" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:layout_marginLeft="@dimen/d116"
+                    android:layout_marginTop="@dimen/d15">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="网关:"
+                        android:textSize="@dimen/font_size_13"
+                        android:textColor="@color/black"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/activation_wg"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="192.168.0.0"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:textSize="@dimen/font_size_10"
+                        android:textColor="@color/txt_setting" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:layout_marginLeft="@dimen/d116"
+                    android:layout_marginTop="@dimen/d15">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="掩码:"
+                        android:textSize="@dimen/font_size_13"
+                        android:textColor="@color/black"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/activation_ym"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="192.168.0.0"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:textSize="@dimen/font_size_10"
+                        android:textColor="@color/txt_setting" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:layout_marginLeft="@dimen/d108"
+                    android:layout_marginTop="@dimen/d15">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="注册码:"
+                        android:textSize="@dimen/font_size_13"
+                        android:textColor="@color/black"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/activation_zcm"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="192.168.0.0"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:textSize="@dimen/font_size_10"
+                        android:textColor="@color/txt_setting" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:layout_marginLeft="@dimen/d100"
+                    android:layout_marginTop="@dimen/d15">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="服务器IP:"
+                        android:textSize="@dimen/font_size_13"
+                        android:textColor="@color/black"
+                        android:textStyle="bold" />
+
+                    <TextView
+                        android:id="@+id/activation_fuq"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="192.168.0.0"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:textSize="@dimen/font_size_10"
+                        android:textColor="@color/txt_setting" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/d48"
+                    android:layout_marginTop="@dimen/d20"
+                    android:gravity="center_vertical"
+                    android:layout_marginLeft="@dimen/d19"
+                    android:layout_marginRight="@dimen/d19"
+                    android:orientation="horizontal">
+
+                    <Button
+                        android:id="@+id/activation_settings_button"
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/d48"
+                        android:layout_weight="1"
+                        android:gravity="center"
+                        android:background="@drawable/shape_main_hos_txt_bg"
+                        android:text="设备重启"
+                        android:textSize="16sp"
+                        android:textColor="@drawable/selector_bottom_btn_text_color" />
+
+                    <Button
+                        android:id="@+id/activation_system_button"
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/d48"
+                        android:layout_weight="1"
+                        android:gravity="center"
+                        android:background="@drawable/shape_main_hos_txt_bg"
+                        android:text="系统设置"
+                        android:textSize="16sp"
+                        android:layout_marginRight="@dimen/d14"
+                        android:layout_marginLeft="@dimen/d14"
+                        android:textColor="@drawable/selector_bottom_btn_text_color" />
+
+                    <Button
+                        android:id="@+id/activation_services_button"
+                        android:layout_width="0dp"
+                        android:layout_height="@dimen/d48"
+                        android:layout_weight="1"
+                        android:gravity="center"
+                        android:background="@drawable/shape_main_hos_txt_bg"
+                        android:text="服务器设置"
+                        android:textSize="16sp"
+                        android:textColor="@drawable/selector_bottom_btn_text_color" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+    </RelativeLayout>
+</layout>
+

+ 2 - 3
callingdoor/src/main/res/layout/callingdoor_main_lay.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<layout>
+
     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
@@ -194,5 +194,4 @@
             android:id="@+id/call_frame"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
-    </RelativeLayout>
-</layout>
+    </RelativeLayout>

+ 159 - 0
callingdoor/src/main/res/layout/callingdoor_main_new.xml

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:background="#F7F7F7">
+
+        <!--右侧按钮区域-->
+<!--        <ScrollView-->
+<!--            android:id="@+id/room_actions"-->
+<!--            android:layout_width="120dp"-->
+<!--            android:layout_height="match_parent"-->
+<!--            android:layout_below="@id/ll_room_name"-->
+<!--            android:layout_alignParentLeft="true">-->
+
+            <RelativeLayout
+                android:layout_width="120dp"
+                android:layout_height="match_parent"
+                android:background="@mipmap/bg"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/menu_home"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="18dp"
+                    android:layout_marginRight="@dimen/d15"
+                    android:layout_marginLeft="@dimen/d15"
+                    android:background="@drawable/shape_main_bt_bg"
+                    android:textColor="@color/white"
+                    android:drawablePadding="6dp"
+                    android:gravity="center"
+                    android:clickable="true"
+                    android:padding="10dp"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                    android:text="@string/str_home"
+                    android:focusableInTouchMode="true"
+                    android:textSize="14sp" />
+
+                <TextView
+                    android:id="@+id/menu_medical_care"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="18dp"
+                    android:layout_marginRight="@dimen/d15"
+                    android:layout_marginLeft="@dimen/d15"
+                    android:layout_below="@+id/menu_home"
+                    android:background="@drawable/shape_main_bt_bg"
+                    android:textColor="@color/white"
+                    android:drawablePadding="6dp"
+                    android:clickable="true"
+                    android:gravity="center"
+                    android:padding="10dp"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                    android:text="@string/str_medical_care"
+                    android:textSize="14sp" />
+
+                <TextView
+                    android:id="@+id/menu_more"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="18dp"
+                    android:layout_marginRight="@dimen/d15"
+                    android:layout_marginLeft="@dimen/d15"
+                    android:layout_below="@+id/menu_medical_care"
+                    android:background="@drawable/shape_main_bt_bg"
+                    android:textColor="@color/white"
+                    android:drawablePadding="6dp"
+                    android:clickable="true"
+                    android:gravity="center"
+                    android:padding="10dp"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                    android:text="@string/str_more"
+                    android:textSize="14sp" />
+
+                <TextView
+                    android:id="@+id/menu_support"
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_marginTop="80dp"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_below="@+id/menu_more"
+                    android:background="@drawable/selector_zengyuan_bt"
+                    android:clickable="true"
+                    android:drawableTop="@mipmap/zengyuan"
+                    android:gravity="center"
+                    android:padding="20dp"
+                    android:text="@string/str_supports"
+                    android:textColor="@color/white"
+                    android:textSize="14sp" />
+
+                <TextView
+                    android:id="@+id/menu_call_nurse"
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_below="@+id/menu_support"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_marginTop="12dp"
+                    android:background="@drawable/selector_callhu_bt"
+                    android:clickable="true"
+                    android:drawableTop="@mipmap/hujiao"
+                    android:gravity="center"
+                    android:padding="20dp"
+                    android:text="@string/str_call_nurse"
+                    android:textColor="@color/white"
+                    android:textSize="13sp" />
+
+                <TextView
+                    android:id="@+id/menu_call_bed"
+                    android:layout_width="96dp"
+                    android:layout_height="96dp"
+                    android:layout_below="@+id/menu_call_nurse"
+                    android:layout_marginLeft="10dp"
+                    android:layout_marginRight="10dp"
+                    android:layout_marginTop="12dp"
+                    android:background="@drawable/selector_callhu_bt"
+                    android:clickable="true"
+                    android:drawableTop="@mipmap/chuang"
+                    android:gravity="center"
+                    android:padding="20dp"
+                    android:text="@string/str_call_bed"
+                    android:textColor="@color/white"
+                    android:textSize="13sp" />
+            </RelativeLayout>
+<!--        </ScrollView>-->
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="#EAF2F9">
+
+            <include
+                android:id="@+id/activity_calling_door_layout_title"
+                layout="@layout/view_title_layout" />
+
+            <!--床位fragment区域-->
+            <FrameLayout
+                android:id="@+id/callingdoor_main_frame"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_below="@id/activity_calling_door_layout_title"
+                android:layout_marginBottom="10dp"
+                />
+        </RelativeLayout>
+
+        <!--通话界面-->
+        <FrameLayout
+            android:id="@+id/call_frame"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+    </LinearLayout>
+</layout>

+ 204 - 0
callingdoor/src/main/res/layout/callingdoor_nurse.xml

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="#EAF2F9">
+
+          <LinearLayout
+                 android:layout_width="match_parent"
+                 android:layout_height="@dimen/d80"
+                 android:gravity="center_vertical"
+                 android:background="@drawable/shape_bed_bg"
+                 android:layout_marginTop="@dimen/d20"
+                 android:layout_marginLeft="@dimen/d24"
+                 android:layout_marginRight="@dimen/d24"
+                 >
+                 <ImageView
+                     android:layout_width="40dp"
+                     android:layout_height="40dp"
+                     android:src="@mipmap/yanz"
+                     android:layout_marginLeft="25dp"
+                     />
+                 <TextView
+                     android:layout_width="wrap_content"
+                     android:layout_height="wrap_content"
+                     android:text="选择一种方式验证进入医护功能"
+                     android:layout_marginLeft="@dimen/d20"
+                     android:textSize="@dimen/font_size_18"
+                     android:textColor="@color/black"
+                     android:textStyle="bold"
+                     />
+
+             </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/d410"
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+        android:layout_marginTop="@dimen/d20"
+        android:layout_marginLeft="@dimen/d24"
+        android:layout_marginRight="@dimen/d24"
+        android:layout_marginBottom="@dimen/d20"
+        >
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginRight="@dimen/d10"
+            android:layout_weight="1"
+            android:background="@drawable/shape_bed_bg"
+            android:gravity="center_horizontal"
+            android:orientation="vertical">
+
+            <ImageView
+                android:layout_width="@dimen/d75"
+                android:layout_height="@dimen/d75"
+                android:layout_marginTop="@dimen/d22"
+                android:src="@mipmap/yan" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d17"
+                android:text="输入您的工号进入医护"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_15"
+                android:textStyle="bold" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d8"
+                android:text="工号由数字组成"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_10" />
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d50"
+                android:layout_marginTop="@dimen/d16"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d40"
+                    android:text="工号"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_15"
+                    android:textStyle="bold" />
+
+                <EditText
+                    android:id="@+id/nurse_login_password"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_marginLeft="@dimen/d8"
+                    android:layout_marginRight="@dimen/d60"
+                    android:background="@drawable/selector_nuser_ed_d"
+                    android:hint="请输入工号"
+                    android:paddingLeft="@dimen/d26"
+                    android:textSize="@dimen/font_size_18"
+                    android:textStyle="bold"
+
+                    />
+
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d50"
+                android:layout_marginTop="@dimen/d18"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="@dimen/d40"
+                    android:text="密码"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_15"
+                    android:textStyle="bold"
+
+                    />
+                <EditText
+                    android:id="@+id/nurse_login_nuber"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_marginLeft="@dimen/d8"
+                    android:layout_marginRight="@dimen/d60"
+                    android:background="@drawable/selector_nuser_ed_d"
+                    android:hint="请输入密码"
+                    android:paddingLeft="@dimen/d26"
+                    android:textSize="@dimen/font_size_18"
+                    android:textStyle="bold" />
+
+
+
+            </LinearLayout>
+
+
+
+            <TextView
+                android:id="@+id/nurse_bt"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d50"
+                android:layout_marginLeft="@dimen/d40"
+                android:layout_marginRight="@dimen/d50"
+                android:layout_marginTop="@dimen/d20"
+                android:background="@drawable/selector_nuserlogin_btn"
+                android:gravity="center"
+                android:clickable="true"
+                android:text="进入医护"
+                android:textColor="@color/white"
+                android:textSize="@dimen/font_size_15" />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            android:layout_marginLeft="@dimen/d10"
+            android:background="@drawable/shape_bed_bg"
+            >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="请在旁边刷卡处刷NFC卡进入医护"
+                android:layout_marginLeft="@dimen/d20"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d47"
+                />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="使用有效NFC刷卡成功后直接进入医护"
+                android:textSize="@dimen/font_size_10"
+                android:textColor="@color/black"
+                android:layout_marginTop="@dimen/d13"
+                />
+            <ImageView
+                android:layout_width="@dimen/d244"
+                android:layout_height="@dimen/d280"
+                android:src="@mipmap/nfc"
+                android:layout_marginTop="@dimen/d20"
+                />
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+    </LinearLayout>
+
+</layout>

+ 250 - 0
callingdoor/src/main/res/layout/callingdoor_nurse_main.xml

@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="#EAF2F9">
+
+          <RelativeLayout
+                 android:layout_width="match_parent"
+                 android:layout_height="@dimen/d220"
+                 android:background="@drawable/shape_bed_bg"
+                 android:layout_marginTop="@dimen/d20"
+                 android:layout_marginLeft="@dimen/d20"
+                 android:layout_marginRight="@dimen/d20"
+                 >
+              <TextView
+                  android:id="@+id/nurse_main_tx_1"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:text="您好,"
+                  android:textSize="@dimen/font_size_26"
+                  android:textColor="@color/txt_number"
+                  android:textStyle="bold"
+                  android:layout_marginTop="@dimen/d40"
+                  android:layout_marginLeft="@dimen/d40"
+                  />
+              <TextView
+                  android:id="@+id/nurse_main_tx_name"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:text="张舒婷护士"
+                  android:textSize="@dimen/font_size_26"
+                  android:textColor="@color/black"
+                  android:layout_toRightOf="@+id/nurse_main_tx_1"
+                  android:textStyle="bold"
+                  android:layout_marginTop="@dimen/d40"
+                  />
+              <TextView
+                  android:id="@+id/nurse_main_tx_2"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:text="当前为您的个人医护板块"
+                  android:textSize="@dimen/font_size_18"
+                  android:textColor="@color/text_black"
+                  android:layout_below="@+id/nurse_main_tx_1"
+                  android:textStyle="bold"
+                  android:layout_marginLeft="@dimen/d40"
+                  android:layout_marginTop="@dimen/d8"
+                  />
+              <TextView
+                  android:id="@+id/nurse_main_bt"
+                  android:layout_height="@dimen/d37"
+                  android:layout_width="@dimen/d110"
+                  android:gravity="center"
+                  android:layout_below="@+id/nurse_main_tx_2"
+                  android:layout_marginTop="@dimen/d30"
+                  android:layout_marginLeft="@dimen/d40"
+                  android:layout_marginRight="@dimen/d50"
+                  android:text="退出医护"
+                  android:clickable="true"
+                  android:textSize="@dimen/font_size_15"
+                  android:textColor="@color/white"
+                  android:background="@drawable/selector_nuserlogin_btn"
+                  />
+
+                 <ImageView
+                     android:layout_width="@dimen/d365"
+                     android:layout_height="match_parent"
+                     android:src="@mipmap/yihu"
+                    android:layout_alignParentRight="true"
+                     android:layout_marginLeft="25dp"
+                     />
+
+          </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+        android:layout_marginTop="@dimen/d20"
+        android:layout_marginLeft="@dimen/d24"
+        android:layout_marginRight="@dimen/d24"
+        android:layout_marginBottom="@dimen/d20"
+        >
+        <LinearLayout
+            android:id="@+id/nurse_main_1_ll"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginRight="@dimen/d10"
+            >
+            <ImageView
+                android:id="@+id/nurse_main_1_img"
+                android:layout_width="@dimen/d95"
+                android:layout_height="@dimen/d95"
+                android:src="@mipmap/ding"
+                android:layout_marginTop="@dimen/d22"
+                />
+
+            <TextView
+                android:id="@+id/nurse_top_1_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="定位"
+                android:textSize="@dimen/font_size_24"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d32"
+                />
+
+            <TextView
+                android:id="@+id/nurse_main_1_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="住院部402房"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d10"
+                />
+        </LinearLayout>
+        <LinearLayout
+            android:id="@+id/nurse_main_2_ll"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginRight="@dimen/d10"
+            >
+            <ImageView
+                android:id="@+id/nurse_main_2_img"
+                android:layout_width="@dimen/d95"
+                android:layout_height="@dimen/d95"
+                android:src="@mipmap/xun"
+                android:layout_marginTop="@dimen/d22"
+                />
+
+            <TextView
+                android:id="@+id/nurse_top_2_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="巡房"
+                android:textSize="@dimen/font_size_24"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d32"
+                />
+
+            <TextView
+                android:id="@+id/nurse_main_2_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="住院部402房"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d10"
+                />
+        </LinearLayout>
+        <LinearLayout
+            android:id="@+id/nurse_main_3_ll"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginRight="@dimen/d10"
+            >
+            <ImageView
+                android:id="@+id/nurse_main_3_img"
+                android:layout_width="@dimen/d95"
+                android:layout_height="@dimen/d95"
+                android:src="@mipmap/hu"
+                android:layout_marginTop="@dimen/d22"
+                />
+
+            <TextView
+                android:id="@+id/nurse_top_3_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="进入护理"
+                android:textSize="@dimen/font_size_24"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d32"
+                />
+
+            <TextView
+                android:id="@+id/nurse_main_3_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="该房病床进入护理"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d10"
+                />
+        </LinearLayout>
+        <LinearLayout
+            android:id="@+id/nurse_main_4_ll"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            android:clickable="true"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginRight="@dimen/d10"
+            >
+            <ImageView
+                android:id="@+id/nurse_main_4_img"
+                android:layout_width="@dimen/d95"
+                android:layout_height="@dimen/d95"
+                android:src="@mipmap/tishi"
+                android:layout_marginTop="@dimen/d22"
+                />
+
+            <TextView
+                android:id="@+id/nurse_top_4_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="设置提示语"
+                android:textSize="@dimen/font_size_24"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d32"
+                />
+
+            <TextView
+                android:id="@+id/nurse_main_4_tx"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="锁屏显示"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d10"
+                />
+        </LinearLayout>
+    </LinearLayout>
+
+    </LinearLayout>
+</layout>

+ 320 - 0
callingdoor/src/main/res/layout/callingdoor_nurse_msg.xml

@@ -0,0 +1,320 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="#F7F7F7">
+
+        <include
+            android:id="@+id/activity_calling_door_layout_title"
+            layout="@layout/view_title_layout"
+            />
+
+          <RelativeLayout
+                 android:layout_width="match_parent"
+                 android:layout_height="@dimen/d144"
+                 android:background="@drawable/shape_bed_bg"
+                 android:layout_marginTop="@dimen/d20"
+                 android:layout_marginLeft="@dimen/d15"
+                 android:layout_marginRight="@dimen/d24"
+                 android:orientation="vertical"
+                 >
+              <TextView
+                  android:id="@+id/nurse_msg_tx_1"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:text="*"
+                  android:textSize="@dimen/font_size_18"
+                  android:textColor="@color/txt_number"
+                  android:textStyle="bold"
+                  android:layout_marginTop="@dimen/d24"
+                  android:layout_marginLeft="@dimen/d28"
+                  />
+
+                 <TextView
+                     android:id="@+id/nurse_msg_tx_2"
+                     android:layout_width="wrap_content"
+                     android:layout_height="wrap_content"
+                     android:layout_toRightOf="@+id/nurse_msg_tx_1"
+                     android:text="自定义输入"
+                     android:textSize="@dimen/font_size_18"
+                     android:textColor="@color/black"
+                     android:textStyle="bold"
+                     android:layout_marginTop="@dimen/d24"
+
+                     />
+
+              <EditText
+                  android:id="@+id/nurse_msg_ed"
+                  android:layout_width="match_parent"
+                  android:layout_height="@dimen/d50"
+                  android:hint="请保持安静不要吵闹"
+                  android:paddingLeft="@dimen/d26"
+                  android:textSize="@dimen/font_size_18"
+                  android:gravity="center_vertical"
+                  android:layout_below="@+id/nurse_msg_tx_1"
+                  android:textStyle="bold"
+                  android:background="@drawable/shape_n_login_ed_bg2"
+                  android:layout_marginTop="@dimen/d16"
+                  android:layout_marginLeft="@dimen/d28"
+                  android:layout_marginRight="@dimen/d48"
+                  />
+
+
+             </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+
+        >
+        <RelativeLayout
+            android:layout_width="@dimen/d600"
+            android:layout_height="@dimen/d265"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginTop="@dimen/d20"
+            android:layout_marginLeft="@dimen/d24"
+            android:orientation="vertical"
+
+            >
+            <TextView
+                android:id="@+id/nurse_msg_tx_3"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="*"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/txt_number"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d24"
+                android:layout_marginLeft="@dimen/d28"
+                />
+
+            <TextView
+                android:id="@+id/nurse_msg_tx_4"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_toRightOf="@+id/nurse_msg_tx_3"
+                android:text="快捷提示语"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d24"
+                />
+
+            <TextView
+                android:id="@+id/nurse_msg_tx_5"
+                android:layout_width="@dimen/d270"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_3"
+                android:gravity="center"
+                android:text="保持安静"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d20"
+                android:layout_marginLeft="@dimen/d28"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_6"
+                android:layout_width="@dimen/d270"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_5"
+                android:gravity="center"
+                android:text="请勿大声喧哗"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d28"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_7"
+                android:layout_width="@dimen/d270"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_6"
+                android:gravity="center"
+                android:text="正在如厕请勿进入"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d28"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_8"
+                android:layout_width="@dimen/d270"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_3"
+                android:layout_toRightOf="@+id/nurse_msg_tx_5"
+                android:gravity="center"
+                android:text="正在护理请勿打扰"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d20"
+                android:layout_marginLeft="@dimen/d10"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_9"
+                android:layout_width="@dimen/d270"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_5"
+                android:layout_toRightOf="@+id/nurse_msg_tx_6"
+                android:gravity="center"
+                android:text="请勿探视"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d10"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_10"
+                android:layout_width="@dimen/d270"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_6"
+                android:layout_toRightOf="@+id/nurse_msg_tx_7"
+                android:gravity="center"
+                android:text="请不要过多人聚集"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d10"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+        </RelativeLayout>
+        <RelativeLayout
+            android:layout_width="@dimen/d365"
+            android:layout_height="@dimen/d265"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginTop="@dimen/d20"
+            android:layout_marginRight="@dimen/d28"
+            android:layout_marginLeft="@dimen/d15"
+            android:orientation="vertical"
+            >
+            <TextView
+                android:id="@+id/nurse_msg_tx_11"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="*"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/txt_number"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d24"
+                android:layout_marginLeft="@dimen/d28"
+                />
+
+            <TextView
+                android:id="@+id/nurse_msg_tx_12"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_toRightOf="@+id/nurse_msg_tx_11"
+                android:text="设置提示时间"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d24"
+                />
+
+            <TextView
+                android:id="@+id/nurse_msg_tx_13"
+                android:layout_width="@dimen/d150"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_11"
+                android:gravity="center"
+                android:text="10分钟"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d20"
+                android:layout_marginLeft="@dimen/d28"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_14"
+                android:layout_width="@dimen/d150"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_13"
+                android:gravity="center"
+                android:text="30分钟"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d28"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_15"
+                android:layout_width="@dimen/d150"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_14"
+                android:gravity="center"
+                android:text="90分钟"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d28"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_16"
+                android:layout_width="@dimen/d150"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_11"
+                android:layout_toRightOf="@+id/nurse_msg_tx_13"
+                android:gravity="center"
+                android:text="15分钟"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d20"
+                android:layout_marginLeft="@dimen/d10"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_17"
+                android:layout_width="@dimen/d150"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_13"
+                android:layout_toRightOf="@+id/nurse_msg_tx_14"
+                android:gravity="center"
+                android:text="60分钟"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d10"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+            <TextView
+                android:id="@+id/nurse_msg_tx_18"
+                android:layout_width="@dimen/d150"
+                android:layout_height="@dimen/d48"
+                android:layout_below="@+id/nurse_msg_tx_14"
+                android:layout_toRightOf="@+id/nurse_msg_tx_15"
+                android:gravity="center"
+                android:text="120分钟"
+                android:textSize="@dimen/font_size_16"
+                android:textColor="@color/text_name_color"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d10"
+                android:background="@drawable/selector_nuser_msg_tx_d"
+                />
+        </RelativeLayout>
+
+    </LinearLayout>
+
+        <TextView
+            android:id="@+id/nurse_msg_bt"
+            android:layout_width="@dimen/d420"
+            android:layout_height="@dimen/d60"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:text="开始提示"
+            android:textColor="@color/white"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:layout_marginTop="@dimen/d26"
+            android:textSize="@dimen/font_size_20" />
+    </LinearLayout>
+
+</layout>

+ 644 - 0
callingdoor/src/main/res/layout/callingdoor_setting_main.xml

@@ -0,0 +1,644 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="#F7F7F7">
+
+        <include
+            android:id="@+id/activity_calling_door_layout_title"
+            layout="@layout/view_title_layout"
+            />
+
+          <RelativeLayout
+                 android:layout_width="match_parent"
+                 android:layout_height="@dimen/d220"
+                 android:background="@drawable/shape_bed_bg"
+                 android:layout_marginTop="@dimen/d20"
+                 android:layout_marginLeft="@dimen/d15"
+                 android:layout_marginRight="@dimen/d24"
+                 android:orientation="vertical"
+                 >
+              <ImageView
+                  android:id="@+id/settings_img"
+                  android:layout_width="@dimen/d24"
+                  android:layout_height="@dimen/d24"
+                  android:background="@mipmap/shbei"
+                  android:layout_marginTop="@dimen/d16"
+                  android:layout_marginLeft="@dimen/d20"
+                  />
+
+                 <TextView
+                     android:id="@+id/settings_tx_2"
+                     android:layout_width="wrap_content"
+                     android:layout_height="wrap_content"
+                     android:layout_toRightOf="@+id/settings_img"
+                     android:text="设备调试"
+                     android:textSize="@dimen/font_size_18"
+                     android:layout_marginLeft="@dimen/d10"
+                     android:textColor="@color/black"
+                     android:textStyle="bold"
+                     android:layout_marginTop="@dimen/d16"
+
+                     />
+              <LinearLayout
+                  android:layout_width="match_parent"
+                  android:layout_height="match_parent"
+                  android:orientation="horizontal"
+                  android:layout_marginLeft="@dimen/d20"
+                  android:layout_marginTop="@dimen/d16"
+                  android:layout_marginBottom="@dimen/d26"
+                  android:layout_below="@+id/settings_img"
+                  >
+                  <LinearLayout
+                      android:id="@+id/settings_main_1_ll"
+                      android:layout_width="@dimen/d165"
+                      android:layout_height="match_parent"
+                      android:layout_marginRight="@dimen/d25"
+                      android:background="@mipmap/fuwu_bg"
+                      android:clickable="true"
+                      android:gravity="center_horizontal"
+                      android:orientation="vertical">
+
+                      <ImageView
+                          android:layout_width="@dimen/d30"
+                          android:layout_height="@dimen/d30"
+                          android:layout_marginTop="@dimen/d22"
+                          android:src="@mipmap/fuwu" />
+
+                      <TextView
+                          android:layout_width="wrap_content"
+                          android:layout_height="wrap_content"
+                          android:layout_marginTop="@dimen/d12"
+                          android:text="服务器设置"
+                          android:textColor="@color/white"
+                          android:textSize="@dimen/font_size_14"
+                          android:textStyle="bold" />
+
+                      <TextView
+                          android:id="@+id/settings_main_1_tx"
+                          android:layout_width="@dimen/d58"
+                          android:layout_height="@dimen/d20"
+                          android:layout_marginTop="@dimen/d21"
+                          android:background="@drawable/shape_n_login_ed_bg"
+                          android:gravity="center"
+                          android:text="立即设置"
+                          android:textColor="#3A78EF"
+                          android:textSize="@dimen/font_size_10" />
+                  </LinearLayout>
+                  <LinearLayout
+                      android:id="@+id/settings_main_2_ll"
+                      android:layout_width="@dimen/d165"
+                      android:layout_height="match_parent"
+                      android:gravity="center_horizontal"
+                      android:orientation="vertical"
+                      android:clickable="true"
+                      android:background="@mipmap/wl_bg"
+                      android:layout_marginRight="@dimen/d25"
+                      >
+                      <ImageView
+                          android:layout_width="@dimen/d30"
+                          android:layout_height="@dimen/d30"
+                          android:src="@mipmap/wangluo"
+                          android:layout_marginTop="@dimen/d22"
+                          />
+
+                      <TextView
+                          android:layout_width="wrap_content"
+                          android:layout_height="wrap_content"
+                          android:text="网络设置"
+                          android:textSize="@dimen/font_size_14"
+                          android:textColor="@color/white"
+                          android:textStyle="bold"
+                          android:layout_marginTop="@dimen/d12"
+                          />
+
+                      <TextView
+                          android:id="@+id/settings_main_2_tx"
+                          android:layout_width="@dimen/d58"
+                          android:layout_height="@dimen/d20"
+                          android:text="立即设置"
+                          android:textSize="@dimen/font_size_10"
+                          android:textColor="#57D64E"
+                          android:gravity="center"
+                          android:layout_marginTop="@dimen/d21"
+                          android:background="@drawable/shape_n_login_ed_bg"
+                          />
+                  </LinearLayout>
+                  <LinearLayout
+                      android:id="@+id/settings_main_3_ll"
+                      android:layout_width="@dimen/d165"
+                      android:layout_height="match_parent"
+                      android:gravity="center_horizontal"
+                      android:orientation="vertical"
+                      android:clickable="true"
+                      android:background="@mipmap/tiaoshi_bg"
+                      android:layout_marginRight="@dimen/d25"
+                      >
+                      <ImageView
+                          android:layout_width="@dimen/d30"
+                          android:layout_height="@dimen/d30"
+                          android:src="@mipmap/tiaoshi"
+                          android:layout_marginTop="@dimen/d22"
+                          />
+
+                      <TextView
+                          android:layout_width="wrap_content"
+                          android:layout_height="wrap_content"
+                          android:text="进入调试"
+                          android:textSize="@dimen/font_size_14"
+                          android:textColor="@color/white"
+                          android:textStyle="bold"
+                          android:layout_marginTop="@dimen/d12"
+                          />
+
+                      <TextView
+                          android:id="@+id/settings_main_3_tx"
+                          android:layout_width="@dimen/d58"
+                          android:layout_height="@dimen/d20"
+                          android:text="开始调试"
+                          android:textSize="@dimen/font_size_10"
+                          android:textColor="#FF924A"
+                          android:gravity="center"
+                          android:layout_marginTop="@dimen/d21"
+                          android:background="@drawable/shape_n_login_ed_bg"
+                          />
+                  </LinearLayout>
+                  <LinearLayout
+                      android:id="@+id/settings_main_4_ll"
+                      android:layout_width="@dimen/d165"
+                      android:layout_height="match_parent"
+                      android:gravity="center_horizontal"
+                      android:orientation="vertical"
+                      android:clickable="true"
+                      android:background="@mipmap/banben_bg"
+                      android:layout_marginRight="@dimen/d25"
+                      >
+                      <ImageView
+                          android:layout_width="@dimen/d30"
+                          android:layout_height="@dimen/d30"
+                          android:src="@mipmap/banben"
+                          android:layout_marginTop="@dimen/d22"
+                          />
+
+                      <TextView
+                          android:layout_width="wrap_content"
+                          android:layout_height="wrap_content"
+                          android:text="版本更新"
+                          android:textSize="@dimen/font_size_14"
+                          android:textColor="@color/white"
+                          android:textStyle="bold"
+                          android:layout_marginTop="@dimen/d12"
+                          />
+
+                      <TextView
+                          android:id="@+id/settings_main_4_tx"
+                          android:layout_width="@dimen/d58"
+                          android:layout_height="@dimen/d20"
+                          android:text="更新版本"
+                          android:textSize="@dimen/font_size_10"
+                          android:textColor="#EE3B3B"
+                          android:gravity="center"
+                          android:layout_marginTop="@dimen/d21"
+                          android:background="@drawable/shape_n_login_ed_bg"
+                          />
+                  </LinearLayout>
+                  <LinearLayout
+                      android:id="@+id/settings_main_5_ll"
+                      android:layout_width="@dimen/d165"
+                      android:layout_height="match_parent"
+                      android:gravity="center_horizontal"
+                      android:orientation="vertical"
+                      android:clickable="true"
+                      android:background="@mipmap/cq_bg"
+                      android:layout_marginRight="@dimen/d19"
+                      >
+                      <ImageView
+                          android:layout_width="@dimen/d30"
+                          android:layout_height="@dimen/d30"
+                          android:src="@mipmap/cq"
+                          android:layout_marginTop="@dimen/d22"
+                          />
+
+                      <TextView
+                          android:layout_width="wrap_content"
+                          android:layout_height="wrap_content"
+                          android:text="重启设备"
+                          android:textSize="@dimen/font_size_14"
+                          android:textColor="@color/white"
+                          android:textStyle="bold"
+                          android:layout_marginTop="@dimen/d12"
+                          />
+
+                      <TextView
+                          android:id="@+id/settings_main_5_tx"
+                          android:layout_width="@dimen/d58"
+                          android:layout_height="@dimen/d20"
+                          android:text="立即重启"
+                          android:textSize="@dimen/font_size_10"
+                          android:textColor="#FF924A"
+                          android:gravity="center"
+                          android:layout_marginTop="@dimen/d21"
+                          android:background="@drawable/shape_n_login_ed_bg"
+                          />
+                  </LinearLayout>
+              </LinearLayout>
+          </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        >
+        <RelativeLayout
+            android:layout_width="@dimen/d700"
+            android:layout_height="@dimen/d290"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginTop="@dimen/d15"
+            android:layout_marginLeft="@dimen/d15"
+            android:orientation="vertical"
+
+            >
+            <ImageView
+                android:id="@+id/settings_img1"
+                android:layout_width="@dimen/d24"
+                android:layout_height="@dimen/d24"
+                android:background="@mipmap/xinxi"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d20"
+                />
+
+            <TextView
+                android:id="@+id/nurse_msg_tx_4"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_toRightOf="@+id/settings_img1"
+                android:text="设备信息"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:layout_marginTop="@dimen/d16"
+                android:layout_marginLeft="@dimen/d10"
+                />
+            <LinearLayout
+                android:id="@+id/settings_main_6_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_img1"
+                android:layout_marginTop="@dimen/d17"
+                android:layout_marginLeft="@dimen/d20"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="ID"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_6_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="192.168.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_7_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_img1"
+                android:layout_toRightOf="@+id/settings_main_6_ll"
+                android:layout_marginTop="@dimen/d17"
+                android:layout_marginLeft="@dimen/d10"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="IP"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_7_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="http: s/sssss"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_8_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_6_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d20"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="网关"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_8_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+
+                    android:text="http: //"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_9_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_7_ll"
+                android:layout_toRightOf="@+id/settings_main_8_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d10"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="DNS"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_9_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+
+                    android:text="11:25:44"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_10_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_8_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d20"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="服务器ID"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_10_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+
+                    android:text="http: //"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_11_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_9_ll"
+                android:layout_toRightOf="@+id/settings_main_8_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d10"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="语音ID"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_11_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="00000"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_12_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_11_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d20"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="语音类型"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_12_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+
+                    android:text="000类型"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_13_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_11_ll"
+                android:layout_toRightOf="@+id/settings_main_12_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d10"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="语音服务器"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_13_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="服务器"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_14_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_12_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d20"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="APP版本"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_14_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+
+                    android:text="V 0.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+            <LinearLayout
+                android:id="@+id/settings_main_15_ll"
+                android:layout_width="@dimen/d325"
+                android:layout_height="@dimen/d38"
+                android:layout_below="@+id/settings_main_12_ll"
+                android:layout_toRightOf="@+id/settings_main_12_ll"
+                android:layout_marginTop="@dimen/d7"
+                android:layout_marginLeft="@dimen/d10"
+                android:clickable="true"
+                android:gravity="center_vertical"
+                android:background="@drawable/shape_settings_txt_bg"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="0.4"
+                    android:text="发布日期"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14"
+                    android:layout_marginLeft="@dimen/d12"
+                    />
+
+                <TextView
+                    android:id="@+id/settings_main_15_tx"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="00/00/00"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_14" />
+            </LinearLayout>
+        </RelativeLayout>
+
+
+        <LinearLayout
+            android:layout_width="@dimen/d265"
+            android:layout_height="@dimen/d290"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginLeft="@dimen/d20"
+            android:layout_marginTop="@dimen/d15"
+            android:gravity="center"
+            android:orientation="vertical"
+            >
+
+
+
+            <TextView
+                android:id="@+id/settings_img2"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="扫描二维码"
+                android:drawableLeft="@mipmap/saom"
+                android:drawablePadding="@dimen/d8"
+                android:textSize="@dimen/font_size_18"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                />
+
+            <ImageView
+                android:id="@+id/setting_qr_code"
+                android:layout_width="200dp"
+                android:layout_height="200dp"
+                android:layout_marginTop="@dimen/d14"
+
+                />
+        </LinearLayout>
+
+    </LinearLayout>
+
+    </LinearLayout>
+
+</layout>

+ 229 - 0
callingdoor/src/main/res/layout/callingdoor_test_main.xml

@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="#F7F7F7">
+
+        <include
+            android:id="@+id/activity_calling_door_layout_title"
+            layout="@layout/view_title_layout"
+            />
+
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+
+        >
+        <LinearLayout
+            android:layout_width="@dimen/d475"
+            android:layout_height="match_parent"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginTop="@dimen/d63"
+            android:layout_marginLeft="@dimen/d24"
+            android:layout_marginBottom="@dimen/d50"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            >
+            <ImageView
+                android:layout_width="@dimen/d88"
+                android:layout_height="@dimen/d88"
+                android:src="@mipmap/hedimg"
+                android:layout_marginTop="@dimen/d66" />
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp"
+                android:text="请输入目标SIP账号"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:textSize="@dimen/font_size_18"
+                android:gravity="center" />
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d7"
+                android:text="输入账号进行测试"
+                android:textColor="#7D7D7D"
+                android:textSize="@dimen/font_size_13"
+                android:gravity="center" />
+
+            <EditText
+                android:id="@+id/password_ed"
+                android:layout_width="@dimen/d383"
+                android:layout_height="@dimen/d52"
+                android:hint="请输入账号"
+                android:paddingLeft="@dimen/d26"
+                android:textSize="@dimen/font_size_18"
+                android:gravity="center_vertical"
+                android:layout_below="@+id/nurse_msg_tx_1"
+                android:textStyle="bold"
+                android:background="@drawable/shape_n_login_ed_bg2"
+                android:layout_marginTop="@dimen/d16"
+                />
+            <Button
+                android:id="@+id/text_call_button"
+                android:layout_width="@dimen/d383"
+                android:layout_height="@dimen/d48"
+                android:gravity="center"
+                android:background="@drawable/shape_main_hos_txt_bg"
+                android:text="呼叫测试"
+                android:textSize="16sp"
+                android:layout_marginTop="@dimen/d20"
+
+                android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="@dimen/d491"
+            android:layout_height="match_parent"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_marginTop="@dimen/d63"
+            android:layout_marginRight="@dimen/d28"
+            android:layout_marginLeft="@dimen/d16"
+            android:layout_marginBottom="@dimen/d50"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            >
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="66dp"
+                android:text="外接设备测试"
+                android:textColor="@color/black"
+                android:textStyle="bold"
+                android:textSize="@dimen/font_size_18"
+                android:gravity="center" />
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d7"
+                android:text="请检查外接设备是否已连接再开始测试"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_13"
+                android:gravity="center" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center"
+                android:layout_marginTop="@dimen/d23"
+                >
+                <Button
+                    android:id="@+id/text_sbaj_button"
+                    android:layout_width="@dimen/d383"
+                    android:layout_height="@dimen/d48"
+                    android:gravity="center"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:text="手柄按键测试"
+                    android:textSize="16sp"
+
+                    android:textColor="@drawable/selector_bottom_btn_text_color"/>
+                <ImageView
+                    android:id="@+id/sbaj_img"
+                    android:layout_width="@dimen/d16"
+                    android:layout_height="@dimen/d16"
+                    android:background="@mipmap/gou"
+                    android:visibility="invisible"
+                    android:layout_marginLeft="@dimen/d8"
+                    />
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center"
+                android:layout_marginTop="@dimen/d16"
+                >
+                <Button
+                    android:id="@+id/mbhj_button"
+                    android:layout_width="@dimen/d383"
+                    android:layout_height="@dimen/d48"
+                    android:gravity="center"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:text="面板呼叫测试"
+                    android:textSize="16sp"
+
+                    android:textColor="@drawable/selector_bottom_btn_text_color"/>
+                <ImageView
+                    android:id="@+id/mbh_img"
+                    android:layout_width="@dimen/d16"
+                    android:layout_height="@dimen/d16"
+                    android:background="@mipmap/gou"
+                    android:visibility="invisible"
+                    android:layout_marginLeft="@dimen/d8"
+                    />
+            </LinearLayout>
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center"
+                android:layout_marginTop="@dimen/d16"
+                >
+                <Button
+                    android:id="@+id/mbhjqx_button"
+                    android:layout_width="@dimen/d383"
+                    android:layout_height="@dimen/d48"
+                    android:gravity="center"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:text="面板呼叫测试"
+                    android:textSize="16sp"
+
+                    android:textColor="@drawable/selector_bottom_btn_text_color"/>
+                <ImageView
+                    android:id="@+id/mbhjjqx_img"
+                    android:layout_width="@dimen/d16"
+                    android:layout_height="@dimen/d16"
+                    android:background="@mipmap/gou"
+                    android:visibility="invisible"
+                    android:layout_marginLeft="@dimen/d8"
+                    />
+            </LinearLayout>
+
+            <LinearLayout
+
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:gravity="center"
+                android:layout_marginTop="@dimen/d16"
+                >
+                <Button
+                    android:id="@+id/lycs_button"
+                    android:layout_width="@dimen/d383"
+                    android:layout_height="@dimen/d48"
+                    android:gravity="center_vertical"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:drawableLeft="@mipmap/lu"
+                    android:text="录音测试(按住按钮说话10s)"
+                    android:textSize="16sp"
+                    android:paddingLeft="@dimen/d88"
+                    android:drawablePadding="@dimen/d16"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"/>
+                <ImageView
+                    android:id="@+id/lycs_img"
+                    android:layout_width="@dimen/d16"
+                    android:layout_height="@dimen/d16"
+                    android:background="@mipmap/gou"
+                    android:visibility="invisible"
+                    android:layout_marginLeft="@dimen/d8"
+                    />
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+    </LinearLayout>
+
+</layout>

+ 164 - 260
callingdoor/src/main/res/layout/item_bed.xml

@@ -1,305 +1,209 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="290dp"
-    android:layout_height="match_parent"
+    android:layout_width="@dimen/d270"
+    android:layout_height="@dimen/d400"
     android:paddingLeft="4dp"
+    android:background="@drawable/shape_bed_bg"
+    android:padding="@dimen/d12"
     android:orientation="vertical">
 
-    <LinearLayout
+    <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+
+        <LinearLayout
+            android:id="@+id/ll_bed"
+            android:layout_width="@dimen/d65"
+            android:layout_height="@dimen/d65"
+            android:orientation="vertical"
+            android:gravity="center"
+            android:background="@mipmap/chuanghao_bg"
+            >
+            <TextView
+                android:id="@+id/tv_bed_name_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:text="126"
+                android:textStyle="bold"
+                android:textColor="@color/white"
+                android:textSize="21sp"/>
+
+            <TextView
+                android:id="@+id/tv_bed_card_no"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="床位号"
+                android:textColor="@color/white"
+                android:textSize="10sp"/>
+        </LinearLayout>
+
         <TextView
-            android:id="@+id/tv_bed_name_title"
+            android:id="@+id/tv_bed_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_weight="2"
-            android:padding="4dp"
-            android:singleLine="true"
-            android:ellipsize="end"
-            android:text="--"
-            android:textColor="@color/main_color"
-            android:textSize="36sp"/>
+            android:layout_toRightOf="@+id/ll_bed"
+            android:text="张小斐"
+            android:layout_marginLeft="@dimen/d8"
+            android:layout_alignTop="@+id/ll_bed"
+            android:textColor="@color/text_room_color"
+            android:textSize="@dimen/font_size_26"/>
+
         <TextView
-            android:id="@+id/tv_bed_card_no"
+            android:id="@+id/tv_bed_age"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:textColor="#B4B4B4"
-            android:textSize="16sp"/>
-    </LinearLayout>
+            android:layout_toRightOf="@+id/ll_bed"
+            android:text="年龄:28岁"
+            android:layout_marginLeft="@dimen/d8"
+            android:paddingLeft="@dimen/d9"
+            android:paddingRight="@dimen/d9"
+            android:paddingTop="@dimen/d4"
+            android:paddingBottom="@dimen/d4"
+            android:gravity="center"
+            android:layout_alignBottom="@+id/ll_bed"
+            android:textColor="@color/txt_age"
+            android:background="@drawable/shape_bed_age_txt_bg"
+            android:textSize="@dimen/font_size_14"/>
 
-    <LinearLayout
+        <TextView
+            android:id="@+id/tv_bed_sex"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="性别:女"
+            android:layout_marginLeft="@dimen/d8"
+            android:layout_toRightOf="@+id/tv_bed_age"
+            android:layout_alignBottom="@+id/ll_bed"
+            android:textColor="@color/txt_sex"
+            android:paddingLeft="@dimen/d9"
+            android:paddingRight="@dimen/d9"
+            android:paddingTop="@dimen/d4"
+            android:paddingBottom="@dimen/d4"
+            android:background="@drawable/shape_bed_sex_txt_bg"
+            android:textSize="@dimen/font_size_14"/>
+    </RelativeLayout>
+
+    <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:baselineAligned="false">
+        android:layout_height="@dimen/d180"
+        android:layout_marginTop="@dimen/d20"
+        android:background="@drawable/shape_bed_nurse_bg"
+        >
+
+        <ImageView
+            android:id="@+id/nurse_img"
+            android:layout_width="@dimen/d20"
+            android:layout_height="@dimen/d20"
+            android:background="@mipmap/huli"
+            android:layout_marginTop="@dimen/d12"
+            android:layout_marginLeft="@dimen/d15"
+            />
 
-        <!--护理项-->
-        <LinearLayout
-            android:id="@+id/ll_nurse_configs"
-            android:layout_width="0dp"
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/bed_nurse_name"
+            android:layout_marginLeft="@dimen/d5"
+            android:layout_toRightOf="@+id/nurse_img"
+            android:textColor="@color/black"
+            android:layout_marginTop="@dimen/d12"
+            android:textSize="@dimen/font_size_15"/>
+
+        <com.wdkl.app.ncs.callingdoor.util.HorizantalAutoBrLayout
+            android:id="@+id/ll_one"
+            android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_weight="1.2"
-            android:baselineAligned="false"
-            android:orientation="vertical">
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/nurse_config_item_height"
-                android:layout_marginTop="10dp">
-                <View
-                    android:id="@+id/nurse_config_item_color1"
-                    android:layout_width="10dp"
-                    android:layout_height="match_parent"
-                    android:background="@color/nursing_default_color"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_name1"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color1"
-                    android:paddingLeft="4dp"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/default_nurse_config_name"
-                    android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_value1"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color1"
-                    android:layout_alignParentBottom="true"
-                    android:paddingRight="4dp"
-                    android:gravity="right"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/str_empty"
-                    android:textColor="@color/main_color"
-                    android:textSize="20sp"/>
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/nurse_config_item_height"
-                android:layout_marginTop="@dimen/nurse_config_margin">
-                <View
-                    android:id="@+id/nurse_config_item_color2"
-                    android:layout_width="10dp"
-                    android:layout_height="match_parent"
-                    android:background="@color/nursing_default_color"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_name2"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color2"
-                    android:paddingLeft="4dp"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/default_nurse_config_name"
-                    android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_value2"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color2"
-                    android:layout_alignParentBottom="true"
-                    android:paddingRight="4dp"
-                    android:gravity="right"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/str_empty"
-                    android:textColor="@color/main_color"
-                    android:textSize="20sp"/>
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/nurse_config_item_height"
-                android:layout_marginTop="@dimen/nurse_config_margin">
-                <View
-                    android:id="@+id/nurse_config_item_color3"
-                    android:layout_width="10dp"
-                    android:layout_height="match_parent"
-                    android:background="@color/nursing_default_color"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_name3"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color3"
-                    android:paddingLeft="4dp"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/default_nurse_config_name"
-                    android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_value3"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color3"
-                    android:layout_alignParentBottom="true"
-                    android:paddingRight="4dp"
-                    android:gravity="right"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/str_empty"
-                    android:textColor="@color/main_color"
-                    android:textSize="20sp"/>
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/nurse_config_item_height"
-                android:layout_marginTop="@dimen/nurse_config_margin">
-                <View
-                    android:id="@+id/nurse_config_item_color4"
-                    android:layout_width="10dp"
-                    android:layout_height="match_parent"
-                    android:background="@color/nursing_default_color"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_name4"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color4"
-                    android:paddingLeft="4dp"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/default_nurse_config_name"
-                    android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_value4"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color4"
-                    android:layout_alignParentBottom="true"
-                    android:paddingRight="4dp"
-                    android:gravity="right"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/str_empty"
-                    android:textColor="@color/main_color"
-                    android:textSize="20sp"/>
-            </RelativeLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="@dimen/nurse_config_item_height"
-                android:layout_marginTop="@dimen/nurse_config_margin">
-                <View
-                    android:id="@+id/nurse_config_item_color5"
-                    android:layout_width="10dp"
-                    android:layout_height="match_parent"
-                    android:background="@color/nursing_default_color"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_name5"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color5"
-                    android:paddingLeft="4dp"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/default_nurse_config_name"
-                    android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
-                <TextView
-                    android:id="@+id/nurse_config_item_value5"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_toRightOf="@id/nurse_config_item_color5"
-                    android:layout_alignParentBottom="true"
-                    android:paddingRight="4dp"
-                    android:gravity="right"
-                    android:singleLine="true"
-                    android:ellipsize="end"
-                    android:text="@string/str_empty"
-                    android:textColor="@color/main_color"
-                    android:textSize="20sp"/>
-            </RelativeLayout>
-
-        </LinearLayout>
+            android:layout_below="@+id/nurse_img"
+            android:padding="10dp"
+            android:layout_marginTop="@dimen/d10"
+            android:layout_marginLeft="@dimen/d15"
+            android:layout_marginRight="@dimen/d30"
+           />
+
+    </RelativeLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:layout_marginTop="@dimen/d14"
+        >
 
-        <!--入住信息-->
         <LinearLayout
-            android:layout_width="0dp"
+            android:layout_width="wrap_content"
             android:layout_height="match_parent"
-            android:layout_weight="0.8"
-            android:layout_marginTop="10dp"
-            android:baselineAligned="false"
+            android:layout_weight="1"
+            android:gravity="center_horizontal"
+            android:layout_marginRight="@dimen/d5"
+            android:background="@drawable/shape_bed_nurse_bg"
             android:orientation="vertical"
-            android:gravity="center_horizontal">
-
+            >
+            <ImageView
+                android:layout_width="@dimen/d30"
+                android:layout_height="@dimen/d30"
+                android:background="@mipmap/yisheng"
+                android:layout_marginTop="@dimen/d12"
+                />
             <TextView
-                android:id="@+id/bed_customer_name"
+                android:id="@+id/bed_medic_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:drawableTop="@mipmap/ic_custom_male"
-                android:gravity="center"
-                android:text="--"
+                android:text="张德怀"
                 android:textColor="@color/black"
-                android:textSize="24sp"/>
-
-            <TextView
-                android:id="@+id/bed_customer_age"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:drawableLeft="@mipmap/ic_gender_male"
-                android:drawablePadding="4dp"
-                android:text="--"
-                android:textSize="20sp"/>
-
-            <ImageView
-                android:id="@+id/bed_doctor_icon"
-                android:layout_width="48dp"
-                android:layout_height="48dp"
-                android:layout_marginTop="20dp"
-                android:src="@mipmap/ic_doctor_default"/>
+                android:textSize="@dimen/font_size_12"
+                android:layout_marginTop="@dimen/d8"
+                />
 
             <TextView
-                android:id="@+id/bed_doctor_title"
+                android:id="@+id/bed_medic_info"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:text="@string/doctor_title"
-                android:textColor="@color/text_name_color"
-                android:textSize="14sp"/>
+                android:text="责任医生"
+                android:background="@drawable/shape_bed_medic_txt_bg"
+                android:textColor="@color/white"
+                android:layout_marginTop="@dimen/d8"
+                android:textSize="@dimen/font_size_12"/>
 
-            <TextView
-                android:id="@+id/bed_doctor_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="@string/str_empty"
-                android:textColor="@color/black"
-                android:textSize="14sp"/>
+        </LinearLayout>
 
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center_horizontal"
+            android:layout_marginLeft="@dimen/d5"
+            android:background="@drawable/shape_bed_nurse_item_bg"
+            android:orientation="vertical"
+            >
             <ImageView
-                android:id="@+id/bed_nurse_icon"
-                android:layout_width="48dp"
-                android:layout_height="48dp"
-                android:layout_marginTop="10dp"
-                android:src="@mipmap/ic_nurse_default"/>
-
+                android:layout_width="@dimen/d30"
+                android:layout_height="@dimen/d30"
+                android:background="@mipmap/hs_img"
+                android:layout_marginTop="@dimen/d12"
+                />
             <TextView
-                android:id="@+id/bed_nurse_title"
+                android:id="@+id/bed_nurse_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
-                android:text="@string/nurse_title"
-                android:textColor="@color/text_name_color"
-                android:textSize="14sp"/>
-
+                android:text="李小秀"
+                android:textColor="@color/black"
+                android:layout_marginTop="@dimen/d8"
+                android:textSize="@dimen/font_size_12"/>
             <TextView
-                android:id="@+id/bed_nurse_name"
+                android:id="@+id/bed_nurse_info"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/str_empty"
-                android:textColor="@color/black"
-                android:textSize="14sp"/>
+                android:text="责任护士"
+                android:background="@drawable/shape_bed_nurse_txt_bg"
+                android:textColor="@color/white"
+                android:layout_marginTop="@dimen/d8"
+                android:textSize="@dimen/font_size_12"/>
 
         </LinearLayout>
 
     </LinearLayout>
 
+
+
 </LinearLayout>

+ 36 - 0
callingdoor/src/main/res/layout/item_icon_lay.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+    </data>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:id="@+id/ll_menu_bt"
+            android:layout_width="120dp"
+            android:layout_height="120dp"
+            android:orientation="horizontal"
+            android:gravity="center"
+            android:background="@drawable/shape_bed_bg"
+            android:layout_below="@+id/tv_nursing_code">
+
+            <ImageView
+                android:id="@+id/img_menu"
+                android:layout_width="80dp"
+                android:layout_height="80dp" />
+
+            <TextView
+                android:id="@+id/tx_menu"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/white"
+                android:layout_marginTop="2dp"
+                android:textSize="@dimen/font_size_20" />
+        </LinearLayout>
+
+    </LinearLayout>
+</layout>

+ 57 - 0
callingdoor/src/main/res/layout/main_network_dialog.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="441dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d88"
+        android:layout_height="@dimen/d88"
+        android:src="@mipmap/hedimg"
+        android:layout_marginTop="@dimen/d42" />
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="23dp"
+        android:text="选择您要设置的网络类型"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:id="@+id/network_one_tx"
+        android:layout_width="@dimen/d270"
+        android:layout_height="@dimen/d48"
+        android:layout_marginTop="@dimen/d29"
+        android:background="@drawable/selector_nuser_msg_tx_d"
+        android:text="DHCP"
+        android:textColor="@drawable/selector_network_tx_color"
+        android:textSize="@dimen/font_size_16"
+        android:gravity="center" />
+    <TextView
+        android:id="@+id/network_two_tx"
+        android:layout_width="@dimen/d270"
+        android:layout_height="@dimen/d48"
+        android:layout_marginTop="@dimen/d20"
+        android:background="@drawable/selector_nuser_msg_tx_d"
+        android:text="静态"
+        android:textColor="@drawable/selector_network_tx_color"
+        android:textSize="@dimen/font_size_16"
+        android:gravity="center" />
+
+    <Button
+        android:id="@+id/network_button"
+        android:layout_width="@dimen/d370"
+        android:layout_height="@dimen/d48"
+        android:gravity="center"
+        android:background="@drawable/shape_main_hos_txt_bg"
+        android:text="确定"
+        android:textSize="16sp"
+        android:layout_marginTop="@dimen/d30"
+        android:layout_marginBottom="@dimen/d40"
+        android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+</LinearLayout>

+ 159 - 0
callingdoor/src/main/res/layout/main_network_two_dialog.xml

@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="441dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="23dp"
+        android:text="请设置静态网络"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d24"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="IP地址"
+            android:textColor="@color/black"
+            android:textStyle="bold"
+            android:textSize="@dimen/font_size_18"
+           />
+        <EditText
+            android:id="@+id/network2_ip"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="@dimen/d20"
+            android:background="@drawable/selector_nuser_ed_d"
+            android:hint="请输入IP地址"
+            android:paddingLeft="@dimen/d30"
+            android:textSize="@dimen/font_size_18"
+            android:textStyle="bold"
+            />
+
+    </LinearLayout>
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d10"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="网关"
+            android:textColor="@color/black"
+            android:textStyle="bold"
+            android:textSize="@dimen/font_size_18"
+            />
+        <EditText
+            android:id="@+id/network2_wg"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="@dimen/d35"
+            android:background="@drawable/selector_nuser_ed_d"
+            android:hint="请输入网关"
+            android:paddingLeft="@dimen/d30"
+            android:textSize="@dimen/font_size_18"
+            android:textStyle="bold"
+            />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d10"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="掩码"
+            android:textColor="@color/black"
+            android:textStyle="bold"
+            android:textSize="@dimen/font_size_18"
+            />
+        <EditText
+            android:id="@+id/network2_ym"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="@dimen/d35"
+            android:background="@drawable/selector_nuser_ed_d"
+            android:hint="请输入掩码"
+            android:paddingLeft="@dimen/d30"
+            android:textSize="@dimen/font_size_18"
+            android:textStyle="bold"
+            />
+
+    </LinearLayout>
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d10"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="DNS"
+            android:textColor="@color/black"
+            android:textStyle="bold"
+            android:textSize="@dimen/font_size_18"
+            />
+        <EditText
+            android:id="@+id/network2_dns"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="@dimen/d35"
+            android:background="@drawable/selector_nuser_ed_d"
+            android:hint="请输入DNS"
+            android:paddingLeft="@dimen/d30"
+            android:textSize="@dimen/font_size_18"
+            android:textStyle="bold"
+            />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d24"
+        android:layout_marginBottom="@dimen/d40"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <Button
+            android:id="@+id/network2_cancel_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_password_bt_bg"
+            android:text="关闭"
+            android:textSize="16sp"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+        <Button
+            android:id="@+id/network2_determine_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:text="确定"
+            android:textSize="16sp"
+            android:layout_marginLeft="@dimen/d31"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+    </LinearLayout>
+
+
+</LinearLayout>

+ 77 - 0
callingdoor/src/main/res/layout/main_password_dialog.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="441dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d88"
+        android:layout_height="@dimen/d88"
+        android:src="@mipmap/hedimg"
+        android:layout_marginTop="@dimen/d32" />
+
+    <TextView
+        android:id="@+id/positioning_tip_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="请输入管理员密码"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/d7"
+        android:text="查看设备信息需管理权限"
+        android:textColor="#7D7D7D"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+
+    <EditText
+        android:id="@+id/password_ed"
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:hint="请输入管理密码"
+        android:paddingLeft="@dimen/d26"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center_vertical"
+        android:layout_below="@+id/nurse_msg_tx_1"
+        android:textStyle="bold"
+        android:background="@drawable/shape_n_login_ed_bg2"
+        android:layout_marginTop="@dimen/d16"
+        />
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d24"
+        android:layout_marginBottom="@dimen/d32"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <Button
+            android:id="@+id/password_cancel_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_password_bt_bg"
+            android:text="关闭"
+            android:textSize="16sp"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+        <Button
+            android:id="@+id/password_determine_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:text="确定"
+            android:textSize="16sp"
+            android:layout_marginLeft="@dimen/d31"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+    </LinearLayout>
+
+
+</LinearLayout>

+ 67 - 0
callingdoor/src/main/res/layout/main_restart_dialog.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="280dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d39"
+        android:layout_height="@dimen/d39"
+        android:src="@mipmap/chongqi"
+        android:layout_marginTop="@dimen/d32" />
+
+    <TextView
+        android:id="@+id/positioning_tip_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="确认重启该设备?"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/d7"
+        android:text="点击确认后设备开始重启"
+        android:textColor="#7D7D7D"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+
+
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d24"
+        android:layout_marginBottom="@dimen/d38"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+        <Button
+            android:id="@+id/server_cancel_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_password_bt_bg"
+            android:text="取消"
+            android:textSize="16sp"
+
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+        <Button
+            android:id="@+id/server_determine_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:text="确定"
+            android:textSize="16sp"
+            android:layout_marginLeft="@dimen/d31"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+    </LinearLayout>
+
+
+</LinearLayout>

+ 79 - 0
callingdoor/src/main/res/layout/main_server_dialog.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="441dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d88"
+        android:layout_height="@dimen/d88"
+        android:src="@mipmap/hedimg"
+        android:layout_marginTop="@dimen/d42" />
+
+    <TextView
+        android:id="@+id/positioning_tip_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="请设置服务器地址"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/d6"
+        android:text="只可输入数字和小数点"
+        android:textColor="#7D7D7D"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+
+    <EditText
+        android:id="@+id/server_ed"
+        android:layout_width="@dimen/d375"
+        android:layout_height="@dimen/d52"
+        android:hint="请输入服务器地址"
+        android:paddingLeft="@dimen/d26"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center_vertical"
+        android:layout_below="@+id/nurse_msg_tx_1"
+        android:textStyle="bold"
+        android:digits="1234567890."
+        android:background="@drawable/shape_n_login_ed_bg2"
+        android:layout_marginTop="@dimen/d22"
+        />
+    <LinearLayout
+        android:layout_width="@dimen/d383"
+        android:layout_height="@dimen/d52"
+        android:layout_marginTop="@dimen/d30"
+        android:layout_marginBottom="@dimen/d88"
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+
+        <Button
+
+            android:id="@+id/server_determine_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:text="确定"
+            android:textSize="16sp"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+        <Button
+            android:id="@+id/server_cancel_button"
+            android:layout_width="@dimen/d176"
+            android:layout_height="@dimen/d48"
+            android:gravity="center"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:text="重置"
+            android:textSize="16sp"
+            android:layout_marginLeft="@dimen/d31"
+            android:textColor="@drawable/selector_bottom_btn_text_color"/>
+    </LinearLayout>
+
+
+</LinearLayout>

+ 66 - 0
callingdoor/src/main/res/layout/main_version_dialog.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="441dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d88"
+        android:layout_height="@dimen/d88"
+        android:src="@mipmap/hedimg"
+        android:layout_marginTop="@dimen/d67" />
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="23dp"
+        android:text="当前设备版本号"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:id="@+id/version_number_tx"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/d7"
+        android:text="V1.0.0.0"
+        android:textColor="#7D7D7D"
+        android:textSize="@dimen/font_size_13"
+        android:gravity="center" />
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/d12"
+        android:text="发布日期"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:id="@+id/version_time_tx"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/d7"
+        android:text="2023/04/08"
+        android:textColor="#7D7D7D"
+        android:textSize="@dimen/font_size_13"
+        android:gravity="center" />
+    <Button
+        android:id="@+id/version_button"
+        android:layout_width="@dimen/d370"
+        android:layout_height="@dimen/d48"
+        android:layout_marginBottom="@dimen/d67"
+        android:gravity="center"
+        android:background="@drawable/shape_main_hos_txt_bg"
+        android:text="检测更新"
+        android:textSize="16sp"
+        android:layout_marginTop="@dimen/d35"
+        android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+
+
+
+</LinearLayout>

+ 127 - 14
callingdoor/src/main/res/layout/main_view_layout.xml

@@ -1,18 +1,131 @@
 <?xml version="1.0" encoding="utf-8"?>
-<layout>
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/white">
-
-    <com.wdkl.ncs.android.lib.widget.AutoPollRecyclerView
-        android:id="@+id/rv_bed_view"
+<layout >
+    <LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:overScrollMode="never"
-        android:paddingLeft="2dp"
-        android:paddingRight="2dp"/>
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:id="@+id/ll_room_name"
+            android:layout_width="match_parent"
+            android:layout_height="100dp"
+            android:orientation="horizontal"
+            android:layout_below="@id/activity_calling_door_layout_title">
+
+            <LinearLayout
+                android:layout_width="600dp"
+                android:layout_height="match_parent"
+                android:gravity="center_vertical"
+                android:background="@mipmap/fang_bg">
+
+                <ImageView
+                    android:layout_width="40dp"
+                    android:layout_height="40dp"
+                    android:src="@mipmap/fang"
+                    android:layout_marginLeft="25dp" />
+
+                <com.wdkl.ncs.android.lib.widget.MarqueeTextView
+                    android:id="@+id/tv_room_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:layout_weight="3"
+                    android:paddingLeft="20dp"
+                    android:paddingRight="20dp"
+                    android:gravity="center_vertical"
+                    android:text="--"
+                    android:textColor="@color/white"
+                    android:textSize="38sp"
+                    android:singleLine="true"
+                    android:ellipsize="marquee"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true" />
+
+            </LinearLayout>
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/shape_bed_bg">
+
+                <TextView
+                    android:id="@+id/f_tx_people"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="病房人数"
+                    android:textSize="@dimen/font_size_18"
+                    android:textColor="@color/black"
+                    android:layout_marginTop="16dp"
+                    android:layout_marginLeft="39dp" />
+
+                <TextView
+                    android:id="@+id/f_tx_people_number"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="70dp"
+                    android:text="--"
+                    android:textSize="@dimen/font_size_24"
+                    android:textColor="@color/txt_number"
+                    android:textStyle="bold"
+                    android:layout_below="@+id/f_tx_people" />
+
+                <ImageView
+                    android:layout_width="18dp"
+                    android:layout_height="18dp"
+                    android:src="@mipmap/chuang_l"
+                    android:layout_alignLeft="@+id/f_tx_people_number"
+                    android:layout_below="@+id/f_tx_people_number" />
+
+                <View
+                    android:id="@+id/f_tx_view"
+                    android:layout_width="1dp"
+                    android:layout_height="match_parent"
+                    android:background="@color/view_bg"
+                    android:layout_centerInParent="true" />
+
+                <TextView
+                    android:id="@+id/f_tx_bed"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="空余床位"
+                    android:textSize="@dimen/font_size_18"
+                    android:textColor="@color/black"
+                    android:layout_marginTop="16dp"
+                    android:layout_marginLeft="39dp"
+                    android:layout_toRightOf="@+id/f_tx_view" />
+
+                <TextView
+                    android:id="@+id/f_tx_bed_number"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="65dp"
+                    android:text="--"
+                    android:textSize="@dimen/font_size_24"
+                    android:textColor="@color/txt_bed"
+                    android:layout_toRightOf="@+id/f_tx_view"
+                    android:textStyle="bold"
+                    android:layout_below="@+id/f_tx_bed" />
+
+                <ImageView
+                    android:layout_width="18dp"
+                    android:layout_height="18dp"
+                    android:src="@mipmap/chuang_wu"
+                    android:layout_alignLeft="@+id/f_tx_bed_number"
+                    android:layout_below="@+id/f_tx_bed_number" />
+            </RelativeLayout>
+
+        </LinearLayout>
+
+        <com.wdkl.ncs.android.lib.widget.AutoPollRecyclerView
+            android:id="@+id/rv_bed_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never"
+            android:paddingLeft="2dp"
+            android:paddingRight="2dp" />
+
+    </LinearLayout>
+</layout>
+
 
-</LinearLayout>
-</layout>

+ 47 - 0
callingdoor/src/main/res/layout/nurse_huli_dialog.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="@dimen/d330"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d77"
+        android:layout_height="@dimen/d77"
+        android:src="@mipmap/hu"
+        android:layout_marginTop="@dimen/d28" />
+
+    <TextView
+        android:id="@+id/hili_top_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="102床、103床、104床、105床"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <TextView
+        android:id="@+id/hili_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="以上病床护理中,确认退出?"
+        android:textColor="#7D7D7D"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+    <Button
+        android:id="@+id/huli_confirm_button"
+        android:layout_width="@dimen/d176"
+        android:layout_height="@dimen/d48"
+        android:layout_marginTop="@dimen/d24"
+        android:layout_marginBottom="@dimen/d35"
+        android:gravity="center"
+        android:background="@drawable/shape_huli_dialog_bt_bg"
+        android:text="进入护理"
+        android:textSize="16sp"
+        android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+
+</LinearLayout>

+ 39 - 0
callingdoor/src/main/res/layout/nurse_patrol_dialog.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="249dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d77"
+        android:layout_height="@dimen/d77"
+        android:src="@mipmap/xunfang"
+        android:layout_marginTop="@dimen/d28" />
+
+    <TextView
+        android:id="@+id/patrol_tip_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="已巡房:住院部205房"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+
+    <Button
+        android:id="@+id/patrol_confirm_button"
+        android:layout_width="@dimen/d176"
+        android:layout_height="@dimen/d48"
+        android:layout_marginTop="@dimen/d24"
+        android:layout_marginBottom="@dimen/d27"
+        android:gravity="center"
+        android:background="@drawable/shape_patrol_dialog_bt_bg"
+        android:text="@string/str_confirm"
+        android:textSize="16sp"
+        android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+
+</LinearLayout>

+ 39 - 0
callingdoor/src/main/res/layout/nurse_positioning_dialog.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="481dp"
+    android:layout_height="249dp"
+    android:gravity="center"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+    <ImageView
+        android:layout_width="@dimen/d77"
+        android:layout_height="@dimen/d77"
+        android:src="@mipmap/chenggong"
+        android:layout_marginTop="@dimen/d28" />
+
+    <TextView
+        android:id="@+id/positioning_tip_text"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="已定位当前位置:住院部"
+        android:textColor="@color/black"
+        android:textStyle="bold"
+        android:textSize="@dimen/font_size_18"
+        android:gravity="center" />
+
+    <Button
+        android:id="@+id/positioning_confirm_button"
+        android:layout_width="@dimen/d176"
+        android:layout_height="@dimen/d48"
+        android:layout_marginTop="@dimen/d24"
+        android:layout_marginBottom="@dimen/d27"
+        android:gravity="center"
+        android:background="@drawable/shape_positioning_dialog_bt_bg"
+        android:text="@string/str_confirm"
+        android:textSize="16sp"
+        android:textColor="@drawable/selector_bottom_btn_text_color"/>
+
+
+</LinearLayout>

+ 41 - 0
callingdoor/src/main/res/layout/nurse_screensaver_dialog.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#3A78EF"
+    android:orientation="vertical">
+
+    <include
+        android:id="@+id/activity_calling_door_layout_title"
+        layout="@layout/view_title_layout"
+        />
+    <ImageView
+        android:layout_width="469dp"
+        android:layout_height="469dp"
+        android:src="@mipmap/msg_bg"
+        android:layout_marginBottom="@dimen/d80"
+        android:layout_marginTop="@dimen/d21"
+        android:layout_centerInParent="true"
+        />
+   <LinearLayout
+       android:layout_width="wrap_content"
+       android:layout_height="wrap_content"
+       android:layout_centerInParent="true"
+       android:padding="@dimen/d30"
+       android:background="@drawable/shape_screen_bg"
+       >
+       <TextView
+           android:id="@+id/screensacver_text"
+           android:layout_width="match_parent"
+           android:layout_height="wrap_content"
+           android:text="请保持安静不要大声喧哗"
+           android:textStyle="bold"
+           android:textColor="@color/white"
+           android:background="@drawable/shape_screen_txt_bg"
+           android:textSize="60sp"
+           android:padding="@dimen/d40"
+           android:gravity="center" />
+
+   </LinearLayout>
+
+</RelativeLayout>

+ 21 - 0
callingdoor/src/main/res/layout/nursing_work_lay.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+    </data>
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/recycler"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@color/white"
+                android:clipChildren="true"
+                android:padding="@dimen/font_size_20"
+                />
+    </RelativeLayout>
+</layout>

+ 87 - 35
callingdoor/src/main/res/layout/view_title_layout.xml

@@ -3,51 +3,51 @@
     android:layout_width="match_parent"
     android:layout_height="42dp"
     android:background="#FFFFFF"
-    android:orientation="vertical">
 
-    <!--SIP状态图标-->
-    <TextView
-        android:id="@+id/view_title_layout_tv_point"
-        android:layout_width="12dp"
-        android:layout_height="12dp"
-        android:layout_centerVertical="true"
-        android:layout_marginLeft="20dp"
-        android:background="@color/red_color"/>
+   >
 
-    <!--医院名称-->
-    <TextView
-        android:id="@+id/view_title_layout_tv_hospital_name"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerVertical="true"
-        android:layout_marginLeft="20dp"
-        android:layout_toRightOf="@+id/view_title_layout_tv_point"
-        android:text="----"
-        android:textColor="@color/main_color"
-        android:textSize="@dimen/font_size_20" />
 
-    <!--日期时间-->
-    <TextClock
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
+    <!--设备号-->
+    <LinearLayout
+        android:id="@+id/view_title_layout_return"
+        android:layout_width="@dimen/d105"
+        android:layout_height="@dimen/d30"
+        android:layout_marginLeft="20dp"
+        android:background="@drawable/shape_main_hos_txt_bg"
+        android:clickable="true"
+        android:gravity="center"
         android:layout_centerVertical="true"
-        android:format12Hour="yyyy-MM-dd HH:mm EEEE"
-        android:format24Hour="yyyy-MM-dd HH:mm EEEE"
-        android:textColor="@color/main_color"
-        android:textSize="@dimen/font_size_20" />
+        android:orientation="horizontal">
+
+        <ImageView
+            android:id="@+id/view_title_layout_img"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_marginRight="6dp"
+            android:visibility="gone"
+            android:background="@mipmap/return_w" />
+        <!--医院名称-->
+        <TextView
+            android:id="@+id/view_title_layout_tv_hospital_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="科室名称"
+            android:textColor="@color/white"
+            android:textSize="@dimen/font_size_14" />
+    </LinearLayout>
 
-    <!--设备号-->
     <TextView
         android:id="@+id/view_title_layout_tv_no"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_centerVertical="true"
+        android:layout_centerHorizontal="true"
         android:layout_marginRight="10dp"
-        android:layout_toLeftOf="@+id/view_title_layout_ll_right"
         android:text="ID:"
-        android:textColor="@color/main_color"
-        android:textSize="@dimen/font_size_20" />
+        android:visibility="gone"
+        android:textColor="@color/black"
+        android:textSize="@dimen/font_size_18" />
 
     <!--状态图标-->
     <LinearLayout
@@ -60,6 +60,56 @@
         android:orientation="horizontal">
 
         <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_marginLeft="4dp"
+            android:layout_marginRight="4dp"
+            android:background="@mipmap/riqi" />
+        <!--日期-->
+        <TextClock
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:format12Hour="yyyy-MM-dd EEEE"
+            android:format24Hour="yyyy-MM-dd EEEE"
+            android:textColor="@color/black"
+            android:textSize="@dimen/font_size_16"
+            android:layout_marginLeft="@dimen/d5"
+            android:text="16:08"/>
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:layout_marginLeft="@dimen/d23"
+            android:layout_marginRight="4dp"
+            android:background="@mipmap/shijian" />
+        <!--时间-->
+        <TextClock
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:format12Hour="HH:mm"
+            android:format24Hour="HH:mm"
+            android:textColor="@color/black"
+            android:textSize="@dimen/font_size_16"
+            android:layout_marginLeft="@dimen/d5"
+            android:layout_marginRight="@dimen/d30"
+            android:text="16:08"/>
+
+        <!--SIP状态图标-->
+        <TextView
+            android:id="@+id/view_title_layout_tv_point"
+            android:layout_width="20dp"
+            android:layout_height="20dp"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="4dp"
+            android:layout_marginRight="4dp"
+            android:visibility="gone"
+            android:background="@mipmap/sip_b"/>
+
+        <ImageView
             android:id="@+id/view_title_layout_iv_bt"
             android:layout_width="20dp"
             android:layout_height="20dp"
@@ -83,6 +133,7 @@
             android:layout_marginLeft="4dp"
             android:layout_marginRight="4dp"
             android:src="@mipmap/ic_tcp_fail"/>
+
         <ImageView
             android:id="@+id/view_title_layout_iv_ethernet"
             android:layout_width="20dp"
@@ -91,14 +142,15 @@
             android:layout_marginLeft="4dp"
             android:layout_marginRight="4dp"
             android:visibility="gone"/>
+
         <ImageView
             android:id="@+id/view_title_layout_iv_day_night"
             android:layout_width="20dp"
-            android:layout_height="20dp"
+            android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
             android:layout_marginLeft="4dp"
             android:layout_marginRight="4dp"
-            android:src="@mipmap/ic_daylight"/>
+            android:src="@mipmap/ic_daylight" />
 
     </LinearLayout>
 </RelativeLayout>

+ 4 - 2
callingdoor/src/main/res/layout/voice_call_lay.xml

@@ -2,7 +2,9 @@
 <layout>
     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:background="@mipmap/call_bg"
+        >
 
         <TextView
             android:id="@+id/voice_call_calling_text"
@@ -23,7 +25,7 @@
             android:layout_centerHorizontal="true"
             android:layout_marginTop="20dp"
             android:scaleType="centerInside"
-            android:src="@drawable/ic_nurse" />
+            android:src="@mipmap/call_haed" />
 
         <TextView
             android:id="@+id/voice_call_timeout"

+ 73 - 0
callingdoor/src/main/res/layout/webciew_lay.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <data>
+
+    </data>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical">
+
+            <ImageView
+                android:id="@+id/back_btn"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:contentDescription="@null"
+                android:layout_marginLeft="20dp"
+                android:layout_marginTop="10dp"
+                android:layout_marginBottom="10dp"
+                android:src="@mipmap/back_press" />
+
+            <TextView
+                android:id="@+id/top_title_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="48dp"
+                android:layout_centerInParent="true"
+                android:gravity="center"
+                android:text="点餐"
+                android:textColor="@color/text_room_color"
+                android:textSize="@dimen/font_size_25" />
+
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0.5dip"
+            android:background="#eaeaea" />
+
+        <ProgressBar
+            android:id="@+id/pb_web_base"
+            style="?android:attr/progressBarStyleHorizontal"
+            android:layout_width="match_parent"
+            android:layout_height="2dp" />
+
+
+        <android.support.v4.widget.NestedScrollView
+            android:id="@+id/customerScrollView1"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            >
+
+            <WebView
+                android:id="@+id/webview"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                />
+
+        </android.support.v4.widget.NestedScrollView>
+
+
+        <include
+            layout="@layout/layout_nodate"
+            android:visibility="gone" />
+    </LinearLayout>
+</layout>

BIN
callingdoor/src/main/res/mipmap-mdpi/bg.png


BIN
callingdoor/src/main/res/mipmap-mdpi/chuang_l.png


BIN
callingdoor/src/main/res/mipmap-mdpi/chuang_wu.png


BIN
callingdoor/src/main/res/mipmap-mdpi/chuanghao_bg.png


BIN
callingdoor/src/main/res/mipmap-mdpi/fang.png


+ 0 - 0
callingdoor/src/main/res/mipmap-mdpi/fang_bg.png


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels