|
@@ -18,6 +18,7 @@ import nckd.jxccl.base.common.constant.FormConstant;
|
|
|
import nckd.jxccl.base.common.enums.AppraisalResultEnum;
|
|
import nckd.jxccl.base.common.enums.AppraisalResultEnum;
|
|
|
import nckd.jxccl.base.common.enums.JobSeqEnum;
|
|
import nckd.jxccl.base.common.enums.JobSeqEnum;
|
|
|
import nckd.jxccl.base.common.exception.ValidationException;
|
|
import nckd.jxccl.base.common.exception.ValidationException;
|
|
|
|
|
+import nckd.jxccl.base.common.utils.ConvertUtil;
|
|
|
import nckd.jxccl.base.common.utils.DateUtil;
|
|
import nckd.jxccl.base.common.utils.DateUtil;
|
|
|
import nckd.jxccl.base.common.utils.QueryFieldBuilder;
|
|
import nckd.jxccl.base.common.utils.QueryFieldBuilder;
|
|
|
import nckd.jxccl.base.common.utils.StrFormatter;
|
|
import nckd.jxccl.base.common.utils.StrFormatter;
|
|
@@ -25,6 +26,7 @@ import nckd.jxccl.base.orm.helper.QFilterCommonHelper;
|
|
|
import nckd.jxccl.base.pm.helper.PerformanceManagerHelper;
|
|
import nckd.jxccl.base.pm.helper.PerformanceManagerHelper;
|
|
|
import nckd.jxccl.hr.psms.common.PerfRankMgmtConstant;
|
|
import nckd.jxccl.hr.psms.common.PerfRankMgmtConstant;
|
|
|
import nckd.jxccl.hr.psms.common.PositionStructureConstant;
|
|
import nckd.jxccl.hr.psms.common.PositionStructureConstant;
|
|
|
|
|
+import nckd.jxccl.hr.psms.common.bo.PositionAppointmentBO;
|
|
|
import nckd.jxccl.hr.psms.helper.PositionStructureHelper;
|
|
import nckd.jxccl.hr.psms.helper.PositionStructureHelper;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
|
|
@@ -33,8 +35,10 @@ import java.time.LocalDateTime;
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
|
|
+import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
+import java.util.Objects;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -49,37 +53,37 @@ public class JobLevelCalculatorService {
|
|
|
protected final static Log logger = LogFactory.getLog(JobLevelCalculatorService.class);
|
|
protected final static Log logger = LogFactory.getLog(JobLevelCalculatorService.class);
|
|
|
|
|
|
|
|
/** 职称等级与技能等级映射关系*/
|
|
/** 职称等级与技能等级映射关系*/
|
|
|
- public static final Map<String, String> TechPostLevelNumberTojobstatusNumberMap = new HashMap<>();
|
|
|
|
|
|
|
+ public static final Map<String, String> TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP = new HashMap<>();
|
|
|
|
|
|
|
|
static {
|
|
static {
|
|
|
// 正高级---高级技师
|
|
// 正高级---高级技师
|
|
|
- TechPostLevelNumberTojobstatusNumberMap.put("001", "1");
|
|
|
|
|
|
|
+ TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.put("001", "1");
|
|
|
// 副高级---高级技师
|
|
// 副高级---高级技师
|
|
|
- TechPostLevelNumberTojobstatusNumberMap.put("002", "1");
|
|
|
|
|
|
|
+ TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.put("002", "1");
|
|
|
// 中级---技师
|
|
// 中级---技师
|
|
|
- TechPostLevelNumberTojobstatusNumberMap.put("003", "2");
|
|
|
|
|
|
|
+ TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.put("003", "2");
|
|
|
// 助理级---高级工
|
|
// 助理级---高级工
|
|
|
- TechPostLevelNumberTojobstatusNumberMap.put("004", "3");
|
|
|
|
|
|
|
+ TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.put("004", "3");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 计算员工职级(单条生成年度调记录、新建调整查询职级、新建动态调整)
|
|
* 计算员工职级(单条生成年度调记录、新建调整查询职级、新建动态调整)
|
|
|
|
|
+ * 对应SHR:PersonpositionfileFluctuationListHandler#getJobGradeid
|
|
|
* @param positionAppointment 人员最新信息(最新学历、最新聘任....)
|
|
* @param positionAppointment 人员最新信息(最新学历、最新聘任....)
|
|
|
* @return: java.lang.String
|
|
* @return: java.lang.String
|
|
|
* @author W.Y.C
|
|
* @author W.Y.C
|
|
|
* @date: 2025/09/19 14:19
|
|
* @date: 2025/09/19 14:19
|
|
|
*/
|
|
*/
|
|
|
- public static JobLevelResult calculateJobLevel(DynamicObject person, Date date, DynamicObject positionAppointment) {
|
|
|
|
|
|
|
+ public static JobLevelResult calculateJobLevel(DynamicObject person, Date date, PositionAppointmentBO positionAppointment) {
|
|
|
//资格三要素:
|
|
//资格三要素:
|
|
|
// • 职称/技能等级:硬性门槛(如工程师职称、技师等级)
|
|
// • 职称/技能等级:硬性门槛(如工程师职称、技师等级)
|
|
|
- // • 职业生涯累计积分:量化能力总分(由学历、职称、年度贡献分累计)
|
|
|
|
|
|
|
+ // • 积分:量化能力总分(由学历、职称、年度贡献分累计)
|
|
|
// • 年度绩效考核结果(R排名):决定升降的关键绩效指标
|
|
// • 年度绩效考核结果(R排名):决定升降的关键绩效指标
|
|
|
Long personId = person.getLong(FormConstant.ID_KEY);
|
|
Long personId = person.getLong(FormConstant.ID_KEY);
|
|
|
String personName = person.getString(FormConstant.NAME_KEY);
|
|
String personName = person.getString(FormConstant.NAME_KEY);
|
|
|
//对应SHR:hrjobfamilyid
|
|
//对应SHR:hrjobfamilyid
|
|
|
- long jobSeqId = positionAppointment.getLong(String.join(".", FormConstant.HBPM_POSITIONHR, FormConstant.NCKD_JOBSEQ,FormConstant.ID_KEY));
|
|
|
|
|
|
|
+ long jobSeqId = positionAppointment.getEmpPosOrgRel().getLong(String.join(".", FormConstant.HBPM_POSITIONHR, FormConstant.NCKD_JOBSEQ,FormConstant.ID_KEY));
|
|
|
DynamicObject jobSeq = BusinessDataServiceHelper.loadSingle(jobSeqId, FormConstant.HBJM_JOBSEQHR);
|
|
DynamicObject jobSeq = BusinessDataServiceHelper.loadSingle(jobSeqId, FormConstant.HBJM_JOBSEQHR);
|
|
|
JobLevelResult jobLevelResult = new JobLevelResult();
|
|
JobLevelResult jobLevelResult = new JobLevelResult();
|
|
|
//对应SHR:JobGradeid
|
|
//对应SHR:JobGradeid
|
|
@@ -131,7 +135,7 @@ public class JobLevelCalculatorService {
|
|
|
|
|
|
|
|
// 5.是否首次聘任
|
|
// 5.是否首次聘任
|
|
|
//对应SHR:fistPR;922~926行
|
|
//对应SHR:fistPR;922~926行
|
|
|
- boolean firstPR = isFirstPR(personId);
|
|
|
|
|
|
|
+ boolean firstPr = isFirstPr(personId);
|
|
|
|
|
|
|
|
// 6. 是否已使用过考核结果
|
|
// 6. 是否已使用过考核结果
|
|
|
//对应SHR:useappraisalresult;926行
|
|
//对应SHR:useappraisalresult;926行
|
|
@@ -139,7 +143,7 @@ public class JobLevelCalculatorService {
|
|
|
|
|
|
|
|
// 7. 计算降级数
|
|
// 7. 计算降级数
|
|
|
//对应SHR:minuspersonappraisal;930~945行
|
|
//对应SHR:minuspersonappraisal;930~945行
|
|
|
- int minusPersonAppraisal = calcMinusPersonAppraisal(appraisalResultNumber, firstPR, usedAppraisalResult, jobLevelResult);
|
|
|
|
|
|
|
+ int minusPersonAppraisal = calcMinusPersonAppraisal(appraisalResultNumber, firstPr, usedAppraisalResult, jobLevelResult);
|
|
|
|
|
|
|
|
// 9.如果是管理序列,则按职能序列进行调整
|
|
// 9.如果是管理序列,则按职能序列进行调整
|
|
|
//对应SHR:hrjobfamilynumber;989~993
|
|
//对应SHR:hrjobfamilynumber;989~993
|
|
@@ -151,7 +155,7 @@ public class JobLevelCalculatorService {
|
|
|
|
|
|
|
|
// 10. 处理职称/技能等级积分
|
|
// 10. 处理职称/技能等级积分
|
|
|
// 对应SHR:1015~1036
|
|
// 对应SHR:1015~1036
|
|
|
- JobScoreInfo jobScoreInfo = handleJobScores(jobSeq, currentPersonPosFile, positionAppointment);
|
|
|
|
|
|
|
+ JobScoreInfo jobScoreInfo = handleJobScores(jobSeq, positionAppointment);
|
|
|
|
|
|
|
|
// 8. 处理学历积分
|
|
// 8. 处理学历积分
|
|
|
//对应SHR:DiplomaScore;947~978行
|
|
//对应SHR:DiplomaScore;947~978行
|
|
@@ -165,22 +169,12 @@ public class JobLevelCalculatorService {
|
|
|
jobScoreInfo.allSumScore = allSumScore;
|
|
jobScoreInfo.allSumScore = allSumScore;
|
|
|
|
|
|
|
|
// 11. 获取序列对应的职级
|
|
// 11. 获取序列对应的职级
|
|
|
- DynamicObject[] jobLevelByJobSeq = getJobLevelByJobSeq(jobSeq);
|
|
|
|
|
//对应SHR:jobgradeMap
|
|
//对应SHR:jobgradeMap
|
|
|
- Map<Integer, DynamicObject> jobLevelMap = new HashMap<>();
|
|
|
|
|
- if (jobLevelByJobSeq != null) {
|
|
|
|
|
- String jobLevelSeqKey = FormConstant.JOBLEVELSEQ;
|
|
|
|
|
- jobLevelMap = Arrays.stream(jobLevelByJobSeq)
|
|
|
|
|
- .collect(Collectors.toMap(
|
|
|
|
|
- dynamicObject -> dynamicObject.getInt(jobLevelSeqKey),
|
|
|
|
|
- dynamicObject -> dynamicObject,
|
|
|
|
|
- (existing, replacement) -> existing)
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Map<Integer, DynamicObject> jobLevelMap = getJobLevelByJobSeqMap(jobSeq);
|
|
|
|
|
|
|
|
// 12. 根据不同情况计算职级ID
|
|
// 12. 根据不同情况计算职级ID
|
|
|
//对应SHR:JobGradeInfo;1044~1071行
|
|
//对应SHR:JobGradeInfo;1044~1071行
|
|
|
- DynamicObject jobLevel = calculateJobGradeId(jobSeq,jobScoreInfo, jobSeqInfo,allSumScore,currentJobLevelIndex,minusPersonAppraisal,firstPR,jobLevelResult);
|
|
|
|
|
|
|
+ DynamicObject jobLevel = calculateJobGradeId(jobSeq,jobScoreInfo, jobSeqInfo,allSumScore,currentJobLevelIndex,minusPersonAppraisal, firstPr,jobLevelResult);
|
|
|
//对应SHR:newjobgradeindex
|
|
//对应SHR:newjobgradeindex
|
|
|
int jobLevelIndex = jobLevel.getInt(FormConstant.JOBLEVELSEQ);
|
|
int jobLevelIndex = jobLevel.getInt(FormConstant.JOBLEVELSEQ);
|
|
|
// 13. 处理排名相关信息
|
|
// 13. 处理排名相关信息
|
|
@@ -216,11 +210,11 @@ public class JobLevelCalculatorService {
|
|
|
|
|
|
|
|
// 16. 根据考核结果使用情况处理职级计算
|
|
// 16. 根据考核结果使用情况处理职级计算
|
|
|
//对应SHR行:1149~1180行
|
|
//对应SHR行:1149~1180行
|
|
|
- jobLevelIndex = handleAppraisalUsage(jobSeq,rankingInfo,jobLevelIndex,lastAppointmentJobGradeIndex,currentJobLevelIndex,minusPersonAppraisal,firstPR,usedAppraisalResult,jobLevelResult);
|
|
|
|
|
|
|
+ jobLevelIndex = handleAppraisalUsage(jobSeq,rankingInfo,jobLevelIndex,lastAppointmentJobGradeIndex,currentJobLevelIndex,minusPersonAppraisal, firstPr,usedAppraisalResult,jobLevelResult);
|
|
|
|
|
|
|
|
// 17. 处理首次聘任情况 & 处理聘任相关限制
|
|
// 17. 处理首次聘任情况 & 处理聘任相关限制
|
|
|
//对应SHR:1182~1295行
|
|
//对应SHR:1182~1295行
|
|
|
- jobLevelIndex = handleAppointmentRestrictions(personId, firstPR,usedAppraisalResult,jobSeq,jobSeqId,currentJobSeqId,currentJobSeqNumber,jobScoreInfo,currentJobLevelIndex,jobLevelIndex,allSumScore,jobLevelResult,minusPersonAppraisal,currentPersonPosFile);
|
|
|
|
|
|
|
+ jobLevelIndex = handleAppointmentRestrictions(personId, firstPr,usedAppraisalResult,jobSeq,jobSeqId,currentJobSeqId,currentJobSeqNumber,jobScoreInfo,currentJobLevelIndex,jobLevelIndex,allSumScore,jobLevelResult,minusPersonAppraisal,currentPersonPosFile);
|
|
|
|
|
|
|
|
// 18.最终确定职级ID
|
|
// 18.最终确定职级ID
|
|
|
//对应SHR行:1297~1320行
|
|
//对应SHR行:1297~1320行
|
|
@@ -354,7 +348,7 @@ public class JobLevelCalculatorService {
|
|
|
return JobSeqEnum.SKILL.getCode().equals(jobSeqNumber) &&
|
|
return JobSeqEnum.SKILL.getCode().equals(jobSeqNumber) &&
|
|
|
StringUtils.isBlank(ocpQualLevel) &&
|
|
StringUtils.isBlank(ocpQualLevel) &&
|
|
|
StringUtils.isNotBlank(proTitleLevelNumber) &&
|
|
StringUtils.isNotBlank(proTitleLevelNumber) &&
|
|
|
- TechPostLevelNumberTojobstatusNumberMap.get(proTitleLevelNumber) == null;
|
|
|
|
|
|
|
+ TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.get(proTitleLevelNumber) == null;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -368,7 +362,7 @@ public class JobLevelCalculatorService {
|
|
|
* @author W.Y.C
|
|
* @author W.Y.C
|
|
|
* @date: 2025/09/20 15:10
|
|
* @date: 2025/09/20 15:10
|
|
|
*/
|
|
*/
|
|
|
- private static boolean useAppraisalResult(Long personId, Date date) {
|
|
|
|
|
|
|
+ public static boolean useAppraisalResult(Long personId, Date date) {
|
|
|
//对应SHR代码:com.kingdee.shr.customer.web.handler.ContributeScore.PersonpositionfileFluctuationListHandler#useAppraisalresult
|
|
//对应SHR代码:com.kingdee.shr.customer.web.handler.ContributeScore.PersonpositionfileFluctuationListHandler#useAppraisalresult
|
|
|
|
|
|
|
|
//查询条件:查询某个人员职位档案非失效状态 并且 (初定 或者 类型状态为:年度调整3;职位调动4) 并且 职称分数或技能分数>0的数据
|
|
//查询条件:查询某个人员职位档案非失效状态 并且 (初定 或者 类型状态为:年度调整3;职位调动4) 并且 职称分数或技能分数>0的数据
|
|
@@ -507,7 +501,7 @@ public class JobLevelCalculatorService {
|
|
|
* @author W.Y.C
|
|
* @author W.Y.C
|
|
|
* @date: 2025/09/20 18:20
|
|
* @date: 2025/09/20 18:20
|
|
|
*/
|
|
*/
|
|
|
- private static boolean isFirstPR(long personId) {
|
|
|
|
|
|
|
+ private static boolean isFirstPr(long personId) {
|
|
|
QFilter rankScore = new QFilter(PositionStructureConstant.NCKD_RANKSCORE, QCP.is_notnull, null).and(new QFilter(PositionStructureConstant.NCKD_RANKSCORE, QCP.large_than, 0));
|
|
QFilter rankScore = new QFilter(PositionStructureConstant.NCKD_RANKSCORE, QCP.is_notnull, null).and(new QFilter(PositionStructureConstant.NCKD_RANKSCORE, QCP.large_than, 0));
|
|
|
QFilter jobScore = new QFilter(PositionStructureConstant.NCKD_JOBSTATUSSCORE, QCP.is_notnull, null).and(new QFilter(PositionStructureConstant.NCKD_JOBSTATUSSCORE, QCP.large_than, 0));
|
|
QFilter jobScore = new QFilter(PositionStructureConstant.NCKD_JOBSTATUSSCORE, QCP.is_notnull, null).and(new QFilter(PositionStructureConstant.NCKD_JOBSTATUSSCORE, QCP.large_than, 0));
|
|
|
QFilter filer = new QFilter(String.join(".", FormConstant.NCKD_PERSON, FormConstant.ID_KEY), QCP.equals, personId)
|
|
QFilter filer = new QFilter(String.join(".", FormConstant.NCKD_PERSON, FormConstant.ID_KEY), QCP.equals, personId)
|
|
@@ -574,16 +568,16 @@ public class JobLevelCalculatorService {
|
|
|
/**
|
|
/**
|
|
|
* 计算考核结果对职级的影响
|
|
* 计算考核结果对职级的影响
|
|
|
* @param appraisalResultNumber 考核结果
|
|
* @param appraisalResultNumber 考核结果
|
|
|
- * @param firstPR 是否首次聘任
|
|
|
|
|
|
|
+ * @param firstPr 是否首次聘任
|
|
|
* @param usedAppraisalResult 是否使用考核结果
|
|
* @param usedAppraisalResult 是否使用考核结果
|
|
|
* @param jobLevelResult 职级计算结果
|
|
* @param jobLevelResult 职级计算结果
|
|
|
* @return: int
|
|
* @return: int
|
|
|
* @author W.Y.C
|
|
* @author W.Y.C
|
|
|
* @date: 2025/09/20 21:16
|
|
* @date: 2025/09/20 21:16
|
|
|
*/
|
|
*/
|
|
|
- private static int calcMinusPersonAppraisal(String appraisalResultNumber, boolean firstPR,boolean usedAppraisalResult,JobLevelResult jobLevelResult) {
|
|
|
|
|
|
|
+ private static int calcMinusPersonAppraisal(String appraisalResultNumber, boolean firstPr, boolean usedAppraisalResult, JobLevelResult jobLevelResult) {
|
|
|
int minuspersonappraisal = 0;
|
|
int minuspersonappraisal = 0;
|
|
|
- if (!usedAppraisalResult || firstPR) {
|
|
|
|
|
|
|
+ if (!usedAppraisalResult || firstPr) {
|
|
|
if (AppraisalResultEnum.EXCELLENT.getCode().equals(appraisalResultNumber)) {
|
|
if (AppraisalResultEnum.EXCELLENT.getCode().equals(appraisalResultNumber)) {
|
|
|
// 优秀 -> 升一级(动态调整阶段允许升)
|
|
// 优秀 -> 升一级(动态调整阶段允许升)
|
|
|
minuspersonappraisal = -1;
|
|
minuspersonappraisal = -1;
|
|
@@ -614,17 +608,22 @@ public class JobLevelCalculatorService {
|
|
|
* @author W.Y.C
|
|
* @author W.Y.C
|
|
|
* @date: 2025/09/20 22:06
|
|
* @date: 2025/09/20 22:06
|
|
|
*/
|
|
*/
|
|
|
- public static BigDecimal handleDiplomaScore(DynamicObject currentPersonPosFileByPerson, DynamicObject positionAppointment,JobScoreInfo scoreInfo) {
|
|
|
|
|
|
|
+ public static BigDecimal handleDiplomaScore(DynamicObject currentPersonPosFileByPerson, PositionAppointmentBO positionAppointment,JobScoreInfo scoreInfo) {
|
|
|
|
|
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("基准时间", DateUtil.format(new Date(),DateUtil.NORM_DATETIME_PATTERN));
|
|
|
//获取上一笔职位档案变动记录学历信息
|
|
//获取上一笔职位档案变动记录学历信息
|
|
|
//对应SHR:lastDiplomaInfo
|
|
//对应SHR:lastDiplomaInfo
|
|
|
DynamicObject diploma = currentPersonPosFileByPerson.getDynamicObject(PositionStructureConstant.NCKD_DIPLOMA);
|
|
DynamicObject diploma = currentPersonPosFileByPerson.getDynamicObject(PositionStructureConstant.NCKD_DIPLOMA);
|
|
|
|
|
+
|
|
|
//对应SHR:lastDiplomaInfo.getId()
|
|
//对应SHR:lastDiplomaInfo.getId()
|
|
|
long diplomaId = diploma.getLong(FormConstant.ID_KEY);
|
|
long diplomaId = diploma.getLong(FormConstant.ID_KEY);
|
|
|
//对应SHR:lastDiplomaInfo.getName()
|
|
//对应SHR:lastDiplomaInfo.getName()
|
|
|
String diplomaName = diploma.getString(FormConstant.NAME_KEY);
|
|
String diplomaName = diploma.getString(FormConstant.NAME_KEY);
|
|
|
//对应SHR:lastDiplomaInfo.getDescription()
|
|
//对应SHR:lastDiplomaInfo.getDescription()
|
|
|
BigDecimal diplomaScore = diploma.getBigDecimal(FormConstant.NCKD_SCORE);
|
|
BigDecimal diplomaScore = diploma.getBigDecimal(FormConstant.NCKD_SCORE);
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("上一笔记录学历", diplomaName);
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("上一笔记录学历分数", ConvertUtil.toStr(diplomaScore));
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("学历" + diplomaName + "最新配置分数", ConvertUtil.toStr(diplomaScore));
|
|
|
scoreInfo.diplomaId = diplomaId;
|
|
scoreInfo.diplomaId = diplomaId;
|
|
|
scoreInfo.diplomaScore = diplomaScore;
|
|
scoreInfo.diplomaScore = diplomaScore;
|
|
|
//获取上一笔职位档案变动记录学历积分
|
|
//获取上一笔职位档案变动记录学历积分
|
|
@@ -632,27 +631,42 @@ public class JobLevelCalculatorService {
|
|
|
BigDecimal lastDiplomaScore = currentPersonPosFileByPerson.getBigDecimal(PositionStructureConstant.NCKD_DIPLOMASCORE);
|
|
BigDecimal lastDiplomaScore = currentPersonPosFileByPerson.getBigDecimal(PositionStructureConstant.NCKD_DIPLOMASCORE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ DynamicObject perEduExp = positionAppointment.getPerEduExp();
|
|
|
|
|
+ // 对应SHR:Diploma
|
|
|
|
|
+ Long currentDiplomaId = null;
|
|
|
|
|
+ String currentDiplomaName = "";
|
|
|
|
|
+ BigDecimal currentDiplomaScore = BigDecimal.ZERO;
|
|
|
|
|
+ if (perEduExp != null) {
|
|
|
|
|
+ currentDiplomaId = perEduExp.getLong(String.join(".", FormConstant.EDUCATION_KEY, FormConstant.ID_KEY));
|
|
|
|
|
+ // 对应SHR:newDiplomaInfo.getName()
|
|
|
|
|
+ currentDiplomaName = perEduExp.getString(String.join(".", FormConstant.EDUCATION_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
+ // 对应SHR:DiplomaScore
|
|
|
|
|
+ // 人员最新学历的积分
|
|
|
|
|
+ currentDiplomaScore = perEduExp.getBigDecimal(String.join(".", FormConstant.EDUCATION_KEY, FormConstant.NCKD_SCORE));
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("最新学历", currentDiplomaName);
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("最新学历配置分", ConvertUtil.toStr(currentDiplomaScore));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- //对应SHR:Diploma
|
|
|
|
|
- Long currentDiplomaId = positionAppointment.getLong(String.join(".", FormConstant.HRPI_PEREDUEXP, FormConstant.EDUCATION_KEY, FormConstant.ID_KEY));
|
|
|
|
|
- //对应SHR:newDiplomaInfo.getName()
|
|
|
|
|
- String currentDiplomaName = positionAppointment.getString(String.join(".", FormConstant.HRPI_PEREDUEXP, FormConstant.EDUCATION_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
- //对应SHR:DiplomaScore
|
|
|
|
|
- //人员最新学历的积分
|
|
|
|
|
- BigDecimal currentDiplomaScore = positionAppointment.getBigDecimal(String.join(".", FormConstant.HRPI_PEREDUEXP, FormConstant.EDUCATION_KEY, FormConstant.NCKD_SCORE));
|
|
|
|
|
- //对应SHR:DiplomaScore
|
|
|
|
|
|
|
+ // 对应SHR:DiplomaScore
|
|
|
BigDecimal resultScore = currentDiplomaScore;
|
|
BigDecimal resultScore = currentDiplomaScore;
|
|
|
|
|
|
|
|
logger.info("原学历:ID【{}】,名称【{}】,积分【{}】;最新学历:ID【{}】,名称【{}】,积分【{}】", diplomaId,diplomaName,diplomaScore,currentDiplomaId,currentDiplomaName,currentDiplomaScore);
|
|
logger.info("原学历:ID【{}】,名称【{}】,积分【{}】;最新学历:ID【{}】,名称【{}】,积分【{}】", diplomaId,diplomaName,diplomaScore,currentDiplomaId,currentDiplomaName,currentDiplomaScore);
|
|
|
- if (currentDiplomaId.equals(diplomaId)) {
|
|
|
|
|
|
|
+ if (Objects.equals(currentDiplomaId,diplomaId)) {
|
|
|
//学历不变,分数保持不变
|
|
//学历不变,分数保持不变
|
|
|
resultScore = lastDiplomaScore;
|
|
resultScore = lastDiplomaScore;
|
|
|
logger.info("");
|
|
logger.info("");
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("学历没有变化", "分数保持不变");
|
|
|
} else {
|
|
} else {
|
|
|
// 分差 = 最新学历配置分 - 上一笔学历的最新配置分
|
|
// 分差 = 最新学历配置分 - 上一笔学历的最新配置分
|
|
|
// 本次学历分 = 上一笔学历分 + 分差
|
|
// 本次学历分 = 上一笔学历分 + 分差
|
|
|
BigDecimal diff = resultScore.subtract(diplomaScore);
|
|
BigDecimal diff = resultScore.subtract(diplomaScore);
|
|
|
resultScore = lastDiplomaScore.add(diff);
|
|
resultScore = lastDiplomaScore.add(diff);
|
|
|
|
|
+ scoreInfo.diplomaId = currentDiplomaId;
|
|
|
|
|
+ scoreInfo.diplomaScore = currentDiplomaScore;
|
|
|
|
|
+ scoreInfo.whyDiplomaScore.put("学历变化",
|
|
|
|
|
+ "学历分 = 上一笔记录学历分数(" + lastDiplomaScore + ") + (最新配置分("
|
|
|
|
|
+ + ConvertUtil.toStr(currentDiplomaScore) + ") - 上一学历最新配置分(" + ConvertUtil.toStr(diplomaScore) + "))");
|
|
|
}
|
|
}
|
|
|
return resultScore;
|
|
return resultScore;
|
|
|
}
|
|
}
|
|
@@ -691,37 +705,50 @@ public class JobLevelCalculatorService {
|
|
|
* 处理员工职称和技能等级分数
|
|
* 处理员工职称和技能等级分数
|
|
|
* 根据职位序列类型(技能序列/非技能序列)确定采用职称等级分还是技能等级分
|
|
* 根据职位序列类型(技能序列/非技能序列)确定采用职称等级分还是技能等级分
|
|
|
* @param newJobSeq 最新职位序列
|
|
* @param newJobSeq 最新职位序列
|
|
|
- * @param currentPersonPosFileByPerson 最近一次职位档案
|
|
|
|
|
* @param positionAppointment 人员最信息(最新学历)
|
|
* @param positionAppointment 人员最信息(最新学历)
|
|
|
* @return: nckd.jxccl.hr.psms.business.JobLevelCalculatorService.JobScoreInfo
|
|
* @return: nckd.jxccl.hr.psms.business.JobLevelCalculatorService.JobScoreInfo
|
|
|
* @author W.Y.C
|
|
* @author W.Y.C
|
|
|
* @date: 2025/09/22 09:39
|
|
* @date: 2025/09/22 09:39
|
|
|
*/
|
|
*/
|
|
|
- public static JobScoreInfo handleJobScores(DynamicObject newJobSeq,
|
|
|
|
|
- DynamicObject currentPersonPosFileByPerson,DynamicObject positionAppointment) {
|
|
|
|
|
|
|
+ public static JobScoreInfo handleJobScores(DynamicObject newJobSeq,PositionAppointmentBO positionAppointment) {
|
|
|
//对应SHR:hrjobfamilynumber
|
|
//对应SHR:hrjobfamilynumber
|
|
|
String newJobSeqNumber = newJobSeq.getString(FormConstant.NUMBER_KEY);
|
|
String newJobSeqNumber = newJobSeq.getString(FormConstant.NUMBER_KEY);
|
|
|
|
|
|
|
|
|
|
+ // 当前人员最新职称等级
|
|
|
|
|
+ Long newPerProTitleId = null;
|
|
|
|
|
+ BigDecimal newPerProTitleScore = BigDecimal.ZERO;
|
|
|
|
|
+ String newPerProTitleNumber = "";
|
|
|
|
|
+ String newPerProTitleName = "";
|
|
|
|
|
+ String rankName = "";
|
|
|
|
|
+ DynamicObject perProTitle = positionAppointment.getPerProTitle();
|
|
|
|
|
+ if (perProTitle != null) {
|
|
|
|
|
+ newPerProTitleId = perProTitle.getLong(String.join(".", FormConstant.PROLEVEL_KEY, FormConstant.ID_KEY));
|
|
|
|
|
+ // 对应SHR:selMap.get("zgjbscore")
|
|
|
|
|
+ newPerProTitleScore = perProTitle.getBigDecimal(String.join(".", FormConstant.PROLEVEL_KEY, FormConstant.NCKD_SCORE));
|
|
|
|
|
+ // 对应SHR:selMap.get("zgjbnumber")
|
|
|
|
|
+ newPerProTitleNumber = perProTitle.getString(String.join(".", FormConstant.PROLEVEL_KEY, FormConstant.NUMBER_KEY));
|
|
|
|
|
+ newPerProTitleName = perProTitle.getString(String.join(".", FormConstant.PROLEVEL_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
+ // 职称名称
|
|
|
|
|
+ rankName = perProTitle.getString(String.join(".", FormConstant.PROFESSIONAL_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- //当前人员最新职称等级
|
|
|
|
|
- Long newPerProTitleId = positionAppointment.getLong(String.join(".", FormConstant.HRPI_PERPROTITLE, FormConstant.PROLEVEL_KEY, FormConstant.ID_KEY));
|
|
|
|
|
- //对应SHR:selMap.get("zgjbscore")
|
|
|
|
|
- BigDecimal newPerProTitleScore = positionAppointment.getBigDecimal(String.join(".", FormConstant.HRPI_PERPROTITLE, FormConstant.PROLEVEL_KEY, FormConstant.NCKD_SCORE));
|
|
|
|
|
- //对应SHR:selMap.get("zgjbnumber")
|
|
|
|
|
- String newPerProTitleNumber = positionAppointment.getString(String.join(".", FormConstant.HRPI_PERPROTITLE, FormConstant.PROLEVEL_KEY, FormConstant.NUMBER_KEY));
|
|
|
|
|
- String newPerProTitleName = positionAppointment.getString(String.join(".", FormConstant.HRPI_PERPROTITLE, FormConstant.PROLEVEL_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
- //职称名称
|
|
|
|
|
- String rankName = positionAppointment.getString(String.join(".", FormConstant.HRPI_PERPROTITLE, FormConstant.PROFESSIONAL_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
-
|
|
|
|
|
- //当前人员最新技能等级
|
|
|
|
|
- Long newQuaLevelId = positionAppointment.getLong(String.join(".", FormConstant.HRPI_PEROCPQUAL, FormConstant.QUALEVEL_KEY, FormConstant.ID_KEY));
|
|
|
|
|
- //对应SHR:selMap.get("zyjndjscore")
|
|
|
|
|
- BigDecimal newQuaLevelScore = positionAppointment.getBigDecimal(String.join(".", FormConstant.HRPI_PEROCPQUAL, FormConstant.QUALEVEL_KEY, FormConstant.NCKD_SCORE));
|
|
|
|
|
- //对应SHR:selMap.get("zyjndjnumber")
|
|
|
|
|
- String newQuaLevelNumber = positionAppointment.getString(String.join(".", FormConstant.HRPI_PEROCPQUAL, FormConstant.QUALEVEL_KEY, FormConstant.NUMBER_KEY));
|
|
|
|
|
- String newQuaLevelName = positionAppointment.getString(String.join(".", FormConstant.HRPI_PEROCPQUAL, FormConstant.QUALEVEL_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
- //技能名称
|
|
|
|
|
- String jobStatusName = positionAppointment.getString(String.join(".", FormConstant.HRPI_PEROCPQUAL, FormConstant.QUALIFICATION_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
|
|
+ // 当前人员最新技能等级
|
|
|
|
|
+ Long newQuaLevelId = null;
|
|
|
|
|
+ BigDecimal newQuaLevelScore = BigDecimal.ZERO;
|
|
|
|
|
+ String newQuaLevelNumber = "";
|
|
|
|
|
+ String newQuaLevelName = "";
|
|
|
|
|
+ String jobStatusName = "";
|
|
|
|
|
+ DynamicObject perOcpQual = positionAppointment.getPerOcpQual();
|
|
|
|
|
+ if (perOcpQual != null) {
|
|
|
|
|
+ // 对应SHR:selMap.get("zyjndjnumber")
|
|
|
|
|
+ newQuaLevelId = perOcpQual.getLong(String.join(".", FormConstant.QUALEVEL_KEY, FormConstant.ID_KEY));
|
|
|
|
|
+ // 对应SHR:selMap.get("zyjndjscore")
|
|
|
|
|
+ newQuaLevelScore = perOcpQual.getBigDecimal(String.join(".", FormConstant.QUALEVEL_KEY, FormConstant.NCKD_SCORE));
|
|
|
|
|
+ newQuaLevelNumber = perOcpQual.getString(String.join(".", FormConstant.QUALEVEL_KEY, FormConstant.NUMBER_KEY));
|
|
|
|
|
+ newQuaLevelName = perOcpQual.getString(String.join(".", FormConstant.QUALEVEL_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
+ // 技能名称
|
|
|
|
|
+ jobStatusName = perOcpQual.getString(String.join(".", FormConstant.QUALIFICATION_KEY, FormConstant.NAME_KEY));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
JobScoreInfo jobScoreInfo = new JobScoreInfo();
|
|
JobScoreInfo jobScoreInfo = new JobScoreInfo();
|
|
|
|
|
|
|
@@ -763,7 +790,7 @@ public class JobLevelCalculatorService {
|
|
|
* 计算职级ID
|
|
* 计算职级ID
|
|
|
*/
|
|
*/
|
|
|
private static DynamicObject calculateJobGradeId(DynamicObject newJobSeq, JobScoreInfo jobScoreInfo, JobSeqInfo jobSeqInfo,
|
|
private static DynamicObject calculateJobGradeId(DynamicObject newJobSeq, JobScoreInfo jobScoreInfo, JobSeqInfo jobSeqInfo,
|
|
|
- BigDecimal allSumScore, int currentJobLevelIndex, int minusPersonAppraisal, boolean fistPR, JobLevelResult jobLevelResult){
|
|
|
|
|
|
|
+ BigDecimal allSumScore, int currentJobLevelIndex, int minusPersonAppraisal, boolean fistPr, JobLevelResult jobLevelResult){
|
|
|
|
|
|
|
|
String perProTitleNumber = jobScoreInfo.perProTitleNumber;
|
|
String perProTitleNumber = jobScoreInfo.perProTitleNumber;
|
|
|
String quaLevelNumber = jobScoreInfo.quaLevelNumber;
|
|
String quaLevelNumber = jobScoreInfo.quaLevelNumber;
|
|
@@ -785,7 +812,7 @@ public class JobLevelCalculatorService {
|
|
|
jobLevel = getJobLevel(newJobSeq, allSumScore, perProTitleNumber, quaLevelNumber, 0, Boolean.FALSE,Boolean.FALSE);
|
|
jobLevel = getJobLevel(newJobSeq, allSumScore, perProTitleNumber, quaLevelNumber, 0, Boolean.FALSE,Boolean.FALSE);
|
|
|
//保级
|
|
//保级
|
|
|
jobLevelResult.adjustType = "1";
|
|
jobLevelResult.adjustType = "1";
|
|
|
- } else if (fistPR) {
|
|
|
|
|
|
|
+ } else if (fistPr) {
|
|
|
//对应SHR:JobGradeid = personpositionfileUtils.GainJobGrade(ctx, allsumScore, hrjobfamilynumber, zgjbnumber, zyjndjnumber, minuspersonappraisal);
|
|
//对应SHR:JobGradeid = personpositionfileUtils.GainJobGrade(ctx, allsumScore, hrjobfamilynumber, zgjbnumber, zyjndjnumber, minuspersonappraisal);
|
|
|
jobLevel = getJobLevel(newJobSeq, allSumScore, perProTitleNumber, quaLevelNumber, minusPersonAppraisal, Boolean.FALSE,Boolean.FALSE);
|
|
jobLevel = getJobLevel(newJobSeq, allSumScore, perProTitleNumber, quaLevelNumber, minusPersonAppraisal, Boolean.FALSE,Boolean.FALSE);
|
|
|
} else {
|
|
} else {
|
|
@@ -955,6 +982,7 @@ public class JobLevelCalculatorService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 计算R排名升降级
|
|
|
* 对应SHR:com.kingdee.shr.customer.web.handler.ContributeScore.PersonpositionfilecreateViewListHandler#getnewjobgradeindexByrank
|
|
* 对应SHR:com.kingdee.shr.customer.web.handler.ContributeScore.PersonpositionfilecreateViewListHandler#getnewjobgradeindexByrank
|
|
|
* @param jobLevelIndex
|
|
* @param jobLevelIndex
|
|
|
* @param currentJobLevelIndex
|
|
* @param currentJobLevelIndex
|
|
@@ -1133,15 +1161,15 @@ public class JobLevelCalculatorService {
|
|
|
* 根据考核结果使用情况处理职级计算
|
|
* 根据考核结果使用情况处理职级计算
|
|
|
*/
|
|
*/
|
|
|
private static int handleAppraisalUsage(DynamicObject jobSeq, RankingResultInfo rankingResultInfo, int jobLevelIndex,
|
|
private static int handleAppraisalUsage(DynamicObject jobSeq, RankingResultInfo rankingResultInfo, int jobLevelIndex,
|
|
|
- int lastAppointmentJobGradeIndex, int currentJobLevelIndex, int minuspersonappraisal, boolean fistPR, boolean usedAppraisalResult, JobLevelResult jobLevelResult){
|
|
|
|
|
|
|
+ int lastAppointmentJobGradeIndex, int currentJobLevelIndex, int minuspersonappraisal, boolean fistPr, boolean usedAppraisalResult, JobLevelResult jobLevelResult){
|
|
|
JobSeqEnum jobSeqEnum = JobSeqEnum.getByCode(jobSeq.getString(FormConstant.NUMBER_KEY));
|
|
JobSeqEnum jobSeqEnum = JobSeqEnum.getByCode(jobSeq.getString(FormConstant.NUMBER_KEY));
|
|
|
if (!usedAppraisalResult) {
|
|
if (!usedAppraisalResult) {
|
|
|
if (minuspersonappraisal == 0) {
|
|
if (minuspersonappraisal == 0) {
|
|
|
- if (!fistPR) {
|
|
|
|
|
|
|
+ if (!fistPr) {
|
|
|
// 考核结果为保级 所以相 等
|
|
// 考核结果为保级 所以相 等
|
|
|
jobLevelIndex = lastAppointmentJobGradeIndex;
|
|
jobLevelIndex = lastAppointmentJobGradeIndex;
|
|
|
}
|
|
}
|
|
|
- if (fistPR && ((rankingResultInfo == null || rankingResultInfo.countR == null || rankingResultInfo.countR == 0) || (rankingResultInfo.allowanceRank == null || rankingResultInfo.allowanceRank == 0))) {
|
|
|
|
|
|
|
+ if (fistPr && ((rankingResultInfo == null || rankingResultInfo.countR == null || rankingResultInfo.countR == 0) || (rankingResultInfo.allowanceRank == null || rankingResultInfo.allowanceRank == 0))) {
|
|
|
System.out.println("首次聘任而且无R排名,保持分数算出来的职级");
|
|
System.out.println("首次聘任而且无R排名,保持分数算出来的职级");
|
|
|
} else {
|
|
} else {
|
|
|
System.out.println("应用R排名结果");
|
|
System.out.println("应用R排名结果");
|
|
@@ -1173,9 +1201,9 @@ public class JobLevelCalculatorService {
|
|
|
/**
|
|
/**
|
|
|
* 处理聘任相关限制
|
|
* 处理聘任相关限制
|
|
|
*/
|
|
*/
|
|
|
- private static int handleAppointmentRestrictions(long personId, boolean firstPR,boolean usedAppraisalResult,
|
|
|
|
|
- DynamicObject jobSeq,long jobSeqId,long currentJobSeqId,String currentJobSeqNumber, JobScoreInfo jobScoreInfo,
|
|
|
|
|
- int currentJobLevelIndex,int jobLevelIndex, BigDecimal allsumScore, JobLevelResult jobLevelResult,int minusPersonAppraisal,DynamicObject currentPersonPosFile) {
|
|
|
|
|
|
|
+ private static int handleAppointmentRestrictions(long personId, boolean firstPr, boolean usedAppraisalResult,
|
|
|
|
|
+ DynamicObject jobSeq, long jobSeqId, long currentJobSeqId, String currentJobSeqNumber, JobScoreInfo jobScoreInfo,
|
|
|
|
|
+ int currentJobLevelIndex, int jobLevelIndex, BigDecimal allsumScore, JobLevelResult jobLevelResult, int minusPersonAppraisal, DynamicObject currentPersonPosFile) {
|
|
|
/*PersonpositionfileCollection PRpersonpositionfileCollection = PersonpositionfileFactory.getLocalInstance(ctx)
|
|
/*PersonpositionfileCollection PRpersonpositionfileCollection = PersonpositionfileFactory.getLocalInstance(ctx)
|
|
|
.getPersonpositionfileCollection("select *,Appraisalresult.*,JobGrade.* where person='" + personid +
|
|
.getPersonpositionfileCollection("select *,Appraisalresult.*,JobGrade.* where person='" + personid +
|
|
|
"' and (disable is null or disable<>1) and ((jobstatusScore is not null and jobstatusScore >0) or (RankScore is not null and RankScore >0)) " +
|
|
"' and (disable is null or disable<>1) and ((jobstatusScore is not null and jobstatusScore >0) or (RankScore is not null and RankScore >0)) " +
|
|
@@ -1204,15 +1232,15 @@ public class JobLevelCalculatorService {
|
|
|
new QFilter[]{filer},
|
|
new QFilter[]{filer},
|
|
|
queryFieldBuilder.buildOrder());
|
|
queryFieldBuilder.buildOrder());
|
|
|
|
|
|
|
|
- if (firstPR) {
|
|
|
|
|
|
|
+ if (firstPr) {
|
|
|
System.out.println("前一笔为初定且考核结果为无,按首次聘任处理,所以放开限制");
|
|
System.out.println("前一笔为初定且考核结果为无,按首次聘任处理,所以放开限制");
|
|
|
// 首次聘任
|
|
// 首次聘任
|
|
|
jobLevelResult.adjustType = "3";
|
|
jobLevelResult.adjustType = "3";
|
|
|
}else if (!query.isEmpty()){
|
|
}else if (!query.isEmpty()){
|
|
|
long hrjobfamilyid = jobSeqId;
|
|
long hrjobfamilyid = jobSeqId;
|
|
|
- long oldHRJobFamilyid = currentJobSeqId;
|
|
|
|
|
|
|
+ long oldHRJobFamilyId = currentJobSeqId;
|
|
|
String hrjobfamilynumber = jobSeq.getString(FormConstant.NUMBER_KEY);
|
|
String hrjobfamilynumber = jobSeq.getString(FormConstant.NUMBER_KEY);
|
|
|
- String oldHRJobFamilynumber = currentJobSeqNumber;
|
|
|
|
|
|
|
+ String oldHRJobFamilyNumber = currentJobSeqNumber;
|
|
|
BigDecimal currentRankScore = currentPersonPosFile.getBigDecimal(PositionStructureConstant.NCKD_RANKSCORE);
|
|
BigDecimal currentRankScore = currentPersonPosFile.getBigDecimal(PositionStructureConstant.NCKD_RANKSCORE);
|
|
|
BigDecimal currentJobStatusScore = currentPersonPosFile.getBigDecimal(PositionStructureConstant.NCKD_JOBSTATUSSCORE);
|
|
BigDecimal currentJobStatusScore = currentPersonPosFile.getBigDecimal(PositionStructureConstant.NCKD_JOBSTATUSSCORE);
|
|
|
if (!(currentRankScore.compareTo(BigDecimal.ZERO) > 0 || currentJobStatusScore.compareTo(BigDecimal.ZERO) > 0)) {
|
|
if (!(currentRankScore.compareTo(BigDecimal.ZERO) > 0 || currentJobStatusScore.compareTo(BigDecimal.ZERO) > 0)) {
|
|
@@ -1244,10 +1272,10 @@ public class JobLevelCalculatorService {
|
|
|
|
|
|
|
|
//这里为什么用ID判断又用number判断。因为ID至始至终都没有变过(如管理序列会被转换为职能序列),number可能会被转换。
|
|
//这里为什么用ID判断又用number判断。因为ID至始至终都没有变过(如管理序列会被转换为职能序列),number可能会被转换。
|
|
|
// 换了序列
|
|
// 换了序列
|
|
|
- if (hrjobfamilyid != oldHRJobFamilyid) {
|
|
|
|
|
|
|
+ if (hrjobfamilyid != oldHRJobFamilyId) {
|
|
|
System.out.println("检查到有序列切换");
|
|
System.out.println("检查到有序列切换");
|
|
|
- //对应SHR:if (hrjobfamilynumber.equals(oldHRJobFamilynumber)) {;1214行
|
|
|
|
|
- if (hrjobfamilynumber.equals(oldHRJobFamilynumber)) {
|
|
|
|
|
|
|
+ //对应SHR:if (hrjobfamilynumber.equals(oldHRJobFamilyNumber)) {;1214行
|
|
|
|
|
+ if (hrjobfamilynumber.equals(oldHRJobFamilyNumber)) {
|
|
|
System.out.println("管理序列与职能序列之间切换,不做序列切换限制---pass");
|
|
System.out.println("管理序列与职能序列之间切换,不做序列切换限制---pass");
|
|
|
if (!usedAppraisalResult && jobLevelIndex >= currentJobLevelIndex + 1) {
|
|
if (!usedAppraisalResult && jobLevelIndex >= currentJobLevelIndex + 1) {
|
|
|
// 升级
|
|
// 升级
|
|
@@ -1549,14 +1577,14 @@ public class JobLevelCalculatorService {
|
|
|
if (StringUtils.isBlank(proTitleLevelNumber) && (StringUtils.isBlank(ocpQualLevelNumber) || !JobSeqEnum.SKILL.getCode().equals(jobSeqNumber))) {
|
|
if (StringUtils.isBlank(proTitleLevelNumber) && (StringUtils.isBlank(ocpQualLevelNumber) || !JobSeqEnum.SKILL.getCode().equals(jobSeqNumber))) {
|
|
|
return getLowestJobLevel(jobSeq);
|
|
return getLowestJobLevel(jobSeq);
|
|
|
}
|
|
}
|
|
|
- else if (JobSeqEnum.SKILL.getCode().equals(jobSeqNumber) && StringUtils.isBlank(ocpQualLevelNumber) && StringUtils.isNotBlank(proTitleLevelNumber) && TechPostLevelNumberTojobstatusNumberMap.get(proTitleLevelNumber) == null) {
|
|
|
|
|
|
|
+ else if (JobSeqEnum.SKILL.getCode().equals(jobSeqNumber) && StringUtils.isBlank(ocpQualLevelNumber) && StringUtils.isNotBlank(proTitleLevelNumber) && TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.get(proTitleLevelNumber) == null) {
|
|
|
return getLowestJobLevel(jobSeq);
|
|
return getLowestJobLevel(jobSeq);
|
|
|
}
|
|
}
|
|
|
String likename = "";
|
|
String likename = "";
|
|
|
String likenumber = "";
|
|
String likenumber = "";
|
|
|
if (JobSeqEnum.SKILL.getCode().equals(jobSeqNumber)) {
|
|
if (JobSeqEnum.SKILL.getCode().equals(jobSeqNumber)) {
|
|
|
if (StringUtils.isBlank(ocpQualLevelNumber)) {
|
|
if (StringUtils.isBlank(ocpQualLevelNumber)) {
|
|
|
- likenumber = TechPostLevelNumberTojobstatusNumberMap.get(proTitleLevelNumber);
|
|
|
|
|
|
|
+ likenumber = TECH_POST_LEVEL_TO_JOB_STATUS_LEVEL_MAP.get(proTitleLevelNumber);
|
|
|
likename = "职称等级【" + proTitleLevelNumber + "】对应的技能等级";
|
|
likename = "职称等级【" + proTitleLevelNumber + "】对应的技能等级";
|
|
|
System.out.println("技能序列但无技能等级,使用职称等级【" + proTitleLevelNumber + "】对应的技能等级,编码【" + likenumber + "】");
|
|
System.out.println("技能序列但无技能等级,使用职称等级【" + proTitleLevelNumber + "】对应的技能等级,编码【" + likenumber + "】");
|
|
|
}
|
|
}
|
|
@@ -1578,17 +1606,7 @@ public class JobLevelCalculatorService {
|
|
|
if(!jobLevels.isEmpty()){
|
|
if(!jobLevels.isEmpty()){
|
|
|
if(downgradeNum != null && downgradeNum > 0) {
|
|
if(downgradeNum != null && downgradeNum > 0) {
|
|
|
//降级
|
|
//降级
|
|
|
- DynamicObject[] jobLevelByJobSeq = getJobLevelByJobSeq(jobSeq);
|
|
|
|
|
- Map<Integer, DynamicObject> jobLevelMap = new HashMap<>();
|
|
|
|
|
- if (jobLevelByJobSeq != null) {
|
|
|
|
|
- String jobLevelSeqKey = FormConstant.JOBLEVELSEQ;
|
|
|
|
|
- jobLevelMap = Arrays.stream(jobLevelByJobSeq)
|
|
|
|
|
- .collect(Collectors.toMap(
|
|
|
|
|
- dynamicObject -> dynamicObject.getInt(jobLevelSeqKey),
|
|
|
|
|
- dynamicObject -> dynamicObject,
|
|
|
|
|
- (existing, replacement) -> existing)
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Map<Integer, DynamicObject> jobLevelMap = getJobLevelByJobSeqMap(jobSeq);
|
|
|
//当前分数能达到的最大职级减去需降级数
|
|
//当前分数能达到的最大职级减去需降级数
|
|
|
int maxJobLevelSeq = jobLevels.get(0).getInt(FormConstant.JOBLEVELSEQ);
|
|
int maxJobLevelSeq = jobLevels.get(0).getInt(FormConstant.JOBLEVELSEQ);
|
|
|
DynamicObject jobLevel = jobLevelMap.get(maxJobLevelSeq - downgradeNum);
|
|
DynamicObject jobLevel = jobLevelMap.get(maxJobLevelSeq - downgradeNum);
|
|
@@ -1606,6 +1624,28 @@ public class JobLevelCalculatorService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取职位序列对应的职级
|
|
|
|
|
+ * @param jobSeq 职位序列
|
|
|
|
|
+ * @return: Map<Integer, DynamicObject>;key:职级序列,value:职级对象
|
|
|
|
|
+ * @author W.Y.C
|
|
|
|
|
+ * @date: 2025/09/20 16:52
|
|
|
|
|
+ */
|
|
|
|
|
+ public static Map<Integer, DynamicObject> getJobLevelByJobSeqMap(DynamicObject jobSeq) {
|
|
|
|
|
+ DynamicObject[] jobLevelByJobSeq = getJobLevelByJobSeq(jobSeq);
|
|
|
|
|
+ Map<Integer, DynamicObject> jobLevelMap = new HashMap<>();
|
|
|
|
|
+ if (jobLevelByJobSeq != null) {
|
|
|
|
|
+ String jobLevelSeqKey = FormConstant.JOBLEVELSEQ;
|
|
|
|
|
+ jobLevelMap = Arrays.stream(jobLevelByJobSeq)
|
|
|
|
|
+ .collect(Collectors.toMap(
|
|
|
|
|
+ dynamicObject -> dynamicObject.getInt(jobLevelSeqKey),
|
|
|
|
|
+ dynamicObject -> dynamicObject,
|
|
|
|
|
+ (existing, replacement) -> existing)
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ return jobLevelMap;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 获取职位序列对应的职级
|
|
* 获取职位序列对应的职级
|
|
|
* @param jobSeq 职位序列
|
|
* @param jobSeq 职位序列
|
|
@@ -1739,6 +1779,9 @@ public class JobLevelCalculatorService {
|
|
|
public BigDecimal diplomaScore;
|
|
public BigDecimal diplomaScore;
|
|
|
/** 计算后的得分 */
|
|
/** 计算后的得分 */
|
|
|
public BigDecimal allSumScore;
|
|
public BigDecimal allSumScore;
|
|
|
|
|
+
|
|
|
|
|
+ /** 学历得分说明 */
|
|
|
|
|
+ Map<String, String> whyDiplomaScore = new LinkedHashMap<>();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static class RankingResultInfo {
|
|
public static class RankingResultInfo {
|