Преглед изворни кода

Merge branch 'feature-management-2021-9-16'

yq пре 3 година
родитељ
комит
f14e8b5d0c

+ 16 - 0
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceAnalogVariableListController.java

@@ -108,6 +108,7 @@ public class DeviceAnalogVariableListController {
 
     /**
      * 站点管理-变量列表-(监控设备为零)变量下拉框
+     *
      * @return
      */
     @GetMapping("variableListDroplist")
@@ -116,5 +117,20 @@ public class DeviceAnalogVariableListController {
         return ApiResult.success(deviceAnalogVariableListService.variableListDroplist());
     }
 
+
+    /**
+     * 变量列表-导出
+     * @param siteId 站点ID
+     * @param variableName 变量名称
+     * @param dataArea 1.模拟量 2.状态量 3.参数量
+     * @return
+     */
+    @GetMapping("variableListExport")
+    public ApiResult<String> variableListExport(@RequestParam Integer siteId,
+                                                @RequestParam(required = false) String variableName,
+                                                @RequestParam(value = "dataArea", required = false, defaultValue = "1") Integer dataArea) {
+        return ApiResult.success(deviceAnalogVariableListService.variableListExport(siteId,variableName,dataArea));
+    }
+
 }
 

+ 20 - 8
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceAttributeController.java

@@ -9,8 +9,6 @@ import com.bizmatics.service.DeviceAttributeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
-
 /**
  * 设备管理-监控设备
  *
@@ -51,9 +49,9 @@ public class DeviceAttributeController {
     /**
      * 站点管理/设备管理-监控设备-设备列表查询
      *
-     * @param id     device_attribute表主键ID
-     * @param siteId 点位ID
-     * @param size 条数
+     * @param id      device_attribute表主键ID
+     * @param siteId  点位ID
+     * @param size    条数
      * @param current 页数
      * @return
      */
@@ -86,9 +84,23 @@ public class DeviceAttributeController {
      */
     @GetMapping("monitorDeviceList")
     public ApiResult<CommonPage<MonitorDeviceListVO>> monitorDeviceList(@RequestParam(required = false) String siteName,
-                                                                  @RequestParam(value = "size", required = false, defaultValue = "15") int size,
-                                                                  @RequestParam(value = "current", required = false, defaultValue = "1") int current) {
-        return ApiResult.success(deviceAttributeService.monitorDeviceList(siteName,size,current));
+                                                                        @RequestParam(value = "size", required = false, defaultValue = "15") int size,
+                                                                        @RequestParam(value = "current", required = false, defaultValue = "1") int current) {
+        return ApiResult.success(deviceAttributeService.monitorDeviceList(siteName, size, current));
+    }
+
+    /**
+     * 站点管理/设备管理-监控设备-列表导出
+     * @param siteId 站点ID
+     * @param id 监控漫设备ID
+     * @return
+     */
+    @GetMapping("deviceAttributeExport")
+    public ApiResult<String> deviceAttributeExport(@RequestParam int siteId,
+                                                   @RequestParam(value = "id", required = false, defaultValue = "0") int id
+    ) {
+        return ApiResult.success(deviceAttributeService.deviceAttributeExport(id, siteId));
     }
+
 }
 

+ 24 - 28
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceController.java

@@ -3,27 +3,22 @@ package com.bizmatics.controller.web;
 
 import com.bizmatics.common.core.bean.ApiResult;
 import com.bizmatics.common.core.bean.CommonPage;
-import com.bizmatics.common.core.util.DateUtils;
 import com.bizmatics.model.Device;
 import com.bizmatics.model.DeviceList;
-import com.bizmatics.model.HtAnalogData;
 import com.bizmatics.model.vo.CorrespondDeviceListVO;
 import com.bizmatics.model.vo.CorrespondDeviceVO;
 import com.bizmatics.model.vo.DeviceOneVo;
