Bläddra i källkod

<修改房间床位界面>

weizhengliang 5 år sedan
förälder
incheckning
240a240f40

+ 11 - 1
app/src/main/java/com/wdkl/callingmainnurse/entity/NurseHostListInfo.java

@@ -12,6 +12,7 @@ public class NurseHostListInfo {
 
     /**
      * id : 5
+     * partId : 1
      * deviceName : 护士主机2
      * deviceStatus : 1
      * deviceSipIp : 192.168.1.11
@@ -32,7 +33,8 @@ public class NurseHostListInfo {
      */
 
     private String id;
-    private String deviceName;
+    private String partId;  //科室id
+    private String deviceName;  //科室名称
     private String deviceStatus;
     private String deviceSipIp;
     private String deviceSipId;
@@ -59,6 +61,14 @@ public class NurseHostListInfo {
         this.id = id;
     }
 
+    public String getPartId() {
+        return partId == null ? "0" : partId;
+    }
+
+    public void setPartId(String partId) {
+        this.partId = partId;
+    }
+
     public String getDeviceName() {
         return deviceName == null ? "暂无" : deviceName;
     }

+ 49 - 0
app/src/main/java/com/wdkl/callingmainnurse/ui/fragment/CallingBedFragment.java

@@ -72,6 +72,7 @@ import org.json.JSONException;
 import org.json.JSONObject;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import butterknife.Bind;
 import butterknife.ButterKnife;
@@ -675,6 +676,51 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
 
     }
 
+    private void getRoomTestData() {
+        if (swipeRefreshLayout.isRefreshing()) {
+            swipeRefreshLayout.setRefreshing(false);
+        }
+        RoomEntity entity = new RoomEntity();
+        ArrayList<RoomEntity.WardInformation> wardInformations = new ArrayList<>();
+        for (int i = 0; i < 50; i++) {
+            ArrayList<RoomEntity.WardInformation.SickbedInformation> sickbedInformations = new ArrayList<>();
+            RoomEntity.WardInformation wardInfo = new RoomEntity.WardInformation();
+            wardInfo.setRoomNum("" + i);
+            for (int j = 0; j < 5; j++) {
+                RoomEntity.WardInformation.SickbedInformation sickBedInfo = new RoomEntity.WardInformation.SickbedInformation();
+                int bedNum = i*5 + j;
+                sickBedInfo.setBedNum("" + bedNum);
+                sickBedInfo.setPatientName("" + bedNum);
+                sickbedInformations.add(sickBedInfo);
+            }
+            wardInfo.setSickbedInformationList(sickbedInformations);
+            wardInformations.add(wardInfo);
+        }
+        entity.setWardInformationList(wardInformations);
+        wardInformationList = entity.getWardInformationList();
+
+        roomAdapter.updateList(wardInformationList);
+        if (null != wardInformationList && CallingBedFragment.this.position != -1) {
+            try {
+                sickbedInformationList = wardInformationList.get(CallingBedFragment.this.position).getSickbedInformationList();
+            } catch (Exception e) {
+                LogUtil.d("getRoomData", "position越界");
+            }
+        }
+        if (CallingBedFragment.this.position != -1 && null != sickbedInformationList) {
+            if (sickbedInformationList.size() > 0) {
+                for (int i = 0; i < sickbedInformationList.size(); i++) {
+                    if ("1".equals(wardInformationList.get(CallingBedFragment.this.position).getTrusteeshipState())) {
+                        sickbedInformationList.get(i).setTrusteeshipState("1");
+                    } else {
+                        sickbedInformationList.get(i).setTrusteeshipState("0");
+                    }
+                }
+            }
+            bedAdapter.listUpdate(sickbedInformationList);
+        }
+    }
+
 
     private void getRoomData() {
         if (!StringUtils.notEmpty(Constants.URL)) return;
@@ -1160,6 +1206,9 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
         });
         dialog.setView(dialogView);
         dialog.show();
