wjc
2026-03-06 b9408687a3c0490289206b7e3b623d1490b38afd
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
@@ -37,6 +37,7 @@
import com.hdl.photovoltaic.enums.LowerTagType;
import com.hdl.photovoltaic.enums.NetworkType;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlAiLogic;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlDeviceLogic;
import com.hdl.photovoltaic.other.HdlESLocalJsonLogic;
@@ -49,6 +50,9 @@
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.other.HdlUniLogic;
import com.hdl.photovoltaic.push.PushMessageInfoBean;
import com.hdl.photovoltaic.ui.bean.ChatInfoBean;
import com.hdl.photovoltaic.ui.bean.ChatMessageListBean;
import com.hdl.photovoltaic.ui.bean.ChatMessagePageBean;
import com.hdl.photovoltaic.ui.bean.DeviceRemoteInfo;
import com.hdl.photovoltaic.ui.bean.MessageBean;
import com.hdl.photovoltaic.ui.bean.OidBean;
@@ -141,7 +145,7 @@
        this.getUnreadCount();
        //获取云端脚本
        HdlESLocalJsonLogic.getInstance().getAllHdlESLocalJson();
        this.getChatInfo();
    }
@@ -376,6 +380,40 @@
    }
    /**
     * 查看智能体详情
     *
     */
    private void getChatInfo() {
        HdlAiLogic.getInstance().getChatInfo(new CloudCallBeak<ChatInfoBean>() {
            @Override
            public void onSuccess(ChatInfoBean chatInfoBean) {
                UserConfigManage.getInstance().setAgentSecret(chatInfoBean.getAgentSecret());
                UserConfigManage.getInstance().setAgentUrl(chatInfoBean.getAgentUrl());
                UserConfigManage.getInstance().Save();
                HdlAiLogic.getInstance().chatMessagesList(new CloudCallBeak<ChatMessagePageBean>() {
                    @Override
                    public void onSuccess(ChatMessagePageBean obj) {
                        if (obj != null && !obj.getData().isEmpty()) {
                            UserConfigManage.getInstance().setConversationId(obj.getData().get(0).getId());
                            UserConfigManage.getInstance().Save();
                        }
                    }
                    @Override
                    public void onFailure(HDLException e) {
                    }
                });
            }
            @Override
            public void onFailure(HDLException e) {
                HdlLogLogic.print("获取智能体AppKey失败 Pu" + e.getMessage(), true);
            }
        });
    }
    /**
     * 开启通知权限
     */
    private void notificationSet() {