Quellcode durchsuchen

西班牙gerion客户需求修改:
1.无人呼叫时门灯关闭
2.分机呼叫红灯常亮
3.紧急呼叫红灯1s闪一次
4.护士主机呼叫分机时红灯0.5s闪一次
5.修改呼出铃声为嘟嘟声

blue code功能待定

weizhengliang vor 1 Jahr
Ursprung
Commit
23f0fcdb8e

+ 57 - 13
android_door/src/main/h10_a133_chile/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt

@@ -70,6 +70,7 @@ import kotlinx.android.synthetic.main.callingdoor_main_lay.view_flipper
 import kotlinx.android.synthetic.main.callingdoor_main_lay.black_view
 import kotlinx.android.synthetic.main.callingdoor_main_lay.room_action_home
 import kotlinx.android.synthetic.main.callingdoor_main_lay.room_action_more
+import kotlinx.android.synthetic.main.callingdoor_main_lay.room_action_blue_code
 import kotlinx.android.synthetic.main.callingdoor_main_lay_rk3288.*
 import kotlinx.android.synthetic.main.view_bed_name.*
 import kotlinx.android.synthetic.main.view_title_layout.*
@@ -560,6 +561,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     private fun enterNursing() {
+        room_action_blue_code.isEnabled = true
+
         //if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
             SerialPortHelper.setDoorLight(1, Constant.nursingColor) //绿色
         //}
@@ -574,6 +577,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     private fun exitNursing() {
+        room_action_blue_code.isEnabled = false
+
         //if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
             //SerialPortHelper.setDoorLight(1, "111") //白色
             DoorLightHelper.resetDoorLight()
@@ -792,6 +797,22 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 switchFragment(R.id.callingdoor_main_frame, QrCodeFragment(), qrFragment)
             }
         }
+
+        room_action_blue_code.setOnClickListener {
+            //重置黑屏时间
+            resetSleepTime()
+
+            if (Constant.TCP_CONNECTED) {
+                if (Constant.DEVICE_ID != -1) {
+                    //todo blue code action:
+                    //OtherUtil.sendReinforce(Constant.DEVICE_ID)
+                } else {
+                    showMessage("null device id!")
+                }
+            } else {
+                showMessage(R.string.net_error)
+            }
+        }
     }
 
     //设置串口监听
@@ -1179,6 +1200,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                     } else {
                         showMessage(R.string.no_custom)
                     }
