From 83c12d3f28e5c43ecda8eca20cecb68bb0c58e87 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期三, 09 十月 2024 11:12:03 +0800
Subject: [PATCH] 2024年10月09日11:12:01
---
app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java b/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java
index 89fcca9..0476fca 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/newC/MessageCenterList.java
@@ -61,7 +61,7 @@
private int mTotalCount1 = 0;//娑堟伅鏁伴噺鎬绘暟
private int mTotalCount2 = 0;//娑堟伅鏁伴噺鎬绘暟
- private String mDeviceTypeFilterKye = FilterType.deviceType;//杩囨护绫诲瀷 deviceType锛圛NV 锛氶�嗗彉鍣紱BMS 锛欱MS鎺у埗鐩掞紱BATTERY 锛氱數姹犲崟鍏冿級
+ private String mDeviceTypeFilterKye = FilterType.all;//杩囨护绫诲瀷 deviceType锛圛NV 锛氶�嗗彉鍣紱BMS 锛欱MS鎺у埗鐩掞紱BATTERY 锛氱數姹犲崟鍏冿級
private String mDeviceTypeFilterValue = FilterType.all;//杩囨护绫诲瀷鍊� deviceType锛圛NV 锛氶�嗗彉鍣紱BMS 锛欱MS鎺у埗鐩掞紱BATTERY 锛氱數姹犲崟鍏冿級
private String mTypeFilterKye = FilterType.all;//杩囨护绫诲瀷 type锛團AULT 锛氭晠闅滐紱 WARN 锛氬憡璀︼紱 EVENT 锛氫簨浠�(鎻愮ず)锛夛紱
@@ -76,6 +76,7 @@
// * timeType锛圱ODAY 锛氫粖澶╋紱LAST_3_DAYS: 杩�3澶╋紱LAST_7_DAYS 锛氳繎7澶╋紱LAST_30_DAYS 锛氳繎30澶╋級锛�
private boolean isLoadingMore = false; // 鏍囪姝e湪鍔犺浇鏇村鏁版嵁
LinearLayoutManager mLayoutManager;
+
@Override
public Object getContentView() {
@@ -94,7 +95,7 @@
//鍒濆鍖栫晫闈㈢洃鍚櫒
initEvent();
//杩涙潵璇诲彇涓�娆℃暟鎹�(涓轰簡鏇存柊currentPage锛宑urrentTotal杩欎釜鍊�)
- loadNextPageMessageList(1, true, FilterType.all, FilterType.all, FilterType.all, FilterType.all, FilterType.all, FilterType.all);
+ loadNextPageMessageList(1, true, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue);
}
@Override
@@ -241,7 +242,7 @@
if (isAlarmDeviceClick) {
return;//闃叉澶氭鐐瑰嚮
}
- mDeviceTypeFilterKye = FilterType.deviceType;
+ mDeviceTypeFilterKye = FilterType.all;
mDeviceTypeFilterValue = FilterType.all;
mTypeFilterKye = FilterType.all;
mTypeFilterValue = FilterType.all;
@@ -262,7 +263,7 @@
if (!isAlarmDeviceClick) {
return;//闃叉澶氭鐐瑰嚮
}
- mDeviceTypeFilterKye = FilterType.deviceType;
+ mDeviceTypeFilterKye = FilterType.all;
mDeviceTypeFilterValue = FilterType.all;
mTypeFilterKye = FilterType.all;
mTypeFilterValue = FilterType.all;
@@ -324,7 +325,7 @@
}
private void initView() {
- viewBinding.toolbarTopMessageCenterListRl.getRoot().setBackgroundColor(getColor(R.color.text_FFFFFFFF));
+ viewBinding.toolbarTopMessageCenterListRl.getRoot().setBackgroundColor(getColor(R.color.text_FFECECEC));
viewBinding.toolbarTopMessageCenterListRl.topBackLl.setVisibility(View.VISIBLE);
viewBinding.toolbarTopMessageCenterListRl.topLeftIv.setImageResource(R.drawable.back_c);
viewBinding.toolbarTopMessageCenterListRl.topTitleTv.setText(R.string.set_message_center);
@@ -344,6 +345,23 @@
}
private void initData() {
+ try {
+ Intent intent = getIntent();
+ if (intent != null) {
+ String isShowFault = intent.getStringExtra("isShowFault");
+ if (isShowFault != null && isShowFault.equals("true")) {
+ //榛樿鏁呴殰鍏ㄩ儴
+ mDeviceTypeFilterKye = FilterType.all;
+ mDeviceTypeFilterValue = FilterType.all;
+ mTypeFilterKye = FilterType.type;
+ mTypeFilterValue = "FAULT";
+ mTimeTypeFilterKye = FilterType.all;
+ mTimeTypeFilterValue = FilterType.all;
+ viewBinding.allGradeTitleTv.setText(getString(R.string.alarm_all_grade_malfunction));
+ }
+ }
+ } catch (Exception ignored) {
+ }
}
/**
@@ -570,6 +588,7 @@
map.put(getString(R.string.alarm_all_device_inverter), "INV");
map.put(getString(R.string.alarm_all_device_bms), "BMS");
map.put(getString(R.string.alarm_all_device_battery_cell), "BATTERY");
+ map.put(getString(R.string.alarm_all_device_load_centre), "LOAD_CENTRE");
map.put(getString(R.string.alarm_all_grade), "");//璁剧瓑绾у叏閮�
map.put(getString(R.string.alarm_all_grade_malfunction), "FAULT");
map.put(getString(R.string.alarm_all_grade_warning), "WARN");
@@ -602,6 +621,7 @@
stringList.add(getString(R.string.alarm_all_device_inverter));
stringList.add(getString(R.string.alarm_all_device_bms));
stringList.add(getString(R.string.alarm_all_device_battery_cell));
+ stringList.add(getString(R.string.alarm_all_device_load_centre));
}
break;
case FilterType.type: {
--
Gitblit v1.8.0