浏览代码

5寸分机优化费用显示

weizhengliang 2 年之前
父节点
当前提交
9d2f50a601

+ 41 - 26
android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/adapter/CostItemAdapter2.kt

@@ -30,22 +30,31 @@ class CostItemAdapter2 : RecyclerView.Adapter<CostItemAdapter2.ViewHolder> {
     }
 
     override fun onBindViewHolder(holder: ViewHolder?, position: Int) {
-        holder?.costGroupName?.text = costData.get(position).groupName
-        if (costData.get(position).feeTime != null) {
-            holder?.costTime?.text = TimeHandle.getDateTime(costData.get(position).feeTime * 1000L, "yyyy-MM-dd HH:mm")
-        } else {
-            holder?.costTime?.text = "--"
-        }
-        if (!TextUtils.isEmpty(costData.get(position).unit)) {
-            holder?.costName?.text = costData.get(position).feeName + "/" + costData.get(position).unit
-        } else {
-            holder?.costName?.text = costData.get(position).feeName
-        }
-        holder?.costValue?.text = "" + costData.get(position).feeValue
-        if (!TextUtils.isEmpty(costData.get(position).description)) {
-            holder?.costDetail?.text = StringUtil.getResString(R.string.cost_detail) + costData.get(position).description
-        } else {
-            holder?.costDetail?.text = StringUtil.getResString(R.string.cost_detail)
+        try {
+            holder?.feeGroupName?.text = costData.get(position).groupName
+            if (costData.get(position).feeTime != null) {
+                holder?.feeTime?.text = TimeHandle.getDateTime(costData.get(position).feeTime * 1000L, "yyyy-MM-dd HH:mm")
+            } else {
+                holder?.feeTime?.text = "--"
+            }
+            if (costData.get(position).feeNumber != null) {
+                holder?.feeNum?.text = "x" + costData.get(position).feeNumber
+            }
+
+            holder?.feeName?.text = costData.get(position).feeName
+            if (costData.get(position).feePrice != null) {
+                holder?.feePrice?.text = "" + costData.get(position).feePrice + "/" + costData.get(position).unit
+            }
+            holder?.feeValue?.text = "" + costData.get(position).feeValue
+            holder?.feeType?.text = costData.get(position).keyType
+
+            if (!TextUtils.isEmpty(costData.get(position).description)) {
+                holder?.feeDetail?.text = StringUtil.getResString(R.string.cost_detail) + costData.get(position).description
+            } else {
+                holder?.feeDetail?.text = StringUtil.getResString(R.string.cost_detail)
+            }
+        } catch (e: Exception) {
+            //
         }
     }
 
@@ -64,18 +73,24 @@ class CostItemAdapter2 : RecyclerView.Adapter<CostItemAdapter2.ViewHolder> {
     }
 
     class ViewHolder : RecyclerView.ViewHolder {
-        var costGroupName : TextView
-        var costTime : TextView
-        var costName : TextView
-        var costValue : TextView
-        var costDetail : TextView
+        var feeGroupName : TextView
+        var feeTime : TextView
+        var feeNum : TextView
+        var feePrice : TextView
+        var feeName : TextView
+        var feeValue : TextView
+        var feeType : TextView
+        var feeDetail : TextView
 
         constructor(item : View) : super(item) {
-            costGroupName = item.findViewById(R.id.tv_item_cost_group_name)
-            costTime = item.findViewById(R.id.tv_item_cost_time)
-            costName = item.findViewById(R.id.tv_item_cost_name)
-            costValue = item.findViewById(R.id.tv_item_cost_value)
-            costDetail = item.findViewById(R.id.tv_item_cost_detail)
+            feeGroupName = item.findViewById(R.id.tv_item_fee_group_name)
+            feeTime = item.findViewById(R.id.tv_item_fee_time)
+            feeNum = item.findViewById(R.id.tv_item_number)
+            feePrice = item.findViewById(R.id.tv_item_fee_price)
+            feeName = item.findViewById(R.id.tv_item_fee_name)
+            feeValue = item.findViewById(R.id.tv_item_fee_value)
+            feeType = item.findViewById(R.id.tv_item_fee_type)
+            feeDetail = item.findViewById(R.id.tv_item_fee_detail)
         }
     }
 }

+ 83 - 17
android_bed/src/main/h5_3128/res/layout/item_cost_detail2.xml

@@ -3,50 +3,116 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="200dp"
-    android:padding="20dp"
-    android:layout_marginBottom="16dp"
+    android:paddingLeft="20dp"
+    android:paddingRight="20dp"
+    android:layout_marginBottom="10dp"
     android:background="@color/white">
+    <!--费用项组名-->
     <TextView
-        android:id="@+id/tv_item_cost_group_name"
+        android:id="@+id/tv_item_fee_group_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:textSize="24sp"
         android:textColor="@color/main_color"/>
 
+    <!--费用时间-->
     <TextView
-        android:id="@+id/tv_item_cost_time"
+        android:id="@+id/tv_item_fee_time"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
-        android:textSize="22sp"
+        android:textSize="20sp"
         android:textColor="#A4A4A4"/>
 
+    <!--费用名称-->
     <TextView
-        android:id="@+id/tv_item_cost_name"
+        android:id="@+id/tv_item_fee_name"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="12dp"
-        android:layout_below="@id/tv_item_cost_group_name"
-        android:textSize="22sp"
+        android:layout_marginTop="4dp"
+        android:layout_below="@id/tv_item_fee_group_name"
+        android:textSize="20sp"
         android:textColor="@color/black"/>
 
