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