wjc
18 小时以前 0287b5d20f7d57f5352248175733b99d5a99959b
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageInfoActivity.java
@@ -95,24 +95,40 @@
                        if (TextUtils.isEmpty(mMessageBean.getTitle())) {
                            viewBinding.messageInfoEventTitleIn.getRoot().setVisibility(View.GONE);
                        } else {
                            viewBinding.messageInfoEventTitleIn.getRoot().setVisibility(View.VISIBLE);
                        }
                        if (TextUtils.isEmpty(mMessageBean.getDescription())) {
                            viewBinding.messageInfoEventContentIn.getRoot().setVisibility(View.GONE);
                        } else {
                            viewBinding.messageInfoEventContentIn.getRoot().setVisibility(View.VISIBLE);
                        }
                        if (TextUtils.isEmpty(mMessageBean.getRemark())) {
                            viewBinding.messageInfoRemarkIn.getRoot().setVisibility(View.GONE);
                        } else {
                            viewBinding.messageInfoRemarkIn.getRoot().setVisibility(View.VISIBLE);
                        }
                        if (TextUtils.isEmpty(mMessageBean.getDeviceDesc())) {
                            viewBinding.messageInfoAlarmDeviceIn.getRoot().setVisibility(View.GONE);
                        } else {
                            viewBinding.messageInfoAlarmDeviceIn.getRoot().setVisibility(View.VISIBLE);
                        }
                        if (TextUtils.isEmpty(mMessageBean.getLocationAddress())) {
                            viewBinding.messageInfoPowerStationLocationIn.getRoot().setVisibility(View.GONE);
                        } else {
                            viewBinding.messageInfoPowerStationLocationIn.getRoot().setVisibility(View.VISIBLE);
                        }
                        if (UserConfigManage.getInstance().isBAccount()) {
                        if (TextUtils.isEmpty(mMessageBean.getPlan())) {
                            viewBinding.messageInfoAlarmTreatmentOptionsIn.getRoot().setVisibility(View.GONE);
                            } else {
                                viewBinding.messageInfoAlarmTreatmentOptionsIn.getRoot().setVisibility(View.VISIBLE);
                        }
                        if (!TextUtils.isEmpty(mMessageBean.getPlan())) {
                        } else {
                            //C端隐藏
                            viewBinding.messageInfoAlarmTreatmentOptionsIn.getRoot().setVisibility(View.GONE);
                        }
                        if (!TextUtils.isEmpty(mMessageBean.getPlan()) && UserConfigManage.getInstance().isBAccount()) {
                            viewBinding.messageInfoAlarmTreatmentOptionsIn.lineV.setVisibility(View.GONE);
                        } else if (!TextUtils.isEmpty(mMessageBean.getCreateTime().toString())) {
                            viewBinding.messageInfoAlarmTimeIn.lineV.setVisibility(View.GONE);
@@ -131,14 +147,18 @@
                        if (mMessageBean.getStatus().equals(MessageStateType.processed)) {
                            //已经解决掉的隐藏
                            viewBinding.messageInfoBackTv.setVisibility(View.GONE);
                            viewBinding.messageInfoSolveTv.setVisibility(View.GONE);
                            viewBinding.messageInfoWorkOut.setVisibility(View.GONE);
//                            viewBinding.messageInfoBackTv.setVisibility(View.GONE);
//                            viewBinding.messageInfoSolveTv.setVisibility(View.GONE);
                        } else {
                            if (mMessageBean.getType().equals(MessageAlarmStateType.fault)) {
                                return;
                                //发生中的消息且是故障才要显示
                                viewBinding.messageInfoWorkOut.setVisibility(View.VISIBLE);
                            } else {
                                viewBinding.messageInfoWorkOut.setVisibility(View.GONE);
                            }
                            viewBinding.messageInfoBackTv.setVisibility(View.GONE);
                            viewBinding.messageInfoSolveTv.setVisibility(View.GONE);
//                            viewBinding.messageInfoBackTv.setVisibility(View.GONE);
//                            viewBinding.messageInfoSolveTv.setVisibility(View.GONE);
                        }
                    }
                });