-import com.bizmatics.persistence.mapper.DeviceMapper;
-import com.bizmatics.persistence.mapper.HtAnalogDataMapper;
 import com.bizmatics.service.DeviceService;
 import com.bizmatics.service.vo.DeviceCountVO;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
 /**
- * 设备
+ * 设备管理-通信设备
  *
  * @author ya
  * @since 2021-07-07
@@ -35,13 +30,6 @@ public class DeviceController {
     @Autowired
     private DeviceService deviceService;
 
-    @Autowired
-    private DeviceMapper deviceMapper;
-
-    @Autowired
-    private HtAnalogDataMapper htAnalogDataMapper;
-
-
     /**
      * 查询设备总数
      *
@@ -66,19 +54,12 @@ public class DeviceController {
         return ApiResult.success(deviceService.selectDeviceCountByType(site));
     }
 
-    @GetMapping("/test")
-    public List<String> test() {
-        List<Device> list = deviceMapper.list(1, null, null, null, null, null);
-        List<String> list1 = new ArrayList<>();
-        for (Device device : list) {
-            long l = System.currentTimeMillis();
-            List<HtAnalogData> list2 = htAnalogDataMapper.list(DateUtils.addYears(new Date(), -10), new Date(), device.getDeviceCode());
-            long e = System.currentTimeMillis();
-            log.info("一个站点的数据获取时间" + (e - l));
-        }
-        return list1;
-    }
-
+    /**
+     * 通信设备-设备下拉框查询
+     *
+     * @param siteId 站点ID
+     * @return
+     */
     @GetMapping("deviceList")
     public ApiResult<List<DeviceList>> deviceList(@RequestParam String siteId) {
         return ApiResult.success(deviceService.deviceList(siteId));
@@ -183,11 +164,12 @@ public class DeviceController {
 
 
     /**
+     * 设备管理-通信设备-克隆
      *
-     * @param type 1 新设备 2 已有设备
+     * @param type          1 新设备 2 已有设备
      * @param newDeviceCode 克隆设备对象
      * @param oldDeviceCode 设备编号
-     * @param deviceName 设备名称
+     * @param deviceName    设备名称
      * @return
      */
     @GetMapping("variableCloning")
@@ -199,5 +181,19 @@ public class DeviceController {
         deviceService.variableCloning(type, newDeviceCode, oldDeviceCode, deviceName);
         return ApiResult.success();
     }
+
+
+    /**
+     * 通信设备列表查询-无分页
+     *
+     * @param siteId     站点ID
+     * @param deviceType 1电力 2视频
+     * @return
+     */
+    @GetMapping("deviceListOne")
+    public ApiResult<List<Device>> deviceListOne(@RequestParam Integer siteId,
+                                                 @RequestParam(value = "deviceType", required = false, defaultValue = "1") Integer deviceType) {
+        return ApiResult.success(deviceService.deviceListOne(siteId, deviceType));
+    }
 }
 

+ 9 - 1
fiveep-persistence/src/main/java/com/bizmatics/persistence/mapper/DeviceAnalogVariableListMapper.java

@@ -1,6 +1,9 @@
 package com.bizmatics.persistence.mapper;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.bizmatics.common.mvc.base.CrudMapper;
+import com.bizmatics.model.AlarmPower;
 import com.bizmatics.model.DeviceAnalogVariableList;
 import com.bizmatics.model.vo.DeviceAnalogVariableListOneVo;
 import org.apache.ibatis.annotations.Param;
@@ -22,7 +25,12 @@ public interface DeviceAnalogVariableListMapper extends CrudMapper<DeviceAnalogV
                                                      @Param("startCurrent") Integer startCurrent,
                                                      @Param("size") Integer size,
                                                      @Param("dataArea") Integer dataArea,
-                                                     @Param("monitoringEquipment")Integer monitoringEquipment);
+                                                     @Param("monitoringEquipment") Integer monitoringEquipment);
+
+    Page<DeviceAnalogVariableListOneVo> variableListExport(IPage<DeviceAnalogVariableListOneVo> page,
+                                                           @Param("siteId") Integer siteId,
+                                                           @Param("variableName") String variableName,
+                                                           @Param("dataArea") Integer dataArea);
 
 
 }

+ 25 - 0
fiveep-persistence/src/main/resources/mapper/mysql/DeviceAnalogVariableListMapper.xml

@@ -52,4 +52,29 @@
         </if>
     </select>
 
