严智鑫
2025-11-13 945bc394f40d8af1072a53da9a94f24207124e6d
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
105
106
107
108
109
110
111
package com.northglass.entity;
 
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
 
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Transient;
 
import com.northglass.listener.ServerConnection;
 
@Entity
@Table(name = "gmms_load_machine")
public class LoadMachine extends AbstractMachine {
 
    private String message;
    private String ipAddress;
    private ServerConnection serverConnection = new ServerConnection();
    private Thread controlThread;
    private CutMachine cutMachine;
    private String opt_name;// 当前产线切割的opt文件名
    private Date modifyTime;
    private List<LoadMachineRack> loadMachineRacks = new ArrayList<LoadMachineRack>();
 
    public LoadMachine() {
    }
 
    public LoadMachine(String number, String state, String connectState, int port, CutMachine cutMachine) {
        // super(number, state, connectState, port);
        this.cutMachine = cutMachine;
    }
 
    @OneToOne
    @JoinColumn(name = "cut_machine_id")
    public CutMachine getCutMachine() {
        return cutMachine;
    }
 
    public void setCutMachine(CutMachine cutMachine) {
        this.cutMachine = cutMachine;
    }
    
 
 
    public String getMessage() {
        return message;
    }
 
    public void setMessage(String message) {
        this.message = message;
    }
 
    @OneToMany(mappedBy = "loadMachine", fetch = FetchType.EAGER)
    @OrderBy(value = "number")
    public List<LoadMachineRack> getLoadMachineRacks() {
        return loadMachineRacks;
    }
 
    public void setLoadMachineRacks(List<LoadMachineRack> loadMachineRacks) {
        this.loadMachineRacks = loadMachineRacks;
    }
 
    public String getOpt_name() {
        return opt_name;
    }
 
    public void setOpt_name(String opt_name) {
        this.opt_name = opt_name;
    }
 
    public String getIpAddress() {
        return ipAddress;
    }
 
    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }
 
    @Transient
    public ServerConnection getServerConnection() {
        return serverConnection;
    }
 
    public void setServerConnection(ServerConnection serverConnection) {
        this.serverConnection = serverConnection;
    }
 
    @Transient
    public Thread getControlThread() {
        return controlThread;
    }
 
    public void setControlThread(Thread controlThread) {
        this.controlThread = controlThread;
    }
 
    public Date getModifyTime() {
        return modifyTime;
    }
 
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
 
}