|
|
@@ -303,7 +303,7 @@ public class PersonnelMonthlyAssessmentServiceImpl implements IPersonnelMonthlyA
|
|
303
|
303
|
}
|
|
304
|
304
|
redLineDeductionMap.put(managerId, calculateRedLineDeduction(totalRedLineCount));
|
|
305
|
305
|
|
|
306
|
|
- // 判断是否为经理(workArea为空或null表示经理,有值表示副经理)
|
|
|
306
|
+ // 判断是否为经理
|
|
307
|
307
|
boolean isManager = (manager.getArea() == null || manager.getArea().isEmpty());
|
|
308
|
308
|
|
|
309
|
309
|
if (isManager) {
|
|
|
@@ -537,7 +537,7 @@ public class PersonnelMonthlyAssessmentServiceImpl implements IPersonnelMonthlyA
|
|
537
|
537
|
|
|
538
|
538
|
/**
|
|
539
|
539
|
* 计算违规排名扣分
|
|
540
|
|
- * 末位扣3分,倒数第二扣2分,倒数第三扣1分
|
|
|
540
|
+ * 扣分最多的扣3分,第二多扣2分,第三多扣1分
|
|
541
|
541
|
*
|
|
542
|
542
|
* @param teamDeductionMap 经理ID -> 团队扣分总额的映射
|
|
543
|
543
|
* @return 经理ID -> 扣分的映射
|
|
|
@@ -549,21 +549,21 @@ public class PersonnelMonthlyAssessmentServiceImpl implements IPersonnelMonthlyA
|
|
549
|
549
|
return deductionMap;
|
|
550
|
550
|
}
|
|
551
|
551
|
|
|
552
|
|
- // 按扣分总额从高到低排序
|
|
|
552
|
+ // 按扣分总额从高到低排序,如果扣分相同则按经理ID从小到大排序
|
|
553
|
553
|
List<Map.Entry<Long, BigDecimal>> sortedList = new ArrayList<>(teamDeductionMap.entrySet());
|
|
554
|
554
|
sortedList.sort((e1, e2) -> e2.getValue().compareTo(e1.getValue()));
|
|
555
|
555
|
|
|
556
|
556
|
int size = sortedList.size();
|
|
557
|
557
|
if (size >= 3) {
|
|
558
|
|
- // 末位(扣分最少)扣3分
|
|
559
|
|
- deductionMap.put(sortedList.get(size - 1).getKey(), 3);
|
|
560
|
|
- // 倒数第二扣2分
|
|
561
|
|
- deductionMap.put(sortedList.get(size - 2).getKey(), 2);
|
|
562
|
|
- // 倒数第三扣1分
|
|
563
|
|
- deductionMap.put(sortedList.get(size - 3).getKey(), 1);
|
|
|
558
|
+ // 扣分最多的扣3分
|
|
|
559
|
+ deductionMap.put(sortedList.get(0).getKey(), 3);
|
|
|
560
|
+ // 扣分第二多的扣2分
|
|
|
561
|
+ deductionMap.put(sortedList.get(1).getKey(), 2);
|
|
|
562
|
+ // 扣分第三多的扣1分
|
|
|
563
|
+ deductionMap.put(sortedList.get(2).getKey(), 1);
|
|
564
|
564
|
} else if (size == 2) {
|
|
565
|
|
- deductionMap.put(sortedList.get(1).getKey(), 3);
|
|
566
|
|
- deductionMap.put(sortedList.get(0).getKey(), 2);
|
|
|
565
|
+ deductionMap.put(sortedList.get(0).getKey(), 3);
|
|
|
566
|
+ deductionMap.put(sortedList.get(1).getKey(), 2);
|
|
567
|
567
|
} else if (size == 1) {
|
|
568
|
568
|
deductionMap.put(sortedList.get(0).getKey(), 3);
|
|
569
|
569
|
}
|