diff --git a/haiwei-admin/src/main/java/com/haiwei/web/controller/broad/ApiController.java b/haiwei-admin/src/main/java/com/haiwei/web/controller/broad/ApiController.java index 7ff79c8..6865b00 100644 --- a/haiwei-admin/src/main/java/com/haiwei/web/controller/broad/ApiController.java +++ b/haiwei-admin/src/main/java/com/haiwei/web/controller/broad/ApiController.java @@ -71,15 +71,14 @@ public class ApiController { System.out.println(beginTime.toString()); return success(iApiService.queryPramList(beginTime, endTime)); } - /* @PostMapping("/home/exportParamList") + @PostMapping("/home/exportParamList") @ResponseBody public AjaxResult export(Date beginTime, Date endTime) { - List recordRaramData = iApiService.queryPramList(beginTime, endTime); - List list = baseDeviceInfoService.selectBaseDeviceInfoList(baseDeviceInfo); - ExcelUtil util = new ExcelUtil(BaseDeviceInfo.class); - return util.exportExcel(list, "base_device_info"); - }*/ + List list = iApiService.queryPramList(beginTime, endTime); + ExcelUtil util = new ExcelUtil(RecordRaramData.class); + return util.exportExcel(list, "数据记录"); + } @ApiOperation(tags = {"60脱水机"}, value = "设备介绍") @GetMapping("/home/deviceInfo") public AjaxResult deviceInfo() { diff --git a/haiwei-manage/src/main/java/com/haiwei/manage/domain/RecordRaramData.java b/haiwei-manage/src/main/java/com/haiwei/manage/domain/RecordRaramData.java index 79498b0..c963577 100644 --- a/haiwei-manage/src/main/java/com/haiwei/manage/domain/RecordRaramData.java +++ b/haiwei-manage/src/main/java/com/haiwei/manage/domain/RecordRaramData.java @@ -1,17 +1,27 @@ package com.haiwei.manage.domain; +import com.haiwei.common.annotation.Excel; + /** * @author wanghao * @date 2023/8/31 14:01 */ public class RecordRaramData { - private String time, - 一体机A转速, - 一体机A电流, - 一体机A切刀转速, - 一体机A切刀电流, - 一体机A机头温度, - 一体机A机头压力; + + @Excel(name = "采集时间") + private String time; + @Excel(name = "一体机A转速") + private String 一体机A转速; + @Excel(name = "一体机A电流") + private String 一体机A电流; + @Excel(name = "切刀转速") + private String 一体机A切刀转速; + @Excel(name = "切刀电流") + private String 一体机A切刀电流; + @Excel(name = "机头温度") + private String 一体机A机头温度; + @Excel(name = "机头压力") + private String 一体机A机头压力; public String getTime() { return time;