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
92
93
94
95
96
97
98
99
100
101
102
103
104
package cn.iocoder.yudao.module.mes.controller.admin.pro.mps.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
 
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
 
/**
 * MES 生产主计划 - 生产准备检查结果 Response VO
 *
 * 基于生产计划检查物料、设备两类生产要素是否齐备
 */
@Schema(description = "管理后台 - 生产准备检查结果 Response VO")
@Data
public class MesProMpsPreparationCheckRespVO {
 
    @Schema(description = "计划编号", example = "1")
    private Long mpsId;
 
    @Schema(description = "计划单号", example = "MPS20261103001")
    private String mpsCode;
 
    @Schema(description = "产品编号", example = "1")
    private Long productId;
 
    @Schema(description = "产品名称", example = "法兰盘")
    private String productName;
 
    @Schema(description = "计划数量", example = "100")
    private BigDecimal quantity;
 
    @Schema(description = "物料是否齐备")
    private Boolean materialReady;
 
    @Schema(description = "设备是否齐备")
    private Boolean equipmentReady;
 
    @Schema(description = "是否可以进行生产")
    private Boolean ready;
 
    @Schema(description = "检查结论说明,例如「3 项物料短缺、2 台设备不可用」")
    private String summary;
 
    @Schema(description = "物料检查明细")
    private List<MaterialCheck> materials = new ArrayList<>();
 
    @Schema(description = "设备检查明细")
    private List<EquipmentCheck> equipments = new ArrayList<>();
 
    @Schema(description = "物料检查明细")
    @Data
    public static class MaterialCheck {
 
        @Schema(description = "物料编号")
        private Long itemId;
        @Schema(description = "物料编码")
        private String itemCode;
        @Schema(description = "物料名称")
        private String itemName;
        @Schema(description = "规格")
        private String specification;
        @Schema(description = "单位")
        private String unitMeasureName;
        @Schema(description = "需求数量")
        private BigDecimal requiredQuantity;
        @Schema(description = "现有库存")
        private BigDecimal stockQuantity;
        @Schema(description = "在途采购数量")
        private BigDecimal purchaseOrderQuantity;
        @Schema(description = "缺口数量")
        private BigDecimal shortageQuantity;
        @Schema(description = "是否充足")
        private Boolean sufficient;
 
    }
 
    @Schema(description = "设备检查明细")
    @Data
    public static class EquipmentCheck {
 
        @Schema(description = "工序编号")
        private Long processId;
        @Schema(description = "工序名称")
        private String processName;
        @Schema(description = "设备编号")
        private Long machineryId;
        @Schema(description = "设备编码")
        private String machineryCode;
        @Schema(description = "设备名称")
        private String machineryName;
        @Schema(description = "设备状态(1-停机 2-生产中 3-维护中)")
        private Integer status;
        @Schema(description = "设备状态名称")
        private String statusName;
        @Schema(description = "是否可用")
        private Boolean available;
        @Schema(description = "不可用原因")
        private String reason;
 
    }
 
}