正式工和合同工:人事管理系统中人员类型的更新逻辑
if(person.getPersonType() != null && '1'.equals(person.getPersonType())){
if(!'1'.equals(person.getIsFormal())){
person.setPersonType('3');
}
}
if('1'.equals(person.getPersonType())){
person.setIsFormal('1');
}else{
person.setIsFormal('2');
}
// 更新人员状态
personService.updatePersonState(person);
// 更新人事档案
userService.updateUserByPersonId(person);
// 同步人员
UserSyncUtils.syncUser(person);
// 更新组织机构人员关系
personOrgService.updatePersonOrg(person);
// 更新档案
personFilesService.updatePersonFiles(person);
// 同步OA人员
OaSyncUtils.syncPerson(person);
// 更新职位
personJobService.updateByPersonId(person);
// 更新教育经历
personEducationService.updateByPersonId(person);
// 更新工作经历
personWorkExperienceService.updateByPersonId(person);
// 更新职级
personPositionService.updateByPersonId(person);
// 更新职称
personTitleService.updateByPersonId(person);
// 更新职务
personDutyService.updateByPersonId(person);
// 更新特长
personSpecialtyService.updateByPersonId(person);
// 更新家庭成员
familyMemberService.updateByPersonId(person);
// 更新荣誉
honorService.updateByPersonId(person);
// 更新论文
paperService.updateByPersonId(person);
// 更新专利
patentService.updateByPersonId(person);
// 更新奖励
personRewardService.updateByPersonId(person);
// 更新处罚
personPunishService.updateByPersonId(person);
// 更新审批记录
personApproveService.updateByPersonId(person);
// 更新绩效
personPerformanceService.updateByPersonId(person);
// 更新技术等级
personTechLevelService.updateByPersonId(person);
// 更新聘书
personAppointmentService.updateByPersonId(person);
// 更新转正审批
personFormalService.updateByPersonId(person);
// 更新离职审批
personLeaveService.updateByPersonId(person);
// 更新合同
contractService.updateByPersonId(person);
// 更新转正申请
personFormalApproveService.updateByPersonId(person);
// 更新离职申请
personLeaveApproveService.updateByPersonId(person);
// 更新履历
personResumeService.updateByPersonId(person);
// 更新技能
personSkillService.updateByPersonId(person);
// 更新职称
personTechTitleService.updateByPersonId(person);
// 更新专业技术资格
personQualificationService.updateByPersonId(person);
// 更新培训经历
personTrainExperienceService.updateByPersonId(person);
// 更新出国留学
personAbroadService.updateByPersonId(person);
// 更新转岗
personTransferService.updateByPersonId(person);
// 更新兼职
personPartTimeJobService.updateByPersonId(person);
// 更新项目经历
personProjectExperienceService.updateByPersonId(person);
// 更新同步表
personSyncService.updateByPersonId(person);
// 更新职业资
该代码段演示了如何根据人员类型(正式工、合同工)更新人员信息。代码首先判断人员类型,然后根据类型设置人员状态,并更新相关信息,包括个人信息、人事档案、组织机构关系、档案、OA 人员信息、职位、教育经历、工作经历、履历、技能、职称、资格、培训经历、出国留学经历、转岗经历、兼职经历、项目经历等。
该代码段体现了以下几个方面:
- 清晰的逻辑: 代码逻辑清晰易懂,通过判断人员类型,执行相应的更新操作。
- 完善的信息更新: 更新涵盖了人员信息的多方面,确保信息的一致性。
- 代码可读性: 代码简洁明了,注释清晰,易于理解和维护。
该代码段可以作为参考,帮助开发人员理解人事管理系统中人员信息更新的逻辑,并进行相应的代码编写和优化。
原文地址: https://www.cveoy.top/t/topic/liEA 著作权归作者所有。请勿转载和采集!