| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | HdlCommonLogic.getInstance().postEventBusSticky(ConstantManage.homepage_title_tab_switch, ConstantManage.station_page, PowerStationStatus.All); |
| | | |
| | | } |
| | | }); |
| | | //故障 |
| | |
| | | if (dataOverBean == null) { |
| | | return; |
| | | } |
| | | String capacityValue = HdlCommonLogic.divideByOneThousandAndFormat(dataOverBean.getInstalledCapacity()).toString(); |
| | | String capacityValue = HdlCommonLogic.convertDoubleValue(dataOverBean.getInstalledCapacity(), UnitType.kWp); |
| | | viewBinding.infoRl1Text1Tv.setText(capacityValue); |
| | | viewBinding.kwpUnit.setText(HdlCommonLogic.convertKWPUnit(dataOverBean.getInstalledCapacity())); |
| | | viewBinding.infoRl1Text3Tv.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getPower())); |
| | | viewBinding.infoRl1Text3Tv.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getPower(), UnitType.kW)); |
| | | viewBinding.kwUnit.setText(HdlCommonLogic.convertKWUnit(dataOverBean.getPower())); |
| | | |
| | | // String str = dataOverBean.getPowerRatio() + "%"; |
| | | // int startIndex = str.lastIndexOf("%"); |
| | |
| | | } catch (Exception ignored) { |
| | | } |
| | | |
| | | viewBinding.day.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getTodayElectricity())); |
| | | viewBinding.dayUnit.setText(HdlCommonLogic.convertUnit(dataOverBean.getTodayElectricity(), UnitType.kWh)); |
| | | viewBinding.month.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getMonthElectricity())); |
| | | viewBinding.monthUnit.setText(HdlCommonLogic.convertUnit(dataOverBean.getMonthElectricity(), UnitType.kWh)); |
| | | viewBinding.year.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getYearElectricity())); |
| | | viewBinding.yearUnit.setText(HdlCommonLogic.convertUnit(dataOverBean.getYearElectricity(), UnitType.kWh)); |
| | | viewBinding.Total.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getTotalElectricity())); |
| | | viewBinding.TotalUnit.setText(HdlCommonLogic.convertUnit(dataOverBean.getTotalElectricity(), UnitType.kWh)); |
| | | viewBinding.day.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getTodayElectricity(), UnitType.kWh)); |
| | | viewBinding.dayUnit.setText(HdlCommonLogic.convertKWHUnit(dataOverBean.getTodayElectricity())); |
| | | viewBinding.month.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getMonthElectricity(), UnitType.kWh)); |
| | | viewBinding.monthUnit.setText(HdlCommonLogic.convertKWHUnit(dataOverBean.getMonthElectricity())); |
| | | viewBinding.year.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getYearElectricity(), UnitType.kWh)); |
| | | viewBinding.yearUnit.setText(HdlCommonLogic.convertKWHUnit(dataOverBean.getYearElectricity())); |
| | | viewBinding.Total.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getTotalElectricity(), UnitType.kWh)); |
| | | viewBinding.TotalUnit.setText(HdlCommonLogic.convertKWHUnit(dataOverBean.getTotalElectricity())); |
| | | |
| | | } |
| | | }); |
| | |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if (list == null || list.size() == 0) { |
| | | if (list == null || list.isEmpty()) { |
| | | return; |
| | | } |
| | | String[] keys = new String[list.size()]; |
| | | Object[] values = new Object[list.size()]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | keys[i] = list.get(i).getFieldName(); |
| | | StatisticsBean statisticsBean = list.get(i); |
| | | keys[i] = statisticsBean.getFieldName(); |
| | | if (TimeType.day.equals(timeType)) { |
| | | values[i] = HdlCommonLogic.convertBigDecimal(list.get(i).getFieldValue(), 1000);// HdlCommonLogic.getBigDecimal(list.get(i).getFieldValue()).intValue();//获取整数部分 |
| | | if (statisticsBean.isFuture()) { |
| | | //未来时间不显示 |
| | | values[i] = null; |
| | | } else { |
| | | values[i] = HdlCommonLogic.convertBigDecimal(statisticsBean.getFieldValue(), 1000);// HdlCommonLogic.getBigDecimal(list.get(i).getFieldValue()).intValue();//获取整数部分 |
| | | } |
| | | } else { |
| | | values[i] = HdlCommonLogic.getBigDecimal(list.get(i).getFieldValue()); |
| | | if (statisticsBean.isFuture()) { |
| | | //未来时间不显示 |
| | | values[i] = null; |
| | | } else { |
| | | values[i] = HdlCommonLogic.getBigDecimal(statisticsBean.getFieldValue()); |
| | | } |
| | | } |
| | | } |
| | | fieldNames = keys; |