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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package com.changhong.epc.constter.system;
 
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
/**
 * 参与者扩展实体类
 * @author WangYX
 *
 */
@ApiModel(value="物料")
@Data
public class WFParticipantEntity implements Serializable {
    
    public WFParticipantEntity() {
        super();
    }
 
    //部门构造方法
    public WFParticipantEntity(String seachName, String typeCode, String id, String name,String parentId) {
        super();
        this.seachName = seachName;
        this.typeCode = typeCode;
        this.id = id;
        this.name = name;
        this.parentId=parentId;
    }
    //人员构造方法
    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;
    @ApiModelProperty("查询名称")
    private String seachName;
    
    @ApiModelProperty("参与者id")
    private String parentId;
    
    @ApiModelProperty("电话号码")
    private String phone;
    
    @ApiModelProperty("类型")
    private String typeCode;
    
    @ApiModelProperty("用户id")
    private String id;
    
    @ApiModelProperty("名称")   
    private String name;
    
    @ApiModelProperty("邮件")   
    private String email;
    
    @ApiModelProperty("用户唯一标识")   
    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;
    }
 
 
 
 
 
}