测试数据
This commit is contained in:
1
.idea/runConfigurations.xml
generated
1
.idea/runConfigurations.xml
generated
@@ -3,7 +3,6 @@
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
|
||||
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.module.check.model;
|
||||
|
||||
import com.tencent.bugly.proguard.A;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -18,7 +20,7 @@ public class CheckItemInfo implements Serializable {
|
||||
private String title;
|
||||
|
||||
private String value;
|
||||
private DetailItem itemList;
|
||||
private ArrayList itemList;
|
||||
//是否存在异常
|
||||
private boolean usual;
|
||||
|
||||
@@ -30,11 +32,11 @@ public class CheckItemInfo implements Serializable {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public DetailItem getItemList() {
|
||||
public ArrayList getItemList() {
|
||||
return itemList;
|
||||
}
|
||||
|
||||
public void setItemList(DetailItem itemList) {
|
||||
public void setItemList(ArrayList itemList) {
|
||||
this.itemList = itemList;
|
||||
}
|
||||
|
||||
@@ -70,7 +72,20 @@ public class CheckItemInfo implements Serializable {
|
||||
this.viewTitle = viewTitle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CheckItemInfo{" +
|
||||
"style=" + style +
|
||||
", viewTitle='" + viewTitle + '\'' +
|
||||
", title='" + title + '\'' +
|
||||
", value='" + value + '\'' +
|
||||
", itemList=" + itemList +
|
||||
", usual=" + usual +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class DetailItem implements Serializable {
|
||||
private boolean usual;
|
||||
private String title;
|
||||
private String value;
|
||||
|
||||
@@ -89,6 +104,23 @@ public class CheckItemInfo implements Serializable {
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean isUsual() {
|
||||
return usual;
|
||||
}
|
||||
|
||||
public void setUsual(boolean usual) {
|
||||
this.usual = usual;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DetailItem{" +
|
||||
"usual=" + usual +
|
||||
", title='" + title + '\'' +
|
||||
", value='" + value + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
public interface CheckAdapterStyleEnum {
|
||||
|
||||
@@ -126,7 +126,7 @@ public class CheckActivity extends AppCompatActivity {
|
||||
if ("不是最新版本" != null) {
|
||||
itemInfo.setUsual(false);
|
||||
itemInfo.setValue("版本升级");
|
||||
}else {
|
||||
} else {
|
||||
itemInfo.setUsual(true);
|
||||
itemInfo.setValue("最新版本 无风险");
|
||||
}
|
||||
@@ -166,11 +166,12 @@ public class CheckActivity extends AppCompatActivity {
|
||||
itemInfo.setTitle("自动驾驶系统");
|
||||
itemInfo.setUsual(false);
|
||||
itemInfo.setValue("存在风险");
|
||||
ArrayList list = new ArrayList();
|
||||
//详细指标值
|
||||
CheckItemInfo.DetailItem item = new CheckItemInfo.DetailItem();
|
||||
item.setTitle("工控机链接状态");
|
||||
item.setValue("断开");
|
||||
itemInfo.setItemList(item);
|
||||
list.add(item);
|
||||
arrSys.add(itemInfo);
|
||||
|
||||
//鹰眼测试数据
|
||||
@@ -182,22 +183,23 @@ public class CheckActivity extends AppCompatActivity {
|
||||
CheckItemInfo.DetailItem netItem = new CheckItemInfo.DetailItem();
|
||||
netItem.setTitle("网络状态");
|
||||
netItem.setValue(mSignalStrength);
|
||||
yingyan.setItemList(netItem);
|
||||
list.add(netItem);
|
||||
|
||||
CheckItemInfo.DetailItem batteryItem = new CheckItemInfo.DetailItem();
|
||||
batteryItem.setTitle("电池状态");
|
||||
batteryItem.setValue(String.valueOf(battery));
|
||||
yingyan.setItemList(batteryItem);
|
||||
list.add(batteryItem);
|
||||
|
||||
CheckItemInfo.DetailItem cpuItem = new CheckItemInfo.DetailItem();
|
||||
cpuItem.setTitle("CPU占比");
|
||||
cpuItem.setValue(String.valueOf(cpu));
|
||||
yingyan.setItemList(cpuItem);
|
||||
list.add(cpuItem);
|
||||
|
||||
CheckItemInfo.DetailItem memoryItem = new CheckItemInfo.DetailItem();
|
||||
memoryItem.setTitle("内存占比");
|
||||
memoryItem.setValue(String.valueOf(memory));
|
||||
yingyan.setItemList(cpuItem);
|
||||
list.add(memoryItem);
|
||||
yingyan.setItemList(list);
|
||||
arrSys.add(yingyan);
|
||||
|
||||
dataArrayList.add(arrSys);
|
||||
@@ -322,57 +324,80 @@ public class CheckActivity extends AppCompatActivity {
|
||||
itemInfo.setTitle("自动驾驶系统");
|
||||
itemInfo.setUsual(false);
|
||||
|
||||
CheckItemInfo.DetailItem detailItem = new CheckItemInfo.DetailItem();
|
||||
detailItem.setTitle("主机光雷达");
|
||||
detailItem.setValue("异常");
|
||||
itemInfo.setItemList(detailItem);
|
||||
ArrayList detailItem = new ArrayList();
|
||||
CheckItemInfo.DetailItem padItem = new CheckItemInfo.DetailItem();
|
||||
padItem.setTitle("Pad");
|
||||
padItem.setValue("异常");
|
||||
detailItem.add(padItem);
|
||||
|
||||
CheckItemInfo.DetailItem cameraTop = new CheckItemInfo.DetailItem();
|
||||
cameraTop.setTitle("摄像头_top");
|
||||
cameraTop.setValue("正常");
|
||||
detailItem.add(cameraTop);
|
||||
|
||||
CheckItemInfo.DetailItem cameraMiddle = new CheckItemInfo.DetailItem();
|
||||
cameraMiddle.setTitle("摄像头_Middle");
|
||||
cameraMiddle.setValue("正常");
|
||||
detailItem.add(cameraMiddle);
|
||||
|
||||
CheckItemInfo.DetailItem cameraBottom = new CheckItemInfo.DetailItem();
|
||||
cameraBottom.setTitle("摄像头_Bottom");
|
||||
cameraBottom.setValue("正常");
|
||||
detailItem.add(cameraBottom);
|
||||
|
||||
CheckItemInfo.DetailItem zhuJiGuang = new CheckItemInfo.DetailItem();
|
||||
zhuJiGuang.setTitle("主机光雷达");
|
||||
zhuJiGuang.setValue("异常");
|
||||
detailItem.add(zhuJiGuang);
|
||||
|
||||
|
||||
CheckItemInfo.DetailItem jiGuangLeft = new CheckItemInfo.DetailItem();
|
||||
jiGuangLeft.setTitle("左侧激光雷达");
|
||||
jiGuangLeft.setValue("异常");
|
||||
itemInfo.setItemList(jiGuangLeft);
|
||||
detailItem.add(jiGuangLeft);
|
||||
|
||||
CheckItemInfo.DetailItem jiGuangRight = new CheckItemInfo.DetailItem();
|
||||
jiGuangRight.setTitle("右侧激光雷达");
|
||||
jiGuangRight.setValue("正常");
|
||||
itemInfo.setItemList(jiGuangRight);
|
||||
detailItem.add(jiGuangRight);
|
||||
|
||||
CheckItemInfo.DetailItem changjiao = new CheckItemInfo.DetailItem();
|
||||
changjiao.setTitle("ADAS长焦摄像头");
|
||||
changjiao.setValue("正常");
|
||||
itemInfo.setItemList(changjiao);
|
||||
detailItem.add(changjiao);
|
||||
|
||||
CheckItemInfo.DetailItem guangJiaoFront = new CheckItemInfo.DetailItem();
|
||||
guangJiaoFront.setTitle("ADAS广焦摄像头-前");
|
||||
guangJiaoFront.setValue("正常");
|
||||
itemInfo.setItemList(guangJiaoFront);
|
||||
detailItem.add(guangJiaoFront);
|
||||
|
||||
CheckItemInfo.DetailItem custom = new CheckItemInfo.DetailItem();
|
||||
custom.setTitle("ADAS标准摄像头");
|
||||
custom.setValue("正常");
|
||||
itemInfo.setItemList(custom);
|
||||
detailItem.add(custom);
|
||||
|
||||
CheckItemInfo.DetailItem guangJiaoBe = new CheckItemInfo.DetailItem();
|
||||
guangJiaoBe.setTitle("ADAS广焦摄像头-后");
|
||||
guangJiaoBe.setValue("正常");
|
||||
itemInfo.setItemList(guangJiaoBe);
|
||||
detailItem.add(guangJiaoBe);
|
||||
|
||||
CheckItemInfo.DetailItem rtk = new CheckItemInfo.DetailItem();
|
||||
rtk.setTitle("RTK设备");
|
||||
rtk.setValue("正常");
|
||||
itemInfo.setItemList(rtk);
|
||||
detailItem.add(rtk);
|
||||
|
||||
CheckItemInfo.DetailItem obu = new CheckItemInfo.DetailItem();
|
||||
obu.setTitle("OUB设备");
|
||||
obu.setValue("正常");
|
||||
itemInfo.setItemList(obu);
|
||||
detailItem.add(obu);
|
||||
|
||||
CheckItemInfo.DetailItem luyou = new CheckItemInfo.DetailItem();
|
||||
luyou.setTitle("路由器");
|
||||
luyou.setValue("正常");
|
||||
itemInfo.setItemList(luyou);
|
||||
arrHardware.add(itemInfo);
|
||||
detailItem.add(luyou);
|
||||
itemInfo.setItemList(detailItem);
|
||||
|
||||
arrHardware.add(itemInfo);
|
||||
dataArrayList.add(arrHardware);
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.mogo.module.check.R;
|
||||
import com.mogo.module.check.model.CheckItemInfo;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.tencent.bugly.proguard.A;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -166,6 +167,9 @@ public class CheckAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
}
|
||||
} else if (position == dataArrayList.size() - 1) {
|
||||
((CheckListViewHolder) holder).viewTitle.setText("硬件检测:");
|
||||
if (list instanceof ArrayList) {
|
||||
refreshHardware(holder, (ArrayList) list);
|
||||
}
|
||||
} else {
|
||||
if (list instanceof ArrayList && ((ArrayList) list).size() > 1) {
|
||||
CheckItemInfo item = (CheckItemInfo) ((ArrayList) list).get(0);
|
||||
@@ -218,9 +222,14 @@ public class CheckAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||
|
||||
|
||||
/**
|
||||
* 硬件检测指标
|
||||
*
|
||||
* @param list
|
||||
*/
|
||||
public void refreshHardware(ArrayList list){
|
||||
public void refreshHardware(@NonNull RecyclerView.ViewHolder holder, ArrayList list) {
|
||||
if (list.size() > 0) {
|
||||
CheckItemInfo info = (CheckItemInfo) list.get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user