+    <select id="variableListExport" resultType="com.bizmatics.model.vo.DeviceAnalogVariableListOneVo">
+        SELECT
+        a.*, b.device_name,
+        c.monitor_device_name
+        FROM
+        device_analog_variable_list AS a
+        JOIN device AS b ON a.communication_equipment = b.id
+        JOIN device_attribute AS c ON a.monitoring_equipment = c.id
+        <where>
+            a. STATUS = 1
+            AND b. ENABLE = 1
+            AND c. STATUS = 1
+            <if test="siteId != null and siteId !=0">
+                and c.site_id = #{siteId}
+            </if>
+            <if test="dataArea != null and dataArea !=0">
+                and a.data_area = #{dataArea}
+            </if>
+            <if test="variableName != null and variableName !=''">
+                and a.variable_name LIKE CONCAT(CONCAT('%', #{variableName}), '%')
+            </if>
+        </where>
+        order by a.id desc
+    </select>
+
 </mapper>

+ 9 - 18
fiveep-persistence/src/main/resources/mapper/mysql/HtAnalogDataMapper.xml

@@ -193,8 +193,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
                 and a.deviceName IN
@@ -281,8 +280,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             a.deviceName IN
@@ -370,8 +368,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName IN
@@ -458,8 +455,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName in
@@ -546,8 +542,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName in
@@ -634,8 +629,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName in
@@ -722,8 +716,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName in
@@ -810,8 +803,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName in
@@ -1028,8 +1020,7 @@
         d.id as device_attribute_id
         FROM
         ht_analog_data AS a
-        JOIN device AS b ON a.deviceName = b.device_code
-        JOIN device_analog_variable_list AS c ON b.id = c.communication_equipment
+        JOIN device_analog_variable_list AS c ON a.deviceName = c.device_code
         JOIN device_attribute AS d ON c.monitoring_equipment = d.id
         <where>
             and a.deviceName in

+ 2 - 0
fiveep-service/src/main/java/com/bizmatics/service/DeviceAnalogVariableListService.java

@@ -29,5 +29,7 @@ public interface DeviceAnalogVariableListService extends CrudService<DeviceAnalo
 
     List<DeviceAnalogVariableList> variableListDroplist();
 
+    String variableListExport(Integer siteId, String variableName, Integer dataArea);
+
 
 }

+ 2 - 0
fiveep-service/src/main/java/com/bizmatics/service/DeviceAttributeService.java

@@ -24,4 +24,6 @@ public interface DeviceAttributeService extends CrudService<DeviceAttribute> {
     void deviceNewsDel(int id);
 
     CommonPage<MonitorDeviceListVO> monitorDeviceList(String siteName,Integer size,Integer current);
+
+    String deviceAttributeExport(Integer id, Integer siteId);
 }

+ 2 - 0
fiveep-service/src/main/java/com/bizmatics/service/DeviceService.java

@@ -56,4 +56,6 @@ public interface DeviceService extends CrudService<Device> {
     CommonPage<Device> videoMonitoringDeviceList(String deviceName, Integer deviceType, Integer siteId, Integer size, Integer current);
 
     void variableCloning(Integer type, String newDeviceCode, String oldDeviceCode, String deviceName);
+
+    List<Device> deviceListOne(Integer siteId,Integer deviceType);
 }

+ 50 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/DeviceAnalogVariableListServiceImpl.java

@@ -1,20 +1,35 @@
 package com.bizmatics.service.impl;
 
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.common.core.exception.BusinessException;
+import com.bizmatics.common.core.util.BeanMapperUtils;
+import com.bizmatics.common.core.util.FileUtils;
 import com.bizmatics.common.mvc.base.AbstractCrudService;
+import com.bizmatics.common.spring.util.GlobalUtils;
+import com.bizmatics.model.AlarmPower;
 import com.bizmatics.model.DeviceAnalogVariableList;
+import com.bizmatics.model.DeviceAttribute;
 import com.bizmatics.model.system.SysUser;
 import com.bizmatics.model.vo.DeviceAnalogVariableListOneVo;
 import com.bizmatics.model.vo.DeviceAnalogVariableListVo;
 import com.bizmatics.persistence.mapper.DeviceAnalogVariableListMapper;
 import com.bizmatics.service.DeviceAnalogVariableListService;
 import com.bizmatics.service.util.SecurityUtils;
+import com.bizmatics.service.vo.DeviceAnalogVariableListExportVO;
+import com.bizmatics.service.vo.DeviceAttributeExportVO;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.stereotype.Service;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -100,5 +115,40 @@ public class DeviceAnalogVariableListServiceImpl extends AbstractCrudService<Dev
         return DeviceAnalogVariableListDroplist;
     }
 