+    <!--用量-->
     <TextView
-        android:id="@+id/tv_item_cost_value"
+        android:id="@+id/tv_item_number"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginTop="12dp"
+        android:layout_marginTop="4dp"
         android:layout_alignParentRight="true"
-        android:layout_below="@id/tv_item_cost_group_name"
-        android:textSize="22sp"
+        android:layout_below="@id/tv_item_fee_group_name"
+        android:textSize="20sp"
         android:textColor="@color/black"/>
 
+    <!--费用单价-->
     <TextView
-        android:id="@+id/tv_item_cost_detail"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_below="@id/tv_item_cost_name"
-        android:layout_marginTop="12dp"
-        android:textSize="22sp"
+        android:layout_marginTop="4dp"
+        android:layout_below="@id/tv_item_fee_name"
+        android:text="@string/fee_price"
+        android:textSize="20sp"
+        android:textColor="@color/black"/>
+
+    <TextView
+        android:id="@+id/tv_item_fee_price"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:layout_alignParentRight="true"
+        android:layout_below="@id/tv_item_fee_name"
+        android:textSize="20sp"
+        android:textColor="@color/black"/>
+
+    <!--费用小计-->
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:layout_below="@id/tv_item_fee_price"
+        android:text="@string/subtotal"
+        android:textSize="20sp"
+        android:textColor="@color/black"/>
+
+    <TextView
+        android:id="@+id/tv_item_fee_value"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:layout_alignParentRight="true"
+        android:layout_below="@id/tv_item_fee_price"
+        android:textSize="20sp"
+        android:textColor="@color/black"/>
+
+    <!--费用类型-->
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:layout_below="@id/tv_item_fee_value"
+        android:text="@string/fee_type"
+        android:textSize="20sp"
+        android:textColor="@color/black"/>
+
+    <TextView
+        android:id="@+id/tv_item_fee_type"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="4dp"
+        android:layout_alignParentRight="true"
+        android:layout_below="@id/tv_item_fee_value"
+        android:textSize="20sp"
+        android:textColor="@color/black"/>
+
+    <!--费用说明-->
+    <TextView
+        android:id="@+id/tv_item_fee_detail"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/tv_item_fee_type"
+        android:layout_marginTop="4dp"
+        android:textSize="20sp"
         android:textColor="#A4A4A4"/>
 
 </RelativeLayout>

+ 16 - 4
middleware/src/main/code/com/wdkl/ncs/android/middleware/model/vo/CustomerFeeConfigVO.java

@@ -2,10 +2,10 @@ package com.wdkl.ncs.android.middleware.model.vo;
 
 import com.wdkl.ncs.android.middleware.model.annotation.Column;
 
-import io.swagger.annotations.ApiModelProperty;
-
 import java.io.Serializable;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * @author
  * @title: CustomerFeeConfigVO
@@ -41,13 +41,17 @@ public class CustomerFeeConfigVO implements Serializable {
      * null
      */
     @Column(name = "fee_value")
-    @ApiModelProperty(value = "具体费用", required = false)
+    @ApiModelProperty(value = "小计", required = false)
     private Double feeValue;
+
+    @Column(name = "fee_price")
+    @ApiModelProperty(value = "单价", required = false)
+    private Double feePrice;
     /**
      * null
      */
     @Column(name = "fee_number")
-    @ApiModelProperty(value = "费用批次", required = false)
+    @ApiModelProperty(value = "用量", required = false)
     private Integer feeNumber;
     /**
      * null
@@ -195,4 +199,12 @@ public class CustomerFeeConfigVO implements Serializable {
     public void setIndex(Integer index) {
         this.index = index;
     }
+
+    public Double getFeePrice() {
+        return feePrice;
+    }
+
+    public void setFeePrice(Double feePrice) {
+        this.feePrice = feePrice;
+    }
 }

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

@@ -97,6 +97,8 @@
     <string name="card_no">Card No. </string>
     <string name="indate">Fecha de entrada: </string>
     <string name="subtotal">Subtotal: </string>
+    <string name="fee_price">Price: </string>
+    <string name="fee_type">Type: </string>
     <string name="cost_detail">Detail: </string>
     <string name="countdown_time">%ds</string>
     <string name="input_password">Introducir contrase?a</string>

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

@@ -94,6 +94,8 @@
     <string name="card_no">Card No. </string>
     <string name="indate">Дата:</string>
     <string name="subtotal">Итого:</string>
+    <string name="fee_price">Price: </string>
+    <string name="fee_type">Type: </string>
     <string name="cost_detail">Detail: </string>
     <string name="countdown_time">%ds</string>
     <string name="input_password">Введите пароль</string>

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

@@ -97,6 +97,8 @@
     <string name="card_no">住院号: </string>
     <string name="indate">入住日期: </string>
     <string name="subtotal">小计: </string>
+    <string name="fee_price">单价: </string>
+    <string name="fee_type">类型: </string>
     <string name="cost_detail">说明: </string>
     <string name="countdown_time">%d秒</string>
     <string name="input_password">请输入密码</string>

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

@@ -97,6 +97,8 @@
     <string name="card_no">Card No. </string>
     <string name="indate">In date: </string>
     <string name="subtotal">Subtotal: </string>
+    <string name="fee_price">Price: </string>
+    <string name="fee_type">Type: </string>
     <string name="cost_detail">Detail: </string>
     <string name="countdown_time">%ds</string>
     <string name="input_password">Input password</string>