bobol
11 months ago
16 changed files with 417 additions and 94 deletions
@ -0,0 +1,22 @@ |
|||
package com.lzbi.common.constant; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
public class PartitionConstants { |
|||
|
|||
public static final Map<String, String> partition = new HashMap<>(); |
|||
|
|||
static { |
|||
partition.put("A", "低区"); |
|||
partition.put("B", "中区"); |
|||
partition.put("C", "高区"); |
|||
partition.put("D", "别墅区"); |
|||
partition.put("E", "商业区"); |
|||
partition.put("F", "中高区"); |
|||
partition.put("G", "空调低区"); |
|||
partition.put("H", "空调高区"); |
|||
partition.put("I", "厂房区"); |
|||
partition.put("J", "办公区"); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.lzbi.task.domain; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @auth create by Administrator |
|||
* @date 2023/11/30 |
|||
* ReadQueryParams |
|||
*/ |
|||
@Data |
|||
public class ReadQueryReq { |
|||
|
|||
@NotNull(message = "请输入起始时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH") |
|||
private String beginTime; |
|||
|
|||
@NotNull(message = "请输入结束时间") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH") |
|||
private String endTime; |
|||
|
|||
private List<String> deviceCodes; |
|||
|
|||
private List<String> paramCodes; |
|||
} |
@ -0,0 +1,63 @@ |
|||
package com.lzbi.task.domain; |
|||
|
|||
import java.util.List; |
|||
|
|||
public class SheetInfoBean { |
|||
|
|||
/** |
|||
* sheet页名称 |
|||
*/ |
|||
private String sheetName; |
|||
|
|||
/** |
|||
* sheet标题bean |
|||
*/ |
|||
private Class<?> headClass; |
|||
|
|||
/** |
|||
* sheet页数据 |
|||
*/ |
|||
private List<?> dataList; |
|||
|
|||
public SheetInfoBean() { |
|||
} |
|||
|
|||
public SheetInfoBean(String sheetName, Class<?> headClass, List<?> dataList) { |
|||
this.sheetName = sheetName; |
|||
this.headClass = headClass; |
|||
this.dataList = dataList; |
|||
} |
|||
|
|||
public String getSheetName() { |
|||
return sheetName; |
|||
} |
|||
|
|||
public void setSheetName(String sheetName) { |
|||
this.sheetName = sheetName; |
|||
} |
|||
|
|||
public Class<?> getHeadClass() { |
|||
return headClass; |
|||
} |
|||
|
|||
public void setHeadClass(Class<?> headClass) { |
|||
this.headClass = headClass; |
|||
} |
|||
|
|||
public List<?> getDataList() { |
|||
return dataList; |
|||
} |
|||
|
|||
public void setDataList(List<?> dataList) { |
|||
this.dataList = dataList; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return "SheetInfoBean{" + |
|||
"sheetName='" + sheetName + '\'' + |
|||
", headClass=" + headClass + |
|||
", dataList=" + dataList + |
|||
'}'; |
|||
} |
|||
} |
@ -1,26 +1,37 @@ |
|||
package com.lzbi.task.domain; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.alibaba.excel.annotation.write.style.ContentStyle; |
|||
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum; |
|||
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@ContentStyle(verticalAlignment = VerticalAlignmentEnum.CENTER, horizontalAlignment = HorizontalAlignmentEnum.CENTER) |
|||
@ColumnWidth(20) |
|||
@Data |
|||
public class ThourWeatherVO { |
|||
|
|||
/** |
|||
* 城市 |
|||
*/ |
|||
@ExcelProperty("区域") |
|||
private String city; |
|||
/** |
|||
* 时间 |
|||
*/ |
|||
@ExcelProperty("时间") |
|||
private String thour; |
|||
/** |
|||
* 天气 |
|||
*/ |
|||
@ExcelProperty("天气") |
|||
private String weather; |
|||
/** |
|||
* 温度 |
|||
*/ |
|||
@ExcelProperty("气温") |
|||
private Double temperature; |
|||
/** |
|||
* 时间 |
|||
*/ |
|||
private String thour; |
|||
} |
|||
|
Loading…
Reference in new issue