-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStaff.java
More file actions
113 lines (97 loc) · 2.13 KB
/
Staff.java
File metadata and controls
113 lines (97 loc) · 2.13 KB
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
112
113
import java.io.File;
import java.io.FileWriter;
public class Staff {
public String ID, username,department,name,DOB,address,status;
public Supervisor department_supervisor;
public int no_of_tasks=0;
public Task task[];
public Staff(String username, String ID, String department, String name, String DOB, String address, String status){
this.setID(ID);
this.setUsername(username);
this.setDepartment(department);
this.setDOB(DOB);
this.setAddress(address);
this.setStatus(status);
this.setname(name);
}
public String getUsername()
{
return this.username;
}
public String getID()
{
return this.ID;
}
public String getDepartment()
{
return this.department;
}
public String getName()
{
return this.name;
}
public String getDOB()
{
return this.DOB;
}
public String getAddress()
{
return this.address;
}
public String getStatus()
{
return this.status;
}
private void setname(String name)
{
this.name=name;
}
private void setStatus(String status2) {
this.status=status2;
}
private void setAddress(String address2) {
this.address=address2;
}
private void setDOB(String dOB2) {
this.DOB=dOB2;
}
private void setDepartment(String department2) {
this.department=department2;
}
private void setUsername(String username2) {
this.username=username2;
}
private void setID(String iD2) {
this.ID=iD2;
}
void sendLogisticReq(String text, String selecteditem, Staff staff) //send logistic requirement to supervisor
{
File myFile = new File("inventoryreq.csv");
try
{
FileWriter fileWriter = new FileWriter(myFile,true);
StringBuilder string1=new StringBuilder();
string1.append("\r\n"+text+","+selecteditem+","+staff.getID()+","+staff.getDepartment()+","+"Unapproved");
fileWriter.write(string1.toString());
System.out.println(string1);
fileWriter.close();
}
catch(Exception e){}
}
void sendLeave(Leave l)
{
}
void updateTaskStatus(Task task)
{
}
void generateTaskReport(Task task)
{
if (task.status=="COMPLETE")
{
}
}
public void updateStatus(String status)
{
this.status=status;
}
}