Browse Source

表结构调整

jichaobo 2 years ago
parent
commit
8859b4b253

+ 20 - 9
service-fire/service-fire-biz/src/main/java/com/usky/fire/domain/AlarmDetector.java

@@ -2,12 +2,13 @@ package com.usky.fire.domain;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
-import java.time.LocalDateTime;
-import java.io.Serializable;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
 /**
  * <p>
  * 独立式无线探测器告警
@@ -21,7 +22,7 @@ import lombok.experimental.Accessors;
 @Accessors(chain = true)
 public class AlarmDetector implements Serializable {
 
-    private static final long serialVersionUID=1L;
+    private static final long serialVersionUID = 1L;
 
     @TableId(value = "id", type = IdType.AUTO)
     private Integer id;
@@ -56,25 +57,35 @@ public class AlarmDetector implements Serializable {
      */
     private Integer systemType;
 
+    /**
+     * 端口
+     */
+    private String portNum;
+
     /**
      * 告警类型(如WP1、WP2)
      */
     private String alarmType;
 
     /**
-     * 电池电量
+     * 属性值1
+     */
+    private Integer attributeValue1;
+
+    /**
+     * 属性值2
      */
-    private Integer batteryLevel;
+    private String attributeValue2;
 
     /**
-     * 信号强度
+     * 属性值3
      */
-    private String signalIntensity;
+    private String attributeValue3;
 
     /**
-     * 告警值
+     * 属性值4
      */
-    private Double alarmValue;
+    private String attributeValue4;
 
     /**
      * 处理人

+ 10 - 6
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/impl/AlarmDetectorServiceImpl.java

@@ -62,10 +62,12 @@ public class AlarmDetectorServiceImpl extends AbstractCrudService<AlarmDetectorM
             alarmDetectorVo.setDeviceStatus(alarmDetectorList.getRecords().get(i).getDeviceStatus());
             alarmDetectorVo.setAddress(alarmDetectorList.getRecords().get(i).getAddress());
             alarmDetectorVo.setSystemType(alarmDetectorList.getRecords().get(i).getSystemType());
+            alarmDetectorVo.setPortNum(alarmDetectorList.getRecords().get(i).getPortNum());
             alarmDetectorVo.setAlarmType(alarmDetectorList.getRecords().get(i).getAlarmType());
-            alarmDetectorVo.setBatteryLevel(alarmDetectorList.getRecords().get(i).getBatteryLevel());
-            alarmDetectorVo.setSignalIntensity(alarmDetectorList.getRecords().get(i).getSignalIntensity());
-            alarmDetectorVo.setAlarmValue(alarmDetectorList.getRecords().get(i).getAlarmValue());
+            alarmDetectorVo.setAttributeValue1(alarmDetectorList.getRecords().get(i).getAttributeValue1());
+            alarmDetectorVo.setAttributeValue2(alarmDetectorList.getRecords().get(i).getAttributeValue2());
+            alarmDetectorVo.setAttributeValue3(alarmDetectorList.getRecords().get(i).getAttributeValue3());
+            alarmDetectorVo.setAttributeValue4(alarmDetectorList.getRecords().get(i).getAttributeValue4());
             alarmDetectorVo.setHandler(alarmDetectorList.getRecords().get(i).getHandler());
             if (alarmDetectorList.getRecords().get(i).getHandlingTime() != null) {
                 alarmDetectorVo.setHandlingTime(df.format(alarmDetectorList.getRecords().get(i).getHandlingTime()));
@@ -189,10 +191,12 @@ public class AlarmDetectorServiceImpl extends AbstractCrudService<AlarmDetectorM
             alarmDetectorVo.setDeviceStatus(alarmDetectorList.getRecords().get(i).getDeviceStatus());
             alarmDetectorVo.setAddress(alarmDetectorList.getRecords().get(i).getAddress());
             alarmDetectorVo.setSystemType(alarmDetectorList.getRecords().get(i).getSystemType());
+            alarmDetectorVo.setPortNum(alarmDetectorList.getRecords().get(i).getPortNum());
             alarmDetectorVo.setAlarmType(alarmDetectorList.getRecords().get(i).getAlarmType());
-            alarmDetectorVo.setBatteryLevel(alarmDetectorList.getRecords().get(i).getBatteryLevel());
-            alarmDetectorVo.setSignalIntensity(alarmDetectorList.getRecords().get(i).getSignalIntensity());
-            alarmDetectorVo.setAlarmValue(alarmDetectorList.getRecords().get(i).getAlarmValue());
+            alarmDetectorVo.setAttributeValue1(alarmDetectorList.getRecords().get(i).getAttributeValue1());
+            alarmDetectorVo.setAttributeValue2(alarmDetectorList.getRecords().get(i).getAttributeValue2());
+            alarmDetectorVo.setAttributeValue3(alarmDetectorList.getRecords().get(i).getAttributeValue3());
+            alarmDetectorVo.setAttributeValue4(alarmDetectorList.getRecords().get(i).getAttributeValue4());
             alarmDetectorVo.setHandler(alarmDetectorList.getRecords().get(i).getHandler());
             if (alarmDetectorList.getRecords().get(i).getHandlingTime() != null) {
                 alarmDetectorVo.setHandlingTime(df.format(alarmDetectorList.getRecords().get(i).getHandlingTime()));

+ 16 - 7
service-fire/service-fire-biz/src/main/java/com/usky/fire/service/vo/AlarmDetectorVo.java

@@ -8,7 +8,6 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
-import java.time.LocalDateTime;
 
 /**
  * <p>
@@ -60,6 +59,11 @@ public class AlarmDetectorVo implements Serializable {
      */
     private Integer systemType;
 
+    /**
+     * 端口
+     */
+    private String portNum;
+
     /**
      * 告警类型(如WP1、WP2)
      */
@@ -67,20 +71,25 @@ public class AlarmDetectorVo implements Serializable {
     private String alarmType;
 
     /**
-     * 电池电量
+     * 属性值1
      */
-    private Integer batteryLevel;
+    private Integer attributeValue1;
 
     /**
-     * 信号强度
+     * 属性值2
      */
-    private String signalIntensity;
+    private String attributeValue2;
 
     /**
-     * 告警值
+     * 属性值3
      */
     @Excel(name = "告警值")
-    private Double alarmValue;
+    private String attributeValue3;
+
+    /**
+     * 属性值4
+     */
+    private String attributeValue4;
 
     /**
      * 处理人

+ 5 - 3
service-fire/service-fire-biz/src/main/resources/mapper/fire/AlarmDetectorMapper.xml

@@ -11,10 +11,12 @@
         <result column="device_status" property="deviceStatus"/>
         <result column="address" property="address"/>
         <result column="system_type" property="systemType"/>
+        <result column="port_num" property="portNum"/>
         <result column="alarm_type" property="alarmType"/>
-        <result column="battery_level" property="batteryLevel"/>
-        <result column="signal_intensity" property="signalIntensity"/>
-        <result column="alarm_value" property="alarmValue"/>
+        <result column="attribute_value1" property="attributeValue1"/>
+        <result column="attribute_value2" property="attributeValue2"/>
+        <result column="attribute_value3" property="attributeValue3"/>
+        <result column="attribute_value4" property="attributeValue4"/>
         <result column="handler" property="handler"/>
         <result column="handling_time" property="handlingTime"/>
         <result column="handling_content" property="handlingContent"/>