| | |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.photovoltaic.config.AppConfigManage; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.enums.PowerStationType; |
| | | import com.hdl.photovoltaic.enums.ProjectOperation; |
| | | import com.hdl.photovoltaic.internet.HttpClient; |
| | | import com.hdl.photovoltaic.internet.api.HttpApi; |
| | |
| | | import com.hdl.photovoltaic.ui.bean.HouseInfoBean; |
| | | import com.hdl.photovoltaic.ui.bean.HouseIdBean; |
| | | import com.hdl.photovoltaic.ui.bean.StatusOverviewBean; |
| | | import com.hdl.photovoltaic.uni.HDLUniMP; |
| | | import com.hdl.sdk.link.core.config.HDLLinkConfig; |
| | | import com.hdl.sdk.link.core.utils.mqtt.MqttRecvClient; |
| | | |
| | |
| | | * @param installedCapacityMax 最大组串容量(装机容量) |
| | | * @param debugStatus 调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | * @param powerStationStatus 电站状态 (全部 :"";1 : 正常;2 : 离线; 3 : 待接入;4 : 故障) |
| | | * @param powerStationType 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | * @param pageNo 页码 |
| | | * @param pageSize 页数(一页多少数据) |
| | | */ |
| | | public void getResidenceIdList(String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String debugStatus, String powerStationStatus, long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) { |
| | | public void getResidenceIdList(String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String debugStatus, String powerStationStatus, String powerStationType, long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) { |
| | | |
| | | String requestUrl = HttpApi.POST_PowerStation_List; |
| | | JsonObject json = new JsonObject(); |
| | |
| | | try { |
| | | int value = Integer.parseInt(powerStationStatus); |
| | | json.addProperty("powerStationStatus", value); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | | if (!TextUtils.isEmpty(powerStationType)) { |
| | | try { |
| | | json.addProperty("powerStationType", powerStationType); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | |
| | | * @param debugStatus (调试状态:Debugging = 调试中,WAIT_DELIVERED = 调试完成,Delivered = 已交付,SECONDARY_DEBUGGIN = 授权调试) |
| | | * @param installedCapacityMin 最小组串容量(装机容量) |
| | | * @param installedCapacityMax 最大组串容量(装机容量) |
| | | * @param powerStationType 电站类型(逆变器,BMS) |
| | | */ |
| | | public void getStatusOverview(String debugStatus, String installedCapacityMin, String installedCapacityMax, CloudCallBeak<StatusOverviewBean> cloudCallBeak) { |
| | | public void getStatusOverview(String debugStatus, String installedCapacityMin, String installedCapacityMax, String powerStationType, CloudCallBeak<StatusOverviewBean> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_statusOverview; |
| | | JsonObject json = new JsonObject(); |
| | | if (!TextUtils.isEmpty(installedCapacityMin)) { |
| | |
| | | } |
| | | if (!TextUtils.isEmpty(debugStatus)) { |
| | | json.addProperty("debugStatus", debugStatus); |
| | | } |
| | | |
| | | if (!TextUtils.isEmpty(powerStationType)) { |
| | | json.addProperty("powerStationType", powerStationType); |
| | | } |
| | | |
| | | |
| | |
| | | // HdlFileLogic.getInstance().deleteDirectory(HdlFileLogic.getInstance().getCurrentHomeRootPath()); |
| | | //重新设置住宅id |
| | | UserConfigManage.getInstance().setHomeId(houseIdBean.getHomeId()); |
| | | UserConfigManage.getInstance().setPowerStationType(houseIdBean.getPowerStationType()); |
| | | UserConfigManage.getInstance().setHomeName(houseIdBean.getHomeName()); |
| | | //重新设置本地通讯秘钥 |
| | | UserConfigManage.getInstance().setLocalSecret(houseIdBean.getLocalSecret()); |
| | |
| | | HdlDeviceLogic.getInstance().searchCurrentHomeGateway(houseIdBean.getHomeId(), null); |
| | | } |
| | | |
| | | /** |
| | | * 打开电站详情(uni界面) |
| | | * |
| | | * @param houseIdBean 住宅Id对象 |
| | | */ |
| | | public void openPowerStationDetails(HouseIdBean houseIdBean) { |
| | | if (UserConfigManage.getInstance().isBAccount()) { |
| | | if (houseIdBean.getPowerStationType().equals(PowerStationType.BMS)) { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_BMSPLANT_DETAILS + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&isInstaller=true"; |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } else { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus(); |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } |
| | | } else { |
| | | if (houseIdBean.getPowerStationType().equals(PowerStationType.BMS)) { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_BMSPLANT_DETAILS + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&isInstaller=false"; |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } else { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS_C + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus(); |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 电站数据(统计) |
| | |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public static class HouseBeanClass { |