Commit c1f0eb33 authored by hongguangwu's avatar hongguangwu

MVP1.6.0-HCM人员信息接口初次提交,不含附件

parent 425c15b0
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveBasicVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "员工姓名")
private String empName;
@Schema(description = "身份证号")
private String empIdCard;
@Schema(description = "邮箱")
private String email;
@Schema(description = "出生日期")
private String bornDate;
@Schema(description = "性别")
private String sex;
@Schema(description = "最高学历")
private String education;
// 户口性质
@Schema(description = "户口类型")
private String residentType;
@Schema(description = "婚姻状况")
private String maritalStatus;
@Schema(description = "民族")
private String nation;
// 户籍所在地
@Schema(description = "籍贯")
private String nativePlace;
@Schema(description = "政治面貌")
private String political;
// 通讯地址
@Schema(description = "联系地址")
private String contactAddress;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveCertificateVo implements Serializable {
private static final long serialVersionUID = 1L;
// 资格类型
@Schema(description = "证照名称")
private String certificateName;
// 证书编号
@Schema(description = "证照编号")
private String certificateNo;
// 评定机构
@Schema(description = "发证机构")
private String certificateOrg;
// 无
@Schema(description = "发证日期")
private String certificateDate;
// 无
@Schema(description = "到期时间")
private String certificateExpireDate;
// 附件
@Schema(description = "证照附件")
private String annex;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveEducationVo implements Serializable {
private static final long serialVersionUID = 1L;
// 学校
@Schema(description = "学校名称")
private String schoolName;
// 工作部门
@Schema(description = "专业")
private String major;
// 工作岗位
@Schema(description = "学历")
private String education;
// 入学时间
@Schema(description = "入校日期")
private String joinDate;
// 毕业时间
@Schema(description = "毕业日期")
private String leaveDate;
// 学制类型
@Schema(description = "是否全日制")
private String isFullTime;
// 附件
@Schema(description = "学历附件")
private String annex;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveFamilyVo implements Serializable {
private static final long serialVersionUID = 1L;
// 与本人关系
@Schema(description = "称谓")
private String relationName;
// 成员姓名
@Schema(description = "姓名")
private String trueName;
// 出生日期
@Schema(description = "出生年月")
private String bornTime;
// 无
@Schema(description = "政治面貌")
private String political;
// 工作单位
@Schema(description = "工作/学习单位")
private String company;
// 无
@Schema(description = "职位/职务")
private String jobName;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmArchiveJobVo implements Serializable {
private static final long serialVersionUID = 1L;
// 工作单位
@Schema(description = "公司名称")
private String companyName;
// 工作部门
@Schema(description = "部门")
private String deptName;
// 工作岗位
@Schema(description = "职位")
private String jobName;
// 开始工作日期
@Schema(description = "开始日期")
private String joinDate;
// 结束工作日期
@Schema(description = "结束日期")
private String leaveDate;
// 无
@Schema(description = "职位描述")
private String remark;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* HCM档案子Vo
*
* @author hgw
* @date 2023-11-23 12:02:03
*/
@Data
@ColumnWidth(30)
public class HcmContractVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "合同类型")
private String contractType;
// 签订期限
@Schema(description = "期限类型")
private String termType;
// 无
@Schema(description = "合同签订日期")
private String contractDate;
// 合同甲方
@Schema(description = "合同公司")
private String contractCompany;
// 合同编码
@Schema(description = "合同编号")
private String contractCode;
// 合同起始日期
@Schema(description = "合同开始日期")
private String startDate;
// 合同截止日期
@Schema(description = "合同结束日期")
private String endDate;
@Schema(description = "合同状态")
private String contractStatus;
// 附件
@Schema(description = "合同附件")
private String annexArray;
// 无
@Schema(description = "合同负责人")
private String contractOwner;
}
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 项目档案表excel对应的实体
*
* @author huyc
* @date 2022-06-20 17:54:40
*/
@Data
@ColumnWidth(30)
public class HcmEmployeeInfoVO extends RowIndex implements Serializable {
private static final long serialVersionUID = 1L;
// 基本信息
private HcmArchiveBasicVo archiveBasic;
// 工作经历
private List<HcmArchiveJobVo> archiveJob;
// 教育经历-含附件
private List<HcmArchiveEducationVo> archiveEducation;
// 资格证书-含附件
private List<HcmArchiveCertificateVo> archiveCertificate;
// 家庭成员
private List<HcmArchiveFamilyVo> archiveFamily;
// 合同信息
private List<HcmContractVo> contract;
}
...@@ -477,4 +477,32 @@ public class TEmployeeInfoController { ...@@ -477,4 +477,32 @@ public class TEmployeeInfoController {
tEmployeeInfoService.everyDayUpdateEmployeeContractStatus(); tEmployeeInfoService.everyDayUpdateEmployeeContractStatus();
} }
/**
* @param idCard
* @Description: HCM获取人员信息
* @Author: hgw
* @Date: 2023/11/23 11:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO>
**/
@Operation(description = "HCM获取人员信息")
@SysLog("HCM获取人员信息--HCM调用接口")
@GetMapping("/getHcmEmpInfo")
public R<HcmEmployeeInfoVO> getHcmEmpInfo(@RequestParam String idCard) {
return tEmployeeInfoService.getHcmEmpInfo(idCard);
}
/**
* @param idCardList
* @Description: HCM获取人员信息列表
* @Author: hgw
* @Date: 2023/11/23 11:43
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO>>
**/
@Operation(description = "HCM获取人员信息列表")
@SysLog("HCM获取人员信息列表--HCM调用接口")
@PostMapping("/getHcmEmpInfoList")
public R<List<HcmEmployeeInfoVO>> getHcmEmpInfoList(@RequestBody List<String> idCardList) {
return tEmployeeInfoService.getHcmEmpInfoList(idCardList);
}
} }
...@@ -122,4 +122,16 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> { ...@@ -122,4 +122,16 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
int everyDayUpdateEmployeeInfoContractStatus(); int everyDayUpdateEmployeeInfoContractStatus();
void updateContractStatus(@Param("empId") String empId, @Param("status")int status); void updateContractStatus(@Param("empId") String empId, @Param("status")int status);
// hgw 2023-11-23 11:38:00 HCM获取人员信息
HcmArchiveBasicVo getHcmArchiveBasicVo(@Param("idCard") String idCard);
List<HcmArchiveJobVo> getHcmArchiveJobVo(@Param("idCard") String idCard);
List<HcmArchiveEducationVo> getHcmArchiveEducationVo(@Param("idCard") String idCard);
List<HcmArchiveCertificateVo> getHcmArchiveCertificateVo(@Param("idCard") String idCard);
List<HcmArchiveFamilyVo> getHcmArchiveFamilyVo(@Param("idCard") String idCard);
List<HcmContractVo> getHcmContractVo(@Param("idCard") String idCard);
// hgw 2023-11-23 11:38:00 HCM获取人员信息列表
List<HcmEmployeeInfoVO> getHcmEmpInfoList(@Param("idCardList") List<String> idCardList);
} }
...@@ -222,4 +222,23 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> { ...@@ -222,4 +222,23 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
void everyDayUpdateEmployeeContractStatus(); void everyDayUpdateEmployeeContractStatus();
void updateContractStatus(String empId, int status); void updateContractStatus(String empId, int status);
/**
* @param idCard
* @Description: HCM获取人员信息
* @Author: hgw
* @Date: 2023/11/23 11:35
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO
**/
R<HcmEmployeeInfoVO> getHcmEmpInfo(String idCard);
/**
* @param idCardList
* @Description: HCM获取人员信息列表
* @Author: hgw
* @Date: 2023/11/23 11:35
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO>
**/
R<List<HcmEmployeeInfoVO>> getHcmEmpInfoList(List<String> idCardList);
} }
...@@ -2533,4 +2533,40 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2533,4 +2533,40 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
public void updateContractStatus(String empId, int status) { public void updateContractStatus(String empId, int status) {
baseMapper.updateContractStatus(empId,status); baseMapper.updateContractStatus(empId,status);
} }
@Override
public R<HcmEmployeeInfoVO> getHcmEmpInfo(String idCard) {
HcmEmployeeInfoVO a = this.getHcmEmployeeInfoVoByIdCard(idCard);
return R.ok(a);
}
@Override
public R<List<HcmEmployeeInfoVO>> getHcmEmpInfoList(List<String> idCardList) {
List<HcmEmployeeInfoVO> list = new ArrayList<>();
HcmEmployeeInfoVO vo;
for (String idCard : idCardList) {
vo = this.getHcmEmployeeInfoVoByIdCard(idCard);
list.add(vo);
}
return R.ok(list);
}
/**
* @param idCard
* @Description: 组装vo
* @Author: hgw
* @Date: 2023/11/23 15:24
* @return: com.yifu.cloud.plus.v1.yifu.archives.vo.HcmEmployeeInfoVO
**/
private HcmEmployeeInfoVO getHcmEmployeeInfoVoByIdCard(String idCard) {
HcmEmployeeInfoVO vo= new HcmEmployeeInfoVO();
// 基础信息
vo.setArchiveBasic(baseMapper.getHcmArchiveBasicVo(idCard));
vo.setArchiveJob(baseMapper.getHcmArchiveJobVo(idCard));
vo.setArchiveEducation(baseMapper.getHcmArchiveEducationVo(idCard));
vo.setArchiveCertificate(baseMapper.getHcmArchiveCertificateVo(idCard));
vo.setArchiveFamily(baseMapper.getHcmArchiveFamilyVo(idCard));
vo.setContract(baseMapper.getHcmContractVo(idCard));
return vo;
}
} }
...@@ -44,6 +44,8 @@ security: ...@@ -44,6 +44,8 @@ security:
- /actuator/** - /actuator/**
- /swagger-ui/** - /swagger-ui/**
- /fdd/* - /fdd/*
- /temployeeinfo/getHcmEmpInfo
- /temployeeinfo/getHcmEmpInfoList
......
...@@ -1191,4 +1191,106 @@ ...@@ -1191,4 +1191,106 @@
set CONTRACT_STATUS = #{status} set CONTRACT_STATUS = #{status}
WHERE a.id=#{empId} WHERE a.id=#{empId}
</update> </update>
<!-- hgw 根据身份证查询-基础信息 -->
<select id="getHcmArchiveBasicVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveBasicVo">
select
a.EMP_NAME empName
,a.EMP_IDCARD empIdCard
,a.EMP_EMAIL email
,a.EMP_EMAIL email
,a.EMP_BIRTHDAY bornDate
,if(a.EMP_SEX='2','女',if(a.EMP_SEX='1','男','-')) sex
,education.label education
,registype.label residentType
,married.label maritalStatus
,nation.label nation
,concat(ifnull(p.AREA_NAME,''),ifnull(c.AREA_NAME,''),ifnull(t.AREA_NAME,'')) nativePlace
from t_employee_info a
left join sys_area p on p.id=a.ID_PROVINCE
left join sys_area c on c.id=a.ID_CITY
left join sys_area t on t.id=a.ID_TOWN
left join view_sys_dict_item nation on nation.value=a.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item education on education.value=a.HIGN_EDUCATION and education.type='education'
left join view_sys_dict_item registype on registype.value=a.EMP_REGIS_TYPE and registype.type='emp_registype'
left join view_sys_dict_item married on married.value=a.EMP_MARRI_STATUS and married.type='emp_married'
where a.DELETE_FLAG = '0' and a.EMP_IDCARD = #{idCard} limit 1
</select>
<select id="getHcmArchiveJobVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveJobVo">
select
a.WORK_UNIT companyName
,a.WORK_DEPART deptName
,a.WORK_JOB jobName
,a.START_DATE joinDate
,a.END_DATE leaveDate
,a.REMARK remark
from t_emp_work_recording a
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmArchiveEducationVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveEducationVo">
select
a.SCHOOL schoolName
,a.MAJOR major
,education.label education
,a.ENTRY_DATE joinDate
,a.GRADUTION_DATE leaveDate
,educationType.label isFullTime
,'' annex
from t_emp_education a
left join view_sys_dict_item education on education.value=a.EDUCATION_NAME and education.type='education'
left join view_sys_dict_item educationType on educationType.value=a.type and educationType.type='education_type'
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmArchiveCertificateVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveCertificateVo">
select
qualification.label certificateName
,a.CERTIFICATION_NO certificateNo
,a.ASSESSMENT_UNIT certificateOrg
,'' certificateDate
,'' certificateExpireDate
,'' annex
from t_emp_professional_qualification a
left join view_sys_dict_item qualification on qualification.value=a.QUALIFICATION_TYPE and qualification.type='qualification_type'
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmArchiveFamilyVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveFamilyVo">
select
relation.label relationName
,a.FAMILY_NAME trueName
,a.BIRTHDAY bornTime
,'' political
,a.WORK_UNIT company
,'' jobName
from t_emp_family a
left join view_sys_dict_item relation on relation.value=a.RELATIONSHIP_SELF and relation.type='family_relation'
where a.EMP_IDCARD = #{idCard}
</select>
<select id="getHcmContractVo" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmContractVo">
select
a.CONTRACT_NAME contractType
,contractType.label termType
,'' contractDate
,a.CONTRACT_PARTY contractCompany
,a.CONTRACT_NO contractCode
,a.CONTRACT_START startDate
,a.CONTRACT_END endDate
,if(a.IN_USE='0','可用','不可用') contractStatus
,'' annexArray
,'' contractOwner
from t_employee_contract_info a
left join view_sys_dict_item contractType on contractType.value=a.CONTRACT_TYPE and contractType.type='employee_contract_type'
where a.EMP_IDCARD = #{idCard}
</select>
<!-- hgw 根据身份证查询 -->
<select id="getHcmEmpInfoList" resultMap="tEmployeeInfoMap">
select
<include refid="baseParam"/>
from t_employee_info a
where a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment