Commit 618e0a0a authored by 王启林's avatar 王启林
parents a971cad8 068186e1
...@@ -47,5 +47,6 @@ public class AppealReq extends BaseReq { ...@@ -47,5 +47,6 @@ public class AppealReq extends BaseReq {
private List<PerformAttendAppealFilesEntity> performAttendAppealFilesList = new ArrayList<>(); private List<PerformAttendAppealFilesEntity> performAttendAppealFilesList = new ArrayList<>();
; ;
private Long checkRecordId;
} }
...@@ -153,6 +153,5 @@ public class InspectSaveReq extends BaseReq { ...@@ -153,6 +153,5 @@ public class InspectSaveReq extends BaseReq {
private Long checkRecordId;
} }
...@@ -121,8 +121,8 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -121,8 +121,8 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
} }
PageInfo pageInfo = buildPageInfo(appealReq); PageInfo pageInfo = buildPageInfo(appealReq);
PerformAttendAppealQuery query = new PerformAttendAppealQuery(); PerformAttendAppealQuery query = new PerformAttendAppealQuery();
query.setAppealTimeStart(appealReq.getApperalStartDate()); query.setCreateTimeStart(appealReq.getApperalStartDate());
query.setAppealTimeEnd(appealReq.getAppealEndDate()); query.setCreateTimeEnd(appealReq.getAppealEndDate());
query.setStaffId(context.getUser().getCustomerId()); query.setStaffId(context.getUser().getCustomerId());
Result<PerformAttendAppealEntity> result = appealService.find(query, pageInfo, context); Result<PerformAttendAppealEntity> result = appealService.find(query, pageInfo, context);
...@@ -223,6 +223,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -223,6 +223,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
entity.setAppealDesc(req.getAppealDesc()); entity.setAppealDesc(req.getAppealDesc());
entity.setStaffId(context.getUser().getCustomerId()); entity.setStaffId(context.getUser().getCustomerId());
entity.setCreateUserId(context.getUser().getId()); entity.setCreateUserId(context.getUser().getId());
entity.setCheckRecordId(req.getId());
PerformAttendAppealEntity saveEntity = appealService.save(entity, context); PerformAttendAppealEntity saveEntity = appealService.save(entity, context);
rest.setData(saveEntity); rest.setData(saveEntity);
......
...@@ -105,23 +105,23 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA ...@@ -105,23 +105,23 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
summaryQuery.setMonth(vo.getMonth()); summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery); StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){ if(temp!=null){
if(temp.getAssessScore()==null){ if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
} }
if(temp.getOtherScore()==null){ if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
} }
if(temp.getWorkScore()==null){ if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
} }
if(temp.getEffectScore()==null){ if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore()); erro.add(staffPerformSummaryEntity.getReviewScore());
erro.add(staffPerformSummaryEntity.getAttendScore()); erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore()); erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore()); erro.add(staffPerformSummaryEntity.getGoworkScore());
erro.add(staffPerformSummaryEntity.getEffectScore()); erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro); staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
...@@ -130,9 +130,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA ...@@ -130,9 +130,9 @@ public class CheckAttendRecordServiceImpl extends AbstractCRUDServiceImpl<CheckA
staffPerformSummaryEntity.setUpdateTime(new Date()); staffPerformSummaryEntity.setUpdateTime(new Date());
staffPerformSummaryService.update(staffPerformSummaryEntity); staffPerformSummaryService.update(staffPerformSummaryEntity);
}else { }else {
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore()); staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
......
...@@ -98,7 +98,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec ...@@ -98,7 +98,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
for(StaffCheckSummaryVo vo:summaryVoList){ for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity(); StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo)); BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setAssessScore(vo.getSumScore()); 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());
...@@ -111,17 +111,17 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec ...@@ -111,17 +111,17 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
if(temp.getOtherScore()==null){ if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
} }
if(temp.getWorkScore()==null){ if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
} }
if(temp.getEffectScore()==null){ if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore()); erro.add(staffPerformSummaryEntity.getReviewScore());
erro.add(staffPerformSummaryEntity.getAttendScore()); erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore()); erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore()); erro.add(staffPerformSummaryEntity.getGoworkScore());
erro.add(staffPerformSummaryEntity.getEffectScore()); erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro); staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
...@@ -135,7 +135,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec ...@@ -135,7 +135,7 @@ public class CheckComplainRecordServiceImpl extends AbstractCRUDServiceImpl<Chec
}else { }else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore()); staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
......
...@@ -105,23 +105,23 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE ...@@ -105,23 +105,23 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
summaryQuery.setMonth(vo.getMonth()); summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery); StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){ if(temp!=null){
if(temp.getAssessScore()==null){ if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
} }
if(temp.getOtherScore()==null){ if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
} }
if(temp.getWorkScore()==null){ if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
} }
if(temp.getAttendScore()==null){ if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore()); erro.add(staffPerformSummaryEntity.getReviewScore());
erro.add(staffPerformSummaryEntity.getAttendScore()); erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore()); erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore()); erro.add(staffPerformSummaryEntity.getGoworkScore());
erro.add(staffPerformSummaryEntity.getEffectScore()); erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro); staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
...@@ -134,9 +134,9 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE ...@@ -134,9 +134,9 @@ public class CheckEffectRecordServiceImpl extends AbstractCRUDServiceImpl<CheckE
staffPerformSummaryService.update(staffPerformSummaryEntity); staffPerformSummaryService.update(staffPerformSummaryEntity);
}else { }else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore()); staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore())); staffPerformSummaryEntity.setTotalScore(total.subtract(vo.getSumScore()));
......
...@@ -98,15 +98,15 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG ...@@ -98,15 +98,15 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
for(StaffCheckSummaryVo vo:summaryVoList){ for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity(); StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo)); BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setWorkScore(vo.getSumScore()); staffPerformSummaryEntity.setGoworkScore(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());
summaryQuery.setMonth(vo.getMonth()); summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery); StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){ if(temp!=null){
if(temp.getAssessScore()==null){ if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
} }
if(temp.getOtherScore()==null){ if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
...@@ -118,10 +118,10 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG ...@@ -118,10 +118,10 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore()); erro.add(staffPerformSummaryEntity.getReviewScore());
erro.add(staffPerformSummaryEntity.getAttendScore()); erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore()); erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore()); erro.add(staffPerformSummaryEntity.getGoworkScore());
erro.add(staffPerformSummaryEntity.getEffectScore()); erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro); staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
...@@ -134,7 +134,7 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG ...@@ -134,7 +134,7 @@ public class CheckGoworkRecordServiceImpl extends AbstractCRUDServiceImpl<CheckG
staffPerformSummaryService.update(staffPerformSummaryEntity); staffPerformSummaryService.update(staffPerformSummaryEntity);
}else { }else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore()); staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
......
...@@ -104,23 +104,23 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt ...@@ -104,23 +104,23 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
summaryQuery.setMonth(vo.getMonth()); summaryQuery.setMonth(vo.getMonth());
StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery); StaffPerformSummaryEntity temp = staffPerformSummaryService.selectOne(summaryQuery);
if(temp!=null){ if(temp!=null){
if(temp.getAssessScore()==null){ if(temp.getReviewScore()==null){
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
} }
if(temp.getAttendScore()==null){ if(temp.getAttendScore()==null){
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
} }
if(temp.getWorkScore()==null){ if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
} }
if(temp.getEffectScore()==null){ if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore()); erro.add(staffPerformSummaryEntity.getReviewScore());
erro.add(staffPerformSummaryEntity.getAttendScore()); erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore()); erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore()); erro.add(staffPerformSummaryEntity.getGoworkScore());
erro.add(staffPerformSummaryEntity.getEffectScore()); erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro); staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
...@@ -133,8 +133,8 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt ...@@ -133,8 +133,8 @@ public class CheckOtherRecordServiceImpl extends AbstractCRUDServiceImpl<CheckOt
staffPerformSummaryService.update(staffPerformSummaryEntity); staffPerformSummaryService.update(staffPerformSummaryEntity);
}else { }else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setAssessScore(new BigDecimal(0)); staffPerformSummaryEntity.setReviewScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore()); staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
......
...@@ -97,7 +97,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR ...@@ -97,7 +97,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
for(StaffCheckSummaryVo vo:summaryVoList){ for(StaffCheckSummaryVo vo:summaryVoList){
StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity(); StaffPerformSummaryEntity staffPerformSummaryEntity = new StaffPerformSummaryEntity();
BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo)); BeanUtils.copyProperties(vo,staffPerformSummaryEntity, BeanUtil.getNullPropertyNames(vo));
staffPerformSummaryEntity.setAssessScore(vo.getSumScore()); 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());
...@@ -110,17 +110,17 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR ...@@ -110,17 +110,17 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
if(temp.getOtherScore()==null){ if(temp.getOtherScore()==null){
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
} }
if(temp.getWorkScore()==null){ if(temp.getGoworkScore()==null){
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
} }
if(temp.getEffectScore()==null){ if(temp.getEffectScore()==null){
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
} }
BigDecimal erro = new BigDecimal(0); BigDecimal erro = new BigDecimal(0);
erro.add(staffPerformSummaryEntity.getAssessScore()); erro.add(staffPerformSummaryEntity.getReviewScore());
erro.add(staffPerformSummaryEntity.getAttendScore()); erro.add(staffPerformSummaryEntity.getAttendScore());
erro.add(staffPerformSummaryEntity.getOtherScore()); erro.add(staffPerformSummaryEntity.getOtherScore());
erro.add(staffPerformSummaryEntity.getWorkScore()); erro.add(staffPerformSummaryEntity.getGoworkScore());
erro.add(staffPerformSummaryEntity.getEffectScore()); erro.add(staffPerformSummaryEntity.getEffectScore());
staffPerformSummaryEntity.setErrorScore(erro); staffPerformSummaryEntity.setErrorScore(erro);
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
...@@ -134,7 +134,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR ...@@ -134,7 +134,7 @@ public class CheckReviewRecordServiceImpl extends AbstractCRUDServiceImpl<CheckR
}else { }else {
staffPerformSummaryEntity.setAttendScore(new BigDecimal(0)); staffPerformSummaryEntity.setAttendScore(new BigDecimal(0));
staffPerformSummaryEntity.setOtherScore(new BigDecimal(0)); staffPerformSummaryEntity.setOtherScore(new BigDecimal(0));
staffPerformSummaryEntity.setWorkScore(new BigDecimal(0)); staffPerformSummaryEntity.setGoworkScore(new BigDecimal(0));
staffPerformSummaryEntity.setEffectScore(new BigDecimal(0)); staffPerformSummaryEntity.setEffectScore(new BigDecimal(0));
staffPerformSummaryEntity.setErrorScore(vo.getSumScore()); staffPerformSummaryEntity.setErrorScore(vo.getSumScore());
BigDecimal total = new BigDecimal(100); BigDecimal total = new BigDecimal(100);
......
...@@ -11,7 +11,7 @@ import lombok.Data; ...@@ -11,7 +11,7 @@ import lombok.Data;
* 部门绩效分数统计实体对象 * 部门绩效分数统计实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-11 * @date 2023-07-14
*/ */
@Data @Data
public class DeptPerformStatEntity extends DeptPerformStatVo { public class DeptPerformStatEntity extends DeptPerformStatVo {
...@@ -31,6 +31,16 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -31,6 +31,16 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
@Excel(name = "部门绩效总分数") @Excel(name = "部门绩效总分数")
private BigDecimal totalScore; private BigDecimal totalScore;
/** /**
* 部门绩效加分总分数汇总
*/
@Excel(name = "部门绩效加分总分数汇总")
private BigDecimal totalAddScore;
/**
* 部门绩效减分总分数汇总
*/
@Excel(name = "部门绩效减分总分数汇总")
private BigDecimal totalSubScore;
/**
* 考勤绩效指标增加分数 * 考勤绩效指标增加分数
*/ */
private BigDecimal attendScoreAdd; private BigDecimal attendScoreAdd;
...@@ -41,19 +51,27 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -41,19 +51,27 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
/** /**
* 评价绩效指标增加分数 * 评价绩效指标增加分数
*/ */
private BigDecimal assessScoreAdd; private BigDecimal reviewScoreAdd;
/** /**
* 评价绩效指标扣减分数 * 评价绩效指标扣减分数
*/ */
private BigDecimal assessScoreSub; private BigDecimal reviewScoreSub;
/**
* 投诉绩效指标增加分数
*/
private BigDecimal complainScoreAdd;
/**
* 投诉绩效指标扣减分数
*/
private BigDecimal complainScoreSub;
/** /**
* 办件绩效指标增加分数 * 办件绩效指标增加分数
*/ */
private BigDecimal workScoreAdd; private BigDecimal goworkScoreAdd;
/** /**
* 办件绩效指标扣减分数 * 办件绩效指标扣减分数
*/ */
private BigDecimal workScoreSub; private BigDecimal goworkScoreSub;
/** /**
* 效能绩效指标增加分数 * 效能绩效指标增加分数
*/ */
...@@ -71,6 +89,11 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -71,6 +89,11 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
*/ */
private BigDecimal otherScoreSub; private BigDecimal otherScoreSub;
/** /**
* 部门绩效平均分数,根据部门所属人数平均
*/
@Excel(name = "部门绩效平均分数,根据部门所属人数平均")
private BigDecimal averageScore;
/**
* 备注 * 备注
*/ */
private String remark; private String remark;
...@@ -86,29 +109,6 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -86,29 +109,6 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
* 日 * 日
*/ */
private Integer day; private Integer day;
/**
* 部门绩效加分总分数汇总
*/
@Excel(name = "部门绩效加分总分数汇总")
private BigDecimal totalAddScore;
/**
* 部门绩效减分总分数汇总
*/
@Excel(name = "部门绩效减分总分数汇总")
private BigDecimal totalSubScore;
/**
* 投诉绩效指标增加分数
*/
private BigDecimal complainScoreAdd;
/**
* 投诉绩效指标扣减分数
*/
private BigDecimal complainScoreSub;
/**
* 部门绩效平均分数,根据部门所属人数平均
*/
@Excel(name = "部门绩效平均分数,根据部门所属人数平均")
private BigDecimal averageScore;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -133,17 +133,25 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -133,17 +133,25 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
this.totalScore = new BigDecimal(0); this.totalScore = new BigDecimal(0);
this.totalAddScore = new BigDecimal(0);
this.totalSubScore = new BigDecimal(0);
this.attendScoreAdd = new BigDecimal(0); this.attendScoreAdd = new BigDecimal(0);
this.attendScoreSub = new BigDecimal(0); this.attendScoreSub = new BigDecimal(0);
this.assessScoreAdd = new BigDecimal(0); this.reviewScoreAdd = new BigDecimal(0);
this.assessScoreSub = new BigDecimal(0); this.reviewScoreSub = new BigDecimal(0);
this.workScoreAdd = new BigDecimal(0); this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0);
this.goworkScoreAdd = new BigDecimal(0);
this.workScoreSub = new BigDecimal(0); this.goworkScoreSub = new BigDecimal(0);
this.effectScoreAdd = new BigDecimal(0); this.effectScoreAdd = new BigDecimal(0);
...@@ -153,6 +161,8 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -153,6 +161,8 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
this.otherScoreSub = new BigDecimal(0); this.otherScoreSub = new BigDecimal(0);
this.averageScore = new BigDecimal(0);
this.remark = ""; this.remark = "";
this.year = -1; this.year = -1;
...@@ -160,15 +170,5 @@ public class DeptPerformStatEntity extends DeptPerformStatVo { ...@@ -160,15 +170,5 @@ public class DeptPerformStatEntity extends DeptPerformStatVo {
this.month = -1; this.month = -1;
this.day = -1; this.day = -1;
this.totalAddScore = new BigDecimal(0);
this.totalSubScore = new BigDecimal(0);
this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0);
this.averageScore = new BigDecimal(0);
} }
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import java.util.Date; ...@@ -11,7 +11,7 @@ import java.util.Date;
* 部门绩效分数统计视图对象 * 部门绩效分数统计视图对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-11 * @date 2023-07-14
*/ */
@Data @Data
public class DeptPerformStatVo extends BaseEntityLong { public class DeptPerformStatVo extends BaseEntityLong {
......
package com.mortals.xhx.module.dept.model.vo;
import lombok.Data;
/**
* 部门绩效总分排名统计查询条件
*/
@Data
public class DeptSummaryTopQuery {
}
...@@ -12,7 +12,7 @@ import lombok.Data; ...@@ -12,7 +12,7 @@ import lombok.Data;
*/ */
@Data @Data
public class PerformRulesVo extends BaseEntityLong { public class PerformRulesVo extends BaseEntityLong {
/** 类型名称 **/
private String typeName;
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.service; package com.mortals.xhx.module.perform.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDCacheService; import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.dao.PerformRulesDao; import com.mortals.xhx.module.perform.dao.PerformRulesDao;
import java.util.List;
import java.util.Map;
/** /**
* PerformRulesService * PerformRulesService
* *
...@@ -14,4 +19,11 @@ import com.mortals.xhx.module.perform.dao.PerformRulesDao; ...@@ -14,4 +19,11 @@ import com.mortals.xhx.module.perform.dao.PerformRulesDao;
public interface PerformRulesService extends ICRUDCacheService<PerformRulesEntity,Long> { public interface PerformRulesService extends ICRUDCacheService<PerformRulesEntity,Long> {
PerformRulesDao getDao(); PerformRulesDao getDao();
/**
* 规则分数统计
* @return
* @throws AppException
*/
Map<String,Object> summaryRules() throws AppException;
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil; ...@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.pinyin.PinyinUtil; import cn.hutool.extra.pinyin.PinyinUtil;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.xhx.base.system.idgenerator.service.IdgeneratorService; import com.mortals.xhx.base.system.idgenerator.service.IdgeneratorService;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.CommentTypeEnum; import com.mortals.xhx.common.code.CommentTypeEnum;
import com.mortals.xhx.common.code.PerformRulesTypeEnum; import com.mortals.xhx.common.code.PerformRulesTypeEnum;
import com.mortals.xhx.common.code.PerformTypeEnum; import com.mortals.xhx.common.code.PerformTypeEnum;
...@@ -19,6 +20,13 @@ import com.mortals.xhx.module.perform.service.PerformRulesService; ...@@ -19,6 +20,13 @@ import com.mortals.xhx.module.perform.service.PerformRulesService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import static com.mortals.xhx.base.system.idgenerator.service.impl.IdgeneratorServiceImpl.IdGeneratorKey.*; import static com.mortals.xhx.base.system.idgenerator.service.impl.IdgeneratorServiceImpl.IdGeneratorKey.*;
/** /**
...@@ -93,4 +101,31 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor ...@@ -93,4 +101,31 @@ public class PerformRulesServiceImpl extends AbstractCRUDCacheServiceImpl<Perfor
System.out.println(PinyinUtil.getFirstLetter(str, "")); System.out.println(PinyinUtil.getFirstLetter(str, ""));
} }
@Override
public Map<String,Object> summaryRules() throws AppException {
Map<String,Object> resultMap = new HashMap<>();
List<PerformRulesEntity> all = this.getAllList();
List<PerformRulesEntity> resultList = new ArrayList<>();
BigDecimal totalScore = new BigDecimal(0);
Map<Integer,List<PerformRulesEntity>> groupMap = all.stream().collect(Collectors.groupingBy(PerformRulesEntity::getType));
for (Map.Entry<Integer, List<PerformRulesEntity>> entry:groupMap.entrySet()){
BigDecimal sum = new BigDecimal(0);
for(PerformRulesEntity item:entry.getValue()){
sum = sum.add(item.getScore());
}
PerformRulesEntity entity = new PerformRulesEntity();
entity.setType(entry.getKey());
CheckTypeEnum type = CheckTypeEnum.getByValue(entry.getKey());
if(type!=null){
entity.setTypeName(type.getDesc());
}
entity.setScore(sum);
totalScore = totalScore.add(sum);
resultList.add(entity);
}
resultMap.put("totalScore",totalScore);
resultMap.put("list",resultList);
return resultMap;
}
} }
\ No newline at end of file
...@@ -41,6 +41,7 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform ...@@ -41,6 +41,7 @@ public class PerformStaffConfServiceImpl extends AbstractCRUDServiceImpl<Perform
private PerformRulesCategoryService performRulesCategoryService; private PerformRulesCategoryService performRulesCategoryService;
@Override @Override
protected void saveBefore(PerformStaffConfEntity entity, Context context) throws AppException { protected void saveBefore(PerformStaffConfEntity entity, Context context) throws AppException {
super.saveBefore(entity,context); super.saveBefore(entity,context);
......
package com.mortals.xhx.module.perform.web; package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum; import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.EnableEnum; import com.mortals.xhx.common.code.EnableEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -37,6 +42,8 @@ public class PerformDeptConfController extends BaseCRUDJsonBodyMappingController ...@@ -37,6 +42,8 @@ public class PerformDeptConfController extends BaseCRUDJsonBodyMappingController
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private UserService userService;
public PerformDeptConfController(){ public PerformDeptConfController(){
super.setModuleDesc( "部门自动考核信息"); super.setModuleDesc( "部门自动考核信息");
...@@ -46,8 +53,20 @@ public class PerformDeptConfController extends BaseCRUDJsonBodyMappingController ...@@ -46,8 +53,20 @@ public class PerformDeptConfController extends BaseCRUDJsonBodyMappingController
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", CheckTypeEnum.getEnumMap()); this.addDict(model, "type", CheckTypeEnum.getEnumMap());
this.addDict(model, "enable", EnableEnum.getEnumMap()); this.addDict(model, "enable", EnableEnum.getEnumMap());
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "updateUserId", collect);
super.init(model, context); super.init(model, context);
} }
@Override
protected void doListBefore(PerformDeptConfEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.web; package com.mortals.xhx.module.perform.web;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery; import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.module.perform.model.PerformRulesCategoryQuery; import com.mortals.xhx.module.perform.model.PerformRulesCategoryQuery;
import com.mortals.xhx.module.perform.model.PerformRulesEntity; import com.mortals.xhx.module.perform.model.PerformRulesEntity;
import com.mortals.xhx.module.perform.service.PerformRulesCategoryService; import com.mortals.xhx.module.perform.service.PerformRulesCategoryService;
import com.mortals.xhx.module.perform.service.PerformRulesService; import com.mortals.xhx.module.perform.service.PerformRulesService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toMap;
...@@ -47,7 +56,7 @@ public class PerformRulesController extends BaseCRUDJsonBodyMappingController<Pe ...@@ -47,7 +56,7 @@ public class PerformRulesController extends BaseCRUDJsonBodyMappingController<Pe
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformRules", "subAddType")); this.addDict(model, "subAddType", paramService.getParamBySecondOrganize("PerformRules", "subAddType"));
this.addDict(model, "assoOwner", paramService.getParamBySecondOrganize("PerformRules", "assoOwner")); this.addDict(model, "assoOwner", paramService.getParamBySecondOrganize("PerformRules", "assoOwner"));
this.addDict(model, "type", paramService.getParamBySecondOrganize("PerformRules", "type")); this.addDict(model, "type", CheckTypeEnum.getEnumMap());
this.addDict(model, "categoryId", categoryService.find(new PerformRulesCategoryQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n))); this.addDict(model, "categoryId", categoryService.find(new PerformRulesCategoryQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n)));
this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n))); this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
super.init(model, context); super.init(model, context);
...@@ -58,4 +67,33 @@ public class PerformRulesController extends BaseCRUDJsonBodyMappingController<Pe ...@@ -58,4 +67,33 @@ public class PerformRulesController extends BaseCRUDJsonBodyMappingController<Pe
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING))); query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} }
@PostMapping({"summary"})
@UnAuth
public Rest<Object> summary() {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
Context context = this.getContext();
String busiDesc = "查询规则分数统计";
int code = 1;
try {
Map<String,Object> result = this.getService().summaryRules();
model.put("data", result);
model.put("message_info", busiDesc + "成功");
if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) {
this.recordSysLog(this.request, busiDesc + " 【成功】");
}
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
this.init(model, context);
ret.setCode(code);
ret.setData(model.get("data"));
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.perform.web; package com.mortals.xhx.module.perform.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.CheckTypeEnum; import com.mortals.xhx.common.code.CheckTypeEnum;
import com.mortals.xhx.common.code.EnableEnum; import com.mortals.xhx.common.code.EnableEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.perform.model.PerformStaffConfEntity; import com.mortals.xhx.module.perform.model.PerformStaffConfEntity;
import com.mortals.xhx.module.perform.service.PerformStaffConfService; import com.mortals.xhx.module.perform.service.PerformStaffConfService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays; import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
/** /**
* * 人员自动考核信息
* 人员自动考核信息 *
* * @author zxfei
* @author zxfei * @date 2023-05-16
* @date 2023-05-16 */
*/
@RestController @RestController
@RequestMapping("perform/staff/conf") @RequestMapping("perform/staff/conf")
public class PerformStaffConfController extends BaseCRUDJsonBodyMappingController<PerformStaffConfService,PerformStaffConfEntity,Long> { public class PerformStaffConfController extends BaseCRUDJsonBodyMappingController<PerformStaffConfService, PerformStaffConfEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
@Autowired
private UserService userService;
public PerformStaffConfController(){ public PerformStaffConfController() {
super.setModuleDesc( "人员自动考核信息"); super.setModuleDesc("人员自动考核信息");
} }
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "type", CheckTypeEnum.getEnumMap()); this.addDict(model, "type", CheckTypeEnum.getEnumMap());
this.addDict(model, "enable", EnableEnum.getEnumMap()); this.addDict(model, "enable", EnableEnum.getEnumMap());
Map<String, String> collect = userService.find(new UserQuery(), getContext()).stream()
.collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n));
this.addDict(model, "updateUserId", collect);
super.init(model, context); super.init(model, context);
} }
@Override
protected void doListBefore(PerformStaffConfEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(Arrays.asList(new OrderCol("createTime", OrderCol.DESCENDING)));
} else {
query.getOrderColList().add(new OrderCol("createTime", OrderCol.DESCENDING));
}
}
} }
\ No newline at end of file
package com.mortals.xhx.module.staff.model; package com.mortals.xhx.module.staff.model;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.staff.model.vo.StaffPerformStatVo; import com.mortals.xhx.module.staff.model.vo.StaffPerformStatVo;
import lombok.Data; import lombok.Data;
/** /**
* 员工绩效统计实体对象 * 员工绩效统计实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-13 * @date 2023-07-14
*/ */
@Data @Data
public class StaffPerformStatEntity extends StaffPerformStatVo { public class StaffPerformStatEntity extends StaffPerformStatVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 部门id号 * 部门id号
*/ */
private Long staffId; private Long staffId;
/** /**
* 部门名称 * 部门名称
*/ */
private String staffName; private String staffName;
/** /**
* 员工绩效总分数 * 员工绩效总分数
*/ */
@Excel(name = "员工绩效总分数") @Excel(name = "员工绩效总分数")
private BigDecimal totalScore; private BigDecimal totalScore;
/** /**
* 员工绩效加分总分数汇总 * 员工绩效加分总分数汇总
*/ */
@Excel(name = "员工绩效加分总分数汇总") @Excel(name = "员工绩效加分总分数汇总")
private BigDecimal totalAddScore; private BigDecimal totalAddScore;
/** /**
* 员工绩效减分总分数汇总 * 员工绩效减分总分数汇总
*/ */
@Excel(name = "员工绩效减分总分数汇总") @Excel(name = "员工绩效减分总分数汇总")
private BigDecimal totalSubScore; private BigDecimal totalSubScore;
/** /**
* 考勤绩效指标增加分数 * 考勤绩效指标增加分数
*/ */
private BigDecimal attendScoreAdd; private BigDecimal attendScoreAdd;
/** /**
* 考勤绩效指标扣减分数 * 考勤绩效指标扣减分数
*/ */
private BigDecimal attendScoreSub; private BigDecimal attendScoreSub;
/** /**
* 评价绩效指标增加分数 * 评价绩效指标增加分数
*/ */
private BigDecimal assessScoreAdd; private BigDecimal reviewScoreAdd;
/** /**
* 评价绩效指标扣减分数 * 评价绩效指标扣减分数
*/ */
private BigDecimal assessScoreSub; private BigDecimal reviewScoreSub;
/** /**
* 投诉绩效指标增加分数 * 投诉绩效指标增加分数
*/ */
private BigDecimal complainScoreAdd; private BigDecimal complainScoreAdd;
/** /**
* 投诉绩效指标扣减分数 * 投诉绩效指标扣减分数
*/ */
private BigDecimal complainScoreSub; private BigDecimal complainScoreSub;
/** /**
* 办件绩效指标增加分数 * 办件绩效指标增加分数
*/ */
private BigDecimal workScoreAdd; private BigDecimal goworkScoreAdd;
/** /**
* 办件绩效指标扣减分数 * 办件绩效指标扣减分数
*/ */
private BigDecimal workScoreSub; private BigDecimal goworkScoreSub;
/** /**
* 效能绩效指标增加分数 * 效能绩效指标增加分数
*/ */
private BigDecimal effectScoreAdd; private BigDecimal effectScoreAdd;
/** /**
* 效能绩效指标扣减分数 * 效能绩效指标扣减分数
*/ */
private BigDecimal effectScoreSub; private BigDecimal effectScoreSub;
/** /**
* 其它绩效指标增加分数 * 其它绩效指标增加分数
*/ */
private BigDecimal otherScoreAdd; private BigDecimal otherScoreAdd;
/** /**
* 其它绩效指标扣减分数 * 其它绩效指标扣减分数
*/ */
private BigDecimal otherScoreSub; private BigDecimal otherScoreSub;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
/** /**
* 年 * 年
*/ */
private Integer year; private Integer year;
/** /**
* 月 * 月
*/ */
private Integer month; private Integer month;
/** /**
* 日 * 日
*/ */
private Integer day; private Integer day;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == null) return false; if (obj == null) return false;
if (obj instanceof StaffPerformStatEntity) { if (obj instanceof StaffPerformStatEntity) {
StaffPerformStatEntity tmp = (StaffPerformStatEntity) obj; StaffPerformStatEntity tmp = (StaffPerformStatEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
} }
public void initAttrValue() { public void initAttrValue(){
this.staffId = 0L; this.staffId = 0L;
this.staffName = ""; this.staffName = "";
this.totalScore = new BigDecimal(0); this.totalScore = new BigDecimal(0);
this.totalAddScore = new BigDecimal(0); this.totalAddScore = new BigDecimal(0);
this.totalSubScore = new BigDecimal(0); this.totalSubScore = new BigDecimal(0);
this.attendScoreAdd = new BigDecimal(0); this.attendScoreAdd = new BigDecimal(0);
this.attendScoreSub = new BigDecimal(0); this.attendScoreSub = new BigDecimal(0);
this.assessScoreAdd = new BigDecimal(0); this.reviewScoreAdd = new BigDecimal(0);
this.assessScoreSub = new BigDecimal(0); this.reviewScoreSub = new BigDecimal(0);
this.complainScoreAdd = new BigDecimal(0); this.complainScoreAdd = new BigDecimal(0);
this.complainScoreSub = new BigDecimal(0); this.complainScoreSub = new BigDecimal(0);
this.workScoreAdd = new BigDecimal(0); this.goworkScoreAdd = new BigDecimal(0);
this.workScoreSub = new BigDecimal(0); this.goworkScoreSub = new BigDecimal(0);
this.effectScoreAdd = new BigDecimal(0); this.effectScoreAdd = new BigDecimal(0);
this.effectScoreSub = new BigDecimal(0); this.effectScoreSub = new BigDecimal(0);
this.otherScoreAdd = new BigDecimal(0); this.otherScoreAdd = new BigDecimal(0);
this.otherScoreSub = new BigDecimal(0); this.otherScoreSub = new BigDecimal(0);
this.remark = ""; this.remark = "";
this.year = DateUtil.year(new Date()); this.year = -1;
this.month = DateUtil.month(new Date()) + 1; this.month = -1;
this.day = DateUtil.dayOfMonth(new Date()); this.day = -1;
} }
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import lombok.Data; ...@@ -11,7 +11,7 @@ import lombok.Data;
* 员工绩效统计实体对象 * 员工绩效统计实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-05 * @date 2023-07-14
*/ */
@Data @Data
public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
...@@ -44,11 +44,15 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { ...@@ -44,11 +44,15 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
/** /**
* 评价绩效指标分数 * 评价绩效指标分数
*/ */
private BigDecimal assessScore; private BigDecimal reviewScore;
/**
* 投诉绩效指标分数
*/
private BigDecimal complainScore;
/** /**
* 办件绩效分数 * 办件绩效分数
*/ */
private BigDecimal workScore; private BigDecimal goworkScore;
/** /**
* 效能绩效分数 * 效能绩效分数
*/ */
...@@ -107,9 +111,11 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { ...@@ -107,9 +111,11 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
this.attendScore = new BigDecimal(0); this.attendScore = new BigDecimal(0);
this.assessScore = new BigDecimal(0); this.reviewScore = new BigDecimal(0);
this.complainScore = new BigDecimal(0);
this.workScore = new BigDecimal(0); this.goworkScore = new BigDecimal(0);
this.effectScore = new BigDecimal(0); this.effectScore = new BigDecimal(0);
...@@ -125,4 +131,4 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo { ...@@ -125,4 +131,4 @@ public class StaffPerformSummaryEntity extends StaffPerformSummaryVo {
this.month = -1; this.month = -1;
} }
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import java.util.Date; ...@@ -11,7 +11,7 @@ import java.util.Date;
* 员工绩效统计视图对象 * 员工绩效统计视图对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-11 * @date 2023-07-14
*/ */
@Data @Data
public class StaffPerformStatVo extends BaseEntityLong { public class StaffPerformStatVo extends BaseEntityLong {
......
...@@ -11,9 +11,9 @@ import java.util.Date; ...@@ -11,9 +11,9 @@ import java.util.Date;
* 员工绩效统计视图对象 * 员工绩效统计视图对象
* *
* @author zxfei * @author zxfei
* @date 2023-07-05 * @date 2023-07-14
*/ */
@Data @Data
public class StaffPerformSummaryVo extends BaseEntityLong { public class StaffPerformSummaryVo extends BaseEntityLong {
} }
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.dept.dao.ibatis.DeptPerformStatDaoImpl">
<!-- 按天top10 -->
<select id="getSummaryCheckList" parameterType="com.mortals.xhx.module.dept.model.vo.DeptSummaryTopQuery" resultType="com.mortals.xhx.module.dept.model.DeptPerformStatEntity">
SELECT * FROM (
SELECT
`year`,
`month`,
`day`,
deptId,
deptName,
SUM(totalScore) AS totalScore
FROM
mortals_xhx_dept_perform_stat
WHERE 1=1
<if test="year != null">
AND `year` = #{year}
</if>
<if test="month != null">
AND `month` = #{month}
</if>
<if test="day != null">
AND `day` = #{day}
</if>
GROUP BY
deptId,
`year`,
`month`,
`day`
) AS a ORDER BY totalScore DESC LIMIT 10
</select>
</mapper>
\ No newline at end of file
...@@ -540,3 +540,104 @@ PRIMARY KEY (`id`) ...@@ -540,3 +540,104 @@ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
-- ----------------------------
2023-7-14
-- ----------------------------
-- ----------------------------
-- 部门绩效分数统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_dept_perform_stat`;
CREATE TABLE mortals_xhx_dept_perform_stat(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`deptId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`deptName` varchar(64) COMMENT '部门名称',
`totalScore` decimal(10,2) NOT NULL COMMENT '部门绩效总分数',
`totalAddScore` decimal(10,2) NOT NULL COMMENT '部门绩效加分总分数汇总',
`totalSubScore` decimal(10,2) NOT NULL COMMENT '部门绩效减分总分数汇总',
`attendScoreAdd` decimal(10,2) COMMENT '考勤绩效指标增加分数',
`attendScoreSub` decimal(10,2) COMMENT '考勤绩效指标扣减分数',
`reviewScoreAdd` decimal(10,2) COMMENT '评价绩效指标增加分数',
`reviewScoreSub` decimal(10,2) COMMENT '评价绩效指标扣减分数',
`complainScoreAdd` decimal(10,2) COMMENT '投诉绩效指标增加分数',
`complainScoreSub` decimal(10,2) COMMENT '投诉绩效指标扣减分数',
`goworkScoreAdd` decimal(10,2) COMMENT '办件绩效指标增加分数',
`goworkScoreSub` decimal(10,2) COMMENT '办件绩效指标扣减分数',
`effectScoreAdd` decimal(10,2) COMMENT '效能绩效指标增加分数',
`effectScoreSub` decimal(10,2) COMMENT '效能绩效指标扣减分数',
`otherScoreAdd` decimal(10,2) COMMENT '其它绩效指标增加分数',
`otherScoreSub` decimal(10,2) COMMENT '其它绩效指标扣减分数',
`averageScore` decimal(10,2) NOT NULL COMMENT '部门绩效平均分数,根据部门所属人数平均',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`day` tinyint(2) NOT NULL COMMENT '日',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='部门绩效分数统计';
-- ----------------------------
-- 员工绩效统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_staff_perform_stat`;
CREATE TABLE mortals_xhx_staff_perform_stat(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`staffId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`staffName` varchar(64) COMMENT '部门名称',
`totalScore` decimal(10,2) NOT NULL COMMENT '员工绩效总分数',
`totalAddScore` decimal(10,2) NOT NULL COMMENT '员工绩效加分总分数汇总',
`totalSubScore` decimal(10,2) NOT NULL COMMENT '员工绩效减分总分数汇总',
`attendScoreAdd` decimal(10,2) COMMENT '考勤绩效指标增加分数',
`attendScoreSub` decimal(10,2) COMMENT '考勤绩效指标扣减分数',
`reviewScoreAdd` decimal(10,2) COMMENT '评价绩效指标增加分数',
`reviewScoreSub` decimal(10,2) COMMENT '评价绩效指标扣减分数',
`complainScoreAdd` decimal(10,2) COMMENT '投诉绩效指标增加分数',
`complainScoreSub` decimal(10,2) COMMENT '投诉绩效指标扣减分数',
`goworkScoreAdd` decimal(10,2) COMMENT '办件绩效指标增加分数',
`goworkScoreSub` decimal(10,2) COMMENT '办件绩效指标扣减分数',
`effectScoreAdd` decimal(10,2) COMMENT '效能绩效指标增加分数',
`effectScoreSub` decimal(10,2) COMMENT '效能绩效指标扣减分数',
`otherScoreAdd` decimal(10,2) COMMENT '其它绩效指标增加分数',
`otherScoreSub` decimal(10,2) COMMENT '其它绩效指标扣减分数',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`day` tinyint(2) NOT NULL COMMENT '日',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
-- ----------------------------
-- 员工绩效统计表
-- ----------------------------
DROP TABLE IF EXISTS `mortals_xhx_staff_perform_summary`;
CREATE TABLE mortals_xhx_staff_perform_summary(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`staffId` bigint(20) DEFAULT '0' COMMENT '人员id',
`workNum` varchar(64) COMMENT '工号',
`staffName` varchar(512) COMMENT '人员名称',
`deptId` bigint(20) DEFAULT '0' COMMENT '部门id号',
`deptName` varchar(64) COMMENT '部门名称',
`attendScore` decimal(10,2) COMMENT '考勤绩效指标分数',
`reviewScore` decimal(10,2) COMMENT '评价绩效指标分数',
`complainScore` decimal(10,2) COMMENT '投诉绩效指标分数',
`goworkScore` decimal(10,2) COMMENT '办件绩效分数',
`effectScore` decimal(10,2) COMMENT '效能绩效分数',
`otherScore` decimal(10,2) COMMENT '其它绩效分数',
`errorScore` decimal(10,2) COMMENT '累计异常分数',
`totalScore` decimal(10,2) COMMENT '当月得分数',
`remark` varchar(255) COMMENT '备注',
`year` int(9) NOT NULL COMMENT '年',
`month` tinyint(2) NOT NULL COMMENT '月',
`createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人id',
`updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工绩效统计';
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