#
zzgtfwq
1 天以前 236edf0559e2d5a6031b1df56a69454baa0357e5
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
package com.zy.asrs.entity;
 
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField;
 
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;
 
@Data
@TableName("asr_bas_devp_position")
public class BasDevpPosition implements Serializable {
 
    private static final long serialVersionUID = 1L;
 
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    private Long id;
 
    @ApiModelProperty(value= "")
    @TableField("dev_no")
    private Integer devNo;
 
    @ApiModelProperty(value= "")
    @TableField("plc_id")
    private Integer plcId;
 
    @ApiModelProperty(value= "")
    @TableField("plc_position")
    private Long plcPosition;
 
    @ApiModelProperty(value= "")
    @TableField("rgv_sign")
    private Integer rgvSign;
 
    public BasDevpPosition() {}
 
    public BasDevpPosition(Integer devNo,Integer plcId,Long plcPosition,Integer rgvSign) {
        this.devNo = devNo;
        this.plcId = plcId;
        this.plcPosition = plcPosition;
        this.rgvSign = rgvSign;
    }
 
    public BasDevpPosition(Integer devNo, Integer plcId, Long plcPosition) {
        this.devNo = devNo;
        this.plcId = plcId;
        this.plcPosition = plcPosition;
    }
 
    public BasDevpPosition(BasDevpPosition basDevpPosition) {
        this.id = basDevpPosition.getId();
        this.devNo = basDevpPosition.getDevNo();
        this.plcId = basDevpPosition.getPlcId();
        this.plcPosition = basDevpPosition.getPlcPosition();
    }
 
    public BasDevpPosition(BasDevpPosition basDevpPosition,Long plcPosition) {
        this.id = basDevpPosition.getId();
        this.devNo = basDevpPosition.getDevNo();
        this.plcId = basDevpPosition.getPlcId();
        this.plcPosition = plcPosition;
    }
 
//    BasDevpPosition basDevpPosition = new BasDevpPosition(
//            null,    // 
//            null,    // 
//            null,    // 
//            null    // 
//    );
 
 
    public Integer getDevNo$() {
        switch (devNo){
            case 102:
            case 106:
            case 110:
            case 116:
            case 202:
            case 206:
            case 210:
            case 216:
                return devNo-1;
            case 117:
            case 120:
            case 123:
            case 217:
            case 220:
            case 223:
                return devNo+2;
        }
        return devNo;
    }
 
 
}