Explorar el Código

异物侵限报警修改

gao.qiang hace 2 semanas
padre
commit
5eb18bb8fb

+ 1 - 1
business-service/src/main/java/com/ozs/service/entity/vo/DeviceResumeResp.java

@@ -40,7 +40,7 @@ public class DeviceResumeResp extends PageVo implements Serializable {
     @Excel(name = "线路类型",readConverterExp = "1=高铁,2=普铁")
     private Integer railwayType;
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date createTime ;
     @Excel(name = "相机状态",readConverterExp = "1=正常,2=故障")
     private String isDisable;

+ 1 - 1
business-service/src/main/java/com/ozs/service/entity/vo/ElectricityResumeResp.java

@@ -39,7 +39,7 @@ public class ElectricityResumeResp extends PageVo implements Serializable {
     @Excel(name = "线路类型",readConverterExp = "1=高铁,2=普铁")
     private Integer railwayType;
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date createTime ;
     @Excel(name = "电量(%)")
     private Integer electricity;

+ 1 - 1
business-service/src/main/java/com/ozs/service/utils/PublishCallback.java

@@ -67,7 +67,7 @@ public class PublishCallback implements MqttCallback {
                     sign = (String) object.get("sign");
                     deviceSn = (String) object.get("device_sn");
                 }
-                CallbackUtil.heart(deviceSn);
+//                CallbackUtil.heart(deviceSn);
                 PublishClient.pull(sign, deviceSn);
             } catch (Exception e) {
                 logger.error(e.getMessage());

+ 1 - 13
hazard-admin/src/main/java/com/ozs/web/controller/accountmanagment/BaseDeviceResumeController.java

@@ -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;
-    }
 }