瀏覽代碼

潼南门口机去掉护理项显示,增加责任医生责任护士图片显示

weizhengliang 3 天之前
父節點
當前提交
0ef7457c6b

+ 56 - 254
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/adapter/FrameRoomAdapter.kt

@@ -13,6 +13,8 @@ import android.view.ViewGroup
 import android.widget.ImageView
 import android.widget.LinearLayout
 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.common.Constant
 import com.wdkl.ncs.android.middleware.model.dto.NurseConfigDto
@@ -36,63 +38,36 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
         this.context = context
         this.data = data
 
-        if ("rk3288".equals(Build.MODEL)) {
-            drawableEmpty = context.resources.getDrawable(R.mipmap.ic_custom_empty2)
-            drawableEmpty.setBounds(0, 0, drawableEmpty.minimumWidth, drawableEmpty.minimumHeight)
-            drawableMale = context.resources.getDrawable(R.mipmap.ic_custom_male2)
-            drawableMale.setBounds(0, 0, drawableMale.minimumWidth, drawableMale.minimumHeight)
-            drawableFemale = context.resources.getDrawable(R.mipmap.ic_custom_female2)
-            drawableFemale.setBounds(0, 0, drawableFemale.minimumWidth, drawableFemale.minimumHeight)
-            iconMale = context.resources.getDrawable(R.mipmap.ic_gender_male2)
-            iconMale.setBounds(0, 0, iconMale.minimumWidth, iconMale.minimumHeight)
-            iconFemale = context.resources.getDrawable(R.mipmap.ic_gender_female2)
-            iconFemale.setBounds(0, 0, iconFemale.minimumWidth, iconFemale.minimumHeight)
-        } else {
-            drawableEmpty = context.resources.getDrawable(R.mipmap.ic_custom_empty)
-            drawableEmpty.setBounds(0, 0, drawableEmpty.minimumWidth, drawableEmpty.minimumHeight)
-            drawableMale = context.resources.getDrawable(R.mipmap.ic_custom_male)
-            drawableMale.setBounds(0, 0, drawableMale.minimumWidth, drawableMale.minimumHeight)
-            drawableFemale = context.resources.getDrawable(R.mipmap.ic_custom_female)
-            drawableFemale.setBounds(0, 0, drawableFemale.minimumWidth, drawableFemale.minimumHeight)
-            iconMale = context.resources.getDrawable(R.mipmap.ic_gender_male)
-            iconMale.setBounds(0, 0, iconMale.minimumWidth, iconMale.minimumHeight)
-            iconFemale = context.resources.getDrawable(R.mipmap.ic_gender_female)
-            iconFemale.setBounds(0, 0, iconFemale.minimumWidth, iconFemale.minimumHeight)
-        }
+        drawableEmpty = context.resources.getDrawable(R.mipmap.ic_custom_empty)
+        drawableEmpty.setBounds(0, 0, drawableEmpty.minimumWidth, drawableEmpty.minimumHeight)
+        drawableMale = context.resources.getDrawable(R.mipmap.ic_custom_male)
+        drawableMale.setBounds(0, 0, drawableMale.minimumWidth, drawableMale.minimumHeight)
+        drawableFemale = context.resources.getDrawable(R.mipmap.ic_custom_female)
+        drawableFemale.setBounds(0, 0, drawableFemale.minimumWidth, drawableFemale.minimumHeight)
+        iconMale = context.resources.getDrawable(R.mipmap.ic_gender_male)
+        iconMale.setBounds(0, 0, iconMale.minimumWidth, iconMale.minimumHeight)
+        iconFemale = context.resources.getDrawable(R.mipmap.ic_gender_female)
+        iconFemale.setBounds(0, 0, iconFemale.minimumWidth, iconFemale.minimumHeight)
     }
 
     override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): BedViewHolder {
-        if ("rk3288".equals(Build.MODEL)) {
-            if (Constant.DEVICE_HEIGHT == 1280 && Constant.DEVICE_WIDTH == 800) {
-                val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed_rk3288_800, parent, false)
-                return BedViewHolder(view)
-            } else {
-                val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed_rk3288, parent, false)
-                return BedViewHolder(view)
-            }
-        } else {
-            val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_bed, parent, false)
-            return BedViewHolder(view)
-        }
+        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()
+            //initDefaultNursingConfigs()
             val pos = position % data.size
 
