wjc
16 小时以前 abede488312c289351ea3724e25416e5889b206e
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -31,6 +31,7 @@
import com.hdl.photovoltaic.enums.DebugStatus;
import com.hdl.photovoltaic.enums.DebugType;
import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
import com.hdl.photovoltaic.enums.Languages;
import com.hdl.photovoltaic.enums.LowerTagType;
import com.hdl.photovoltaic.enums.PowerStationStatus;
import com.hdl.photovoltaic.enums.ProjectOperation;
@@ -263,7 +264,6 @@
        });
        //电站搜索
        viewBinding.powerStationSearchClickCl.setOnClickListener(new View.OnClickListener() {
            @Override
@@ -340,12 +340,13 @@
                delayedConfirmationCancelDialog.show();
                delayedConfirmationCancelDialog.isHideTitle(true);
                String homeName = "\"" + houseIdBean.getHomeName() + "\"";
                String placeholder = UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.ar) ? "s%" : "%s";
                if (isWaitDelivered) {
                    //"是否将电站的调试状态回退到调试中"
                    delayedConfirmationCancelDialog.setContent(getString(R.string.debug_status_rollback).replace("%s", homeName));
                    delayedConfirmationCancelDialog.setContent(getString(R.string.debug_status_rollback).replace(placeholder, homeName));
                } else {
                    delayedConfirmationCancelDialog.startCountdown(4);
                    delayedConfirmationCancelDialog.setContent(getString(R.string.delete_power_station).replace("%s", homeName));
                    delayedConfirmationCancelDialog.setContent(getString(R.string.delete_power_station).replace(placeholder, homeName));
                }
                delayedConfirmationCancelDialog.setYesOnclickListener(new DelayedConfirmationCancelDialog.onYesOnclickListener() {
                    @Override
@@ -353,8 +354,7 @@
                        delayedConfirmationCancelDialog.dismiss();
                        if (isWaitDelivered) {
                            showLoading();
                            String flowRecordContent = UserConfigManage.getInstance().isZh() ? "新特锐能app发起电站重新调试" : "The Xenterra app initiates the re-commissioning of the power station";
                            HdlResidenceLogic.getInstance().setUpdateProjectDebugStatus(houseIdBean.getHomeId(), houseIdBean.getCommunityId(), flowRecordContent, ProjectOperation.DEBUGGING_AGAIN.toString(), new CloudCallBeak<Boolean>() {
                            HdlResidenceLogic.getInstance().setUpdateProjectDebugStatus(houseIdBean.getHomeId(), houseIdBean.getCommunityId(), getString(R.string.re_commissioning_power_station), ProjectOperation.DEBUGGING_AGAIN.toString(), new CloudCallBeak<Boolean>() {
                                @Override
                                public void onSuccess(Boolean list) {
                                    hideLoading();
@@ -377,26 +377,27 @@
                            });
                        } else {
                            showLoading(getString(R.string.deleting_please_wait));
                            if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
                                //【常规方式】发起删除电站指令
                                HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
                                    @Override
                                    public void onSuccess(List<GatewayBean> list) {
                                        //发起删除电站指令
                                        deleteResidence(position, houseIdBean, list);
//                            if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
                            //【常规方式】发起删除电站指令(搜索网关是考到网关没有连接到云端,使用本地发送初始化指令)
                            // 硬件那边叫新固件也发初始化 2025年10月14日10:55:18
                            HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
                                @Override
                                public void onSuccess(List<GatewayBean> list) {
                                    //发起删除电站指令
                                    deleteResidence(position, houseIdBean, list);
                                    }
                                }
                                    @Override
                                    public void onFailure(HDLException e) {
                                        //发起删除电站指令
                                        deleteResidence(position, houseIdBean, null);
                                    }
                                });
                            } else {
                                //【简易方式】发起删除电站指令
                                deleteResidence(position, houseIdBean, null);
                            }
                                @Override
                                public void onFailure(HDLException e) {
                                    //发起删除电站指令
                                    deleteResidence(position, houseIdBean, null);
                                }
                            });
//                            } else {
//                                //【简易方式】发起删除电站指令
//                                deleteResidence(position, houseIdBean, null);
//                            }
                        }
                    }
                });