Commit df62252b4319678384906837cf4b5d5cc6d8150b
1 parent
f0617def
feature(*): 考评人员修复
考评人员修复
Showing
2 changed files
with
16 additions
and
14 deletions
fw-morax-service/src/main/java/cn/fw/morax/service/biz/CommonService.java
... | ... | @@ -1370,18 +1370,19 @@ public class CommonService { |
1370 | 1370 | * 离职配置对比,放最后,优先级最高,可覆盖前面的不考核情况 |
1371 | 1371 | * 仅 覆盖那种 '正式员工离职' 的,因为试用期员工本来就不考核绩效,没必要进行覆盖 |
1372 | 1372 | */ |
1373 | + //离职不考核: 转正员工,离职日期大于等于计算日期 | |
1373 | 1374 | LeaveStaffKpiSalaryConfigDTO config = reqDTO.getConfig(); |
1374 | 1375 | if (Objects.nonNull(config) |
1375 | 1376 | && StaffStatusEnum.REGULAR.getValue().equals(originStaffStatus) |
1376 | 1377 | && Objects.nonNull(staff.getStaffStatus()) |
1377 | 1378 | && Objects.nonNull(staff.getLeaveDate()) |
1378 | 1379 | && staff.getStaffStatus() == 9 |
1379 | - && reqDTO.getCurrentTime().compareTo(staff.getLeaveDate()) >= 0){ | |
1380 | + && calcDate.compareTo(staff.getLeaveDate()) >= 0){ | |
1380 | 1381 | if (staff.getLeaveDate().compareTo(config.getKpiRankThresholdLocalDate()) < 0){ |
1381 | 1382 | //离职离得早-不考核绩效-因为会拉低整个绩效组的考核情况 |
1382 | 1383 | ignoreCauseDTO.setIgnoreCauseEnum(KpiIgnoreCauseEnum.LEAVE_DATE_BEFORE_15); |
1383 | 1384 | //随便设置一个时间,占个位,怕那个地方取他报错,反正他也离职了,下个月不会有他的数据了 |
1384 | - ignoreCauseDTO.setStartKpiDate(reqDTO.getCurrentTime().with(TemporalAdjusters.lastDayOfMonth()).plusDays(1)); | |
1385 | + ignoreCauseDTO.setStartKpiDate(calcDate.with(TemporalAdjusters.lastDayOfMonth()).plusDays(1)); | |
1385 | 1386 | ignoreCauseDTO.setIgnoreCauseDesc(String.join("",config.getKpiRankThresholdLocalDate().getDayOfMonth()+"","号以前离职不计入绩效考核")); |
1386 | 1387 | ignoreCauseDTO.setIgnoreConfig(config.getKpiRankThresholdDay().toString()); |
1387 | 1388 | } |
... | ... | @@ -1412,7 +1413,7 @@ public class CommonService { |
1412 | 1413 | //当月太晚转正不纳入绩效考核(15号之后,不含15号转正,不纳入绩效考核)(不需要参与人员质量评测。转正保护期需要参与人员质量评测) |
1413 | 1414 | if (Boolean.TRUE.equals(regularMonthlyIgnoreKpi) && Boolean.TRUE.equals(curMonthRegular)) { |
1414 | 1415 | LocalDate newStartKpiDate = regularDate.plusMonths(1).with(TemporalAdjusters.firstDayOfMonth()); |
1415 | - if (this.checkNewStartKpiDateValid(ignoreCauseDTO.getStartKpiDate(), newStartKpiDate, reqDTO.getCurrentTime())) { | |
1416 | + if (this.checkNewStartKpiDateValid(ignoreCauseDTO.getStartKpiDate(), newStartKpiDate, calcDate)) { | |
1416 | 1417 | String regularDayStr = reqDTO.getRegularOneDicValue().stripTrailingZeros().toPlainString(); |
1417 | 1418 | ignoreCauseDTO.setIgnoreCauseEnum(KpiIgnoreCauseEnum.POSITIVE_AFTER_15); |
1418 | 1419 | ignoreCauseDTO.setStartKpiDate(newStartKpiDate); |
... | ... | @@ -1425,7 +1426,7 @@ public class CommonService { |
1425 | 1426 | if (Objects.nonNull(regularProtectionMonth) && regularProtectionMonth > 0){ |
1426 | 1427 | //有设定保护期,比如销售需要各种培训才能上岗需要保护加持 (当月转正不纳入绩效考核,保护期加一个月) |
1427 | 1428 | LocalDate newStartKpiDate = this.getNewStartKpiDate(regularDate, regularMonthlyIgnoreKpi, regularProtectionMonth); |
1428 | - if (this.checkNewStartKpiDateValid(ignoreCauseDTO.getStartKpiDate(), newStartKpiDate, reqDTO.getCurrentTime())) { | |
1429 | + if (this.checkNewStartKpiDateValid(ignoreCauseDTO.getStartKpiDate(), newStartKpiDate, calcDate)) { | |
1429 | 1430 | ignoreCauseDTO.setIgnoreCauseEnum(KpiIgnoreCauseEnum.TURN_POSITIVE_AFTER); |
1430 | 1431 | ignoreCauseDTO.setStartKpiDate(newStartKpiDate); |
1431 | 1432 | ignoreCauseDTO.setIgnoreConfig(regularProtectionMonth.toString()); |
... | ... | @@ -1451,7 +1452,7 @@ public class CommonService { |
1451 | 1452 | |
1452 | 1453 | //15号之前调岗 原岗位不计算绩效 新岗位计算绩效 |
1453 | 1454 | LocalDate changePostDate = this.getOldPostChangeDate(userId, staff.getPostId(), staff.getShopId()); |
1454 | - if (PublicUtil.isNotEmpty(changePostDate)) { | |
1455 | + if (PublicUtil.isNotEmpty(changePostDate) && calcDate.compareTo(changePostDate) >= 0) { | |
1455 | 1456 | LocalDate beforeTransferIgnoreKpiDate = kpiDictBizService.getTranspostLocalDate(reqDTO.getBeforeTransPostIgnoreKpi(), changePostDate); |
1456 | 1457 | if (changePostDate.isBefore(beforeTransferIgnoreKpiDate)) { |
1457 | 1458 | //这个岗位开始计算绩效时间,下个月1号 |
... | ... | @@ -1465,13 +1466,13 @@ public class CommonService { |
1465 | 1466 | } |
1466 | 1467 | |
1467 | 1468 | //15号之前调岗(不包含) 新岗位当月参与绩效考核,旧岗位当月不参与绩效考核 |
1468 | - LocalDate oldPostStartKpiDate = this.getOldPostStartKpiDate(userId, staff.getPostId(), staff.getShopId()); | |
1469 | - if (PublicUtil.isNotEmpty(oldPostStartKpiDate) && oldPostStartKpiDate.compareTo(calcDate) > 0) { | |
1470 | - ignoreCauseDTO.setIgnoreCauseEnum(KpiIgnoreCauseEnum.TRANSPOST_BEFORE_15); | |
1471 | - ignoreCauseDTO.setStartKpiDate(oldPostStartKpiDate); | |
1472 | - ignoreCauseDTO.setIgnoreCauseDesc(String.join("",reqDTO.getBeforeTransPostIgnoreKpi().intValue()+"","号之前调岗不计算绩效")); | |
1473 | - ignoreCauseDTO.setIgnoreConfig(reqDTO.getBeforeTransPostIgnoreKpi().stripTrailingZeros().toPlainString()); | |
1474 | - } | |
1469 | +// LocalDate oldPostStartKpiDate = this.getOldPostStartKpiDate(userId, staff.getPostId(), staff.getShopId()); | |
1470 | +// if (PublicUtil.isNotEmpty(oldPostStartKpiDate) && oldPostStartKpiDate.compareTo(calcDate) > 0) { | |
1471 | +// ignoreCauseDTO.setIgnoreCauseEnum(KpiIgnoreCauseEnum.TRANSPOST_BEFORE_15); | |
1472 | +// ignoreCauseDTO.setStartKpiDate(oldPostStartKpiDate); | |
1473 | +// ignoreCauseDTO.setIgnoreCauseDesc(String.join("",reqDTO.getBeforeTransPostIgnoreKpi().intValue()+"","号之前调岗不计算绩效")); | |
1474 | +// ignoreCauseDTO.setIgnoreConfig(reqDTO.getBeforeTransPostIgnoreKpi().stripTrailingZeros().toPlainString()); | |
1475 | +// } | |
1475 | 1476 | |
1476 | 1477 | //调岗保护期(15号之后调岗 优先)(非降级) |
1477 | 1478 | LocalDate newPostChangeDate = this.getStaffNonDemotionNewPostChangeDate(userId, staff.getPostId(), staff.getShopId()); |
... | ... | @@ -1481,7 +1482,7 @@ public class CommonService { |
1481 | 1482 | //当月调岗不纳入绩效考核,保护期加一个月 |
1482 | 1483 | Boolean addOneMonthTransPostProtection = PublicUtil.isNotEmpty(newPostStartKpiDate); |
1483 | 1484 | LocalDate newStartKpiDate = this.getNewStartKpiDate(newPostChangeDate, addOneMonthTransPostProtection, transPostProtectionMonth); |
1484 | - if (this.checkNewStartKpiDateValid(ignoreCauseDTO.getStartKpiDate(), newStartKpiDate, reqDTO.getCurrentTime())) { | |
1485 | + if (this.checkNewStartKpiDateValid(ignoreCauseDTO.getStartKpiDate(), newStartKpiDate, calcDate)) { | |
1485 | 1486 | ignoreCauseDTO.setIgnoreCauseEnum(KpiIgnoreCauseEnum.TURN_POSITIVE_POSITION); |
1486 | 1487 | ignoreCauseDTO.setStartKpiDate(newStartKpiDate); |
1487 | 1488 | ignoreCauseDTO.setIgnoreConfig(transPostProtectionMonth.toString()); |
... | ... | @@ -1550,6 +1551,7 @@ public class CommonService { |
1550 | 1551 | return ignoreCauseDTO; |
1551 | 1552 | } |
1552 | 1553 | |
1554 | + | |
1553 | 1555 | /** |
1554 | 1556 | * 当月申请参与绩效考核 |
1555 | 1557 | */ | ... | ... |
fw-morax-service/src/main/java/cn/fw/morax/service/biz/eval/EvalGroupUserBizService.java
... | ... | @@ -192,7 +192,7 @@ public class EvalGroupUserBizService { |
192 | 192 | public void handleStaffKpi(PerformanceStaffDTO staff, EvalGroupUser evalUser, IgnoreCauseReqDTO rejectCauseReq) { |
193 | 193 | try { |
194 | 194 | //获取忽略绩效理由 |
195 | - IgnoreCauseDTO ignoreCauseDTO = commonService.findIgnoreCauseDTO(staff, rejectCauseReq); | |
195 | + IgnoreCauseDTO ignoreCauseDTO = commonService.findStageIgnoreCauseDTO(staff, rejectCauseReq); | |
196 | 196 | |
197 | 197 | if (PublicUtil.isNotEmpty(ignoreCauseDTO.getIgnoreCauseEnum())) { |
198 | 198 | this.handleIgnoredKpiGroupUser(evalUser, ignoreCauseDTO); | ... | ... |