|
@@ -37,8 +37,7 @@ public class BaseDeviceResumeController extends BaseController {
|
|
|
@RequestParam(value = "startTime", required = false) String startTime,
|
|
|
@RequestParam(value = "endTime", required = false) String endTime) {
|
|
|
List<BaseDeviceResumeVo> baseDevicResumeVoList = baseDeviceResumeService.getBaseDeviceResume(cameraCode, startTime, endTime);
|
|
|
- List<BaseDeviceResumeVo> baseDeviceResumeVos = removeAdjacentFaults(baseDevicResumeVoList);
|
|
|
- return AjaxResult.success(baseDeviceResumeVos);
|
|
|
+ return AjaxResult.success(baseDevicResumeVoList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -55,15 +54,4 @@ public class BaseDeviceResumeController extends BaseController {
|
|
|
ExcelUtil<DeviceResumeResp> util = new ExcelUtil<>(DeviceResumeResp.class);
|
|
|
util.exportExcel(response, deviceResumeRespList, "设备状态履历数据");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- public static List<BaseDeviceResumeVo> removeAdjacentFaults(List<BaseDeviceResumeVo> records) {
|
|
|
- List<BaseDeviceResumeVo> resultList = new ArrayList<>();
|
|
|
- for (int i = 0; i < records.size(); i++) {
|
|
|
- if (i == 0 || !records.get(i).getIsDisable().equals(records.get(i - 1).getIsDisable()) || "设备正常".equals(records.get(i).getIsDisable())) {
|
|
|
- resultList.add(records.get(i));
|
|
|
- }
|
|
|
- }
|
|
|
- return resultList;
|
|
|
- }
|
|
|
}
|