| | |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.enums.Languages; |
| | | import com.hdl.photovoltaic.enums.TimeType; |
| | | import com.hdl.photovoltaic.internet.HttpClient; |
| | | import com.hdl.photovoltaic.internet.api.HttpApi; |
| | |
| | | public void getStatistics(String type, String time, CloudCallBeak<List<StatisticsBean>> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_Home_page_statistics; |
| | | JsonObject json = new JsonObject(); |
| | | json.addProperty("dataType", "GE");//发电量(GE : 发电量 ;POWER : 发电功率) |
| | | if (TimeType.day.equals(type)) { |
| | | json.addProperty("dataType", "POWER");//发电量(GE : 发电量 ;POWER : 发电功率) |
| | | } else { |
| | | json.addProperty("dataType", "GE");//发电量(GE : 发电量 ;POWER : 发电功率) |
| | | } |
| | | json.addProperty("type", type);//类型 |
| | | if (!TextUtils.isEmpty(time)) { |
| | | if (!UserConfigManage.getInstance().isZh()) { |
| | | if (!UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh)) { |
| | | //英文的时候需要日期格式 |
| | | if (TimeType.day.equals(type)) { |
| | | String[] ary = time.split("/"); |