Browse Source

增加住院号显示

weizhengliang 2 years ago
parent
commit
a0cfd44333

+ 14 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/adapter/FrameRoomAdapter.kt

@@ -118,6 +118,12 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
 
     private fun showBedInfo(holder: BedViewHolder, bedVO: FrameBedVO) {
         holder.bedName.text = CommonUtils.subStringAfter(bedVO.frameBed.fullName, "-")
+        if (TextUtils.isEmpty(bedVO.cardNo)) {
+            holder.cardNo.text = ""
+        } else {
+            holder.cardNo.text = StringUtil.getResString(R.string.card_no) + bedVO.cardNo
+        }
+
         if (TextUtils.isEmpty(bedVO.customerName)) {
             //空床位
             holder.customName.setText(R.string.str_empty)
@@ -236,6 +242,12 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
 
     private fun showBedInfoRk3288(holder: BedViewHolder, bedVO: FrameBedVO) {
         holder.bedName.text = CommonUtils.subStringAfter(bedVO.frameBed.fullName, "-")
+        if (TextUtils.isEmpty(bedVO.cardNo)) {
+            holder.cardNo.text = ""
+        } else {
+            holder.cardNo.text = StringUtil.getResString(R.string.card_no) + bedVO.cardNo
+        }
+
         if (TextUtils.isEmpty(bedVO.customerName)) {
             //空床位
             holder.customName.setText(R.string.str_empty)
@@ -354,6 +366,7 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
 
     class BedViewHolder: RecyclerView.ViewHolder {
         var bedName : TextView
+        var cardNo : TextView
         var nursingColor1 : View
         var nursingName1 : TextView
         var nursingValue1 : TextView
@@ -383,6 +396,7 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
 
         constructor(itemView: View): super(itemView) {
             bedName = itemView.findViewById(R.id.tv_bed_name_title)
+            cardNo = itemView.findViewById(R.id.tv_bed_card_no)
             nursingColor1 = itemView.findViewById(R.id.nurse_config_item_color1)
             nursingName1 = itemView.findViewById(R.id.nurse_config_item_name1)
             nursingValue1 = itemView.findViewById(R.id.nurse_config_item_value1)

+ 21 - 7
callingdoor/src/main/res/layout/item_bed.xml

@@ -6,14 +6,28 @@
     android:paddingLeft="4dp"
     android:orientation="vertical">
 
-    <TextView
-        android:id="@+id/tv_bed_name_title"
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:padding="4dp"
-        android:text="--"
-        android:textColor="@color/main_color"
-        android:textSize="36sp"/>
+        android:layout_height="wrap_content">
+        <TextView
+            android:id="@+id/tv_bed_name_title"
+            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"/>
+        <TextView
+            android:id="@+id/tv_bed_card_no"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:textColor="#B4B4B4"
+            android:textSize="16sp"/>
+    </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"

+ 21 - 7
callingdoor/src/main/res/layout/item_bed_rk3288.xml

@@ -8,15 +8,29 @@
     android:paddingRight="32dp"
     android:orientation="vertical">
 
-    <TextView
-        android:id="@+id/tv_bed_name_title"
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding="10dp"
-        android:text="--"
-        android:textColor="@color/main_color"
-        android:textSize="54sp"
-        android:background="#EAF2F9"/>
+        android:background="#EAF2F9">
+        <TextView
+            android:id="@+id/tv_bed_name_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:padding="10dp"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:text="--"
+            android:textColor="@color/main_color"
+            android:textSize="54sp" />
+        <TextView
+            android:id="@+id/tv_bed_card_no"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:textColor="#B4B4B4"
+            android:textSize="24sp"/>
+    </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"

+ 21 - 7
callingdoor/src/main/res/layout/item_bed_rk3288_800.xml

@@ -8,15 +8,29 @@
     android:paddingRight="32dp"
     android:orientation="vertical">
 
-    <TextView
-        android:id="@+id/tv_bed_name_title"
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:padding="10dp"
-        android:text="--"
-        android:textColor="@color/main_color"
-        android:textSize="48sp"
-        android:background="#EAF2F9"/>
+        android:background="#EAF2F9">
+        <TextView
+            android:id="@+id/tv_bed_name_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:padding="10dp"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:text="--"
+            android:textColor="@color/main_color"
+            android:textSize="48sp" />
+        <TextView
+            android:id="@+id/tv_bed_card_no"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:textColor="#B4B4B4"
+            android:textSize="24sp"/>
+    </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"

+ 9 - 1
middleware/src/main/code/com/wdkl/ncs/android/middleware/model/vo/FrameBedVO.java

@@ -31,13 +31,13 @@ public class FrameBedVO{
     private String bedDevicePhoneNumber;
     private Integer bedDeviceType;
 
-    // todo: 应该传mapping,而不是具体的名称
     private Integer doctorId;
     private String doctorName;
     private Integer nurseId;
     private String nurseName;
     private Integer workerId;
     private String workerName;
+    private String cardNo;
 
     private List<NurseConfigDto> nurseConfigDtos;
 
@@ -219,6 +219,14 @@ public class FrameBedVO{
         this.workerName = workerName;
     }
 
+    public String getCardNo() {
+        return cardNo;
+    }
+
+    public void setCardNo(String cardNo) {
+        this.cardNo = cardNo;
+    }
+
     public List<NurseConfigDto> getNurseConfigDtos() {
         return nurseConfigDtos;
     }

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

@@ -96,6 +96,7 @@
     <string name="voice_call_speech">%s llamando</string>
     <string name="sos_call_speech">%s llamada de emergencia</string>
 
+    <string name="card_no">Card No. </string>
     <string name="indate">Fecha de entrada: </string>
     <string name="subtotal">Subtotal: </string>
     <string name="countdown_time">%ds</string>

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

@@ -93,6 +93,7 @@
     <string name="str_call_speaker">Динамик</string>
     <string name="voice_call_speech">%s вызов</string>
     <string name="sos_call_speech">экстренный вызов %s</string>
+    <string name="card_no">Card No. </string>
     <string name="indate">Дата: </string>
     <string name="subtotal">Итого: </string>
     <string name="countdown_time">%ds</string>

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

@@ -96,6 +96,7 @@
     <string name="voice_call_speech">%s 呼叫</string>
     <string name="sos_call_speech">%s 紧急呼叫</string>
 
+    <string name="card_no">住院号: </string>
     <string name="indate">入住日期: </string>
     <string name="subtotal">小计: </string>
     <string name="countdown_time">%d秒</string>

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

@@ -95,6 +95,7 @@
     <string name="voice_call_speech">%s Calling</string>
     <string name="sos_call_speech">%s emergency call</string>
 
+    <string name="card_no">Card No. </string>
     <string name="indate">In date: </string>
     <string name="subtotal">Subtotal: </string>
     <string name="countdown_time">%ds</string>