|
@@ -72,6 +72,7 @@ import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
import butterknife.Bind;
|
|
import butterknife.Bind;
|
|
import butterknife.ButterKnife;
|
|
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() {
|
|
private void getRoomData() {
|
|
if (!StringUtils.notEmpty(Constants.URL)) return;
|
|
if (!StringUtils.notEmpty(Constants.URL)) return;
|
|
@@ -1160,6 +1206,9 @@ public class CallingBedFragment extends BaseFragment implements SicknessBedAdapt
|
|
});
|
|
});
|
|
dialog.setView(dialogView);
|
|
dialog.setView(dialogView);
|
|
dialog.show();
|
|
dialog.show();
|
|
|
|
+ if (dialog.getWindow() != null) {
|
|
|
|
+ dialog.getWindow().setBackgroundDrawableResource(R.drawable.dialog_round_bg);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
private void setPatientView(RoomEntity.WardInformation.SickbedInformation bedEntity) {
|
|
private void setPatientView(RoomEntity.WardInformation.SickbedInformation bedEntity) {
|