@@ -245,7 +265,6 @@
    private void initView() {
        viewBinding.toolbarTopRl.topTitleTv.setText(R.string.event_details);
        viewBinding.toolbarTopRl.topBackLl.setVisibility(View.VISIBLE);
@@ -257,7 +276,7 @@
        viewBinding.messageInfoPowerStationLocationIn.leftTitleTv.setText(R.string.message_alarm_detailspower_station_location);
        viewBinding.messageInfoAlarmTimeIn.leftTitleTv.setText(R.string.event_time);
        viewBinding.messageInfoAlarmTreatmentOptionsIn.leftTitleTv.setText(R.string.treatment_options);
        try {
        viewBinding.messageInfoHomeNameTv.setText(mMessageBean.getHomeName());
        viewBinding.messageInfoEventTitleIn.rightContentTv.setText(mMessageBean.getTitle());
        viewBinding.messageInfoEventContentIn.rightContentTv.setText(mMessageBean.getDescription());
@@ -273,13 +292,15 @@
        if (mMessageBean.getStatus().equals(MessageStateType.untreated) && mMessageBean.getType().equals(MessageAlarmStateType.fault)) {
            //发生中的消息且是故障才要显示
            viewBinding.messageInfoWorkOut.setVisibility(View.VISIBLE);
            } else {
                viewBinding.messageInfoWorkOut.setVisibility(View.GONE);
        }
        if (UserConfigManage.getInstance().isBAccount()) {
            viewBinding.messageInfoAlarmTreatmentOptionsIn.getRoot().setVisibility(View.VISIBLE);
//            viewBinding.messageInfoAlarmTreatmentOptionsIn.lineV.setVisibility(View.GONE);
        } else {
//            viewBinding.messageInfoAlarmTimeIn.lineV.setVisibility(View.GONE);
                viewBinding.messageInfoAlarmTreatmentOptionsIn.getRoot().setVisibility(View.GONE);
        }
        if (TextUtils.isEmpty(mMessageBean.getTitle())) {
@@ -300,21 +321,23 @@
        if (TextUtils.isEmpty(mMessageBean.getPlan())) {
            viewBinding.messageInfoAlarmTreatmentOptionsIn.getRoot().setVisibility(View.GONE);
        }
        if (!TextUtils.isEmpty(mMessageBean.getPlan())) {
            viewBinding.messageInfoAlarmTreatmentOptionsIn.lineV.setVisibility(View.GONE);
        } else if (!TextUtils.isEmpty(mMessageBean.getCreateTime().toString())) {
            viewBinding.messageInfoAlarmTimeIn.lineV.setVisibility(View.GONE);
        } else if (!TextUtils.isEmpty(mMessageBean.getLocationAddress())) {
            viewBinding.messageInfoPowerStationLocationIn.lineV.setVisibility(View.GONE);
        } else if (!TextUtils.isEmpty(mMessageBean.getDeviceDesc())) {
            viewBinding.messageInfoAlarmDeviceIn.lineV.setVisibility(View.GONE);
        } else if (!TextUtils.isEmpty(mMessageBean.getRemark())) {
            viewBinding.messageInfoRemarkIn.lineV.setVisibility(View.GONE);
        } else if (!TextUtils.isEmpty(mMessageBean.getDescription())) {
            viewBinding.messageInfoEventContentIn.lineV.setVisibility(View.GONE);
        } else if (!TextUtils.isEmpty(mMessageBean.getTitle())) {
            viewBinding.messageInfoEventTitleIn.lineV.setVisibility(View.GONE);
//
//        if (!TextUtils.isEmpty(mMessageBean.getPlan())) {
//            viewBinding.messageInfoAlarmTreatmentOptionsIn.lineV.setVisibility(View.GONE);
//        } else if (!TextUtils.isEmpty(mMessageBean.getCreateTime().toString())) {
//            viewBinding.messageInfoAlarmTimeIn.lineV.setVisibility(View.GONE);
//        } else if (!TextUtils.isEmpty(mMessageBean.getLocationAddress())) {
//            viewBinding.messageInfoPowerStationLocationIn.lineV.setVisibility(View.GONE);
//        } else if (!TextUtils.isEmpty(mMessageBean.getDeviceDesc())) {
//            viewBinding.messageInfoAlarmDeviceIn.lineV.setVisibility(View.GONE);
//        } else if (!TextUtils.isEmpty(mMessageBean.getRemark())) {
//            viewBinding.messageInfoRemarkIn.lineV.setVisibility(View.GONE);
//        } else if (!TextUtils.isEmpty(mMessageBean.getDescription())) {
//            viewBinding.messageInfoEventContentIn.lineV.setVisibility(View.GONE);
//        } else if (!TextUtils.isEmpty(mMessageBean.getTitle())) {
//            viewBinding.messageInfoEventTitleIn.lineV.setVisibility(View.GONE);
//        }
        } catch (Exception e) {
        }
    }