| | |
| | | import com.hdl.photovoltaic.enums.LogoutType; |
| | | import com.hdl.photovoltaic.enums.LowerTagType; |
| | | import com.hdl.photovoltaic.enums.PowerStationStatus; |
| | | import com.hdl.photovoltaic.enums.PowerStationType; |
| | | import com.hdl.photovoltaic.enums.ProjectOperation; |
| | | import com.hdl.photovoltaic.enums.ShowErrorMode; |
| | | import com.hdl.photovoltaic.enums.SortType; |
| | |
| | | private String installedCapacityMaxValue = "";//最大组串容量(装机容量) |
| | | private String screeningConditionStatus = DebugStatus.All;//筛选条件状态 |
| | | private String powerStationStatusValue = PowerStationStatus.All;//电站状态(全部 不传该过滤参数,1:正常(运行),2:离线,3:待接入,4:故障) |
| | | private String powerStationTypeValue = PowerStationType.All;//电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | |
| | | private final long pageSize = 100;//一页大小 |
| | | |
| | |
| | | installedCapacityMaxValue = ""; |
| | | screeningConditionStatus = DebugStatus.All; |
| | | powerStationStatusValue = PowerStationStatus.All; |
| | | powerStationTypeValue = PowerStationType.All; |
| | | } |
| | | |
| | | @Override |
| | |
| | | selectedTitleLabelStyle(); |
| | | initializationState(); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | |
| | | } |
| | | }); |
| | |
| | | powerStationStatusValue = PowerStationStatus.All; |
| | | stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //故障 |
| | |
| | | powerStationStatusValue = PowerStationStatus.malfunction; |
| | | stationStatusStyle(viewBinding.faultsLl, viewBinding.faultsDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //离线 |
| | |
| | | powerStationStatusValue = PowerStationStatus.off; |
| | | stationStatusStyle(viewBinding.offlineLl, viewBinding.offlineDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //待接入 |
| | |
| | | powerStationStatusValue = PowerStationStatus.connecting; |
| | | stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | |
| | |
| | | public void onClick(View v) { |
| | | DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity); |
| | | defaultFilteringDialog.show(); |
| | | defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus); |
| | | defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus,powerStationTypeValue); |
| | | defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() { |
| | | @Override |
| | | public void confirm(String min, String max, String state) { |
| | | public void confirm(String min, String max, String state, String powerStationType) { |
| | | installedCapacityMinValue = min;//最小组串容量(装机容量) |
| | | installedCapacityMaxValue = max;//最大组串容量(装机容量) |
| | | screeningConditionStatus = state;//调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | powerStationTypeValue = powerStationType;//电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | } |
| | |
| | | key = SortType.installedCapacitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | } |
| | | }); |
| | | //额定功率筛选 |
| | |
| | | key = SortType.invPowerSort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | } |
| | | }); |
| | | //电站电池容量筛选 |
| | |
| | | key = SortType.batteryCapacitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | } |
| | | }); |
| | | //电站当日发电量筛选 |
| | |
| | | key = SortType.todayElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //设备点击 |
| | |
| | | // MqttRecvClient.getInstance().removeAllTopic(); |
| | | // } |
| | | |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } |
| | | } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) { |
| | | // 取消粘性事件 |
| | |
| | | initializationState(); |
| | | stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } else if (eventBus.getType().equals(ConstantManage.station_page)) { |
| | | // 取消粘性事件 |
| | | EventBus.getDefault().removeStickyEvent(eventBus); |
| | |
| | | stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv); |
| | | } |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } else if (eventBus.getType().equals(ConstantManage.station_edit)) { |
| | | //编辑后更新一下住宅列表 |
| | | //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | |
| | | * 电站状态概览 |
| | | */ |
| | | private void getStatusOverview() { |
| | | HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue, new CloudCallBeak<StatusOverviewBean>() { |
| | | HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue,powerStationTypeValue, new CloudCallBeak<StatusOverviewBean>() { |
| | | @Override |
| | | public void onSuccess(StatusOverviewBean statusOverviewBean) { |
| | | if (statusOverviewBean == null) { |
| | |
| | | * @param installedCapacityMax 最大组串容量(装机容量) |
| | | * @param gridType 调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | * @param powerStationStatus 电站状态 (全部 :"";1 : 正常;2 : 离线; 3 : 待接入;4 : 故障) |
| | | * @param powerStationType 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | * @param pageNo 页码 |
| | | * @param isClear 是否清除数据 |
| | | */ |
| | | private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, long pageNo, boolean isClear) { |
| | | private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, String powerStationType, long pageNo, boolean isClear) { |
| | | isReadData = true; |
| | | if (isClear) { |
| | | clearData(); |
| | |
| | | } |
| | | |
| | | //获取住宅(电站)ID列表 |
| | | HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, powerStationType, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | @Override |
| | | public void onSuccess(HdlResidenceLogic.HouseBeanClass houseBeanClass) { |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | |
| | | // 执行任务(如更新UI、跳转等) |
| | | viewBinding.fragmentHouseSrl.endRefreshing(); |
| | | //加载最新数据完成 |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | getStatusOverview(); |
| | | } |
| | | }.execute(); |
| | |
| | | viewBinding.fragmentHouseSrl.endLoadingMore(); |
| | | if (!isHouseLoadingMore) { |
| | | // 滑动到了底部,执行相应的操作 |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, ++currentHouseListPage, false); |
| | | } |
| | | } |
| | | }.execute(); |