-            if ("rk3288".equals(Build.MODEL)) {
-                showBedInfoRk3288(holder, data.get(pos))
-            } else {
-                showBedInfo(holder, data.get(pos))
-            }
+            showBedInfo(holder, data.get(pos))
         } catch (e: Exception) {
             e.printStackTrace()
         }
     }
 
     override fun getItemCount(): Int {
-        if (data.size <= 3) {
+        if (data.size <= 2) {
             return data.size
         } else {
             return Int.MAX_VALUE
@@ -118,162 +93,39 @@ 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)) {
+        /*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)
-            holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
-            holder.customAge.visibility = View.GONE
-            holder.doctorIcon.visibility = View.GONE
-            holder.doctorTitle.visibility = View.GONE
-            holder.doctorName.visibility = View.GONE
-            holder.nurseIcon.visibility = View.GONE
-            holder.nurseTitle.visibility = View.GONE
-            holder.nurseName.visibility = View.GONE
-        } else {
-            //有入住
-            holder.customName.text = bedVO.customerName
-            holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
-            holder.customAge.visibility = View.VISIBLE
-            holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
-            if (bedVO.customerSex == 0) {
-                holder.customName.setCompoundDrawables(null, drawableFemale, null, null)
-                holder.customAge.setCompoundDrawables(iconFemale, null, null, null)
-            } else if (bedVO.customerSex == 1) {
-                holder.customName.setCompoundDrawables(null, drawableMale, null, null)
-                holder.customAge.setCompoundDrawables(iconMale, null, null, null)
-            } else {
-                holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
-                holder.customAge.setCompoundDrawables(null, null, null, null)
-            }
-            holder.doctorName.text = bedVO.doctorName
-            holder.nurseName.text = bedVO.nurseName
-
-            if (!TextUtils.isEmpty(Constant.doctorTitle)) {
-                holder.doctorTitle.text = Constant.doctorTitle
-            } else {
-                holder.doctorTitle.setText(R.string.doctor_title)
-            }
-
-            if (!TextUtils.isEmpty(Constant.nurseTitle)) {
-                holder.nurseTitle.text = Constant.nurseTitle
-            } else {
-                holder.nurseTitle.setText(R.string.nurse_title)
-            }
-
-            if (Constant.doctorValid == 1) {
-                holder.doctorIcon.visibility = View.VISIBLE
-                holder.doctorTitle.visibility = View.VISIBLE
-                holder.doctorName.visibility = View.VISIBLE
-            } else {
-                holder.doctorIcon.visibility = View.GONE
-                holder.doctorTitle.visibility = View.GONE
-                holder.doctorName.visibility = View.GONE
-            }
+            holder.customAge.visibility = View.INVISIBLE
+            holder.doctorName.setText(R.string.str_empty)
+            holder.nurseName.setText(R.string.str_empty)
 
-            if (Constant.nurseValid == 1) {
-                holder.nurseIcon.visibility = View.VISIBLE
-                holder.nurseTitle.visibility = View.VISIBLE
-                holder.nurseName.visibility = View.VISIBLE
-            } else {
-                holder.nurseIcon.visibility = View.GONE
-                holder.nurseTitle.visibility = View.GONE
-                holder.nurseName.visibility = View.GONE
-            }
-
-            val nursingConfigs = bedVO.nurseConfigDtos
-            if (nursingConfigs != null && nursingConfigs.size > 0) {
-                for ((index, e) in nursingConfigs.withIndex()) {
-                    if (index < configList.size) {
-                        configList.set(index, e)
-                    } else {
-                        configList.add(e)
-                    }
-                }
-            }
-        }
-
-
-        if (StringUtil.notEmpty(configList[0].nurseColorRbg)) {
-            holder.nursingColor1.setBackgroundColor(Color.parseColor("#" + configList[0].nurseColorRbg))
-        } else {
-            holder.nursingColor1.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName1.setText(configList[0].nurseConfigName)
-        holder.nursingValue1.setText(configList[0].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[1].nurseColorRbg)) {
-            holder.nursingColor2.setBackgroundColor(Color.parseColor("#" + configList[1].nurseColorRbg))
-        } else {
-            holder.nursingColor2.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName2.setText(configList[1].nurseConfigName)
-        holder.nursingValue2.setText(configList[1].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[2].nurseColorRbg)) {
-            holder.nursingColor3.setBackgroundColor(Color.parseColor("#" + configList[2].nurseColorRbg))
-        } else {
-            holder.nursingColor3.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName3.setText(configList[2].nurseConfigName)
-        holder.nursingValue3.setText(configList[2].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[3].nurseColorRbg)) {
-            holder.nursingColor4.setBackgroundColor(Color.parseColor("#" + configList[3].nurseColorRbg))
-        } else {
-            holder.nursingColor4.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName4.setText(configList[3].nurseConfigName)
-        holder.nursingValue4.setText(configList[3].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[4].nurseColorRbg)) {
-            holder.nursingColor5.setBackgroundColor(Color.parseColor("#" + configList[4].nurseColorRbg))
-        } else {
-            holder.nursingColor5.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName5.setText(configList[4].nurseConfigName)
-        holder.nursingValue5.setText(configList[4].nurseOptionName)
-    }
-
-    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)
-            holder.customName.setCompoundDrawables(drawableEmpty, null, null, null)
-            holder.customAge.visibility = View.GONE
-            holder.doctorIcon.visibility = View.GONE
-            holder.doctorTitle.visibility = View.GONE
-            holder.doctorName.visibility = View.GONE
-            holder.nurseIcon.visibility = View.GONE
-            holder.nurseTitle.visibility = View.GONE
-            holder.nurseName.visibility = View.GONE
+            //holder.doctorIcon.visibility = View.GONE
+            //holder.doctorTitle.visibility = View.GONE
+            //holder.doctorName.visibility = View.GONE
+            //holder.nurseIcon.visibility = View.GONE
+            //holder.nurseTitle.visibility = View.GONE
+            //holder.nurseName.visibility = View.GONE
         } else {
             //有入住
             holder.customName.text = bedVO.customerName
-            holder.customName.setCompoundDrawables(null, drawableEmpty, null, null)
             holder.customAge.visibility = View.VISIBLE
-            holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
+            //holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
             if (bedVO.customerSex == 0) {
-                holder.customName.setCompoundDrawables(drawableFemale, null, null, null)
-                holder.customAge.setCompoundDrawables(iconFemale, null, null, null)
+                //holder.customAge.setCompoundDrawables(iconFemale, null, null, null)
+                holder.customAge.text = "女 " + bedVO.customerAge + bedVO.customerAgeUnit
             } else if (bedVO.customerSex == 1) {
-                holder.customName.setCompoundDrawables(drawableMale, null, null, null)
-                holder.customAge.setCompoundDrawables(iconMale, null, null, null)
+                //holder.customAge.setCompoundDrawables(iconMale, null, null, null)
+                holder.customAge.text = "男 " + bedVO.customerAge + bedVO.customerAgeUnit
             } else {
-                holder.customName.setCompoundDrawables(drawableEmpty, null, null, null)
-                holder.customAge.setCompoundDrawables(null, null, null, null)
+                //holder.customAge.setCompoundDrawables(null, null, null, null)
+                holder.customAge.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
             }
             holder.doctorName.text = bedVO.doctorName
             holder.nurseName.text = bedVO.nurseName
@@ -294,6 +146,13 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
                 holder.doctorIcon.visibility = View.VISIBLE
                 holder.doctorTitle.visibility = View.VISIBLE
                 holder.doctorName.visibility = View.VISIBLE
+
+                Glide.with(context)
+                    .load(bedVO.doctorFace)
+                    //.skipMemoryCache(true)
+                    .diskCacheStrategy(DiskCacheStrategy.NONE)
+                    .placeholder(R.mipmap.doctor_default)//占位图
+                    .into(holder.doctorIcon)
             } else {
                 holder.doctorIcon.visibility = View.GONE
                 holder.doctorTitle.visibility = View.GONE
@@ -304,6 +163,13 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
                 holder.nurseIcon.visibility = View.VISIBLE
                 holder.nurseTitle.visibility = View.VISIBLE
                 holder.nurseName.visibility = View.VISIBLE
+
+                Glide.with(context)
+                    .load(bedVO.nurseFace)
+                    //.skipMemoryCache(true)
+                    .diskCacheStrategy(DiskCacheStrategy.NONE)
+                    .placeholder(R.mipmap.nurse_default)//占位图
+                    .into(holder.nurseIcon)
             } else {
                 holder.nurseIcon.visibility = View.GONE
                 holder.nurseTitle.visibility = View.GONE
@@ -322,68 +188,20 @@ class FrameRoomAdapter : RecyclerView.Adapter<FrameRoomAdapter.BedViewHolder> {
             }
         }
 
+    }
 
-        if (StringUtil.notEmpty(configList[0].nurseColorRbg)) {
-            holder.nursingColor1.setBackgroundColor(Color.parseColor("#" + configList[0].nurseColorRbg))
-        } else {
-            holder.nursingColor1.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName1.setText(configList[0].nurseConfigName)
-        holder.nursingValue1.setText(configList[0].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[1].nurseColorRbg)) {
-            holder.nursingColor2.setBackgroundColor(Color.parseColor("#" + configList[1].nurseColorRbg))
-        } else {
-            holder.nursingColor2.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName2.setText(configList[1].nurseConfigName)
-        holder.nursingValue2.setText(configList[1].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[2].nurseColorRbg)) {
-            holder.nursingColor3.setBackgroundColor(Color.parseColor("#" + configList[2].nurseColorRbg))
-        } else {
-            holder.nursingColor3.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName3.setText(configList[2].nurseConfigName)
-        holder.nursingValue3.setText(configList[2].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[3].nurseColorRbg)) {
-            holder.nursingColor4.setBackgroundColor(Color.parseColor("#" + configList[3].nurseColorRbg))
-        } else {
-            holder.nursingColor4.setBackgroundColor(Color.parseColor("#D7D7D7"))
-        }
-        holder.nursingName4.setText(configList[3].nurseConfigName)
-        holder.nursingValue4.setText(configList[3].nurseOptionName)
-
-        if (StringUtil.notEmpty(configList[4].nurseColorRbg)) {
-            holder.nursingColor5.setBackgroundColor(Color.parseColor("#" + configList[4].nurseColorRbg))
-        } else {
-            holder.nursingColor5.setBackgroundColor(Color.parseColor("#D7D7D7"))
+    override fun onViewRecycled(holder: BedViewHolder?) {
+        if (holder != null) {
+            Glide.clear(holder.doctorIcon)
+            Glide.clear(holder.nurseIcon)
         }
-        holder.nursingName5.setText(configList[4].nurseConfigName)
-        holder.nursingValue5.setText(configList[4].nurseOptionName)
+        super.onViewRecycled(holder)
     }
 
+
     class BedViewHolder: RecyclerView.ViewHolder {
         var bedName : TextView
         var cardNo : TextView
-        var nursingColor1 : View
-        var nursingName1 : TextView
-        var nursingValue1 : TextView
-        var nursingColor2 : View
-        var nursingName2 : TextView
-        var nursingValue2 : TextView
-        var nursingColor3 : View
-        var nursingName3 : TextView
-        var nursingValue3 : TextView
-        var nursingColor4 : View
-        var nursingName4 : TextView
-        var nursingValue4 : TextView
-        var nursingColor5 : View
-        var nursingName5 : TextView
-        var nursingValue5 : TextView
-        var nursingView : LinearLayout
-
 
         var customName : TextView
         var customAge : TextView
@@ -397,22 +215,6 @@ 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)
-            nursingColor2 = itemView.findViewById(R.id.nurse_config_item_color2)
-            nursingName2 = itemView.findViewById(R.id.nurse_config_item_name2)
-            nursingValue2 = itemView.findViewById(R.id.nurse_config_item_value2)
-            nursingColor3 = itemView.findViewById(R.id.nurse_config_item_color3)
-            nursingName3 = itemView.findViewById(R.id.nurse_config_item_name3)
-            nursingValue3 = itemView.findViewById(R.id.nurse_config_item_value3)
-            nursingColor4 = itemView.findViewById(R.id.nurse_config_item_color4)
-            nursingName4 = itemView.findViewById(R.id.nurse_config_item_name4)
-            nursingValue4 = itemView.findViewById(R.id.nurse_config_item_value4)
-            nursingColor5 = itemView.findViewById(R.id.nurse_config_item_color5)
-            nursingName5 = itemView.findViewById(R.id.nurse_config_item_name5)
-            nursingValue5 = itemView.findViewById(R.id.nurse_config_item_value5)
-            nursingView = itemView.findViewById(R.id.ll_nurse_configs)
 
             customName = itemView.findViewById(R.id.bed_customer_name)
             customAge = itemView.findViewById(R.id.bed_customer_age)

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

@@ -73,7 +73,7 @@ class MainFragment: BaseFragment<MainFragmentPresenter, MainViewLayoutBinding>()
             roomAdpter.setData(bedList)
             Utils.setInBedVos(bedList)
             rv_bed_view.itemAnimator = DefaultItemAnimator()
-            if (bedList.size > 3) {
+            if (bedList.size > 2) {
                 //自动滚动显示
                 rv_bed_view.start()
             } else {

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

@@ -0,0 +1,9 @@
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape>
+            <stroke
+                android:width="2dp"
+                android:color="@color/main_color"/>
+        </shape>
+    </item>
+</layer-list>

+ 1 - 1
callingdoor/src/main/res/layout/callingdoor_main_lay.xml

@@ -75,7 +75,7 @@
         <!--右侧按钮区域-->
         <ScrollView
             android:id="@+id/room_actions"
-            android:layout_width="132dp"
+            android:layout_width="154dp"
             android:layout_height="match_parent"
             android:layout_below="@id/ll_room_name"
             android:layout_above="@id/app_version"

+ 81 - 253
callingdoor/src/main/res/layout/item_bed.xml

@@ -1,304 +1,132 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="290dp"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/ll_item_bed"
+    android:layout_width="416dp"
     android:layout_height="match_parent"
-    android:paddingLeft="4dp"
-    android:orientation="vertical">
+    android:layout_margin="4dp"
+    android:background="@color/right_item_select"
+    android:orientation="vertical"
+    android:gravity="center_horizontal">
+
+    <com.wdkl.ncs.android.lib.widget.MarqueeTextView
+        android:id="@+id/tv_bed_name_title"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:text="--"
+        android:textColor="@color/main_color"
+        android:textSize="56sp"
+        android:textStyle="bold"
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:focusable="true"
+        android:focusableInTouchMode="true"
+        android:marqueeRepeatLimit="marquee_forever"/>
 
     <LinearLayout
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="wrap_content">
         <TextView
-            android:id="@+id/tv_bed_name_title"
+            android:id="@+id/bed_customer_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:gravity="center"
             android:text="--"
-            android:textColor="@color/main_color"
-            android:textSize="36sp"
-            android:textStyle="bold"/>
+            android:textStyle="bold"
+            android:textColor="@color/black"
+            android:textSize="32sp" />
+
         <TextView
-            android:id="@+id/tv_bed_card_no"
+            android:id="@+id/bed_customer_age"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:textColor="#B4B4B4"
-            android:textSize="16sp"/>
+            android:layout_marginLeft="20dp"
+            android:gravity="center"
+            android:textColor="@color/black"
+            android:text="--"
+            android:textSize="24sp" />
     </LinearLayout>
 
+    <TextView
+        android:id="@+id/tv_bed_card_no"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:textColor="@color/black"
+        android:textSize="20sp"
+        android:text="--"
+        android:visibility="gone"/>
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:baselineAligned="false">
+        android:layout_marginTop="18dp">
 
-        <!--护理项-->
         <LinearLayout
-            android:id="@+id/ll_nurse_configs"
             android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1.2"
-            android:baselineAligned="false"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:gravity="center"
             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>
-
-        <!--入住信息-->
-        <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="0.8"
-            android:layout_marginTop="10dp"
-            android:baselineAligned="false"
-            android:orientation="vertical"
-            android:gravity="center_horizontal">
-
-            <TextView
-                android:id="@+id/bed_customer_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:drawableTop="@mipmap/ic_custom_male"
-                android:gravity="center"
-                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:layout_width="160dp"
+                android:layout_height="160dp"
+                android:scaleType="fitXY"
+                android:src="@mipmap/doctor_default" />
 
             <TextView
                 android:id="@+id/bed_doctor_title"
                 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:layout_marginTop="12dp"
+                android:text="责任医生"
+                android:textStyle="bold"
+                android:textColor="@color/black"
+                android:textSize="20sp" />
 
             <TextView
                 android:id="@+id/bed_doctor_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/str_empty"
+                android:layout_marginTop="12dp"
+                android:text="暂无"
+                android:textStyle="bold"
                 android:textColor="@color/black"
-                android:textSize="14sp"/>
+                android:textSize="24sp" />
+        </LinearLayout>
 
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:gravity="center"
+            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="160dp"
+                android:layout_height="160dp"
+                android:scaleType="fitXY"
+                android:src="@mipmap/nurse_default" />
 
             <TextView
                 android:id="@+id/bed_nurse_title"
                 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:layout_marginTop="12dp"
+                android:text="责任护士"
+                android:textStyle="bold"
+                android:textColor="@color/black"
+                android:textSize="20sp" />
 
             <TextView
                 android:id="@+id/bed_nurse_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="@string/str_empty"
+                android:layout_marginTop="12dp"
+                android:text="暂无"
+                android:textStyle="bold"
                 android:textColor="@color/black"
-                android:textSize="14sp"/>
-
+                android:textSize="24sp" />
         </LinearLayout>
 
     </LinearLayout>

二進制
callingdoor/src/main/res/mipmap-mdpi/doctor_default.jpg


二進制
callingdoor/src/main/res/mipmap-mdpi/nurse_default.jpg


+ 1 - 0
callingdoor/src/main/res/values/colors.xml

@@ -95,4 +95,5 @@
     <color name="right_item_select">#B1DAF3</color>
 
     <color name="nursing_color">#FFA5A5</color>
+    <color name="bed_text_color">#0070ff</color>
 </resources>

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

@@ -33,10 +33,13 @@ public class FrameBedVO{
 
     private Integer doctorId;
     private String doctorName;
+    private String doctorFace;
     private Integer nurseId;
     private String nurseName;
+    private String nurseFace;
     private Integer workerId;
     private String workerName;
+    private String workerFace;
     private String cardNo;
 
     private List<NurseConfigDto> nurseConfigDtos;
@@ -219,6 +222,30 @@ public class FrameBedVO{
         this.workerName = workerName;
     }
 
+    public String getDoctorFace() {
+        return doctorFace;
+    }
+
+    public void setDoctorFace(String doctorFace) {
+        this.doctorFace = doctorFace;
+    }
+
+    public String getNurseFace() {
+        return nurseFace;
+    }
+
+    public void setNurseFace(String nurseFace) {
+        this.nurseFace = nurseFace;
+    }
+
+    public String getWorkerFace() {
+        return workerFace;
+    }
+
+    public void setWorkerFace(String workerFace) {
+        this.workerFace = workerFace;
+    }
+
     public String getCardNo() {
         return cardNo;
     }