+        if (dialog.getWindow() != null) {
+            dialog.getWindow().setBackgroundDrawableResource(R.drawable.dialog_round_bg);
+        }
     }
 
     private void setPatientView(RoomEntity.WardInformation.SickbedInformation bedEntity) {

+ 6 - 0
app/src/main/res/drawable/dialog_round_bg.xml

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

+ 6 - 0
app/src/main/res/drawable/part_title_corner_bg.xml

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

+ 2 - 1
app/src/main/res/layout/activity_main_sideslip_popu_window.xml

@@ -179,7 +179,8 @@
             android:layout_height="0dp"
             android:layout_weight="1"
             android:gravity="center"
-            android:orientation="vertical">
+            android:orientation="vertical"
+            android:visibility="gone">
 
             <ImageView
                 android:id="@+id/activity_main_layout_iv_system_setting"

+ 3 - 1
app/src/main/res/layout/custom_spinner_dropdown_item.xml

@@ -3,6 +3,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:id="@+id/my_dropdown_item"
+    android:gravity="center"
     android:singleLine="true"
     android:ellipsize="marquee"
-    android:textSize="24sp"/>
+    android:textSize="28sp"
+    android:textColor="@color/call_sickbed_lift_bg_color"/>

+ 3 - 1
app/src/main/res/layout/custom_spinner_item.xml

@@ -3,7 +3,9 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:id="@+id/my_spinner_item"
+    android:gravity="center"
     android:singleLine="true"
     android:ellipsize="marquee"
     android:textAlignment="inherit"
-    android:textSize="24sp"/>
+    android:textSize="28sp"
+    android:textColor="@color/call_sickbed_lift_bg_color"/>

+ 9 - 8
app/src/main/res/layout/dialog_part_select_layout.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:padding="10dp"
@@ -9,22 +8,21 @@
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_gravity="center"
         android:text="请选择科室"
-        android:textSize="28sp"
-        android:textColor="@color/black"/>
+        android:textSize="24sp" />
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="20dp"
+        android:layout_marginTop="80dp"
         android:padding="10dp">
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="16dp"
             android:text="科室名称:"
-            android:textSize="24sp" />
+            android:textSize="28sp"
+            android:textColor="@color/black"/>
 
         <Spinner
             android:id="@+id/sp_part_select"
@@ -40,8 +38,11 @@
         android:id="@+id/btn_ok"
         android:layout_width="200dp"
         android:layout_height="wrap_content"
-        android:layout_marginTop="20dp"
+        android:layout_marginTop="80dp"
+        android:layout_marginBottom="20dp"
         android:layout_gravity="center"
+        android:background="@color/call_sickbed_room_bg_color"
         android:text="确定"
-        android:textSize="24sp"/>
+        android:textSize="24sp"
+        android:textColor="@color/white"/>
 </LinearLayout>

+ 6 - 2
app/src/main/res/layout/fragment_calling_sick_bed.xml

@@ -19,11 +19,15 @@
             android:id="@+id/tv_part_title"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:padding="4dp"
+            android:background="@drawable/part_title_corner_bg"
+            android:paddingLeft="20dp"
+            android:paddingRight="20dp"
             android:layout_centerHorizontal="true"
             android:layout_alignParentTop="true"
             android:textSize="24sp"
-            android:text="当前科室: " />
+            android:text="当前科室: "
+            android:textColor="@color/yellow_color"
+            android:textStyle="bold"/>
 
         <android.support.v4.widget.SwipeRefreshLayout
             android:id="@+id/fragment_calling_bed_layout_sr_refresh"

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

@@ -54,6 +54,7 @@
         <color name="gray_deep">#5c5c5c</color>
         <color name="alpha_gray">#CC646464</color>
         <color name="theme_gray">#646464</color>
+        <color name="alpha_gray2">#CC646464</color>
 
         <!--食安卫士信息-->
         <color name="saws_tel_btn_color">#ffac51</color>