| | |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.databinding.ActivityPowerStationsListBinding; |
| | | import com.hdl.photovoltaic.enums.ShowErrorMode; |
| | | import com.hdl.photovoltaic.internet.HttpClient; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlCommonLogic; |
| | | import com.hdl.photovoltaic.other.HdlResidenceLogic; |
| | | import com.hdl.photovoltaic.other.HdlThreadLogic; |
| | | import com.hdl.photovoltaic.other.HdlUniLogic; |
| | | import com.hdl.photovoltaic.ui.bean.HouseIdBean; |
| | | import com.hdl.photovoltaic.ui.device.FastScanActivity; |
| | | import com.hdl.photovoltaic.ui.newC.adapter.HouseListAdapter; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | | import org.greenrobot.eventbus.Subscribe; |
| | | import org.greenrobot.eventbus.ThreadMode; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | viewBinding.addPowerStationTv.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_DEVICESCAN + "?scanType=addPowerStation"; |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | // String path = HDLUniMP.UNI_EVENT_OPEN_DEVICESCAN + "?scanType=addPowerStation"; |
| | | // HdlUniLogic.getInstance().openUniMP(path, null); |
| | | startActivity(FastScanActivity.class); |
| | | |
| | | } |
| | | }); |
| | | |
| | |
| | | HdlCommonLogic.getInstance().nullDataUpdateUi(_mActivity, viewBinding.nullDataIc.getRoot(), viewBinding.nullDataIc.nullDataGifAnimationIv, viewBinding.nullDataIc.nullDataTv, getString(R.string.my_power_station_data_null), list != null && list.size() > 0); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 二次确认提示框 |
| | | * |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 收到EventBUs通知 |
| | | * |
| | | * @param eventBus 数据 |
| | | */ |
| | | @Subscribe(threadMode = ThreadMode.MAIN) |
| | | public void onEventMessage(BaseEventBus eventBus) { |
| | | super.onEventMessage(eventBus); |
| | | if (HDLUniMP.UNI_EVENT_REPLY_HOME_ADD.equals(eventBus.getTopic())) { |
| | | if (HDLUniMP.UNI_EVENT_REPLY_HOME_ADD.equals(eventBus.getType())) { |
| | | // // 取消粘性事件 |
| | | // EventBus.getDefault().removeStickyEvent(eventBus); |
| | | HttpClient.getInstance().requestHttpGet(eventBus.getData().toString(), new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String obj) { |
| | | downReadData(true); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |