Commit 3629bc69 authored by 廖旭伟's avatar 廖旭伟

绩效汇总一张表分数修改需求功能

parent d13bd537
......@@ -44,7 +44,7 @@ public class StaffPerformUtil {
if(complainScore.compareTo(BigDecimal.ZERO)==0){
complainScore = SCORE100;
}
complainScore = complainScore.multiply(weightPdu.selfWeight());
complainScore = complainScore.multiply(weightPdu.selfWeight()).setScale(2, BigDecimal.ROUND_CEILING);
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
......@@ -114,11 +114,11 @@ public class StaffPerformUtil {
effectScore = BigDecimal.ZERO;
}
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
if(complainScore.compareTo(BigDecimal.ZERO)==0){
BigDecimal complainScore = weightPdu.selfWeight().multiply(StaffPerformUtil.SCORE100).setScale(2,BigDecimal.ROUND_DOWN).add(staffPerformSummaryEntity.getComplainScore()); //自评
if(complainScore.compareTo(BigDecimal.ZERO)< 0){
complainScore = SCORE100;
}
complainScore = complainScore.multiply(weightPdu.selfWeight());
//complainScore = complainScore.multiply(weightPdu.selfWeight()).setScale(2, BigDecimal.ROUND_CEILING);
BigDecimal summary = new BigDecimal(0);
summary = summary.add(reviewScore);
summary = summary.add(attendScore);
......
......@@ -112,34 +112,37 @@ public class StaffPerformSummaryEditServiceImpl extends AbstractCRUDServiceImpl<
}
}
private void computeSummary(StaffPerformSummaryEditEntity StaffPerformSummaryEditEntity, WeightPdu weightPdu){
private void computeSummary(StaffPerformSummaryEditEntity staffPerformSummaryEntity, WeightPdu weightPdu){
BigDecimal reviewScore = weightPdu.reviewWeight().add(StaffPerformSummaryEditEntity.getReviewScore()); //评价
BigDecimal reviewScore = weightPdu.reviewWeight().add(staffPerformSummaryEntity.getReviewScore()); //评价
if(reviewScore.compareTo(BigDecimal.ZERO)<0){
reviewScore = BigDecimal.ZERO;
}
StaffPerformSummaryEditEntity.setReviewScore(reviewScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal attendScore = weightPdu.attendWeight().add(StaffPerformSummaryEditEntity.getAttendScore()); //考勤
staffPerformSummaryEntity.setReviewScore(reviewScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal attendScore = weightPdu.attendWeight().add(staffPerformSummaryEntity.getAttendScore()); //考勤
if(attendScore.compareTo(BigDecimal.ZERO)<0){
attendScore = BigDecimal.ZERO;
}
StaffPerformSummaryEditEntity.setAttendScore(attendScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal complainScore = StaffPerformSummaryEditEntity.getComplainScore(); //自评不用加100
staffPerformSummaryEntity.setAttendScore(attendScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
if(complainScore.compareTo(BigDecimal.ZERO)==0){
complainScore = StaffPerformUtil.SCORE100;
complainScore = complainScore.multiply(weightPdu.selfWeight()).setScale(2,BigDecimal.ROUND_DOWN);
}else {
complainScore = weightPdu.selfWeight().multiply(StaffPerformUtil.SCORE100).setScale(2,BigDecimal.ROUND_DOWN).add(staffPerformSummaryEntity.getComplainScore());
}
complainScore = complainScore.multiply(weightPdu.selfWeight());
StaffPerformSummaryEditEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal goworkScore = weightPdu.goworkWeight().add(StaffPerformSummaryEditEntity.getGoworkScore()); //办件
staffPerformSummaryEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal goworkScore = weightPdu.goworkWeight().add(staffPerformSummaryEntity.getGoworkScore()); //办件
if(goworkScore.compareTo(BigDecimal.ZERO)<0){
goworkScore = BigDecimal.ZERO;
}
StaffPerformSummaryEditEntity.setGoworkScore(goworkScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal effectScore = weightPdu.effectWeight().add(StaffPerformSummaryEditEntity.getEffectScore()); //效能
staffPerformSummaryEntity.setGoworkScore(goworkScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal effectScore = weightPdu.effectWeight().add(staffPerformSummaryEntity.getEffectScore()); //效能
if(effectScore.compareTo(BigDecimal.ZERO)<0){
effectScore = BigDecimal.ZERO;
}
StaffPerformSummaryEditEntity.setEffectScore(effectScore.setScale(2,BigDecimal.ROUND_DOWN));
staffPerformSummaryEntity.setEffectScore(effectScore.setScale(2,BigDecimal.ROUND_DOWN));
}
......
......@@ -102,7 +102,7 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf
if(complainScore.compareTo(BigDecimal.ZERO)==0){
complainScore = StaffPerformUtil.SCORE100;
}
complainScore = complainScore.multiply(weightPdu.selfWeight());
complainScore = complainScore.multiply(weightPdu.selfWeight()).setScale(2,BigDecimal.ROUND_DOWN);
staffPerformSummaryEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal goworkScore = weightPdu.goworkWeight().add(staffPerformSummaryEntity.getGoworkScore()); //办件
if(goworkScore.compareTo(BigDecimal.ZERO)<0){
......
......@@ -105,7 +105,7 @@ public class StaffPerformSummaryEditController extends BaseCRUDJsonBodyMappingCo
BigDecimal attendScore = StaffPerformSummaryEditEntity.getAttendScore().subtract(weightPdu.attendWeight());//考勤
StaffPerformSummaryEditEntity.setAttendScore(attendScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal complainScore = StaffPerformSummaryEditEntity.getComplainScore().divide(weightPdu.selfWeight(),2,BigDecimal.ROUND_DOWN); //自评
BigDecimal complainScore = StaffPerformSummaryEditEntity.getComplainScore().subtract(weightPdu.selfWeight().multiply(StaffPerformUtil.SCORE100).setScale(2,BigDecimal.ROUND_DOWN)); //自评
StaffPerformSummaryEditEntity.setComplainScore(complainScore.setScale(2,BigDecimal.ROUND_DOWN));
BigDecimal goworkScore = StaffPerformSummaryEditEntity.getGoworkScore().subtract(weightPdu.goworkWeight());//办件
......@@ -116,10 +116,7 @@ public class StaffPerformSummaryEditController extends BaseCRUDJsonBodyMappingCo
BigDecimal erro = new BigDecimal(0);
erro = erro.add(StaffPerformSummaryEditEntity.getReviewScore());
erro = erro.add(StaffPerformSummaryEditEntity.getAttendScore());
if(StaffPerformSummaryEditEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(StaffPerformSummaryEditEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(StaffPerformSummaryEditEntity.getComplainScore());
erro = erro.add(StaffPerformSummaryEditEntity.getGoworkScore());
erro = erro.add(StaffPerformSummaryEditEntity.getEffectScore());
StaffPerformSummaryEditEntity.setErrorScore(erro);
......
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