From 0287b5d20f7d57f5352248175733b99d5a99959b Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 28 八月 2025 17:42:27 +0800 Subject: [PATCH] Merge branch '1.4.4' into dev --- app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 48 +++++++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java index 5ebbec4..74d905b 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java @@ -346,8 +346,11 @@ houseIdBean.setDebugStatus(DebugStatus.Debugging); HdlResidenceLogic.getInstance().updateHouseIdBean(houseIdBean); initData(); + if (houseInfoAdapter != null) { + houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃 + } //鏇存柊UI - houseInfoAdapter.notifyItemChanged(position); +// houseInfoAdapter.notifyItemChanged(position); } } @@ -358,20 +361,26 @@ }); } else { showLoading(getString(R.string.deleting_please_wait)); - 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)) { + //銆愬父瑙勬柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠� + 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); - } - }); + @Override + public void onFailure(HDLException e) { + //鍙戣捣鍒犻櫎鐢电珯鎸囦护 + deleteResidence(position, houseIdBean, null); + } + }); + } else { + //銆愮畝鏄撴柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠� + deleteResidence(position, houseIdBean, null); + } } } }); @@ -436,6 +445,7 @@ deviceInfoAdapter.setOnclickListener(new DeviceInfoAdapter.OnClickListener() { @Override public void onClick(int position, CloudInverterDeviceBean deviceBean) { + deviceBean.setActivate(true);//榛樿婵�娲� // //鏉ㄦ稕璇磋繖涓垪琛ㄤ笉杩斿洖鏈縺娲荤殑璁惧锛屾墍浠ュ幓鎺夊垽鏂� // if (!deviceBean.isActivate()) { // HdlThreadLogic.toast(_mActivity, getString(R.string.device_not_activated)); @@ -872,7 +882,7 @@ if (isRefreshing) { showLoading(getString(R.string.device_loading)); } - //鑾峰彇浣忓畢(鐢电珯)ID鍒楄〃 + //鑾峰彇璁惧鍒楄〃 HdlDeviceLogic.getInstance().getPowerStationDeviceList("", pageNo, pageSize, new CloudCallBeak<PageNumberObject<CloudInverterDeviceBean>>() { @Override public void onSuccess(PageNumberObject<CloudInverterDeviceBean> pageNumberObject) { @@ -1009,8 +1019,8 @@ HdlResidenceLogic.getInstance().delHouseId(houseIdBean.getHomeId());//鍒犻櫎鐢电珯缂撳瓨 initData();//鍒濆鍖栫紦瀛樻暟鎹� if (houseInfoAdapter != null) { -// houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃 - houseInfoAdapter.notifyItemRemoved(position);//鍙埛鏂板綋鍓嶇殑浣嶇疆 + houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃 +// houseInfoAdapter.notifyItemRemoved(position);//鍙埛鏂板綋鍓嶇殑浣嶇疆 } getStatusOverview();//鍒犻櫎鎴愬姛鍚庡埛鏂扮數绔欑姸鎬佹瑙� nullDataUpdateUi();//妫�娴嬫暟鎹槸鍚︿负绌� @@ -1052,8 +1062,8 @@ public void requestPermissions(OnCallBeak onCallBeak) { - //ACCESS_FINE_LOCATION 鍏佽浣跨敤GPS瀹氫綅 - //ACCESS_COARSE_LOCATION 鍏佽浣跨敤WIFI鐑偣鎴栧熀绔欐潵鑾峰彇绮楃暐鐨勫畾浣� + //ACCESS_FINE_LOCATION 鍏佽浣跨敤GPS瀹氫綅 + //ACCESS_COARSE_LOCATION 鍏佽浣跨敤WIFI鐑偣鎴栧熀绔欐潵鑾峰彇绮楃暐鐨勫畾浣� String[] ary = PermissionUtils.checkPermission(_mActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}); if (ary.length > 0) { this.requestPermissions(ary, PermissionUtils.STATUS_SUCCESS); @@ -1243,4 +1253,4 @@ } -} +} \ No newline at end of file -- Gitblit v1.8.0