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

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

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