|
@@ -200,15 +200,15 @@ public class JobLevelCalculatorService {
|
|
}
|
|
}
|
|
|
|
|
|
// 15. 获取最近一次聘任信息
|
|
// 15. 获取最近一次聘任信息
|
|
- //对应SHR:PR_lastjobgradeindex;1139~1147行
|
|
|
|
- int PR_lastjobgradeindex = getLastAppointmentJobGradeIndex(personId, currentJobLevelIndex,jobLevelIndex);
|
|
|
|
- if (jobLevelIndex - PR_lastjobgradeindex > 1) {
|
|
|
|
- jobLevelIndex = PR_lastjobgradeindex + 1;
|
|
|
|
|
|
+ //对应SHR:lastAppointmentJobGradeIndex;1139~1147行
|
|
|
|
+ int lastAppointmentJobGradeIndex = getLastAppointmentJobGradeIndex(personId, currentJobLevelIndex,jobLevelIndex);
|
|
|
|
+ if (jobLevelIndex - lastAppointmentJobGradeIndex > 1) {
|
|
|
|
+ jobLevelIndex = lastAppointmentJobGradeIndex + 1;
|
|
}
|
|
}
|
|
|
|
|
|
// 16. 根据考核结果使用情况处理职级计算
|
|
// 16. 根据考核结果使用情况处理职级计算
|
|
//对应SHR行:1149~1180行
|
|
//对应SHR行:1149~1180行
|
|
- jobLevelIndex = handleAppraisalUsage(jobSeq,rankingInfo,jobLevelIndex,PR_lastjobgradeindex,currentJobLevelIndex,minusPersonAppraisal,firstPR,usedAppraisalResult,jobLevelResult);
|
|
|
|
|
|
+ jobLevelIndex = handleAppraisalUsage(jobSeq,rankingInfo,jobLevelIndex,lastAppointmentJobGradeIndex,currentJobLevelIndex,minusPersonAppraisal,firstPR,usedAppraisalResult,jobLevelResult);
|
|
|
|
|
|
// 17. 处理首次聘任情况 & 处理聘任相关限制
|
|
// 17. 处理首次聘任情况 & 处理聘任相关限制
|
|
//对应SHR:1182~1295行
|
|
//对应SHR:1182~1295行
|
|
@@ -1063,31 +1063,31 @@ public class JobLevelCalculatorService {
|
|
|
|
|
|
if (currentJobLevelIndex > 9) {
|
|
if (currentJobLevelIndex > 9) {
|
|
// 职级>9:前60%升职,后5%降职
|
|
// 职级>9:前60%升职,后5%降职
|
|
- if (allowanceRank <= SelMAXallowancerank(60,countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(60,countR)) {
|
|
// selMap.put("allowanceranksel", "前60%");
|
|
// selMap.put("allowanceranksel", "前60%");
|
|
jobLevelIndex++;
|
|
jobLevelIndex++;
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(5,countR) && SelMinallowancerank(5,countR) > 0) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(5,countR) && selMinAllowanceRank(5,countR) > 0) {
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
jobLevelIndex--;
|
|
jobLevelIndex--;
|
|
}
|
|
}
|
|
} else if (currentJobLevelIndex > 5 && currentJobLevelIndex <= 9) {
|
|
} else if (currentJobLevelIndex > 5 && currentJobLevelIndex <= 9) {
|
|
// 职级5-9:前70%升职,后5%降职
|
|
// 职级5-9:前70%升职,后5%降职
|
|
- if (allowanceRank <= SelMAXallowancerank(70,countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(70,countR)) {
|
|
// selMap.put("allowanceranksel", "前70%");
|
|
// selMap.put("allowanceranksel", "前70%");
|
|
jobLevelIndex++;
|
|
jobLevelIndex++;
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(5,countR) && SelMinallowancerank(5,countR) > 0) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(5,countR) && selMinAllowanceRank(5,countR) > 0) {
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
jobLevelIndex--;
|
|
jobLevelIndex--;
|
|
}
|
|
}
|
|
}else if (currentJobLevelIndex <= 5) {
|
|
}else if (currentJobLevelIndex <= 5) {
|
|
// 职级≤5:前80%升职,后3%降职
|
|
// 职级≤5:前80%升职,后3%降职
|
|
- if (allowanceRank <= SelMAXallowancerank(80,countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(80,countR)) {
|
|
// selMap.put("allowanceranksel", "前80%");
|
|
// selMap.put("allowanceranksel", "前80%");
|
|
jobLevelIndex++;
|
|
jobLevelIndex++;
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(3,countR) && SelMinallowancerank(3,countR) > 0) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(3,countR) && selMinAllowanceRank(3,countR) > 0) {
|
|
// selMap.put("allowanceranksel", "后3%");
|
|
// selMap.put("allowanceranksel", "后3%");
|
|
jobLevelIndex--;
|
|
jobLevelIndex--;
|
|
}
|
|
}
|
|
@@ -1096,31 +1096,31 @@ public class JobLevelCalculatorService {
|
|
// 技能序列:
|
|
// 技能序列:
|
|
if (currentJobLevelIndex > 8) {
|
|
if (currentJobLevelIndex > 8) {
|
|
//职级>8:前60%升职,后5%降职
|
|
//职级>8:前60%升职,后5%降职
|
|
- if (allowanceRank <= SelMAXallowancerank(60,countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(60,countR)) {
|
|
// selMap.put("allowanceranksel", "前60%");
|
|
// selMap.put("allowanceranksel", "前60%");
|
|
jobLevelIndex++;
|
|
jobLevelIndex++;
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(5,countR) && SelMinallowancerank(5,countR) > 0) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(5,countR) && selMinAllowanceRank(5,countR) > 0) {
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
jobLevelIndex--;
|
|
jobLevelIndex--;
|
|
}
|
|
}
|
|
}else if (currentJobLevelIndex > 4 && currentJobLevelIndex <= 8) {
|
|
}else if (currentJobLevelIndex > 4 && currentJobLevelIndex <= 8) {
|
|
// 职级4-8:前70%升职,后5%降职
|
|
// 职级4-8:前70%升职,后5%降职
|
|
- if (allowanceRank <= SelMAXallowancerank(70,countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(70,countR)) {
|
|
// selMap.put("allowanceranksel", "前70%");
|
|
// selMap.put("allowanceranksel", "前70%");
|
|
jobLevelIndex++;
|
|
jobLevelIndex++;
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(5,countR) && SelMinallowancerank(5,countR) > 0) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(5,countR) && selMinAllowanceRank(5,countR) > 0) {
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
// selMap.put("allowanceranksel", "后5%");
|
|
jobLevelIndex--;
|
|
jobLevelIndex--;
|
|
}
|
|
}
|
|
} else if (currentJobLevelIndex <= 4) {
|
|
} else if (currentJobLevelIndex <= 4) {
|
|
// 职级≤4:前80%升职,后3%降职
|
|
// 职级≤4:前80%升职,后3%降职
|
|
- if (allowanceRank <= SelMAXallowancerank(80,countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(80,countR)) {
|
|
// selMap.put("allowanceranksel", "前80%");
|
|
// selMap.put("allowanceranksel", "前80%");
|
|
jobLevelIndex++;
|
|
jobLevelIndex++;
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(3,countR) && SelMinallowancerank(3,countR) > 0) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(3,countR) && selMinAllowanceRank(3,countR) > 0) {
|
|
// selMap.put("allowanceranksel", "后3%");
|
|
// selMap.put("allowanceranksel", "后3%");
|
|
jobLevelIndex--;
|
|
jobLevelIndex--;
|
|
}
|
|
}
|
|
@@ -1132,40 +1132,40 @@ public class JobLevelCalculatorService {
|
|
jobLevelIndex = currentJobLevelIndex + 1;
|
|
jobLevelIndex = currentJobLevelIndex + 1;
|
|
}
|
|
}
|
|
|
|
|
|
- if (allowanceRank <= SelMAXallowancerank(60, countR)) {
|
|
|
|
|
|
+ if (allowanceRank <= selMaxAllowanceRank(60, countR)) {
|
|
rankingResult.allowanceRankSel = "前60%";
|
|
rankingResult.allowanceRankSel = "前60%";
|
|
}
|
|
}
|
|
- else if (allowanceRank <= SelMAXallowancerank(70, countR)) {
|
|
|
|
|
|
+ else if (allowanceRank <= selMaxAllowanceRank(70, countR)) {
|
|
rankingResult.allowanceRankSel = "前60-70%";
|
|
rankingResult.allowanceRankSel = "前60-70%";
|
|
}
|
|
}
|
|
- else if (allowanceRank <= SelMAXallowancerank(80, countR)) {
|
|
|
|
|
|
+ else if (allowanceRank <= selMaxAllowanceRank(80, countR)) {
|
|
rankingResult.allowanceRankSel = "前70-80%";
|
|
rankingResult.allowanceRankSel = "前70-80%";
|
|
}
|
|
}
|
|
- else if (allowanceRank <= SelMAXallowancerank(95, countR)) {
|
|
|
|
|
|
+ else if (allowanceRank <= selMaxAllowanceRank(95, countR)) {
|
|
rankingResult.allowanceRankSel = "前80-95%";
|
|
rankingResult.allowanceRankSel = "前80-95%";
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(3, countR)) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(3, countR)) {
|
|
rankingResult.allowanceRankSel = "后3%";
|
|
rankingResult.allowanceRankSel = "后3%";
|
|
}
|
|
}
|
|
- else if (allowanceRank >= SelMinallowancerank(5, countR)) {
|
|
|
|
|
|
+ else if (allowanceRank >= selMinAllowanceRank(5, countR)) {
|
|
rankingResult.allowanceRankSel = "后5%";
|
|
rankingResult.allowanceRankSel = "后5%";
|
|
}
|
|
}
|
|
return jobLevelIndex;
|
|
return jobLevelIndex;
|
|
}
|
|
}
|
|
|
|
|
|
- public static int SelMAXallowancerank(int percent, int countallowancerank) {
|
|
|
|
- int MAXallowancerank = 0;
|
|
|
|
- double MAXallowancerankDouble = Double.parseDouble(countallowancerank + "") / 100.0 * Double.parseDouble(percent + "");
|
|
|
|
- MAXallowancerank = (int) Math.round(MAXallowancerankDouble);
|
|
|
|
- return MAXallowancerank;
|
|
|
|
|
|
+ public static int selMaxAllowanceRank(int percent, int countallowancerank) {
|
|
|
|
+ int maxAllowanceRank = 0;
|
|
|
|
+ double maxAllowancerRankDouble = Double.parseDouble(countallowancerank + "") / 100.0 * Double.parseDouble(percent + "");
|
|
|
|
+ maxAllowanceRank = (int) Math.round(maxAllowancerRankDouble);
|
|
|
|
+ return maxAllowanceRank;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public static int SelMinallowancerank(int percent, int countallowancerank) {
|
|
|
|
- int Minallowancerank = 0;
|
|
|
|
- double MinallowancerankDouble = Double.parseDouble(countallowancerank + "") / 100.0 * Double.parseDouble(percent + "");
|
|
|
|
- Minallowancerank = countallowancerank - ((int) Math.round(MinallowancerankDouble));
|
|
|
|
- return Minallowancerank;
|
|
|
|
|
|
+ public static int selMinAllowanceRank(int percent, int countallowancerank) {
|
|
|
|
+ int minAllowanceRank = 0;
|
|
|
|
+ double minAllowanceRankDouble = Double.parseDouble(countallowancerank + "") / 100.0 * Double.parseDouble(percent + "");
|
|
|
|
+ minAllowanceRank = countallowancerank - ((int) Math.round(minAllowanceRankDouble));
|
|
|
|
+ return minAllowanceRank;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1196,8 +1196,8 @@ public class JobLevelCalculatorService {
|
|
DynamicObjectCollection query = QueryServiceHelper.query(PositionStructureConstant.PERSONPOSFILE_ENTITYID, selectFields.toString(), new QFilter[]{filer}, "nckd_executeyear desc,nckd_begindate desc");
|
|
DynamicObjectCollection query = QueryServiceHelper.query(PositionStructureConstant.PERSONPOSFILE_ENTITYID, selectFields.toString(), new QFilter[]{filer}, "nckd_executeyear desc,nckd_begindate desc");
|
|
if(!query.isEmpty()){
|
|
if(!query.isEmpty()){
|
|
DynamicObject personPosFile = query.get(0);
|
|
DynamicObject personPosFile = query.get(0);
|
|
- int PR_lastjobgradeindex = personPosFile.getInt(String.join(".", PositionStructureConstant.NCKD_JOBLEVELHR, FormConstant.JOBLEVELSEQ));
|
|
|
|
- return PR_lastjobgradeindex;
|
|
|
|
|
|
+ int lastAppointmentJobGradeIndex = personPosFile.getInt(String.join(".", PositionStructureConstant.NCKD_JOBLEVELHR, FormConstant.JOBLEVELSEQ));
|
|
|
|
+ return lastAppointmentJobGradeIndex;
|
|
}
|
|
}
|
|
return currentJobLevelIndex;
|
|
return currentJobLevelIndex;
|
|
}
|
|
}
|
|
@@ -1206,13 +1206,13 @@ public class JobLevelCalculatorService {
|
|
* 根据考核结果使用情况处理职级计算
|
|
* 根据考核结果使用情况处理职级计算
|
|
*/
|
|
*/
|
|
private static int handleAppraisalUsage(DynamicObject jobSeq, RankingResult rankingResult, int jobLevelIndex,
|
|
private static int handleAppraisalUsage(DynamicObject jobSeq, RankingResult rankingResult, int jobLevelIndex,
|
|
- int PR_lastjobgradeindex, 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 = PR_lastjobgradeindex;
|
|
|
|
|
|
+ jobLevelIndex = lastAppointmentJobGradeIndex;
|
|
}
|
|
}
|
|
if (fistPR && ((rankingResult.countR == null || rankingResult.countR == 0) || (rankingResult.allowanceRank == null || rankingResult.allowanceRank == 0))) {
|
|
if (fistPR && ((rankingResult.countR == null || rankingResult.countR == 0) || (rankingResult.allowanceRank == null || rankingResult.allowanceRank == 0))) {
|
|
System.out.println("首次聘任而且无R排名,保持分数算出来的职级");
|
|
System.out.println("首次聘任而且无R排名,保持分数算出来的职级");
|
|
@@ -1221,12 +1221,12 @@ public class JobLevelCalculatorService {
|
|
jobLevelIndex = getnewjobgradeindexByrank(jobLevelIndex, currentJobLevelIndex, rankingResult, jobSeq);
|
|
jobLevelIndex = getnewjobgradeindexByrank(jobLevelIndex, currentJobLevelIndex, rankingResult, jobSeq);
|
|
}
|
|
}
|
|
System.out.println("newjobgradeindex:::" + jobLevelIndex);
|
|
System.out.println("newjobgradeindex:::" + jobLevelIndex);
|
|
- System.out.println("PR_lastjobgradeindex:::" + PR_lastjobgradeindex);
|
|
|
|
- if (currentJobLevelIndex > 1 && jobLevelIndex - PR_lastjobgradeindex == 1) {
|
|
|
|
|
|
+ System.out.println("PR_lastjobgradeindex:::" + lastAppointmentJobGradeIndex);
|
|
|
|
+ if (currentJobLevelIndex > 1 && jobLevelIndex - lastAppointmentJobGradeIndex == 1) {
|
|
// R排名升级
|
|
// R排名升级
|
|
jobLevelResult.adjustType = "2";
|
|
jobLevelResult.adjustType = "2";
|
|
System.out.println("R排名升级");
|
|
System.out.println("R排名升级");
|
|
- } else if (jobLevelIndex == PR_lastjobgradeindex) {
|
|
|
|
|
|
+ } else if (jobLevelIndex == lastAppointmentJobGradeIndex) {
|
|
// 保级
|
|
// 保级
|
|
jobLevelResult.adjustType = "1";
|
|
jobLevelResult.adjustType = "1";
|
|
System.out.println("R排名保级");
|
|
System.out.println("R排名保级");
|
|
@@ -1388,14 +1388,14 @@ public class JobLevelCalculatorService {
|
|
/*String Maxjobgradeindexstr = personpositionfileUtils.getMaxJobLevel(ctx, jobFamilyInfo.processedJobFamilyNumber,
|
|
/*String Maxjobgradeindexstr = personpositionfileUtils.getMaxJobLevel(ctx, jobFamilyInfo.processedJobFamilyNumber,
|
|
jobScoreInfo.zgjbnumber, jobScoreInfo.zyjndjnumber);*/
|
|
jobScoreInfo.zgjbnumber, jobScoreInfo.zyjndjnumber);*/
|
|
DynamicObject maxJobLevel1 = getMaxJobLevel(jobSeq, jobScoreInfo.perProTitleNumber, jobScoreInfo.quaLevelNumber);
|
|
DynamicObject maxJobLevel1 = getMaxJobLevel(jobSeq, jobScoreInfo.perProTitleNumber, jobScoreInfo.quaLevelNumber);
|
|
- int Maxjobgradeindex = maxJobLevel1.getInt(String.join(".",FormConstant.HBJM_JOBLEVELHR, FormConstant.JOBLEVELSEQ));
|
|
|
|
|
|
+ int maxJobGradeIndex = maxJobLevel1.getInt(String.join(".",FormConstant.HBJM_JOBLEVELHR, FormConstant.JOBLEVELSEQ));
|
|
// 职级超出职称等级或技能等级能任命最高职职级则该最高职级就是要任命的职级
|
|
// 职级超出职称等级或技能等级能任命最高职职级则该最高职级就是要任命的职级
|
|
- if (jobLevelIndex > Maxjobgradeindex) {
|
|
|
|
|
|
+ if (jobLevelIndex > maxJobGradeIndex) {
|
|
if (StringUtils.isBlank(jobLevelResult.adjustType)) {
|
|
if (StringUtils.isBlank(jobLevelResult.adjustType)) {
|
|
// 聘任下调
|
|
// 聘任下调
|
|
jobLevelResult.adjustType = "5";
|
|
jobLevelResult.adjustType = "5";
|
|
}
|
|
}
|
|
- jobLevelIndex = Maxjobgradeindex;
|
|
|
|
|
|
+ jobLevelIndex = maxJobGradeIndex;
|
|
if (currentJobLevelIndex > 1 && jobLevelIndex - currentJobLevelIndex == 1) {
|
|
if (currentJobLevelIndex > 1 && jobLevelIndex - currentJobLevelIndex == 1) {
|
|
// R排名升级
|
|
// R排名升级
|
|
jobLevelResult.adjustType = "2";
|
|
jobLevelResult.adjustType = "2";
|