| | |
| | | import com.hdl.photovoltaic.databinding.FragmentHouseListBinding; |
| | | import com.hdl.photovoltaic.base.CustomBaseFragment; |
| | | import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; |
| | | import com.hdl.photovoltaic.enums.PowerStationStatus; |
| | | import com.hdl.photovoltaic.enums.ShowErrorMode; |
| | | import com.hdl.photovoltaic.enums.SortType; |
| | | import com.hdl.photovoltaic.enums.SortValue; |
| | |
| | | private String installedCapacityMinValue = "";//最小组串容量(装机容量) |
| | | private String installedCapacityMaxValue = "";//最大组串容量(装机容量) |
| | | private String gridTypeValue = "";//并网状态(全部 不传该过滤参数,FULL_GRID:并网,OFFLINE:离网) |
| | | private String powerStationStatusValue = "";//电站状态(全部 不传该过滤参数,1:正常(运行),2:离线,3:待接入,4:故障) |
| | | private String powerStationStatusValue = PowerStationStatus.All;//电站状态(全部 不传该过滤参数,1:正常(运行),2:离线,3:待接入,4:故障) |
| | | |
| | | private final long pageSize = 20;//页数 |
| | | |
| | |
| | | viewBinding.powerStationAllIl.parentLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | powerStationStatusValue = PowerStationStatus.All; |
| | | selectedStationStyle(viewBinding.powerStationAllIl.parentLl, viewBinding.powerStationAllIl.stationTotalTv, viewBinding.powerStationAllIl.stationTitleTv, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | |
| | | viewBinding.powerStationFaultsIl.parentLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | powerStationStatusValue = PowerStationStatus.malfunction; |
| | | selectedStationStyle(viewBinding.powerStationFaultsIl.parentLl, viewBinding.powerStationFaultsIl.stationTotalTv, viewBinding.powerStationFaultsIl.stationTitleTv, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | |
| | | viewBinding.hpowerStationOfflineIl.parentLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | powerStationStatusValue = PowerStationStatus.off; |
| | | selectedStationStyle(viewBinding.hpowerStationOfflineIl.parentLl, viewBinding.hpowerStationOfflineIl.stationTotalTv, viewBinding.hpowerStationOfflineIl.stationTitleTv, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | |
| | | viewBinding.powerStationConnectedIl.parentLl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | powerStationStatusValue = PowerStationStatus.connecting; |
| | | selectedStationStyle(viewBinding.powerStationConnectedIl.parentLl, viewBinding.powerStationConnectedIl.stationTotalTv, viewBinding.powerStationConnectedIl.stationTitleTv, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | |
| | | viewBinding.stationNameIv.setSelected(isSelected); |
| | | key = SortType.homeNameSort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | | //电站发电功率筛选 |
| | |
| | | viewBinding.stationPowerIv.setSelected(isSelected); |
| | | key = SortType.powerSort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | | //电站当日发电量筛选 |
| | |
| | | viewBinding.stationDayIv.setSelected(isSelected); |
| | | key = SortType.todayElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | | //电站当月发电量筛选 |
| | |
| | | viewBinding.stationMonthIv.setSelected(isSelected); |
| | | key = SortType.monthElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | } |
| | | }); |
| | | //设备点击 |