3 天以前 ac2545f3cd01f3061a107e4980fc6fa59eaeaa6b
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
package cn.iocoder.yudao.module.mes.controller.admin.pro.batch.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 org.springframework.format.annotation.DateTimeFormat;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
 
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
 
@Schema(description = "管理后台 - MES 生产批次新增/修改 Request VO")
@Data
public class MesProBatchSaveReqVO {
 
    @Schema(description = "编号", example = "1024")
    private Long id;
 
    @Schema(description = "品种(产品物料)编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "品种不能为空")
    private Long itemId;
 
    @Schema(description = "产线编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "产线不能为空")
    private Long lineId;
 
    @Schema(description = "生产日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "生产日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime produceDate;
 
    @Schema(description = "计划数量", example = "1000")
    private BigDecimal planQuantity;
 
    @Schema(description = "责任人用户编号(责任落实到人)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "责任人不能为空")
    private Long ownerUserId;
 
    @Schema(description = "备注", example = "加急批次")
    private String remark;
 
    @Schema(description = "生产人员配置列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "生产人员配置不能为空")
    @Valid
    private List<Worker> workers;
 
    @Schema(description = "生产人员配置")
    @Data
    public static class Worker {
 
        @Schema(description = "编号(更新时传入)", example = "1024")
        private Long id;
 
        @Schema(description = "生产人员用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        @NotNull(message = "生产人员不能为空")
        private Long userId;
 
        @Schema(description = "岗位类型(字典 mes_pro_batch_worker_type)", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        @NotNull(message = "岗位类型不能为空")
        private Integer workerType;
 
        @Schema(description = "备注")
        private String remark;
 
    }
 
}