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

绩效分数计算规则调整

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