1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.hazard;
 
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.time.LocalDateTime;
 
/**
 * 安全生产 - 隐患分页 Request VO
 *
 * @author 超级管理员
 */
@Schema(description = "管理后台 - 隐患分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class SafetyHazardPageReqVO extends PageParam {
 
    private String code;
    private String title;
    private String level;
    private String source;
    private String status;
    private String assignee;
    private String location;
 
    @Schema(description = "上报时间范围")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime[] reportTime;
 
    @Schema(description = "上报时间开始(内部使用)", hidden = true)
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime reportTimeStart;
 
    @Schema(description = "上报时间结束(内部使用)", hidden = true)
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime reportTimeEnd;
 
    public void normalizeTimeRange() {
        if (reportTime != null && reportTime.length == 2) {
            this.reportTimeStart = reportTime[0];
            this.reportTimeEnd = reportTime[1];
        }
    }
 
}