Commit 9047982f authored by 廖旭伟's avatar 廖旭伟

绩效汇总扣分项避免扣为负数

parent 4ab939e9
...@@ -23,6 +23,9 @@ public class StaffPerformUtil { ...@@ -23,6 +23,9 @@ public class StaffPerformUtil {
reviewScore = BigDecimal.ZERO; reviewScore = BigDecimal.ZERO;
} }
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤 BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
if(attendScore.compareTo(BigDecimal.ZERO)< 0){
attendScore = BigDecimal.ZERO;
}
attendScore = attendScore.multiply(weightPdu.attendWeight()); attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //其他绩效加分项 BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //其他绩效加分项
// if(otherScore.compareTo(BigDecimal.ZERO)==0){ // if(otherScore.compareTo(BigDecimal.ZERO)==0){
...@@ -30,8 +33,14 @@ public class StaffPerformUtil { ...@@ -30,8 +33,14 @@ public class StaffPerformUtil {
// } // }
// otherScore = otherScore.multiply(weightPdu.selfWeight()); // otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件 BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
if(goworkScore.compareTo(BigDecimal.ZERO)< 0){
goworkScore = BigDecimal.ZERO;
}
goworkScore = goworkScore.multiply(weightPdu.goworkWeight()); goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能 BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
if(effectScore.compareTo(BigDecimal.ZERO)< 0){
effectScore = BigDecimal.ZERO;
}
effectScore = effectScore.multiply(weightPdu.effectWeight()); effectScore = effectScore.multiply(weightPdu.effectWeight());
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100 BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
if(complainScore.compareTo(BigDecimal.ZERO)==0){ if(complainScore.compareTo(BigDecimal.ZERO)==0){
......
...@@ -84,6 +84,9 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf ...@@ -84,6 +84,9 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf
} }
staffPerformSummaryEntity.setReviewScore(reviewScore.setScale(2,BigDecimal.ROUND_DOWN)); staffPerformSummaryEntity.setReviewScore(reviewScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤 BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
if(attendScore.compareTo(BigDecimal.ZERO)<0){
attendScore = BigDecimal.ZERO;
}
attendScore = attendScore.multiply(weightPdu.attendWeight()); attendScore = attendScore.multiply(weightPdu.attendWeight());
staffPerformSummaryEntity.setAttendScore(attendScore.setScale(2,BigDecimal.ROUND_DOWN)); staffPerformSummaryEntity.setAttendScore(attendScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100 BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
...@@ -93,9 +96,15 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf ...@@ -93,9 +96,15 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf
complainScore = complainScore.multiply(weightPdu.selfWeight()); complainScore = complainScore.multiply(weightPdu.selfWeight());
staffPerformSummaryEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN)); staffPerformSummaryEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件 BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
if(goworkScore.compareTo(BigDecimal.ZERO)<0){
goworkScore = BigDecimal.ZERO;
}
goworkScore = goworkScore.multiply(weightPdu.goworkWeight()); goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
staffPerformSummaryEntity.setGoworkScore(goworkScore.setScale(2,BigDecimal.ROUND_DOWN)); staffPerformSummaryEntity.setGoworkScore(goworkScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能 BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
if(effectScore.compareTo(BigDecimal.ZERO)<0){
effectScore = BigDecimal.ZERO;
}
effectScore = effectScore.multiply(weightPdu.effectWeight()); effectScore = effectScore.multiply(weightPdu.effectWeight());
staffPerformSummaryEntity.setEffectScore(effectScore.setScale(2,BigDecimal.ROUND_DOWN)); staffPerformSummaryEntity.setEffectScore(effectScore.setScale(2,BigDecimal.ROUND_DOWN));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment