| | |
| | | package com.hdl.photovoltaic.ui.powerstation; |
| | | |
| | | import android.Manifest; |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | import android.content.DialogInterface; |
| | | import android.content.Intent; |
| | | import android.content.pm.PackageManager; |
| | | import android.location.LocationManager; |
| | | import android.os.AsyncTask; |
| | | import android.os.Bundle; |
| | | import android.os.SystemClock; |
| | | import android.provider.Settings; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.view.View; |
| | | import android.view.Window; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.RelativeLayout; |
| | |
| | | import com.hdl.photovoltaic.other.HdlDeviceLogic; |
| | | import com.hdl.photovoltaic.other.HdlDialogLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | | import com.hdl.photovoltaic.other.HdlOtaLogic; |
| | | import com.hdl.photovoltaic.other.HdlResidenceLogic; |
| | | import com.hdl.photovoltaic.other.HdlThreadLogic; |
| | | import com.hdl.photovoltaic.other.HdlUniLogic; |
| | |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.GPSManagerUtils; |
| | | import com.hdl.photovoltaic.utils.PermissionUtils; |
| | | import com.hdl.photovoltaic.utils.ProcessManagerUtils; |
| | | import com.hdl.photovoltaic.utils.URLEncodingUtils; |
| | | import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; |
| | | import com.hdl.photovoltaic.widget.DefaultFilteringDialog; |
| | |
| | | installedCapacityMinValue = min;//最小组串容量(装机容量) |
| | | installedCapacityMaxValue = max;//最大组串容量(装机容量) |
| | | screeningConditionStatus = state;//调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | |
| | | |
| | | } |
| | | }); |
| | | // //电站编辑按钮 |
| | | // viewBinding.editIv.setOnClickListener(new View.OnClickListener() { |
| | | // @Override |
| | | // public void onClick(View v) { |
| | | // startActivity(HouseListEditActivity.class); |
| | | // } |
| | | // }); |
| | | //电站名称筛选 |
| | | //PV筛选 |
| | | viewBinding.stationNameRl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | screeningConditionStyle(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected); |
| | | key = SortType.installedCapacitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | | //电站发电功率筛选 |
| | | //额定功率筛选 |
| | | viewBinding.stationPowerRl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | screeningConditionStyle(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected); |
| | | key = SortType.todayElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | | //电站电池容量筛选 |
| | | viewBinding.stationMonthRl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | boolean isSelected = !v.isSelected(); |
| | | screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected); |
| | | key = SortType.batteryCapacitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | |
| | | // if (MqttRecvClient.getInstance() != null) { |
| | | // MqttRecvClient.getInstance().removeAllTopic(); |
| | | // } |
| | | |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | } |
| | | } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) { |
| | |
| | | if (isRefreshing) { |
| | | hideLoading(); |
| | | } |
| | | |
| | | HdlThreadLogic.toast(_mActivity, e.getMsg() + "(" + e.getCode() + ")"); |
| | | } |
| | | }, _mActivity, ShowErrorMode.YES); |
| | | } |
| | |
| | | if (isRefreshing) { |
| | | hideLoading(); |
| | | } |
| | | HdlThreadLogic.toast(_mActivity, e.getMsg() + "(" + e.getCode() + ")"); |
| | | } |
| | | }, _mActivity, ShowErrorMode.YES); |
| | | } |