Commit b0484e80 authored by 廖旭伟's avatar 廖旭伟

自评绩效工作人员汇总一张表;

绩效汇总算法修改,增加对自评维度和其他加分项的特殊处理
parent 02a2993e
......@@ -12,7 +12,7 @@ public enum CheckTypeEnum {
办件绩效(3, "办件绩效"),
效能绩效(4, "效能绩效"),
其它绩效(5, "其它绩效"),
投诉绩效(6, "投诉绩效"),
自评绩效(6, "自评绩效"),
;
private Integer value;
private String desc;
......
......@@ -31,7 +31,7 @@ public class WeightPdu {
private Integer goworkWeight=20;
/**
* 评价权重
* 群众评议分数默认为20分,不计算权重
*/
private Integer reviewWeight=20;
......@@ -49,7 +49,7 @@ public class WeightPdu {
return new BigDecimal(this.goworkWeight).divide(NUMBER_100);
}
public BigDecimal reviewWeight(){
return new BigDecimal(this.reviewWeight).divide(NUMBER_100);
return new BigDecimal(this.reviewWeight);
}
}
package com.mortals.xhx.common.utils;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.module.staff.model.StaffEntity;
import com.mortals.xhx.module.staff.model.StaffPerformSummaryEntity;
import java.math.BigDecimal;
/**
* 员工绩效分数计算
*/
public class StaffPerformUtil {
/** 群众评议总分 **/
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分扣完为止
if(reviewScore.compareTo(BigDecimal.ZERO)< 0){
reviewScore = BigDecimal.ZERO;
}
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
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()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
BigDecimal complainScore = staffPerformSummaryEntity.getComplainScore(); //自评不用加100
complainScore = complainScore.multiply(weightPdu.selfWeight());
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
summary = summary.add(otherScore);
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
if(staffEntity.getComplainCheck()==1){
summary = summary.add(complainScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
......@@ -39,6 +39,8 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
private CheckComplainRecordService checkComplainRecordService;
@Autowired
private CheckWindowWorkmanPerformService checkWindowWorkmanPerformService;
@Autowired
private CheckOtherRecordService checkOtherRecordService;
@Override
public void start() {
......@@ -68,9 +70,12 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
checkReviewRecordService.summaryCheck(query);
checkComplainRecordService.summaryCheck(query);
}
if(query.getCheckType() == CheckTypeEnum.其它绩效.getValue()){
if(query.getCheckType() == CheckTypeEnum.自评绩效.getValue()){
checkWindowWorkmanPerformService.summaryCheck(query);
}
if(query.getCheckType() == CheckTypeEnum.其它绩效.getValue()){
checkOtherRecordService.summaryCheck(query);
}
if(query.getCheckType()==null){
log.info("绩效分数汇总开始");
checkAttendRecordService.summaryCheck(query);
......@@ -79,6 +84,7 @@ public class StaffCheckSummaryService implements IApplicationStartedService {
checkReviewRecordService.summaryCheck(query);
checkComplainRecordService.summaryCheck(query);
checkWindowWorkmanPerformService.summaryCheck(query);
checkOtherRecordService.summaryCheck(query);
log.info("绩效分数汇总完成");
}
}
......
......@@ -18,6 +18,7 @@ import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AttendPostServiceThread;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.dao.CheckAttendRecordDao;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
......@@ -276,31 +277,25 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
if(staffPerformSummaryEntity.getOtherScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal Score100 = new BigDecimal(100);
BigDecimal otherScoreErro = Score100.subtract(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(BigDecimal.ZERO.subtract(otherScoreErro));
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
} else {
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setOtherScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -459,39 +454,4 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
statEntity.setTotalScore(totalScore);
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu,StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.dao.CheckComplainRecordDao;
import com.mortals.xhx.module.check.model.CheckAttendRecordEntity;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
......@@ -246,7 +247,12 @@ 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());
if(reviewScore.compareTo(BigDecimal.ZERO)< 0){
staffPerformSummaryEntity.setReviewScore(StaffPerformUtil.REVIEW_SCORE);
}else {
staffPerformSummaryEntity.setReviewScore(vo.getSumScore());
}
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
......@@ -271,31 +277,27 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
if(staffPerformSummaryEntity.getOtherScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal Score100 = new BigDecimal(100);
BigDecimal otherScoreErro = Score100.subtract(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(BigDecimal.ZERO.subtract(otherScoreErro));
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
} else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setOtherScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -454,38 +456,4 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
statEntity.setTotalScore(totalScore);
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu, StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.dao.CheckEffectRecordDao;
import com.mortals.xhx.module.check.model.CheckComplainRecordEntity;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
......@@ -268,31 +269,25 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
if(staffPerformSummaryEntity.getOtherScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal Score100 = new BigDecimal(100);
BigDecimal otherScoreErro = Score100.subtract(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(BigDecimal.ZERO.subtract(otherScoreErro));
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setReviewScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setOtherScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -451,38 +446,5 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
statEntity.setTotalScore(totalScore);
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu,StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.dao.CheckGoworkRecordDao;
import com.mortals.xhx.module.check.model.CheckEffectRecordEntity;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
......@@ -265,31 +266,25 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
if(staffPerformSummaryEntity.getOtherScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal Score100 = new BigDecimal(100);
BigDecimal otherScoreErro = Score100.subtract(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(BigDecimal.ZERO.subtract(otherScoreErro));
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
}else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setReviewScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setOtherScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -448,38 +443,5 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
statEntity.setTotalScore(totalScore);
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu,StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
package com.mortals.xhx.module.check.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.base.system.message.MessageService;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.model.CheckGoworkRecordEntity;
import com.mortals.xhx.module.check.model.CheckReviewRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
......@@ -49,6 +54,9 @@ import java.util.Calendar;
import java.util.Date;
import java.util.List;
import static com.mortals.xhx.common.key.ParamKey.SYS_PARAM_WEIGHT;
import static com.mortals.xhx.common.key.RedisKey.KEY_CHECK_SUMMARY_CACHE;
/**
* CheckOtherRecordService
* 其它绩效核查信息 service实现
......@@ -80,6 +88,10 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
@Autowired
private PerformRulesService rulesService;
@Autowired
private ParamService paramService;
@Autowired
private ICacheService cacheService;
@Override
protected void saveBefore(CheckOtherRecordEntity entity, Context context) throws AppException {
......@@ -111,7 +123,9 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
query.setStaffId(entity.getStaffId());
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
summaryCheck(query);
query.setCheckType(CheckTypeEnum.其它绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
//summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
}
......@@ -183,7 +197,11 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
sendCheckDingTalk(temp);
StaffCheckSummaryQuery query = new StaffCheckSummaryQuery();
query.setStaffId(temp.getStaffId());
summaryCheck(query);
query.setCheckTimeStart(DateUtils.getStrDate(entity.getCheckTime()));
query.setCheckTimeEnd(query.getCheckTimeStart());
query.setCheckType(CheckTypeEnum.其它绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
//summaryCheck(query);
} catch (Exception e) {
log.error("汇总已审核的核查记录出错", e);
......@@ -205,6 +223,13 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
}
List<StaffCheckSummaryVo> summaryVoList = dao.summaryCheck(query);
if (CollectionUtils.isNotEmpty(summaryVoList)) {
String value = paramService.getValueByKey(SYS_PARAM_WEIGHT);
WeightPdu weightPdu;
if (ObjectUtils.isEmpty(value)){
weightPdu = new WeightPdu();
}else {
weightPdu = JSONObject.parseObject(value,WeightPdu.class);
}
for (StaffCheckSummaryVo vo : summaryVoList) {
StaffEntity staffEntity = staffService.get(vo.getStaffId());
if(staffEntity.getStatus() == StaffSatusEnum.离职.getValue()) {
......@@ -218,6 +243,9 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
}
}
}
if(staffEntity.getAttendCheck()==0 && staffEntity.getEffectCheck()==0 && staffEntity.getGoworkCheck()==0 && staffEntity.getComplainCheck()==0){
continue;
}
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
......@@ -246,25 +274,25 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
erro = erro.add(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.add(erro));
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
} else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setReviewScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(BigDecimal.ZERO);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......
......@@ -13,6 +13,7 @@ import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.AuditUtil;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.model.CheckOtherRecordEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
......@@ -245,7 +246,12 @@ 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());
if(reviewScore.compareTo(BigDecimal.ZERO)< 0){
staffPerformSummaryEntity.setReviewScore(StaffPerformUtil.REVIEW_SCORE);
}else {
staffPerformSummaryEntity.setReviewScore(vo.getSumScore());
}
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
......@@ -270,31 +276,25 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
if(staffPerformSummaryEntity.getOtherScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal Score100 = new BigDecimal(100);
BigDecimal otherScoreErro = Score100.subtract(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(BigDecimal.ZERO.subtract(otherScoreErro));
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(erro));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
} else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setOtherScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
// BigDecimal total = new BigDecimal(100);
// staffPerformSummaryEntity.setTotalScore(total.add(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -453,38 +453,5 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
statEntity.setTotalScore(totalScore);
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu,StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.StaffSatusEnum;
import com.mortals.xhx.common.pdu.WeightPdu;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.StaffPerformUtil;
import com.mortals.xhx.module.check.model.CheckWindowPerformEntity;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryQuery;
import com.mortals.xhx.module.check.model.vo.StaffCheckSummaryVo;
......@@ -84,7 +85,7 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
query.setRecordId(temp.getRecordId());
query.setYear(temp.getYear());
query.setMonth(temp.getMonth());
query.setCheckType(CheckTypeEnum.其它绩效.getValue());
query.setCheckType(CheckTypeEnum.自评绩效.getValue());
cacheService.lpush(KEY_CHECK_SUMMARY_CACHE, query);
//summaryCheck(query);
}
......@@ -124,7 +125,7 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
staffPerformSummaryEntity.initAttrValue();
BeanUtils.copyProperties(vo, staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setOtherScore(vo.getSumScore());
staffPerformSummaryEntity.setComplainScore(vo.getSumScore());
StaffPerformSummaryQuery summaryQuery = new StaffPerformSummaryQuery();
summaryQuery.setStaffId(vo.getStaffId());
summaryQuery.setYear(vo.getYear());
......@@ -143,22 +144,21 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
if (temp.getEffectScore() != null) {
staffPerformSummaryEntity.setEffectScore(temp.getEffectScore());
}
if (temp.getComplainScore() != null) {
staffPerformSummaryEntity.setComplainScore(temp.getComplainScore());
if (temp.getOtherScore() != null) {
staffPerformSummaryEntity.setOtherScore(temp.getOtherScore());
}
BigDecimal erro = new BigDecimal(0);
erro = erro.add(staffPerformSummaryEntity.getReviewScore());
erro = erro.add(staffPerformSummaryEntity.getAttendScore());
if(staffPerformSummaryEntity.getOtherScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal Score100 = new BigDecimal(100);
BigDecimal otherScoreErro = Score100.subtract(staffPerformSummaryEntity.getOtherScore());
erro = erro.add(BigDecimal.ZERO.subtract(otherScoreErro));
if(staffPerformSummaryEntity.getComplainScore().compareTo(BigDecimal.ZERO)!=0){
BigDecimal complainScoreErro = StaffPerformUtil.SCORE100.subtract(staffPerformSummaryEntity.getComplainScore());
erro = erro.add(BigDecimal.ZERO.subtract(complainScoreErro));
}
erro = erro.add(staffPerformSummaryEntity.getGoworkScore());
erro = erro.add(staffPerformSummaryEntity.getEffectScore());
erro = erro.add(staffPerformSummaryEntity.getComplainScore());
staffPerformSummaryEntity.setErrorScore(erro);
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setId(temp.getId());
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
......@@ -166,14 +166,13 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity);
} else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setComplainScore(new BigDecimal(0));
BigDecimal Score100 = new BigDecimal(100);
staffPerformSummaryEntity.setErrorScore(Score100.subtract(vo.getSumScore()));
computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setAttendScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setReviewScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setGoworkScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setEffectScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setComplainScore(BigDecimal.ZERO);
staffPerformSummaryEntity.setErrorScore(StaffPerformUtil.SCORE100.subtract(vo.getSumScore()));
StaffPerformUtil.computeSummary(staffPerformSummaryEntity,weightPdu,staffEntity);
staffPerformSummaryEntity.setCreateUserId(1l);
staffPerformSummaryEntity.setCreateTime(new Date());
staffPerformSummaryService.save(staffPerformSummaryEntity);
......@@ -184,39 +183,5 @@ public class CheckWindowWorkmanPerformServiceImpl extends AbstractCRUDServiceImp
return summaryVoList;
}
private void computeSummary(StaffPerformSummaryEntity staffPerformSummaryEntity, WeightPdu weightPdu, StaffEntity staffEntity){
BigDecimal total = new BigDecimal(100);
BigDecimal reviewScore = total.add(staffPerformSummaryEntity.getReviewScore()); //评价
reviewScore = reviewScore.multiply(weightPdu.reviewWeight());
BigDecimal attendScore = total.add(staffPerformSummaryEntity.getAttendScore()); //考勤
attendScore = attendScore.multiply(weightPdu.attendWeight());
BigDecimal otherScore = staffPerformSummaryEntity.getOtherScore(); //自评不用加100
if(otherScore.compareTo(BigDecimal.ZERO)==0){
otherScore = new BigDecimal(100);
}
otherScore = otherScore.multiply(weightPdu.selfWeight());
BigDecimal goworkScore = total.add(staffPerformSummaryEntity.getGoworkScore()); //办件
goworkScore = goworkScore.multiply(weightPdu.goworkWeight());
BigDecimal effectScore = total.add(staffPerformSummaryEntity.getEffectScore()); //效能
effectScore = effectScore.multiply(weightPdu.effectWeight());
// BigDecimal complainScore = complainScore = total.add(staffPerformSummaryEntity.getComplainScore()); //投诉
BigDecimal summary = new BigDecimal(0);
if(staffEntity.getReviewCheck()==1) {
summary = summary.add(reviewScore);
}
if(staffEntity.getAttendCheck()==1) {
summary = summary.add(attendScore);
}
if(staffEntity.getOtherCheck()==1) {
summary = summary.add(otherScore);
}
if(staffEntity.getEffectCheck()==1){
summary = summary.add(effectScore);
}
if(staffEntity.getGoworkCheck()==1) {
summary = summary.add(goworkScore);
}
staffPerformSummaryEntity.setTotalScore(summary);
}
}
\ No newline at end of file
......@@ -73,7 +73,7 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/**
* 投诉绩效指标分数
*/
//@Excel(name = "投诉绩效指标分数")
@Excel(name = "自评绩效分数")
private BigDecimal complainScore;
/**
* 办件绩效分数
......@@ -86,9 +86,9 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
@Excel(name = "效能绩效分数")
private BigDecimal effectScore;
/**
* 其它绩效分数
* 其它绩效分数 加分项
*/
@Excel(name = "自评绩效分数")
@Excel(name = "其它绩效分数")
private BigDecimal otherScore;
/**
* 累计异常分数
......
......@@ -449,6 +449,11 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
} else {
update.setComplainCheck(1);
}
if (temp.getReviewCheck() == 1) {
update.setReviewCheck(0);
} else {
update.setReviewCheck(1);
}
break;
case 办件绩效:
if (temp.getGoworkCheck() == 1) {
......@@ -471,13 +476,6 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
update.setOtherCheck(1);
}
break;
case 投诉绩效:
if (temp.getReviewCheck() == 1) {
update.setReviewCheck(0);
} else {
update.setReviewCheck(1);
}
break;
default:
if (temp.getOtherCheck() == 1) {
update.setOtherCheck(0);
......
package com.mortals.xhx.module.window.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import java.util.List;
/**
......@@ -13,5 +15,5 @@ import java.util.List;
public interface WindowWorkmanPerformDetailDao extends ICRUDDao<WindowWorkmanPerformDetailEntity,Long>{
Result<WindowWorkmanPerformDetailEntity> getListExt(WindowWorkmanPerformDetailEntity params, PageInfo pageInfo);
}
package com.mortals.xhx.module.window.dao.ibatis;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.ParamDto;
import com.mortals.framework.model.Result;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.window.dao.WindowWorkmanPerformDetailDao;
import com.mortals.xhx.module.window.model.WindowWorkmanPerformDetailEntity;
import java.util.ArrayList;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
......@@ -16,6 +22,43 @@ import java.util.List;
@Repository("windowWorkmanPerformDetailDao")
public class WindowWorkmanPerformDetailDaoImpl extends BaseCRUDDaoMybatis<WindowWorkmanPerformDetailEntity,Long> implements WindowWorkmanPerformDetailDao {
@Override
public Result<WindowWorkmanPerformDetailEntity> getListExt(WindowWorkmanPerformDetailEntity params, PageInfo pageInfo) {
ParamDto paramDto = this.getQueryParam(params);
Result result = new Result();
List<WindowWorkmanPerformDetailEntity> list = null;
if (pageInfo.isCountPage()) {
int count = this.getCountExt(paramDto);
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), this.cpyQueryParamDto(paramDto), rowBounds);
}
pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList((List)list);
} else {
if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId("getListExt"), this.cpyQueryParamDto(paramDto), rowBounds);
}
pageInfo.setTotalResult(-1);
result.setPageInfo(pageInfo);
result.setList(list);
}
return result;
}
private int getCountExt(ParamDto paramDto) {
return (Integer)this.getSqlSession().selectOne(this.getSqlId("getListCountExt"), this.cpyQueryParamDto(paramDto));
}
}
......@@ -19,5 +19,12 @@ public class WindowWorkmanPerformDetailVo extends BaseEntityLong {
/** 序号,主键,自增长列表 */
private List <Long> idList;
/**
* 考核年度
*/
private Integer year;
/**
* 考核月份
*/
private Integer month;
}
\ No newline at end of file
package com.mortals.xhx.module.window.service.impl;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -18,4 +20,11 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class WindowWorkmanPerformDetailServiceImpl extends AbstractCRUDServiceImpl<WindowWorkmanPerformDetailDao, WindowWorkmanPerformDetailEntity, Long> implements WindowWorkmanPerformDetailService {
@Override
public Result<WindowWorkmanPerformDetailEntity> find(WindowWorkmanPerformDetailEntity entity, PageInfo pageInfo, Context context) throws AppException {
WindowWorkmanPerformDetailEntity newParams = this.findBefore(entity, pageInfo, context);
Result<WindowWorkmanPerformDetailEntity> result = this.dao.getListExt(newParams, pageInfo);
this.findAfter(entity, pageInfo, context, result.getList());
return result;
}
}
\ No newline at end of file
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