From db937c029a3f9dbaec86cbbc944ebbee3ece13be Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 31 七月 2025 14:49:17 +0800
Subject: [PATCH] Merge branch '1.4.4' into dev

---
 app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
index a3f3f8e..07c8a40 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -725,7 +725,7 @@
         }
         String requestUrl = HttpApi.POST_Device_Oid;
         JsonObject json = new JsonObject();
-        json.addProperty("operationSource", "PROGRAM_ENERGY");//
+        json.addProperty("operationSource", "PROGRAM_ENERGY");//鎿嶄綔鏉ユ簮锛氬浐瀹氫紶锛歅ROGRAM_ENERGY  = 鑳芥簮锛孭ROGRAM = studio 榛樿
         json.addProperty("homeId", homeId);
         JsonArray jsonArray = new JsonArray();
         for (int i = 0; i < oidList.size(); i++) {
@@ -785,6 +785,7 @@
         String requestUrl = HttpApi.POST_Device_IncrAdd;
         JsonObject json = new JsonObject();
         json.addProperty("homeId", homeId);
+        json.addProperty("operationSource", "PROGRAM_ENERGY");//鎿嶄綔鏉ユ簮锛氬浐瀹氫紶锛歅ROGRAM_ENERGY  = 鑳芥簮锛孭ROGRAM = studio 榛樿
         JsonArray jsonArray = new JsonArray();
         for (int i = 0; i < oidList.size(); i++) {
             OidBean oidBean = oidList.get(i);
@@ -1328,6 +1329,20 @@
         AtomicInteger atomicInteger = new AtomicInteger(0);
         for (int i = 0; i < list.size(); i++) {
             CloudInverterDeviceBean cloudInverterDeviceBean = list.get(i);
+            if (cloudInverterDeviceBean == null || !cloudInverterDeviceBean.isActivate()) {
+                //鏈縺娲昏澶�
+                atomicInteger.set(atomicInteger.get() + 1);
+                //娉ㄦ剰:杩欎釜閫嗗彉鍣ㄥ彧鑳芥湰鍦版帶鍒�(鍥犱负鎷夸笉鍒癿qtt閫氳绉橀挜浠ュ強GatewayID,鏃犳硶杩滅▼鎺у埗)
+                //鏇存柊閫嗗彉鍣ㄦ湰鍦扮紦瀛樹俊鎭�
+                refreshGatewayCacheData(false, cloudInverterDeviceBean, null, homeId);
+                //鍒版渶鍚庝竴鏉★紝鎵嶅鐞嗗洖璋�
+                if (atomicInteger.get() == list.size()) {
+                    if (cloudCallBeak != null) {
+                        cloudCallBeak.onSuccess(IntegrateCloudAndLocalData(homeId, list, false));
+                    }
+                }
+                HdlLogLogic.print("璁惧鏈縺娲�(mac:" + cloudInverterDeviceBean.getOsn() + "))", true);
+            }
             //鑾峰彇杩滅▼璁惧閫氳淇℃伅(鎷垮埌缃戝叧ID锛宮qtt閫氳绉橀挜)
             getDeviceRemoteInfo(homeId, cloudInverterDeviceBean.getSpk(), cloudInverterDeviceBean.getOsn(), new CloudCallBeak<DeviceRemoteInfo>() {
                 @Override
@@ -1830,6 +1845,7 @@
             gatewayBean.setDevice_model(cloudInverterDeviceBean.getOmodel());//璁惧鍨嬪彿
         }
         gatewayBean.setSpk(cloudInverterDeviceBean.getSpk());//璁惧spk
+        gatewayBean.setActivate(cloudInverterDeviceBean.isActivate());//鏄惁婵�娲昏澶�(true锛氭縺娲伙紱false锛氭湭婵�娲�)
 
 
     }

--
Gitblit v1.8.0