package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.permit; 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 SafetyWorkPermitSaveReqVO { private Long id; @Schema(description = "作业类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "HOT_WORK") @NotBlank(message = "作业类型不能为空") @Pattern(regexp = "HOT_WORK|LIVE_HIGH_VOLTAGE|LIMITED_SPACE|WORK_AT_HEIGHT|LIFTING|TEMP_ELECTRIC|OTHER", message = "作业类型不合法") private String permitType; @Schema(description = "作业名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "2#主变检修动火") @NotBlank(message = "作业名称不能为空") @Size(max = 200) private String title; @Schema(description = "作业车间(关联 mes_md_workshop)") private Long workshopId; @Schema(description = "作业地点") @Size(max = 200) private String location; @Schema(description = "作业内容与范围") @Size(max = 2000) private String workContent; @Schema(description = "申请人(员工编号,关联 hrm_employee)", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "请选择申请人") private Long applicantId; @Schema(description = "申请时间") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime applyTime; @Schema(description = "计划开始时间", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "计划开始时间不能为空") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime planStartTime; @Schema(description = "计划结束时间", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "计划结束时间不能为空") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) private LocalDateTime planEndTime; @Schema(description = "风险等级", example = "HIGH") @Pattern(regexp = "LOW|NORMAL|HIGH|VERY_HIGH", message = "风险等级不合法") private String riskLevel; @Schema(description = "安全措施") @Size(max = 2000) private String safetyMeasures; @Schema(description = "监护人(员工编号,关联 hrm_employee)") private Long guardianId; @Schema(description = "作业票附件 URL,逗号分隔") @Size(max = 2000) private String attachment; @Schema(description = "现场照片 URL,逗号分隔") @Size(max = 2000) private String photoUrls; @Schema(description = "备注") @Size(max = 500) private String remark; }