7 changed files with 158 additions and 5 deletions
@ -0,0 +1,58 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
*/ |
||||
|
|
||||
|
public enum RelationshipEnum { |
||||
|
/** |
||||
|
* 环境变量枚举 |
||||
|
*/ |
||||
|
UN_KNOWN("0", "暂不清楚", 0), |
||||
|
SELF("1", "本人", 1), |
||||
|
spouse("2", "配偶", 2), |
||||
|
CHILD("3", "子女", 3), |
||||
|
PARENT("4", "父母", 4), |
||||
|
PARENT_IN_LAW("5", "岳父母或公婆", 5), |
||||
|
GRANDPARENT_IN_LAW("6", "祖父母", 6), |
||||
|
CHILD_IN_LAW("7", "媳婿", 7), |
||||
|
GRANDCHILD("8", "孙子女", 8), |
||||
|
BROTHER_AND_SISTER("9", "兄弟姐妹", 9), |
||||
|
OTHER("10", "其他", 10), |
||||
|
; |
||||
|
|
||||
|
private final String code; |
||||
|
private final String name; |
||||
|
private final Integer sort; |
||||
|
|
||||
|
|
||||
|
|
||||
|
RelationshipEnum(String code, String name, Integer sort) { |
||||
|
this.code = code; |
||||
|
this.name = name; |
||||
|
this.sort = sort; |
||||
|
} |
||||
|
|
||||
|
public static RelationshipEnum getEnum(String code) { |
||||
|
RelationshipEnum[] values = RelationshipEnum.values(); |
||||
|
for (RelationshipEnum value : values) { |
||||
|
if (value.getCode().equals(code)) { |
||||
|
return value; |
||||
|
} |
||||
|
} |
||||
|
return RelationshipEnum.UN_KNOWN; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public Integer getSort(){ |
||||
|
return sort; |
||||
|
} |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zhaoqifeng |
||||
|
* @DateTime 2020/11/18 下午1:47 |
||||
|
*/ |
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public class OwnerRelationResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 2876258704168954941L; |
||||
|
private String ownerName; |
||||
|
private List<UserListBean> userList; |
||||
|
|
||||
|
@NoArgsConstructor |
||||
|
@Data |
||||
|
public static class UserListBean { |
||||
|
private String userId; |
||||
|
private String userName; |
||||
|
private String isSelf; |
||||
|
private String relation; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue