huang
2025-11-17 e76f0739e647fe8a7e0e2618914e2faff554b1b7
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
package com.mes.device.vo;
 
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
 
import java.io.Serializable;
import java.util.List;
import java.util.Map;
 
/**
 * 设备控制参数配置
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "DeviceControlProfile", description = "设备控制参数配置")
public class DeviceControlProfile implements Serializable {
 
    @Schema(description = "节拍/线速度(mm/s)")
    private Integer lineSpeed;
 
    @Schema(description = "玻璃长度(mm)")
    private Integer glassLength;
 
    @Schema(description = "缓存数量/槽位数量")
    private Integer bufferCount;
 
    @Schema(description = "是否自动触发PLC请求")
    private Boolean autoRequest;
 
    @Schema(description = "PLC请求字段名", defaultValue = "plcRequest")
    private String requestField = "plcRequest";
 
    @Schema(description = "进片位置字段名", defaultValue = "inPosition")
    private String positionField = "inPosition";
 
    @Schema(description = "玻璃数量字段名", defaultValue = "plcGlassCount")
    private String glassCountField = "plcGlassCount";
 
    @Schema(description = "玻璃ID槽位字段定义")
    private List<GlassSlot> glassSlots;
 
    @Schema(description = "位置映射,如:{ \"station1\":1 }")
    private Map<String, Integer> positionMappings;
 
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    @Schema(name = "GlassSlot", description = "玻璃ID槽位")
    public static class GlassSlot implements Serializable {
        @Schema(description = "槽位序号,从1开始")
        private Integer order;
 
        @Schema(description = "PLC字段名,例如 plcGlassId1")
        private String field;
 
        @Schema(description = "字段长度,字符串长度等")
        private Integer length;
 
        @Schema(description = "槽位描述")
        private String description;
    }
}