xiaoyi
4 天以前 fae95228037f0c1304c1917ae5fff452f2160c5a
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.train;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
 
/**
 * 安全生产 - 事故登记新增/修改 Request VO
 *
 * @author 超级管理员
 */
@Schema(description = "管理后台 - 事故登记新增/修改 Request VO")
@Data
public class SafetyAccidentSaveReqVO {
 
    private Long id;
 
    @Schema(description = "事故名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "10kV 开关柜误操作触电")
    @NotBlank(message = "事故名称不能为空")
    @Size(max = 200)
    private String title;
 
    @Schema(description = "事故类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "ELECTRIC_SHOCK")
    @NotBlank(message = "事故类型不能为空")
    @Pattern(regexp = "ELECTRIC_SHOCK|FIRE|FALL|OBJECT_STRIKE|MECHANICAL|CHEMICAL|VEHICLE|OTHER", message = "事故类型不合法")
    private String accidentType;
 
    @Schema(description = "事故等级", example = "GENERAL")
    @Pattern(regexp = "SLIGHT|GENERAL|SEVERE|MAJOR", message = "事故等级不合法")
    private String level;
 
    @Schema(description = "发生时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "发生时间不能为空")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime occurTime;
 
    @Schema(description = "发生地点")
    @Size(max = 200)
    private String location;
 
    @Schema(description = "所属车间(关联 mes_md_workshop)")
    private Long workshopId;
 
    @Schema(description = "伤亡情况")
    @Size(max = 500)
    private String casualtyDesc;
 
    @Schema(description = "直接经济损失(元)")
    @DecimalMin(value = "0", message = "经济损失不能为负数")
    private BigDecimal economicLoss;
 
    @Schema(description = "涉事人员姓名,逗号分隔")
    @Size(max = 500)
    private String involvedPersons;
 
    @Schema(description = "事故经过")
    @Size(max = 2000)
    private String description;
 
    @Schema(description = "原因分析")
    @Size(max = 2000)
    private String causeAnalysis;
 
    @Schema(description = "处理措施与整改要求")
    @Size(max = 2000)
    private String measures;
 
    @Schema(description = "登记人(员工编号,关联 hrm_employee)")
    private Long reporterId;
 
    @Schema(description = "登记时间")
    @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
    private LocalDateTime reportTime;
 
    @Schema(description = "状态", example = "REPORTED")
    @Pattern(regexp = "REPORTED|INVESTIGATING|HANDLED|CLOSED", message = "状态不合法")
    private String status;
 
    @Schema(description = "现场照片/调查报告 URL,逗号分隔")
    @Size(max = 2000)
    private String attachment;
 
    @Schema(description = "备注")
    @Size(max = 500)
    private String remark;
 
}