Commit 8167ed84 authored by 廖旭伟's avatar 廖旭伟

绩效分数计算规则调整

parent 14453f52
......@@ -11,42 +11,42 @@ import java.math.BigDecimal;
public class WeightPdu {
private static BigDecimal NUMBER_100 = new BigDecimal(100);
/**
* 自评权重
* 自评权重 百分比
*/
private Integer selfWeight=20;
private Integer selfWeight = 15;
/**
* 考勤权重
*/
private Integer attendWeight=20;
private Integer attendWeight = 30;
/**
* 效能权重
*/
private Integer effectWeight=20;
private Integer effectWeight = 30;
/**
* 办件权重
*/
private Integer goworkWeight=20;
private Integer goworkWeight = 5;
/**
* 群众评议分数默认为20分,不计算权重
*/
private Integer reviewWeight=20;
private Integer reviewWeight = 20;
public BigDecimal selfWeight(){
return new BigDecimal(this.selfWeight).divide(NUMBER_100);
}
public BigDecimal attendWeight(){
return new BigDecimal(this.attendWeight).divide(NUMBER_100);
return new BigDecimal(this.attendWeight);
}
public BigDecimal effectWeight(){
return new BigDecimal(this.effectWeight).divide(NUMBER_100);
return new BigDecimal(this.effectWeight);
}
public BigDecimal goworkWeight(){
return new BigDecimal(this.goworkWeight).divide(NUMBER_100);
return new BigDecimal(this.goworkWeight);
}
public BigDecimal reviewWeight(){
return new BigDecimal(this.reviewWeight);
......
......@@ -12,36 +12,33 @@ import java.math.BigDecimal;
public class StaffPerformUtil {
/** 群众评议总分 **/
public static BigDecimal REVIEW_SCORE = new BigDecimal(20);
//public static BigDecimal REVIEW_SCORE = new BigDecimal(20);
public static BigDecimal SCORE100 = new BigDecimal(100);
public static void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu, StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = REVIEW_SCORE.add(staffPerformSummaryEntity.getReviewScore()); //评价分数默认20分扣完为止
BigDecimal reviewScore = weightPdu.reviewWeight().add(staffPerformSummaryEntity.getReviewScore()); //评价分数默认20分扣完为止
if(reviewScore.compareTo(BigDecimal.ZERO)< 0){
reviewScore = BigDecimal.ZERO;
}
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
BigDecimal attendScore = weightPdu.attendWeight().add(staffPerformSummaryEntity.getAttendScore()); //考勤
if(attendScore.compareTo(BigDecimal.ZERO)< 0){
attendScore = BigDecimal.ZERO;
}
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //其他绩效加分项
// if(otherScore.compareTo(BigDecimal.ZERO)==0){
// otherScore = new BigDecimal(100);
// }
// otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
BigDecimal goworkScore = weightPdu.goworkWeight().add(staffPerformSummaryEntity.getGoworkScore()); //办件
if(goworkScore.compareTo(BigDecimal.ZERO)< 0){
goworkScore = BigDecimal.ZERO;
}
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
BigDecimal effectScore = weightPdu.effectWeight().add(staffPerformSummaryEntity.getEffectScore()); //效能
if(effectScore.compareTo(BigDecimal.ZERO)< 0){
effectScore = BigDecimal.ZERO;
}
effectScore = effectScore.multiply(weightPdu.effectWeight());
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
if(complainScore.compareTo(BigDecimal.ZERO)==0){
complainScore = SCORE100;
......
......@@ -247,9 +247,9 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
BigDecimal reviewScore = StaffPerformUtil.REVIEW_SCORE.add(vo.getSumScore());
BigDecimal reviewScore = weightPdu.reviewWeight().add(vo.getSumScore());
if(reviewScore.compareTo(BigDecimal.ZERO)< 0){
staffPerformSummaryEntity.setReviewScore(StaffPerformUtil.REVIEW_SCORE);
staffPerformSummaryEntity.setReviewScore(weightPdu.reviewWeight());
}else {
staffPerformSummaryEntity.setReviewScore(vo.getSumScore());
}
......
......@@ -246,9 +246,9 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
BigDecimal reviewScore = StaffPerformUtil.REVIEW_SCORE.add(vo.getSumScore());
BigDecimal reviewScore = weightPdu.reviewWeight().add(vo.getSumScore());
if(reviewScore.compareTo(BigDecimal.ZERO)< 0){
staffPerformSummaryEntity.setReviewScore(StaffPerformUtil.REVIEW_SCORE);
staffPerformSummaryEntity.setReviewScore(weightPdu.reviewWeight());
}else {
staffPerformSummaryEntity.setReviewScore(vo.getSumScore());
}
......
......@@ -77,17 +77,16 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = StaffPerformUtil.REVIEW_SCORE.add(staffPerformSummaryEntity.getReviewScore()); //评价
BigDecimal reviewScore = weightPdu.reviewWeight().add(staffPerformSummaryEntity.getReviewScore()); //评价
if(reviewScore.compareTo(BigDecimal.ZERO)<0){
reviewScore = BigDecimal.ZERO;
}
staffPerformSummaryEntity.setReviewScore(reviewScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
BigDecimal attendScore = weightPdu.attendWeight().add(staffPerformSummaryEntity.getAttendScore()); //考勤
if(attendScore.compareTo(BigDecimal.ZERO)<0){
attendScore = BigDecimal.ZERO;
}
attendScore = attendScore.multiply(weightPdu.attendWeight());
staffPerformSummaryEntity.setAttendScore(attendScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
if(complainScore.compareTo(BigDecimal.ZERO)==0){
......@@ -95,17 +94,15 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf
}
complainScore = complainScore.multiply(weightPdu.selfWeight());
staffPerformSummaryEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
BigDecimal goworkScore = weightPdu.goworkWeight().add(staffPerformSummaryEntity.getGoworkScore()); //办件
if(goworkScore.compareTo(BigDecimal.ZERO)<0){
goworkScore = BigDecimal.ZERO;
}
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
staffPerformSummaryEntity.setGoworkScore(goworkScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
BigDecimal effectScore = weightPdu.effectWeight().add(staffPerformSummaryEntity.getEffectScore()); //效能
if(effectScore.compareTo(BigDecimal.ZERO)<0){
effectScore = BigDecimal.ZERO;
}
effectScore = effectScore.multiply(weightPdu.effectWeight());
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