package cn.iocoder.yudao.module.mes.controller.admin.pro.maintenanceplan.vo; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; @Schema(description = "管理后台 - MES 电力作业计划新增/修改 Request VO") @Data public class MesProMaintenancePlanSaveReqVO { @Schema(description = "编号(修改时必填)", example = "1") private Long id; @Schema(description = "计划名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "8月变电运维计划") @NotEmpty(message = "计划名称不能为空") private String name; @Schema(description = "计划类型(1=电网运行,2=发电,3=变电运维,4=线路检修)", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") @NotNull(message = "计划类型不能为空") private Integer planType; @Schema(description = "站点", example = "220kV城东变电站") private String station; @Schema(description = "线路", example = "城东-工业线路") private String line; @Schema(description = "班组编号", example = "1") private Long teamId; @Schema(description = "班组名称", example = "运维一班") private String teamName; @Schema(description = "计划日期", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "计划日期不能为空") private LocalDateTime planDate; @Schema(description = "备注", example = "备注") private String remark; @Schema(description = "备件/物资需求明细", requiredMode = Schema.RequiredMode.REQUIRED) @NotEmpty(message = "备件/物资需求明细不能为空") @Valid private List items; @Schema(description = "备件/物资需求明细项") @Data public static class Item { @Schema(description = "编号(修改时必填)", example = "1") private Long id; @Schema(description = "物料/备件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "物料/备件不能为空") private Long itemId; @Schema(description = "需求数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") @NotNull(message = "需求数量不能为空") private BigDecimal quantity; @Schema(description = "备注", example = "备注") private String remark; @Schema(description = "物料名称(前端展示用,后端忽略)", example = "绝缘子") private String itemName; @Schema(description = "物料编码(前端展示用,后端忽略)", example = "ITEM001") private String itemCode; @Schema(description = "计量单位名称(前端展示用,后端忽略)", example = "个") private String unitMeasureName; } }