feat(REQ-3282): 增加profile防腐层调用相关
This commit is contained in:
parent
5619387e9c
commit
3b7705c565
@ -0,0 +1,226 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author zhanghongbo
|
||||
* @date 2024/12/11
|
||||
*/
|
||||
public interface ProfileUserProfileClient {
|
||||
/**
|
||||
* 创建身份
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
ProfileAddOperatorResp addOperator(ProfileAddOperatorReq req);
|
||||
|
||||
/**
|
||||
* 幂等创建自然人和身份档案
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
ProfileUserProfileCreateResp userProfileCreate(ProfileUserProfileCreateReq req);
|
||||
|
||||
/**
|
||||
* 通过id获取自然人档案
|
||||
* @param personId
|
||||
* @return
|
||||
*/
|
||||
ProfilePersonResp getPersonProfile(Long personId);
|
||||
|
||||
/**
|
||||
* 批量personId获取自然人档案
|
||||
* @param personIds
|
||||
* @return
|
||||
*/
|
||||
List<ProfilePersonResp> getPersonProfiles(List<Long> personIds);
|
||||
|
||||
/**
|
||||
* 批量personId获取自然人档案
|
||||
* @param personIds
|
||||
* @return
|
||||
*/
|
||||
List<ProfilePersonResp> postPersonProfiles(List<Long> personIds);
|
||||
|
||||
/**
|
||||
* 通过手机号创建自然人信息
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
ProfilePersonResp createPersonProfile(String phone);
|
||||
|
||||
/**
|
||||
* 通过手机号获取用户自然人档案
|
||||
* @param idNumber
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
ProfilePersonResp getUnionPersonProfile(String idNumber, String phone);
|
||||
|
||||
/**
|
||||
* 获取用户身份接口
|
||||
* @param personId
|
||||
* @return
|
||||
*/
|
||||
List<ProfileIdentityResp> getPersonIdentityProfile(Long personId);
|
||||
|
||||
/**
|
||||
* 获取用户身份接口 排除删除字段
|
||||
* @param identityId
|
||||
* @param identityType
|
||||
* @return
|
||||
*/
|
||||
ProfileIdentityResp getProfileByIdentityIdAndIdentityTypeExcludeIsDelete(Long identityId, Integer identityType);
|
||||
|
||||
/**
|
||||
* 批量获取用户身份接口 排除删除字段
|
||||
* @param identityIds
|
||||
* @param identityType
|
||||
* @return
|
||||
*/
|
||||
List<ProfileIdentityResp> getProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(List<Long> identityIds, Integer identityType);
|
||||
|
||||
/**
|
||||
* 批量获取用户信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProfileGetIdentityProfileLiteResp> test(ProfileGetIdentityProfileLiteReq req);
|
||||
|
||||
/**
|
||||
* 批量获取用户身份接口 排除删除字段
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProfileIdentityResp> postProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(ProfileIdentityProfilePostReq req);
|
||||
|
||||
/**
|
||||
* 获取用户身份接口指
|
||||
* @param personIds
|
||||
* @return
|
||||
*/
|
||||
Map<Long, List<ProfileIdentityResp>> getPersonIdentityProfile(Set<Long> personIds);
|
||||
|
||||
/**
|
||||
* 通过自然人信息创建从业人员身份
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
ProfilePractitionerResp postPractitionerProfileWithUnionPerson(ProfilePostPractitionerProfileWithUnionPersonReq req);
|
||||
|
||||
/**
|
||||
* 获取工人身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProfileWorkerResp getWorkerProfile(Long id);
|
||||
|
||||
/**
|
||||
* 获取班组长身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProfileWorkerLeaderResp getWorkerLeaderProfileNotThrowing(Long id);
|
||||
|
||||
/**
|
||||
* 获取班组长身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProfileWorkerLeaderResp getWorkerLeaderProfile(Long id);
|
||||
|
||||
/**
|
||||
* 获取从业人员身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
ProfilePractitionerResp getPractitionerProfile(Long id);
|
||||
|
||||
/**
|
||||
* 查询班组档案
|
||||
* @param ouId
|
||||
* @return
|
||||
*/
|
||||
ProfileWorkerGroupResp getWorkerGroupProfile(Long ouId);
|
||||
|
||||
/**
|
||||
* 根据身份id批量查询工人信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProfileWorkerResp> getWorkerProfileListV2(ProfileGetWorkerProfileListV2Req req);
|
||||
|
||||
/**
|
||||
* 通过自然人ID查工人信息,若没有工人身份也会返回自然人信息
|
||||
* @param id
|
||||
* @return key = personId
|
||||
*/
|
||||
Map<Long, ProfileWorkerResp> getWorkerProfileListByPersonId(Set<Long> id);
|
||||
|
||||
/**
|
||||
* 根据身份id批量查询工人信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<ProfileWorkerResp> postWorkerProfileList(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据身份id批量查询班组长信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProfileWorkerLeaderResp> getWorkerLeaderProfileList(ProfileGetWorkerLeaderProfileListReq req);
|
||||
|
||||
/**
|
||||
* 获取身份信息
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
List<ProfileIdentityResp> getIdentitiesByIdSet(List<Long> id, Integer type);
|
||||
|
||||
/**
|
||||
* 根据personId查询从业人员
|
||||
* @param personId
|
||||
* @return
|
||||
*/
|
||||
ProfileIdentityResp getPractitionerIdentitiesByPersonId(Long personId);
|
||||
|
||||
/**
|
||||
* 根据手机号或班组号查询班组信息
|
||||
* @param personProfilePhoneOrWorkerGroupId
|
||||
* @return
|
||||
*/
|
||||
List<ProfileGetWorkerGroupDetailResp> getWorkerGroupDetailInfoListByConCom(String personProfilePhoneOrWorkerGroupId);
|
||||
|
||||
/**
|
||||
* 获取身份信息
|
||||
* @param reqs
|
||||
* @return
|
||||
*/
|
||||
Set<Long> getPersonIdListByIdentity(List<ProfileGetPersonIdListByIdentityReq> reqs);
|
||||
|
||||
/**
|
||||
* 通过手机号、身份证号、姓名(模糊查询) 查询自然人信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProfilePersonResp> getPersonProfileList(ProfileGetPersonProfileListReq req);
|
||||
|
||||
/**
|
||||
* 通过personId、手机号,批量查询
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
List<ProfilePersonResp> findPersonProfileListByIdOrPhone(ProfileFindPersonProfileListByIdOrPhoneReq req);
|
||||
|
||||
/**
|
||||
* 新增平台班组工人工种
|
||||
* @param req
|
||||
*/
|
||||
Long saveWorkerProfession(ProfileSaveWorkerProfessionReq req);
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.PersonEducationUpdateDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.SexType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author zhanghongbo
|
||||
* @date 2024/12/11
|
||||
*/
|
||||
@Data
|
||||
public class ProfileAddOperatorReq {
|
||||
private Long id; //w
|
||||
|
||||
private String phone; //w
|
||||
|
||||
private String avatarUrl;
|
||||
|
||||
private String realName;
|
||||
|
||||
private String realNamePinyin;
|
||||
|
||||
private SexType sex;
|
||||
|
||||
private Date birthday;
|
||||
|
||||
private PersonEducationUpdateDto education;
|
||||
|
||||
private String nationality;
|
||||
|
||||
private String idAddress;
|
||||
|
||||
private String emergencyContactor;
|
||||
|
||||
private String emergencyPhone;
|
||||
|
||||
private String provinceCode;
|
||||
|
||||
private String provinceName;
|
||||
|
||||
private String cityCode;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private String areaCode;
|
||||
|
||||
private String areaName;
|
||||
|
||||
private String idNativePlace;
|
||||
|
||||
private String idNumber;
|
||||
// TODO only for create
|
||||
// private RegisterSourceType registerSourceType;
|
||||
//
|
||||
private String idFaceUrl;
|
||||
|
||||
private Date idStartDate;
|
||||
|
||||
private Date idEndDate;
|
||||
|
||||
private String idAuthority;
|
||||
|
||||
private String idBackPhoto;
|
||||
|
||||
private String idBackPhotoFileKey;
|
||||
|
||||
private String idFrontPhoto;
|
||||
|
||||
private String idFrontPhotoFileKey;
|
||||
|
||||
private String avatarFileKey;
|
||||
|
||||
private String idFaceFileKey;
|
||||
|
||||
/**
|
||||
* 因为报错加的
|
||||
*/
|
||||
private String registerSourceType;
|
||||
|
||||
private Long isDelete;
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.AbstractIdentityProfileDto;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhanghongbo
|
||||
* @date 2024/12/11
|
||||
*/
|
||||
@Data
|
||||
public class ProfileAddOperatorResp extends AbstractIdentityProfileDto<ProfileAddOperatorResp> {
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询自然人信息-id或者手机号
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ProfileFindPersonProfileListByIdOrPhoneReq {
|
||||
|
||||
/**
|
||||
* personId
|
||||
*/
|
||||
@Size(max = 1000, message = "personIds max length:1000")
|
||||
private List<Long> personIds;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Size(max = 1000, message = "phones max length:1000")
|
||||
private List<String> phones;
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.IdentityType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ProfileGetIdentityProfileLiteReq {
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idNumber;
|
||||
|
||||
/**
|
||||
* 自然人id
|
||||
*/
|
||||
private List<Long> personIds;
|
||||
|
||||
/**
|
||||
* 身份信息
|
||||
*/
|
||||
private List<IdentityQuery> identityQueries;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public static class IdentityQuery {
|
||||
/**
|
||||
* 身份id
|
||||
*/
|
||||
private Long identityId;
|
||||
|
||||
/**
|
||||
* 身份类型
|
||||
*/
|
||||
private IdentityType identityType;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.IdentityType;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.SexType;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.VerifyStatus;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ProfileGetIdentityProfileLiteResp {
|
||||
/**
|
||||
* 档案主健
|
||||
*/
|
||||
private Long identityProfileId;
|
||||
|
||||
/**
|
||||
* 身份id
|
||||
*/
|
||||
private Long identityId;
|
||||
|
||||
/**
|
||||
* 身份类型 1工人 2班组长
|
||||
*/
|
||||
private IdentityType identityType;
|
||||
|
||||
/**
|
||||
* 身份描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 自然人id
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idNumber;
|
||||
|
||||
/**
|
||||
* 自然人名称
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 出生年月
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 国籍
|
||||
*/
|
||||
private String nationality;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private SexType sex;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatarUrl;
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
private String idNativePlace;
|
||||
|
||||
/**
|
||||
* 实名状态
|
||||
*/
|
||||
private VerifyStatus verifyStatus;
|
||||
|
||||
/**
|
||||
* identity_profile是否被软删
|
||||
*/
|
||||
private Long isDelete;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.IdentityType;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author cn
|
||||
* @version 1.0
|
||||
* @description
|
||||
* @date 2023/4/27 13:41
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@EqualsAndHashCode
|
||||
public class ProfileGetPersonIdListByIdentityReq {
|
||||
private Long identityId;
|
||||
private IdentityType identityType;
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 查询自然人信息
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ProfileGetPersonProfileListReq {
|
||||
|
||||
/**
|
||||
* 真实姓名(模糊查询)
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 手机号列表
|
||||
*/
|
||||
private Collection<String> phones;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idNumber;
|
||||
|
||||
/**
|
||||
* 批量身份证号
|
||||
*/
|
||||
private List<String> idNumbers;
|
||||
|
||||
/**
|
||||
* phone 或者realName去查询
|
||||
*/
|
||||
private String keyNo;
|
||||
|
||||
/**
|
||||
* 真实姓名(全匹配)
|
||||
*/
|
||||
private String realNameEQ;
|
||||
|
||||
/**
|
||||
* 真实姓名全匹配的列表
|
||||
*/
|
||||
private List<String> eqRealNames;
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.WorkerGroupDetailTypeVO;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班组宽表详情
|
||||
*/
|
||||
@Data
|
||||
public class ProfileGetWorkerGroupDetailResp {
|
||||
/** 身份档案id */
|
||||
private long identityId;
|
||||
/** 身份档案类型 */
|
||||
private long identityType;
|
||||
/** 身份自我描述 */
|
||||
private String personDescription;
|
||||
/** 自然人id */
|
||||
private long personId;
|
||||
/** 名字 */
|
||||
private String personProfileName;
|
||||
/** 生日 */
|
||||
private String birthday;
|
||||
/** 民族 */
|
||||
private String nationality;
|
||||
/** 性别0:未知;1-女;2-男 */
|
||||
private Integer sex;
|
||||
/** 主电话 */ //
|
||||
private String personProfilePhone;
|
||||
/** 个人头像 */
|
||||
private String avatarUrl;
|
||||
/** 身份证号 */
|
||||
private String personProfileCard;
|
||||
/** 身份证籍贯 */
|
||||
private String personNativePlace;
|
||||
/** 现居地省名称 */
|
||||
private String provinceName;
|
||||
private String provinceCode;
|
||||
/** 现居地城市名称 */
|
||||
private String cityName;
|
||||
private String cityCode;
|
||||
/** 现居地区名称 */
|
||||
private String areaName;
|
||||
private String areaCode;
|
||||
/** 认证状态:0-未认证;1-认证失败,2-认证成功 */
|
||||
private Integer authStatus;
|
||||
/** 工龄 */
|
||||
private Double workAge;
|
||||
/** 求职状态;0-其他,1开启中,2已关闭 */
|
||||
private Integer jobWantedStatus;
|
||||
/** 期望薪水 */
|
||||
private Integer expectSalary;
|
||||
/** 工作地点名称苏州、杭州市名称顿号分隔 */
|
||||
private String jobAreaName;
|
||||
/** 工种及工种技能JSON */
|
||||
private String professionTag;
|
||||
/** 单位id */ //
|
||||
private long organizationalUnitId;
|
||||
/** 班组人数 */
|
||||
private Integer workerGroupHeadCount;
|
||||
/** 组织档案id */ //
|
||||
// @TableField("worker_group_id")
|
||||
private Long workerGroupId;
|
||||
/** 班组名称 */ //
|
||||
private String workerGroupName;
|
||||
/** 省编码 */
|
||||
private String workerGroupProvinceCode;
|
||||
/** 市编码 */
|
||||
private String workerGroupCityCode;
|
||||
/** 区编码 */
|
||||
private String workerGroupAreaCode;
|
||||
/** 省名称 */
|
||||
private String workerGroupProvinceName;
|
||||
/** 市名称 */
|
||||
private String workerGroupCityName;
|
||||
/** 区名称 */
|
||||
private String workerGroupAreaName;
|
||||
/** 班组描述 */
|
||||
private String workerGroupIntroduction;
|
||||
/** 班组id */
|
||||
private String serialNo;
|
||||
/** 班组类型JSON */ //
|
||||
private String workerGroupType;
|
||||
/** 单位名称 */
|
||||
private String organizationalUnitName;
|
||||
/** 单位类别 */
|
||||
private String organizationalUnitDict;
|
||||
/** 组织节点用户id */
|
||||
private long organizationalNodeUserId;
|
||||
/** 权限碼code */
|
||||
private String saasPositionRoleCode;
|
||||
/** 最近一次加入班组时间 */
|
||||
private DateTime lastJoinDate;
|
||||
/** 最近一次离开班组时间 */
|
||||
private DateTime lastLeaveDate;
|
||||
/** 工种json */
|
||||
private String professions;
|
||||
/** 技术类型:1普通;2技工3.两种都有 */
|
||||
private Integer skillType;
|
||||
/** 是否删除 */
|
||||
private long isDelete;
|
||||
/** 创建时间 */
|
||||
private String createAt;
|
||||
/** 修改时间 */
|
||||
private String updateAt;
|
||||
/** 项目部id */
|
||||
private long workspaceId;
|
||||
/** 项目部名称 */
|
||||
private String workspaceName;
|
||||
/** 已派工、待岗 */
|
||||
private Integer workerStatus;
|
||||
/** 在场中状1.在场中 */
|
||||
private Integer presentStatus;
|
||||
/** 班组类型 */
|
||||
private List<WorkerGroupDetailTypeVO> workerGroupDetailTypeVOList;
|
||||
|
||||
/** 公共参数 **/
|
||||
private String common;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author wenXueFeng
|
||||
* @date 2022/7/4 15:07
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProfileGetWorkerLeaderProfileListReq {
|
||||
@NotEmpty(message = "identityIdList can not be null")
|
||||
private List<Long> identityIdList;
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:WorkerProfileGetVO
|
||||
* 类 描 述:工人档案查询
|
||||
* 创建时间:2022/6/24 7:23 PM
|
||||
* 创 建 人:liuyu
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProfileGetWorkerProfileListV2Req {
|
||||
|
||||
@NotEmpty(message = "identityIdList can not be null")
|
||||
private List<Long> identityIdList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ProfileIdentityProfilePostReq {
|
||||
|
||||
Integer identityType;
|
||||
List<Long> identityIds;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.AbstractIdentityProfileDto;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class ProfileIdentityResp extends AbstractIdentityProfileDto<ProfileIdentityResp> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.AbstractProfileDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.EducationDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.HealthInfoDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.PersonFaceDetectStatus;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.RegisterSourceType;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.SexType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
public class ProfilePersonResp extends AbstractProfileDto<ProfilePersonResp> {
|
||||
|
||||
private String avatarUrl = "";
|
||||
|
||||
private String processAvatarUrl = "";
|
||||
|
||||
private String realNamePinyin = "";
|
||||
|
||||
private RegisterSourceType activeRegisterSourceType = RegisterSourceType.UNKNOWN;
|
||||
|
||||
private String idFaceUrl = "";
|
||||
|
||||
private Date idStartDate;
|
||||
|
||||
|
||||
private Date idEndDate;
|
||||
|
||||
private String idAuthority;
|
||||
|
||||
private String idBackPhoto = "";
|
||||
|
||||
private String idNativePlace = "";
|
||||
|
||||
private String idFrontPhoto = "";
|
||||
|
||||
private String phone = "";
|
||||
|
||||
private String realName = "";
|
||||
|
||||
private SexType sex = SexType.UNKNOWN;
|
||||
|
||||
private Date birthday;
|
||||
|
||||
private String nationality = "";
|
||||
// 身份证
|
||||
private String idNumber = "";
|
||||
|
||||
private String idAddress = "";
|
||||
|
||||
private String emergencyContactor = "";
|
||||
|
||||
private String emergencyPhone = "";
|
||||
|
||||
private String provinceCode = "";
|
||||
|
||||
private String provinceName = "";
|
||||
|
||||
private String cityCode = "";
|
||||
|
||||
private String cityName = "";
|
||||
|
||||
private String areaCode = "";
|
||||
|
||||
private String areaName = "";
|
||||
|
||||
private EducationDto education;
|
||||
|
||||
// 身份证信息是否完整
|
||||
private Boolean idInfoComplete;
|
||||
|
||||
private List<HealthInfoDto> healthState;
|
||||
//身份证人脸照片地址-fileKey
|
||||
private String idFaceFileKey;
|
||||
//身份证正面-fileKey
|
||||
private String idFrontPhotoFileKey;
|
||||
//身份证反面-fileKey
|
||||
private String idBackPhotoFileKey;
|
||||
//身份证头像-fileKey
|
||||
private String idFacePhotoFileKey;
|
||||
//个人头像-fileKey
|
||||
private String avatarFileKey;
|
||||
//个人头像signUrl
|
||||
private String avatarSignUrl;
|
||||
//个人头像裁剪signUrl
|
||||
private String processAvatarSignUrl = "";
|
||||
//身份证人脸照片地址signUrl
|
||||
private String idFaceSignUrl;
|
||||
//人脸检测状态
|
||||
private PersonFaceDetectStatus faceDetectStatus = PersonFaceDetectStatus.SUCCESS;
|
||||
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.PersonPostVo;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.PractitionerUpdateDto;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wenXueFeng
|
||||
* @date 2022/6/10 18:18
|
||||
*/
|
||||
@Data
|
||||
public class ProfilePostPractitionerProfileWithUnionPersonReq {
|
||||
|
||||
/**
|
||||
* 从业人员信息
|
||||
*/
|
||||
private PractitionerUpdateDto update;
|
||||
/**
|
||||
* 条件信息
|
||||
*/
|
||||
private PersonPostVo personPost;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.AbstractIdentityProfileDto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class ProfilePractitionerResp extends AbstractIdentityProfileDto<ProfilePractitionerResp> {
|
||||
private BigDecimal score;
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.WorkerDetailComDto;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import lombok.experimental.FieldDefaults;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author cn
|
||||
* @version 1.0
|
||||
* @description
|
||||
* @date 2023/2/1 16:37
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
@FieldDefaults(level = AccessLevel.PRIVATE)
|
||||
public class ProfileSaveWorkerProfessionReq {
|
||||
@NotNull(message = "workerId 不能为空")
|
||||
@Min(value = 1)
|
||||
Long workerId;
|
||||
|
||||
@NotNull(message = "平台班组的节点信息不能为空")
|
||||
@Min(value = 1)
|
||||
Long organizationalNodeId;
|
||||
/**
|
||||
* 工种列表
|
||||
*/
|
||||
@NotEmpty(message = "工人工种不能为空")
|
||||
@Valid
|
||||
List<WorkerDetailComDto.Profession> professions;
|
||||
|
||||
private Long operatorPersonId;
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.IdentityType;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author cold_blade
|
||||
* @version 1.0
|
||||
* @date 2024/5/10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProfileUserProfileCreateReq implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3670043140732730361L;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@NotBlank(message = "phone can not be blank")
|
||||
private String phone;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String realName;
|
||||
/**
|
||||
* 身份类型
|
||||
*/
|
||||
@NotNull(message = "identityType can not be blank")
|
||||
private IdentityType identityType;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JSON.toJSONString(this);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author cold_blade
|
||||
* @version 1.0
|
||||
* @date 2024/5/10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProfileUserProfileCreateResp implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8654985658469223512L;
|
||||
|
||||
/**
|
||||
* 身份Id
|
||||
*/
|
||||
private Long identityId;
|
||||
/**
|
||||
* 身份类型
|
||||
*/
|
||||
private Integer identityType;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 真实姓名
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 自然人Id
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JSON.toJSONString(this);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.OrganizationalUnitProfileDTO;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.WorkerGroupTypeDTO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:WorkerGroupProfileDTO
|
||||
* 类 描 述:班组档案
|
||||
* 创建时间:2022/6/24 6:39 PM
|
||||
* 创 建 人:liuyu
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class ProfileWorkerGroupResp {
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 序列号,班组id
|
||||
*/
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* 安心分
|
||||
*/
|
||||
private BigDecimal score;
|
||||
|
||||
/**
|
||||
* 经营范围
|
||||
*/
|
||||
private List<WorkerGroupTypeDTO> workGroupTypeVOList;
|
||||
|
||||
/**
|
||||
* 组织信息
|
||||
*/
|
||||
private OrganizationalUnitProfileDTO organizationalUnitProfileVO;
|
||||
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.AbstractIdentityProfileDto;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ProfileWorkerLeaderResp extends AbstractIdentityProfileDto<ProfileWorkerLeaderResp> {
|
||||
private float experienceYears;
|
||||
private float avgExperienceYears;
|
||||
private BigDecimal score;
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.AbstractIdentityProfileDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.PersonProfileDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.ProfessionTagDto;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.LevelType;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Getter
|
||||
@Setter
|
||||
@ToString
|
||||
public class ProfileWorkerResp extends AbstractIdentityProfileDto<ProfileWorkerResp> {
|
||||
private Date lastJoinDate;
|
||||
|
||||
private Date lastLeaveDate;
|
||||
|
||||
private Integer totalFinishedTask = 0;
|
||||
|
||||
private String workKindName = "";
|
||||
|
||||
private Integer workAge;
|
||||
|
||||
private Integer workGroupInviteCounts = 0;
|
||||
|
||||
/**
|
||||
* 工种
|
||||
*/
|
||||
@Builder.Default
|
||||
private List<ProfessionTagDto> professionTags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
private LevelType level;
|
||||
|
||||
private BigDecimal score;
|
||||
|
||||
/**
|
||||
* 主工种标签
|
||||
*/
|
||||
private Long masterProfessionId;
|
||||
/**
|
||||
* 主工种标签名称
|
||||
*/
|
||||
private String masterProfessionName;
|
||||
|
||||
public List<ProfessionTagDto> getProfessionTags() {
|
||||
return Optional.ofNullable(professionTags).orElseGet(Collections::emptyList);
|
||||
}
|
||||
|
||||
public ProfileWorkerResp personProfile(PersonProfileDto profileDto) {
|
||||
this.setPersonProfile(profileDto);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.cons;
|
||||
|
||||
/**
|
||||
* @author xudawei@axzo.cn
|
||||
* @date 2024/6/28
|
||||
* @description 头像与人脸
|
||||
*/
|
||||
public class FaceConstants {
|
||||
|
||||
public static final String FACE_URL_SUCCEEE = "检测通过";
|
||||
public static final String FACE_URL_EXCEPTION = "检测异常";
|
||||
public static final String FACE_URL_MORE_FACE = "照片中存在多个人像信息,请重试";
|
||||
public static final String FACE_URL_BLUR = "照片质量模糊,请重试";
|
||||
public static final String FACE_URL_ILLU_LIGHT = "照片光照不足,请重试";
|
||||
public static final String FACE_URL_OCCLUSION_LIGHT = "照片有遮挡,请重试";
|
||||
public static final String FACE_URL_VERIFYTEXT = "verifyText";
|
||||
public static final String FACE_URL_MSG = "msg";
|
||||
public static final String FACE_TERMINAL_SMP = "smp";
|
||||
public static final String SEND_MQ_CHANGE_FACE = "changeFace";
|
||||
public static final String SEND_MQ_REAL_NAME_OLDPERSON = "coreRealNameOldPerson";
|
||||
public static final String SEND_MQ_REAL_NAME_NEWPERSON = "coreRealNameNewPerson";
|
||||
public static final String SEND_MQ_QUICK_REGISTRATION = "quickRegistration";
|
||||
public static final String SEND_MQ_CREATE_AXZOUSER = "createAxzoUserByVerifiedIdNumber";
|
||||
public static final String SEND_MQ_CHANGE_FACE_REMAKE = "remake";
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.IdentityType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:AbstractIdentityProfile
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/22 20:41
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AbstractIdentityProfileDto<T extends AbstractProfileDto<T>> extends AbstractProfileDto<T> {
|
||||
private Long acntId = 0L;
|
||||
|
||||
private String description = "";
|
||||
|
||||
private IdentityType identityType = IdentityType.NOT_SUPPORT;
|
||||
|
||||
private PersonProfileDto personProfile;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.ProfileSourceType;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.ProfileStatus;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:ProfileAbstract
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/11 23:48
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public abstract class AbstractProfileDto<T> extends BasicDto {
|
||||
|
||||
private String uuid;
|
||||
|
||||
private ProfileSourceType profileSourceType;
|
||||
|
||||
private Long mainProfileId;
|
||||
|
||||
private ProfileStatus status = ProfileStatus.UNACTIVATED;
|
||||
|
||||
private VerificationDto verification;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
@JsonIgnore
|
||||
@JSONField(serialize = false)
|
||||
public T fetchProfile() {
|
||||
return (T) this;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:AbstractProfileUpdateDto
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/26 18:39
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class AbstractProfileUpdateDto {
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:BaseDto
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/24 13:46
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
public class BasicDto {
|
||||
@Deprecated
|
||||
private Long identityProfileId;
|
||||
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getIdentityProfileId() {
|
||||
return identityProfileId;
|
||||
}
|
||||
|
||||
public void setIdentityProfileId(Long identityProfileId) {
|
||||
this.identityProfileId = identityProfileId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
public interface CodeDefinition<T> {
|
||||
|
||||
T getCode();
|
||||
|
||||
default boolean isNot(T code) {
|
||||
return !is(code);
|
||||
}
|
||||
|
||||
default boolean is(T code) {
|
||||
if (code == null)
|
||||
return false;
|
||||
return code.equals(this.getCode());
|
||||
}
|
||||
|
||||
static <T, E extends Enum<E> & CodeDefinition<T>>
|
||||
Optional<E> findByCode(Class<E> enumType, T code) {
|
||||
if (code == null)
|
||||
return Optional.empty();
|
||||
for (E e : enumType.getEnumConstants()) {
|
||||
if (e.getCode().equals(code))
|
||||
return Optional.of(e);
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.EducationDegreeType;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class EducationDto extends AbstractProfileDto<EducationDto> {
|
||||
private Instant fromDate;
|
||||
|
||||
private Instant toDate;
|
||||
|
||||
private String schoolName = "";
|
||||
|
||||
private EducationDegreeType degreeCode = EducationDegreeType.OTHERS;
|
||||
|
||||
private String majorName = "";
|
||||
|
||||
private String subMajor = "";
|
||||
|
||||
private String detail = "";
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:HealthInfoDto
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/8/24 11:31
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Data
|
||||
public class HealthInfoDto {
|
||||
// 健康信息名称,心脏病
|
||||
String typeName;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class IdentityUpdateDto extends AbstractProfileUpdateDto {
|
||||
private Long id;
|
||||
// private Long acntId;
|
||||
//
|
||||
// private Long personId;
|
||||
|
||||
private String description;
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class OrganizationalUnitProfileDTO {
|
||||
private Long id;
|
||||
|
||||
private Long organizationalUnitId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String logoUrl;
|
||||
|
||||
private String introduction;
|
||||
|
||||
private String licensePic;
|
||||
|
||||
private String licenseNo;
|
||||
|
||||
private Long legalPersonId;
|
||||
|
||||
private Long leaderProfileId;
|
||||
|
||||
private String areaCode;
|
||||
|
||||
private String areaName;
|
||||
|
||||
private String cityCode;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private String provinceCode;
|
||||
|
||||
private String provinceName;
|
||||
|
||||
private String address;
|
||||
|
||||
private String addressPoi;
|
||||
|
||||
private String longLat;
|
||||
|
||||
private Boolean enable = false;
|
||||
|
||||
private Integer sourceType;
|
||||
|
||||
private LocalDate establishDate;
|
||||
|
||||
private Integer unionFlag;
|
||||
|
||||
private String scale;
|
||||
|
||||
private String businessScope;
|
||||
|
||||
private Integer isDelete;
|
||||
|
||||
private Instant createAt;
|
||||
|
||||
private Instant updateAt;
|
||||
|
||||
private Long mainProfileId;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.EducationDegreeType;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhanghongbo
|
||||
* @date 2024/12/11
|
||||
*/
|
||||
@Data
|
||||
public class PersonEducationUpdateDto {
|
||||
private String schoolName;
|
||||
private EducationDegreeType degreeCode;
|
||||
private String majorName;
|
||||
private String subName;
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:PersonEducationVO
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/11 08:01
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Data
|
||||
public class PersonEducationVO {
|
||||
private Long id;
|
||||
|
||||
private String schoolName;
|
||||
|
||||
private Integer degreeCode;
|
||||
|
||||
private String majorName;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:PersonPutVo
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/9 22:46
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PersonPostVo extends PersonUpdateVO {
|
||||
private String phone;
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.PersonFaceDetectStatus;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.RegisterSourceType;
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.SexType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
public class PersonProfileDto extends AbstractProfileDto<PersonProfileDto> {
|
||||
|
||||
private String avatarUrl = "";
|
||||
|
||||
private String processAvatarUrl = "";
|
||||
|
||||
private String realNamePinyin = "";
|
||||
|
||||
private RegisterSourceType activeRegisterSourceType = RegisterSourceType.UNKNOWN;
|
||||
|
||||
private String idFaceUrl = "";
|
||||
|
||||
private Date idStartDate;
|
||||
|
||||
|
||||
private Date idEndDate;
|
||||
|
||||
private String idAuthority;
|
||||
|
||||
private String idBackPhoto = "";
|
||||
|
||||
private String idNativePlace = "";
|
||||
|
||||
private String idFrontPhoto = "";
|
||||
|
||||
private String phone = "";
|
||||
|
||||
private String realName = "";
|
||||
|
||||
private SexType sex = SexType.UNKNOWN;
|
||||
|
||||
private Date birthday;
|
||||
|
||||
private String nationality = "";
|
||||
// 身份证
|
||||
private String idNumber = "";
|
||||
|
||||
private String idAddress = "";
|
||||
|
||||
private String emergencyContactor = "";
|
||||
|
||||
private String emergencyPhone = "";
|
||||
|
||||
private String provinceCode = "";
|
||||
|
||||
private String provinceName = "";
|
||||
|
||||
private String cityCode = "";
|
||||
|
||||
private String cityName = "";
|
||||
|
||||
private String areaCode = "";
|
||||
|
||||
private String areaName = "";
|
||||
|
||||
private EducationDto education;
|
||||
|
||||
// 身份证信息是否完整
|
||||
private Boolean idInfoComplete;
|
||||
|
||||
private List<HealthInfoDto> healthState;
|
||||
//身份证人脸照片地址-fileKey
|
||||
private String idFaceFileKey;
|
||||
//身份证正面-fileKey
|
||||
private String idFrontPhotoFileKey;
|
||||
//身份证反面-fileKey
|
||||
private String idBackPhotoFileKey;
|
||||
//身份证头像-fileKey
|
||||
private String idFacePhotoFileKey;
|
||||
//个人头像-fileKey
|
||||
private String avatarFileKey;
|
||||
//个人头像signUrl
|
||||
private String avatarSignUrl;
|
||||
//个人头像裁剪signUrl
|
||||
private String processAvatarSignUrl = "";
|
||||
//身份证人脸照片地址signUrl
|
||||
private String idFaceSignUrl;
|
||||
//人脸检测状态
|
||||
private PersonFaceDetectStatus faceDetectStatus = PersonFaceDetectStatus.SUCCESS;
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:PersonUpdateVO
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/9 22:46
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Data
|
||||
public class PersonUpdateVO {
|
||||
private String avatarUrl;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String realName;
|
||||
|
||||
private Integer sex;
|
||||
|
||||
private LocalDate birthday;
|
||||
|
||||
private PersonEducationVO education;
|
||||
|
||||
private String nationality;
|
||||
|
||||
private String idNumber;
|
||||
|
||||
private String idAddress;
|
||||
|
||||
private String emergencyContactor;
|
||||
|
||||
private String emergencyPhone;
|
||||
|
||||
private String provinceCode;
|
||||
|
||||
private String provinceName;
|
||||
|
||||
private String cityCode;
|
||||
|
||||
private String cityName;
|
||||
|
||||
private String areaCode;
|
||||
|
||||
private String areaName;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:PractitionerUpdateDto
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/12 23:55
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PractitionerUpdateDto extends IdentityUpdateDto {
|
||||
Integer adminType;
|
||||
BigDecimal score;
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:ProcessionTagDto
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/26 00:41
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Data
|
||||
public class ProfessionTagDto {
|
||||
Long id;
|
||||
Long professionId;
|
||||
String professionName;
|
||||
Long organizationalNodeId;
|
||||
/**
|
||||
* 工种类型
|
||||
*/
|
||||
private Integer skillType;
|
||||
|
||||
/**
|
||||
* 技能标签
|
||||
*/
|
||||
private List<SkillTagDto> skillTagList;
|
||||
|
||||
/**
|
||||
* 档案id
|
||||
*/
|
||||
Long ownershipProfileId;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:ProcessionTagDto
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/26 00:41
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Data
|
||||
public class SkillTagDto {
|
||||
Long id;
|
||||
Long professionId;
|
||||
Integer level;
|
||||
String parentSkillCode;
|
||||
String skillCode;
|
||||
String skillName;
|
||||
Long organizationalNodeId;
|
||||
List<SkillTagDto> skillTagList;
|
||||
Long identityProfileId;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.enums.VerifyStatus;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
public class VerificationDto extends BasicDto {
|
||||
private VerifyStatus verifyStatus = VerifyStatus.NOT_VERIFIED;
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:WorkerUpdateVO
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/7/9 21:25
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Data
|
||||
public class WorkerDetailComDto {
|
||||
/** 工人id */
|
||||
@NotEmpty
|
||||
Long workerId;
|
||||
|
||||
/** 求职状态;0 - 其他, 1 开启中, 2 已关闭 */
|
||||
Integer jobIntentionStatus;
|
||||
|
||||
/** 期望薪资 */
|
||||
String expectSalary;
|
||||
|
||||
/** 求职地域 */
|
||||
List<String> expectJobRegion;
|
||||
|
||||
/** 工种列表 */
|
||||
List<Profession> professions;
|
||||
|
||||
@Data
|
||||
public static class ProfessionSkill {
|
||||
/**
|
||||
* w 父id
|
||||
*/
|
||||
Long parentId;
|
||||
|
||||
/**
|
||||
* 父技能标签code
|
||||
*/
|
||||
String parentSkillCode;
|
||||
|
||||
/**
|
||||
* w 等级 1-一级标签,2-二级标签,3-三级标签
|
||||
*/
|
||||
Integer level;
|
||||
|
||||
/**
|
||||
* 工种技能名称
|
||||
*/
|
||||
String name;
|
||||
|
||||
/**
|
||||
* 工种技能code
|
||||
*/
|
||||
String code;
|
||||
|
||||
/**w 对应档案id*/
|
||||
Long ownershipProfileId;
|
||||
|
||||
/** 子技能 */
|
||||
List<ProfessionSkill> skills;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Profession {
|
||||
/** 工种id*/
|
||||
@NotNull
|
||||
Long id;
|
||||
|
||||
/** 工种名称*/
|
||||
String name;
|
||||
|
||||
/**w 对应档案id*/
|
||||
Long ownershipProfileId;
|
||||
|
||||
/** 工种技能*/
|
||||
List<ProfessionSkill> skills;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 组类型
|
||||
*/
|
||||
@Data
|
||||
public class WorkerGroupDetailTypeVO {
|
||||
/** 字典code */
|
||||
private long dict_code;
|
||||
/** 类型名称 */
|
||||
private long dict_name;
|
||||
/** 上级id */
|
||||
private long parent_id;
|
||||
/** 类型 1-经营范围,2-经营范围子级,3-工程类别,4-经营类别 */
|
||||
private long worker_group_type;
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.dto.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:WorkGroupTypeVO
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/6/24 6:24 PM
|
||||
* 创 建 人:liuyu
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WorkerGroupTypeDTO {
|
||||
private Long workerGroupId;
|
||||
|
||||
/** 上级id */
|
||||
private String parentCode ;
|
||||
|
||||
/**
|
||||
* 班组类型 类型 1-经营范围,2-经营范围子级,3-工程类别,4-经营类别
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 字典code
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
private Integer isDelete;
|
||||
/**
|
||||
* 子类型
|
||||
*/
|
||||
private List<WorkerGroupTypeDTO> subWorkGroupTypeList;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:ProfileSourceType
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/9 21:59
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum EducationDegreeType implements IEnum {
|
||||
OTHERS(0, "其他"),
|
||||
PRIMARY_SCHOOL(1, "小学"),
|
||||
MIDDLE_SCHOOL(2, "中学"),
|
||||
PROFESSIONAL_HIGH_SCHOOL(3, "职高"),
|
||||
SENIOR_HIGH_SCHOOL(4, "高中"),
|
||||
JUNIOR_COLLEGE(5, "专科"),
|
||||
UNDERGRADUATE_COURSE(6, "本科"),
|
||||
MASTER(7, "硕士"),
|
||||
DOCTOR(8, "博士"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
/**
|
||||
* @author zhanghongbo
|
||||
* @date 2024/12/11
|
||||
*/
|
||||
public interface IEnum {
|
||||
Integer getCode();
|
||||
String getMessage();
|
||||
|
||||
static <T extends Enum<T> & IEnum> T enumFromCode(Class<T> enumType, Integer code) {
|
||||
T defaultEnum = null;
|
||||
for (T c : enumType.getEnumConstants()) {
|
||||
if (c.getCode().equals(code)) {
|
||||
return c;
|
||||
}
|
||||
if (c.getCode().equals(0)) {
|
||||
defaultEnum = c;
|
||||
}
|
||||
}
|
||||
return defaultEnum;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.model.CodeDefinition;
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 人员身份类型枚举
|
||||
*
|
||||
* @author xuyaozuo
|
||||
* @since 2022/5/9 21:59
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum IdentityType implements IEnum, CodeDefinition<Integer> {
|
||||
|
||||
/*人员身份类型*/
|
||||
NOT_SUPPORT(0, "NOT_SUPPORT", "无效类型"),
|
||||
WORKER(1, "WORKER", "工人"),
|
||||
WORKER_LEADER(2, "WORKER_LEADER", "班组长"),
|
||||
PRACTITIONER(3, "PRACTITIONER", "从业人员"),
|
||||
REGULATOR(4, "REGULATOR", "监管人员"),
|
||||
OPERATOR(5, "OPERATOR", "运营人员"),
|
||||
;
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
private final String desc;
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:ProfileSourceType
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/9 21:59
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum LevelType implements IEnum{
|
||||
OTHERS(0, "未定"),
|
||||
LEVEL_A_PLUS(1, "A+"),
|
||||
LEVEL_A(2, "A"),
|
||||
LEVEL_B(3, "B"),
|
||||
LEVEL_C(4, "C"),
|
||||
LEVEL_D(5, "D"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
|
||||
public static LevelType matchLevelType(Integer type) {
|
||||
LevelType levelType = ArrayUtil.firstMatch((e) -> e.getCode().equals(type), values());
|
||||
return null == levelType ? LevelType.OTHERS : levelType;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.cons.FaceConstants;
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author yangchen@axzo.cn
|
||||
*/
|
||||
@Getter
|
||||
public enum PersonFaceDetectStatus {
|
||||
SUCCESS(0,"检测通过", FaceConstants.FACE_URL_SUCCEEE),
|
||||
MORE_FACE(1, "照片中多人脸", FaceConstants.FACE_URL_MORE_FACE),
|
||||
ILLU_LIGHT(2, "光照不足", FaceConstants.FACE_URL_ILLU_LIGHT),
|
||||
BLUR_LIGHT(3, "模糊", FaceConstants.FACE_URL_BLUR),
|
||||
OCCLUSION(4, "有遮挡", FaceConstants.FACE_URL_OCCLUSION_LIGHT),
|
||||
EXCEPTION(5, "检测异常", FaceConstants.FACE_URL_EXCEPTION),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final Integer value;
|
||||
private final String desc;
|
||||
private final String errorDesc;
|
||||
|
||||
PersonFaceDetectStatus(Integer value, String desc, String errorDesc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
this.errorDesc = errorDesc;
|
||||
}
|
||||
|
||||
public static PersonFaceDetectStatus getByValue(Integer value) {
|
||||
for (PersonFaceDetectStatus item : PersonFaceDetectStatus.values()) {
|
||||
if (item.getValue().equals(value)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static PersonFaceDetectStatus getByErrorDesc(String errorDesc) {
|
||||
for (PersonFaceDetectStatus item : PersonFaceDetectStatus.values()) {
|
||||
if (item.getErrorDesc().equals(errorDesc)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否检测通过,true:检测通过;false:检测不通过
|
||||
*/
|
||||
public static boolean isDetectSuccess(PersonFaceDetectStatus status) {
|
||||
switch (status) {
|
||||
case SUCCESS:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:ProfileSourceType
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/9 21:59
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ProfileSourceType implements IEnum{
|
||||
OTHERS(0, "default"),
|
||||
FROM_USER(1, "用户"),
|
||||
FROM_THIRD(2, "from third part"),
|
||||
FROM_BUSINESS_DATA(3, "from business data"),
|
||||
FROM_OPERATION(4, "from operation"),
|
||||
FROM_MAIN_DOC(5, "main doc"),
|
||||
FROM_ROBOT(6, "from robot"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles 类 名 称:ProfileSourceType 类 描 述:TODO 创建时间:2022/5/9 21:59 创 建 人:xuyaozuo
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ProfileStatus implements IEnum{
|
||||
//状态 0 - 未激活, 1 - 已激活,2 - 禁用
|
||||
|
||||
UNACTIVATED(0, "未激活"),
|
||||
ACTIVATED(1, "已激活"),
|
||||
FORBIDDEN(2, "禁用"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
|
||||
private static Map<Integer, ProfileStatus> map;
|
||||
|
||||
public static ProfileStatus valueCode(Integer code) {
|
||||
if (map == null) {
|
||||
map = Arrays.stream(values())
|
||||
.collect(Collectors.toMap(ProfileStatus::getCode, Function.identity()));
|
||||
}
|
||||
return map.get(code);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 项目名称:pudge
|
||||
* 类 名 称:RegisterSouceType
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/26 22:51
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RegisterSourceType implements IEnum{
|
||||
UNKNOWN(0, "UNKNOWN"),
|
||||
FROM_APP(1, "APP"),
|
||||
FROM_PLANE(2, "面板机"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
|
||||
/**
|
||||
* 通过code获取对应枚举
|
||||
*/
|
||||
public static RegisterSourceType getRegisterSourceTypeFromCode(Integer code) {
|
||||
for (RegisterSourceType registerSourceType : RegisterSourceType.values()) {
|
||||
if (registerSourceType.code.equals(code)) {
|
||||
return registerSourceType;
|
||||
}
|
||||
}
|
||||
return UNKNOWN;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles 类 名 称:SexType 类 描 述:TODO 创建时间:2022/5/12 12:59 创 建 人:xuyaozuo
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum SexType implements IEnum{
|
||||
|
||||
/*性别枚举*/
|
||||
UNKNOWN(0, "UNKNOWN", "未知"),
|
||||
FEMALE(1, "FEMALE", "女性"),
|
||||
MALE(2, "MALE", "男性"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
private final String desc;
|
||||
|
||||
/**
|
||||
* 通过code获取SexType
|
||||
*/
|
||||
public static SexType getSexType(Integer code) {
|
||||
for (SexType sexType : SexType.values()) {
|
||||
if (sexType.getCode().equals(code)) {
|
||||
return sexType;
|
||||
}
|
||||
}
|
||||
return SexType.UNKNOWN;
|
||||
}
|
||||
|
||||
public static String getDescByCode(Integer code) {
|
||||
return getSexType(code).getDesc();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package cn.axzo.orgmanax.infra.client.profile.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 项目名称:profiles
|
||||
* 类 名 称:ProfileSourceType
|
||||
* 类 描 述:TODO
|
||||
* 创建时间:2022/5/9 21:59
|
||||
* 创 建 人:xuyaozuo
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum VerifyStatus implements IEnum{
|
||||
//状态 0 - 未激活, 1 - 已激活,2 - 禁用,3- 认证失败
|
||||
NOT_VERIFIED(0, "未认证"),
|
||||
VERIFYING(1, "认证失败"),
|
||||
VERIFY_SUCCESS(2, "认证成功"),
|
||||
VERIFY_FAILED(3, "认证失败"),
|
||||
;
|
||||
@EnumValue
|
||||
private final Integer code;
|
||||
private final String message;
|
||||
}
|
||||
@ -0,0 +1,425 @@
|
||||
package cn.axzo.orgmanax.integration.sdk.profile;
|
||||
|
||||
import cn.axzo.basics.profiles.api.OperatorProfileServiceApi;
|
||||
import cn.axzo.basics.profiles.api.UserProfileOperationServiceApi;
|
||||
import cn.axzo.basics.profiles.api.UserProfileServiceApi;
|
||||
import cn.axzo.basics.profiles.api.WorkerServiceApi;
|
||||
import cn.axzo.basics.profiles.api.vo.profiles.*;
|
||||
import cn.axzo.basics.profiles.api.vo.worker.WorkerProfessionReq;
|
||||
import cn.axzo.basics.profiles.dto.basic.*;
|
||||
import cn.axzo.basics.profiles.dto.basic.PractitionerProfileDto;
|
||||
import cn.axzo.basics.profiles.dto.basic.WorkerProfileDto;
|
||||
import cn.axzo.basics.profiles.dto.request.PersonUpdateDto;
|
||||
import cn.axzo.basics.profiles.dto.request.QueryPersonProfileByIdOrPhoneDto;
|
||||
import cn.axzo.basics.profiles.dto.request.QueryPersonProfileDto;
|
||||
import cn.axzo.basics.profiles.dto.response.WorkerGroupDetailVO;
|
||||
import cn.axzo.foundation.exception.BusinessException;
|
||||
import cn.axzo.orgmanax.common.config.BizResultCode;
|
||||
import cn.axzo.orgmanax.infra.client.profile.ProfileUserProfileClient;
|
||||
import cn.axzo.orgmanax.infra.client.profile.dto.*;
|
||||
import cn.axzo.orgmanax.integration.core.RpcWrapper;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhanghongbo
|
||||
* @date 2024/12/11
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Component
|
||||
public class ProfileUserProfileClientImpl implements ProfileUserProfileClient {
|
||||
|
||||
private OperatorProfileServiceApi operatorProfileServiceApi;
|
||||
private UserProfileOperationServiceApi userProfileOperationServiceApi;
|
||||
private UserProfileServiceApi userProfileServiceApi;
|
||||
private WorkerServiceApi workerServiceApi;
|
||||
|
||||
/**
|
||||
* 创建身份
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileAddOperatorResp addOperator(ProfileAddOperatorReq req) {
|
||||
PersonUpdateDto rpcReq = BeanUtil.copyProperties(req, PersonUpdateDto.class);
|
||||
OperatorProfileDto operatorProfileDto = RpcWrapper.commonRes(() -> operatorProfileServiceApi.addOperator(rpcReq));
|
||||
return BeanUtil.copyProperties(operatorProfileDto, ProfileAddOperatorResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 幂等创建自然人和身份档案
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileUserProfileCreateResp userProfileCreate(ProfileUserProfileCreateReq req) {
|
||||
UserProfileCreateReq rpcReq = BeanUtil.copyProperties(req, UserProfileCreateReq.class);
|
||||
UserProfileResp result = RpcWrapper.commonRes(() -> userProfileOperationServiceApi.createPersonProfileAndIdentityProfile(rpcReq));
|
||||
return BeanUtil.copyProperties(result, ProfileUserProfileCreateResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id获取自然人档案
|
||||
* @param personId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfilePersonResp getPersonProfile(Long personId) {
|
||||
PersonProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonProfile(personId));
|
||||
return BeanUtil.copyProperties(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量personId获取自然人档案
|
||||
* @param personIds
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfilePersonResp> getPersonProfiles(List<Long> personIds) {
|
||||
List<PersonProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonProfiles(personIds));
|
||||
return BeanUtil.copyToList(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量personId获取自然人档案
|
||||
* @param personIds
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfilePersonResp> postPersonProfiles(List<Long> personIds) {
|
||||
List<PersonProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.postPersonProfiles(personIds));
|
||||
return BeanUtil.copyToList(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过手机号创建自然人信息
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfilePersonResp createPersonProfile(String phone) {
|
||||
PersonProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.createPersonProfile(phone));
|
||||
return BeanUtil.copyProperties(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过手机号获取用户自然人档案
|
||||
* @param idNumber
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfilePersonResp getUnionPersonProfile(String idNumber, String phone) {
|
||||
PersonProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getUnionPersonProfile(idNumber, phone));
|
||||
return BeanUtil.copyProperties(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户身份接口
|
||||
* @param personId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileIdentityResp> getPersonIdentityProfile(Long personId) {
|
||||
List<IdentityProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonIdentityProfile(personId));
|
||||
return BeanUtil.copyToList(result, ProfileIdentityResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户身份接口 排除删除字段
|
||||
* @param identityId
|
||||
* @param identityType
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileIdentityResp getProfileByIdentityIdAndIdentityTypeExcludeIsDelete(Long identityId, Integer identityType) {
|
||||
IdentityProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getProfileByIdentityIdAndIdentityTypeExcludeIsDelete(identityId, identityType));
|
||||
return BeanUtil.copyProperties(result, ProfileIdentityResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量获取用户身份接口 排除删除字段
|
||||
* @param identityIds
|
||||
* @param identityType
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileIdentityResp> getProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(List<Long> identityIds, Integer identityType) {
|
||||
List<IdentityProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(identityIds, identityType));
|
||||
return BeanUtil.copyToList(result, ProfileIdentityResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量获取用户信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileGetIdentityProfileLiteResp> test(ProfileGetIdentityProfileLiteReq req) {
|
||||
IdentityProfileLiteQueryVO rpcReq = BeanUtil.copyProperties(req, IdentityProfileLiteQueryVO.class);
|
||||
List<IdentityProfileLiteQueryDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getIdentityProfileLite(rpcReq));
|
||||
return BeanUtil.copyToList(result, ProfileGetIdentityProfileLiteResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量获取用户身份接口 排除删除字段
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileIdentityResp> postProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(ProfileIdentityProfilePostReq req) {
|
||||
IdentityProfilePostVO rpcReq = BeanUtil.copyProperties(req, IdentityProfilePostVO.class);
|
||||
List<IdentityProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.postProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(rpcReq));
|
||||
return BeanUtil.copyToList(result, ProfileIdentityResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户身份接口指
|
||||
* @param personIds
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<Long, List<ProfileIdentityResp>> getPersonIdentityProfile(Set<Long> personIds) {
|
||||
Map<Long, List<IdentityProfileDto>> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonIdentityProfile(personIds));
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<Long, List<ProfileIdentityResp>> map = new HashMap<>();
|
||||
result.forEach((key, values) -> {
|
||||
map.put(key, values.stream().map(identityProfileDto -> BeanUtil.copyProperties(identityProfileDto, ProfileIdentityResp.class)).collect(Collectors.toList()));
|
||||
});
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过自然人信息创建从业人员身份
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfilePractitionerResp postPractitionerProfileWithUnionPerson(ProfilePostPractitionerProfileWithUnionPersonReq req) {
|
||||
PractitionerAndPersonPostVO practitionerAndPersonPostVO = BeanUtil.copyProperties(req, PractitionerAndPersonPostVO.class);
|
||||
PractitionerProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.postPractitionerProfileWithUnionPerson(practitionerAndPersonPostVO));
|
||||
return BeanUtil.copyProperties(result, ProfilePractitionerResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工人身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileWorkerResp getWorkerProfile(Long id) {
|
||||
WorkerProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerProfile(id));
|
||||
return BeanUtil.copyProperties(result, ProfileWorkerResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班组长身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileWorkerLeaderResp getWorkerLeaderProfileNotThrowing(Long id) {
|
||||
WorkerLeaderProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerLeaderProfileNotThrowing(id));
|
||||
return BeanUtil.copyProperties(result, ProfileWorkerLeaderResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取班组长身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileWorkerLeaderResp getWorkerLeaderProfile(Long id) {
|
||||
WorkerLeaderProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerLeaderProfile(id));
|
||||
return BeanUtil.copyProperties(result, ProfileWorkerLeaderResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取从业人员身份档案
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfilePractitionerResp getPractitionerProfile(Long id) {
|
||||
PractitionerProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPractitionerProfile(id));
|
||||
return BeanUtil.copyProperties(result, ProfilePractitionerResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询班组档案
|
||||
* @param ouId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileWorkerGroupResp getWorkerGroupProfile(Long ouId) {
|
||||
WorkerGroupDTO result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerGroupProfile(ouId));
|
||||
return BeanUtil.copyProperties(result, ProfileWorkerGroupResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份id批量查询工人信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileWorkerResp> getWorkerProfileListV2(ProfileGetWorkerProfileListV2Req req) {
|
||||
WorkerProfileGetVO rpcReq = BeanUtil.copyProperties(req, WorkerProfileGetVO.class);
|
||||
List<WorkerProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerProfileListV2(rpcReq));
|
||||
return BeanUtil.copyToList(result, ProfileWorkerResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过自然人ID查工人信息,若没有工人身份也会返回自然人信息
|
||||
* @param id
|
||||
* @return key = personId
|
||||
*/
|
||||
@Override
|
||||
public Map<Long, ProfileWorkerResp> getWorkerProfileListByPersonId(Set<Long> id) {
|
||||
Map<Long, WorkerProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerProfileListByPersonId(id));
|
||||
if (ObjectUtil.isEmpty(result)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<Long, ProfileWorkerResp> map = new HashMap<>();
|
||||
result.forEach((key, value) -> {
|
||||
map.put(key, BeanUtil.copyProperties(value, ProfileWorkerResp.class));
|
||||
});
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份id批量查询工人信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileWorkerResp> postWorkerProfileList(List<Long> ids) {
|
||||
List<WorkerProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.postWorkerProfileList(ids));
|
||||
return BeanUtil.copyToList(result, ProfileWorkerResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据身份id批量查询班组长信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileWorkerLeaderResp> getWorkerLeaderProfileList(ProfileGetWorkerLeaderProfileListReq req) {
|
||||
WorkerLeaderProfileGetVO rpcReq = BeanUtil.copyProperties(req, WorkerLeaderProfileGetVO.class);
|
||||
List<WorkerLeaderProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerLeaderProfileList(rpcReq));
|
||||
return BeanUtil.copyToList(result, ProfileWorkerLeaderResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取身份信息
|
||||
* @param id
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileIdentityResp> getIdentitiesByIdSet(List<Long> id, Integer type) {
|
||||
List<IdentityProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getIdentitiesByIdSet(id, type));
|
||||
return BeanUtil.copyToList(result, ProfileIdentityResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据personId查询从业人员
|
||||
* @param personId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ProfileIdentityResp getPractitionerIdentitiesByPersonId(Long personId) {
|
||||
IdentityProfileDto result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPractitionerIdentitiesByPersonId(personId));
|
||||
return BeanUtil.copyProperties(result, ProfileIdentityResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据手机号或班组号查询班组信息
|
||||
* @param personProfilePhoneOrWorkerGroupId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfileGetWorkerGroupDetailResp> getWorkerGroupDetailInfoListByConCom(String personProfilePhoneOrWorkerGroupId) {
|
||||
List<WorkerGroupDetailVO> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerGroupDetailInfoListByConCom(personProfilePhoneOrWorkerGroupId));
|
||||
return BeanUtil.copyToList(result, ProfileGetWorkerGroupDetailResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取身份信息
|
||||
* @param reqs
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Set<Long> getPersonIdListByIdentity(List<ProfileGetPersonIdListByIdentityReq> reqs) {
|
||||
if (ObjectUtil.isEmpty(reqs)) {
|
||||
throw new BusinessException(BizResultCode.INVALID_PARAM);
|
||||
}
|
||||
List<IdentityDto> rpcReqList = BeanUtil.copyToList(reqs, IdentityDto.class);
|
||||
Set<IdentityDto> rpcReqSet = rpcReqList.stream().collect(Collectors.toSet());
|
||||
return RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonIdListByIdentity(rpcReqSet));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过手机号、身份证号、姓名(模糊查询) 查询自然人信息
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfilePersonResp> getPersonProfileList(ProfileGetPersonProfileListReq req) {
|
||||
QueryPersonProfileDto rpcReq = BeanUtil.copyProperties(req, QueryPersonProfileDto.class);
|
||||
List<PersonProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonProfileList(rpcReq));
|
||||
return BeanUtil.copyToList(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过personId、手机号,批量查询
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ProfilePersonResp> findPersonProfileListByIdOrPhone(ProfileFindPersonProfileListByIdOrPhoneReq req) {
|
||||
QueryPersonProfileByIdOrPhoneDto rpcReq = BeanUtil.copyProperties(req, QueryPersonProfileByIdOrPhoneDto.class);
|
||||
List<PersonProfileDto> result = RpcWrapper.commonRes(() -> userProfileServiceApi.findPersonProfileListByIdOrPhone(rpcReq));
|
||||
return BeanUtil.copyToList(result, ProfilePersonResp.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增平台班组工人工种
|
||||
* @param req
|
||||
*/
|
||||
@Override
|
||||
public Long saveWorkerProfession(ProfileSaveWorkerProfessionReq req) {
|
||||
WorkerProfessionReq rpcReq = BeanUtil.copyProperties(req, WorkerProfessionReq.class);
|
||||
return RpcWrapper.commonRes(() -> workerServiceApi.saveWorkerProfession(rpcReq));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user