Commit 35a3b57a authored by chenyuxi's avatar chenyuxi

feat: HCM获取人员信息列表接口

parent cf539d03
/*
* 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 chenyuxi
* @date 2025-08-08
*/
@Data
@ColumnWidth(30)
public class HcmArchiveBadRecordVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "发生时间")
private String happenDate;
@Schema(description = "不良记录描述")
private String remark;
@Schema(description = "身份证号")
private String empIdCard;
}
......@@ -60,13 +60,73 @@ public class HcmArchiveBasicVo implements Serializable {
@Schema(description = "民族")
private String nation;
// 户籍所在地
@Schema(description = "籍贯")
@Schema(description = "籍贯(省+市+区)")
private String nativePlace;
@Schema(description = "政治面貌")
private String political;
// 通讯地址
@Schema(description = "联系地址")
@Schema(description = "联系地址(省+市+区+详细地址)")
private String contactAddress;
// 1.7.14新增推送字段
@Schema(description = "手机号")
private String empPhone;
@Schema(description = "户籍所在地(省+市+区)")
private String householdPlace;
@Schema(description = "紧急联系人")
private String emergencyContactName;
@Schema(description = "紧急联系人与本人关系")
private String emergencyContactRelation;
@Schema(description = "紧急联系人电话")
private String emergencyContactPhone;
@Schema(description = "银行卡号")
private String bankNo;
@Schema(description = "开户行(总行)")
private String bankName;
@Schema(description = "社保户")
private String socialHouseholdName;
@Schema(description = "最高学历字典值")
private String educationValue;
// 户口性质
@Schema(description = "户口类型字典值")
private String residentTypeValue;
@Schema(description = "婚姻状况字典值")
private String maritalStatusValue;
@Schema(description = "民族字典值")
private String nationValue;
@Schema(description = "政治面貌字典值")
private String politicalValue;
@Schema(description = "身份证-省")
private Integer idProvince;
@Schema(description = "身份证-市")
private Integer idCity;
@Schema(description = "身份证-县")
private Integer idTown;
@Schema(description = "通信地址省")
private Integer contactProvince;
@Schema(description = "通信地址市")
private Integer contactCity;
@Schema(description = "通信地址县")
private Integer contactTown;
}
......@@ -52,4 +52,10 @@ public class HcmArchiveCertificateVo implements Serializable {
@Schema(description = "证照附件")
private String annex;
@Schema(description = "身份证号")
private String empIdCard;
@Schema(description = "资格类型")
private String certificateType;
}
......@@ -33,16 +33,16 @@ import java.io.Serializable;
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;
// 毕业时间
......@@ -55,4 +55,13 @@ public class HcmArchiveEducationVo implements Serializable {
@Schema(description = "学历附件")
private String annex;
@Schema(description = "身份证号")
private String empIdCard;
@Schema(description = "学历值")
private String educationValue;
@Schema(description = "学历类型值")
private String educationTypeValue;
}
......@@ -53,4 +53,10 @@ public class HcmArchiveFamilyVo implements Serializable {
@Schema(description = "职位/职务")
private String jobName;
@Schema(description = "与本人关系")
private String relation;
@Schema(description = "身份证号")
private String empIdCard;
}
......@@ -52,4 +52,7 @@ public class HcmArchiveJobVo implements Serializable {
@Schema(description = "职位描述")
private String remark;
@Schema(description = "身份证号")
private String empIdCard;
}
......@@ -48,5 +48,8 @@ public class HcmEmployeeInfoVO extends RowIndex implements Serializable {
// 合同信息-含附件
private List<HcmContractVo> contract;
// 不良记录
private List<HcmArchiveBadRecordVo> archiveBadRecord;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.util.Map;
import java.util.Set;
/**
* 获取社保公积信息
*
* @author chenyuxi
* @date 2025/8/6
* @since v1.7.14
**/
@Data
public class SocialFundVo {
private Set<String> empIdCardSet;
private Map<String,String> socialFundByIdCard;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 地区包装类
* @author chenyuxi
* @date 2025/8/6
* @since v1.7.14
*/
@Data
public class SysAreaVo implements Serializable {
private Integer id;
private String name;
}
......@@ -146,4 +146,19 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
void updateEmployeeAgeTask();
Set<String> getEmpOnlineMap(@Param("empIdCardList")List<String> empIdCardList);
List<HcmArchiveBasicVo> getHcmArchiveBasicList(@Param("idCardSet") Set<String> idCardSet);
List<HcmArchiveFamilyVo> getHcmArchiveFamilyList(@Param("idCardSet") Set<String> idCardSet);
List<HcmArchiveEducationVo> getHcmArchiveEducationList(@Param("idCardSet") Set<String> idCardSet);
List<HcmArchiveJobVo> getHcmArchiveJobList(@Param("idCardSet") Set<String> idCardSet);
List<HcmArchiveBadRecordVo> getHcmArchiveBadRecordList(@Param("idCardSet") Set<String> idCardSet);
List<HcmArchiveCertificateVo> getHcmArchiveCertificateList(@Param("idCardSet") Set<String> idCardSet);
List<SysAreaVo> getSysAreaList(@Param("areaIdSet") Set<Integer> areaIdSet);
}
......@@ -34,6 +34,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 项目档案表
......@@ -312,4 +313,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
**/
void doSaveBelongDept(TEmployeeProject p, String feedbackType);
Map<String,String> getSocialFundByEmpIdcardSet(Set<String> empIdCardSet);
}
......@@ -2157,4 +2157,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
}
@Override
public Map<String,String> getSocialFundByEmpIdcardSet(Set<String> empIdCardSet) {
// 获取社保和公积金派减信息
SocialFundVo vo = new SocialFundVo();
vo.setEmpIdCardSet(empIdCardSet);
Map<String,String> socialFundMap = new HashMap<>();
R<SocialFundVo> reduceVoR = HttpDaprUtil.invokeMethodPost(daprSocialProperties.getAppUrl(), daprSocialProperties.getAppId()
, "/tsocialfundinfo/inner/getSocialAndFundReduceListByEmpIdCardSet", vo, SocialFundVo.class, SecurityConstants.FROM_IN);
if (null != reduceVoR && reduceVoR.getData() != null){
socialFundMap = reduceVoR.getData().getSocialFundByIdCard();
}
return socialFundMap;
}
}
......@@ -1408,4 +1408,124 @@
and DELETE_FLAG ='0' <!-- 未删除 -->
</select>
<select id="getHcmArchiveBasicList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveBasicVo">
select
a.EMP_NAME empName
,a.EMP_IDCARD empIdCard
,a.EMP_PHONE empPhone
,a.EMP_EMAIL email
,a.EMP_BIRTHDAY bornDate
,if(a.EMP_SEX='2','女',if(a.EMP_SEX='1','男','-')) sex
,a.HIGN_EDUCATION educationValue
,a.EMP_REGIS_TYPE residentTypeValue
,a.EMP_MARRI_STATUS maritalStatusValue
,a.EMP_NATIONAL nationValue
,a.POLITICAL_STATUS politicalValue
,a.ID_PROVINCE idProvince
,a.ID_CITY idCity
,a.ID_TOWN idTown
,a.CONTACT_PROVINCE contactProvince
,a.CONTACT_CITY contactCity
,a.CONTACT_TOWN contactTown
,a.contact_Address contactAddress
,a.BANK_NO bankNo
,a.BANK_NAME bankName
from t_employee_info a
where a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardSet" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="getSysAreaList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.SysAreaVo">
select a.id id,a.AREA_NAME name from sys_area a
where a.id in
<foreach item="item" index="index" collection="areaIdSet" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="getHcmArchiveFamilyList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveFamilyVo">
select
a.RELATIONSHIP_SELF relation
,a.EMP_IDCARD empIdCard
,a.FAMILY_NAME trueName
,a.BIRTHDAY bornTime
,'' political
,a.WORK_UNIT company
,'' jobName
from t_emp_family a
where a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardSet" open="(" separator="," close=")">
#{item}
</foreach>
order by a.CREATE_TIME desc
</select>
<select id="getHcmArchiveEducationList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveEducationVo">
select
a.SCHOOL schoolName
,a.EMP_IDCARD empIdCard
,a.MAJOR major
,EDUCATION_NAME educationValue
,a.ENTRY_DATE joinDate
,a.GRADUTION_DATE leaveDate
,a.type educationTypeValue
,'' annex
from t_emp_education a
where a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardSet" open="(" separator="," close=")">
#{item}
</foreach>
order by a.CREATE_TIME desc
</select>
<select id="getHcmArchiveJobList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveJobVo">
select
a.WORK_UNIT companyName
,a.EMP_IDCARD empIdCard
,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.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardSet" open="(" separator="," close=")">
#{item}
</foreach>
order by a.CREATE_TIME desc
</select>
<select id="getHcmArchiveBadRecordList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveBadRecordVo">
select
a.EMP_IDCARD empIdCard
,a.HAPPEN_TIME happenDate
,a.REMARK remark
from t_emp_bad_record a
where a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardSet" open="(" separator="," close=")">
#{item}
</foreach>
order by a.CREATE_TIME desc
</select>
<select id="getHcmArchiveCertificateList" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.HcmArchiveCertificateVo">
select
a.QUALIFICATION_TYPE certificateType
,a.EMP_IDCARD empIdCard
,a.CERTIFICATION_NO certificateNo
,a.ASSESSMENT_UNIT certificateOrg
,'' certificateDate
,'' certificateExpireDate
,'' annex
from t_emp_professional_qualification a
where a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardSet" open="(" separator="," close=")">
#{item}
</foreach>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
......@@ -208,4 +209,20 @@ public class TSocialFundInfoController {
return tSocialFundInfoService.selectWorkInjuryHandleAll();
}
/**
* 获取社保和公积金列表信息通过身份证集合
* @Author hgw
* @Date 2020-08-25
* @return
**/
@SysLog("获取社保和公积金列表信息通过身份证集合")
@PostMapping(value = "/inner/getSocialAndFundReduceListByEmpIdCardSet")
@Inner
public SocialFundVo getSocialAndFundReduceListByEmpIdCardSet(@RequestBody SocialFundVo vo) {
if (Common.isNotNull(vo.getEmpIdCardSet())) {
return tSocialFundInfoService.getSocialAndFundReduceListByEmpIdCardSet(vo.getEmpIdCardSet());
}
return new SocialFundVo();
}
}
......@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.salary.vo.ListStringVo;
......@@ -34,6 +35,7 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.TSocialFundInfoSearchVo;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import java.util.Set;
/**
* 社保公积金查询表
......@@ -93,4 +95,6 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
**/
ListStringVo selectWorkInjuryHandleAll();
SocialFundVo getSocialAndFundReduceListByEmpIdCardSet(Set<String> empIdCardSet);
}
......@@ -32,6 +32,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
......@@ -57,10 +58,7 @@ import java.io.InputStream;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
......@@ -933,4 +931,23 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
vo.setListVo(socialList);
return vo;
}
@Override
public SocialFundVo getSocialAndFundReduceListByEmpIdCardSet(Set<String> empIdCardSet) {
SocialFundVo socialFundVo = new SocialFundVo();
List<TSocialFundInfo> socialFundList = baseMapper.selectList(Wrappers.<TSocialFundInfo>query().lambda()
.in(TSocialFundInfo::getEmpIdcard, empIdCardSet));
if(Common.isNotNull(socialFundList)){
Map<String,String> fundByIdCard = new HashMap<>();
for (TSocialFundInfo socialFund : socialFundList) {
fundByIdCard.put(socialFund.getEmpIdcard(),socialFund.getSocialHouseholdName());
}
socialFundVo.setSocialFundByIdCard(fundByIdCard);
}
return socialFundVo;
}
}
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