+                } else if (Constant.CALL_STATE == Constant.CALL_INCOMING) {
+                    //来电接听
+                    EventBus.getDefault().post(MessageEvent("accept", Constant.EVENT_SERIAL_EVENT))
                 }
             }
         } else if (buffer[8].toInt() == 1 || buffer[8].toInt() == 2
@@ -1191,13 +1215,16 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 } else if (Constant.CALL_STATE == Constant.CALL_OUTGOING) {
                     //呼叫取消
                     EventBus.getDefault().post(MessageEvent("cancel", Constant.EVENT_SERIAL_EVENT))
+                } else if (Constant.CALL_STATE == Constant.CALL_INCOMING) {
+                    //来电拒接
+                    EventBus.getDefault().post(MessageEvent("reject", Constant.EVENT_SERIAL_EVENT))
                 }
             }
         } else if (buffer[9].toInt() == 1 || buffer[9].toInt() == 2) {
             //H1 call
             Log.w(TAG, "H1 call...")
             runOnUiThread {
-                if (System.currentTimeMillis() - h1CallTime > 15000) {
+                if (System.currentTimeMillis() - h1CallTime > 5000) {
                     startHCall(1)
                     h1CallTime = System.currentTimeMillis()
                 }
@@ -1206,7 +1233,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             //H2 call
             runOnUiThread {
                 Log.w(TAG, "H2 call...")
-                if (System.currentTimeMillis() - h2CallTime > 15000) {
+                if (System.currentTimeMillis() - h2CallTime > 5000) {
                     startHCall(2)
                     h2CallTime = System.currentTimeMillis()
                 }
@@ -1351,22 +1378,34 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             Log.d(TAG, "handle call id: $handleId, H1 mac: ${Constant.DEVICE_H1_REGISTER_ID}, H2 mac: ${Constant.DEVICE_H2_REGISTER_ID}")
             if (handleId == 1 && beds >= 1) {
                 //分机手柄1呼叫
+                var findH1 = false
                 for (bedVO in Utils.getInBedVOS()) {
                     if (Constant.DEVICE_H1_REGISTER_ID == bedVO.bedDeviceMac) {
+                        findH1 = true
                         val callTcp = VoiceUtil.voiceHCall(bedVO.bedDeviceId, RoleTypeEnum.NURSE.name)
                         TcpClient.getInstance().sendTcp(callTcp, false, null)
-                        RingPlayHelper.playRingTone(activity, R.raw.outgoing_call, false)
+                        RingPlayHelper.playRingTone(activity, R.raw.ring_back2, true, 30000)
                     }
                 }
+
+                if (!findH1) {
+                    showMessage("Not registered")
+                }
             } else if (handleId == 2 && beds >= 2) {
                 //分机手柄2呼叫
+                var findH2 = false
                 for (bedVO in Utils.getInBedVOS()) {
                     if (Constant.DEVICE_H2_REGISTER_ID == bedVO.bedDeviceMac) {
+                        findH2 = true
                         val callTcp = VoiceUtil.voiceHCall(bedVO.bedDeviceId, RoleTypeEnum.NURSE.name)
                         TcpClient.getInstance().sendTcp(callTcp, false, null)
-                        RingPlayHelper.playRingTone(activity, R.raw.outgoing_call, false)
+                        RingPlayHelper.playRingTone(activity, R.raw.ring_back2, true, 30000)
                     }
                 }
+
+                if (!findH2) {
+                    showMessage("Not registered")
+                }
             } else {
                 showMessage(R.string.call_fail)
                 SoundPoolManager.getInstance().playSound(7, 1.0f, 1.0f, 0)
@@ -1606,12 +1645,17 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             //手柄分机呼叫成功
             //RingPlayHelper.playRingTone(activity, R.raw.outgoing_call, false)
 
-            SerialPortHelper.setDoorLight(1, "200")
+            //手柄呼叫时门灯红色固定
+            if (!Constant.sosOn) {
+                SerialPortHelper.setDoorLight(1, "100")
+            }
+
             //显示分机呼叫信息
             //val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
             //updateBedCall(interactionVO, true)
         } else if (tcpModel.action == TcpAction.SideAction.SOS_CALL) {
-            SerialPortHelper.setDoorLight(1, "200")
+            //SerialPortHelper.setDoorLight(1, "200")
+            SerialPortHelper.flashDoorLight("100", 1000) //红色间隔1s闪烁
             Constant.sosOn = true
         } else if (tcpModel.action == TcpAction.SideAction.ACCEPT || tcpModel.action == TcpAction.SideAction.CANCEL) {
             if (Constant.CALL_STATE == Constant.CALL_STANDBY) {
@@ -1838,9 +1882,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_daylight)
 
                 //灭掉紧急按钮灯
-                AppTool.Time.delay(2000) {
+                /*AppTool.Time.delay(2000) {
                     SerialPortHelper.setSosLight("0")
-                }
+                }*/
             }
             Constant.day_state = 0
         } else {
@@ -1855,9 +1899,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_night)
 
                 //打开紧急按钮灯
-                AppTool.Time.delay(2000) {
+                /*AppTool.Time.delay(2000) {
                     SerialPortHelper.setSosLight("1")
-                }
+                }*/
             }
             Constant.day_state = 1
         }
@@ -1891,7 +1935,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 val iterator = bedCalls.iterator()
                 while (iterator.hasNext()) {
                     val it = iterator.next()
-                    if (System.currentTimeMillis() - it.time >= 15 * 60 * 1000) {
+                    if (System.currentTimeMillis() - it.time >= 30 * 60 * 1000) {
                         iterator.remove()
                     }
                 }
@@ -1913,9 +1957,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                     updateSettings(false)
                     updateTcpState()
 
-                    if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
+                    /*if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
                         checkHandleCall()
-                    }
+                    }*/
 
                     if (Constant.LATER_RESTART && Constant.CALL_STATE == Constant.CALL_STANDBY) {
                         AppUpdateHelper.restartApp()

+ 8 - 5
android_door/src/main/h10_a133_chile/java/com/wdkl/app/ncs/callingdoor/fragment/MainFragment.kt

@@ -26,6 +26,7 @@ import com.wdkl.ncs.android.middleware.model.vo.FrameRoomVO
 import com.wdkl.ncs.android.middleware.model.vo.InteractionVO
 import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel
 import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction
+import com.wdkl.ncs.android.middleware.tcp.enums.TcpType
 import kotlinx.android.synthetic.main.main_view_layout.*
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
@@ -163,11 +164,13 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
                 val tcpModel = messageEvent.message as TcpModel
                 if (tcpModel.action == TcpAction.SideAction.SHOW || tcpModel.action == TcpAction.SideAction.CLEAR) {
                     val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
-                    val bedFrameId = interactionVO.fromDeviceFrameId
-                    if (tcpModel.action == TcpAction.SideAction.SHOW) {
-                        roomAdapter.addFlickBedItem(bedFrameId)
-                    } else {
-                        roomAdapter.removeFlickBedItem(bedFrameId)
+                    if (interactionVO.actionType == TcpType.VOICE.name) {
+                        val bedFrameId = interactionVO.fromDeviceFrameId
+                        if (tcpModel.action == TcpAction.SideAction.SHOW) {
+                            roomAdapter.addFlickBedItem(bedFrameId)
+                        } else {
+                            roomAdapter.removeFlickBedItem(bedFrameId)
+                        }
                     }
                 }
             }

+ 29 - 5
android_door/src/main/h10_a133_chile/java/com/wdkl/app/ncs/callingdoor/fragment/SkyCallFragment.kt

@@ -12,6 +12,7 @@ import com.google.gson.Gson
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
 import com.wdkl.app.ncs.callingdoor.helper.DoorLightHelper
+import com.wdkl.app.ncs.callingdoor.helper.SerialPortHelper
 import com.wdkl.ncs.android.lib.utils.RingPlayHelper
 import com.wdkl.app.ncs.callingdoor.helper.VoiceManagerUtil
 import com.wdkl.ncs.android.lib.settings.SettingConfig
@@ -106,18 +107,25 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
                 janusClient!!.callState = EnumType.CallState.Outgoing
                 room = Room(Constant.SIP_ID.toBigInteger())
                 //呼叫主机
-                RingPlayHelper.playRingTone(baseActivity, R.raw.ring_back2, true)
+                RingPlayHelper.playRingTone(baseActivity, R.raw.ring_back2, true, 60000)
                 if (!startOutgoing()) {
                     AppTool.Time.delay(3000) {
                         cancelCall()
                     }
                 }
+
+                if (!Constant.sosOn) {
+                    SerialPortHelper.setDoorLight(1, "100")
+                }
             }
 
             1 -> {
                 //来电
                 showIncomingCall()
-                RingPlayHelper.playRingTone(baseActivity, R.raw.ring_tone, true)
+                RingPlayHelper.playRingTone(baseActivity, R.raw.ring_tone, true, 60000)
+                if (!Constant.sosOn) {
+                    SerialPortHelper.flashDoorLight("100", 500) //红色间隔0.5s闪烁
+                }
 
                 //如果是模拟分机呼叫则需要主机来创建房间发起通话
                 if (Constant.fromDeviceType == DeviceTypeEnum.SIMULATE_BED_DEVICE.value()) {
@@ -137,7 +145,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
                 janusClient!!.callState = EnumType.CallState.Outgoing
                 room = Room(Constant.SIP_ID.toBigInteger())
 
-                RingPlayHelper.playRingTone(baseActivity, R.raw.ring_back2, true)
+                RingPlayHelper.playRingTone(baseActivity, R.raw.ring_back2, true, 60000)
                 if (!startOutgoing()) {
                     AppTool.Time.delay(3000) {
                         cancelCall()
@@ -205,8 +213,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
         }
         RingPlayHelper.stopRingTone()
 
-        //如果当前在护理中则不操作门灯,如果不在护理中则重置门灯
-        if (!Constant.inNursing && !Constant.sosOn) {
+        if (!Constant.sosOn) {
             //SerialPortHelper.setDoorLight(1, "111") //白色
             if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
                 DoorLightHelper.resetDoorLight()
@@ -370,6 +377,12 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
             return
         }
 
+        if (!Constant.sosOn) {
+            if (SettingConfig.getDoorLightAlwaysOn(activity) == 0) {
+                DoorLightHelper.resetDoorLight()
+            }
+        }
+
         if (audioOnly) {
             ll_voice_call.visibility = View.VISIBLE
         } else {
@@ -629,6 +642,17 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
                     } else if (serialAction.equals("handoff")) {
                         Constant.CALL_STATE = Constant.CALL_STANDBY
                         callEnd(true)
+                    } else if (serialAction.equals("reject")) {
+                        RingPlayHelper.stopRingTone()
+                        Constant.CALL_STATE = Constant.CALL_STANDBY
+                        voiceReject()
+                        callEnd(false)
+                    } else if (serialAction.equals("accept")) {
+                        acceptCall()
+                        RingPlayHelper.stopRingTone()
+                        Constant.CALL_STATE = Constant.CALL_CALLING
+                        voiceAccept()
+                        janusClient!!.connect()
                     }
                 }
             }

+ 4 - 30
android_door/src/main/h10_a133_chile/java/com/wdkl/app/ncs/callingdoor/helper/DoorLightHelper.java

@@ -3,48 +3,22 @@ package com.wdkl.app.ncs.callingdoor.helper;
 import com.wdkl.ncs.android.lib.base.BaseApplication;
 import com.wdkl.ncs.android.lib.settings.SettingConfig;
 import com.wdkl.ncs.android.middleware.common.Constant;
-import com.wdkl.ncs.android.middleware.tcp.dto.TcpModel;
-import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction;
 
 public class DoorLightHelper {
 
-    public static void handleDoorLight(TcpModel tcpModel) {
-        if (TcpAction.SideAction.CALL == tcpModel.getAction()
-            || TcpAction.SideAction.SOS_CALL == tcpModel.getAction()) {
-            //门灯红色闪烁
-            SerialPortHelper.setDoorLight(1, "200"); //红色闪烁
-
-            if (TcpAction.SideAction.SOS_CALL == tcpModel.getAction()) {
-                Constant.sosOn = true;
-            }
-        } else if (TcpAction.SideAction.ACCEPT == tcpModel.getAction()
-            || TcpAction.SideAction.CANCEL == tcpModel.getAction()
-            || TcpAction.SideAction.SOS_CANCEL == tcpModel.getAction()) {
-            //如果当前在护理中则不操作门灯,如果不在护理中则重置门灯
-            if (Constant.inNursing) {
-                SerialPortHelper.setDoorLight(1, Constant.nursingColor); //绿色
-            } else {
-                //SerialPortHelper.setDoorLight(1, "111"); //白色
-                resetDoorLight();
-            }
-
-            if (TcpAction.SideAction.SOS_CANCEL == tcpModel.getAction()) {
-                Constant.sosOn = false;
-            }
-        }
-    }
-
     public static void resetDoorLight() {
         //有人入住时点亮门灯,无人入住关闭门灯
         Constant.inNursing = SettingConfig.getInNursing(BaseApplication.appContext);
         if (Constant.inNursing) {
             SerialPortHelper.setDoorLight(1, Constant.nursingColor); //绿色
         } else {
-            if (Constant.bedCustomIn) {
+            /*if (Constant.bedCustomIn) {
                 SerialPortHelper.setDoorLight(1, "111"); //白色
             } else {
                 SerialPortHelper.setDoorLight(0, "000"); //关闭
-            }
+            }*/
+
+            SerialPortHelper.setDoorLight(0, "000"); //关闭
         }
     }
 }

+ 6 - 4
android_door/src/main/h10_a133_chile/java/com/wdkl/app/ncs/callingdoor/helper/SOSHelper.java

@@ -32,11 +32,12 @@ public class SOSHelper {
                 OtherUtil.sendSosRoomCall(Utils.getInBedVOS().get(0).getBedDeviceId());
             }
 
-            SerialPortHelper.setDoorLight(1, "200"); //红色闪烁
+            //SerialPortHelper.setDoorLight(1, "200"); //红色闪烁
+            SerialPortHelper.flashDoorLight("100", 1000); //红色间隔1s闪烁
 
             Constant.sosOn = true;
 
-            //60s之后紧急按钮灯自动复位
+            //紧急按钮灯自动复位
             handler.removeCallbacksAndMessages(null);
             handler.sendEmptyMessageDelayed(110, 30*60000);
         //}
@@ -45,11 +46,12 @@ public class SOSHelper {
     public static void sosStop() {
         //if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
             handler.removeCallbacksAndMessages(null);
-            if (Constant.day_state == 1) {
+            /*if (Constant.day_state == 1) {
                 SerialPortHelper.setSosLight("1");
             } else {
                 SerialPortHelper.setSosLight("0");
-            }
+            }*/
+            SerialPortHelper.setSosLight("0");
 
             Constant.sosOn = false;
 

+ 44 - 0
android_door/src/main/h10_a133_chile/java/com/wdkl/app/ncs/callingdoor/helper/SerialPortHelper.java

@@ -1,10 +1,20 @@
 package com.wdkl.app.ncs.callingdoor.helper;
 
 import android.os.Build;
+import android.util.Log;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
 
 import serialporttest.utils.SerialPortUtil;
 
 public class SerialPortHelper {
+    public static boolean flash = false;
+    private final static ExecutorService executorService = Executors.newSingleThreadExecutor();
+    private static ExecRunnable execRunnable;
+
+    private static String flashColor = "100";
+    private static long flashDuration = 500;
 
     /**
      * 麦克风切换控制
@@ -35,6 +45,7 @@ public class SerialPortHelper {
      * @param color 0 表示灯灭  非0表示灯的颜色
      */
     public static void setDoorLight(int data, String color) {
+        flash = false;
         String command;
         if (data == 0 || color == null) {
             command = "000";
@@ -44,6 +55,18 @@ public class SerialPortHelper {
         SerialPortUtil.getInstance().sendCommand(SerialPortUtil.DOORLIGHT, command, "F");
     }
 
+    public static void flashDoorLight(final String color, final long duration) {
+        flash = false;
+        if (execRunnable == null) {
+            execRunnable = new ExecRunnable();
+        }
+
+        flash = true;
+        flashColor = color;
+        flashDuration = duration;
+        executorService.execute(execRunnable);
+    }
+
     /**
      * 设置卫生间紧急按钮灯状态: 0关闭1打开2闪烁
      */
@@ -58,4 +81,25 @@ public class SerialPortHelper {
             SerialPortUtil.getInstance().systemRestart();
         }
     }
+
+
+    static class ExecRunnable implements Runnable {
+        @Override
+        public void run() {
+            Log.e("doorled", "flash door light: " + flash);
+            while (flash) {
+                try {
+                    SerialPortUtil.getInstance().sendCommand(SerialPortUtil.DOORLIGHT, flashColor, "F");
+                    Thread.sleep(flashDuration);
+
+                    if (flash) {
+                        SerialPortUtil.getInstance().sendCommand(SerialPortUtil.DOORLIGHT, "000", "F");
+                        Thread.sleep(flashDuration);
+                    }
+                } catch (Exception e) {
+                    //
+                }
+            }
+        }
+    }
 }

+ 23 - 3
android_door/src/main/h10_a133_chile/res/layout/callingdoor_main_lay.xml

@@ -111,7 +111,8 @@
                     android:ellipsize="end"
                     android:text="@string/str_call_bed"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="20sp" />
+                    android:textSize="20sp"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/room_action_call"
@@ -143,7 +144,8 @@
                     android:ellipsize="end"
                     android:text="@string/str_cancel_call"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="20sp" />
+                    android:textSize="20sp"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/room_action_support"
@@ -159,7 +161,25 @@
                     android:ellipsize="end"
                     android:text="@string/str_support"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="20sp" />
+                    android:textSize="20sp"
+                    android:visibility="gone"/>
+
+                <TextView
+                    android:id="@+id/room_action_blue_code"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="30dp"
+                    android:background="@mipmap/bg_bottom_btn"
+                    android:drawableLeft="@mipmap/ic_support"
+                    android:drawablePadding="6dp"
+                    android:gravity="center_vertical"
+                    android:padding="10dp"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                    android:text="@string/str_blue_code"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:textSize="20sp"
+                    android:enabled="false"/>
 
                 <TextView
                     android:id="@+id/room_action_nurse"

+ 23 - 3
android_door/src/main/h10_a133_chile/res/layout/callingdoor_main_lay_rk3288.xml

@@ -118,7 +118,8 @@
                     android:ellipsize="end"
                     android:text="@string/str_call_bed"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="40sp" />
+                    android:textSize="40sp"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/room_action_call"
@@ -150,7 +151,8 @@
                     android:ellipsize="end"
                     android:text="@string/str_cancel_call"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
-                    android:textSize="40sp" />
+                    android:textSize="40sp"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/room_action_support"
@@ -166,6 +168,23 @@
                     android:ellipsize="end"
                     android:text="@string/str_support"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:textSize="40sp"
+                    android:visibility="gone"/>
+
+                <TextView
+                    android:id="@+id/room_action_blue_code"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginBottom="40dp"
+                    android:background="@mipmap/bg_bottom_btn2"
+                    android:drawableLeft="@mipmap/ic_support2"
+                    android:drawablePadding="6dp"
+                    android:gravity="center_vertical"
+                    android:padding="12dp"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                    android:text="@string/str_blue_code"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="40sp" />
 
                 <TextView
@@ -198,7 +217,8 @@
                     android:ellipsize="end"
                     android:text="@string/language_set_title"
                     android:textColor="@color/white"
-                    android:textSize="40sp" />
+                    android:textSize="40sp"
+                    android:visibility="gone"/>
 
                 <TextView
                     android:id="@+id/room_action_more"

+ 3 - 0
common/build.gradle

@@ -231,6 +231,9 @@ dependencies {
      * netty
      */
     compile 'io.netty:netty-all:4.1.42.Final'
+    //解决 引入上方库,Log4J2Logger报错的问题
+    implementation 'org.apache.logging.log4j:log4j-core:2.7'
+    implementation 'org.apache.logging.log4j:log4j-api:2.7'
 
     /**
      * json

+ 1 - 1
common/src/main/code/com/wdkl/ncs/android/lib/base/BaseApplication.kt

@@ -45,7 +45,7 @@ open class BaseApplication : Application() {
      */
     override fun onCreate() {
         super.onCreate()
-        closeAndroidPDialog()
+        //closeAndroidPDialog()
         AppTool.SystemUI.initStatusBarHeight(applicationContext)
         /**Logger初始化*/
         LoggerFactory.create(baseContext)

+ 2 - 2
common/src/main/code/com/wdkl/ncs/android/lib/utils/RingPlayHelper.java

@@ -18,7 +18,7 @@ public class RingPlayHelper {
         }
     };
 
-    public static void playRingTone(Context context, int res, boolean loop) {
+    public static void playRingTone(Context context, int res, boolean loop, long duration) {
         if (ringPlayer == null) {
             ringPlayer = new AsyncPlayer(null);
         }
@@ -26,7 +26,7 @@ public class RingPlayHelper {
         if (!ringPlayer.isPlay()) {
             ringPlayer.play(context, res, loop, AudioManager.STREAM_MUSIC);
             handler.removeCallbacksAndMessages(null);
-            handler.sendEmptyMessageDelayed(10, 60000);
+            handler.sendEmptyMessageDelayed(10, duration);
         }
     }
 

+ 1 - 1
middleware/build.gradle

@@ -73,5 +73,5 @@ dependencies {
     compile 'com.fasterxml.jackson.core:jackson-databind:2.9.5'
     compile 'io.swagger:swagger-annotations:1.5.14'
 
-    compile 'org.mongodb:bson:3.6.3'
+    compile 'org.mongodb:bson:3.12.10'
 }

+ 1 - 0
resource/src/main/res/values-es/strings.xml

@@ -128,6 +128,7 @@
     <string name="str_fees">Tarifas</string>
     <string name="str_more">Más</string>
     <string name="str_support">Reforzar</string>
+    <string name="str_blue_code">Código azul</string>
     <string name="str_call">Llamar</string>
     <string name="str_cancel_call">Cancelar llamada</string>
     <string name="str_call_nurse">Llame a la enfermera</string>

+ 1 - 0
resource/src/main/res/values-ru/strings.xml

@@ -123,6 +123,7 @@
     <string name="str_fees">Оплата</string>
     <string name="str_more">Еще</string>
     <string name="str_support">Усилить</string>
+    <string name="str_blue_code">Blue code</string>
     <string name="str_call">Позвонить</string>
     <string name="str_cancel_call">Отменить звонок</string>
     <string name="str_call_nurse">Вызвать медсестру</string>

+ 1 - 0
resource/src/main/res/values-zh/strings.xml

@@ -128,6 +128,7 @@
     <string name="str_fees">费用</string>
     <string name="str_more">更多</string>
     <string name="str_support">请求增援</string>
+    <string name="str_blue_code">蓝色代码</string>
     <string name="str_call">呼叫</string>
     <string name="str_cancel_call">取消呼叫</string>
     <string name="str_call_nurse">呼叫护士</string>

+ 1 - 0
resource/src/main/res/values/strings.xml

@@ -127,6 +127,7 @@
     <string name="str_fees">Fees</string>
     <string name="str_more">More</string>
     <string name="str_support">Reinforce</string>
+    <string name="str_blue_code">Blue code</string>
     <string name="str_call">Call</string>
     <string name="str_cancel_call">Cancel call</string>
     <string name="str_call_nurse">Call nurse</string>