wjc
2026-03-23 b63ff58e2c415bae2fb4741aebe710fa3576ff66
app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
@@ -391,10 +391,11 @@
     * @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();
@@ -425,6 +426,12 @@
            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) {
            }
        }
@@ -616,8 +623,9 @@
     * @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)) {
@@ -628,6 +636,10 @@
        }
        if (!TextUtils.isEmpty(debugStatus)) {
            json.addProperty("debugStatus", debugStatus);
        }
        if (!TextUtils.isEmpty(powerStationType)) {
            json.addProperty("powerStationType", powerStationType);
        }
@@ -934,6 +946,7 @@
//        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());
@@ -1140,75 +1153,6 @@
    }
    /**
     * 添加推送Token
     *
     * @param cloudCallBeak -
     */
    public void pushAdd(CloudCallBeak<String> cloudCallBeak) {
        String requestUrl = HttpApi.POST_push_add;
        JsonObject json = new JsonObject();
        json.addProperty("deviceName", Build.MODEL);//设备名称
        json.addProperty("deviceType", "Android");//设备类型
        json.addProperty("produce", AppConfigManage.isIsOnlineServer());//表示是否是正式服务器
        json.addProperty("pushToken", UserConfigManage.getInstance().getPushToken());//App的推送Token,在极光为RegId
        json.addProperty("software", "PHOTOVOLTAIC");//软件来源
        json.addProperty("language", UserConfigManage.getInstance().getCurrentAppLanguage());//2.0追加的字段
        HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String pushId) {
                if (!TextUtils.isEmpty(pushId)) {
                    UserConfigManage.getInstance().setPushId(pushId);
                    UserConfigManage.getInstance().Save();
                }
                if (cloudCallBeak != null) {
                    cloudCallBeak.onSuccess(pushId);
                }
            }
            @Override
            public void onFailure(HDLException e) {
                if (cloudCallBeak != null) {
                    cloudCallBeak.onFailure(e);
                }
            }
        });
    }
    /**
     * 删除推送Token
     *
     * @param cloudCallBeak -
     */
    public void pushDel(CloudCallBeak<String> cloudCallBeak) {
        String requestUrl = HttpApi.POST_push_del;
        JsonObject json = new JsonObject();
        json.addProperty("pushId", UserConfigManage.getInstance().getPushId());
        json.addProperty("pushToken", UserConfigManage.getInstance().getPushToken());
        HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String jsonStr) {
                if (cloudCallBeak != null) {
                    cloudCallBeak.onSuccess(jsonStr);
                }
            }
            @Override
            public void onFailure(HDLException e) {
                if (cloudCallBeak != null) {
                    cloudCallBeak.onFailure(e);
                }
            }
        });
    }
    public static class HouseBeanClass {