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
49
50
51
52
53
54
package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.inspection;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.time.LocalDateTime;
 
/**
 * 安全生产 - 巡检记录新增/修改 Request VO
 *
 * @author 超级管理员
 */
@Schema(description = "管理后台 - 巡检记录新增/修改 Request VO")
@Data
public class SafetyInspectionSaveReqVO {
 
    private Long id;
 
    @Schema(description = "巡检点位编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "巡检点位不能为空")
    private Long pointId;
 
    @Schema(description = "巡检时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "巡检时间不能为空")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime inspectTime;
 
    @Schema(description = "巡检人(员工编号,关联 hrm_employee)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "请选择巡检人")
    private Long inspectorId;
 
    @Schema(description = "巡检结果", example = "NORMAL")
    @Pattern(regexp = "NORMAL|ABNORMAL", message = "巡检结果只能为正常或异常")
    private String result;
 
    @Schema(description = "巡检内容与情况")
    @Size(max = 2000)
    private String content;
 
    @Schema(description = "现场照片 URL,逗号分隔")
    @Size(max = 2000)
    private String photoUrls;
 
    @Schema(description = "本次发现的隐患数", example = "0")
    @Min(value = 0, message = "隐患数不能为负数")
    private Integer hazardCount;
 
    @Schema(description = "备注")
    @Size(max = 500)
    private String remark;
 
}