| | |
| | | import com.hdl.photovoltaic.ui.home.aachart.BasicChartComposer; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.photovoltaic.utils.TimeUtils; |
| | | import com.hdl.photovoltaic.widget.FlashingBoxDialog; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | |
| | | import org.greenrobot.eventbus.EventBus; |
| | |
| | | Calendar calendar = TimeUtils.stringToCalendar(currDate, timeDateFormat); |
| | | String time = TimeUtils.addDayMonthYearToDate(calendar, 1, timeDateFormat, timeType); |
| | | if (TimeUtils.stringDateToTimestamp(time, timeDateFormat) > TimeUtils.getCurrentTimestamp()) { |
| | | HdlThreadLogic.toast(_mActivity, getString(R.string.the_query_date_is_exceeded)); |
| | | FlashingBoxDialog flashingBoxDialog = new FlashingBoxDialog(_mActivity, 1500); |
| | | flashingBoxDialog.setContent(getString(R.string.the_query_date_is_exceeded)); |
| | | flashingBoxDialog.show(); |
| | | |
| | | return; |
| | | } |
| | |
| | | if (dataOverBean == null) { |
| | | return; |
| | | } |
| | | viewBinding.infoRl1Text1Tv.setText(HdlCommonLogic.getConvertDoubleUnit(dataOverBean.getInstalledCapacity())); |
| | | viewBinding.infoRl1Text3Tv.setText(HdlCommonLogic.getConvertDoubleUnit(dataOverBean.getPower(), UnitType.kW, false)); |
| | | String capacityValue = HdlCommonLogic.getBigDecimal(dataOverBean.getInstalledCapacity()).toString(); |
| | | viewBinding.infoRl1Text1Tv.setText(capacityValue); |
| | | viewBinding.infoRl1Text3Tv.setText(HdlCommonLogic.convertDoubleValue(dataOverBean.getPower())); |
| | | |
| | | // String str = dataOverBean.getPowerRatio() + "%"; |
| | | // int startIndex = str.lastIndexOf("%"); |
| | |
| | | } catch (Exception ignored) { |
| | | } |
| | | |
| | | viewBinding.day.setText(HdlCommonLogic.getConvertDoubleUnit(dataOverBean.getTodayElectricity())); |
| | | viewBinding.month.setText(HdlCommonLogic.getConvertDoubleUnit(dataOverBean.getMonthElectricity())); |
| | | viewBinding.year.setText(HdlCommonLogic.getConvertDoubleUnit(dataOverBean.getYearElectricity(), UnitType.kW)); |
| | | viewBinding.Total.setText(HdlCommonLogic.getConvertDoubleUnit(dataOverBean.getTotalElectricity(), UnitType.kW)); |
| | | 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)); |
| | | |
| | | } |
| | | }); |