From b63ff58e2c415bae2fb4741aebe710fa3576ff66 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 23 三月 2026 13:11:47 +0800
Subject: [PATCH] 2026年03月23日13:11:38 备份代码
---
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 177 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 117 insertions(+), 60 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 e26b8aa..190aca2 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
@@ -31,8 +31,11 @@
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.LogoutType;
import com.hdl.photovoltaic.enums.LowerTagType;
import com.hdl.photovoltaic.enums.PowerStationStatus;
+import com.hdl.photovoltaic.enums.PowerStationType;
import com.hdl.photovoltaic.enums.ProjectOperation;
import com.hdl.photovoltaic.enums.ShowErrorMode;
import com.hdl.photovoltaic.enums.SortType;
@@ -40,6 +43,7 @@
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.listener.LinkCallBack;
import com.hdl.photovoltaic.listener.OnCallBeak;
+import com.hdl.photovoltaic.other.HdlAccountLogic;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlDeviceLogic;
import com.hdl.photovoltaic.other.HdlDialogLogic;
@@ -106,6 +110,7 @@
private String installedCapacityMaxValue = "";//鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
private String screeningConditionStatus = DebugStatus.All;//绛涢�夋潯浠剁姸鎬�
private String powerStationStatusValue = PowerStationStatus.All;//鐢电珯鐘舵��(鍏ㄩ儴 涓嶄紶璇ヨ繃婊ゅ弬鏁�,1:姝e父(杩愯),2:绂荤嚎,3:寰呮帴鍏�,4:鏁呴殰)
+ private String powerStationTypeValue = PowerStationType.All;//鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
private final long pageSize = 100;//涓�椤靛ぇ灏�
@@ -119,6 +124,7 @@
installedCapacityMaxValue = "";
screeningConditionStatus = DebugStatus.All;
powerStationStatusValue = PowerStationStatus.All;
+ powerStationTypeValue = PowerStationType.All;
}
@Override
@@ -138,7 +144,12 @@
}
private void initEvent() {
-
+ viewBinding.exitTv.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ HdlAccountLogic.getInstance().logout(LogoutType.NormalLogout);
+ }
+ });
//鐢电珯鏍囩
viewBinding.powerStationLabel.setOnClickListener(new View.OnClickListener() {
@Override
@@ -150,7 +161,7 @@
selectedTitleLabelStyle();
initializationState();
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
}
});
@@ -176,7 +187,7 @@
powerStationStatusValue = PowerStationStatus.All;
stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv);
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
}
});
//鏁呴殰
@@ -189,7 +200,7 @@
powerStationStatusValue = PowerStationStatus.malfunction;
stationStatusStyle(viewBinding.faultsLl, viewBinding.faultsDesTv);
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
}
});
//绂荤嚎
@@ -202,7 +213,7 @@
powerStationStatusValue = PowerStationStatus.off;
stationStatusStyle(viewBinding.offlineLl, viewBinding.offlineDesTv);
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
}
});
//寰呮帴鍏�
@@ -215,39 +226,54 @@
powerStationStatusValue = PowerStationStatus.connecting;
stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv);
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
}
});
//鐢电珯娣诲姞
+ //鐐瑰嚮杩涘叆鏂伴厤缃叆缃戠晫闈�
viewBinding.addIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- AddPowerStationDialog addPowerStationDialog = new AddPowerStationDialog(_mActivity);
- addPowerStationDialog.show();
- addPowerStationDialog.setCanceledOnTouchOutside(true);
- addPowerStationDialog.setItemOnclickListener(new PowerStationDialogAdapter.OnclickListener() {
- @Override
- public void onClick(int position, String str) {
- addPowerStationDialog.dismiss();
- UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(1);
- if (_mActivity.getString(R.string.simple_debugging).equals(str)) {
- HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION_SIMPLE, null);
- } else {
- HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION, null);
- }
-// requestPermissions(new OnCallBeak() {
-// @Override
-// public void onClickCallBeak() {
-//// UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(1);
-//// HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION, null);
-// }
-// });
- }
- });
-
+ UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(1);
+ HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION_SIMPLE, null);
}
});
+ //闀挎寜杩涘叆鏃ч厤缃叆缃戠晫闈�
+ viewBinding.addIv.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(1);
+ HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION, null);
+// AddPowerStationDialog addPowerStationDialog = new AddPowerStationDialog(_mActivity);
+// addPowerStationDialog.show();
+// addPowerStationDialog.setCanceledOnTouchOutside(true);
+// addPowerStationDialog.setItemOnclickListener(new PowerStationDialogAdapter.OnclickListener() {
+// @Override
+// public void onClick(int position, String str) {
+//// debugging_str = str;
+// addPowerStationDialog.dismiss();
+//// UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(1);
+//// if (_mActivity.getString(R.string.simple_debugging).equals(str)) {
+//// HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION_SIMPLE, null);
+//// } else {
+//// HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION, null);
+//// }
+//// requestPermissions(new OnCallBeak() {
+//// @Override
+//// public void onClickCallBeak() {
+////// UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(1);
+////// HdlUniLogic.getInstance().openUniMP(HDLUniMP.UNI_EVENT_OPEN_HOME_CREATION, null);
+//// }
+//// });
+// }
+// });
+
+ return true;
+ }
+ });
+
+
//鐢电珯鎼滅储
viewBinding.powerStationSearchClickCl.setOnClickListener(new View.OnClickListener() {
@Override
@@ -263,15 +289,16 @@
public void onClick(View v) {
DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity);
defaultFilteringDialog.show();
- defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus);
+ defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus,powerStationTypeValue);
defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() {
@Override
- public void confirm(String min, String max, String state) {
+ public void confirm(String min, String max, String state, String powerStationType) {
installedCapacityMinValue = min;//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺)
installedCapacityMaxValue = max;//鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
screeningConditionStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯)
+ powerStationTypeValue = powerStationType;//鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
}
});
}
@@ -324,12 +351,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
@@ -337,7 +365,7 @@
delayedConfirmationCancelDialog.dismiss();
if (isWaitDelivered) {
showLoading();
- HdlResidenceLogic.getInstance().setUpdateProjectDebugStatus(houseIdBean.getHomeId(), houseIdBean.getCommunityId(), houseIdBean.getFlowRecordContent(), 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();
@@ -345,8 +373,11 @@
houseIdBean.setDebugStatus(DebugStatus.Debugging);
HdlResidenceLogic.getInstance().updateHouseIdBean(houseIdBean);
initData();
+ if (houseInfoAdapter != null) {
+ houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃
+ }
//鏇存柊UI
- houseInfoAdapter.notifyItemChanged(position);
+// houseInfoAdapter.notifyItemChanged(position);
}
}
@@ -357,6 +388,9 @@
});
} else {
showLoading(getString(R.string.deleting_please_wait));
+// if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
+ //銆愬父瑙勬柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠わ紙鎼滅储缃戝叧鏄�冨埌缃戝叧娌℃湁杩炴帴鍒颁簯绔紝浣跨敤鏈湴鍙戦�佸垵濮嬪寲鎸囦护锛�
+ // 纭欢閭h竟鍙柊鍥轰欢涔熷彂鍒濆鍖� 2025骞�10鏈�14鏃�10:55:18
HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
@Override
public void onSuccess(List<GatewayBean> list) {
@@ -371,6 +405,10 @@
deleteResidence(position, houseIdBean, null);
}
});
+// } else {
+// //銆愮畝鏄撴柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠�
+// deleteResidence(position, houseIdBean, null);
+// }
}
}
});
@@ -392,7 +430,7 @@
key = SortType.installedCapacitySort;
value = isSelected ? SortValue.ascending : SortValue.descending;
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
}
});
//棰濆畾鍔熺巼绛涢��
@@ -404,7 +442,7 @@
key = SortType.invPowerSort;
value = isSelected ? SortValue.ascending : SortValue.descending;
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
}
});
//鐢电珯鐢垫睜瀹归噺绛涢��
@@ -416,7 +454,7 @@
key = SortType.batteryCapacitySort;
value = isSelected ? SortValue.ascending : SortValue.descending;
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
}
});
//鐢电珯褰撴棩鍙戠數閲忕瓫閫�
@@ -428,17 +466,19 @@
key = SortType.todayElectricitySort;
value = isSelected ? SortValue.ascending : SortValue.descending;
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
}
});
//璁惧鐐瑰嚮
deviceInfoAdapter.setOnclickListener(new DeviceInfoAdapter.OnClickListener() {
@Override
public void onClick(int position, CloudInverterDeviceBean deviceBean) {
- if (!deviceBean.isActivate()) {
- HdlThreadLogic.toast(_mActivity, getString(R.string.device_not_activated));
- return;
- }
+ deviceBean.setActivate(true);//榛樿婵�娲�
+// //鏉ㄦ稕璇磋繖涓垪琛ㄤ笉杩斿洖鏈縺娲荤殑璁惧锛屾墍浠ュ幓鎺夊垽鏂�
+// if (!deviceBean.isActivate()) {
+// HdlThreadLogic.toast(_mActivity, getString(R.string.device_not_activated));
+// return;
+// }
// GatewayBean gatewayBean = new GatewayBean();
// gatewayBean.setCategorySecondName(deviceBean.getCategorySecondName());
// gatewayBean.setDevice_mac(deviceBean.getOsn());
@@ -545,6 +585,13 @@
private void initView() {
+ if (UserConfigManage.getInstance().isTourist_mode()) {
+ viewBinding.addIv.setVisibility(View.GONE);
+ viewBinding.exitTv.setVisibility(View.VISIBLE);
+ } else {
+ viewBinding.addIv.setVisibility(View.VISIBLE);
+ viewBinding.exitTv.setVisibility(View.GONE);
+ }
viewBinding.powerStationLabelParent.setVisibility(View.VISIBLE);
viewBinding.deviceLabelParent.setVisibility(View.GONE);
@@ -575,7 +622,11 @@
viewBinding.powerStationLabel.setTextAppearance(R.style.Text18Style);
viewBinding.deviceLabel.setTextAppearance(R.style.Text14Style);
// viewBinding.editIv.setVisibility(View.VISIBLE);//缂栬緫鍥炬爣闅愯棌
- viewBinding.addIv.setVisibility(View.VISIBLE);//娣诲姞鍥炬爣闅愯棌
+ if (UserConfigManage.getInstance().isTourist_mode()) {
+ viewBinding.addIv.setVisibility(View.GONE);//娣诲姞鍥炬爣闅愯棌
+ } else {
+ viewBinding.addIv.setVisibility(View.VISIBLE);//娣诲姞鍥炬爣闅愯棌
+ }
viewBinding.powerStationLabelParent.setVisibility(View.VISIBLE);//鐢电珯鏍囩銆愮埗瀹瑰櫒銆戞樉绀�
viewBinding.deviceLabelParent.setVisibility(View.GONE);//璁惧鏍囩銆愮埗瀹瑰櫒銆戦殣钘�
if (viewBinding.deviceNullDataIc.getRoot().getVisibility() == View.VISIBLE) {
@@ -585,7 +636,11 @@
viewBinding.deviceLabel.setTextAppearance(R.style.Text18Style);
viewBinding.powerStationLabel.setTextAppearance(R.style.Text14Style);
// viewBinding.editIv.setVisibility(View.GONE);//缂栬緫鍥炬爣闅愯棌
- viewBinding.addIv.setVisibility(View.GONE);//娣诲姞鍥炬爣闅愯棌
+ if (UserConfigManage.getInstance().isTourist_mode()) {
+ viewBinding.addIv.setVisibility(View.GONE);//娣诲姞鍥炬爣闅愯棌
+ } else {
+ viewBinding.addIv.setVisibility(View.GONE);//娣诲姞鍥炬爣闅愯棌
+ }
viewBinding.powerStationLabelParent.setVisibility(View.GONE);//鐢电珯鏍囩銆愮埗瀹瑰櫒銆戦殣钘�
viewBinding.deviceLabelParent.setVisibility(View.VISIBLE);//璁惧鏍囩銆愮埗瀹瑰櫒銆戞樉绀�
if (viewBinding.homeNullDataIc.getRoot().getVisibility() == View.VISIBLE) {
@@ -669,7 +724,7 @@
// MqttRecvClient.getInstance().removeAllTopic();
// }
- loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
}
} else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
// 鍙栨秷绮樻�т簨浠�
@@ -712,7 +767,7 @@
initializationState();
stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv);
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
} else if (eventBus.getType().equals(ConstantManage.station_page)) {
// 鍙栨秷绮樻�т簨浠�
EventBus.getDefault().removeStickyEvent(eventBus);
@@ -730,7 +785,7 @@
stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv);
}
getStatusOverview();
- loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
} else if (eventBus.getType().equals(ConstantManage.station_edit)) {
//缂栬緫鍚庢洿鏂颁竴涓嬩綇瀹呭垪琛�
//loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
@@ -749,7 +804,7 @@
* 鐢电珯鐘舵�佹瑙�
*/
private void getStatusOverview() {
- HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue, new CloudCallBeak<StatusOverviewBean>() {
+ HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue,powerStationTypeValue, new CloudCallBeak<StatusOverviewBean>() {
@Override
public void onSuccess(StatusOverviewBean statusOverviewBean) {
if (statusOverviewBean == null) {
@@ -783,10 +838,11 @@
* @param installedCapacityMax 鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
* @param gridType 璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯)
* @param powerStationStatus 鐢电珯鐘舵�� (鍏ㄩ儴 锛�"";1 锛� 姝e父;2 锛� 绂荤嚎; 3 锛� 寰呮帴鍏�;4 锛� 鏁呴殰)
+ * @param powerStationType 鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
* @param pageNo 椤电爜
* @param isClear 鏄惁娓呴櫎鏁版嵁
*/
- private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, long pageNo, boolean isClear) {
+ private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, String powerStationType, long pageNo, boolean isClear) {
isReadData = true;
if (isClear) {
clearData();
@@ -803,7 +859,7 @@
}
//鑾峰彇浣忓畢(鐢电珯)ID鍒楄〃
- HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() {
+ HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, powerStationType, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() {
@Override
public void onSuccess(HdlResidenceLogic.HouseBeanClass houseBeanClass) {
HdlThreadLogic.runMainThread(new Runnable() {
@@ -870,7 +926,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) {
@@ -1001,14 +1057,15 @@
@Override
public void onSuccess(Boolean obj) {
hideLoading();
- if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
- initializeInverter(list); //鍙戣捣鍒濆鍖栨寚浠ょ粰閫嗗彉鍣�;锛堟敞鎰�:鍓嶉潰宸插厛瑙g粦浜戠閫嗗彉鍣紝mqtt閫氶亾宸叉柇寮�锛屽垵濮嬪寲鍙兘鏄湰鍦板彂閫�(鍏堟悳绱㈠眬鍩熺綉閫嗗彉鍣ㄥ垪琛紝寤虹珛鏈湴閫氳閫氶亾)锛�
- }
+ //纭欢閭h竟鍙柊鍥轰欢涔熷彂鍒濆鍖� 2025骞�10鏈�14鏃�10:55:18
+// if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
+ initializeInverter(list); //鍙戣捣鍒濆鍖栨寚浠ょ粰閫嗗彉鍣�;锛堟敞鎰�:鍓嶉潰宸插厛瑙g粦浜戠閫嗗彉鍣紝mqtt閫氶亾宸叉柇寮�锛屽垵濮嬪寲鍙兘鏄湰鍦板彂閫�(鍏堟悳绱㈠眬鍩熺綉閫嗗彉鍣ㄥ垪琛紝寤虹珛鏈湴閫氳閫氶亾)锛�
+// }
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();//妫�娴嬫暟鎹槸鍚︿负绌�
@@ -1139,7 +1196,7 @@
// 鎵ц浠诲姟锛堝鏇存柊UI銆佽烦杞瓑锛�
viewBinding.fragmentHouseSrl.endRefreshing();
//鍔犺浇鏈�鏂版暟鎹畬鎴�
- loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+ loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
getStatusOverview();
}
}.execute();
@@ -1166,7 +1223,7 @@
viewBinding.fragmentHouseSrl.endLoadingMore();
if (!isHouseLoadingMore) {
// 婊戝姩鍒颁簡搴曢儴锛屾墽琛岀浉搴旂殑鎿嶄綔
- loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false);
+ loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, ++currentHouseListPage, false);
}
}
}.execute();
--
Gitblit v1.8.0