+    @Override
+    public String variableListExport( Integer siteId,String variableName,Integer dataArea) {
+        Workbook workbook = null;
+        File file = null;
+        try {
+            ExportParams params = new ExportParams(null, "变量列表");
+            workbook = ExcelExportUtil.exportBigExcel(params, DeviceAnalogVariableListExportVO.class,
+                    (o, i) -> {
+                        Page<DeviceAnalogVariableListOneVo> page = new Page<>(i, 30);
+                        page = baseMapper.variableListExport(page,siteId, variableName, dataArea);
+                        return new ArrayList<>(BeanMapperUtils.mapList(page.getRecords(), DeviceAnalogVariableListOneVo.class, DeviceAnalogVariableListExportVO.class));
+                    }, null);
+            if (null != workbook) {
+                file = FileUtils.getFile(GlobalUtils.getTempBaseDir(), String.format("%s-%s.xlsx", "变量列表", System.currentTimeMillis() + ""));
+                FileUtils.createFile(file.getAbsolutePath());
+                FileOutputStream allListingFileOutputStream = new FileOutputStream(file);
+                workbook.write(allListingFileOutputStream);
+            } else {
+                throw new BusinessException("表格数据为空");
+            }
+        } catch (Exception e) {
+            log.error("导出文件失败", e);
+            throw new BusinessException("导出文件失败");
+        } finally {
+            if (workbook != null) {
+                try {
+                    workbook.close();
+                } catch (IOException e) {
+                    log.error("===export spec=== 关闭workbook失败", e);
+                }
+            }
+        }
+        return file.getName();
+    }
+
 
 }

+ 56 - 1
fiveep-service/src/main/java/com/bizmatics/service/impl/DeviceAttributeServiceImpl.java

@@ -1,12 +1,17 @@
 package com.bizmatics.service.impl;
 
+import cn.afterturn.easypoi.excel.ExcelExportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.bizmatics.common.core.bean.CommonPage;
+import com.bizmatics.common.core.exception.BusinessException;
+import com.bizmatics.common.core.util.BeanMapperUtils;
+import com.bizmatics.common.core.util.FileUtils;
 import com.bizmatics.common.mvc.base.AbstractCrudService;
-import com.bizmatics.model.DeviceAnalogVariableList;
+import com.bizmatics.common.spring.util.GlobalUtils;
 import com.bizmatics.model.DeviceAttribute;
 import com.bizmatics.model.system.SysUser;
 import com.bizmatics.model.vo.MonitorDeviceListVO;
@@ -14,9 +19,15 @@ import com.bizmatics.persistence.mapper.DeviceAttributeMapper;
 import com.bizmatics.service.DeviceAttributeService;
 import com.bizmatics.service.DeviceService;
 import com.bizmatics.service.util.SecurityUtils;
+import com.bizmatics.service.vo.DeviceAttributeExportVO;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -79,4 +90,48 @@ public class DeviceAttributeServiceImpl extends AbstractCrudService<DeviceAttrib
         List<MonitorDeviceListVO> monitorDeviceList = baseMapper.monitorDeviceList(siteName,startCurrent,size);
         return new CommonPage<>(monitorDeviceList, total, size,current);
     }
+
+
+    @Override
+    public String deviceAttributeExport(Integer id, Integer siteId) {
+        Integer userId = SecurityUtils.getLoginUser().getUser().getUserId().intValue();
+        Workbook workbook = null;
+        File file = null;
+        try {
+            ExportParams params = new ExportParams(null, "监控设备列表");
+            workbook = ExcelExportUtil.exportBigExcel(params, DeviceAttributeExportVO.class,
+                    (o, i) -> {
+                        Page<DeviceAttribute> page = new Page<DeviceAttribute>(i, 30);
+                        LambdaQueryWrapper<DeviceAttribute> queryWrapper = Wrappers.lambdaQuery();
+                        queryWrapper.eq(DeviceAttribute::getStatus, 1).eq(DeviceAttribute::getSiteId, siteId);
+                        if (id != 0) {
+                            queryWrapper.eq(DeviceAttribute::getId, id);
+                        }
+                        page = this.page(page, queryWrapper);
+//                        this.ToCommonPage(page);
+                        return new ArrayList<>(BeanMapperUtils.mapList(page.getRecords(), DeviceAttribute.class, DeviceAttributeExportVO.class));
+                    }, null);
+            if (null != workbook) {
+                file = FileUtils.getFile(GlobalUtils.getTempBaseDir(), String.format("%s-%s.xlsx", "监控设备列表", System.currentTimeMillis() + ""));
+                FileUtils.createFile(file.getAbsolutePath());
+                FileOutputStream allListingFileOutputStream = new FileOutputStream(file);
+                workbook.write(allListingFileOutputStream);
+            } else {
+                throw new BusinessException("表格数据为空");
+            }
+        } catch (Exception e) {
+            log.error("导出文件失败", e);
+            throw new BusinessException("导出文件失败");
+        } finally {
+            if (workbook != null) {
+                try {
+                    workbook.close();
+                } catch (IOException e) {
+                    log.error("===export spec=== 关闭workbook失败", e);
+                }
+            }
+        }
+        return file.getName();
+    }
+
 }

