Commit 57a9d78c authored by hongguangwu's avatar hongguangwu

MVP1.7.12-保存档案

parent 7b58ec80
...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpContactInfo; ...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpContactInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子紧急联系人 * 瓜子紧急联系人
* *
...@@ -39,6 +41,9 @@ public interface TGzEmpContactInfoMapper extends BaseMapper<TGzEmpContactInfo> { ...@@ -39,6 +41,9 @@ public interface TGzEmpContactInfoMapper extends BaseMapper<TGzEmpContactInfo> {
*/ */
IPage<TGzEmpContactInfo> getTGzEmpContactInfoPage(Page<TGzEmpContactInfo> page, @Param("tGzEmpContactInfo") TGzEmpContactInfo tGzEmpContactInfo); IPage<TGzEmpContactInfo> getTGzEmpContactInfoPage(Page<TGzEmpContactInfo> page, @Param("tGzEmpContactInfo") TGzEmpContactInfo tGzEmpContactInfo);
// 获取附属信息——保存到人员档案时使用 hgw
TGzEmpContactInfo getOneByEmpId(@Param("empId") String empId);
// 保存是先删后增 hgw 2025-6-20 11:06:38 // 保存是先删后增 hgw 2025-6-20 11:06:38
int deleteByEmpId(@Param("empId") String empId); int deleteByEmpId(@Param("empId") String empId);
......
...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpEducation; ...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpEducation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子教育经历 * 瓜子教育经历
* *
...@@ -39,6 +41,9 @@ public interface TGzEmpEducationMapper extends BaseMapper<TGzEmpEducation> { ...@@ -39,6 +41,9 @@ public interface TGzEmpEducationMapper extends BaseMapper<TGzEmpEducation> {
*/ */
IPage<TGzEmpEducation> getTGzEmpEducationPage(Page<TGzEmpEducation> page, @Param("tGzEmpEducation") TGzEmpEducation tGzEmpEducation); IPage<TGzEmpEducation> getTGzEmpEducationPage(Page<TGzEmpEducation> page, @Param("tGzEmpEducation") TGzEmpEducation tGzEmpEducation);
// 获取附属信息——保存到人员档案时使用 hgw
TGzEmpEducation getOneByEmpId(@Param("empId") String empId);
// 保存是先删后增 hgw 2025-6-20 11:06:38 // 保存是先删后增 hgw 2025-6-20 11:06:38
int deleteByEmpId(@Param("empId") String empId); int deleteByEmpId(@Param("empId") String empId);
} }
...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpFamily; ...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpFamily;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子家庭成员 * 瓜子家庭成员
* *
...@@ -40,6 +42,9 @@ public interface TGzEmpFamilyMapper extends BaseMapper<TGzEmpFamily> { ...@@ -40,6 +42,9 @@ public interface TGzEmpFamilyMapper extends BaseMapper<TGzEmpFamily> {
*/ */
IPage<TGzEmpFamily> getTGzEmpFamilyPage(Page<TGzEmpFamily> page, @Param("tGzEmpFamily") TGzEmpFamily tGzEmpFamily); IPage<TGzEmpFamily> getTGzEmpFamilyPage(Page<TGzEmpFamily> page, @Param("tGzEmpFamily") TGzEmpFamily tGzEmpFamily);
// 获取附属信息——保存到人员档案时使用 hgw
List<TGzEmpFamily> getListByEmpId(@Param("empId") String empId);
// 保存是先删后增 hgw 2025-6-20 11:06:38 // 保存是先删后增 hgw 2025-6-20 11:06:38
int deleteByEmpId(@Param("empId") String empId); int deleteByEmpId(@Param("empId") String empId);
} }
...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpWork; ...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpWork;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 瓜子工作经历 * 瓜子工作经历
* *
...@@ -40,6 +42,9 @@ public interface TGzEmpWorkMapper extends BaseMapper<TGzEmpWork> { ...@@ -40,6 +42,9 @@ public interface TGzEmpWorkMapper extends BaseMapper<TGzEmpWork> {
*/ */
IPage<TGzEmpWork> getTGzEmpWorkPage(Page<TGzEmpWork> page, @Param("tGzEmpWork") TGzEmpWork tGzEmpWork); IPage<TGzEmpWork> getTGzEmpWorkPage(Page<TGzEmpWork> page, @Param("tGzEmpWork") TGzEmpWork tGzEmpWork);
// 获取附属信息——保存到人员档案时使用 hgw
List<TGzEmpWork> getListByEmpId(@Param("empId") String empId);
// 保存是先删后增 hgw 2025-6-20 11:06:38 // 保存是先删后增 hgw 2025-6-20 11:06:38
int deleteByEmpId(@Param("empId") String empId); int deleteByEmpId(@Param("empId") String empId);
} }
...@@ -107,8 +107,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -107,8 +107,6 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
private final TEmployeeInfoService tEmployeeInfoService; private final TEmployeeInfoService tEmployeeInfoService;
// 项目档案表 // 项目档案表
private final TEmployeeProjectService tEmployeeProjectService; private final TEmployeeProjectService tEmployeeProjectService;
// 员工职业资格信息表
private final TEmpProfessionalQualificationService tEmpProfessionalService;
// 员工工作履历信息表 // 员工工作履历信息表
private final TEmpWorkRecordingService tEmpWorkRecordingService; private final TEmpWorkRecordingService tEmpWorkRecordingService;
// 紧急联络人 // 紧急联络人
...@@ -638,6 +636,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -638,6 +636,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
if (gzEmpInfo == null || Common.isEmpty(gzEmpInfo.getNationalId())) { if (gzEmpInfo == null || Common.isEmpty(gzEmpInfo.getNationalId())) {
return R.failed("未找到瓜子档案信息!"); return R.failed("未找到瓜子档案信息!");
} }
String gzEmpId = gzEmpInfo.getId();
String empIdCard = gzEmpInfo.getNationalId(); String empIdCard = gzEmpInfo.getNationalId();
// 翻译字典 // 翻译字典
...@@ -648,19 +647,142 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -648,19 +647,142 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
&& Common.isNotNull(relDictMapR.getData())) { && Common.isNotNull(relDictMapR.getData())) {
dictMap = relDictMapR.getData(); dictMap = relDictMapR.getData();
} }
// 1:档案 List<TGzEmpWork> workList = gzEmpWorkMapper.getListByEmpId(gzEmpId);
TEmployeeInfo emp = this.saveEmployeeInfo(gzEmpInfo, user, empIdCard, dictMap);
TGzEmpEducation education = gzEmpEducationMapper.getOneByEmpId(gzEmpId);
// 是否为首份工作 0是/1否
String firstWorkFlag = (workList == null || workList.isEmpty()) ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING;
// 1:档案
TEmployeeInfo emp = this.saveEmployeeInfo(gzEmpInfo, user, empIdCard, dictMap, firstWorkFlag, education);
String empId = emp.getId();
// 2:项目档案 // 2:项目档案
this.saveEmployeeProject(emp, user, empIdCard, deptId, dept); this.saveEmployeeProject(emp, user, empIdCard, deptId, dept);
// TODO-3:其他附属信息与附件 // 3:其他附属信息与附件
// 3.1 工作:
if (workList != null && !workList.isEmpty()) {
// 先删除其他信息
tEmpWorkRecordingService.deleteWorkRecordByEmpId(empId);
TEmpWorkRecording info;
for (TGzEmpWork gz : workList) {
info = new TEmpWorkRecording();
info.setWorkUnit(gz.getWorkUnit());
info.setWorkDepart(gz.getWorkDept());
info.setWorkJob(gz.getWorkJob());
try {
// 修改后代码:
if (gz.getWorkStartDate() != null) {
info.setStartDate(gz.getWorkStartDate().toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDateTime());
}
if (gz.getWorkEndDate() != null) {
info.setEndDate(gz.getWorkEndDate().toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDateTime());
}
} catch (Exception e) {
return R.failed("工作的开始结束日期转化失败!");
}
info.setDeleteFlag(CommonConstants.STATUS_NORMAL);
info.setEmpId(empId);
info.setEmpCode(emp.getEmpCode());
info.setEmpName(emp.getEmpName());
info.setEmpIdcard(emp.getEmpIdcard());
info.setSettleDomain(deptId);
if (Common.isEmpty(info.getCreateBy())) {
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tEmpWorkRecordingService.save(info);
}
}
// 家庭
List<TGzEmpFamily> familyList = gzEmpFamilyMapper.getListByEmpId(gzEmpId);
if (familyList != null && !familyList.isEmpty()) {
// 先删除其他信息
tEmpFamilyService.deleteByEmpId(empId);
TEmpFamily info;
for (TGzEmpFamily gz : familyList) {
info = new TEmpFamily();
info.setRelationshipSelf(getDictValue(dictMap, gz.getFamilyRelation(), ExcelAttributeConstants.GZ_FAMILY_RELATION));
info.setWorkUnit(gz.getFamilyCompany());
info.setFamilyName(gz.getFamilyName());
info.setContractTel(gz.getFamilyPhone());
info.setDeleteFlag(CommonConstants.STATUS_NORMAL);
info.setEmpId(empId);
info.setEmpCode(emp.getEmpCode());
info.setEmpName(emp.getEmpName());
info.setEmpIdcard(emp.getEmpIdcard());
info.setSettleDomain(deptId);
if (Common.isEmpty(info.getCreateBy())) {
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tEmpFamilyService.save(info);
}
}
// 学历
if (education != null && Common.isNotNull(education.getId())) {
TEmpEducation info = tEmpEducationService.getByEmpId(empId);
if (info == null) {
info = new TEmpEducation();
}
info.setEducationName(getDictValue(dictMap, education.getEduQual(), ExcelAttributeConstants.GZ_EDU_QUAL));
info.setSchool(education.getSchool());
info.setMajor(education.getMajor());
info.setEntryDate(education.getEduStartDate());
info.setGradutionDate(education.getEduEndDate());
info.setHighIdentification(CommonConstants.ZERO_STRING);
info.setDeleteFlag(CommonConstants.STATUS_NORMAL);
info.setEmpId(empId);
info.setEmpCode(emp.getEmpCode());
info.setEmpName(emp.getEmpName());
info.setEmpIdcard(emp.getEmpIdcard());
info.setSettleDomain(deptId);
if (Common.isEmpty(info.getCreateBy())) {
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
// 将所有的最高学历改为非最高
if (Common.isNotNull(empIdCard)) {
tEmpEducationService.updateEducationToNoByIdCard(empIdCard);
}
tEmpEducationService.saveOrUpdate(info);
}
// 紧急
TGzEmpContactInfo contactInfo = gzEmpContactInfoMapper.getOneByEmpId(gzEmpId);
if (contactInfo != null && Common.isNotNull(contactInfo.getId())) {
TEmpContactInfo info = tEmpContactInfoService.getByEmpId(empId);
if (info == null) {
info = new TEmpContactInfo();
}
info.setRelationType(getDictValue(dictMap, contactInfo.getEmergRelation(), ExcelAttributeConstants.GZ_EMERG_RELATION));
info.setEmpName(contactInfo.getEmergName());
info.setTel(contactInfo.getEmergPhone());
info.setAddress(contactInfo.getEmergAddress());
info.setEmpId(empId);
info.setEmpIdcard(emp.getEmpIdcard());
if (Common.isEmpty(info.getCreateBy())) {
info.setCreateBy(user.getId());
info.setCreateName(user.getNickname());
info.setCreateTime(LocalDateTime.now());
}
tEmpContactInfoService.saveOrUpdate(info);
}
return R.ok(); return R.ok();
} }
private TEmployeeInfo saveEmployeeInfo(TGzEmpInfo gzEmpInfo, YifuUser user, String empIdCard, Map<String, Map<String,String>> dictMap) { private TEmployeeInfo saveEmployeeInfo(TGzEmpInfo gzEmpInfo, YifuUser user, String empIdCard
, Map<String, Map<String,String>> dictMap, String firstWorkFlag, TGzEmpEducation education) {
// 查找档案、项目档案,无则新建 // 查找档案、项目档案,无则新建
TEmployeeInfo emp = tEmployeeInfoService.getInfoByIdcard(empIdCard); TEmployeeInfo emp = tEmployeeInfoService.getInfoByIdcard(empIdCard);
if (emp == null) { if (emp == null) {
...@@ -677,7 +799,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -677,7 +799,7 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
emp = new TEmployeeInfo(); emp = new TEmployeeInfo();
} }
// 转化瓜子属性 // 转化瓜子属性
this.setEmpInfoByGz(gzEmpInfo, emp, dictMap); this.setEmpInfoByGz(gzEmpInfo, emp, dictMap, firstWorkFlag, education);
// 新员工,塞基本属性 // 新员工,塞基本属性
if (isNew) { if (isNew) {
tEmployeeInfoService.setBaseData(emp, CommonConstants.NINE_STRING, user); tEmployeeInfoService.setBaseData(emp, CommonConstants.NINE_STRING, user);
...@@ -769,37 +891,11 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -769,37 +891,11 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
* @Date: 2025/6/20 16:17 * @Date: 2025/6/20 16:17
* @return: void * @return: void
**/ **/
private void setEmpInfoByGz(TGzEmpInfo gzEmpInfo, TEmployeeInfo emp, Map<String, Map<String,String>> dictMap) { private void setEmpInfoByGz(TGzEmpInfo gzEmpInfo, TEmployeeInfo emp, Map<String, Map<String,String>> dictMap
// TODO - 转化 , String firstWorkFlag, TGzEmpEducation education) {
/*if (Common.isNotNull(gzEmpInfo.getEmpPhone())) {
emp.setEmpPhone(gzEmpInfo.getEmpPhone());
}
if (Common.isNotNull(gzEmpInfo.getEmpNatrue())) {
emp.setEmpNatrue(gzEmpInfo.getEmpNatrue());
}
emp.setEmpName(gzEmpInfo.getEmpName());
emp.setEmpIdcard(gzEmpInfo.getEmpIdcard());
emp.setEmpPhone(gzEmpInfo.getEmpPhone());
emp.setContactAddress(gzEmpInfo.getContactAddress());
emp.setContactProvince(gzEmpInfo.getContactProvince());
emp.setContactCity(gzEmpInfo.getContactCity());
emp.setContactTown(gzEmpInfo.getContactTown());
emp.setEmpBirthday(gzEmpInfo.getEmpBirthday());
emp.setEmpSex(gzEmpInfo.getEmpSex());
emp.setEmpAge(gzEmpInfo.getEmpAge());
emp.setBankProvince(gzEmpInfo.getBankProvince());
emp.setBankCity(gzEmpInfo.getBankCity());
emp.setBankName(gzEmpInfo.getBankName());
emp.setBankSubName(gzEmpInfo.getBankSubName());
emp.setBankNo(gzEmpInfo.getBankNo());
emp.setFileProvince(gzEmpInfo.getFileProvince());
emp.setFileCity(gzEmpInfo.getFileCity());
emp.setFileTown(gzEmpInfo.getFileTown());*/
// 按gzEmpInfo实体类顺序转化: // 按gzEmpInfo实体类顺序转化:
emp.setEmpName(gzEmpInfo.getName()); emp.setEmpName(gzEmpInfo.getName());
emp.setIdProvince(gzEmpInfo.getNativePlaceAreaId()); emp.setIdProvince(gzEmpInfo.getNativePlaceAreaId());
emp.setIdCity(null); emp.setIdCity(null);
emp.setIdTown(null); emp.setIdTown(null);
...@@ -809,121 +905,61 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI ...@@ -809,121 +905,61 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
emp.setEmpMarriStatus(getDictValue(dictMap, gzEmpInfo.getMarStatus(), ExcelAttributeConstants.GZ_MAR_STATUS)); emp.setEmpMarriStatus(getDictValue(dictMap, gzEmpInfo.getMarStatus(), ExcelAttributeConstants.GZ_MAR_STATUS));
// 政治面貌 // 政治面貌
emp.setPoliticalStatus(getDictValue(dictMap, gzEmpInfo.getPoliticalSta(), ExcelAttributeConstants.GZ_POLITICAL_STA)); emp.setPoliticalStatus(getDictValue(dictMap, gzEmpInfo.getPoliticalSta(), ExcelAttributeConstants.GZ_POLITICAL_STA));
// 政治面貌
emp.setPoliticalStatus(getDictValue(dictMap, gzEmpInfo.getPoliticalSta(), ExcelAttributeConstants.GZ_POLITICAL_STA));
emp.setValidityStart(gzEmpInfo.getNidStartDate()); emp.setValidityStart(gzEmpInfo.getNidStartDate());
emp.setValidityEnd(gzEmpInfo.getNidExpiryDate()); emp.setValidityEnd(gzEmpInfo.getNidExpiryDate());
emp.setEmpPhone(gzEmpInfo.getPhone()); emp.setEmpPhone(gzEmpInfo.getPhone());
emp.setEmpEmail(gzEmpInfo.getMail()); emp.setEmpEmail(gzEmpInfo.getMail());
if (Common.isNotNull(gzEmpInfo.getStateAreaId())) { if (Common.isNotNull(gzEmpInfo.getStateAreaId())) {
emp.setContactProvince(String.valueOf(gzEmpInfo.getStateAreaId())); emp.setContactProvince(String.valueOf(gzEmpInfo.getStateAreaId()));
if (Common.isNotNull(gzEmpInfo.getStateAreaId())) { if (Common.isNotNull(gzEmpInfo.getCityAreaId())) {
emp.setContactCity(String.valueOf(gzEmpInfo.getCityAreaId())); emp.setContactCity(String.valueOf(gzEmpInfo.getCityAreaId()));
if (Common.isNotNull(gzEmpInfo.getCountyAreaId())) {
emp.setContactTown(String.valueOf(gzEmpInfo.getCountyAreaId()));
} else {
emp.setContactTown(null);
}
} else { } else {
emp.setContactCity(null); emp.setContactCity(null);
}
if (Common.isNotNull(gzEmpInfo.getCountyAreaId())) {
emp.setContactTown(String.valueOf(gzEmpInfo.getCountyAreaId()));
} else {
emp.setContactTown(null); emp.setContactTown(null);
} }
} }
emp.setContactAddress(gzEmpInfo.getAddress());
// 户口性质
emp.setEmpRegisType(getDictValue(dictMap, gzEmpInfo.getHukouType(), ExcelAttributeConstants.GZ_HUKOU_TYPE));
emp.setFileProvince(gzEmpInfo.getHukouProvinceAreaId());
/*emp.setEmpIdcard(gzEmpInfo.getEmpIdcard()); emp.setFileCity(gzEmpInfo.getHukouCityAreaId());
if (employee != null) { emp.setFileTown(gzEmpInfo.getHukouCountyAreaId());
empId = employee.getId(); emp.setBankName(getDictValue(dictMap, gzEmpInfo.getBankCd(), ExcelAttributeConstants.GZ_BANK));
BeanUtil.copyProperties(employee, tPreEmployeeInfo, ID); emp.setBankSubName(gzEmpInfo.getBankName());
emp.setOldId(employee.getId()); if (Common.isNotNull(gzEmpInfo.getAccountProvinceAreaId())) {
if (project != null) { emp.setBankProvince(String.valueOf(gzEmpInfo.getAccountProvinceAreaId()));
BeanUtil.copyProperties(project, tPreEmployeeProject, ID); }
tPreEmployeeProject.setOldId(project.getId()); if (Common.isNotNull(gzEmpInfo.getAccountCityAreaId())) {
} emp.setBankCity(String.valueOf(gzEmpInfo.getAccountCityAreaId()));
} }
emp.setBankNo(gzEmpInfo.getAccountEcId());
// 瓜子默认外包 2025-6-24 10:26:24 倩倩确认的
emp.setEmpNatrue(CommonConstants.ZERO_STRING);
emp.setPreMainId(mainId); if (education != null && Common.isNotNull(education.getId())) {
emp.setCreateBy(user.getId()); emp.setHignEducation(getDictValue(dictMap, education.getEduQual(), ExcelAttributeConstants.GZ_EDU_QUAL));
emp.setCreateName(user.getNickname()); if ("1E".equals(education.getEduQual())) {
emp.setCreateTime(LocalDateTime.now()); emp.setIsCollege(CommonConstants.ZERO_INT);
emp.setValidityStart(info.getValidityStartValue());
if ("长期".equals(info.getValidityEnd())) {
emp.setValidityEnd(endDate);
} else {
emp.setValidityEnd(info.getValidityEndValue());
}
emp.setEmpNatrue(info.getEmpNatrueValue());
emp.setEmpSex(com.yifu.cloud.plus.v1.yifu.common.core.util.IdCardUtil.getSex(empIdCard));
java.sql.Date empBirthday = com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil.getBirthdate(empIdCard);
emp.setEmpBirthday(empBirthday);
emp.setEmpAge(com.yifu.cloud.plus.v1.yifu.common.core.util.IdCardUtil.IdNOToAge(empIdCard));
emp.setEmpMarriStatus(info.getEmpMarriStatusValue());
emp.setEmpNational(info.getEmpNationalValue());
emp.setPoliticalStatus(info.getPoliticalStatusValue());
emp.setEmpEmail(info.getEmpEmail());
emp.setEmpPhone(info.getEmpPhone());
// 2024-10-30 20:02:53 测试jld认为如果没写户籍省,则带出档案。我认为有道理
if (Common.isNotNull(info.getIdProvinceValue())) {
emp.setIdProvince(Integer.parseInt(info.getIdProvinceValue()));
if (Common.isNotNull(info.getIdCityValue())) {
emp.setIdCity(Integer.parseInt(info.getIdCityValue()));
} else {
emp.setIdCity(null);
}
if (Common.isNotNull(info.getIdTownValue())) {
emp.setIdTown(Integer.parseInt(info.getIdTownValue()));
} else { } else {
emp.setIdTown(null);
}
}
emp.setEmpRegisType(info.getEmpRegisTypeValue());
if (Common.isNotNull(info.getFileProvinceValue())) {
emp.setFileProvince(Integer.parseInt(info.getFileProvinceValue()));
}
if (Common.isNotNull(info.getFileCityValue())) {
emp.setFileCity(Integer.parseInt(info.getFileCityValue()));
}
if (Common.isNotNull(info.getFileTownValue())) {
emp.setFileTown(Integer.parseInt(info.getFileTownValue()));
} else {
emp.setFileTown(null);
}
if (Common.isNotNull(info.getEducationNameValue())) {
emp.setHignEducation(info.getEducationNameValue());
if ("5".equals(info.getEducationNameValue())
|| "6".equals(info.getEducationNameValue())
|| "7".equals(info.getEducationNameValue())
|| "8".equals(info.getEducationNameValue())) {
emp.setIsCollege(CommonConstants.ONE_INT); emp.setIsCollege(CommonConstants.ONE_INT);
} else {
emp.setIsCollege(CommonConstants.ZERO_INT);
} }
emp.setSchool(education.getSchool());
emp.setMajor(education.getMajor());
emp.setAdmissionDate(education.getEduStartDate());
emp.setGradutionDate(education.getEduEndDate());
} }
emp.setSchool(info.getSchool()); // 按照是否有工作经历来判断:无,则是首份工作
emp.setMajor(info.getMajor()); emp.setFirstWorkFlag(firstWorkFlag);
emp.setAdmissionDate(info.getEntryDateValue()); // 2025-6-24 10:38:06 倩倩:因为 瓜子的附属信息:技能证书 不同步MVP,因此这里默认否
emp.setGradutionDate(info.getGradutionDateValue()); emp.setHaveQualification(CommonConstants.ONE_STRING);
emp.setContactAddress(info.getContactAddress());
// 2024-10-17 14:30:06 倩倩上午测试用例评审会说要联动导入,没有卡号,后面填写的不生效:
if (Common.isNotNull(info.getBankNo())) {
emp.setBankName(info.getBankName());
emp.setBankProvince(info.getBankProvinceValue());
emp.setBankCity(info.getBankCityValue());
emp.setBankSubName(info.getBankSubName());
emp.setBankNo(info.getBankNo());
emp.setTaxMonth(info.getTaxMonthValue());
} else {
preEmployeeInfoNeedSalaryList.add(tPreEmployeeInfo);
needSalaryList.add(empIdCard);
}
emp.setTaxMonthFlag(CommonConstants.ONE_STRING);
emp.setContactProvince(info.getContactProvinceValue());
emp.setContactCity(info.getContactCityValue());
emp.setContactTown(info.getContactTownValue());
emp.setFirstWorkFlag(info.getFirstWorkFlagValue());
emp.setHaveQualification(info.getHaveQualificationValue());*/
emp.setFileSource(CommonConstants.EIGHT_STRING);
} }
/** /**
......
...@@ -107,6 +107,14 @@ ...@@ -107,6 +107,14 @@
</where> </where>
</select> </select>
<!--获取附属信息——保存到人员档案时使用 只有一个-->
<select id="getOneByEmpId" resultMap="tGzEmpContactInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_gz_emp_contact_info a
where a.del_flag = '0' and a.emp_id = #{empId} order by a.create_time desc limit 1
</select>
<!-- 删除 --> <!-- 删除 -->
<delete id="deleteByEmpId"> <delete id="deleteByEmpId">
delete FROM t_gz_emp_contact_info where emp_id = #{empId} delete FROM t_gz_emp_contact_info where emp_id = #{empId}
......
...@@ -137,6 +137,14 @@ ...@@ -137,6 +137,14 @@
</where> </where>
</select> </select>
<!--获取附属信息——保存到人员档案时使用—— 教育经历只有一个最高的-->
<select id="getOneByEmpId" resultMap="tGzEmpEducationMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_gz_emp_education a
where a.del_flag = '0' and a.emp_id = #{empId} order by a.create_time desc limit 1
</select>
<!-- 删除 --> <!-- 删除 -->
<delete id="deleteByEmpId"> <delete id="deleteByEmpId">
delete FROM t_gz_emp_education where emp_id = #{empId} delete FROM t_gz_emp_education where emp_id = #{empId}
......
...@@ -117,6 +117,14 @@ ...@@ -117,6 +117,14 @@
</where> </where>
</select> </select>
<!--获取附属信息——保存到人员档案时使用-->
<select id="getListByEmpId" resultMap="tGzEmpFamilyMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_gz_emp_family a
where a.del_flag = '0' and a.emp_id = #{empId}
</select>
<!-- 删除 --> <!-- 删除 -->
<delete id="deleteByEmpId"> <delete id="deleteByEmpId">
delete FROM t_gz_emp_family where emp_id = #{empId} delete FROM t_gz_emp_family where emp_id = #{empId}
......
...@@ -117,6 +117,14 @@ ...@@ -117,6 +117,14 @@
</where> </where>
</select> </select>
<!--获取附属信息——保存到人员档案时使用-->
<select id="getListByEmpId" resultMap="tGzEmpWorkMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_gz_emp_work a
where a.del_flag = '0' and a.emp_id = #{empId}
</select>
<!-- 删除 --> <!-- 删除 -->
<delete id="deleteByEmpId"> <delete id="deleteByEmpId">
delete FROM t_gz_emp_work where emp_id = #{empId} delete FROM t_gz_emp_work where emp_id = #{empId}
......
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