P15GEN2\59518
2024-05-29 d4210c7c4b04abde20037ea8aa0f54ef8a2649aa
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
package foundation.org;
 
import foundation.data.entity.Entity;
 
public class LeaderHierarchy {
 
    private String parentPositionId;
    private String positionId;
    private String positionTitle;
    private String levelCode;
    private String duty;
    private String employeeId;
    private String employeeName;
    private String userId;
    private PositionMeta meta;
    
    public LeaderHierarchy() {
        meta = new PositionMeta(); 
    }
    
    public void load(Entity entity) {
        parentPositionId = entity.getString("parent_position_id");
        positionId = entity.getString("position_id");
        positionTitle = entity.getString("position_title");
        levelCode = entity.getString("level_code");
        duty = entity.getString("duty");
        employeeId = entity.getString("employee_id");
        employeeName = entity.getString("employee_name");
        userId = entity.getString("user_id");
        
        meta.load(duty);
    }
 
    public String getParentPositionId() {
        return parentPositionId;
    }
    
    public String getPositionId() {
        return positionId;
    }
 
    public String getPositionTitle() {
        return positionTitle;
    }
 
    public String getEmployeeId() {
        return employeeId;
    }
 
    public String getEmployeeName() {
        return employeeName;
    }
 
    public String getUserId() {
        return userId;
    }
 
    public boolean isSalesDirector() {
        return meta.isSalesDirector();
    }
 
    public boolean isSalesRegionDirector() {
        return meta.isSalesRegionDirector();
    }
    
}