Commit 87753cc4 authored by 廖旭伟's avatar 廖旭伟

考勤汇总表展示分数算法修改

parent 02072775
...@@ -271,8 +271,8 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec ...@@ -271,8 +271,8 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
if (temp.getEffectScore() != null) { if (temp.getEffectScore() != null) {
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore()); staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
} }
if (temp.getReviewScore() != null) { if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setReviewScore(temp.getReviewScore()); staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore()); erro = erro.add(staffPerformSummaryEntity.getReviewScore());
......
...@@ -7,6 +7,7 @@ import com.mortals.framework.model.PageInfo; ...@@ -7,6 +7,7 @@ import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.pdu.WeightPdu; import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.staff.dao.StaffPerformSummaryDao; import com.mortals.xhx.module.staff.dao.StaffPerformSummaryDao;
import com.mortals.xhx.module.staff.model.StaffEntity; import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity; import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
...@@ -77,18 +78,20 @@ public class StaffPerformSummaryServiceImpl extends AbstractCRUDServiceImpl<Staf ...@@ -77,18 +78,20 @@ 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 total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价 BigDecimal reviewScore = StaffPerformUtil.REVIEW_SCORE.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight()); if(reviewScore.compareTo(BigDecimal.ZERO)<0){
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 = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
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 otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100 BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){ if(complainScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100); complainScore = StaffPerformUtil.SCORE100;
} }
otherScore = otherScore.multiply(weightPdu.selfWeight()); complainScore = complainScore.multiply(weightPdu.selfWeight());
staffPerformSummaryEntity.setOtherScore(otherScore.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()); //办件
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));
......
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