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;
|
}
|
}
|