From 3b7705c56545d8c5a56992250289bf137d585326 Mon Sep 17 00:00:00 2001 From: zhanghongbo Date: Fri, 13 Dec 2024 10:31:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(REQ-3282):=20=E5=A2=9E=E5=8A=A0profile?= =?UTF-8?q?=E9=98=B2=E8=85=90=E5=B1=82=E8=B0=83=E7=94=A8=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/ProfileUserProfileClient.java | 226 ++++++++++ .../profile/dto/ProfileAddOperatorReq.java | 83 ++++ .../profile/dto/ProfileAddOperatorResp.java | 12 + ...leFindPersonProfileListByIdOrPhoneReq.java | 32 ++ .../dto/ProfileGetIdentityProfileLiteReq.java | 52 +++ .../ProfileGetIdentityProfileLiteResp.java | 92 ++++ .../ProfileGetPersonIdListByIdentityReq.java | 20 + .../dto/ProfileGetPersonProfileListReq.java | 59 +++ .../dto/ProfileGetWorkerGroupDetailResp.java | 121 +++++ .../ProfileGetWorkerLeaderProfileListReq.java | 21 + .../dto/ProfileGetWorkerProfileListV2Req.java | 27 ++ .../dto/ProfileIdentityProfilePostReq.java | 13 + .../profile/dto/ProfileIdentityResp.java | 15 + .../client/profile/dto/ProfilePersonResp.java | 99 ++++ ...PractitionerProfileWithUnionPersonReq.java | 22 + .../profile/dto/ProfilePractitionerResp.java | 11 + .../dto/ProfileSaveWorkerProfessionReq.java | 42 ++ .../dto/ProfileUserProfileCreateReq.java | 46 ++ .../dto/ProfileUserProfileCreateResp.java | 51 +++ .../profile/dto/ProfileWorkerGroupResp.java | 49 ++ .../profile/dto/ProfileWorkerLeaderResp.java | 18 + .../client/profile/dto/ProfileWorkerResp.java | 65 +++ .../profile/dto/cons/FaceConstants.java | 28 ++ .../dto/model/AbstractIdentityProfileDto.java | 24 + .../profile/dto/model/AbstractProfileDto.java | 40 ++ .../dto/model/AbstractProfileUpdateDto.java | 18 + .../client/profile/dto/model/BasicDto.java | 31 ++ .../profile/dto/model/CodeDefinition.java | 33 ++ .../profile/dto/model/EducationDto.java | 25 ++ .../profile/dto/model/HealthInfoDto.java | 16 + .../profile/dto/model/IdentityUpdateDto.java | 18 + .../model/OrganizationalUnitProfileDTO.java | 72 +++ .../dto/model/PersonEducationUpdateDto.java | 16 + .../profile/dto/model/PersonEducationVO.java | 21 + .../profile/dto/model/PersonPostVo.java | 16 + .../profile/dto/model/PersonProfileDto.java | 95 ++++ .../profile/dto/model/PersonUpdateVO.java | 49 ++ .../dto/model/PractitionerUpdateDto.java | 20 + .../profile/dto/model/ProfessionTagDto.java | 34 ++ .../client/profile/dto/model/SkillTagDto.java | 25 ++ .../profile/dto/model/VerificationDto.java | 13 + .../profile/dto/model/WorkerDetailComDto.java | 83 ++++ .../dto/model/WorkerGroupDetailTypeVO.java | 18 + .../profile/dto/model/WorkerGroupTypeDTO.java | 48 ++ .../profile/enums/EducationDegreeType.java | 30 ++ .../infra/client/profile/enums/IEnum.java | 23 + .../client/profile/enums/IdentityType.java | 32 ++ .../infra/client/profile/enums/LevelType.java | 34 ++ .../profile/enums/PersonFaceDetectStatus.java | 62 +++ .../profile/enums/ProfileSourceType.java | 28 ++ .../client/profile/enums/ProfileStatus.java | 36 ++ .../profile/enums/RegisterSourceType.java | 37 ++ .../infra/client/profile/enums/SexType.java | 39 ++ .../client/profile/enums/VerifyStatus.java | 26 ++ .../profile/ProfileUserProfileClientImpl.java | 425 ++++++++++++++++++ 55 files changed, 2691 insertions(+) create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/ProfileUserProfileClient.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileFindPersonProfileListByIdOrPhoneReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonIdListByIdentityReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonProfileListReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerGroupDetailResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerLeaderProfileListReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerProfileListV2Req.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityProfilePostReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePersonResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePostPractitionerProfileWithUnionPersonReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePractitionerResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileSaveWorkerProfessionReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateReq.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerGroupResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerLeaderResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerResp.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/cons/FaceConstants.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractIdentityProfileDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileUpdateDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/BasicDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/CodeDefinition.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/EducationDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/HealthInfoDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/IdentityUpdateDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/OrganizationalUnitProfileDTO.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationUpdateDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationVO.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonPostVo.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonProfileDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonUpdateVO.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PractitionerUpdateDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/ProfessionTagDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/SkillTagDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/VerificationDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerDetailComDto.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupDetailTypeVO.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupTypeDTO.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/EducationDegreeType.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IEnum.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IdentityType.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/LevelType.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/PersonFaceDetectStatus.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileSourceType.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileStatus.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/RegisterSourceType.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/SexType.java create mode 100644 orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/VerifyStatus.java create mode 100644 orgmanax-integration/src/main/java/cn/axzo/orgmanax/integration/sdk/profile/ProfileUserProfileClientImpl.java diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/ProfileUserProfileClient.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/ProfileUserProfileClient.java new file mode 100644 index 0000000..6e4494b --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/ProfileUserProfileClient.java @@ -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 getPersonProfiles(List personIds); + + /** + * 批量personId获取自然人档案 + * @param personIds + * @return + */ + List postPersonProfiles(List personIds); + + /** + * 通过手机号创建自然人信息 + * @param phone + * @return + */ + ProfilePersonResp createPersonProfile(String phone); + + /** + * 通过手机号获取用户自然人档案 + * @param idNumber + * @param phone + * @return + */ + ProfilePersonResp getUnionPersonProfile(String idNumber, String phone); + + /** + * 获取用户身份接口 + * @param personId + * @return + */ + List getPersonIdentityProfile(Long personId); + + /** + * 获取用户身份接口 排除删除字段 + * @param identityId + * @param identityType + * @return + */ + ProfileIdentityResp getProfileByIdentityIdAndIdentityTypeExcludeIsDelete(Long identityId, Integer identityType); + + /** + * 批量获取用户身份接口 排除删除字段 + * @param identityIds + * @param identityType + * @return + */ + List getProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(List identityIds, Integer identityType); + + /** + * 批量获取用户信息 + * @param req + * @return + */ + List test(ProfileGetIdentityProfileLiteReq req); + + /** + * 批量获取用户身份接口 排除删除字段 + * @param req + * @return + */ + List postProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(ProfileIdentityProfilePostReq req); + + /** + * 获取用户身份接口指 + * @param personIds + * @return + */ + Map> getPersonIdentityProfile(Set 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 getWorkerProfileListV2(ProfileGetWorkerProfileListV2Req req); + + /** + * 通过自然人ID查工人信息,若没有工人身份也会返回自然人信息 + * @param id + * @return key = personId + */ + Map getWorkerProfileListByPersonId(Set id); + + /** + * 根据身份id批量查询工人信息 + * @param ids + * @return + */ + List postWorkerProfileList(List ids); + + /** + * 根据身份id批量查询班组长信息 + * @param req + * @return + */ + List getWorkerLeaderProfileList(ProfileGetWorkerLeaderProfileListReq req); + + /** + * 获取身份信息 + * @param id + * @param type + * @return + */ + List getIdentitiesByIdSet(List id, Integer type); + + /** + * 根据personId查询从业人员 + * @param personId + * @return + */ + ProfileIdentityResp getPractitionerIdentitiesByPersonId(Long personId); + + /** + * 根据手机号或班组号查询班组信息 + * @param personProfilePhoneOrWorkerGroupId + * @return + */ + List getWorkerGroupDetailInfoListByConCom(String personProfilePhoneOrWorkerGroupId); + + /** + * 获取身份信息 + * @param reqs + * @return + */ + Set getPersonIdListByIdentity(List reqs); + + /** + * 通过手机号、身份证号、姓名(模糊查询) 查询自然人信息 + * @param req + * @return + */ + List getPersonProfileList(ProfileGetPersonProfileListReq req); + + /** + * 通过personId、手机号,批量查询 + * @param req + * @return + */ + List findPersonProfileListByIdOrPhone(ProfileFindPersonProfileListByIdOrPhoneReq req); + + /** + * 新增平台班组工人工种 + * @param req + */ + Long saveWorkerProfession(ProfileSaveWorkerProfessionReq req); +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorReq.java new file mode 100644 index 0000000..9ebca48 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorReq.java @@ -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; +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorResp.java new file mode 100644 index 0000000..0fafbba --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileAddOperatorResp.java @@ -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 { +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileFindPersonProfileListByIdOrPhoneReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileFindPersonProfileListByIdOrPhoneReq.java new file mode 100644 index 0000000..9ca6a59 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileFindPersonProfileListByIdOrPhoneReq.java @@ -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 personIds; + + /** + * 手机号 + */ + @Size(max = 1000, message = "phones max length:1000") + private List phones; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteReq.java new file mode 100644 index 0000000..be777c2 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteReq.java @@ -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 personIds; + + /** + * 身份信息 + */ + private List identityQueries; + + @Data + @Builder + @AllArgsConstructor + @NoArgsConstructor + public static class IdentityQuery { + /** + * 身份id + */ + private Long identityId; + + /** + * 身份类型 + */ + private IdentityType identityType; + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteResp.java new file mode 100644 index 0000000..44597ed --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetIdentityProfileLiteResp.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonIdListByIdentityReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonIdListByIdentityReq.java new file mode 100644 index 0000000..720bc20 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonIdListByIdentityReq.java @@ -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; +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonProfileListReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonProfileListReq.java new file mode 100644 index 0000000..6fda3cd --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetPersonProfileListReq.java @@ -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 phones; + + /** + * 身份证号 + */ + private String idNumber; + + /** + * 批量身份证号 + */ + private List idNumbers; + + /** + * phone 或者realName去查询 + */ + private String keyNo; + + /** + * 真实姓名(全匹配) + */ + private String realNameEQ; + + /** + * 真实姓名全匹配的列表 + */ + private List eqRealNames; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerGroupDetailResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerGroupDetailResp.java new file mode 100644 index 0000000..fe3e65f --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerGroupDetailResp.java @@ -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 workerGroupDetailTypeVOList; + + /** 公共参数 **/ + private String common; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerLeaderProfileListReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerLeaderProfileListReq.java new file mode 100644 index 0000000..f5d22b9 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerLeaderProfileListReq.java @@ -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 identityIdList; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerProfileListV2Req.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerProfileListV2Req.java new file mode 100644 index 0000000..46da43d --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileGetWorkerProfileListV2Req.java @@ -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 identityIdList; + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityProfilePostReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityProfilePostReq.java new file mode 100644 index 0000000..20630e7 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityProfilePostReq.java @@ -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 identityIds; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityResp.java new file mode 100644 index 0000000..c014946 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileIdentityResp.java @@ -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 { + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePersonResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePersonResp.java new file mode 100644 index 0000000..42d3dc6 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePersonResp.java @@ -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 { + + 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 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; + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePostPractitionerProfileWithUnionPersonReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePostPractitionerProfileWithUnionPersonReq.java new file mode 100644 index 0000000..e8ff340 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePostPractitionerProfileWithUnionPersonReq.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePractitionerResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePractitionerResp.java new file mode 100644 index 0000000..98c82a4 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfilePractitionerResp.java @@ -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 { + private BigDecimal score; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileSaveWorkerProfessionReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileSaveWorkerProfessionReq.java new file mode 100644 index 0000000..13da285 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileSaveWorkerProfessionReq.java @@ -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 professions; + + private Long operatorPersonId; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateReq.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateReq.java new file mode 100644 index 0000000..ebdd69d --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateReq.java @@ -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); + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateResp.java new file mode 100644 index 0000000..6816534 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileUserProfileCreateResp.java @@ -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); + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerGroupResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerGroupResp.java new file mode 100644 index 0000000..5e906f3 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerGroupResp.java @@ -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 workGroupTypeVOList; + + /** + * 组织信息 + */ + private OrganizationalUnitProfileDTO organizationalUnitProfileVO; + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerLeaderResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerLeaderResp.java new file mode 100644 index 0000000..a4e5217 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerLeaderResp.java @@ -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 { + private float experienceYears; + private float avgExperienceYears; + private BigDecimal score; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerResp.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerResp.java new file mode 100644 index 0000000..c267c73 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/ProfileWorkerResp.java @@ -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 { + private Date lastJoinDate; + + private Date lastLeaveDate; + + private Integer totalFinishedTask = 0; + + private String workKindName = ""; + + private Integer workAge; + + private Integer workGroupInviteCounts = 0; + + /** + * 工种 + */ + @Builder.Default + private List professionTags = new ArrayList<>(); + + /** + * 级别 + */ + private LevelType level; + + private BigDecimal score; + + /** + * 主工种标签 + */ + private Long masterProfessionId; + /** + * 主工种标签名称 + */ + private String masterProfessionName; + + public List getProfessionTags() { + return Optional.ofNullable(professionTags).orElseGet(Collections::emptyList); + } + + public ProfileWorkerResp personProfile(PersonProfileDto profileDto) { + this.setPersonProfile(profileDto); + return this; + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/cons/FaceConstants.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/cons/FaceConstants.java new file mode 100644 index 0000000..d0b648f --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/cons/FaceConstants.java @@ -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"; + + + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractIdentityProfileDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractIdentityProfileDto.java new file mode 100644 index 0000000..4aaa4a4 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractIdentityProfileDto.java @@ -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> extends AbstractProfileDto { + private Long acntId = 0L; + + private String description = ""; + + private IdentityType identityType = IdentityType.NOT_SUPPORT; + + private PersonProfileDto personProfile; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileDto.java new file mode 100644 index 0000000..99ea2de --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileDto.java @@ -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 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; + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileUpdateDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileUpdateDto.java new file mode 100644 index 0000000..96c61ca --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/AbstractProfileUpdateDto.java @@ -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 { + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/BasicDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/BasicDto.java new file mode 100644 index 0000000..57b5f61 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/BasicDto.java @@ -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; + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/CodeDefinition.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/CodeDefinition.java new file mode 100644 index 0000000..ed61571 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/CodeDefinition.java @@ -0,0 +1,33 @@ +package cn.axzo.orgmanax.infra.client.profile.dto.model; + +import java.util.Optional; + +/** + * @author yanglin + */ +public interface CodeDefinition { + + 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 & CodeDefinition> + Optional findByCode(Class 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(); + } + +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/EducationDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/EducationDto.java new file mode 100644 index 0000000..cc274ea --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/EducationDto.java @@ -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 { + private Instant fromDate; + + private Instant toDate; + + private String schoolName = ""; + + private EducationDegreeType degreeCode = EducationDegreeType.OTHERS; + + private String majorName = ""; + + private String subMajor = ""; + + private String detail = ""; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/HealthInfoDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/HealthInfoDto.java new file mode 100644 index 0000000..b2d2b68 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/HealthInfoDto.java @@ -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; +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/IdentityUpdateDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/IdentityUpdateDto.java new file mode 100644 index 0000000..f0d7b5d --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/IdentityUpdateDto.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/OrganizationalUnitProfileDTO.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/OrganizationalUnitProfileDTO.java new file mode 100644 index 0000000..f350a80 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/OrganizationalUnitProfileDTO.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationUpdateDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationUpdateDto.java new file mode 100644 index 0000000..b1f9bb6 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationUpdateDto.java @@ -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; +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationVO.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationVO.java new file mode 100644 index 0000000..c046d21 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonEducationVO.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonPostVo.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonPostVo.java new file mode 100644 index 0000000..505c448 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonPostVo.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonProfileDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonProfileDto.java new file mode 100644 index 0000000..c672e90 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonProfileDto.java @@ -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 { + + 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 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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonUpdateVO.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonUpdateVO.java new file mode 100644 index 0000000..0020cd1 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PersonUpdateVO.java @@ -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; +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PractitionerUpdateDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PractitionerUpdateDto.java new file mode 100644 index 0000000..301394d --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/PractitionerUpdateDto.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/ProfessionTagDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/ProfessionTagDto.java new file mode 100644 index 0000000..ece5b59 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/ProfessionTagDto.java @@ -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 skillTagList; + + /** + * 档案id + */ + Long ownershipProfileId; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/SkillTagDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/SkillTagDto.java new file mode 100644 index 0000000..d402490 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/SkillTagDto.java @@ -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 skillTagList; + Long identityProfileId; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/VerificationDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/VerificationDto.java new file mode 100644 index 0000000..c1453a9 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/VerificationDto.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerDetailComDto.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerDetailComDto.java new file mode 100644 index 0000000..32c28f9 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerDetailComDto.java @@ -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 expectJobRegion; + + /** 工种列表 */ + List 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 skills; + } + + @Data + public static class Profession { + /** 工种id*/ + @NotNull + Long id; + + /** 工种名称*/ + String name; + + /**w 对应档案id*/ + Long ownershipProfileId; + + /** 工种技能*/ + List skills; + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupDetailTypeVO.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupDetailTypeVO.java new file mode 100644 index 0000000..0c77c4f --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupDetailTypeVO.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupTypeDTO.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupTypeDTO.java new file mode 100644 index 0000000..b2db4c7 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/dto/model/WorkerGroupTypeDTO.java @@ -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 subWorkGroupTypeList; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/EducationDegreeType.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/EducationDegreeType.java new file mode 100644 index 0000000..10f4835 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/EducationDegreeType.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IEnum.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IEnum.java new file mode 100644 index 0000000..5144e5c --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IEnum.java @@ -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 & IEnum> T enumFromCode(Class 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; + } +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IdentityType.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IdentityType.java new file mode 100644 index 0000000..dfb12e1 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/IdentityType.java @@ -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 { + + /*人员身份类型*/ + 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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/LevelType.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/LevelType.java new file mode 100644 index 0000000..e66afef --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/LevelType.java @@ -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; + + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/PersonFaceDetectStatus.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/PersonFaceDetectStatus.java new file mode 100644 index 0000000..9ca6a10 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/PersonFaceDetectStatus.java @@ -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; + } + } +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileSourceType.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileSourceType.java new file mode 100644 index 0000000..8bea42c --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileSourceType.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileStatus.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileStatus.java new file mode 100644 index 0000000..b039985 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/ProfileStatus.java @@ -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 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); + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/RegisterSourceType.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/RegisterSourceType.java new file mode 100644 index 0000000..45f1498 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/RegisterSourceType.java @@ -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; + } +} \ No newline at end of file diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/SexType.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/SexType.java new file mode 100644 index 0000000..6a30244 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/SexType.java @@ -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(); + } +} diff --git a/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/VerifyStatus.java b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/VerifyStatus.java new file mode 100644 index 0000000..53f9d97 --- /dev/null +++ b/orgmanax-infra/src/main/java/cn/axzo/orgmanax/infra/client/profile/enums/VerifyStatus.java @@ -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; +} \ No newline at end of file diff --git a/orgmanax-integration/src/main/java/cn/axzo/orgmanax/integration/sdk/profile/ProfileUserProfileClientImpl.java b/orgmanax-integration/src/main/java/cn/axzo/orgmanax/integration/sdk/profile/ProfileUserProfileClientImpl.java new file mode 100644 index 0000000..23170b6 --- /dev/null +++ b/orgmanax-integration/src/main/java/cn/axzo/orgmanax/integration/sdk/profile/ProfileUserProfileClientImpl.java @@ -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 getPersonProfiles(List personIds) { + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonProfiles(personIds)); + return BeanUtil.copyToList(result, ProfilePersonResp.class); + } + + /** + * 批量personId获取自然人档案 + * @param personIds + * @return + */ + @Override + public List postPersonProfiles(List personIds) { + List 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 getPersonIdentityProfile(Long personId) { + List 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 getProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(List identityIds, Integer identityType) { + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(identityIds, identityType)); + return BeanUtil.copyToList(result, ProfileIdentityResp.class); + } + + /** + * 批量获取用户信息 + * @param req + * @return + */ + @Override + public List test(ProfileGetIdentityProfileLiteReq req) { + IdentityProfileLiteQueryVO rpcReq = BeanUtil.copyProperties(req, IdentityProfileLiteQueryVO.class); + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getIdentityProfileLite(rpcReq)); + return BeanUtil.copyToList(result, ProfileGetIdentityProfileLiteResp.class); + } + + /** + * 批量获取用户身份接口 排除删除字段 + * @param req + * @return + */ + @Override + public List postProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(ProfileIdentityProfilePostReq req) { + IdentityProfilePostVO rpcReq = BeanUtil.copyProperties(req, IdentityProfilePostVO.class); + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.postProfileByIdentityIdsAndIdentityTypeExcludeIsDelete(rpcReq)); + return BeanUtil.copyToList(result, ProfileIdentityResp.class); + } + + /** + * 获取用户身份接口指 + * @param personIds + * @return + */ + @Override + public Map> getPersonIdentityProfile(Set personIds) { + Map> result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonIdentityProfile(personIds)); + if (ObjectUtil.isEmpty(result)) { + return Collections.emptyMap(); + } + Map> 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 getWorkerProfileListV2(ProfileGetWorkerProfileListV2Req req) { + WorkerProfileGetVO rpcReq = BeanUtil.copyProperties(req, WorkerProfileGetVO.class); + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerProfileListV2(rpcReq)); + return BeanUtil.copyToList(result, ProfileWorkerResp.class); + } + + /** + * 通过自然人ID查工人信息,若没有工人身份也会返回自然人信息 + * @param id + * @return key = personId + */ + @Override + public Map getWorkerProfileListByPersonId(Set id) { + Map result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerProfileListByPersonId(id)); + if (ObjectUtil.isEmpty(result)) { + return Collections.emptyMap(); + } + Map map = new HashMap<>(); + result.forEach((key, value) -> { + map.put(key, BeanUtil.copyProperties(value, ProfileWorkerResp.class)); + }); + return map; + } + + /** + * 根据身份id批量查询工人信息 + * @param ids + * @return + */ + @Override + public List postWorkerProfileList(List ids) { + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.postWorkerProfileList(ids)); + return BeanUtil.copyToList(result, ProfileWorkerResp.class); + } + + /** + * 根据身份id批量查询班组长信息 + * @param req + * @return + */ + @Override + public List getWorkerLeaderProfileList(ProfileGetWorkerLeaderProfileListReq req) { + WorkerLeaderProfileGetVO rpcReq = BeanUtil.copyProperties(req, WorkerLeaderProfileGetVO.class); + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerLeaderProfileList(rpcReq)); + return BeanUtil.copyToList(result, ProfileWorkerLeaderResp.class); + } + + /** + * 获取身份信息 + * @param id + * @param type + * @return + */ + @Override + public List getIdentitiesByIdSet(List id, Integer type) { + List 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 getWorkerGroupDetailInfoListByConCom(String personProfilePhoneOrWorkerGroupId) { + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getWorkerGroupDetailInfoListByConCom(personProfilePhoneOrWorkerGroupId)); + return BeanUtil.copyToList(result, ProfileGetWorkerGroupDetailResp.class); + } + + /** + * 获取身份信息 + * @param reqs + * @return + */ + @Override + public Set getPersonIdListByIdentity(List reqs) { + if (ObjectUtil.isEmpty(reqs)) { + throw new BusinessException(BizResultCode.INVALID_PARAM); + } + List rpcReqList = BeanUtil.copyToList(reqs, IdentityDto.class); + Set rpcReqSet = rpcReqList.stream().collect(Collectors.toSet()); + return RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonIdListByIdentity(rpcReqSet)); + } + + /** + * 通过手机号、身份证号、姓名(模糊查询) 查询自然人信息 + * @param req + * @return + */ + @Override + public List getPersonProfileList(ProfileGetPersonProfileListReq req) { + QueryPersonProfileDto rpcReq = BeanUtil.copyProperties(req, QueryPersonProfileDto.class); + List result = RpcWrapper.commonRes(() -> userProfileServiceApi.getPersonProfileList(rpcReq)); + return BeanUtil.copyToList(result, ProfilePersonResp.class); + } + + /** + * 通过personId、手机号,批量查询 + * @param req + * @return + */ + @Override + public List findPersonProfileListByIdOrPhone(ProfileFindPersonProfileListByIdOrPhoneReq req) { + QueryPersonProfileByIdOrPhoneDto rpcReq = BeanUtil.copyProperties(req, QueryPersonProfileByIdOrPhoneDto.class); + List 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)); + } +} + + + + + + + + + + + + + + + + + + + + + +