zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
114
115
116
117
118
119
120
package com.changhong.epc.rely.api.bean;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import lombok.Data;
 
@Data
public class WFParticipantEntity implements Serializable {
    public WFParticipantEntity() {
        super();
    }
 
    //部门构造方法
    public WFParticipantEntity(String seachName, String typeCode, String id, String name, String parentId, String code, String parentCode) {
        super();
        this.seachName = seachName;
        this.typeCode = typeCode;
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.code = code;
        this.parentCode = parentCode;
    }
    //人员构造方法
    public WFParticipantEntity(String seachName, String typeCode, String id, String name, String email, String phone, String openId, String parentId) {
        super();
        this.seachName = seachName;
        this.typeCode = typeCode;
        this.id = id;
        this.name = name;
        this.email = email;
        this.phone = phone;
        this.parentId = parentId;
        this.openId = openId;
    }
    
    /**
     * 
     */
    private static final long serialVersionUID = 6248748877439179834L;
    
    private String seachName;
    
    private String parentId;
    
    private String phone;
    
    private String typeCode;
    
    private String code;
    
    private String parentCode;
    
    private String id;
    
    private String name;
    
    private String email;
    
    private String openId;
    
    private List<WFParticipantEntity> children;
 
    
    public static Map<String,ParticipantType> getOrg(){
        Map<String, ParticipantType> sp=new HashMap<String, ParticipantType>();
        List<String> jointTypeCodeList=new ArrayList<String>();
        List<String> juniorParticipantTypeCodes=new ArrayList<String>();
        List<String> jointTypeCodeListRole=new ArrayList<String>();
        List<String> juniorParticipantTypeCodesRole=new ArrayList<String>();
        ParticipantType pcte=new ParticipantType();
        pcte.setDescription("机构");
        pcte.setDisplayName("机构");
        pcte.setPriority(2);
        pcte.setCode("org");
        pcte.setPrefix('O');
        pcte.setLeafParticipant(false);
        pcte.setShowAtRootArea(true);
        pcte.setJointParticipantType(false);
        pcte.setJointTypeCodeList(jointTypeCodeList);
        juniorParticipantTypeCodes.add("emp");
        juniorParticipantTypeCodes.add("org");
        pcte.setJuniorParticipantTypeCodes(juniorParticipantTypeCodes);
//        
        ParticipantType pcteRole=new ParticipantType();
        pcteRole.setDescription("角色");
        pcteRole.setDisplayName("角色");
        pcteRole.setPriority(3);
        pcteRole.setCode("role");
        pcteRole.setPrefix('R');
        pcteRole.setLeafParticipant(false);
        pcteRole.setShowAtRootArea(true);
        pcteRole.setJointParticipantType(false);
        pcteRole.setJointTypeCodeList(jointTypeCodeListRole);
        juniorParticipantTypeCodesRole.add("emp");
        pcteRole.setJuniorParticipantTypeCodes(juniorParticipantTypeCodesRole);
//        
        ParticipantType pct=new ParticipantType();
        pct.setDescription("员工");
        pct.setDisplayName("员工");
        pct.setPriority(1);
        pct.setCode("emp");
        pct.setPrefix('E');
        pct.setLeafParticipant(true);
        pct.setShowAtRootArea(false);
        pct.setJointParticipantType(false);
        List<String> jointTypeCodeList1=new ArrayList<String>();
        pct.setJointTypeCodeList(jointTypeCodeList1);
        List<String> juniorParticipantTypeCodes1=new ArrayList<String>();
        pct.setJuniorParticipantTypeCodes(juniorParticipantTypeCodes1);
        sp.put("emp", pct);
        sp.put("org",pcte);
        sp.put("role",pcteRole);
        return sp;
    }
}