+ 9 - 0
fiveep-service/src/main/java/com/bizmatics/service/impl/DeviceServiceImpl.java

@@ -310,4 +310,13 @@ public class DeviceServiceImpl extends AbstractCrudService<DeviceMapper, Device>
         }
     }
 
+
+    @Override
+    public List<Device> deviceListOne(Integer siteId,Integer deviceType){
+        LambdaQueryWrapper<Device> queryWrapperTwo = Wrappers.lambdaQuery();
+        queryWrapperTwo.eq(Device::getEnable, 1).eq(Device::getSiteId, siteId).eq(Device::getDeviceType,deviceType);
+        List<Device> deviceListTwo = this.list(queryWrapperTwo);
+        return deviceListTwo;
+    }
+
 }

+ 80 - 0
fiveep-service/src/main/java/com/bizmatics/service/vo/DeviceAnalogVariableListExportVO.java

@@ -0,0 +1,80 @@
+package com.bizmatics.service.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author yq
+ * @date 2021/7/13 16:21
+ */
+@Data
+public class DeviceAnalogVariableListExportVO {
+    /**
+     * 变量列表id
+     */
+    private Integer id;
+
+    /**
+     * 设备编号
+     */
+    @Excel(name = "设备编号", height = 6, width = 20)
+    private String deviceCode;
+
+    /**
+     * 变量名
+     */
+    @Excel(name = "变量名", height = 6, width = 20)
+    private String variableName;
+
+    /**
+     * 变量编码
+     */
+    @Excel(name = "变量编码", height = 6, width = 20)
+    private String variableCoding;
+
+    /**
+     * 数据地址
+     */
+    @Excel(name = "数据地址", height = 6, width = 20)
+    private String dataAddress;
+
+    /**
+     * 数据类型
+     */
+    @Excel(name = "数据类型", height = 6, width = 20)
+    private String dataType;
+
+    /**
+     * 系数
+     */
+    @Excel(name = "系数", height = 6, width = 20)
+    private Float coefficient;
+
+    /**
+     * 存盘周期(分钟)
+     */
+    @Excel(name = "存盘周期(分钟)", height = 6, width = 20)
+    private Integer saveCycle;
+
+    /**
+     *  通信设备
+     */
+    @Excel(name = "通信设备", height = 6, width = 20)
+    private String deviceName;
+    /**
+     *  电力监控设备
+     */
+    @Excel(name = "监控设备", height = 6, width = 20)
+    private String monitorDeviceName;
+
+    /**
+     * 1.模拟量 2.状态量 3.参数量
+     */
+    @Excel(name = "变量类型", height = 6, width = 20)
+    private Integer dataArea;
+
+}

+ 57 - 0
fiveep-service/src/main/java/com/bizmatics/service/vo/DeviceAttributeExportVO.java

@@ -0,0 +1,57 @@
+package com.bizmatics.service.vo;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author yq
+ * @date 2021/7/13 16:21
+ */
+@Data
+public class DeviceAttributeExportVO {
+
+    private Integer id;
+
+    /**
+     * 监控设备编号
+     */
+    @Excel(name = "监控设备编号", height = 6, width = 20)
+    private String monitorDeviceCode;
+    /**
+     * 监控设备名称
+     */
+    @Excel(name = "监控设备名称", height = 6, width = 20)
+    private String monitorDeviceName;
+    /**
+     * 回路表计地址
+     */
+    @Excel(name = "回路表计地址", height = 6, width = 20)
+    private Integer loopMeterAddress;
+    /**
+     * 额定电压(kv)
+     */
+    @Excel(name = "额定电压(kv)", height = 6, width = 20)
+    private Double ratedVoltage;
+
+    /**
+     * 额定电流(A)
+     */
+    @Excel(name = "额定电流(A)", height = 6, width = 20)
+    private Double ratedCurrent;
+    /**
+     * 电流负载率门限
+     */
+    @Excel(name = "电流负载率门限", height = 6, width = 20)
+    private Double currentLoadRate;
+
+    /**
+     * 电能质量分析
+     */
+    @Excel(name = "电能质量分析", height = 6, width = 20)
+    private String qualityAnalysis;
+
+}